Merge "Update visibility logic in realStartActivityLocked"
diff --git a/Android.mk b/Android.mk
index 22323c5..e766e60 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 \
@@ -263,10 +264,9 @@
 	core/java/android/os/storage/IObbActionListener.aidl \
 	core/java/android/security/IKeystoreService.aidl \
 	core/java/android/security/keymaster/IKeyAttestationApplicationIdProvider.aidl \
-	core/java/android/service/autofill/IAutoFillAppCallback.aidl \
-	core/java/android/service/autofill/IAutoFillManagerService.aidl \
-	core/java/android/service/autofill/IAutoFillServerCallback.aidl \
 	core/java/android/service/autofill/IAutoFillService.aidl \
+	core/java/android/service/autofill/IFillCallback.aidl \
+	core/java/android/service/autofill/ISaveCallback.aidl \
 	core/java/android/service/carrier/ICarrierService.aidl \
 	core/java/android/service/carrier/ICarrierMessagingCallback.aidl \
 	core/java/android/service/carrier/ICarrierMessagingService.aidl \
@@ -294,6 +294,10 @@
 	core/java/android/print/IWriteResultCallback.aidl \
 	core/java/android/printservice/IPrintService.aidl \
 	core/java/android/printservice/IPrintServiceClient.aidl \
+	core/java/android/companion/ICompanionDeviceManager.aidl \
+	core/java/android/companion/ICompanionDeviceDiscoveryService.aidl \
+	core/java/android/companion/ICompanionDeviceDiscoveryServiceCallback.aidl \
+	core/java/android/companion/IFindDeviceCallback.aidl \
 	core/java/android/service/dreams/IDreamManager.aidl \
 	core/java/android/service/dreams/IDreamService.aidl \
 	core/java/android/service/persistentdata/IPersistentDataBlockService.aidl \
@@ -312,6 +316,8 @@
 	core/java/android/view/accessibility/IAccessibilityInteractionConnectionCallback.aidl\
 	core/java/android/view/accessibility/IAccessibilityManager.aidl \
 	core/java/android/view/accessibility/IAccessibilityManagerClient.aidl \
+	core/java/android/view/autofill/IAutoFillManager.aidl \
+	core/java/android/view/autofill/IAutoFillManagerClient.aidl \
 	core/java/android/view/IApplicationToken.aidl \
 	core/java/android/view/IAppTransitionAnimationSpecsFuture.aidl \
 	core/java/android/view/IDockedStackListener.aidl \
@@ -365,6 +371,7 @@
 	core/java/com/android/internal/statusbar/IStatusBar.aidl \
 	core/java/com/android/internal/statusbar/IStatusBarService.aidl \
 	core/java/com/android/internal/textservice/ISpellCheckerService.aidl \
+	core/java/com/android/internal/textservice/ISpellCheckerServiceCallback.aidl \
 	core/java/com/android/internal/textservice/ISpellCheckerSession.aidl \
 	core/java/com/android/internal/textservice/ISpellCheckerSessionListener.aidl \
 	core/java/com/android/internal/textservice/ITextServicesManager.aidl \
@@ -383,6 +390,7 @@
 	core/java/com/android/internal/widget/IRemoteViewsAdapterConnection.aidl \
 	keystore/java/android/security/IKeyChainAliasCallback.aidl \
 	keystore/java/android/security/IKeyChainService.aidl \
+	location/java/android/location/IBatchedLocationCallback.aidl \
 	location/java/android/location/ICountryDetector.aidl \
 	location/java/android/location/ICountryListener.aidl \
 	location/java/android/location/IFusedProvider.aidl \
@@ -465,6 +473,7 @@
 	telephony/java/com/android/ims/internal/IImsEcbm.aidl \
 	telephony/java/com/android/ims/internal/IImsEcbmListener.aidl \
         telephony/java/com/android/ims/internal/IImsExternalCallStateListener.aidl \
+        telephony/java/com/android/ims/internal/IImsFeatureStatusCallback.aidl \
         telephony/java/com/android/ims/internal/IImsMultiEndpoint.aidl \
 	telephony/java/com/android/ims/internal/IImsService.aidl \
 	telephony/java/com/android/ims/internal/IImsServiceController.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 c7982e7..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 0f146d7..73e608a 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";
@@ -118,6 +120,8 @@
     field public static final java.lang.String REQUEST_IGNORE_BATTERY_OPTIMIZATIONS = "android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS";
     field public static final java.lang.String REQUEST_INSTALL_PACKAGES = "android.permission.REQUEST_INSTALL_PACKAGES";
     field public static final deprecated java.lang.String RESTART_PACKAGES = "android.permission.RESTART_PACKAGES";
+    field public static final java.lang.String RESTRICTED_VR_ACCESS = "android.permission.RESTRICTED_VR_ACCESS";
+    field public static final java.lang.String RUN_IN_BACKGROUND = "android.permission.RUN_IN_BACKGROUND";
     field public static final java.lang.String SEND_RESPOND_VIA_MESSAGE = "android.permission.SEND_RESPOND_VIA_MESSAGE";
     field public static final java.lang.String SEND_SMS = "android.permission.SEND_SMS";
     field public static final java.lang.String SET_ALARM = "com.android.alarm.permission.SET_ALARM";
@@ -136,6 +140,7 @@
     field public static final java.lang.String TRANSMIT_IR = "android.permission.TRANSMIT_IR";
     field public static final java.lang.String UNINSTALL_SHORTCUT = "com.android.launcher.permission.UNINSTALL_SHORTCUT";
     field public static final java.lang.String UPDATE_DEVICE_STATS = "android.permission.UPDATE_DEVICE_STATS";
+    field public static final java.lang.String USE_DATA_IN_BACKGROUND = "android.permission.USE_DATA_IN_BACKGROUND";
     field public static final java.lang.String USE_FINGERPRINT = "android.permission.USE_FINGERPRINT";
     field public static final java.lang.String USE_SIP = "android.permission.USE_SIP";
     field public static final java.lang.String VIBRATE = "android.permission.VIBRATE";
@@ -203,7 +208,6 @@
 
   public static final class R.attr {
     ctor public R.attr();
-    field public static final int __removed0 = 16844097; // 0x1010541
     field public static final int __removed1 = 16844099; // 0x1010543
     field public static final int absListViewStyle = 16842858; // 0x101006a
     field public static final int accessibilityEventTypes = 16843648; // 0x1010380
@@ -269,6 +273,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 +303,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
@@ -598,6 +603,8 @@
     field public static final int font = 16844082; // 0x1010532
     field public static final int fontFamily = 16843692; // 0x10103ac
     field public static final int fontFeatureSettings = 16843959; // 0x10104b7
+    field public static final int fontProviderAuthority = 16844114; // 0x1010552
+    field public static final int fontProviderQuery = 16844115; // 0x1010553
     field public static final int fontStyle = 16844081; // 0x1010531
     field public static final int fontWeight = 16844083; // 0x1010533
     field public static final int footerDividersEnabled = 16843311; // 0x101022f
@@ -923,6 +930,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
@@ -1270,6 +1278,7 @@
     field public static final int targetId = 16843740; // 0x10103dc
     field public static final int targetName = 16843853; // 0x101044d
     field public static final int targetPackage = 16842785; // 0x1010021
+    field public static final int targetProcess = 16844097; // 0x1010541
     field public static final int targetSandboxVersion = 16844110; // 0x101054e
     field public static final int targetSdkVersion = 16843376; // 0x1010270
     field public static final int taskAffinity = 16842770; // 0x1010012
@@ -2688,11 +2697,25 @@
 
 package android.accessibilityservice {
 
+  public final class AccessibilityButtonController {
+    method public boolean isAccessibilityButtonAvailable();
+    method public void registerAccessibilityButtonCallback(android.accessibilityservice.AccessibilityButtonController.AccessibilityButtonCallback);
+    method public void registerAccessibilityButtonCallback(android.accessibilityservice.AccessibilityButtonController.AccessibilityButtonCallback, android.os.Handler);
+    method public void unregisterAccessibilityButtonCallback(android.accessibilityservice.AccessibilityButtonController.AccessibilityButtonCallback);
+  }
+
+  public static abstract class AccessibilityButtonController.AccessibilityButtonCallback {
+    ctor public AccessibilityButtonController.AccessibilityButtonCallback();
+    method public void onAvailabilityChanged(android.accessibilityservice.AccessibilityButtonController, boolean);
+    method public void onClicked(android.accessibilityservice.AccessibilityButtonController);
+  }
+
   public abstract class AccessibilityService extends android.app.Service {
     ctor public AccessibilityService();
     method public final void disableSelf();
     method public final boolean dispatchGesture(android.accessibilityservice.GestureDescription, android.accessibilityservice.AccessibilityService.GestureResultCallback, android.os.Handler);
     method public android.view.accessibility.AccessibilityNodeInfo findFocus(int);
+    method public final android.accessibilityservice.AccessibilityButtonController getAccessibilityButtonController();
     method public final android.accessibilityservice.FingerprintGestureController getFingerprintGestureController();
     method public final android.accessibilityservice.AccessibilityService.MagnificationController getMagnificationController();
     method public android.view.accessibility.AccessibilityNodeInfo getRootInActiveWindow();
@@ -2805,6 +2828,7 @@
     field public static final int FLAG_ENABLE_ACCESSIBILITY_VOLUME = 128; // 0x80
     field public static final int FLAG_INCLUDE_NOT_IMPORTANT_VIEWS = 2; // 0x2
     field public static final int FLAG_REPORT_VIEW_IDS = 16; // 0x10
+    field public static final int FLAG_REQUEST_ACCESSIBILITY_BUTTON = 256; // 0x100
     field public static final int FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 8; // 0x8
     field public static final int FLAG_REQUEST_FILTER_KEY_EVENTS = 32; // 0x20
     field public static final int FLAG_REQUEST_TOUCH_EXPLORATION_MODE = 4; // 0x4
@@ -2909,7 +2933,7 @@
   public class AccountManager {
     method public android.accounts.AccountManagerFuture<android.os.Bundle> addAccount(java.lang.String, java.lang.String, java.lang.String[], android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
     method public boolean addAccountExplicitly(android.accounts.Account, java.lang.String, android.os.Bundle);
-    method public boolean addAccountExplicitly(android.accounts.Account, java.lang.String, android.os.Bundle, java.util.Map<java.lang.Integer, java.lang.Integer>);
+    method public boolean addAccountExplicitly(android.accounts.Account, java.lang.String, android.os.Bundle, java.util.Map<java.lang.String, java.lang.Integer>);
     method public void addOnAccountsUpdatedListener(android.accounts.OnAccountsUpdateListener, android.os.Handler, boolean);
     method public void addOnAccountsUpdatedListener(android.accounts.OnAccountsUpdateListener, android.os.Handler, boolean, java.lang.String[]);
     method public java.lang.String blockingGetAuthToken(android.accounts.Account, java.lang.String, boolean) throws android.accounts.AuthenticatorException, java.io.IOException, android.accounts.OperationCanceledException;
@@ -2918,7 +2942,7 @@
     method public android.accounts.AccountManagerFuture<android.os.Bundle> editProperties(java.lang.String, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
     method public android.accounts.AccountManagerFuture<android.os.Bundle> finishSession(android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
     method public static android.accounts.AccountManager get(android.content.Context);
-    method public int getAccountVisibility(android.accounts.Account, int);
+    method public int getAccountVisibility(android.accounts.Account, java.lang.String);
     method public android.accounts.Account[] getAccounts();
     method public java.util.Map<android.accounts.Account, java.lang.Integer> getAccountsAndVisibilityForPackage(java.lang.String, java.lang.String);
     method public android.accounts.Account[] getAccountsByType(java.lang.String);
@@ -2929,9 +2953,9 @@
     method public android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, java.lang.String, android.os.Bundle, boolean, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
     method public android.accounts.AccountManagerFuture<android.os.Bundle> getAuthTokenByFeatures(java.lang.String, java.lang.String, java.lang.String[], android.app.Activity, android.os.Bundle, android.os.Bundle, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
     method public android.accounts.AuthenticatorDescription[] getAuthenticatorTypes();
+    method public java.util.Map<java.lang.String, java.lang.Integer> getPackagesAndVisibilityForAccount(android.accounts.Account);
     method public java.lang.String getPassword(android.accounts.Account);
     method public java.lang.String getPreviousName(android.accounts.Account);
-    method public java.util.Map<java.lang.Integer, java.lang.Integer> getUidsAndVisibilityForAccount(android.accounts.Account);
     method public java.lang.String getUserData(android.accounts.Account, java.lang.String);
     method public android.accounts.AccountManagerFuture<java.lang.Boolean> hasFeatures(android.accounts.Account, java.lang.String[], android.accounts.AccountManagerCallback<java.lang.Boolean>, android.os.Handler);
     method public void invalidateAuthToken(java.lang.String, java.lang.String);
@@ -2945,7 +2969,7 @@
     method public boolean removeAccountExplicitly(android.accounts.Account);
     method public void removeOnAccountsUpdatedListener(android.accounts.OnAccountsUpdateListener);
     method public android.accounts.AccountManagerFuture<android.accounts.Account> renameAccount(android.accounts.Account, java.lang.String, android.accounts.AccountManagerCallback<android.accounts.Account>, android.os.Handler);
-    method public boolean setAccountVisibility(android.accounts.Account, int, int);
+    method public boolean setAccountVisibility(android.accounts.Account, java.lang.String, int);
     method public void setAuthToken(android.accounts.Account, java.lang.String, java.lang.String);
     method public void setPassword(android.accounts.Account, java.lang.String);
     method public void setUserData(android.accounts.Account, java.lang.String, java.lang.String);
@@ -2985,8 +3009,8 @@
     field public static final java.lang.String KEY_PASSWORD = "password";
     field public static final java.lang.String KEY_USERDATA = "userdata";
     field public static final deprecated java.lang.String LOGIN_ACCOUNTS_CHANGED_ACTION = "android.accounts.LOGIN_ACCOUNTS_CHANGED";
-    field public static final int UID_KEY_DEFAULT_LEGACY_VISIBILITY = -3; // 0xfffffffd
-    field public static final int UID_KEY_DEFAULT_VISIBILITY = -2; // 0xfffffffe
+    field public static final java.lang.String PACKAGE_NAME_KEY_LEGACY_NOT_VISIBLE = "android.accounts.key_legacy_not_visible";
+    field public static final java.lang.String PACKAGE_NAME_KEY_LEGACY_VISIBLE = "android.accounts.key_legacy_visible";
     field public static final int VISIBILITY_NOT_VISIBLE = 3; // 0x3
     field public static final int VISIBILITY_UNDEFINED = 0; // 0x0
     field public static final int VISIBILITY_USER_MANAGED_NOT_VISIBLE = 4; // 0x4
@@ -3121,6 +3145,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();
@@ -4171,7 +4196,6 @@
     method public abstract void onActivityCreated(android.app.Activity, android.os.Bundle);
     method public abstract void onActivityDestroyed(android.app.Activity);
     method public abstract void onActivityPaused(android.app.Activity);
-    method public default void onActivityPreCreated(android.app.Activity, android.os.Bundle);
     method public abstract void onActivityResumed(android.app.Activity);
     method public abstract void onActivitySaveInstanceState(android.app.Activity, android.os.Bundle);
     method public abstract void onActivityStarted(android.app.Activity);
@@ -4805,6 +4829,7 @@
     method public void addMonitor(android.app.Instrumentation.ActivityMonitor);
     method public android.app.Instrumentation.ActivityMonitor addMonitor(android.content.IntentFilter, android.app.Instrumentation.ActivityResult, boolean);
     method public android.app.Instrumentation.ActivityMonitor addMonitor(java.lang.String, android.app.Instrumentation.ActivityResult, boolean);
+    method public void addResults(android.os.Bundle);
     method public void callActivityOnCreate(android.app.Activity, android.os.Bundle);
     method public void callActivityOnCreate(android.app.Activity, android.os.Bundle, android.os.PersistableBundle);
     method public void callActivityOnDestroy(android.app.Activity);
@@ -4829,6 +4854,7 @@
     method public android.os.Bundle getBinderCounts();
     method public android.content.ComponentName getComponentName();
     method public android.content.Context getContext();
+    method public java.lang.String getProcessName();
     method public android.content.Context getTargetContext();
     method public android.app.UiAutomation getUiAutomation();
     method public android.app.UiAutomation getUiAutomation(int);
@@ -5045,14 +5071,19 @@
     ctor public Notification(android.os.Parcel);
     method public android.app.Notification clone();
     method public int describeContents();
+    method public int getBadgeIcon();
     method public java.lang.String getChannel();
     method public java.lang.String getGroup();
     method public android.graphics.drawable.Icon getLargeIcon();
+    method public java.lang.String getShortcutId();
     method public android.graphics.drawable.Icon getSmallIcon();
     method public java.lang.String getSortKey();
     method public long getTimeout();
     method public void writeToParcel(android.os.Parcel, int);
     field public static final android.media.AudioAttributes AUDIO_ATTRIBUTES_DEFAULT;
+    field public static final int BADGE_ICON_LARGE = 2; // 0x2
+    field public static final int BADGE_ICON_NONE = 0; // 0x0
+    field public static final int BADGE_ICON_SMALL = 1; // 0x1
     field public static final java.lang.String CATEGORY_ALARM = "alarm";
     field public static final java.lang.String CATEGORY_CALL = "call";
     field public static final java.lang.String CATEGORY_EMAIL = "email";
@@ -5077,6 +5108,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";
@@ -5144,7 +5176,7 @@
     field public deprecated int ledARGB;
     field public deprecated int ledOffMS;
     field public deprecated int ledOnMS;
-    field public deprecated int number;
+    field public int number;
     field public deprecated int priority;
     field public android.app.Notification publicVersion;
     field public deprecated android.net.Uri sound;
@@ -5232,6 +5264,7 @@
     method public android.app.Notification.Builder addExtras(android.os.Bundle);
     method public android.app.Notification.Builder addPerson(java.lang.String);
     method public android.app.Notification build();
+    method public android.app.Notification.Builder chooseBadgeIcon(int);
     method public android.widget.RemoteViews createBigContentView();
     method public android.widget.RemoteViews createContentView();
     method public android.widget.RemoteViews createHeadsUpContentView();
@@ -5264,13 +5297,14 @@
     method public android.app.Notification.Builder setLargeIcon(android.graphics.drawable.Icon);
     method public deprecated android.app.Notification.Builder setLights(int, int, int);
     method public android.app.Notification.Builder setLocalOnly(boolean);
-    method public deprecated android.app.Notification.Builder setNumber(int);
+    method public android.app.Notification.Builder setNumber(int);
     method public android.app.Notification.Builder setOngoing(boolean);
     method public android.app.Notification.Builder setOnlyAlertOnce(boolean);
     method public deprecated android.app.Notification.Builder setPriority(int);
     method public android.app.Notification.Builder setProgress(int, int, boolean);
     method public android.app.Notification.Builder setPublicVersion(android.app.Notification);
     method public android.app.Notification.Builder setRemoteInputHistory(java.lang.CharSequence[]);
+    method public android.app.Notification.Builder setShortcutId(java.lang.String);
     method public android.app.Notification.Builder setShowWhen(boolean);
     method public android.app.Notification.Builder setSmallIcon(int);
     method public android.app.Notification.Builder setSmallIcon(int, int);
@@ -5448,11 +5482,13 @@
     method public boolean canBypassDnd();
     method public boolean canShowBadge();
     method public int describeContents();
+    method public void enableLights(boolean);
     method public void enableVibration(boolean);
     method public android.media.AudioAttributes getAudioAttributes();
     method public java.lang.String getGroup();
     method public java.lang.String getId();
     method public int getImportance();
+    method public int getLightColor();
     method public int getLockscreenVisibility();
     method public java.lang.CharSequence getName();
     method public android.net.Uri getSound();
@@ -5460,7 +5496,7 @@
     method public void setBypassDnd(boolean);
     method public void setGroup(java.lang.String);
     method public void setImportance(int);
-    method public void setLights(boolean);
+    method public void setLightColor(int);
     method public void setLockscreenVisibility(int);
     method public void setShowBadge(boolean);
     method public void setSound(android.net.Uri, android.media.AudioAttributes);
@@ -5475,6 +5511,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();
@@ -5642,10 +5679,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);
@@ -5654,10 +5690,11 @@
   }
 
   public final class RemoteAction implements android.os.Parcelable {
-    ctor public RemoteAction(android.graphics.drawable.Icon, java.lang.CharSequence, java.lang.CharSequence, android.app.RemoteAction.OnActionListener);
+    ctor public RemoteAction(android.graphics.drawable.Icon, java.lang.CharSequence, java.lang.CharSequence, android.app.PendingIntent);
     method public android.app.RemoteAction clone();
     method public int describeContents();
     method public void dump(java.lang.String, java.io.PrintWriter);
+    method public android.app.PendingIntent getActionIntent();
     method public java.lang.CharSequence getContentDescription();
     method public android.graphics.drawable.Icon getIcon();
     method public java.lang.CharSequence getTitle();
@@ -5665,10 +5702,6 @@
     field public static final android.os.Parcelable.Creator<android.app.RemoteAction> CREATOR;
   }
 
-  public static abstract interface RemoteAction.OnActionListener {
-    method public abstract void onAction(android.app.RemoteAction);
-  }
-
   public final class RemoteInput implements android.os.Parcelable {
     method public static void addDataResultToIntent(android.app.RemoteInput, android.content.Intent, java.util.Map<java.lang.String, android.net.Uri>);
     method public static void addResultsToIntent(android.app.RemoteInput[], android.content.Intent, android.os.Bundle);
@@ -6169,6 +6202,7 @@
     method public void clearDeviceOwnerApp(java.lang.String);
     method public void clearPackagePersistentPreferredActivities(android.content.ComponentName, java.lang.String);
     method public void clearProfileOwner(android.content.ComponentName);
+    method public boolean clearResetPasswordToken(android.content.ComponentName);
     method public void clearUserRestriction(android.content.ComponentName, java.lang.String);
     method public android.content.Intent createAdminSupportIntent(java.lang.String);
     method public android.os.UserHandle createAndManageUser(android.content.ComponentName, java.lang.String, android.content.ComponentName, android.os.PersistableBundle, int);
@@ -6194,6 +6228,7 @@
     method public java.lang.CharSequence getDeviceOwnerLockScreenInfo();
     method public java.util.List<byte[]> getInstalledCaCerts(android.content.ComponentName);
     method public int getKeyguardDisabledFeatures(android.content.ComponentName);
+    method public java.lang.String[] getLockTaskPackages(android.content.ComponentName);
     method public java.lang.CharSequence getLongSupportMessage(android.content.ComponentName);
     method public int getMaximumFailedPasswordsForWipe(android.content.ComponentName);
     method public long getMaximumTimeToLock(android.content.ComponentName);
@@ -6244,6 +6279,7 @@
     method public boolean isPackageSuspended(android.content.ComponentName, java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
     method public boolean isProfileOwnerApp(java.lang.String);
     method public boolean isProvisioningAllowed(java.lang.String);
+    method public boolean isResetPasswordTokenActive(android.content.ComponentName);
     method public boolean isSecurityLoggingEnabled(android.content.ComponentName);
     method public boolean isUninstallBlocked(android.content.ComponentName, java.lang.String);
     method public void lockNow();
@@ -6255,6 +6291,7 @@
     method public boolean removeUser(android.content.ComponentName, android.os.UserHandle);
     method public boolean requestBugreport(android.content.ComponentName);
     method public boolean resetPassword(java.lang.String, int);
+    method public boolean resetPasswordWithToken(android.content.ComponentName, java.lang.String, byte[], int);
     method public java.util.List<android.app.admin.NetworkEvent> retrieveNetworkLogs(android.content.ComponentName, long);
     method public java.util.List<android.app.admin.SecurityLog.SecurityEvent> retrievePreRebootSecurityLogs(android.content.ComponentName);
     method public java.util.List<android.app.admin.SecurityLog.SecurityEvent> retrieveSecurityLogs(android.content.ComponentName);
@@ -6303,6 +6340,7 @@
     method public void setProfileName(android.content.ComponentName, java.lang.String);
     method public void setRecommendedGlobalProxy(android.content.ComponentName, android.net.ProxyInfo);
     method public void setRequiredStrongAuthTimeout(android.content.ComponentName, long);
+    method public boolean setResetPasswordToken(android.content.ComponentName, byte[]);
     method public void setRestrictionsProvider(android.content.ComponentName, android.content.ComponentName);
     method public void setScreenCaptureDisabled(android.content.ComponentName, boolean);
     method public void setSecureSetting(android.content.ComponentName, java.lang.String, java.lang.String);
@@ -6536,6 +6574,7 @@
     method public int getTextStyle();
     method public int getTop();
     method public android.graphics.Matrix getTransformation();
+    method public java.lang.String getUrl();
     method public int getVisibility();
     method public int getWidth();
     method public boolean isAccessibilityFocused();
@@ -6574,6 +6613,7 @@
   public abstract class BackupAgent extends android.content.ContextWrapper {
     ctor public BackupAgent();
     method public final void fullBackupFile(java.io.File, android.app.backup.FullBackupDataOutput);
+    method public long getBackupQuota();
     method public abstract void onBackup(android.os.ParcelFileDescriptor, android.app.backup.BackupDataOutput, android.os.ParcelFileDescriptor) throws java.io.IOException;
     method public void onCreate();
     method public void onDestroy();
@@ -7942,6 +7982,65 @@
 
 }
 
+package android.companion {
+
+  public final class AssociationRequest<F extends android.companion.DeviceFilter> implements android.os.Parcelable {
+    method public int describeContents();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.companion.AssociationRequest> CREATOR;
+  }
+
+  public static final class AssociationRequest.Builder<F extends android.companion.DeviceFilter> {
+    method public android.companion.AssociationRequest<F> build();
+    method public static android.companion.AssociationRequest.Builder<android.companion.BluetoothDeviceFilter> createForBluetoothDevice();
+    method public static android.companion.AssociationRequest.Builder<android.companion.BluetoothLEDeviceFilter> createForBluetoothLEDevice();
+    method public android.companion.AssociationRequest.Builder<F> setDeviceFilter(F);
+    method public android.companion.AssociationRequest.Builder<F> setSingleDevice(boolean);
+  }
+
+  public final class BluetoothDeviceFilter implements android.companion.DeviceFilter {
+    method public int describeContents();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.companion.BluetoothDeviceFilter> CREATOR;
+  }
+
+  public static final class BluetoothDeviceFilter.Builder {
+    ctor public BluetoothDeviceFilter.Builder();
+    method public android.companion.BluetoothDeviceFilter.Builder addServiceUuid(android.os.ParcelUuid, android.os.ParcelUuid);
+    method public android.companion.BluetoothDeviceFilter build();
+    method public android.companion.BluetoothDeviceFilter.Builder setAddress(java.lang.String);
+    method public android.companion.BluetoothDeviceFilter.Builder setNamePattern(java.util.regex.Pattern);
+  }
+
+  public final class BluetoothLEDeviceFilter implements android.companion.DeviceFilter {
+    method public int describeContents();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.companion.BluetoothLEDeviceFilter> CREATOR;
+  }
+
+  public static final class BluetoothLEDeviceFilter.Builder {
+    ctor public BluetoothLEDeviceFilter.Builder();
+    method public android.companion.BluetoothLEDeviceFilter build();
+    method public android.companion.BluetoothLEDeviceFilter.Builder setNamePattern(java.util.regex.Pattern);
+    method public android.companion.BluetoothLEDeviceFilter.Builder setScanFilter(android.bluetooth.le.ScanFilter);
+  }
+
+  public final class CompanionDeviceManager {
+    method public void associate(android.companion.AssociationRequest<?>, android.companion.CompanionDeviceManager.Callback, android.os.Handler);
+    field public static final java.lang.String EXTRA_DEVICE = "android.companion.extra.DEVICE";
+  }
+
+  public static abstract class CompanionDeviceManager.Callback {
+    ctor public CompanionDeviceManager.Callback();
+    method public abstract void onDeviceFound(android.content.IntentSender);
+    method public abstract void onFailure(java.lang.CharSequence);
+  }
+
+  public abstract interface DeviceFilter<D extends android.os.Parcelable> implements android.os.Parcelable {
+  }
+
+}
+
 package android.content {
 
   public abstract class AbstractThreadedSyncAdapter {
@@ -8554,6 +8653,7 @@
     field public static final java.lang.String CAPTIONING_SERVICE = "captioning";
     field public static final java.lang.String CARRIER_CONFIG_SERVICE = "carrier_config";
     field public static final java.lang.String CLIPBOARD_SERVICE = "clipboard";
+    field public static final java.lang.String COMPANION_DEVICE_SERVICE = "companion_device";
     field public static final java.lang.String CONNECTIVITY_SERVICE = "connectivity";
     field public static final java.lang.String CONSUMER_IR_SERVICE = "consumer_ir";
     field public static final int CONTEXT_IGNORE_SECURITY = 2; // 0x2
@@ -9127,7 +9227,7 @@
     field public static final java.lang.String EXTRA_PHONE_NUMBER = "android.intent.extra.PHONE_NUMBER";
     field public static final java.lang.String EXTRA_PROCESS_TEXT = "android.intent.extra.PROCESS_TEXT";
     field public static final java.lang.String EXTRA_PROCESS_TEXT_READONLY = "android.intent.extra.PROCESS_TEXT_READONLY";
-    field public static final java.lang.String EXTRA_QUICK_VIEW_PLAIN = "android.intent.extra.QUICK_VIEW_PLAIN";
+    field public static final java.lang.String EXTRA_QUICK_VIEW_ADVANCED = "android.intent.extra.QUICK_VIEW_ADVANCED";
     field public static final java.lang.String EXTRA_QUIET_MODE = "android.intent.extra.QUIET_MODE";
     field public static final java.lang.String EXTRA_REFERRER = "android.intent.extra.REFERRER";
     field public static final java.lang.String EXTRA_REFERRER_NAME = "android.intent.extra.REFERRER_NAME";
@@ -9832,6 +9932,15 @@
     method public final int compare(android.content.pm.ApplicationInfo, android.content.pm.ApplicationInfo);
   }
 
+  public final class ChangedPackages implements android.os.Parcelable {
+    ctor public ChangedPackages(int, java.util.List<java.lang.String>);
+    method public int describeContents();
+    method public java.util.List<java.lang.String> getPackageNames();
+    method public int getSequenceNumber();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.content.pm.ChangedPackages> CREATOR;
+  }
+
   public class ComponentInfo extends android.content.pm.PackageItemInfo {
     ctor public ComponentInfo();
     ctor public ComponentInfo(android.content.pm.ComponentInfo);
@@ -9904,6 +10013,7 @@
     field public java.lang.String[] splitPublicSourceDirs;
     field public java.lang.String[] splitSourceDirs;
     field public java.lang.String targetPackage;
+    field public java.lang.String targetProcess;
   }
 
   public class LabeledIntent extends android.content.Intent {
@@ -10177,6 +10287,7 @@
     method public abstract java.lang.CharSequence getApplicationLabel(android.content.pm.ApplicationInfo);
     method public abstract android.graphics.drawable.Drawable getApplicationLogo(android.content.pm.ApplicationInfo);
     method public abstract android.graphics.drawable.Drawable getApplicationLogo(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
+    method public abstract android.content.pm.ChangedPackages getChangedPackages(int);
     method public abstract int getComponentEnabledSetting(android.content.ComponentName);
     method public abstract android.graphics.drawable.Drawable getDefaultActivityIcon();
     method public abstract android.graphics.drawable.Drawable getDrawable(java.lang.String, int, android.content.pm.ApplicationInfo);
@@ -10325,6 +10436,7 @@
     field public static final java.lang.String FEATURE_VERIFIED_BOOT = "android.software.verified_boot";
     field public static final java.lang.String FEATURE_VR_MODE = "android.software.vr.mode";
     field public static final java.lang.String FEATURE_VR_MODE_HIGH_PERFORMANCE = "android.hardware.vr.high_performance";
+    field public static final java.lang.String FEATURE_VULKAN_HARDWARE_COMPUTE = "android.hardware.vulkan.compute";
     field public static final java.lang.String FEATURE_VULKAN_HARDWARE_LEVEL = "android.hardware.vulkan.level";
     field public static final java.lang.String FEATURE_VULKAN_HARDWARE_VERSION = "android.hardware.vulkan.version";
     field public static final java.lang.String FEATURE_WATCH = "android.hardware.type.watch";
@@ -12149,6 +12261,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;
@@ -12204,13 +12317,18 @@
   public class Canvas {
     ctor public Canvas();
     ctor public Canvas(android.graphics.Bitmap);
-    method public boolean clipPath(android.graphics.Path, android.graphics.Region.Op);
+    method public boolean clipOutPath(android.graphics.Path);
+    method public boolean clipOutRect(android.graphics.RectF);
+    method public boolean clipOutRect(android.graphics.Rect);
+    method public boolean clipOutRect(float, float, float, float);
+    method public boolean clipOutRect(int, int, int, int);
+    method public deprecated boolean clipPath(android.graphics.Path, android.graphics.Region.Op);
     method public boolean clipPath(android.graphics.Path);
-    method public boolean clipRect(android.graphics.RectF, android.graphics.Region.Op);
-    method public boolean clipRect(android.graphics.Rect, android.graphics.Region.Op);
+    method public deprecated boolean clipRect(android.graphics.RectF, android.graphics.Region.Op);
+    method public deprecated boolean clipRect(android.graphics.Rect, android.graphics.Region.Op);
     method public boolean clipRect(android.graphics.RectF);
     method public boolean clipRect(android.graphics.Rect);
-    method public boolean clipRect(float, float, float, float, android.graphics.Region.Op);
+    method public deprecated boolean clipRect(float, float, float, float, android.graphics.Region.Op);
     method public boolean clipRect(float, float, float, float);
     method public boolean clipRect(int, int, int, int);
     method public void concat(android.graphics.Matrix);
@@ -12278,14 +12396,14 @@
     method public void rotate(float);
     method public final void rotate(float, float, float);
     method public int save();
-    method public int save(int);
-    method public int saveLayer(android.graphics.RectF, android.graphics.Paint, int);
+    method public deprecated int save(int);
+    method public deprecated int saveLayer(android.graphics.RectF, android.graphics.Paint, int);
     method public int saveLayer(android.graphics.RectF, android.graphics.Paint);
-    method public int saveLayer(float, float, float, float, android.graphics.Paint, int);
+    method public deprecated int saveLayer(float, float, float, float, android.graphics.Paint, int);
     method public int saveLayer(float, float, float, float, android.graphics.Paint);
-    method public int saveLayerAlpha(android.graphics.RectF, int, int);
+    method public deprecated int saveLayerAlpha(android.graphics.RectF, int, int);
     method public int saveLayerAlpha(android.graphics.RectF, int);
-    method public int saveLayerAlpha(float, float, float, float, int, int);
+    method public deprecated int saveLayerAlpha(float, float, float, float, int, int);
     method public int saveLayerAlpha(float, float, float, float, int);
     method public void scale(float, float);
     method public final void scale(float, float, float, float);
@@ -12296,11 +12414,11 @@
     method public void skew(float, float);
     method public void translate(float, float);
     field public static final int ALL_SAVE_FLAG = 31; // 0x1f
-    field public static final int CLIP_SAVE_FLAG = 2; // 0x2
-    field public static final int CLIP_TO_LAYER_SAVE_FLAG = 16; // 0x10
-    field public static final int FULL_COLOR_LAYER_SAVE_FLAG = 8; // 0x8
-    field public static final int HAS_ALPHA_LAYER_SAVE_FLAG = 4; // 0x4
-    field public static final int MATRIX_SAVE_FLAG = 1; // 0x1
+    field public static final deprecated int CLIP_SAVE_FLAG = 2; // 0x2
+    field public static final deprecated int CLIP_TO_LAYER_SAVE_FLAG = 16; // 0x10
+    field public static final deprecated int FULL_COLOR_LAYER_SAVE_FLAG = 8; // 0x8
+    field public static final deprecated int HAS_ALPHA_LAYER_SAVE_FLAG = 4; // 0x4
+    field public static final deprecated int MATRIX_SAVE_FLAG = 1; // 0x1
   }
 
   public static final class Canvas.EdgeType extends java.lang.Enum {
@@ -13677,6 +13795,7 @@
     method public static android.graphics.drawable.Icon createWithContentUri(android.net.Uri);
     method public static android.graphics.drawable.Icon createWithData(byte[], int, int);
     method public static android.graphics.drawable.Icon createWithFilePath(java.lang.String);
+    method public static android.graphics.drawable.Icon createWithMaskableBitmap(android.graphics.Bitmap);
     method public static android.graphics.drawable.Icon createWithResource(android.content.Context, int);
     method public static android.graphics.drawable.Icon createWithResource(java.lang.String, int);
     method public int describeContents();
@@ -13760,9 +13879,9 @@
   }
 
   public class MaskableIconDrawable extends android.graphics.drawable.Drawable implements android.graphics.drawable.Drawable.Callback {
-    ctor public MaskableIconDrawable(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable);
     method public void draw(android.graphics.Canvas);
     method public android.graphics.drawable.Drawable getBackground();
+    method public static float getExtraInsetPercentage();
     method public android.graphics.drawable.Drawable getForeground();
     method public android.graphics.Path getIconMask();
     method public int getOpacity();
@@ -13772,8 +13891,6 @@
     method public void setColorFilter(android.graphics.ColorFilter);
     method public void setOpacity(int);
     method public void unscheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable);
-    field public static final float DEFAULT_VIEW_PORT_SCALE = 0.6666667f;
-    field public static final float MASK_SIZE = 100.0f;
   }
 
   public class NinePatchDrawable extends android.graphics.drawable.Drawable {
@@ -14332,6 +14449,7 @@
     field public static final java.lang.String STRING_TYPE_HEART_RATE = "android.sensor.heart_rate";
     field public static final java.lang.String STRING_TYPE_LIGHT = "android.sensor.light";
     field public static final java.lang.String STRING_TYPE_LINEAR_ACCELERATION = "android.sensor.linear_acceleration";
+    field public static final java.lang.String STRING_TYPE_LOW_LATENCY_OFFBODY_DETECT = "android.sensor.low_latency_offbody";
     field public static final java.lang.String STRING_TYPE_MAGNETIC_FIELD = "android.sensor.magnetic_field";
     field public static final java.lang.String STRING_TYPE_MAGNETIC_FIELD_UNCALIBRATED = "android.sensor.magnetic_field_uncalibrated";
     field public static final java.lang.String STRING_TYPE_MOTION_DETECT = "android.sensor.motion_detect";
@@ -14360,6 +14478,7 @@
     field public static final int TYPE_HEART_RATE = 21; // 0x15
     field public static final int TYPE_LIGHT = 5; // 0x5
     field public static final int TYPE_LINEAR_ACCELERATION = 10; // 0xa
+    field public static final int TYPE_LOW_LATENCY_OFFBODY_DETECT = 34; // 0x22
     field public static final int TYPE_MAGNETIC_FIELD = 2; // 0x2
     field public static final int TYPE_MAGNETIC_FIELD_UNCALIBRATED = 14; // 0xe
     field public static final int TYPE_MOTION_DETECT = 30; // 0x1e
@@ -20441,6 +20560,7 @@
     method public int getContentType();
     method public int getFlags();
     method public int getUsage();
+    method public static int getVolumeControlStream(android.media.AudioAttributes);
     method public void writeToParcel(android.os.Parcel, int);
     field public static final int CONTENT_TYPE_MOVIE = 3; // 0x3
     field public static final int CONTENT_TYPE_MUSIC = 2; // 0x2
@@ -20612,7 +20732,7 @@
     method public int getStreamMaxVolume(int);
     method public int getStreamVolume(int);
     method public deprecated int getVibrateSetting(int);
-    method public boolean isBluetoothA2dpOn();
+    method public deprecated boolean isBluetoothA2dpOn();
     method public boolean isBluetoothScoAvailableOffCall();
     method public boolean isBluetoothScoOn();
     method public boolean isMicrophoneMute();
@@ -21901,6 +22021,7 @@
     method public boolean advance();
     method public long getCachedDuration();
     method public android.media.DrmInitData getDrmInitData();
+    method public android.os.Bundle getMetrics();
     method public java.util.Map<java.util.UUID, byte[]> getPsshInfo();
     method public boolean getSampleCryptoInfo(android.media.MediaCodec.CryptoInfo);
     method public int getSampleFlags();
@@ -22163,6 +22284,7 @@
   }
 
   public static final class MediaMuxer.OutputFormat {
+    field public static final int MUXER_OUTPUT_3GPP = 2; // 0x2
     field public static final int MUXER_OUTPUT_MPEG_4 = 0; // 0x0
     field public static final int MUXER_OUTPUT_WEBM = 1; // 0x1
   }
@@ -22201,7 +22323,7 @@
     method public void pause() throws java.lang.IllegalStateException;
     method public void prepare() throws java.io.IOException, java.lang.IllegalStateException;
     method public void prepareAsync() throws java.lang.IllegalStateException;
-    method public void prepareDrm(java.util.UUID, android.media.MediaPlayer.OnDrmConfigCallback) throws android.media.MediaPlayer.ProvisioningErrorException, android.media.ResourceBusyException, android.media.UnsupportedSchemeException;
+    method public void prepareDrm(java.util.UUID) throws android.media.MediaPlayer.ProvisioningErrorException, android.media.ResourceBusyException, android.media.UnsupportedSchemeException;
     method public byte[] provideKeyResponse(byte[], byte[]) throws android.media.DeniedByServerException, android.media.MediaPlayer.NoDrmSchemeException;
     method public void release();
     method public void releaseDrm() throws android.media.MediaPlayer.NoDrmSchemeException;
@@ -22216,6 +22338,7 @@
     method public void setAuxEffectSendLevel(float);
     method public void setBufferingParams(android.media.BufferingParams);
     method public void setDataSource(android.content.Context, android.net.Uri) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.SecurityException;
+    method public void setDataSource(android.content.Context, android.net.Uri, java.util.Map<java.lang.String, java.lang.String>, java.util.List<java.net.HttpCookie>) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.SecurityException;
     method public void setDataSource(android.content.Context, android.net.Uri, java.util.Map<java.lang.String, java.lang.String>) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.SecurityException;
     method public void setDataSource(java.lang.String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.SecurityException;
     method public void setDataSource(android.content.res.AssetFileDescriptor) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
@@ -22228,6 +22351,7 @@
     method public void setNextMediaPlayer(android.media.MediaPlayer);
     method public void setOnBufferingUpdateListener(android.media.MediaPlayer.OnBufferingUpdateListener);
     method public void setOnCompletionListener(android.media.MediaPlayer.OnCompletionListener);
+    method public void setOnDrmConfigListener(android.media.MediaPlayer.OnDrmConfigListener);
     method public void setOnDrmInfoListener(android.media.MediaPlayer.OnDrmInfoListener);
     method public void setOnDrmInfoListener(android.media.MediaPlayer.OnDrmInfoListener, android.os.Handler);
     method public void setOnDrmPreparedListener(android.media.MediaPlayer.OnDrmPreparedListener);
@@ -22292,9 +22416,8 @@
     method public abstract void onCompletion(android.media.MediaPlayer);
   }
 
-  public static abstract class MediaPlayer.OnDrmConfigCallback {
-    ctor public MediaPlayer.OnDrmConfigCallback();
-    method public void onDrmConfig(android.media.MediaPlayer);
+  public static abstract interface MediaPlayer.OnDrmConfigListener {
+    method public abstract void onDrmConfig(android.media.MediaPlayer);
   }
 
   public static abstract interface MediaPlayer.OnDrmInfoListener {
@@ -23583,6 +23706,8 @@
 
   public final class MediaController {
     ctor public MediaController(android.content.Context, android.media.session.MediaSession.Token);
+    method public void addQueueItem(android.media.MediaDescription);
+    method public void addQueueItem(android.media.MediaDescription, int);
     method public void adjustVolume(int, int);
     method public boolean dispatchMediaButtonEvent(android.view.KeyEvent);
     method public android.os.Bundle getExtras();
@@ -23601,6 +23726,8 @@
     method public boolean isShuffleModeEnabled();
     method public void registerCallback(android.media.session.MediaController.Callback);
     method public void registerCallback(android.media.session.MediaController.Callback, android.os.Handler);
+    method public void removeQueueItem(android.media.MediaDescription);
+    method public void removeQueueItemAt(int);
     method public void sendCommand(java.lang.String, android.os.Bundle, android.os.ResultReceiver);
     method public void setVolumeTo(int, int);
     method public void unregisterCallback(android.media.session.MediaController.Callback);
@@ -23678,11 +23805,14 @@
     method public void setSessionActivity(android.app.PendingIntent);
     method public void setShuffleModeEnabled(boolean);
     field public static final int FLAG_HANDLES_MEDIA_BUTTONS = 1; // 0x1
+    field public static final int FLAG_HANDLES_QUEUE_COMMANDS = 4; // 0x4
     field public static final int FLAG_HANDLES_TRANSPORT_CONTROLS = 2; // 0x2
   }
 
   public static abstract class MediaSession.Callback {
     ctor public MediaSession.Callback();
+    method public void onAddQueueItem(android.media.MediaDescription);
+    method public void onAddQueueItem(android.media.MediaDescription, int);
     method public void onCommand(java.lang.String, android.os.Bundle, android.os.ResultReceiver);
     method public void onCustomAction(java.lang.String, android.os.Bundle);
     method public void onFastForward();
@@ -23696,6 +23826,8 @@
     method public void onPrepareFromMediaId(java.lang.String, android.os.Bundle);
     method public void onPrepareFromSearch(java.lang.String, android.os.Bundle);
     method public void onPrepareFromUri(android.net.Uri, android.os.Bundle);
+    method public void onRemoveQueueItem(android.media.MediaDescription);
+    method public void onRemoveQueueItemAt(int);
     method public void onRewind();
     method public void onSeekTo(long);
     method public void onSetRating(android.media.Rating);
@@ -23840,6 +23972,9 @@
     method public static final android.net.Uri buildChannelUriForPassthroughInput(java.lang.String);
     method public static final android.net.Uri buildChannelsUriForInput(java.lang.String);
     method public static final java.lang.String buildInputId(android.content.ComponentName);
+    method public static final android.net.Uri buildPreviewProgramUri(long);
+    method public static final android.net.Uri buildPreviewProgramsUriForChannel(long);
+    method public static final android.net.Uri buildPreviewProgramsUriForChannel(android.net.Uri);
     method public static final android.net.Uri buildProgramUri(long);
     method public static final android.net.Uri buildProgramsUriForChannel(long);
     method public static final android.net.Uri buildProgramsUriForChannel(android.net.Uri);
@@ -23853,6 +23988,31 @@
     field public static final java.lang.String AUTHORITY = "android.media.tv";
   }
 
+  public static abstract interface TvContract.BaseProgramColumns implements android.media.tv.TvContract.BaseTvColumns {
+    field public static final java.lang.String COLUMN_AUDIO_LANGUAGE = "audio_language";
+    field public static final java.lang.String COLUMN_CANONICAL_GENRE = "canonical_genre";
+    field public static final java.lang.String COLUMN_CHANNEL_ID = "channel_id";
+    field public static final java.lang.String COLUMN_CONTENT_RATING = "content_rating";
+    field public static final java.lang.String COLUMN_EPISODE_DISPLAY_NUMBER = "episode_display_number";
+    field public static final java.lang.String COLUMN_EPISODE_TITLE = "episode_title";
+    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_DATA = "internal_provider_data";
+    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG1 = "internal_provider_flag1";
+    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG2 = "internal_provider_flag2";
+    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG3 = "internal_provider_flag3";
+    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG4 = "internal_provider_flag4";
+    field public static final java.lang.String COLUMN_LONG_DESCRIPTION = "long_description";
+    field public static final java.lang.String COLUMN_POSTER_ART_URI = "poster_art_uri";
+    field public static final java.lang.String COLUMN_SEARCHABLE = "searchable";
+    field public static final java.lang.String COLUMN_SEASON_DISPLAY_NUMBER = "season_display_number";
+    field public static final java.lang.String COLUMN_SEASON_TITLE = "season_title";
+    field public static final java.lang.String COLUMN_SHORT_DESCRIPTION = "short_description";
+    field public static final java.lang.String COLUMN_THUMBNAIL_URI = "thumbnail_uri";
+    field public static final java.lang.String COLUMN_TITLE = "title";
+    field public static final java.lang.String COLUMN_VERSION_NUMBER = "version_number";
+    field public static final java.lang.String COLUMN_VIDEO_HEIGHT = "video_height";
+    field public static final java.lang.String COLUMN_VIDEO_WIDTH = "video_width";
+  }
+
   public static abstract interface TvContract.BaseTvColumns implements android.provider.BaseColumns {
     field public static final java.lang.String COLUMN_PACKAGE_NAME = "package_name";
   }
@@ -23868,6 +24028,7 @@
     field public static final java.lang.String COLUMN_DISPLAY_NAME = "display_name";
     field public static final java.lang.String COLUMN_DISPLAY_NUMBER = "display_number";
     field public static final java.lang.String COLUMN_INPUT_ID = "input_id";
+    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_ID = "internal_provider_id";
     field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_DATA = "internal_provider_data";
     field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG1 = "internal_provider_flag1";
     field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG2 = "internal_provider_flag2";
@@ -23935,7 +24096,7 @@
     field public static final java.lang.String CONTENT_DIRECTORY = "logo";
   }
 
-  public static final class TvContract.Programs implements android.media.tv.TvContract.BaseTvColumns {
+  public static final class TvContract.PreviewPrograms implements android.media.tv.TvContract.BaseProgramColumns {
     field public static final java.lang.String ASPECT_RATIO_16_9 = "ASPECT_RATIO_16_9";
     field public static final java.lang.String ASPECT_RATIO_1_1 = "ASPECT_RATIO_1_1";
     field public static final java.lang.String ASPECT_RATIO_2_3 = "ASPECT_RATIO_2_3";
@@ -23943,58 +24104,31 @@
     field public static final java.lang.String AVAILABILITY_AVAILABLE = "AVAILABILITY_AVAILABLE";
     field public static final java.lang.String AVAILABILITY_FREE_WITH_SUBSCRIPTION = "AVAILABILITY_FREE_WITH_SUBSCRIPTION";
     field public static final java.lang.String AVAILABILITY_PAID_CONTENT = "AVAILABILITY_PAID_CONTENT";
-    field public static final java.lang.String COLUMN_AUDIO_LANGUAGE = "audio_language";
+    field public static final java.lang.String COLUMN_APP_LINK_INTENT_URI = "app_link_intent_uri";
     field public static final java.lang.String COLUMN_AUTHOR = "author";
     field public static final java.lang.String COLUMN_AVAILABILITY = "availability";
-    field public static final java.lang.String COLUMN_BROADCAST_GENRE = "broadcast_genre";
-    field public static final java.lang.String COLUMN_CANONICAL_GENRE = "canonical_genre";
-    field public static final java.lang.String COLUMN_CHANNEL_ID = "channel_id";
-    field public static final java.lang.String COLUMN_CONTENT_RATING = "content_rating";
-    field public static final java.lang.String COLUMN_END_TIME_UTC_MILLIS = "end_time_utc_millis";
-    field public static final java.lang.String COLUMN_EPISODE_DISPLAY_NUMBER = "episode_display_number";
-    field public static final deprecated java.lang.String COLUMN_EPISODE_NUMBER = "episode_number";
-    field public static final java.lang.String COLUMN_EPISODE_TITLE = "episode_title";
+    field public static final java.lang.String COLUMN_BROWSABLE = "browsable";
+    field public static final java.lang.String COLUMN_DURATION_MILLIS = "duration_millis";
     field public static final java.lang.String COLUMN_INTERACTION_COUNT = "interaction_count";
     field public static final java.lang.String COLUMN_INTERACTION_TYPE = "interaction_type";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_DATA = "internal_provider_data";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG1 = "internal_provider_flag1";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG2 = "internal_provider_flag2";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG3 = "internal_provider_flag3";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG4 = "internal_provider_flag4";
     field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_ID = "internal_provider_id";
     field public static final java.lang.String COLUMN_ITEM_COUNT = "item_count";
+    field public static final java.lang.String COLUMN_LAST_PLAYBACK_POSITION_MILLIS = "last_playback_position_millis";
     field public static final java.lang.String COLUMN_LIVE = "live";
-    field public static final java.lang.String COLUMN_LOGO = "logo";
-    field public static final java.lang.String COLUMN_LONG_DESCRIPTION = "long_description";
+    field public static final java.lang.String COLUMN_LOGO_URI = "logo_uri";
     field public static final java.lang.String COLUMN_OFFER_PRICE = "offer_price";
     field public static final java.lang.String COLUMN_POSTER_ART_ASPECT_RATIO = "poster_art_aspect_ratio";
-    field public static final java.lang.String COLUMN_POSTER_ART_URI = "poster_art_uri";
-    field public static final java.lang.String COLUMN_PREVIEW_DURATION = "preview_duration";
-    field public static final java.lang.String COLUMN_PREVIEW_INTENT_URI = "preview_intent_uri";
-    field public static final java.lang.String COLUMN_PREVIEW_LAST_PLAYBACK_POSITION = "preview_last_playback_position";
     field public static final java.lang.String COLUMN_PREVIEW_VIDEO_URI = "preview_video_uri";
-    field public static final java.lang.String COLUMN_PREVIEW_WEIGHT = "preview_weight";
-    field public static final java.lang.String COLUMN_RECORDING_PROHIBITED = "recording_prohibited";
     field public static final java.lang.String COLUMN_RELEASE_DATE = "release_date";
     field public static final java.lang.String COLUMN_REVIEW_RATING = "review_rating";
     field public static final java.lang.String COLUMN_REVIEW_RATING_STYLE = "review_rating_style";
-    field public static final java.lang.String COLUMN_SEARCHABLE = "searchable";
-    field public static final java.lang.String COLUMN_SEASON_DISPLAY_NUMBER = "season_display_number";
-    field public static final deprecated java.lang.String COLUMN_SEASON_NUMBER = "season_number";
-    field public static final java.lang.String COLUMN_SEASON_TITLE = "season_title";
-    field public static final java.lang.String COLUMN_SHORT_DESCRIPTION = "short_description";
     field public static final java.lang.String COLUMN_STARTING_PRICE = "starting_price";
-    field public static final java.lang.String COLUMN_START_TIME_UTC_MILLIS = "start_time_utc_millis";
     field public static final java.lang.String COLUMN_THUMBNAIL_ASPECT_RATIO = "poster_thumbnail_aspect_ratio";
-    field public static final java.lang.String COLUMN_THUMBNAIL_URI = "thumbnail_uri";
-    field public static final java.lang.String COLUMN_TITLE = "title";
     field public static final java.lang.String COLUMN_TYPE = "type";
-    field public static final java.lang.String COLUMN_VERSION_NUMBER = "version_number";
-    field public static final java.lang.String COLUMN_VIDEO_HEIGHT = "video_height";
-    field public static final java.lang.String COLUMN_VIDEO_WIDTH = "video_width";
     field public static final java.lang.String COLUMN_WATCH_NEXT_TYPE = "watch_next_type";
-    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/program";
-    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/program";
+    field public static final java.lang.String COLUMN_WEIGHT = "weight";
+    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/preview_program";
+    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/preview_program";
     field public static final android.net.Uri CONTENT_URI;
     field public static final java.lang.String INTERACTION_TYPE_FANS = "INTERACTION_TYPE_FANS";
     field public static final java.lang.String INTERACTION_TYPE_FOLLOWERS = "INTERACTION_TYPE_FOLLOWERS";
@@ -24023,6 +24157,18 @@
     field public static final java.lang.String WATCH_NEXT_TYPE_NEXT = "WATCH_NEXT_TYPE_NEXT";
   }
 
+  public static final class TvContract.Programs implements android.media.tv.TvContract.BaseProgramColumns {
+    field public static final java.lang.String COLUMN_BROADCAST_GENRE = "broadcast_genre";
+    field public static final java.lang.String COLUMN_END_TIME_UTC_MILLIS = "end_time_utc_millis";
+    field public static final deprecated java.lang.String COLUMN_EPISODE_NUMBER = "episode_number";
+    field public static final java.lang.String COLUMN_RECORDING_PROHIBITED = "recording_prohibited";
+    field public static final deprecated java.lang.String COLUMN_SEASON_NUMBER = "season_number";
+    field public static final java.lang.String COLUMN_START_TIME_UTC_MILLIS = "start_time_utc_millis";
+    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/program";
+    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/program";
+    field public static final android.net.Uri CONTENT_URI;
+  }
+
   public static final class TvContract.Programs.Genres {
     method public static java.lang.String[] decode(java.lang.String);
     method public static java.lang.String encode(java.lang.String...);
@@ -24046,37 +24192,15 @@
     field public static final java.lang.String TRAVEL = "TRAVEL";
   }
 
-  public static final class TvContract.RecordedPrograms implements android.media.tv.TvContract.BaseTvColumns {
-    field public static final java.lang.String COLUMN_AUDIO_LANGUAGE = "audio_language";
+  public static final class TvContract.RecordedPrograms implements android.media.tv.TvContract.BaseProgramColumns {
     field public static final java.lang.String COLUMN_BROADCAST_GENRE = "broadcast_genre";
-    field public static final java.lang.String COLUMN_CANONICAL_GENRE = "canonical_genre";
-    field public static final java.lang.String COLUMN_CHANNEL_ID = "channel_id";
-    field public static final java.lang.String COLUMN_CONTENT_RATING = "content_rating";
     field public static final java.lang.String COLUMN_END_TIME_UTC_MILLIS = "end_time_utc_millis";
-    field public static final java.lang.String COLUMN_EPISODE_DISPLAY_NUMBER = "episode_display_number";
-    field public static final java.lang.String COLUMN_EPISODE_TITLE = "episode_title";
     field public static final java.lang.String COLUMN_INPUT_ID = "input_id";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_DATA = "internal_provider_data";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG1 = "internal_provider_flag1";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG2 = "internal_provider_flag2";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG3 = "internal_provider_flag3";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG4 = "internal_provider_flag4";
-    field public static final java.lang.String COLUMN_LONG_DESCRIPTION = "long_description";
-    field public static final java.lang.String COLUMN_POSTER_ART_URI = "poster_art_uri";
     field public static final java.lang.String COLUMN_RECORDING_DATA_BYTES = "recording_data_bytes";
     field public static final java.lang.String COLUMN_RECORDING_DATA_URI = "recording_data_uri";
     field public static final java.lang.String COLUMN_RECORDING_DURATION_MILLIS = "recording_duration_millis";
     field public static final java.lang.String COLUMN_RECORDING_EXPIRE_TIME_UTC_MILLIS = "recording_expire_time_utc_millis";
-    field public static final java.lang.String COLUMN_SEARCHABLE = "searchable";
-    field public static final java.lang.String COLUMN_SEASON_DISPLAY_NUMBER = "season_display_number";
-    field public static final java.lang.String COLUMN_SEASON_TITLE = "season_title";
-    field public static final java.lang.String COLUMN_SHORT_DESCRIPTION = "short_description";
     field public static final java.lang.String COLUMN_START_TIME_UTC_MILLIS = "start_time_utc_millis";
-    field public static final java.lang.String COLUMN_THUMBNAIL_URI = "thumbnail_uri";
-    field public static final java.lang.String COLUMN_TITLE = "title";
-    field public static final java.lang.String COLUMN_VERSION_NUMBER = "version_number";
-    field public static final java.lang.String COLUMN_VIDEO_HEIGHT = "video_height";
-    field public static final java.lang.String COLUMN_VIDEO_WIDTH = "video_width";
     field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/recorded_program";
     field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/recorded_program";
     field public static final android.net.Uri CONTENT_URI;
@@ -24133,11 +24257,13 @@
     field public static final java.lang.String ACTION_BLOCKED_RATINGS_CHANGED = "android.media.tv.action.BLOCKED_RATINGS_CHANGED";
     field public static final java.lang.String ACTION_MAKE_CHANNEL_BROWSABLE = "android.media.tv.action.MAKE_CHANNEL_BROWSABLE";
     field public static final java.lang.String ACTION_PARENTAL_CONTROLS_ENABLED_CHANGED = "android.media.tv.action.PARENTAL_CONTROLS_ENABLED_CHANGED";
+    field public static final java.lang.String ACTION_PROGRAM_BROWSABLE_DISABLED = "android.media.tv.action.PROGRAM_BROWSABLE_DISABLED";
     field public static final java.lang.String ACTION_QUERY_CONTENT_RATING_SYSTEMS = "android.media.tv.action.QUERY_CONTENT_RATING_SYSTEMS";
     field public static final java.lang.String ACTION_SETUP_INPUTS = "android.media.tv.action.SETUP_INPUTS";
     field public static final java.lang.String ACTION_VIEW_RECORDING_SCHEDULES = "android.media.tv.action.VIEW_RECORDING_SCHEDULES";
     field public static final java.lang.String EXTRA_CHANNEL_ID = "android.media.tv.extra.CHANNEL_ID";
     field public static final java.lang.String EXTRA_PACKAGE_NAME = "android.media.tv.extra.PACKAGE_NAME";
+    field public static final java.lang.String EXTRA_PROGRAM_ID = "android.media.tv.extra.PROGRAM_ID";
     field public static final int INPUT_STATE_CONNECTED = 0; // 0x0
     field public static final int INPUT_STATE_CONNECTED_STANDBY = 1; // 0x1
     field public static final int INPUT_STATE_DISCONNECTED = 2; // 0x2
@@ -25606,7 +25732,7 @@
     field public boolean isHomeProviderNetwork;
     field public int networkId;
     field public java.lang.String preSharedKey;
-    field public int priority;
+    field public deprecated int priority;
     field public java.lang.String providerFriendlyName;
     field public long[] roamingConsortiumIds;
     field public int status;
@@ -25711,11 +25837,14 @@
   }
 
   public static final class WifiEnterpriseConfig.Phase2 {
+    field public static final int AKA = 6; // 0x6
+    field public static final int AKA_PRIME = 7; // 0x7
     field public static final int GTC = 4; // 0x4
     field public static final int MSCHAP = 2; // 0x2
     field public static final int MSCHAPV2 = 3; // 0x3
     field public static final int NONE = 0; // 0x0
     field public static final int PAP = 1; // 0x1
+    field public static final int SIM = 5; // 0x5
   }
 
   public class WifiInfo implements android.os.Parcelable {
@@ -25738,6 +25867,7 @@
 
   public class WifiManager {
     method public int addNetwork(android.net.wifi.WifiConfiguration);
+    method public boolean addOrUpdatePasspointConfiguration(android.net.wifi.hotspot2.PasspointConfiguration);
     method public static int calculateSignalLevel(int, int);
     method public void cancelWps(android.net.wifi.WifiManager.WpsCallback);
     method public static int compareSignalLevel(int, int);
@@ -25750,6 +25880,7 @@
     method public java.util.List<android.net.wifi.WifiConfiguration> getConfiguredNetworks();
     method public android.net.wifi.WifiInfo getConnectionInfo();
     method public android.net.DhcpInfo getDhcpInfo();
+    method public java.util.List<android.net.wifi.hotspot2.PasspointConfiguration> getPasspointConfigurations();
     method public java.util.List<android.net.wifi.ScanResult> getScanResults();
     method public int getWifiState();
     method public boolean is5GHzBandSupported();
@@ -25760,12 +25891,13 @@
     method public boolean isScanAlwaysAvailable();
     method public boolean isTdlsSupported();
     method public boolean isWifiEnabled();
-    method public boolean pingSupplicant();
+    method public deprecated boolean pingSupplicant();
     method public void queryPasspointIcon(long, java.lang.String);
     method public boolean reassociate();
     method public boolean reconnect();
     method public boolean removeNetwork(int);
-    method public boolean saveConfiguration();
+    method public boolean removePasspointConfiguration(java.lang.String);
+    method public deprecated boolean saveConfiguration();
     method public void setTdlsEnabled(java.net.InetAddress, boolean);
     method public void setTdlsEnabledWithMacAddress(java.lang.String, boolean);
     method public boolean setWifiEnabled(boolean);
@@ -25979,6 +26111,241 @@
 
 }
 
+package android.net.wifi.hotspot2 {
+
+  public final class ConfigParser {
+    method public static android.net.wifi.hotspot2.PasspointConfiguration parsePasspointConfig(java.lang.String, byte[]);
+  }
+
+  public final class PasspointConfiguration implements android.os.Parcelable {
+    ctor public PasspointConfiguration();
+    ctor public PasspointConfiguration(android.net.wifi.hotspot2.PasspointConfiguration);
+    method public int describeContents();
+    method public android.net.wifi.hotspot2.pps.Credential getCredential();
+    method public int getCredentialPriority();
+    method public android.net.wifi.hotspot2.pps.HomeSp getHomeSp();
+    method public android.net.wifi.hotspot2.pps.Policy getPolicy();
+    method public long getSubscriptionCreationTimeInMs();
+    method public long getSubscriptionExpirationTimeInMs();
+    method public java.lang.String getSubscriptionType();
+    method public android.net.wifi.hotspot2.pps.UpdateParameter getSubscriptionUpdate();
+    method public java.util.Map<java.lang.String, byte[]> getTrustRootCertList();
+    method public int getUpdateIdentifier();
+    method public long getUsageLimitDataLimit();
+    method public long getUsageLimitStartTimeInMs();
+    method public long getUsageLimitTimeLimitInMinutes();
+    method public long getUsageLimitUsageTimePeriodInMinutes();
+    method public void setCredential(android.net.wifi.hotspot2.pps.Credential);
+    method public void setCredentialPriority(int);
+    method public void setHomeSp(android.net.wifi.hotspot2.pps.HomeSp);
+    method public void setPolicy(android.net.wifi.hotspot2.pps.Policy);
+    method public void setSubscriptionCreationTimeInMs(long);
+    method public void setSubscriptionExpirationTimeInMs(long);
+    method public void setSubscriptionType(java.lang.String);
+    method public void setSubscriptionUpdate(android.net.wifi.hotspot2.pps.UpdateParameter);
+    method public void setTrustRootCertList(java.util.Map<java.lang.String, byte[]>);
+    method public void setUpdateIdentifier(int);
+    method public void setUsageLimitDataLimit(long);
+    method public void setUsageLimitStartTimeInMs(long);
+    method public void setUsageLimitTimeLimitInMinutes(long);
+    method public void setUsageLimitUsageTimePeriodInMinutes(long);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.PasspointConfiguration> CREATOR;
+  }
+
+}
+
+package android.net.wifi.hotspot2.omadm {
+
+  public final class PpsMoParser {
+    method public static android.net.wifi.hotspot2.PasspointConfiguration parseMoText(java.lang.String);
+  }
+
+}
+
+package android.net.wifi.hotspot2.pps {
+
+  public final class Credential implements android.os.Parcelable {
+    ctor public Credential();
+    ctor public Credential(android.net.wifi.hotspot2.pps.Credential);
+    method public int describeContents();
+    method public java.security.cert.X509Certificate getCaCertificate();
+    method public android.net.wifi.hotspot2.pps.Credential.CertificateCredential getCertCredential();
+    method public boolean getCheckAaaServerCertStatus();
+    method public java.security.cert.X509Certificate[] getClientCertificateChain();
+    method public java.security.PrivateKey getClientPrivateKey();
+    method public long getCreationTimeInMs();
+    method public long getExpirationTimeInMs();
+    method public java.lang.String getRealm();
+    method public android.net.wifi.hotspot2.pps.Credential.SimCredential getSimCredential();
+    method public android.net.wifi.hotspot2.pps.Credential.UserCredential getUserCredential();
+    method public void setCaCertificate(java.security.cert.X509Certificate);
+    method public void setCertCredential(android.net.wifi.hotspot2.pps.Credential.CertificateCredential);
+    method public void setCheckAaaServerCertStatus(boolean);
+    method public void setClientCertificateChain(java.security.cert.X509Certificate[]);
+    method public void setClientPrivateKey(java.security.PrivateKey);
+    method public void setCreationTimeInMs(long);
+    method public void setExpirationTimeInMs(long);
+    method public void setRealm(java.lang.String);
+    method public void setSimCredential(android.net.wifi.hotspot2.pps.Credential.SimCredential);
+    method public void setUserCredential(android.net.wifi.hotspot2.pps.Credential.UserCredential);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.Credential> CREATOR;
+  }
+
+  public static final class Credential.CertificateCredential implements android.os.Parcelable {
+    ctor public Credential.CertificateCredential();
+    ctor public Credential.CertificateCredential(android.net.wifi.hotspot2.pps.Credential.CertificateCredential);
+    method public int describeContents();
+    method public byte[] getCertSha256Fingerprint();
+    method public java.lang.String getCertType();
+    method public void setCertSha256Fingerprint(byte[]);
+    method public void setCertType(java.lang.String);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.Credential.CertificateCredential> CREATOR;
+  }
+
+  public static final class Credential.SimCredential implements android.os.Parcelable {
+    ctor public Credential.SimCredential();
+    ctor public Credential.SimCredential(android.net.wifi.hotspot2.pps.Credential.SimCredential);
+    method public int describeContents();
+    method public int getEapType();
+    method public java.lang.String getImsi();
+    method public void setEapType(int);
+    method public void setImsi(java.lang.String);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.Credential.SimCredential> CREATOR;
+  }
+
+  public static final class Credential.UserCredential implements android.os.Parcelable {
+    ctor public Credential.UserCredential();
+    ctor public Credential.UserCredential(android.net.wifi.hotspot2.pps.Credential.UserCredential);
+    method public int describeContents();
+    method public boolean getAbleToShare();
+    method public int getEapType();
+    method public boolean getMachineManaged();
+    method public java.lang.String getNonEapInnerMethod();
+    method public java.lang.String getPassword();
+    method public java.lang.String getSoftTokenApp();
+    method public java.lang.String getUsername();
+    method public void setAbleToShare(boolean);
+    method public void setEapType(int);
+    method public void setMachineManaged(boolean);
+    method public void setNonEapInnerMethod(java.lang.String);
+    method public void setPassword(java.lang.String);
+    method public void setSoftTokenApp(java.lang.String);
+    method public void setUsername(java.lang.String);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.Credential.UserCredential> CREATOR;
+  }
+
+  public final class HomeSp implements android.os.Parcelable {
+    ctor public HomeSp();
+    ctor public HomeSp(android.net.wifi.hotspot2.pps.HomeSp);
+    method public int describeContents();
+    method public java.lang.String getFqdn();
+    method public java.lang.String getFriendlyName();
+    method public java.util.Map<java.lang.String, java.lang.Long> getHomeNetworkIds();
+    method public java.lang.String getIconUrl();
+    method public long[] getMatchAllOis();
+    method public long[] getMatchAnyOis();
+    method public java.lang.String[] getOtherHomePartners();
+    method public long[] getRoamingConsortiumOis();
+    method public void setFqdn(java.lang.String);
+    method public void setFriendlyName(java.lang.String);
+    method public void setHomeNetworkIds(java.util.Map<java.lang.String, java.lang.Long>);
+    method public void setIconUrl(java.lang.String);
+    method public void setMatchAllOis(long[]);
+    method public void setMatchAnyOis(long[]);
+    method public void setOtherHomePartners(java.lang.String[]);
+    method public void setRoamingConsortiumOis(long[]);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.HomeSp> CREATOR;
+  }
+
+  public final class Policy implements android.os.Parcelable {
+    ctor public Policy();
+    ctor public Policy(android.net.wifi.hotspot2.pps.Policy);
+    method public int describeContents();
+    method public java.lang.String[] getExcludedSsidList();
+    method public int getMaximumBssLoadValue();
+    method public long getMinHomeDownlinkBandwidth();
+    method public long getMinHomeUplinkBandwidth();
+    method public long getMinRoamingDownlinkBandwidth();
+    method public long getMinRoamingUplinkBandwidth();
+    method public android.net.wifi.hotspot2.pps.UpdateParameter getPolicyUpdate();
+    method public java.util.List<android.net.wifi.hotspot2.pps.Policy.RoamingPartner> getPreferredRoamingPartnerList();
+    method public java.util.Map<java.lang.Integer, java.lang.String> getRequiredProtoPortMap();
+    method public void setExcludedSsidList(java.lang.String[]);
+    method public void setMaximumBssLoadValue(int);
+    method public void setMinHomeDownlinkBandwidth(long);
+    method public void setMinHomeUplinkBandwidth(long);
+    method public void setMinRoamingDownlinkBandwidth(long);
+    method public void setMinRoamingUplinkBandwidth(long);
+    method public void setPolicyUpdate(android.net.wifi.hotspot2.pps.UpdateParameter);
+    method public void setPreferredRoamingPartnerList(java.util.List<android.net.wifi.hotspot2.pps.Policy.RoamingPartner>);
+    method public void setRequiredProtoPortMap(java.util.Map<java.lang.Integer, java.lang.String>);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.Policy> CREATOR;
+  }
+
+  public static final class Policy.RoamingPartner implements android.os.Parcelable {
+    ctor public Policy.RoamingPartner();
+    ctor public Policy.RoamingPartner(android.net.wifi.hotspot2.pps.Policy.RoamingPartner);
+    method public int describeContents();
+    method public java.lang.String getCountries();
+    method public java.lang.String getFqdn();
+    method public boolean getFqdnExactMatch();
+    method public int getPriority();
+    method public void setCountries(java.lang.String);
+    method public void setFqdn(java.lang.String);
+    method public void setFqdnExactMatch(boolean);
+    method public void setPriority(int);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.Policy.RoamingPartner> CREATOR;
+  }
+
+  public final class UpdateParameter implements android.os.Parcelable {
+    ctor public UpdateParameter();
+    ctor public UpdateParameter(android.net.wifi.hotspot2.pps.UpdateParameter);
+    method public int describeContents();
+    method public java.lang.String getBase64EncodedPassword();
+    method public java.lang.String getRestriction();
+    method public java.lang.String getServerUri();
+    method public byte[] getTrustRootCertSha256Fingerprint();
+    method public java.lang.String getTrustRootCertUrl();
+    method public long getUpdateIntervalInMinutes();
+    method public java.lang.String getUpdateMethod();
+    method public java.lang.String getUsername();
+    method public void setBase64EncodedPassword(java.lang.String);
+    method public void setRestriction(java.lang.String);
+    method public void setServerUri(java.lang.String);
+    method public void setTrustRootCertSha256Fingerprint(byte[]);
+    method public void setTrustRootCertUrl(java.lang.String);
+    method public void setUpdateIntervalInMinutes(long);
+    method public void setUpdateMethod(java.lang.String);
+    method public void setUsername(java.lang.String);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.UpdateParameter> CREATOR;
+    field public static final long UPDATE_CHECK_INTERVAL_NEVER = 4294967295L; // 0xffffffffL
+    field public static final java.lang.String UPDATE_METHOD_OMADM = "OMA-DM-ClientInitiated";
+    field public static final java.lang.String UPDATE_METHOD_SSP = "SSP-ClientInitiated";
+    field public static final java.lang.String UPDATE_RESTRICTION_HOMESP = "HomeSP";
+    field public static final java.lang.String UPDATE_RESTRICTION_ROAMING_PARTNER = "RoamingPartner";
+    field public static final java.lang.String UPDATE_RESTRICTION_UNRESTRICTED = "Unrestricted";
+  }
+
+}
+
 package android.net.wifi.p2p {
 
   public class WifiP2pConfig implements android.os.Parcelable {
@@ -29520,6 +29887,7 @@
     field public static final int BATTERY_PLUGGED_AC = 1; // 0x1
     field public static final int BATTERY_PLUGGED_USB = 2; // 0x2
     field public static final int BATTERY_PLUGGED_WIRELESS = 4; // 0x4
+    field public static final int BATTERY_PROPERTY_BATTERY_STATUS = 6; // 0x6
     field public static final int BATTERY_PROPERTY_CAPACITY = 4; // 0x4
     field public static final int BATTERY_PROPERTY_CHARGE_COUNTER = 1; // 0x1
     field public static final int BATTERY_PROPERTY_CURRENT_AVERAGE = 3; // 0x3
@@ -30880,6 +31248,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();
@@ -30898,6 +31269,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 {
@@ -33735,6 +34107,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";
@@ -35855,26 +36228,44 @@
     ctor public AutoFillService();
     method public final android.os.IBinder onBind(android.content.Intent);
     method public void onConnected();
-    method public void onDatasetAuthenticationRequest(android.os.Bundle, int);
     method public void onDisconnected();
     method public abstract void onFillRequest(android.app.assist.AssistStructure, android.os.Bundle, android.os.CancellationSignal, android.service.autofill.FillCallback);
-    method public void onFillResponseAuthenticationRequest(android.os.Bundle, int);
     method public abstract void onSaveRequest(android.app.assist.AssistStructure, android.os.Bundle, android.service.autofill.SaveCallback);
-    field public static final java.lang.String EXTRA_DATASET_EXTRAS = "android.service.autofill.extra.DATASET_EXTRAS";
-    field public static final java.lang.String EXTRA_RESPONSE_EXTRAS = "android.service.autofill.extra.RESPONSE_EXTRAS";
-    field public static final int FLAG_AUTHENTICATION_ERROR = 4; // 0x4
-    field public static final int FLAG_AUTHENTICATION_REQUESTED = 1; // 0x1
-    field public static final int FLAG_AUTHENTICATION_SUCCESS = 2; // 0x2
-    field public static final int FLAG_FINGERPRINT_AUTHENTICATION_NOT_AVAILABLE = 8; // 0x8
     field public static final java.lang.String SERVICE_INTERFACE = "android.service.autofill.AutoFillService";
     field public static final java.lang.String SERVICE_META_DATA = "android.autofill";
   }
 
+  public final class Dataset implements android.os.Parcelable {
+    method public int describeContents();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.service.autofill.Dataset> CREATOR;
+  }
+
+  public static final class Dataset.Builder {
+    ctor public Dataset.Builder(java.lang.CharSequence);
+    method public android.service.autofill.Dataset build();
+    method public android.service.autofill.Dataset.Builder setAuthentication(android.content.IntentSender);
+    method public android.service.autofill.Dataset.Builder setValue(android.view.autofill.AutoFillId, android.view.autofill.AutoFillValue);
+  }
+
   public final class FillCallback {
-    method public void onDatasetAuthentication(android.view.autofill.Dataset, int);
     method public void onFailure(java.lang.CharSequence);
-    method public void onFillResponseAuthentication(int);
-    method public void onSuccess(android.view.autofill.FillResponse);
+    method public void onSuccess(android.service.autofill.FillResponse);
+  }
+
+  public final class FillResponse implements android.os.Parcelable {
+    method public int describeContents();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.service.autofill.FillResponse> CREATOR;
+  }
+
+  public static final class FillResponse.Builder {
+    ctor public FillResponse.Builder();
+    method public android.service.autofill.FillResponse.Builder addDataset(android.service.autofill.Dataset);
+    method public android.service.autofill.FillResponse.Builder addSavableFields(android.view.autofill.AutoFillId...);
+    method public android.service.autofill.FillResponse build();
+    method public android.service.autofill.FillResponse.Builder setAuthentication(android.content.IntentSender);
+    method public android.service.autofill.FillResponse.Builder setExtras(android.os.Bundle);
   }
 
   public final class SaveCallback {
@@ -36440,6 +36831,7 @@
     method public boolean onKeyUp(int, android.view.KeyEvent);
     method public void onLockscreenShown();
     method public void onLowMemory();
+    method public void onPrepareShow(android.os.Bundle, int);
     method public void onRequestAbortVoice(android.service.voice.VoiceInteractionSession.AbortVoiceRequest);
     method public void onRequestCommand(android.service.voice.VoiceInteractionSession.CommandRequest);
     method public void onRequestCompleteVoice(android.service.voice.VoiceInteractionSession.CompleteVoiceRequest);
@@ -36453,7 +36845,9 @@
     method public void setDisabledShowContext(int);
     method public void setKeepAwake(boolean);
     method public void setTheme(int);
+    method public void setUiEnabled(boolean);
     method public void show(android.os.Bundle, int);
+    method public void startAssistantActivity(android.content.Intent);
     method public void startVoiceActivity(android.content.Intent);
     field public static final int SHOW_SOURCE_ACTIVITY = 16; // 0x10
     field public static final int SHOW_SOURCE_APPLICATION = 8; // 0x8
@@ -38949,6 +39343,8 @@
     method public boolean setOperatorBrandOverride(java.lang.String);
     method public boolean setPreferredNetworkTypeToGlobal();
     method public boolean setVoiceMailNumber(java.lang.String, java.lang.String);
+    method public void setVoicemailRingtoneUri(android.telecom.PhoneAccountHandle, android.net.Uri);
+    method public void setVoicemailVibrationEnabled(android.telecom.PhoneAccountHandle, boolean);
     field public static final java.lang.String ACTION_CONFIGURE_VOICEMAIL = "android.telephony.action.CONFIGURE_VOICEMAIL";
     field public static final java.lang.String ACTION_PHONE_STATE_CHANGED = "android.intent.action.PHONE_STATE";
     field public static final java.lang.String ACTION_RESPOND_VIA_MESSAGE = "android.intent.action.RESPOND_VIA_MESSAGE";
@@ -39702,6 +40098,7 @@
     method public java.lang.CharSequence getApplicationLabel(android.content.pm.ApplicationInfo);
     method public android.graphics.drawable.Drawable getApplicationLogo(android.content.pm.ApplicationInfo);
     method public android.graphics.drawable.Drawable getApplicationLogo(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
+    method public android.content.pm.ChangedPackages getChangedPackages(int);
     method public int getComponentEnabledSetting(android.content.ComponentName);
     method public android.graphics.drawable.Drawable getDefaultActivityIcon();
     method public android.graphics.drawable.Drawable getDrawable(java.lang.String, int, android.content.pm.ApplicationInfo);
@@ -40684,19 +41081,23 @@
   }
 
   public class DateKeyListener extends android.text.method.NumberKeyListener {
-    ctor public DateKeyListener();
+    ctor public deprecated DateKeyListener();
+    ctor public DateKeyListener(java.util.Locale);
     method protected char[] getAcceptedChars();
     method public int getInputType();
-    method public static android.text.method.DateKeyListener getInstance();
-    field public static final char[] CHARACTERS;
+    method public static deprecated android.text.method.DateKeyListener getInstance();
+    method public static android.text.method.DateKeyListener getInstance(java.util.Locale);
+    field public static final deprecated char[] CHARACTERS;
   }
 
   public class DateTimeKeyListener extends android.text.method.NumberKeyListener {
-    ctor public DateTimeKeyListener();
+    ctor public deprecated DateTimeKeyListener();
+    ctor public DateTimeKeyListener(java.util.Locale);
     method protected char[] getAcceptedChars();
     method public int getInputType();
-    method public static android.text.method.DateTimeKeyListener getInstance();
-    field public static final char[] CHARACTERS;
+    method public static deprecated android.text.method.DateTimeKeyListener getInstance();
+    method public static android.text.method.DateTimeKeyListener getInstance(java.util.Locale);
+    field public static final deprecated char[] CHARACTERS;
   }
 
   public class DialerKeyListener extends android.text.method.NumberKeyListener {
@@ -40708,12 +41109,16 @@
   }
 
   public class DigitsKeyListener extends android.text.method.NumberKeyListener {
-    ctor public DigitsKeyListener();
-    ctor public DigitsKeyListener(boolean, boolean);
+    ctor public deprecated DigitsKeyListener();
+    ctor public deprecated DigitsKeyListener(boolean, boolean);
+    ctor public DigitsKeyListener(java.util.Locale);
+    ctor public DigitsKeyListener(java.util.Locale, boolean, boolean);
     method protected char[] getAcceptedChars();
     method public int getInputType();
-    method public static android.text.method.DigitsKeyListener getInstance();
-    method public static android.text.method.DigitsKeyListener getInstance(boolean, boolean);
+    method public static deprecated android.text.method.DigitsKeyListener getInstance();
+    method public static deprecated android.text.method.DigitsKeyListener getInstance(boolean, boolean);
+    method public static android.text.method.DigitsKeyListener getInstance(java.util.Locale);
+    method public static android.text.method.DigitsKeyListener getInstance(java.util.Locale, boolean, boolean);
     method public static android.text.method.DigitsKeyListener getInstance(java.lang.String);
   }
 
@@ -40857,11 +41262,13 @@
   }
 
   public class TimeKeyListener extends android.text.method.NumberKeyListener {
-    ctor public TimeKeyListener();
+    ctor public deprecated TimeKeyListener();
+    ctor public TimeKeyListener(java.util.Locale);
     method protected char[] getAcceptedChars();
     method public int getInputType();
-    method public static android.text.method.TimeKeyListener getInstance();
-    field public static final char[] CHARACTERS;
+    method public static deprecated android.text.method.TimeKeyListener getInstance();
+    method public static android.text.method.TimeKeyListener getInstance(java.util.Locale);
+    field public static final deprecated char[] CHARACTERS;
   }
 
   public class Touch {
@@ -41711,6 +42118,15 @@
     method public android.transition.TransitionManager inflateTransitionManager(int, android.view.ViewGroup);
   }
 
+  public abstract class TransitionListenerAdapter implements android.transition.Transition.TransitionListener {
+    ctor public TransitionListenerAdapter();
+    method public void onTransitionCancel(android.transition.Transition);
+    method public void onTransitionEnd(android.transition.Transition);
+    method public void onTransitionPause(android.transition.Transition);
+    method public void onTransitionResume(android.transition.Transition);
+    method public void onTransitionStart(android.transition.Transition);
+  }
+
   public class TransitionManager {
     ctor public TransitionManager();
     method public static void beginDelayedTransition(android.view.ViewGroup);
@@ -43492,6 +43908,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 {
@@ -43504,6 +43921,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();
@@ -43511,6 +43929,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();
@@ -43527,6 +43946,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);
@@ -43535,9 +43955,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);
@@ -43704,6 +44126,7 @@
     field public static final int AXIS_RX = 12; // 0xc
     field public static final int AXIS_RY = 13; // 0xd
     field public static final int AXIS_RZ = 14; // 0xe
+    field public static final int AXIS_SCROLL = 26; // 0x1a
     field public static final int AXIS_SIZE = 3; // 0x3
     field public static final int AXIS_THROTTLE = 19; // 0x13
     field public static final int AXIS_TILT = 25; // 0x19
@@ -44027,6 +44450,7 @@
     ctor public View(android.content.Context, android.util.AttributeSet, int);
     ctor public View(android.content.Context, android.util.AttributeSet, int, int);
     method public void addChildrenForAccessibility(java.util.ArrayList<android.view.View>);
+    method public void addExtraDataToAccessibilityNodeInfo(android.view.accessibility.AccessibilityNodeInfo, java.lang.String, android.os.Bundle);
     method public void addFocusables(java.util.ArrayList<android.view.View>, int);
     method public void addFocusables(java.util.ArrayList<android.view.View>, int, int);
     method public void addKeyboardNavigationClusters(java.util.Collection<android.view.View>, int);
@@ -44036,6 +44460,7 @@
     method public android.view.ViewPropertyAnimator animate();
     method public void announceForAccessibility(java.lang.CharSequence);
     method public void autoFill(android.view.autofill.AutoFillValue);
+    method public void autoFillVirtual(int, android.view.autofill.AutoFillValue);
     method protected boolean awakenScrollBars();
     method protected boolean awakenScrollBars(int);
     method protected boolean awakenScrollBars(int, boolean);
@@ -44109,8 +44534,8 @@
     method public void drawableHotspotChanged(float, float);
     method protected void drawableStateChanged();
     method public android.view.View findFocus();
-    method public final <T extends android.view.View> T findViewById(int);
-    method public final <T extends android.view.View> T findViewWithTag(java.lang.Object);
+    method public final android.view.View findViewById(int);
+    method public final android.view.View findViewWithTag(java.lang.Object);
     method public void findViewsWithText(java.util.ArrayList<android.view.View>, java.lang.CharSequence, int);
     method protected deprecated boolean fitSystemWindows(android.graphics.Rect);
     method public android.view.View focusSearch(int);
@@ -44126,7 +44551,7 @@
     method public android.view.animation.Animation getAnimation();
     method public android.os.IBinder getApplicationWindowToken();
     method public android.view.autofill.AutoFillType getAutoFillType();
-    method public android.view.autofill.VirtualViewDelegate getAutoFillVirtualViewDelegate(android.view.autofill.VirtualViewDelegate.Callback);
+    method public android.view.autofill.AutoFillValue getAutoFillValue();
     method public android.graphics.drawable.Drawable getBackground();
     method public android.content.res.ColorStateList getBackgroundTintList();
     method public android.graphics.PorterDuff.Mode getBackgroundTintMode();
@@ -44239,7 +44664,7 @@
     method public java.lang.Object getTag(int);
     method public int getTextAlignment();
     method public int getTextDirection();
-    method public final java.lang.CharSequence getTooltipText();
+    method public java.lang.CharSequence getTooltipText();
     method public final int getTop();
     method protected float getTopFadingEdgeStrength();
     method protected int getTopPaddingOffset();
@@ -44264,6 +44689,7 @@
     method public float getX();
     method public float getY();
     method public float getZ();
+    method public boolean hasExplicitFocusable();
     method public boolean hasFocus();
     method public boolean hasFocusable();
     method public boolean hasNestedScrollingParent();
@@ -44424,7 +44850,7 @@
     method public final void requestUnbufferedDispatch(android.view.MotionEvent);
     method public static int resolveSize(int, int);
     method public static int resolveSizeAndState(int, int, int);
-    method public boolean restoreDefaultFocus(int);
+    method public boolean restoreDefaultFocus();
     method public void restoreHierarchyState(android.util.SparseArray<android.os.Parcelable>);
     method public void saveHierarchyState(android.util.SparseArray<android.os.Parcelable>);
     method public void scheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable, long);
@@ -44544,7 +44970,7 @@
     method public void setTag(int, java.lang.Object);
     method public void setTextAlignment(int);
     method public void setTextDirection(int);
-    method public final void setTooltipText(java.lang.CharSequence);
+    method public void setTooltipText(java.lang.CharSequence);
     method public final void setTop(int);
     method public void setTouchDelegate(android.view.TouchDelegate);
     method public final void setTransitionName(java.lang.String);
@@ -44721,6 +45147,7 @@
 
   public static class View.AccessibilityDelegate {
     ctor public View.AccessibilityDelegate();
+    method public void addExtraDataToAccessibilityNodeInfo(android.view.View, android.view.accessibility.AccessibilityNodeInfo, java.lang.String, android.os.Bundle);
     method public boolean dispatchPopulateAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent);
     method public android.view.accessibility.AccessibilityNodeProvider getAccessibilityNodeProvider(android.view.View);
     method public void onInitializeAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent);
@@ -45250,6 +45677,7 @@
     method public abstract void setTextLines(int[], int[]);
     method public abstract void setTextStyle(float, int, int, int);
     method public abstract void setTransformation(android.graphics.Matrix);
+    method public abstract void setUrl(java.lang.String);
     method public abstract void setVisibility(int);
     field public static final int AUTO_FILL_FLAG_SANITIZED = 1; // 0x1
   }
@@ -45685,6 +46113,7 @@
     field public static final int TYPE_APPLICATION = 2; // 0x2
     field public static final int TYPE_APPLICATION_ATTACHED_DIALOG = 1003; // 0x3eb
     field public static final int TYPE_APPLICATION_MEDIA = 1001; // 0x3e9
+    field public static final int TYPE_APPLICATION_OVERLAY = 2038; // 0x7f6
     field public static final int TYPE_APPLICATION_PANEL = 1000; // 0x3e8
     field public static final int TYPE_APPLICATION_STARTING = 3; // 0x3
     field public static final int TYPE_APPLICATION_SUB_PANEL = 1002; // 0x3ea
@@ -45694,17 +46123,17 @@
     field public static final int TYPE_INPUT_METHOD = 2011; // 0x7db
     field public static final int TYPE_INPUT_METHOD_DIALOG = 2012; // 0x7dc
     field public static final int TYPE_KEYGUARD_DIALOG = 2009; // 0x7d9
-    field public static final int TYPE_PHONE = 2002; // 0x7d2
-    field public static final int TYPE_PRIORITY_PHONE = 2007; // 0x7d7
+    field public static final deprecated int TYPE_PHONE = 2002; // 0x7d2
+    field public static final deprecated int TYPE_PRIORITY_PHONE = 2007; // 0x7d7
     field public static final int TYPE_PRIVATE_PRESENTATION = 2030; // 0x7ee
     field public static final int TYPE_SEARCH_BAR = 2001; // 0x7d1
     field public static final int TYPE_STATUS_BAR = 2000; // 0x7d0
     field public static final int TYPE_STATUS_BAR_PANEL = 2014; // 0x7de
-    field public static final int TYPE_SYSTEM_ALERT = 2003; // 0x7d3
+    field public static final deprecated int TYPE_SYSTEM_ALERT = 2003; // 0x7d3
     field public static final int TYPE_SYSTEM_DIALOG = 2008; // 0x7d8
-    field public static final int TYPE_SYSTEM_ERROR = 2010; // 0x7da
-    field public static final int TYPE_SYSTEM_OVERLAY = 2006; // 0x7d6
-    field public static final int TYPE_TOAST = 2005; // 0x7d5
+    field public static final deprecated int TYPE_SYSTEM_ERROR = 2010; // 0x7da
+    field public static final deprecated int TYPE_SYSTEM_OVERLAY = 2006; // 0x7d6
+    field public static final deprecated int TYPE_TOAST = 2005; // 0x7d5
     field public static final int TYPE_WALLPAPER = 2013; // 0x7dd
     field public float alpha;
     field public float buttonBrightness;
@@ -45840,6 +46269,7 @@
     method public android.view.accessibility.AccessibilityNodeInfo focusSearch(int);
     method public java.util.List<android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction> getActionList();
     method public deprecated int getActions();
+    method public java.util.List<java.lang.String> getAvailableExtraData();
     method public void getBoundsInParent(android.graphics.Rect);
     method public void getBoundsInScreen(android.graphics.Rect);
     method public android.view.accessibility.AccessibilityNodeInfo getChild(int);
@@ -45896,11 +46326,13 @@
     method public boolean performAction(int, android.os.Bundle);
     method public void recycle();
     method public boolean refresh();
+    method public boolean refreshWithExtraData(java.lang.String, android.os.Bundle);
     method public deprecated void removeAction(int);
     method public boolean removeAction(android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction);
     method public boolean removeChild(android.view.View);
     method public boolean removeChild(android.view.View, int);
     method public void setAccessibilityFocused(boolean);
+    method public void setAvailableExtraData(java.util.List<java.lang.String>);
     method public void setBoundsInParent(android.graphics.Rect);
     method public void setBoundsInScreen(android.graphics.Rect);
     method public void setCanOpenPopup(boolean);
@@ -45983,6 +46415,9 @@
     field public static final int ACTION_SET_SELECTION = 131072; // 0x20000
     field public static final int ACTION_SET_TEXT = 2097152; // 0x200000
     field public static final android.os.Parcelable.Creator<android.view.accessibility.AccessibilityNodeInfo> CREATOR;
+    field public static final java.lang.String EXTRA_DATA_TEXT_CHARACTER_LOCATION_ARG_LENGTH = "android.view.accessibility.extra.DATA_TEXT_CHARACTER_LOCATION_ARG_LENGTH";
+    field public static final java.lang.String EXTRA_DATA_TEXT_CHARACTER_LOCATION_ARG_START_INDEX = "android.view.accessibility.extra.DATA_TEXT_CHARACTER_LOCATION_ARG_START_INDEX";
+    field public static final java.lang.String EXTRA_DATA_TEXT_CHARACTER_LOCATION_KEY = "android.view.accessibility.extra.DATA_TEXT_CHARACTER_LOCATION_KEY";
     field public static final int FOCUS_ACCESSIBILITY = 2; // 0x2
     field public static final int FOCUS_INPUT = 1; // 0x1
     field public static final int MOVEMENT_GRANULARITY_CHARACTER = 1; // 0x1
@@ -46064,6 +46499,7 @@
 
   public abstract class AccessibilityNodeProvider {
     ctor public AccessibilityNodeProvider();
+    method public void addExtraDataToAccessibilityNodeInfo(int, android.view.accessibility.AccessibilityNodeInfo, java.lang.String, android.os.Bundle);
     method public android.view.accessibility.AccessibilityNodeInfo createAccessibilityNodeInfo(int);
     method public java.util.List<android.view.accessibility.AccessibilityNodeInfo> findAccessibilityNodeInfosByText(java.lang.String, int);
     method public android.view.accessibility.AccessibilityNodeInfo findFocus(int);
@@ -46474,11 +46910,13 @@
   }
 
   public final class AutoFillManager {
-    method public void onValueChanged(android.view.View, android.view.autofill.AutoFillValue);
-    method public void updateAutoFillInput(android.view.View, int);
-    method public void updateAutoFillInput(android.view.View, int, android.graphics.Rect, int);
-    field public static final int FLAG_UPDATE_UI_HIDE = 2; // 0x2
-    field public static final int FLAG_UPDATE_UI_SHOW = 1; // 0x1
+    method public void focusChanged(android.view.View, boolean);
+    method public void reset();
+    method public void valueChanged(android.view.View);
+    method public void virtualFocusChanged(android.view.View, int, android.graphics.Rect, boolean);
+    method public void virtualValueChanged(android.view.View, int, android.view.autofill.AutoFillValue);
+    field public static final java.lang.String EXTRA_ASSIST_STRUCTURE = "android.view.autofill.extra.ASSIST_STRUCTURE";
+    field public static final java.lang.String EXTRA_AUTHENTICATION_RESULT = "android.view.autofill.extra.AUTHENTICATION_RESULT";
   }
 
   public final class AutoFillType implements android.os.Parcelable {
@@ -46506,49 +46944,6 @@
     field public static final android.os.Parcelable.Creator<android.view.autofill.AutoFillValue> CREATOR;
   }
 
-  public final class Dataset implements android.os.Parcelable {
-    method public int describeContents();
-    method public void writeToParcel(android.os.Parcel, int);
-    field public static final android.os.Parcelable.Creator<android.view.autofill.Dataset> CREATOR;
-  }
-
-  public static final class Dataset.Builder {
-    ctor public Dataset.Builder(java.lang.CharSequence);
-    method public android.view.autofill.Dataset build();
-    method public android.view.autofill.Dataset.Builder requiresCustomAuthentication(android.os.Bundle, int);
-    method public android.view.autofill.Dataset.Builder requiresFingerprintAuthentication(android.hardware.fingerprint.FingerprintManager.CryptoObject, android.os.Bundle, int);
-    method public android.view.autofill.Dataset.Builder setExtras(android.os.Bundle);
-    method public android.view.autofill.Dataset.Builder setValue(android.view.autofill.AutoFillId, android.view.autofill.AutoFillValue);
-  }
-
-  public final class FillResponse implements android.os.Parcelable {
-    method public int describeContents();
-    method public void writeToParcel(android.os.Parcel, int);
-    field public static final android.os.Parcelable.Creator<android.view.autofill.FillResponse> CREATOR;
-  }
-
-  public static final class FillResponse.Builder {
-    ctor public FillResponse.Builder();
-    method public android.view.autofill.FillResponse.Builder addDataset(android.view.autofill.Dataset);
-    method public android.view.autofill.FillResponse.Builder addSavableFields(android.view.autofill.AutoFillId...);
-    method public android.view.autofill.FillResponse build();
-    method public android.view.autofill.FillResponse.Builder requiresCustomAuthentication(android.os.Bundle, int);
-    method public android.view.autofill.FillResponse.Builder requiresFingerprintAuthentication(android.hardware.fingerprint.FingerprintManager.CryptoObject, android.os.Bundle, int);
-    method public android.view.autofill.FillResponse.Builder setExtras(android.os.Bundle);
-  }
-
-  public abstract class VirtualViewDelegate {
-    ctor public VirtualViewDelegate();
-    method public abstract void autoFill(int, android.view.autofill.AutoFillValue);
-  }
-
-  public static abstract class VirtualViewDelegate.Callback {
-    ctor public VirtualViewDelegate.Callback();
-    method public void onAutoFillInputUpdated(int, android.graphics.Rect, int);
-    method public void onNodeRemoved(int...);
-    method public void onValueChanged(int);
-  }
-
 }
 
 package android.view.inputmethod {
@@ -46993,6 +47388,7 @@
     field public static final java.lang.String TYPE_EMAIL = "email";
     field public static final java.lang.String TYPE_OTHER = "other";
     field public static final java.lang.String TYPE_PHONE = "phone";
+    field public static final java.lang.String TYPE_URL = "url";
   }
 
   public static abstract class TextClassifier.EntityType implements java.lang.annotation.Annotation {
@@ -50044,6 +50440,7 @@
     method public int getAutoSizeMaxTextSize();
     method public int getAutoSizeMinTextSize();
     method public int getAutoSizeStepGranularity();
+    method public int[] getAutoSizeTextAvailableSizes();
     method public int getAutoSizeTextType();
     method public int getBreakStrategy();
     method public int getCompoundDrawablePadding();
@@ -50157,6 +50554,7 @@
     method public void setAutoSizeMaxTextSize(int, float);
     method public void setAutoSizeMinTextSize(int, float);
     method public void setAutoSizeStepGranularity(int, float);
+    method public void setAutoSizeTextPresetSizes(int[]);
     method public void setAutoSizeTextType(int);
     method public void setBreakStrategy(int);
     method public void setCompoundDrawablePadding(int);
@@ -50250,7 +50648,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 {
@@ -50290,6 +50688,7 @@
     method public void setIs24HourView(java.lang.Boolean);
     method public void setMinute(int);
     method public void setOnTimeChangedListener(android.widget.TimePicker.OnTimeChangedListener);
+    method public boolean validateInput();
   }
 
   public static abstract interface TimePicker.OnTimeChangedListener {
@@ -50688,6 +51087,8 @@
     field public static final int OP_INVOKE_INTERFACE = 114; // 0x72
     field public static final int OP_INVOKE_INTERFACE_JUMBO = 9983; // 0x26ff
     field public static final int OP_INVOKE_INTERFACE_RANGE = 120; // 0x78
+    field public static final int OP_INVOKE_POLYMORPHIC = 250; // 0xfa
+    field public static final int OP_INVOKE_POLYMORPHIC_RANGE = 251; // 0xfb
     field public static final int OP_INVOKE_STATIC = 113; // 0x71
     field public static final int OP_INVOKE_STATIC_JUMBO = 9727; // 0x25ff
     field public static final int OP_INVOKE_STATIC_RANGE = 119; // 0x77
@@ -52087,6 +52488,13 @@
     field public static final java.lang.Class<java.lang.Boolean> TYPE;
   }
 
+  public class BootstrapMethodError extends java.lang.LinkageError {
+    ctor public BootstrapMethodError();
+    ctor public BootstrapMethodError(java.lang.String);
+    ctor public BootstrapMethodError(java.lang.String, java.lang.Throwable);
+    ctor public BootstrapMethodError(java.lang.Throwable);
+  }
+
   public final class Byte extends java.lang.Number implements java.lang.Comparable {
     ctor public Byte(byte);
     ctor public Byte(java.lang.String) throws java.lang.NumberFormatException;
@@ -53973,6 +54381,21 @@
 
 package java.lang.invoke {
 
+  public abstract class CallSite {
+    method public abstract java.lang.invoke.MethodHandle dynamicInvoker();
+    method public abstract java.lang.invoke.MethodHandle getTarget();
+    method public abstract void setTarget(java.lang.invoke.MethodHandle);
+    method public java.lang.invoke.MethodType type();
+  }
+
+  public class ConstantCallSite extends java.lang.invoke.CallSite {
+    ctor public ConstantCallSite(java.lang.invoke.MethodHandle);
+    ctor protected ConstantCallSite(java.lang.invoke.MethodType, java.lang.invoke.MethodHandle) throws java.lang.Throwable;
+    method public final java.lang.invoke.MethodHandle dynamicInvoker();
+    method public final java.lang.invoke.MethodHandle getTarget();
+    method public final void setTarget(java.lang.invoke.MethodHandle);
+  }
+
   public class LambdaConversionException extends java.lang.Exception {
     ctor public LambdaConversionException();
     ctor public LambdaConversionException(java.lang.String);
@@ -53982,12 +54405,15 @@
   }
 
   public abstract class MethodHandle {
+    method public java.lang.invoke.MethodHandle asCollector(java.lang.Class<?>, int);
     method public java.lang.invoke.MethodHandle asFixedArity();
+    method public java.lang.invoke.MethodHandle asSpreader(java.lang.Class<?>, int);
     method public java.lang.invoke.MethodHandle asType(java.lang.invoke.MethodType);
     method public java.lang.invoke.MethodHandle asVarargsCollector(java.lang.Class<?>);
     method public java.lang.invoke.MethodHandle bindTo(java.lang.Object);
     method public final java.lang.Object invoke(java.lang.Object...) throws java.lang.Throwable;
     method public final java.lang.Object invokeExact(java.lang.Object...) throws java.lang.Throwable;
+    method public java.lang.Object invokeWithArguments(java.lang.Object...) throws java.lang.Throwable;
     method public java.lang.Object invokeWithArguments(java.util.List<?>) throws java.lang.Throwable;
     method public boolean isVarargsCollector();
     method public java.lang.invoke.MethodType type();
@@ -54021,17 +54447,23 @@
     method public static java.lang.invoke.MethodHandle arrayElementGetter(java.lang.Class<?>) throws java.lang.IllegalArgumentException;
     method public static java.lang.invoke.MethodHandle arrayElementSetter(java.lang.Class<?>) throws java.lang.IllegalArgumentException;
     method public static java.lang.invoke.MethodHandle catchException(java.lang.invoke.MethodHandle, java.lang.Class<? extends java.lang.Throwable>, java.lang.invoke.MethodHandle);
+    method public static java.lang.invoke.MethodHandle collectArguments(java.lang.invoke.MethodHandle, int, java.lang.invoke.MethodHandle);
     method public static java.lang.invoke.MethodHandle constant(java.lang.Class<?>, java.lang.Object);
     method public static java.lang.invoke.MethodHandle dropArguments(java.lang.invoke.MethodHandle, int, java.util.List<java.lang.Class<?>>);
     method public static java.lang.invoke.MethodHandle dropArguments(java.lang.invoke.MethodHandle, int, java.lang.Class<?>...);
     method public static java.lang.invoke.MethodHandle exactInvoker(java.lang.invoke.MethodType);
+    method public static java.lang.invoke.MethodHandle filterArguments(java.lang.invoke.MethodHandle, int, java.lang.invoke.MethodHandle...);
     method public static java.lang.invoke.MethodHandle filterReturnValue(java.lang.invoke.MethodHandle, java.lang.invoke.MethodHandle);
+    method public static java.lang.invoke.MethodHandle foldArguments(java.lang.invoke.MethodHandle, java.lang.invoke.MethodHandle);
     method public static java.lang.invoke.MethodHandle guardWithTest(java.lang.invoke.MethodHandle, java.lang.invoke.MethodHandle, java.lang.invoke.MethodHandle);
     method public static java.lang.invoke.MethodHandle identity(java.lang.Class<?>);
+    method public static java.lang.invoke.MethodHandle insertArguments(java.lang.invoke.MethodHandle, int, java.lang.Object...);
     method public static java.lang.invoke.MethodHandle invoker(java.lang.invoke.MethodType);
     method public static java.lang.invoke.MethodHandles.Lookup lookup();
     method public static java.lang.invoke.MethodHandle permuteArguments(java.lang.invoke.MethodHandle, java.lang.invoke.MethodType, int...);
     method public static java.lang.invoke.MethodHandles.Lookup publicLookup();
+    method public static <T extends java.lang.reflect.Member> T reflectAs(java.lang.Class<T>, java.lang.invoke.MethodHandle);
+    method public static java.lang.invoke.MethodHandle spreadInvoker(java.lang.invoke.MethodType, int);
     method public static java.lang.invoke.MethodHandle throwException(java.lang.Class<?>, java.lang.Class<? extends java.lang.Throwable>);
   }
 
@@ -54048,7 +54480,7 @@
     method public java.lang.invoke.MethodHandles.Lookup in(java.lang.Class<?>);
     method public java.lang.Class<?> lookupClass();
     method public int lookupModes();
-    method public void throwMakeAccessException(java.lang.String, java.lang.Object) throws java.lang.IllegalAccessException;
+    method public java.lang.invoke.MethodHandleInfo revealDirect(java.lang.invoke.MethodHandle);
     method public java.lang.invoke.MethodHandle unreflect(java.lang.reflect.Method) throws java.lang.IllegalAccessException;
     method public java.lang.invoke.MethodHandle unreflectConstructor(java.lang.reflect.Constructor<?>) throws java.lang.IllegalAccessException;
     method public java.lang.invoke.MethodHandle unreflectGetter(java.lang.reflect.Field) throws java.lang.IllegalAccessException;
@@ -54091,6 +54523,22 @@
     method public java.lang.invoke.MethodType wrap();
   }
 
+  public class MutableCallSite extends java.lang.invoke.CallSite {
+    ctor public MutableCallSite(java.lang.invoke.MethodType);
+    ctor public MutableCallSite(java.lang.invoke.MethodHandle);
+    method public final java.lang.invoke.MethodHandle dynamicInvoker();
+    method public final java.lang.invoke.MethodHandle getTarget();
+    method public void setTarget(java.lang.invoke.MethodHandle);
+  }
+
+  public class VolatileCallSite extends java.lang.invoke.CallSite {
+    ctor public VolatileCallSite(java.lang.invoke.MethodType);
+    ctor public VolatileCallSite(java.lang.invoke.MethodHandle);
+    method public final java.lang.invoke.MethodHandle dynamicInvoker();
+    method public final java.lang.invoke.MethodHandle getTarget();
+    method public void setTarget(java.lang.invoke.MethodHandle);
+  }
+
   public class WrongMethodTypeException extends java.lang.RuntimeException {
     ctor public WrongMethodTypeException();
     ctor public WrongMethodTypeException(java.lang.String);
diff --git a/api/system-current.txt b/api/system-current.txt
index 5ccfbce..2135d0c 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";
@@ -206,8 +208,10 @@
     field public static final java.lang.String REQUEST_INSTALL_PACKAGES = "android.permission.REQUEST_INSTALL_PACKAGES";
     field public static final java.lang.String REQUEST_NETWORK_SCORES = "android.permission.REQUEST_NETWORK_SCORES";
     field public static final deprecated java.lang.String RESTART_PACKAGES = "android.permission.RESTART_PACKAGES";
+    field public static final java.lang.String RESTRICTED_VR_ACCESS = "android.permission.RESTRICTED_VR_ACCESS";
     field public static final java.lang.String RETRIEVE_WINDOW_CONTENT = "android.permission.RETRIEVE_WINDOW_CONTENT";
     field public static final java.lang.String REVOKE_RUNTIME_PERMISSIONS = "android.permission.REVOKE_RUNTIME_PERMISSIONS";
+    field public static final java.lang.String RUN_IN_BACKGROUND = "android.permission.RUN_IN_BACKGROUND";
     field public static final java.lang.String SCORE_NETWORKS = "android.permission.SCORE_NETWORKS";
     field public static final java.lang.String SEND_RESPOND_VIA_MESSAGE = "android.permission.SEND_RESPOND_VIA_MESSAGE";
     field public static final java.lang.String SEND_SMS = "android.permission.SEND_SMS";
@@ -245,6 +249,7 @@
     field public static final java.lang.String UPDATE_DEVICE_STATS = "android.permission.UPDATE_DEVICE_STATS";
     field public static final java.lang.String UPDATE_LOCK = "android.permission.UPDATE_LOCK";
     field public static final java.lang.String USER_ACTIVITY = "android.permission.USER_ACTIVITY";
+    field public static final java.lang.String USE_DATA_IN_BACKGROUND = "android.permission.USE_DATA_IN_BACKGROUND";
     field public static final java.lang.String USE_FINGERPRINT = "android.permission.USE_FINGERPRINT";
     field public static final java.lang.String USE_SIP = "android.permission.USE_SIP";
     field public static final java.lang.String VIBRATE = "android.permission.VIBRATE";
@@ -315,7 +320,6 @@
 
   public static final class R.attr {
     ctor public R.attr();
-    field public static final int __removed0 = 16844097; // 0x1010541
     field public static final int __removed1 = 16844099; // 0x1010543
     field public static final int absListViewStyle = 16842858; // 0x101006a
     field public static final int accessibilityEventTypes = 16843648; // 0x1010380
@@ -381,6 +385,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 +415,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
@@ -710,6 +715,8 @@
     field public static final int font = 16844082; // 0x1010532
     field public static final int fontFamily = 16843692; // 0x10103ac
     field public static final int fontFeatureSettings = 16843959; // 0x10104b7
+    field public static final int fontProviderAuthority = 16844114; // 0x1010552
+    field public static final int fontProviderQuery = 16844115; // 0x1010553
     field public static final int fontStyle = 16844081; // 0x1010531
     field public static final int fontWeight = 16844083; // 0x1010533
     field public static final int footerDividersEnabled = 16843311; // 0x101022f
@@ -1035,6 +1042,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
@@ -1386,6 +1394,7 @@
     field public static final int targetId = 16843740; // 0x10103dc
     field public static final int targetName = 16843853; // 0x101044d
     field public static final int targetPackage = 16842785; // 0x1010021
+    field public static final int targetProcess = 16844097; // 0x1010541
     field public static final int targetSandboxVersion = 16844110; // 0x101054e
     field public static final int targetSdkVersion = 16843376; // 0x1010270
     field public static final int taskAffinity = 16842770; // 0x1010012
@@ -2807,11 +2816,25 @@
 
 package android.accessibilityservice {
 
+  public final class AccessibilityButtonController {
+    method public boolean isAccessibilityButtonAvailable();
+    method public void registerAccessibilityButtonCallback(android.accessibilityservice.AccessibilityButtonController.AccessibilityButtonCallback);
+    method public void registerAccessibilityButtonCallback(android.accessibilityservice.AccessibilityButtonController.AccessibilityButtonCallback, android.os.Handler);
+    method public void unregisterAccessibilityButtonCallback(android.accessibilityservice.AccessibilityButtonController.AccessibilityButtonCallback);
+  }
+
+  public static abstract class AccessibilityButtonController.AccessibilityButtonCallback {
+    ctor public AccessibilityButtonController.AccessibilityButtonCallback();
+    method public void onAvailabilityChanged(android.accessibilityservice.AccessibilityButtonController, boolean);
+    method public void onClicked(android.accessibilityservice.AccessibilityButtonController);
+  }
+
   public abstract class AccessibilityService extends android.app.Service {
     ctor public AccessibilityService();
     method public final void disableSelf();
     method public final boolean dispatchGesture(android.accessibilityservice.GestureDescription, android.accessibilityservice.AccessibilityService.GestureResultCallback, android.os.Handler);
     method public android.view.accessibility.AccessibilityNodeInfo findFocus(int);
+    method public final android.accessibilityservice.AccessibilityButtonController getAccessibilityButtonController();
     method public final android.accessibilityservice.FingerprintGestureController getFingerprintGestureController();
     method public final android.accessibilityservice.AccessibilityService.MagnificationController getMagnificationController();
     method public android.view.accessibility.AccessibilityNodeInfo getRootInActiveWindow();
@@ -2924,6 +2947,7 @@
     field public static final int FLAG_ENABLE_ACCESSIBILITY_VOLUME = 128; // 0x80
     field public static final int FLAG_INCLUDE_NOT_IMPORTANT_VIEWS = 2; // 0x2
     field public static final int FLAG_REPORT_VIEW_IDS = 16; // 0x10
+    field public static final int FLAG_REQUEST_ACCESSIBILITY_BUTTON = 256; // 0x100
     field public static final int FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 8; // 0x8
     field public static final int FLAG_REQUEST_FILTER_KEY_EVENTS = 32; // 0x20
     field public static final int FLAG_REQUEST_TOUCH_EXPLORATION_MODE = 4; // 0x4
@@ -3028,7 +3052,7 @@
   public class AccountManager {
     method public android.accounts.AccountManagerFuture<android.os.Bundle> addAccount(java.lang.String, java.lang.String, java.lang.String[], android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
     method public boolean addAccountExplicitly(android.accounts.Account, java.lang.String, android.os.Bundle);
-    method public boolean addAccountExplicitly(android.accounts.Account, java.lang.String, android.os.Bundle, java.util.Map<java.lang.Integer, java.lang.Integer>);
+    method public boolean addAccountExplicitly(android.accounts.Account, java.lang.String, android.os.Bundle, java.util.Map<java.lang.String, java.lang.Integer>);
     method public void addOnAccountsUpdatedListener(android.accounts.OnAccountsUpdateListener, android.os.Handler, boolean);
     method public void addOnAccountsUpdatedListener(android.accounts.OnAccountsUpdateListener, android.os.Handler, boolean, java.lang.String[]);
     method public java.lang.String blockingGetAuthToken(android.accounts.Account, java.lang.String, boolean) throws android.accounts.AuthenticatorException, java.io.IOException, android.accounts.OperationCanceledException;
@@ -3038,7 +3062,7 @@
     method public android.accounts.AccountManagerFuture<android.os.Bundle> finishSession(android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
     method public android.accounts.AccountManagerFuture<android.os.Bundle> finishSessionAsUser(android.os.Bundle, android.app.Activity, android.os.UserHandle, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
     method public static android.accounts.AccountManager get(android.content.Context);
-    method public int getAccountVisibility(android.accounts.Account, int);
+    method public int getAccountVisibility(android.accounts.Account, java.lang.String);
     method public android.accounts.Account[] getAccounts();
     method public java.util.Map<android.accounts.Account, java.lang.Integer> getAccountsAndVisibilityForPackage(java.lang.String, java.lang.String);
     method public android.accounts.Account[] getAccountsByType(java.lang.String);
@@ -3049,9 +3073,9 @@
     method public android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, java.lang.String, android.os.Bundle, boolean, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
     method public android.accounts.AccountManagerFuture<android.os.Bundle> getAuthTokenByFeatures(java.lang.String, java.lang.String, java.lang.String[], android.app.Activity, android.os.Bundle, android.os.Bundle, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
     method public android.accounts.AuthenticatorDescription[] getAuthenticatorTypes();
+    method public java.util.Map<java.lang.String, java.lang.Integer> getPackagesAndVisibilityForAccount(android.accounts.Account);
     method public java.lang.String getPassword(android.accounts.Account);
     method public java.lang.String getPreviousName(android.accounts.Account);
-    method public java.util.Map<java.lang.Integer, java.lang.Integer> getUidsAndVisibilityForAccount(android.accounts.Account);
     method public java.lang.String getUserData(android.accounts.Account, java.lang.String);
     method public android.accounts.AccountManagerFuture<java.lang.Boolean> hasFeatures(android.accounts.Account, java.lang.String[], android.accounts.AccountManagerCallback<java.lang.Boolean>, android.os.Handler);
     method public void invalidateAuthToken(java.lang.String, java.lang.String);
@@ -3065,7 +3089,7 @@
     method public boolean removeAccountExplicitly(android.accounts.Account);
     method public void removeOnAccountsUpdatedListener(android.accounts.OnAccountsUpdateListener);
     method public android.accounts.AccountManagerFuture<android.accounts.Account> renameAccount(android.accounts.Account, java.lang.String, android.accounts.AccountManagerCallback<android.accounts.Account>, android.os.Handler);
-    method public boolean setAccountVisibility(android.accounts.Account, int, int);
+    method public boolean setAccountVisibility(android.accounts.Account, java.lang.String, int);
     method public void setAuthToken(android.accounts.Account, java.lang.String, java.lang.String);
     method public void setPassword(android.accounts.Account, java.lang.String);
     method public void setUserData(android.accounts.Account, java.lang.String, java.lang.String);
@@ -3105,8 +3129,8 @@
     field public static final java.lang.String KEY_PASSWORD = "password";
     field public static final java.lang.String KEY_USERDATA = "userdata";
     field public static final deprecated java.lang.String LOGIN_ACCOUNTS_CHANGED_ACTION = "android.accounts.LOGIN_ACCOUNTS_CHANGED";
-    field public static final int UID_KEY_DEFAULT_LEGACY_VISIBILITY = -3; // 0xfffffffd
-    field public static final int UID_KEY_DEFAULT_VISIBILITY = -2; // 0xfffffffe
+    field public static final java.lang.String PACKAGE_NAME_KEY_LEGACY_NOT_VISIBLE = "android.accounts.key_legacy_not_visible";
+    field public static final java.lang.String PACKAGE_NAME_KEY_LEGACY_VISIBLE = "android.accounts.key_legacy_visible";
     field public static final int VISIBILITY_NOT_VISIBLE = 3; // 0x3
     field public static final int VISIBILITY_UNDEFINED = 0; // 0x0
     field public static final int VISIBILITY_USER_MANAGED_NOT_VISIBLE = 4; // 0x4
@@ -3241,6 +3265,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();
@@ -4313,7 +4338,6 @@
     method public abstract void onActivityCreated(android.app.Activity, android.os.Bundle);
     method public abstract void onActivityDestroyed(android.app.Activity);
     method public abstract void onActivityPaused(android.app.Activity);
-    method public default void onActivityPreCreated(android.app.Activity, android.os.Bundle);
     method public abstract void onActivityResumed(android.app.Activity);
     method public abstract void onActivitySaveInstanceState(android.app.Activity, android.os.Bundle);
     method public abstract void onActivityStarted(android.app.Activity);
@@ -4965,6 +4989,7 @@
     method public void addMonitor(android.app.Instrumentation.ActivityMonitor);
     method public android.app.Instrumentation.ActivityMonitor addMonitor(android.content.IntentFilter, android.app.Instrumentation.ActivityResult, boolean);
     method public android.app.Instrumentation.ActivityMonitor addMonitor(java.lang.String, android.app.Instrumentation.ActivityResult, boolean);
+    method public void addResults(android.os.Bundle);
     method public void callActivityOnCreate(android.app.Activity, android.os.Bundle);
     method public void callActivityOnCreate(android.app.Activity, android.os.Bundle, android.os.PersistableBundle);
     method public void callActivityOnDestroy(android.app.Activity);
@@ -4989,6 +5014,7 @@
     method public android.os.Bundle getBinderCounts();
     method public android.content.ComponentName getComponentName();
     method public android.content.Context getContext();
+    method public java.lang.String getProcessName();
     method public android.content.Context getTargetContext();
     method public android.app.UiAutomation getUiAutomation();
     method public android.app.UiAutomation getUiAutomation(int);
@@ -5205,15 +5231,20 @@
     ctor public Notification(android.os.Parcel);
     method public android.app.Notification clone();
     method public int describeContents();
+    method public int getBadgeIcon();
     method public java.lang.String getChannel();
     method public java.lang.String getGroup();
     method public android.graphics.drawable.Icon getLargeIcon();
     method public static java.lang.Class<? extends android.app.Notification.Style> getNotificationStyleClass(java.lang.String);
+    method public java.lang.String getShortcutId();
     method public android.graphics.drawable.Icon getSmallIcon();
     method public java.lang.String getSortKey();
     method public long getTimeout();
     method public void writeToParcel(android.os.Parcel, int);
     field public static final android.media.AudioAttributes AUDIO_ATTRIBUTES_DEFAULT;
+    field public static final int BADGE_ICON_LARGE = 2; // 0x2
+    field public static final int BADGE_ICON_NONE = 0; // 0x0
+    field public static final int BADGE_ICON_SMALL = 1; // 0x1
     field public static final java.lang.String CATEGORY_ALARM = "alarm";
     field public static final java.lang.String CATEGORY_CALL = "call";
     field public static final java.lang.String CATEGORY_EMAIL = "email";
@@ -5238,6 +5269,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";
@@ -5307,7 +5339,7 @@
     field public deprecated int ledARGB;
     field public deprecated int ledOffMS;
     field public deprecated int ledOnMS;
-    field public deprecated int number;
+    field public int number;
     field public deprecated int priority;
     field public android.app.Notification publicVersion;
     field public deprecated android.net.Uri sound;
@@ -5395,6 +5427,7 @@
     method public android.app.Notification.Builder addExtras(android.os.Bundle);
     method public android.app.Notification.Builder addPerson(java.lang.String);
     method public android.app.Notification build();
+    method public android.app.Notification.Builder chooseBadgeIcon(int);
     method public android.widget.RemoteViews createBigContentView();
     method public android.widget.RemoteViews createContentView();
     method public android.widget.RemoteViews createHeadsUpContentView();
@@ -5427,13 +5460,14 @@
     method public android.app.Notification.Builder setLargeIcon(android.graphics.drawable.Icon);
     method public deprecated android.app.Notification.Builder setLights(int, int, int);
     method public android.app.Notification.Builder setLocalOnly(boolean);
-    method public deprecated android.app.Notification.Builder setNumber(int);
+    method public android.app.Notification.Builder setNumber(int);
     method public android.app.Notification.Builder setOngoing(boolean);
     method public android.app.Notification.Builder setOnlyAlertOnce(boolean);
     method public deprecated android.app.Notification.Builder setPriority(int);
     method public android.app.Notification.Builder setProgress(int, int, boolean);
     method public android.app.Notification.Builder setPublicVersion(android.app.Notification);
     method public android.app.Notification.Builder setRemoteInputHistory(java.lang.CharSequence[]);
+    method public android.app.Notification.Builder setShortcutId(java.lang.String);
     method public android.app.Notification.Builder setShowWhen(boolean);
     method public android.app.Notification.Builder setSmallIcon(int);
     method public android.app.Notification.Builder setSmallIcon(int, int);
@@ -5624,11 +5658,13 @@
     method public boolean canBypassDnd();
     method public boolean canShowBadge();
     method public int describeContents();
+    method public void enableLights(boolean);
     method public void enableVibration(boolean);
     method public android.media.AudioAttributes getAudioAttributes();
     method public java.lang.String getGroup();
     method public java.lang.String getId();
     method public int getImportance();
+    method public int getLightColor();
     method public int getLockscreenVisibility();
     method public java.lang.CharSequence getName();
     method public android.net.Uri getSound();
@@ -5641,7 +5677,7 @@
     method public void setDeleted(boolean);
     method public void setGroup(java.lang.String);
     method public void setImportance(int);
-    method public void setLights(boolean);
+    method public void setLightColor(int);
     method public void setLockscreenVisibility(int);
     method public void setShowBadge(boolean);
     method public void setSound(android.net.Uri, android.media.AudioAttributes);
@@ -5669,6 +5705,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();
@@ -5838,10 +5875,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);
@@ -5850,10 +5886,11 @@
   }
 
   public final class RemoteAction implements android.os.Parcelable {
-    ctor public RemoteAction(android.graphics.drawable.Icon, java.lang.CharSequence, java.lang.CharSequence, android.app.RemoteAction.OnActionListener);
+    ctor public RemoteAction(android.graphics.drawable.Icon, java.lang.CharSequence, java.lang.CharSequence, android.app.PendingIntent);
     method public android.app.RemoteAction clone();
     method public int describeContents();
     method public void dump(java.lang.String, java.io.PrintWriter);
+    method public android.app.PendingIntent getActionIntent();
     method public java.lang.CharSequence getContentDescription();
     method public android.graphics.drawable.Icon getIcon();
     method public java.lang.CharSequence getTitle();
@@ -5861,10 +5898,6 @@
     field public static final android.os.Parcelable.Creator<android.app.RemoteAction> CREATOR;
   }
 
-  public static abstract interface RemoteAction.OnActionListener {
-    method public abstract void onAction(android.app.RemoteAction);
-  }
-
   public final class RemoteInput implements android.os.Parcelable {
     method public static void addDataResultToIntent(android.app.RemoteInput, android.content.Intent, java.util.Map<java.lang.String, android.net.Uri>);
     method public static void addResultsToIntent(android.app.RemoteInput[], android.content.Intent, android.os.Bundle);
@@ -6203,6 +6236,10 @@
     method public void onDetached();
   }
 
+  public class VrManager {
+    method public void setPersistentVrModeEnabled(boolean);
+  }
+
   public final class WallpaperInfo implements android.os.Parcelable {
     ctor public WallpaperInfo(android.content.Context, android.content.pm.ResolveInfo) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
     method public int describeContents();
@@ -6370,6 +6407,7 @@
     method public void clearDeviceOwnerApp(java.lang.String);
     method public void clearPackagePersistentPreferredActivities(android.content.ComponentName, java.lang.String);
     method public void clearProfileOwner(android.content.ComponentName);
+    method public boolean clearResetPasswordToken(android.content.ComponentName);
     method public void clearUserRestriction(android.content.ComponentName, java.lang.String);
     method public android.content.Intent createAdminSupportIntent(java.lang.String);
     method public android.os.UserHandle createAndManageUser(android.content.ComponentName, java.lang.String, android.content.ComponentName, android.os.PersistableBundle, int);
@@ -6401,6 +6439,7 @@
     method public java.lang.CharSequence getDeviceOwnerOrganizationName();
     method public java.util.List<byte[]> getInstalledCaCerts(android.content.ComponentName);
     method public int getKeyguardDisabledFeatures(android.content.ComponentName);
+    method public java.lang.String[] getLockTaskPackages(android.content.ComponentName);
     method public java.lang.CharSequence getLongSupportMessage(android.content.ComponentName);
     method public int getMaximumFailedPasswordsForWipe(android.content.ComponentName);
     method public long getMaximumTimeToLock(android.content.ComponentName);
@@ -6459,6 +6498,7 @@
     method public boolean isPackageSuspended(android.content.ComponentName, java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
     method public boolean isProfileOwnerApp(java.lang.String);
     method public boolean isProvisioningAllowed(java.lang.String);
+    method public boolean isResetPasswordTokenActive(android.content.ComponentName);
     method public boolean isSecurityLoggingEnabled(android.content.ComponentName);
     method public boolean isUninstallBlocked(android.content.ComponentName, java.lang.String);
     method public void lockNow();
@@ -6473,6 +6513,7 @@
     method public boolean removeUser(android.content.ComponentName, android.os.UserHandle);
     method public boolean requestBugreport(android.content.ComponentName);
     method public boolean resetPassword(java.lang.String, int);
+    method public boolean resetPasswordWithToken(android.content.ComponentName, java.lang.String, byte[], int);
     method public java.util.List<android.app.admin.NetworkEvent> retrieveNetworkLogs(android.content.ComponentName, long);
     method public java.util.List<android.app.admin.SecurityLog.SecurityEvent> retrievePreRebootSecurityLogs(android.content.ComponentName);
     method public java.util.List<android.app.admin.SecurityLog.SecurityEvent> retrieveSecurityLogs(android.content.ComponentName);
@@ -6523,6 +6564,7 @@
     method public void setProfileName(android.content.ComponentName, java.lang.String);
     method public void setRecommendedGlobalProxy(android.content.ComponentName, android.net.ProxyInfo);
     method public void setRequiredStrongAuthTimeout(android.content.ComponentName, long);
+    method public boolean setResetPasswordToken(android.content.ComponentName, byte[]);
     method public void setRestrictionsProvider(android.content.ComponentName, android.content.ComponentName);
     method public void setScreenCaptureDisabled(android.content.ComponentName, boolean);
     method public void setSecureSetting(android.content.ComponentName, java.lang.String, java.lang.String);
@@ -6538,6 +6580,8 @@
     method public void uninstallAllUserCaCerts(android.content.ComponentName);
     method public void uninstallCaCert(android.content.ComponentName, byte[]);
     method public void wipeData(int);
+    field public static final java.lang.String ACCOUNT_FEATURE_DEVICE_OR_PROFILE_OWNER_ALLOWED = "android.account.DEVICE_OR_PROFILE_OWNER_ALLOWED";
+    field public static final java.lang.String ACCOUNT_FEATURE_DEVICE_OR_PROFILE_OWNER_DISALLOWED = "android.account.DEVICE_OR_PROFILE_OWNER_DISALLOWED";
     field public static final java.lang.String ACTION_ADD_DEVICE_ADMIN = "android.app.action.ADD_DEVICE_ADMIN";
     field public static final java.lang.String ACTION_APPLICATION_DELEGATION_SCOPES_CHANGED = "android.app.action.APPLICATION_DELEGATION_SCOPES_CHANGED";
     field public static final java.lang.String ACTION_DEVICE_OWNER_CHANGED = "android.app.action.DEVICE_OWNER_CHANGED";
@@ -6769,6 +6813,7 @@
     method public int getTextStyle();
     method public int getTop();
     method public android.graphics.Matrix getTransformation();
+    method public java.lang.String getUrl();
     method public int getVisibility();
     method public int getWidth();
     method public boolean isAccessibilityFocused();
@@ -6807,6 +6852,7 @@
   public abstract class BackupAgent extends android.content.ContextWrapper {
     ctor public BackupAgent();
     method public final void fullBackupFile(java.io.File, android.app.backup.FullBackupDataOutput);
+    method public long getBackupQuota();
     method public abstract void onBackup(android.os.ParcelFileDescriptor, android.app.backup.BackupDataOutput, android.os.ParcelFileDescriptor) throws java.io.IOException;
     method public void onCreate();
     method public void onDestroy();
@@ -6857,6 +6903,7 @@
     ctor public BackupManager(android.content.Context);
     method public void backupNow();
     method public android.app.backup.RestoreSession beginRestoreSession();
+    method public void cancelBackups();
     method public void dataChanged();
     method public static void dataChanged(java.lang.String);
     method public long getAvailableRestoreToken(java.lang.String);
@@ -6865,13 +6912,15 @@
     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);
     method public void setBackupEnabled(boolean);
     field public static final int ERROR_AGENT_FAILURE = -1003; // 0xfffffc15
+    field public static final int ERROR_BACKUP_CANCELLED = -2003; // 0xfffff82d
     field public static final int ERROR_BACKUP_NOT_ALLOWED = -2001; // 0xfffff82f
     field public static final int ERROR_PACKAGE_NOT_FOUND = -2002; // 0xfffff82e
     field public static final int ERROR_TRANSPORT_ABORTED = -1000; // 0xfffffc18
@@ -6884,6 +6933,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);
@@ -6977,8 +7043,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);
   }
 
@@ -8328,6 +8397,65 @@
 
 }
 
+package android.companion {
+
+  public final class AssociationRequest<F extends android.companion.DeviceFilter> implements android.os.Parcelable {
+    method public int describeContents();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.companion.AssociationRequest> CREATOR;
+  }
+
+  public static final class AssociationRequest.Builder<F extends android.companion.DeviceFilter> {
+    method public android.companion.AssociationRequest<F> build();
+    method public static android.companion.AssociationRequest.Builder<android.companion.BluetoothDeviceFilter> createForBluetoothDevice();
+    method public static android.companion.AssociationRequest.Builder<android.companion.BluetoothLEDeviceFilter> createForBluetoothLEDevice();
+    method public android.companion.AssociationRequest.Builder<F> setDeviceFilter(F);
+    method public android.companion.AssociationRequest.Builder<F> setSingleDevice(boolean);
+  }
+
+  public final class BluetoothDeviceFilter implements android.companion.DeviceFilter {
+    method public int describeContents();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.companion.BluetoothDeviceFilter> CREATOR;
+  }
+
+  public static final class BluetoothDeviceFilter.Builder {
+    ctor public BluetoothDeviceFilter.Builder();
+    method public android.companion.BluetoothDeviceFilter.Builder addServiceUuid(android.os.ParcelUuid, android.os.ParcelUuid);
+    method public android.companion.BluetoothDeviceFilter build();
+    method public android.companion.BluetoothDeviceFilter.Builder setAddress(java.lang.String);
+    method public android.companion.BluetoothDeviceFilter.Builder setNamePattern(java.util.regex.Pattern);
+  }
+
+  public final class BluetoothLEDeviceFilter implements android.companion.DeviceFilter {
+    method public int describeContents();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.companion.BluetoothLEDeviceFilter> CREATOR;
+  }
+
+  public static final class BluetoothLEDeviceFilter.Builder {
+    ctor public BluetoothLEDeviceFilter.Builder();
+    method public android.companion.BluetoothLEDeviceFilter build();
+    method public android.companion.BluetoothLEDeviceFilter.Builder setNamePattern(java.util.regex.Pattern);
+    method public android.companion.BluetoothLEDeviceFilter.Builder setScanFilter(android.bluetooth.le.ScanFilter);
+  }
+
+  public final class CompanionDeviceManager {
+    method public void associate(android.companion.AssociationRequest<?>, android.companion.CompanionDeviceManager.Callback, android.os.Handler);
+    field public static final java.lang.String EXTRA_DEVICE = "android.companion.extra.DEVICE";
+  }
+
+  public static abstract class CompanionDeviceManager.Callback {
+    ctor public CompanionDeviceManager.Callback();
+    method public abstract void onDeviceFound(android.content.IntentSender);
+    method public abstract void onFailure(java.lang.CharSequence);
+  }
+
+  public abstract interface DeviceFilter<D extends android.os.Parcelable> implements android.os.Parcelable {
+  }
+
+}
+
 package android.content {
 
   public abstract class AbstractThreadedSyncAdapter {
@@ -8947,6 +9075,7 @@
     field public static final java.lang.String CAPTIONING_SERVICE = "captioning";
     field public static final java.lang.String CARRIER_CONFIG_SERVICE = "carrier_config";
     field public static final java.lang.String CLIPBOARD_SERVICE = "clipboard";
+    field public static final java.lang.String COMPANION_DEVICE_SERVICE = "companion_device";
     field public static final java.lang.String CONNECTIVITY_SERVICE = "connectivity";
     field public static final java.lang.String CONSUMER_IR_SERVICE = "consumer_ir";
     field public static final java.lang.String CONTEXTHUB_SERVICE = "contexthub";
@@ -9005,6 +9134,7 @@
     field public static final java.lang.String USB_SERVICE = "usb";
     field public static final java.lang.String USER_SERVICE = "user";
     field public static final java.lang.String VIBRATOR_SERVICE = "vibrator";
+    field public static final java.lang.String VR_SERVICE = "vrmanager";
     field public static final java.lang.String WALLPAPER_SERVICE = "wallpaper";
     field public static final java.lang.String WIFI_AWARE_SERVICE = "wifiaware";
     field public static final java.lang.String WIFI_P2P_SERVICE = "wifip2p";
@@ -9543,7 +9673,7 @@
     field public static final java.lang.String EXTRA_PHONE_NUMBER = "android.intent.extra.PHONE_NUMBER";
     field public static final java.lang.String EXTRA_PROCESS_TEXT = "android.intent.extra.PROCESS_TEXT";
     field public static final java.lang.String EXTRA_PROCESS_TEXT_READONLY = "android.intent.extra.PROCESS_TEXT_READONLY";
-    field public static final java.lang.String EXTRA_QUICK_VIEW_PLAIN = "android.intent.extra.QUICK_VIEW_PLAIN";
+    field public static final java.lang.String EXTRA_QUICK_VIEW_ADVANCED = "android.intent.extra.QUICK_VIEW_ADVANCED";
     field public static final java.lang.String EXTRA_QUIET_MODE = "android.intent.extra.QUIET_MODE";
     field public static final java.lang.String EXTRA_REFERRER = "android.intent.extra.REFERRER";
     field public static final java.lang.String EXTRA_REFERRER_NAME = "android.intent.extra.REFERRER_NAME";
@@ -10252,6 +10382,15 @@
     method public final int compare(android.content.pm.ApplicationInfo, android.content.pm.ApplicationInfo);
   }
 
+  public final class ChangedPackages implements android.os.Parcelable {
+    ctor public ChangedPackages(int, java.util.List<java.lang.String>);
+    method public int describeContents();
+    method public java.util.List<java.lang.String> getPackageNames();
+    method public int getSequenceNumber();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.content.pm.ChangedPackages> CREATOR;
+  }
+
   public class ComponentInfo extends android.content.pm.PackageItemInfo {
     ctor public ComponentInfo();
     ctor public ComponentInfo(android.content.pm.ComponentInfo);
@@ -10359,6 +10498,7 @@
     field public java.lang.String[] splitPublicSourceDirs;
     field public java.lang.String[] splitSourceDirs;
     field public java.lang.String targetPackage;
+    field public java.lang.String targetProcess;
   }
 
   public final class IntentFilterVerificationInfo implements android.os.Parcelable {
@@ -10648,6 +10788,7 @@
     method public abstract java.lang.CharSequence getApplicationLabel(android.content.pm.ApplicationInfo);
     method public abstract android.graphics.drawable.Drawable getApplicationLogo(android.content.pm.ApplicationInfo);
     method public abstract android.graphics.drawable.Drawable getApplicationLogo(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
+    method public abstract android.content.pm.ChangedPackages getChangedPackages(int);
     method public abstract int getComponentEnabledSetting(android.content.ComponentName);
     method public abstract android.graphics.drawable.Drawable getDefaultActivityIcon();
     method public abstract java.lang.String getDefaultBrowserPackageNameAsUser(int);
@@ -10813,6 +10954,7 @@
     field public static final java.lang.String FEATURE_VERIFIED_BOOT = "android.software.verified_boot";
     field public static final java.lang.String FEATURE_VR_MODE = "android.software.vr.mode";
     field public static final java.lang.String FEATURE_VR_MODE_HIGH_PERFORMANCE = "android.hardware.vr.high_performance";
+    field public static final java.lang.String FEATURE_VULKAN_HARDWARE_COMPUTE = "android.hardware.vulkan.compute";
     field public static final java.lang.String FEATURE_VULKAN_HARDWARE_LEVEL = "android.hardware.vulkan.level";
     field public static final java.lang.String FEATURE_VULKAN_HARDWARE_VERSION = "android.hardware.vulkan.version";
     field public static final java.lang.String FEATURE_WATCH = "android.hardware.type.watch";
@@ -12712,6 +12854,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;
@@ -12767,13 +12910,18 @@
   public class Canvas {
     ctor public Canvas();
     ctor public Canvas(android.graphics.Bitmap);
-    method public boolean clipPath(android.graphics.Path, android.graphics.Region.Op);
+    method public boolean clipOutPath(android.graphics.Path);
+    method public boolean clipOutRect(android.graphics.RectF);
+    method public boolean clipOutRect(android.graphics.Rect);
+    method public boolean clipOutRect(float, float, float, float);
+    method public boolean clipOutRect(int, int, int, int);
+    method public deprecated boolean clipPath(android.graphics.Path, android.graphics.Region.Op);
     method public boolean clipPath(android.graphics.Path);
-    method public boolean clipRect(android.graphics.RectF, android.graphics.Region.Op);
-    method public boolean clipRect(android.graphics.Rect, android.graphics.Region.Op);
+    method public deprecated boolean clipRect(android.graphics.RectF, android.graphics.Region.Op);
+    method public deprecated boolean clipRect(android.graphics.Rect, android.graphics.Region.Op);
     method public boolean clipRect(android.graphics.RectF);
     method public boolean clipRect(android.graphics.Rect);
-    method public boolean clipRect(float, float, float, float, android.graphics.Region.Op);
+    method public deprecated boolean clipRect(float, float, float, float, android.graphics.Region.Op);
     method public boolean clipRect(float, float, float, float);
     method public boolean clipRect(int, int, int, int);
     method public void concat(android.graphics.Matrix);
@@ -12841,14 +12989,14 @@
     method public void rotate(float);
     method public final void rotate(float, float, float);
     method public int save();
-    method public int save(int);
-    method public int saveLayer(android.graphics.RectF, android.graphics.Paint, int);
+    method public deprecated int save(int);
+    method public deprecated int saveLayer(android.graphics.RectF, android.graphics.Paint, int);
     method public int saveLayer(android.graphics.RectF, android.graphics.Paint);
-    method public int saveLayer(float, float, float, float, android.graphics.Paint, int);
+    method public deprecated int saveLayer(float, float, float, float, android.graphics.Paint, int);
     method public int saveLayer(float, float, float, float, android.graphics.Paint);
-    method public int saveLayerAlpha(android.graphics.RectF, int, int);
+    method public deprecated int saveLayerAlpha(android.graphics.RectF, int, int);
     method public int saveLayerAlpha(android.graphics.RectF, int);
-    method public int saveLayerAlpha(float, float, float, float, int, int);
+    method public deprecated int saveLayerAlpha(float, float, float, float, int, int);
     method public int saveLayerAlpha(float, float, float, float, int);
     method public void scale(float, float);
     method public final void scale(float, float, float, float);
@@ -12859,11 +13007,11 @@
     method public void skew(float, float);
     method public void translate(float, float);
     field public static final int ALL_SAVE_FLAG = 31; // 0x1f
-    field public static final int CLIP_SAVE_FLAG = 2; // 0x2
-    field public static final int CLIP_TO_LAYER_SAVE_FLAG = 16; // 0x10
-    field public static final int FULL_COLOR_LAYER_SAVE_FLAG = 8; // 0x8
-    field public static final int HAS_ALPHA_LAYER_SAVE_FLAG = 4; // 0x4
-    field public static final int MATRIX_SAVE_FLAG = 1; // 0x1
+    field public static final deprecated int CLIP_SAVE_FLAG = 2; // 0x2
+    field public static final deprecated int CLIP_TO_LAYER_SAVE_FLAG = 16; // 0x10
+    field public static final deprecated int FULL_COLOR_LAYER_SAVE_FLAG = 8; // 0x8
+    field public static final deprecated int HAS_ALPHA_LAYER_SAVE_FLAG = 4; // 0x4
+    field public static final deprecated int MATRIX_SAVE_FLAG = 1; // 0x1
   }
 
   public static final class Canvas.EdgeType extends java.lang.Enum {
@@ -14240,6 +14388,7 @@
     method public static android.graphics.drawable.Icon createWithContentUri(android.net.Uri);
     method public static android.graphics.drawable.Icon createWithData(byte[], int, int);
     method public static android.graphics.drawable.Icon createWithFilePath(java.lang.String);
+    method public static android.graphics.drawable.Icon createWithMaskableBitmap(android.graphics.Bitmap);
     method public static android.graphics.drawable.Icon createWithResource(android.content.Context, int);
     method public static android.graphics.drawable.Icon createWithResource(java.lang.String, int);
     method public int describeContents();
@@ -14323,9 +14472,9 @@
   }
 
   public class MaskableIconDrawable extends android.graphics.drawable.Drawable implements android.graphics.drawable.Drawable.Callback {
-    ctor public MaskableIconDrawable(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable);
     method public void draw(android.graphics.Canvas);
     method public android.graphics.drawable.Drawable getBackground();
+    method public static float getExtraInsetPercentage();
     method public android.graphics.drawable.Drawable getForeground();
     method public android.graphics.Path getIconMask();
     method public int getOpacity();
@@ -14335,8 +14484,6 @@
     method public void setColorFilter(android.graphics.ColorFilter);
     method public void setOpacity(int);
     method public void unscheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable);
-    field public static final float DEFAULT_VIEW_PORT_SCALE = 0.6666667f;
-    field public static final float MASK_SIZE = 100.0f;
   }
 
   public class NinePatchDrawable extends android.graphics.drawable.Drawable {
@@ -14898,6 +15045,7 @@
     field public static final java.lang.String STRING_TYPE_HEART_RATE = "android.sensor.heart_rate";
     field public static final java.lang.String STRING_TYPE_LIGHT = "android.sensor.light";
     field public static final java.lang.String STRING_TYPE_LINEAR_ACCELERATION = "android.sensor.linear_acceleration";
+    field public static final java.lang.String STRING_TYPE_LOW_LATENCY_OFFBODY_DETECT = "android.sensor.low_latency_offbody";
     field public static final java.lang.String STRING_TYPE_MAGNETIC_FIELD = "android.sensor.magnetic_field";
     field public static final java.lang.String STRING_TYPE_MAGNETIC_FIELD_UNCALIBRATED = "android.sensor.magnetic_field_uncalibrated";
     field public static final java.lang.String STRING_TYPE_MOTION_DETECT = "android.sensor.motion_detect";
@@ -14928,6 +15076,7 @@
     field public static final int TYPE_HEART_RATE = 21; // 0x15
     field public static final int TYPE_LIGHT = 5; // 0x5
     field public static final int TYPE_LINEAR_ACCELERATION = 10; // 0xa
+    field public static final int TYPE_LOW_LATENCY_OFFBODY_DETECT = 34; // 0x22
     field public static final int TYPE_MAGNETIC_FIELD = 2; // 0x2
     field public static final int TYPE_MAGNETIC_FIELD_UNCALIBRATED = 14; // 0xe
     field public static final int TYPE_MOTION_DETECT = 30; // 0x1e
@@ -21320,6 +21469,11 @@
     field public static final android.os.Parcelable.Creator<android.location.Address> CREATOR;
   }
 
+  public abstract class BatchedLocationCallback {
+    ctor public BatchedLocationCallback();
+    method public void onLocationBatch(java.util.List<android.location.Location>);
+  }
+
   public class Criteria implements android.os.Parcelable {
     ctor public Criteria();
     ctor public Criteria(android.location.Criteria);
@@ -21858,14 +22012,17 @@
     method public void clearTestProviderEnabled(java.lang.String);
     method public void clearTestProviderLocation(java.lang.String);
     method public void clearTestProviderStatus(java.lang.String);
+    method public void flushGnssBatch();
     method public java.util.List<java.lang.String> getAllProviders();
     method public java.lang.String getBestProvider(android.location.Criteria, boolean);
+    method public int getGnssBatchSize();
     method public deprecated android.location.GpsStatus getGpsStatus(android.location.GpsStatus);
     method public android.location.Location getLastKnownLocation(java.lang.String);
     method public android.location.LocationProvider getProvider(java.lang.String);
     method public java.util.List<java.lang.String> getProviders(boolean);
     method public java.util.List<java.lang.String> getProviders(android.location.Criteria, boolean);
     method public boolean isProviderEnabled(java.lang.String);
+    method public boolean registerGnssBatchedLocationCallback(long, boolean, android.location.BatchedLocationCallback, android.os.Handler);
     method public boolean registerGnssMeasurementsCallback(android.location.GnssMeasurementsEvent.Callback);
     method public boolean registerGnssMeasurementsCallback(android.location.GnssMeasurementsEvent.Callback, android.os.Handler);
     method public boolean registerGnssNavigationMessageCallback(android.location.GnssNavigationMessage.Callback);
@@ -21896,6 +22053,7 @@
     method public void setTestProviderEnabled(java.lang.String, boolean);
     method public void setTestProviderLocation(java.lang.String, android.location.Location);
     method public void setTestProviderStatus(java.lang.String, int, android.os.Bundle, long);
+    method public boolean unregisterGnssBatchedLocationCallback(android.location.BatchedLocationCallback);
     method public void unregisterGnssMeasurementsCallback(android.location.GnssMeasurementsEvent.Callback);
     method public void unregisterGnssNavigationMessageCallback(android.location.GnssNavigationMessage.Callback);
     method public void unregisterGnssStatusCallback(android.location.GnssStatus.Callback);
@@ -21997,6 +22155,7 @@
     method public int getContentType();
     method public int getFlags();
     method public int getUsage();
+    method public static int getVolumeControlStream(android.media.AudioAttributes);
     method public void writeToParcel(android.os.Parcel, int);
     field public static final int CONTENT_TYPE_MOVIE = 3; // 0x3
     field public static final int CONTENT_TYPE_MUSIC = 2; // 0x2
@@ -22189,7 +22348,7 @@
     method public int getStreamMaxVolume(int);
     method public int getStreamVolume(int);
     method public deprecated int getVibrateSetting(int);
-    method public boolean isBluetoothA2dpOn();
+    method public deprecated boolean isBluetoothA2dpOn();
     method public boolean isBluetoothScoAvailableOffCall();
     method public boolean isBluetoothScoOn();
     method public boolean isHdmiSystemAudioSupported();
@@ -23507,6 +23666,7 @@
     method public boolean advance();
     method public long getCachedDuration();
     method public android.media.DrmInitData getDrmInitData();
+    method public android.os.Bundle getMetrics();
     method public java.util.Map<java.util.UUID, byte[]> getPsshInfo();
     method public boolean getSampleCryptoInfo(android.media.MediaCodec.CryptoInfo);
     method public int getSampleFlags();
@@ -23769,6 +23929,7 @@
   }
 
   public static final class MediaMuxer.OutputFormat {
+    field public static final int MUXER_OUTPUT_3GPP = 2; // 0x2
     field public static final int MUXER_OUTPUT_MPEG_4 = 0; // 0x0
     field public static final int MUXER_OUTPUT_WEBM = 1; // 0x1
   }
@@ -23807,7 +23968,7 @@
     method public void pause() throws java.lang.IllegalStateException;
     method public void prepare() throws java.io.IOException, java.lang.IllegalStateException;
     method public void prepareAsync() throws java.lang.IllegalStateException;
-    method public void prepareDrm(java.util.UUID, android.media.MediaPlayer.OnDrmConfigCallback) throws android.media.MediaPlayer.ProvisioningErrorException, android.media.ResourceBusyException, android.media.UnsupportedSchemeException;
+    method public void prepareDrm(java.util.UUID) throws android.media.MediaPlayer.ProvisioningErrorException, android.media.ResourceBusyException, android.media.UnsupportedSchemeException;
     method public byte[] provideKeyResponse(byte[], byte[]) throws android.media.DeniedByServerException, android.media.MediaPlayer.NoDrmSchemeException;
     method public void release();
     method public void releaseDrm() throws android.media.MediaPlayer.NoDrmSchemeException;
@@ -23822,6 +23983,7 @@
     method public void setAuxEffectSendLevel(float);
     method public void setBufferingParams(android.media.BufferingParams);
     method public void setDataSource(android.content.Context, android.net.Uri) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.SecurityException;
+    method public void setDataSource(android.content.Context, android.net.Uri, java.util.Map<java.lang.String, java.lang.String>, java.util.List<java.net.HttpCookie>) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.SecurityException;
     method public void setDataSource(android.content.Context, android.net.Uri, java.util.Map<java.lang.String, java.lang.String>) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.SecurityException;
     method public void setDataSource(java.lang.String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.SecurityException;
     method public void setDataSource(android.content.res.AssetFileDescriptor) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
@@ -23834,6 +23996,7 @@
     method public void setNextMediaPlayer(android.media.MediaPlayer);
     method public void setOnBufferingUpdateListener(android.media.MediaPlayer.OnBufferingUpdateListener);
     method public void setOnCompletionListener(android.media.MediaPlayer.OnCompletionListener);
+    method public void setOnDrmConfigListener(android.media.MediaPlayer.OnDrmConfigListener);
     method public void setOnDrmInfoListener(android.media.MediaPlayer.OnDrmInfoListener);
     method public void setOnDrmInfoListener(android.media.MediaPlayer.OnDrmInfoListener, android.os.Handler);
     method public void setOnDrmPreparedListener(android.media.MediaPlayer.OnDrmPreparedListener);
@@ -23898,9 +24061,8 @@
     method public abstract void onCompletion(android.media.MediaPlayer);
   }
 
-  public static abstract class MediaPlayer.OnDrmConfigCallback {
-    ctor public MediaPlayer.OnDrmConfigCallback();
-    method public void onDrmConfig(android.media.MediaPlayer);
+  public static abstract interface MediaPlayer.OnDrmConfigListener {
+    method public abstract void onDrmConfig(android.media.MediaPlayer);
   }
 
   public static abstract interface MediaPlayer.OnDrmInfoListener {
@@ -25272,6 +25434,8 @@
 
   public final class MediaController {
     ctor public MediaController(android.content.Context, android.media.session.MediaSession.Token);
+    method public void addQueueItem(android.media.MediaDescription);
+    method public void addQueueItem(android.media.MediaDescription, int);
     method public void adjustVolume(int, int);
     method public boolean dispatchMediaButtonEvent(android.view.KeyEvent);
     method public android.os.Bundle getExtras();
@@ -25290,6 +25454,8 @@
     method public boolean isShuffleModeEnabled();
     method public void registerCallback(android.media.session.MediaController.Callback);
     method public void registerCallback(android.media.session.MediaController.Callback, android.os.Handler);
+    method public void removeQueueItem(android.media.MediaDescription);
+    method public void removeQueueItemAt(int);
     method public void sendCommand(java.lang.String, android.os.Bundle, android.os.ResultReceiver);
     method public void setVolumeTo(int, int);
     method public void unregisterCallback(android.media.session.MediaController.Callback);
@@ -25367,11 +25533,14 @@
     method public void setSessionActivity(android.app.PendingIntent);
     method public void setShuffleModeEnabled(boolean);
     field public static final int FLAG_HANDLES_MEDIA_BUTTONS = 1; // 0x1
+    field public static final int FLAG_HANDLES_QUEUE_COMMANDS = 4; // 0x4
     field public static final int FLAG_HANDLES_TRANSPORT_CONTROLS = 2; // 0x2
   }
 
   public static abstract class MediaSession.Callback {
     ctor public MediaSession.Callback();
+    method public void onAddQueueItem(android.media.MediaDescription);
+    method public void onAddQueueItem(android.media.MediaDescription, int);
     method public void onCommand(java.lang.String, android.os.Bundle, android.os.ResultReceiver);
     method public void onCustomAction(java.lang.String, android.os.Bundle);
     method public void onFastForward();
@@ -25385,6 +25554,8 @@
     method public void onPrepareFromMediaId(java.lang.String, android.os.Bundle);
     method public void onPrepareFromSearch(java.lang.String, android.os.Bundle);
     method public void onPrepareFromUri(android.net.Uri, android.os.Bundle);
+    method public void onRemoveQueueItem(android.media.MediaDescription);
+    method public void onRemoveQueueItemAt(int);
     method public void onRewind();
     method public void onSeekTo(long);
     method public void onSetRating(android.media.Rating);
@@ -25588,6 +25759,9 @@
     method public static final android.net.Uri buildChannelsUriForInput(java.lang.String, boolean);
     method public static final android.net.Uri buildChannelsUriForInput(java.lang.String, java.lang.String, boolean);
     method public static final java.lang.String buildInputId(android.content.ComponentName);
+    method public static final android.net.Uri buildPreviewProgramUri(long);
+    method public static final android.net.Uri buildPreviewProgramsUriForChannel(long);
+    method public static final android.net.Uri buildPreviewProgramsUriForChannel(android.net.Uri);
     method public static final android.net.Uri buildProgramUri(long);
     method public static final android.net.Uri buildProgramsUriForChannel(long);
     method public static final android.net.Uri buildProgramsUriForChannel(android.net.Uri);
@@ -25601,6 +25775,31 @@
     field public static final java.lang.String AUTHORITY = "android.media.tv";
   }
 
+  public static abstract interface TvContract.BaseProgramColumns implements android.media.tv.TvContract.BaseTvColumns {
+    field public static final java.lang.String COLUMN_AUDIO_LANGUAGE = "audio_language";
+    field public static final java.lang.String COLUMN_CANONICAL_GENRE = "canonical_genre";
+    field public static final java.lang.String COLUMN_CHANNEL_ID = "channel_id";
+    field public static final java.lang.String COLUMN_CONTENT_RATING = "content_rating";
+    field public static final java.lang.String COLUMN_EPISODE_DISPLAY_NUMBER = "episode_display_number";
+    field public static final java.lang.String COLUMN_EPISODE_TITLE = "episode_title";
+    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_DATA = "internal_provider_data";
+    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG1 = "internal_provider_flag1";
+    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG2 = "internal_provider_flag2";
+    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG3 = "internal_provider_flag3";
+    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG4 = "internal_provider_flag4";
+    field public static final java.lang.String COLUMN_LONG_DESCRIPTION = "long_description";
+    field public static final java.lang.String COLUMN_POSTER_ART_URI = "poster_art_uri";
+    field public static final java.lang.String COLUMN_SEARCHABLE = "searchable";
+    field public static final java.lang.String COLUMN_SEASON_DISPLAY_NUMBER = "season_display_number";
+    field public static final java.lang.String COLUMN_SEASON_TITLE = "season_title";
+    field public static final java.lang.String COLUMN_SHORT_DESCRIPTION = "short_description";
+    field public static final java.lang.String COLUMN_THUMBNAIL_URI = "thumbnail_uri";
+    field public static final java.lang.String COLUMN_TITLE = "title";
+    field public static final java.lang.String COLUMN_VERSION_NUMBER = "version_number";
+    field public static final java.lang.String COLUMN_VIDEO_HEIGHT = "video_height";
+    field public static final java.lang.String COLUMN_VIDEO_WIDTH = "video_width";
+  }
+
   public static abstract interface TvContract.BaseTvColumns implements android.provider.BaseColumns {
     field public static final java.lang.String COLUMN_PACKAGE_NAME = "package_name";
   }
@@ -25617,6 +25816,7 @@
     field public static final java.lang.String COLUMN_DISPLAY_NAME = "display_name";
     field public static final java.lang.String COLUMN_DISPLAY_NUMBER = "display_number";
     field public static final java.lang.String COLUMN_INPUT_ID = "input_id";
+    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_ID = "internal_provider_id";
     field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_DATA = "internal_provider_data";
     field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG1 = "internal_provider_flag1";
     field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG2 = "internal_provider_flag2";
@@ -25628,6 +25828,7 @@
     field public static final java.lang.String COLUMN_SEARCHABLE = "searchable";
     field public static final java.lang.String COLUMN_SERVICE_ID = "service_id";
     field public static final java.lang.String COLUMN_SERVICE_TYPE = "service_type";
+    field public static final java.lang.String COLUMN_SYSTEM_APPROVED = "system_approved";
     field public static final java.lang.String COLUMN_TRANSIENT = "transient";
     field public static final java.lang.String COLUMN_TRANSPORT_STREAM_ID = "transport_stream_id";
     field public static final java.lang.String COLUMN_TYPE = "type";
@@ -25686,7 +25887,7 @@
     field public static final java.lang.String CONTENT_DIRECTORY = "logo";
   }
 
-  public static final class TvContract.Programs implements android.media.tv.TvContract.BaseTvColumns {
+  public static final class TvContract.PreviewPrograms implements android.media.tv.TvContract.BaseProgramColumns {
     field public static final java.lang.String ASPECT_RATIO_16_9 = "ASPECT_RATIO_16_9";
     field public static final java.lang.String ASPECT_RATIO_1_1 = "ASPECT_RATIO_1_1";
     field public static final java.lang.String ASPECT_RATIO_2_3 = "ASPECT_RATIO_2_3";
@@ -25694,59 +25895,32 @@
     field public static final java.lang.String AVAILABILITY_AVAILABLE = "AVAILABILITY_AVAILABLE";
     field public static final java.lang.String AVAILABILITY_FREE_WITH_SUBSCRIPTION = "AVAILABILITY_FREE_WITH_SUBSCRIPTION";
     field public static final java.lang.String AVAILABILITY_PAID_CONTENT = "AVAILABILITY_PAID_CONTENT";
-    field public static final java.lang.String COLUMN_AUDIO_LANGUAGE = "audio_language";
+    field public static final java.lang.String COLUMN_APP_LINK_INTENT_URI = "app_link_intent_uri";
     field public static final java.lang.String COLUMN_AUTHOR = "author";
     field public static final java.lang.String COLUMN_AVAILABILITY = "availability";
-    field public static final java.lang.String COLUMN_BROADCAST_GENRE = "broadcast_genre";
-    field public static final java.lang.String COLUMN_CANONICAL_GENRE = "canonical_genre";
-    field public static final java.lang.String COLUMN_CHANNEL_ID = "channel_id";
-    field public static final java.lang.String COLUMN_CONTENT_RATING = "content_rating";
-    field public static final java.lang.String COLUMN_END_TIME_UTC_MILLIS = "end_time_utc_millis";
-    field public static final java.lang.String COLUMN_EPISODE_DISPLAY_NUMBER = "episode_display_number";
-    field public static final deprecated java.lang.String COLUMN_EPISODE_NUMBER = "episode_number";
-    field public static final java.lang.String COLUMN_EPISODE_TITLE = "episode_title";
+    field public static final java.lang.String COLUMN_BROWSABLE = "browsable";
+    field public static final java.lang.String COLUMN_DURATION_MILLIS = "duration_millis";
     field public static final java.lang.String COLUMN_INTERACTION_COUNT = "interaction_count";
     field public static final java.lang.String COLUMN_INTERACTION_TYPE = "interaction_type";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_DATA = "internal_provider_data";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG1 = "internal_provider_flag1";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG2 = "internal_provider_flag2";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG3 = "internal_provider_flag3";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG4 = "internal_provider_flag4";
     field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_ID = "internal_provider_id";
     field public static final java.lang.String COLUMN_ITEM_COUNT = "item_count";
+    field public static final java.lang.String COLUMN_LAST_PLAYBACK_POSITION_MILLIS = "last_playback_position_millis";
     field public static final java.lang.String COLUMN_LIVE = "live";
-    field public static final java.lang.String COLUMN_LOGO = "logo";
-    field public static final java.lang.String COLUMN_LONG_DESCRIPTION = "long_description";
+    field public static final java.lang.String COLUMN_LOGO_URI = "logo_uri";
     field public static final java.lang.String COLUMN_OFFER_PRICE = "offer_price";
     field public static final java.lang.String COLUMN_POSTER_ART_ASPECT_RATIO = "poster_art_aspect_ratio";
-    field public static final java.lang.String COLUMN_POSTER_ART_URI = "poster_art_uri";
-    field public static final java.lang.String COLUMN_PREVIEW_DURATION = "preview_duration";
-    field public static final java.lang.String COLUMN_PREVIEW_INTENT_URI = "preview_intent_uri";
-    field public static final java.lang.String COLUMN_PREVIEW_LAST_PLAYBACK_POSITION = "preview_last_playback_position";
     field public static final java.lang.String COLUMN_PREVIEW_VIDEO_URI = "preview_video_uri";
-    field public static final java.lang.String COLUMN_PREVIEW_WEIGHT = "preview_weight";
-    field public static final java.lang.String COLUMN_RECORDING_PROHIBITED = "recording_prohibited";
     field public static final java.lang.String COLUMN_RELEASE_DATE = "release_date";
     field public static final java.lang.String COLUMN_REVIEW_RATING = "review_rating";
     field public static final java.lang.String COLUMN_REVIEW_RATING_STYLE = "review_rating_style";
-    field public static final java.lang.String COLUMN_SEARCHABLE = "searchable";
-    field public static final java.lang.String COLUMN_SEASON_DISPLAY_NUMBER = "season_display_number";
-    field public static final deprecated java.lang.String COLUMN_SEASON_NUMBER = "season_number";
-    field public static final java.lang.String COLUMN_SEASON_TITLE = "season_title";
-    field public static final java.lang.String COLUMN_SHORT_DESCRIPTION = "short_description";
     field public static final java.lang.String COLUMN_STARTING_PRICE = "starting_price";
-    field public static final java.lang.String COLUMN_START_TIME_UTC_MILLIS = "start_time_utc_millis";
     field public static final java.lang.String COLUMN_THUMBNAIL_ASPECT_RATIO = "poster_thumbnail_aspect_ratio";
-    field public static final java.lang.String COLUMN_THUMBNAIL_URI = "thumbnail_uri";
-    field public static final java.lang.String COLUMN_TITLE = "title";
     field public static final java.lang.String COLUMN_TRANSIENT = "transient";
     field public static final java.lang.String COLUMN_TYPE = "type";
-    field public static final java.lang.String COLUMN_VERSION_NUMBER = "version_number";
-    field public static final java.lang.String COLUMN_VIDEO_HEIGHT = "video_height";
-    field public static final java.lang.String COLUMN_VIDEO_WIDTH = "video_width";
     field public static final java.lang.String COLUMN_WATCH_NEXT_TYPE = "watch_next_type";
-    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/program";
-    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/program";
+    field public static final java.lang.String COLUMN_WEIGHT = "weight";
+    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/preview_program";
+    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/preview_program";
     field public static final android.net.Uri CONTENT_URI;
     field public static final java.lang.String INTERACTION_TYPE_FANS = "INTERACTION_TYPE_FANS";
     field public static final java.lang.String INTERACTION_TYPE_FOLLOWERS = "INTERACTION_TYPE_FOLLOWERS";
@@ -25775,6 +25949,18 @@
     field public static final java.lang.String WATCH_NEXT_TYPE_NEXT = "WATCH_NEXT_TYPE_NEXT";
   }
 
+  public static final class TvContract.Programs implements android.media.tv.TvContract.BaseProgramColumns {
+    field public static final java.lang.String COLUMN_BROADCAST_GENRE = "broadcast_genre";
+    field public static final java.lang.String COLUMN_END_TIME_UTC_MILLIS = "end_time_utc_millis";
+    field public static final deprecated java.lang.String COLUMN_EPISODE_NUMBER = "episode_number";
+    field public static final java.lang.String COLUMN_RECORDING_PROHIBITED = "recording_prohibited";
+    field public static final deprecated java.lang.String COLUMN_SEASON_NUMBER = "season_number";
+    field public static final java.lang.String COLUMN_START_TIME_UTC_MILLIS = "start_time_utc_millis";
+    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/program";
+    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/program";
+    field public static final android.net.Uri CONTENT_URI;
+  }
+
   public static final class TvContract.Programs.Genres {
     method public static java.lang.String[] decode(java.lang.String);
     method public static java.lang.String encode(java.lang.String...);
@@ -25798,37 +25984,15 @@
     field public static final java.lang.String TRAVEL = "TRAVEL";
   }
 
-  public static final class TvContract.RecordedPrograms implements android.media.tv.TvContract.BaseTvColumns {
-    field public static final java.lang.String COLUMN_AUDIO_LANGUAGE = "audio_language";
+  public static final class TvContract.RecordedPrograms implements android.media.tv.TvContract.BaseProgramColumns {
     field public static final java.lang.String COLUMN_BROADCAST_GENRE = "broadcast_genre";
-    field public static final java.lang.String COLUMN_CANONICAL_GENRE = "canonical_genre";
-    field public static final java.lang.String COLUMN_CHANNEL_ID = "channel_id";
-    field public static final java.lang.String COLUMN_CONTENT_RATING = "content_rating";
     field public static final java.lang.String COLUMN_END_TIME_UTC_MILLIS = "end_time_utc_millis";
-    field public static final java.lang.String COLUMN_EPISODE_DISPLAY_NUMBER = "episode_display_number";
-    field public static final java.lang.String COLUMN_EPISODE_TITLE = "episode_title";
     field public static final java.lang.String COLUMN_INPUT_ID = "input_id";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_DATA = "internal_provider_data";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG1 = "internal_provider_flag1";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG2 = "internal_provider_flag2";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG3 = "internal_provider_flag3";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG4 = "internal_provider_flag4";
-    field public static final java.lang.String COLUMN_LONG_DESCRIPTION = "long_description";
-    field public static final java.lang.String COLUMN_POSTER_ART_URI = "poster_art_uri";
     field public static final java.lang.String COLUMN_RECORDING_DATA_BYTES = "recording_data_bytes";
     field public static final java.lang.String COLUMN_RECORDING_DATA_URI = "recording_data_uri";
     field public static final java.lang.String COLUMN_RECORDING_DURATION_MILLIS = "recording_duration_millis";
     field public static final java.lang.String COLUMN_RECORDING_EXPIRE_TIME_UTC_MILLIS = "recording_expire_time_utc_millis";
-    field public static final java.lang.String COLUMN_SEARCHABLE = "searchable";
-    field public static final java.lang.String COLUMN_SEASON_DISPLAY_NUMBER = "season_display_number";
-    field public static final java.lang.String COLUMN_SEASON_TITLE = "season_title";
-    field public static final java.lang.String COLUMN_SHORT_DESCRIPTION = "short_description";
     field public static final java.lang.String COLUMN_START_TIME_UTC_MILLIS = "start_time_utc_millis";
-    field public static final java.lang.String COLUMN_THUMBNAIL_URI = "thumbnail_uri";
-    field public static final java.lang.String COLUMN_TITLE = "title";
-    field public static final java.lang.String COLUMN_VERSION_NUMBER = "version_number";
-    field public static final java.lang.String COLUMN_VIDEO_HEIGHT = "video_height";
-    field public static final java.lang.String COLUMN_VIDEO_WIDTH = "video_width";
     field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/recorded_program";
     field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/recorded_program";
     field public static final android.net.Uri CONTENT_URI;
@@ -25965,11 +26129,13 @@
     field public static final java.lang.String ACTION_BLOCKED_RATINGS_CHANGED = "android.media.tv.action.BLOCKED_RATINGS_CHANGED";
     field public static final java.lang.String ACTION_MAKE_CHANNEL_BROWSABLE = "android.media.tv.action.MAKE_CHANNEL_BROWSABLE";
     field public static final java.lang.String ACTION_PARENTAL_CONTROLS_ENABLED_CHANGED = "android.media.tv.action.PARENTAL_CONTROLS_ENABLED_CHANGED";
+    field public static final java.lang.String ACTION_PROGRAM_BROWSABLE_DISABLED = "android.media.tv.action.PROGRAM_BROWSABLE_DISABLED";
     field public static final java.lang.String ACTION_QUERY_CONTENT_RATING_SYSTEMS = "android.media.tv.action.QUERY_CONTENT_RATING_SYSTEMS";
     field public static final java.lang.String ACTION_SETUP_INPUTS = "android.media.tv.action.SETUP_INPUTS";
     field public static final java.lang.String ACTION_VIEW_RECORDING_SCHEDULES = "android.media.tv.action.VIEW_RECORDING_SCHEDULES";
     field public static final java.lang.String EXTRA_CHANNEL_ID = "android.media.tv.extra.CHANNEL_ID";
     field public static final java.lang.String EXTRA_PACKAGE_NAME = "android.media.tv.extra.PACKAGE_NAME";
+    field public static final java.lang.String EXTRA_PROGRAM_ID = "android.media.tv.extra.PROGRAM_ID";
     field public static final int INPUT_STATE_CONNECTED = 0; // 0x0
     field public static final int INPUT_STATE_CONNECTED_STANDBY = 1; // 0x1
     field public static final int INPUT_STATE_DISCONNECTED = 2; // 0x2
@@ -28104,7 +28270,7 @@
     field public int numScorerOverride;
     field public int numScorerOverrideAndSwitchedNetwork;
     field public java.lang.String preSharedKey;
-    field public int priority;
+    field public deprecated int priority;
     field public java.lang.String providerFriendlyName;
     field public long[] roamingConsortiumIds;
     field public int status;
@@ -28226,11 +28392,14 @@
   }
 
   public static final class WifiEnterpriseConfig.Phase2 {
+    field public static final int AKA = 6; // 0x6
+    field public static final int AKA_PRIME = 7; // 0x7
     field public static final int GTC = 4; // 0x4
     field public static final int MSCHAP = 2; // 0x2
     field public static final int MSCHAPV2 = 3; // 0x3
     field public static final int NONE = 0; // 0x0
     field public static final int PAP = 1; // 0x1
+    field public static final int SIM = 5; // 0x5
   }
 
   public class WifiInfo implements android.os.Parcelable {
@@ -28253,6 +28422,7 @@
 
   public class WifiManager {
     method public int addNetwork(android.net.wifi.WifiConfiguration);
+    method public boolean addOrUpdatePasspointConfiguration(android.net.wifi.hotspot2.PasspointConfiguration);
     method public static int calculateSignalLevel(int, int);
     method public void cancelWps(android.net.wifi.WifiManager.WpsCallback);
     method public static int compareSignalLevel(int, int);
@@ -28268,6 +28438,7 @@
     method public android.net.wifi.WifiInfo getConnectionInfo();
     method public android.net.wifi.WifiConnectionStatistics getConnectionStatistics();
     method public android.net.DhcpInfo getDhcpInfo();
+    method public java.util.List<android.net.wifi.hotspot2.PasspointConfiguration> getPasspointConfigurations();
     method public java.util.List<android.net.wifi.WifiConfiguration> getPrivilegedConfiguredNetworks();
     method public java.util.List<android.net.wifi.ScanResult> getScanResults();
     method public android.net.wifi.WifiConfiguration getWifiApConfiguration();
@@ -28286,12 +28457,13 @@
     method public boolean isWifiApEnabled();
     method public boolean isWifiEnabled();
     method public boolean isWifiScannerSupported();
-    method public boolean pingSupplicant();
+    method public deprecated boolean pingSupplicant();
     method public void queryPasspointIcon(long, java.lang.String);
     method public boolean reassociate();
     method public boolean reconnect();
     method public boolean removeNetwork(int);
-    method public boolean saveConfiguration();
+    method public boolean removePasspointConfiguration(java.lang.String);
+    method public deprecated boolean saveConfiguration();
     method public void setTdlsEnabled(java.net.InetAddress, boolean);
     method public void setTdlsEnabledWithMacAddress(java.lang.String, boolean);
     method public boolean setWifiApConfiguration(android.net.wifi.WifiConfiguration);
@@ -28674,6 +28846,241 @@
 
 }
 
+package android.net.wifi.hotspot2 {
+
+  public final class ConfigParser {
+    method public static android.net.wifi.hotspot2.PasspointConfiguration parsePasspointConfig(java.lang.String, byte[]);
+  }
+
+  public final class PasspointConfiguration implements android.os.Parcelable {
+    ctor public PasspointConfiguration();
+    ctor public PasspointConfiguration(android.net.wifi.hotspot2.PasspointConfiguration);
+    method public int describeContents();
+    method public android.net.wifi.hotspot2.pps.Credential getCredential();
+    method public int getCredentialPriority();
+    method public android.net.wifi.hotspot2.pps.HomeSp getHomeSp();
+    method public android.net.wifi.hotspot2.pps.Policy getPolicy();
+    method public long getSubscriptionCreationTimeInMs();
+    method public long getSubscriptionExpirationTimeInMs();
+    method public java.lang.String getSubscriptionType();
+    method public android.net.wifi.hotspot2.pps.UpdateParameter getSubscriptionUpdate();
+    method public java.util.Map<java.lang.String, byte[]> getTrustRootCertList();
+    method public int getUpdateIdentifier();
+    method public long getUsageLimitDataLimit();
+    method public long getUsageLimitStartTimeInMs();
+    method public long getUsageLimitTimeLimitInMinutes();
+    method public long getUsageLimitUsageTimePeriodInMinutes();
+    method public void setCredential(android.net.wifi.hotspot2.pps.Credential);
+    method public void setCredentialPriority(int);
+    method public void setHomeSp(android.net.wifi.hotspot2.pps.HomeSp);
+    method public void setPolicy(android.net.wifi.hotspot2.pps.Policy);
+    method public void setSubscriptionCreationTimeInMs(long);
+    method public void setSubscriptionExpirationTimeInMs(long);
+    method public void setSubscriptionType(java.lang.String);
+    method public void setSubscriptionUpdate(android.net.wifi.hotspot2.pps.UpdateParameter);
+    method public void setTrustRootCertList(java.util.Map<java.lang.String, byte[]>);
+    method public void setUpdateIdentifier(int);
+    method public void setUsageLimitDataLimit(long);
+    method public void setUsageLimitStartTimeInMs(long);
+    method public void setUsageLimitTimeLimitInMinutes(long);
+    method public void setUsageLimitUsageTimePeriodInMinutes(long);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.PasspointConfiguration> CREATOR;
+  }
+
+}
+
+package android.net.wifi.hotspot2.omadm {
+
+  public final class PpsMoParser {
+    method public static android.net.wifi.hotspot2.PasspointConfiguration parseMoText(java.lang.String);
+  }
+
+}
+
+package android.net.wifi.hotspot2.pps {
+
+  public final class Credential implements android.os.Parcelable {
+    ctor public Credential();
+    ctor public Credential(android.net.wifi.hotspot2.pps.Credential);
+    method public int describeContents();
+    method public java.security.cert.X509Certificate getCaCertificate();
+    method public android.net.wifi.hotspot2.pps.Credential.CertificateCredential getCertCredential();
+    method public boolean getCheckAaaServerCertStatus();
+    method public java.security.cert.X509Certificate[] getClientCertificateChain();
+    method public java.security.PrivateKey getClientPrivateKey();
+    method public long getCreationTimeInMs();
+    method public long getExpirationTimeInMs();
+    method public java.lang.String getRealm();
+    method public android.net.wifi.hotspot2.pps.Credential.SimCredential getSimCredential();
+    method public android.net.wifi.hotspot2.pps.Credential.UserCredential getUserCredential();
+    method public void setCaCertificate(java.security.cert.X509Certificate);
+    method public void setCertCredential(android.net.wifi.hotspot2.pps.Credential.CertificateCredential);
+    method public void setCheckAaaServerCertStatus(boolean);
+    method public void setClientCertificateChain(java.security.cert.X509Certificate[]);
+    method public void setClientPrivateKey(java.security.PrivateKey);
+    method public void setCreationTimeInMs(long);
+    method public void setExpirationTimeInMs(long);
+    method public void setRealm(java.lang.String);
+    method public void setSimCredential(android.net.wifi.hotspot2.pps.Credential.SimCredential);
+    method public void setUserCredential(android.net.wifi.hotspot2.pps.Credential.UserCredential);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.Credential> CREATOR;
+  }
+
+  public static final class Credential.CertificateCredential implements android.os.Parcelable {
+    ctor public Credential.CertificateCredential();
+    ctor public Credential.CertificateCredential(android.net.wifi.hotspot2.pps.Credential.CertificateCredential);
+    method public int describeContents();
+    method public byte[] getCertSha256Fingerprint();
+    method public java.lang.String getCertType();
+    method public void setCertSha256Fingerprint(byte[]);
+    method public void setCertType(java.lang.String);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.Credential.CertificateCredential> CREATOR;
+  }
+
+  public static final class Credential.SimCredential implements android.os.Parcelable {
+    ctor public Credential.SimCredential();
+    ctor public Credential.SimCredential(android.net.wifi.hotspot2.pps.Credential.SimCredential);
+    method public int describeContents();
+    method public int getEapType();
+    method public java.lang.String getImsi();
+    method public void setEapType(int);
+    method public void setImsi(java.lang.String);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.Credential.SimCredential> CREATOR;
+  }
+
+  public static final class Credential.UserCredential implements android.os.Parcelable {
+    ctor public Credential.UserCredential();
+    ctor public Credential.UserCredential(android.net.wifi.hotspot2.pps.Credential.UserCredential);
+    method public int describeContents();
+    method public boolean getAbleToShare();
+    method public int getEapType();
+    method public boolean getMachineManaged();
+    method public java.lang.String getNonEapInnerMethod();
+    method public java.lang.String getPassword();
+    method public java.lang.String getSoftTokenApp();
+    method public java.lang.String getUsername();
+    method public void setAbleToShare(boolean);
+    method public void setEapType(int);
+    method public void setMachineManaged(boolean);
+    method public void setNonEapInnerMethod(java.lang.String);
+    method public void setPassword(java.lang.String);
+    method public void setSoftTokenApp(java.lang.String);
+    method public void setUsername(java.lang.String);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.Credential.UserCredential> CREATOR;
+  }
+
+  public final class HomeSp implements android.os.Parcelable {
+    ctor public HomeSp();
+    ctor public HomeSp(android.net.wifi.hotspot2.pps.HomeSp);
+    method public int describeContents();
+    method public java.lang.String getFqdn();
+    method public java.lang.String getFriendlyName();
+    method public java.util.Map<java.lang.String, java.lang.Long> getHomeNetworkIds();
+    method public java.lang.String getIconUrl();
+    method public long[] getMatchAllOis();
+    method public long[] getMatchAnyOis();
+    method public java.lang.String[] getOtherHomePartners();
+    method public long[] getRoamingConsortiumOis();
+    method public void setFqdn(java.lang.String);
+    method public void setFriendlyName(java.lang.String);
+    method public void setHomeNetworkIds(java.util.Map<java.lang.String, java.lang.Long>);
+    method public void setIconUrl(java.lang.String);
+    method public void setMatchAllOis(long[]);
+    method public void setMatchAnyOis(long[]);
+    method public void setOtherHomePartners(java.lang.String[]);
+    method public void setRoamingConsortiumOis(long[]);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.HomeSp> CREATOR;
+  }
+
+  public final class Policy implements android.os.Parcelable {
+    ctor public Policy();
+    ctor public Policy(android.net.wifi.hotspot2.pps.Policy);
+    method public int describeContents();
+    method public java.lang.String[] getExcludedSsidList();
+    method public int getMaximumBssLoadValue();
+    method public long getMinHomeDownlinkBandwidth();
+    method public long getMinHomeUplinkBandwidth();
+    method public long getMinRoamingDownlinkBandwidth();
+    method public long getMinRoamingUplinkBandwidth();
+    method public android.net.wifi.hotspot2.pps.UpdateParameter getPolicyUpdate();
+    method public java.util.List<android.net.wifi.hotspot2.pps.Policy.RoamingPartner> getPreferredRoamingPartnerList();
+    method public java.util.Map<java.lang.Integer, java.lang.String> getRequiredProtoPortMap();
+    method public void setExcludedSsidList(java.lang.String[]);
+    method public void setMaximumBssLoadValue(int);
+    method public void setMinHomeDownlinkBandwidth(long);
+    method public void setMinHomeUplinkBandwidth(long);
+    method public void setMinRoamingDownlinkBandwidth(long);
+    method public void setMinRoamingUplinkBandwidth(long);
+    method public void setPolicyUpdate(android.net.wifi.hotspot2.pps.UpdateParameter);
+    method public void setPreferredRoamingPartnerList(java.util.List<android.net.wifi.hotspot2.pps.Policy.RoamingPartner>);
+    method public void setRequiredProtoPortMap(java.util.Map<java.lang.Integer, java.lang.String>);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.Policy> CREATOR;
+  }
+
+  public static final class Policy.RoamingPartner implements android.os.Parcelable {
+    ctor public Policy.RoamingPartner();
+    ctor public Policy.RoamingPartner(android.net.wifi.hotspot2.pps.Policy.RoamingPartner);
+    method public int describeContents();
+    method public java.lang.String getCountries();
+    method public java.lang.String getFqdn();
+    method public boolean getFqdnExactMatch();
+    method public int getPriority();
+    method public void setCountries(java.lang.String);
+    method public void setFqdn(java.lang.String);
+    method public void setFqdnExactMatch(boolean);
+    method public void setPriority(int);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.Policy.RoamingPartner> CREATOR;
+  }
+
+  public final class UpdateParameter implements android.os.Parcelable {
+    ctor public UpdateParameter();
+    ctor public UpdateParameter(android.net.wifi.hotspot2.pps.UpdateParameter);
+    method public int describeContents();
+    method public java.lang.String getBase64EncodedPassword();
+    method public java.lang.String getRestriction();
+    method public java.lang.String getServerUri();
+    method public byte[] getTrustRootCertSha256Fingerprint();
+    method public java.lang.String getTrustRootCertUrl();
+    method public long getUpdateIntervalInMinutes();
+    method public java.lang.String getUpdateMethod();
+    method public java.lang.String getUsername();
+    method public void setBase64EncodedPassword(java.lang.String);
+    method public void setRestriction(java.lang.String);
+    method public void setServerUri(java.lang.String);
+    method public void setTrustRootCertSha256Fingerprint(byte[]);
+    method public void setTrustRootCertUrl(java.lang.String);
+    method public void setUpdateIntervalInMinutes(long);
+    method public void setUpdateMethod(java.lang.String);
+    method public void setUsername(java.lang.String);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.UpdateParameter> CREATOR;
+    field public static final long UPDATE_CHECK_INTERVAL_NEVER = 4294967295L; // 0xffffffffL
+    field public static final java.lang.String UPDATE_METHOD_OMADM = "OMA-DM-ClientInitiated";
+    field public static final java.lang.String UPDATE_METHOD_SSP = "SSP-ClientInitiated";
+    field public static final java.lang.String UPDATE_RESTRICTION_HOMESP = "HomeSP";
+    field public static final java.lang.String UPDATE_RESTRICTION_ROAMING_PARTNER = "RoamingPartner";
+    field public static final java.lang.String UPDATE_RESTRICTION_UNRESTRICTED = "Unrestricted";
+  }
+
+}
+
 package android.net.wifi.p2p {
 
   public class WifiP2pConfig implements android.os.Parcelable {
@@ -32228,6 +32635,7 @@
     field public static final int BATTERY_PLUGGED_AC = 1; // 0x1
     field public static final int BATTERY_PLUGGED_USB = 2; // 0x2
     field public static final int BATTERY_PLUGGED_WIRELESS = 4; // 0x4
+    field public static final int BATTERY_PROPERTY_BATTERY_STATUS = 6; // 0x6
     field public static final int BATTERY_PROPERTY_CAPACITY = 4; // 0x4
     field public static final int BATTERY_PROPERTY_CHARGE_COUNTER = 1; // 0x1
     field public static final int BATTERY_PROPERTY_CURRENT_AVERAGE = 3; // 0x3
@@ -33714,6 +34122,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();
@@ -33732,6 +34143,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 {
@@ -38886,26 +39298,44 @@
     ctor public AutoFillService();
     method public final android.os.IBinder onBind(android.content.Intent);
     method public void onConnected();
-    method public void onDatasetAuthenticationRequest(android.os.Bundle, int);
     method public void onDisconnected();
     method public abstract void onFillRequest(android.app.assist.AssistStructure, android.os.Bundle, android.os.CancellationSignal, android.service.autofill.FillCallback);
-    method public void onFillResponseAuthenticationRequest(android.os.Bundle, int);
     method public abstract void onSaveRequest(android.app.assist.AssistStructure, android.os.Bundle, android.service.autofill.SaveCallback);
-    field public static final java.lang.String EXTRA_DATASET_EXTRAS = "android.service.autofill.extra.DATASET_EXTRAS";
-    field public static final java.lang.String EXTRA_RESPONSE_EXTRAS = "android.service.autofill.extra.RESPONSE_EXTRAS";
-    field public static final int FLAG_AUTHENTICATION_ERROR = 4; // 0x4
-    field public static final int FLAG_AUTHENTICATION_REQUESTED = 1; // 0x1
-    field public static final int FLAG_AUTHENTICATION_SUCCESS = 2; // 0x2
-    field public static final int FLAG_FINGERPRINT_AUTHENTICATION_NOT_AVAILABLE = 8; // 0x8
     field public static final java.lang.String SERVICE_INTERFACE = "android.service.autofill.AutoFillService";
     field public static final java.lang.String SERVICE_META_DATA = "android.autofill";
   }
 
+  public final class Dataset implements android.os.Parcelable {
+    method public int describeContents();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.service.autofill.Dataset> CREATOR;
+  }
+
+  public static final class Dataset.Builder {
+    ctor public Dataset.Builder(java.lang.CharSequence);
+    method public android.service.autofill.Dataset build();
+    method public android.service.autofill.Dataset.Builder setAuthentication(android.content.IntentSender);
+    method public android.service.autofill.Dataset.Builder setValue(android.view.autofill.AutoFillId, android.view.autofill.AutoFillValue);
+  }
+
   public final class FillCallback {
-    method public void onDatasetAuthentication(android.view.autofill.Dataset, int);
     method public void onFailure(java.lang.CharSequence);
-    method public void onFillResponseAuthentication(int);
-    method public void onSuccess(android.view.autofill.FillResponse);
+    method public void onSuccess(android.service.autofill.FillResponse);
+  }
+
+  public final class FillResponse implements android.os.Parcelable {
+    method public int describeContents();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.service.autofill.FillResponse> CREATOR;
+  }
+
+  public static final class FillResponse.Builder {
+    ctor public FillResponse.Builder();
+    method public android.service.autofill.FillResponse.Builder addDataset(android.service.autofill.Dataset);
+    method public android.service.autofill.FillResponse.Builder addSavableFields(android.view.autofill.AutoFillId...);
+    method public android.service.autofill.FillResponse build();
+    method public android.service.autofill.FillResponse.Builder setAuthentication(android.content.IntentSender);
+    method public android.service.autofill.FillResponse.Builder setExtras(android.os.Bundle);
   }
 
   public final class SaveCallback {
@@ -39523,6 +39953,7 @@
     method public boolean onKeyUp(int, android.view.KeyEvent);
     method public void onLockscreenShown();
     method public void onLowMemory();
+    method public void onPrepareShow(android.os.Bundle, int);
     method public void onRequestAbortVoice(android.service.voice.VoiceInteractionSession.AbortVoiceRequest);
     method public void onRequestCommand(android.service.voice.VoiceInteractionSession.CommandRequest);
     method public void onRequestCompleteVoice(android.service.voice.VoiceInteractionSession.CompleteVoiceRequest);
@@ -39536,7 +39967,9 @@
     method public void setDisabledShowContext(int);
     method public void setKeepAwake(boolean);
     method public void setTheme(int);
+    method public void setUiEnabled(boolean);
     method public void show(android.os.Bundle, int);
+    method public void startAssistantActivity(android.content.Intent);
     method public void startVoiceActivity(android.content.Intent);
     field public static final int SHOW_SOURCE_ACTIVITY = 16; // 0x10
     field public static final int SHOW_SOURCE_APPLICATION = 8; // 0x8
@@ -42311,6 +42744,8 @@
     method public boolean setRadioPower(boolean);
     method public void setVisualVoicemailEnabled(android.telecom.PhoneAccountHandle, boolean);
     method public boolean setVoiceMailNumber(java.lang.String, java.lang.String);
+    method public void setVoicemailRingtoneUri(android.telecom.PhoneAccountHandle, android.net.Uri);
+    method public void setVoicemailVibrationEnabled(android.telecom.PhoneAccountHandle, boolean);
     method public void silenceRinger();
     method public boolean supplyPin(java.lang.String);
     method public int[] supplyPinReportResult(java.lang.String);
@@ -42379,11 +42814,6 @@
     field public static final int PHONE_TYPE_GSM = 1; // 0x1
     field public static final int PHONE_TYPE_NONE = 0; // 0x0
     field public static final int PHONE_TYPE_SIP = 3; // 0x3
-    field public static final int SIM_ACTIVATION_RESULT_CANCELED = 4; // 0x4
-    field public static final int SIM_ACTIVATION_RESULT_COMPLETE = 0; // 0x0
-    field public static final int SIM_ACTIVATION_RESULT_FAILED = 3; // 0x3
-    field public static final int SIM_ACTIVATION_RESULT_IN_PROGRESS = 2; // 0x2
-    field public static final int SIM_ACTIVATION_RESULT_NOT_SUPPORTED = 1; // 0x1
     field public static final int SIM_STATE_ABSENT = 1; // 0x1
     field public static final int SIM_STATE_CARD_IO_ERROR = 8; // 0x8
     field public static final int SIM_STATE_CARD_RESTRICTED = 9; // 0x9
@@ -43095,6 +43525,7 @@
     method public java.lang.CharSequence getApplicationLabel(android.content.pm.ApplicationInfo);
     method public android.graphics.drawable.Drawable getApplicationLogo(android.content.pm.ApplicationInfo);
     method public android.graphics.drawable.Drawable getApplicationLogo(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
+    method public android.content.pm.ChangedPackages getChangedPackages(int);
     method public int getComponentEnabledSetting(android.content.ComponentName);
     method public android.graphics.drawable.Drawable getDefaultActivityIcon();
     method public java.lang.String getDefaultBrowserPackageNameAsUser(int);
@@ -44089,19 +44520,23 @@
   }
 
   public class DateKeyListener extends android.text.method.NumberKeyListener {
-    ctor public DateKeyListener();
+    ctor public deprecated DateKeyListener();
+    ctor public DateKeyListener(java.util.Locale);
     method protected char[] getAcceptedChars();
     method public int getInputType();
-    method public static android.text.method.DateKeyListener getInstance();
-    field public static final char[] CHARACTERS;
+    method public static deprecated android.text.method.DateKeyListener getInstance();
+    method public static android.text.method.DateKeyListener getInstance(java.util.Locale);
+    field public static final deprecated char[] CHARACTERS;
   }
 
   public class DateTimeKeyListener extends android.text.method.NumberKeyListener {
-    ctor public DateTimeKeyListener();
+    ctor public deprecated DateTimeKeyListener();
+    ctor public DateTimeKeyListener(java.util.Locale);
     method protected char[] getAcceptedChars();
     method public int getInputType();
-    method public static android.text.method.DateTimeKeyListener getInstance();
-    field public static final char[] CHARACTERS;
+    method public static deprecated android.text.method.DateTimeKeyListener getInstance();
+    method public static android.text.method.DateTimeKeyListener getInstance(java.util.Locale);
+    field public static final deprecated char[] CHARACTERS;
   }
 
   public class DialerKeyListener extends android.text.method.NumberKeyListener {
@@ -44113,12 +44548,16 @@
   }
 
   public class DigitsKeyListener extends android.text.method.NumberKeyListener {
-    ctor public DigitsKeyListener();
-    ctor public DigitsKeyListener(boolean, boolean);
+    ctor public deprecated DigitsKeyListener();
+    ctor public deprecated DigitsKeyListener(boolean, boolean);
+    ctor public DigitsKeyListener(java.util.Locale);
+    ctor public DigitsKeyListener(java.util.Locale, boolean, boolean);
     method protected char[] getAcceptedChars();
     method public int getInputType();
-    method public static android.text.method.DigitsKeyListener getInstance();
-    method public static android.text.method.DigitsKeyListener getInstance(boolean, boolean);
+    method public static deprecated android.text.method.DigitsKeyListener getInstance();
+    method public static deprecated android.text.method.DigitsKeyListener getInstance(boolean, boolean);
+    method public static android.text.method.DigitsKeyListener getInstance(java.util.Locale);
+    method public static android.text.method.DigitsKeyListener getInstance(java.util.Locale, boolean, boolean);
     method public static android.text.method.DigitsKeyListener getInstance(java.lang.String);
   }
 
@@ -44262,11 +44701,13 @@
   }
 
   public class TimeKeyListener extends android.text.method.NumberKeyListener {
-    ctor public TimeKeyListener();
+    ctor public deprecated TimeKeyListener();
+    ctor public TimeKeyListener(java.util.Locale);
     method protected char[] getAcceptedChars();
     method public int getInputType();
-    method public static android.text.method.TimeKeyListener getInstance();
-    field public static final char[] CHARACTERS;
+    method public static deprecated android.text.method.TimeKeyListener getInstance();
+    method public static android.text.method.TimeKeyListener getInstance(java.util.Locale);
+    field public static final deprecated char[] CHARACTERS;
   }
 
   public class Touch {
@@ -45116,6 +45557,15 @@
     method public android.transition.TransitionManager inflateTransitionManager(int, android.view.ViewGroup);
   }
 
+  public abstract class TransitionListenerAdapter implements android.transition.Transition.TransitionListener {
+    ctor public TransitionListenerAdapter();
+    method public void onTransitionCancel(android.transition.Transition);
+    method public void onTransitionEnd(android.transition.Transition);
+    method public void onTransitionPause(android.transition.Transition);
+    method public void onTransitionResume(android.transition.Transition);
+    method public void onTransitionStart(android.transition.Transition);
+  }
+
   public class TransitionManager {
     ctor public TransitionManager();
     method public static void beginDelayedTransition(android.view.ViewGroup);
@@ -46898,6 +47348,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 {
@@ -46910,6 +47361,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();
@@ -46917,6 +47369,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();
@@ -46933,6 +47386,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);
@@ -46941,9 +47395,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);
@@ -47110,6 +47566,7 @@
     field public static final int AXIS_RX = 12; // 0xc
     field public static final int AXIS_RY = 13; // 0xd
     field public static final int AXIS_RZ = 14; // 0xe
+    field public static final int AXIS_SCROLL = 26; // 0x1a
     field public static final int AXIS_SIZE = 3; // 0x3
     field public static final int AXIS_THROTTLE = 19; // 0x13
     field public static final int AXIS_TILT = 25; // 0x19
@@ -47433,6 +47890,7 @@
     ctor public View(android.content.Context, android.util.AttributeSet, int);
     ctor public View(android.content.Context, android.util.AttributeSet, int, int);
     method public void addChildrenForAccessibility(java.util.ArrayList<android.view.View>);
+    method public void addExtraDataToAccessibilityNodeInfo(android.view.accessibility.AccessibilityNodeInfo, java.lang.String, android.os.Bundle);
     method public void addFocusables(java.util.ArrayList<android.view.View>, int);
     method public void addFocusables(java.util.ArrayList<android.view.View>, int, int);
     method public void addKeyboardNavigationClusters(java.util.Collection<android.view.View>, int);
@@ -47442,6 +47900,7 @@
     method public android.view.ViewPropertyAnimator animate();
     method public void announceForAccessibility(java.lang.CharSequence);
     method public void autoFill(android.view.autofill.AutoFillValue);
+    method public void autoFillVirtual(int, android.view.autofill.AutoFillValue);
     method protected boolean awakenScrollBars();
     method protected boolean awakenScrollBars(int);
     method protected boolean awakenScrollBars(int, boolean);
@@ -47515,8 +47974,8 @@
     method public void drawableHotspotChanged(float, float);
     method protected void drawableStateChanged();
     method public android.view.View findFocus();
-    method public final <T extends android.view.View> T findViewById(int);
-    method public final <T extends android.view.View> T findViewWithTag(java.lang.Object);
+    method public final android.view.View findViewById(int);
+    method public final android.view.View findViewWithTag(java.lang.Object);
     method public void findViewsWithText(java.util.ArrayList<android.view.View>, java.lang.CharSequence, int);
     method protected deprecated boolean fitSystemWindows(android.graphics.Rect);
     method public android.view.View focusSearch(int);
@@ -47532,7 +47991,7 @@
     method public android.view.animation.Animation getAnimation();
     method public android.os.IBinder getApplicationWindowToken();
     method public android.view.autofill.AutoFillType getAutoFillType();
-    method public android.view.autofill.VirtualViewDelegate getAutoFillVirtualViewDelegate(android.view.autofill.VirtualViewDelegate.Callback);
+    method public android.view.autofill.AutoFillValue getAutoFillValue();
     method public android.graphics.drawable.Drawable getBackground();
     method public android.content.res.ColorStateList getBackgroundTintList();
     method public android.graphics.PorterDuff.Mode getBackgroundTintMode();
@@ -47645,7 +48104,7 @@
     method public java.lang.Object getTag(int);
     method public int getTextAlignment();
     method public int getTextDirection();
-    method public final java.lang.CharSequence getTooltipText();
+    method public java.lang.CharSequence getTooltipText();
     method public final int getTop();
     method protected float getTopFadingEdgeStrength();
     method protected int getTopPaddingOffset();
@@ -47670,6 +48129,7 @@
     method public float getX();
     method public float getY();
     method public float getZ();
+    method public boolean hasExplicitFocusable();
     method public boolean hasFocus();
     method public boolean hasFocusable();
     method public boolean hasNestedScrollingParent();
@@ -47830,7 +48290,7 @@
     method public final void requestUnbufferedDispatch(android.view.MotionEvent);
     method public static int resolveSize(int, int);
     method public static int resolveSizeAndState(int, int, int);
-    method public boolean restoreDefaultFocus(int);
+    method public boolean restoreDefaultFocus();
     method public void restoreHierarchyState(android.util.SparseArray<android.os.Parcelable>);
     method public void saveHierarchyState(android.util.SparseArray<android.os.Parcelable>);
     method public void scheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable, long);
@@ -47950,7 +48410,7 @@
     method public void setTag(int, java.lang.Object);
     method public void setTextAlignment(int);
     method public void setTextDirection(int);
-    method public final void setTooltipText(java.lang.CharSequence);
+    method public void setTooltipText(java.lang.CharSequence);
     method public final void setTop(int);
     method public void setTouchDelegate(android.view.TouchDelegate);
     method public final void setTransitionName(java.lang.String);
@@ -48127,6 +48587,7 @@
 
   public static class View.AccessibilityDelegate {
     ctor public View.AccessibilityDelegate();
+    method public void addExtraDataToAccessibilityNodeInfo(android.view.View, android.view.accessibility.AccessibilityNodeInfo, java.lang.String, android.os.Bundle);
     method public boolean dispatchPopulateAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent);
     method public android.view.accessibility.AccessibilityNodeProvider getAccessibilityNodeProvider(android.view.View);
     method public void onInitializeAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent);
@@ -48656,6 +49117,7 @@
     method public abstract void setTextLines(int[], int[]);
     method public abstract void setTextStyle(float, int, int, int);
     method public abstract void setTransformation(android.graphics.Matrix);
+    method public abstract void setUrl(java.lang.String);
     method public abstract void setVisibility(int);
     field public static final int AUTO_FILL_FLAG_SANITIZED = 1; // 0x1
   }
@@ -49094,6 +49556,7 @@
     field public static final int TYPE_APPLICATION = 2; // 0x2
     field public static final int TYPE_APPLICATION_ATTACHED_DIALOG = 1003; // 0x3eb
     field public static final int TYPE_APPLICATION_MEDIA = 1001; // 0x3e9
+    field public static final int TYPE_APPLICATION_OVERLAY = 2038; // 0x7f6
     field public static final int TYPE_APPLICATION_PANEL = 1000; // 0x3e8
     field public static final int TYPE_APPLICATION_STARTING = 3; // 0x3
     field public static final int TYPE_APPLICATION_SUB_PANEL = 1002; // 0x3ea
@@ -49103,17 +49566,17 @@
     field public static final int TYPE_INPUT_METHOD = 2011; // 0x7db
     field public static final int TYPE_INPUT_METHOD_DIALOG = 2012; // 0x7dc
     field public static final int TYPE_KEYGUARD_DIALOG = 2009; // 0x7d9
-    field public static final int TYPE_PHONE = 2002; // 0x7d2
-    field public static final int TYPE_PRIORITY_PHONE = 2007; // 0x7d7
+    field public static final deprecated int TYPE_PHONE = 2002; // 0x7d2
+    field public static final deprecated int TYPE_PRIORITY_PHONE = 2007; // 0x7d7
     field public static final int TYPE_PRIVATE_PRESENTATION = 2030; // 0x7ee
     field public static final int TYPE_SEARCH_BAR = 2001; // 0x7d1
     field public static final int TYPE_STATUS_BAR = 2000; // 0x7d0
     field public static final int TYPE_STATUS_BAR_PANEL = 2014; // 0x7de
-    field public static final int TYPE_SYSTEM_ALERT = 2003; // 0x7d3
+    field public static final deprecated int TYPE_SYSTEM_ALERT = 2003; // 0x7d3
     field public static final int TYPE_SYSTEM_DIALOG = 2008; // 0x7d8
-    field public static final int TYPE_SYSTEM_ERROR = 2010; // 0x7da
-    field public static final int TYPE_SYSTEM_OVERLAY = 2006; // 0x7d6
-    field public static final int TYPE_TOAST = 2005; // 0x7d5
+    field public static final deprecated int TYPE_SYSTEM_ERROR = 2010; // 0x7da
+    field public static final deprecated int TYPE_SYSTEM_OVERLAY = 2006; // 0x7d6
+    field public static final deprecated int TYPE_TOAST = 2005; // 0x7d5
     field public static final int TYPE_WALLPAPER = 2013; // 0x7dd
     field public float alpha;
     field public float buttonBrightness;
@@ -49249,6 +49712,7 @@
     method public android.view.accessibility.AccessibilityNodeInfo focusSearch(int);
     method public java.util.List<android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction> getActionList();
     method public deprecated int getActions();
+    method public java.util.List<java.lang.String> getAvailableExtraData();
     method public void getBoundsInParent(android.graphics.Rect);
     method public void getBoundsInScreen(android.graphics.Rect);
     method public android.view.accessibility.AccessibilityNodeInfo getChild(int);
@@ -49305,11 +49769,13 @@
     method public boolean performAction(int, android.os.Bundle);
     method public void recycle();
     method public boolean refresh();
+    method public boolean refreshWithExtraData(java.lang.String, android.os.Bundle);
     method public deprecated void removeAction(int);
     method public boolean removeAction(android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction);
     method public boolean removeChild(android.view.View);
     method public boolean removeChild(android.view.View, int);
     method public void setAccessibilityFocused(boolean);
+    method public void setAvailableExtraData(java.util.List<java.lang.String>);
     method public void setBoundsInParent(android.graphics.Rect);
     method public void setBoundsInScreen(android.graphics.Rect);
     method public void setCanOpenPopup(boolean);
@@ -49392,6 +49858,9 @@
     field public static final int ACTION_SET_SELECTION = 131072; // 0x20000
     field public static final int ACTION_SET_TEXT = 2097152; // 0x200000
     field public static final android.os.Parcelable.Creator<android.view.accessibility.AccessibilityNodeInfo> CREATOR;
+    field public static final java.lang.String EXTRA_DATA_TEXT_CHARACTER_LOCATION_ARG_LENGTH = "android.view.accessibility.extra.DATA_TEXT_CHARACTER_LOCATION_ARG_LENGTH";
+    field public static final java.lang.String EXTRA_DATA_TEXT_CHARACTER_LOCATION_ARG_START_INDEX = "android.view.accessibility.extra.DATA_TEXT_CHARACTER_LOCATION_ARG_START_INDEX";
+    field public static final java.lang.String EXTRA_DATA_TEXT_CHARACTER_LOCATION_KEY = "android.view.accessibility.extra.DATA_TEXT_CHARACTER_LOCATION_KEY";
     field public static final int FOCUS_ACCESSIBILITY = 2; // 0x2
     field public static final int FOCUS_INPUT = 1; // 0x1
     field public static final int MOVEMENT_GRANULARITY_CHARACTER = 1; // 0x1
@@ -49473,6 +49942,7 @@
 
   public abstract class AccessibilityNodeProvider {
     ctor public AccessibilityNodeProvider();
+    method public void addExtraDataToAccessibilityNodeInfo(int, android.view.accessibility.AccessibilityNodeInfo, java.lang.String, android.os.Bundle);
     method public android.view.accessibility.AccessibilityNodeInfo createAccessibilityNodeInfo(int);
     method public java.util.List<android.view.accessibility.AccessibilityNodeInfo> findAccessibilityNodeInfosByText(java.lang.String, int);
     method public android.view.accessibility.AccessibilityNodeInfo findFocus(int);
@@ -49883,11 +50353,13 @@
   }
 
   public final class AutoFillManager {
-    method public void onValueChanged(android.view.View, android.view.autofill.AutoFillValue);
-    method public void updateAutoFillInput(android.view.View, int);
-    method public void updateAutoFillInput(android.view.View, int, android.graphics.Rect, int);
-    field public static final int FLAG_UPDATE_UI_HIDE = 2; // 0x2
-    field public static final int FLAG_UPDATE_UI_SHOW = 1; // 0x1
+    method public void focusChanged(android.view.View, boolean);
+    method public void reset();
+    method public void valueChanged(android.view.View);
+    method public void virtualFocusChanged(android.view.View, int, android.graphics.Rect, boolean);
+    method public void virtualValueChanged(android.view.View, int, android.view.autofill.AutoFillValue);
+    field public static final java.lang.String EXTRA_ASSIST_STRUCTURE = "android.view.autofill.extra.ASSIST_STRUCTURE";
+    field public static final java.lang.String EXTRA_AUTHENTICATION_RESULT = "android.view.autofill.extra.AUTHENTICATION_RESULT";
   }
 
   public final class AutoFillType implements android.os.Parcelable {
@@ -49915,49 +50387,6 @@
     field public static final android.os.Parcelable.Creator<android.view.autofill.AutoFillValue> CREATOR;
   }
 
-  public final class Dataset implements android.os.Parcelable {
-    method public int describeContents();
-    method public void writeToParcel(android.os.Parcel, int);
-    field public static final android.os.Parcelable.Creator<android.view.autofill.Dataset> CREATOR;
-  }
-
-  public static final class Dataset.Builder {
-    ctor public Dataset.Builder(java.lang.CharSequence);
-    method public android.view.autofill.Dataset build();
-    method public android.view.autofill.Dataset.Builder requiresCustomAuthentication(android.os.Bundle, int);
-    method public android.view.autofill.Dataset.Builder requiresFingerprintAuthentication(android.hardware.fingerprint.FingerprintManager.CryptoObject, android.os.Bundle, int);
-    method public android.view.autofill.Dataset.Builder setExtras(android.os.Bundle);
-    method public android.view.autofill.Dataset.Builder setValue(android.view.autofill.AutoFillId, android.view.autofill.AutoFillValue);
-  }
-
-  public final class FillResponse implements android.os.Parcelable {
-    method public int describeContents();
-    method public void writeToParcel(android.os.Parcel, int);
-    field public static final android.os.Parcelable.Creator<android.view.autofill.FillResponse> CREATOR;
-  }
-
-  public static final class FillResponse.Builder {
-    ctor public FillResponse.Builder();
-    method public android.view.autofill.FillResponse.Builder addDataset(android.view.autofill.Dataset);
-    method public android.view.autofill.FillResponse.Builder addSavableFields(android.view.autofill.AutoFillId...);
-    method public android.view.autofill.FillResponse build();
-    method public android.view.autofill.FillResponse.Builder requiresCustomAuthentication(android.os.Bundle, int);
-    method public android.view.autofill.FillResponse.Builder requiresFingerprintAuthentication(android.hardware.fingerprint.FingerprintManager.CryptoObject, android.os.Bundle, int);
-    method public android.view.autofill.FillResponse.Builder setExtras(android.os.Bundle);
-  }
-
-  public abstract class VirtualViewDelegate {
-    ctor public VirtualViewDelegate();
-    method public abstract void autoFill(int, android.view.autofill.AutoFillValue);
-  }
-
-  public static abstract class VirtualViewDelegate.Callback {
-    ctor public VirtualViewDelegate.Callback();
-    method public void onAutoFillInputUpdated(int, android.graphics.Rect, int);
-    method public void onNodeRemoved(int...);
-    method public void onValueChanged(int);
-  }
-
 }
 
 package android.view.inputmethod {
@@ -50402,6 +50831,7 @@
     field public static final java.lang.String TYPE_EMAIL = "email";
     field public static final java.lang.String TYPE_OTHER = "other";
     field public static final java.lang.String TYPE_PHONE = "phone";
+    field public static final java.lang.String TYPE_URL = "url";
   }
 
   public static abstract class TextClassifier.EntityType implements java.lang.annotation.Annotation {
@@ -53814,6 +54244,7 @@
     method public int getAutoSizeMaxTextSize();
     method public int getAutoSizeMinTextSize();
     method public int getAutoSizeStepGranularity();
+    method public int[] getAutoSizeTextAvailableSizes();
     method public int getAutoSizeTextType();
     method public int getBreakStrategy();
     method public int getCompoundDrawablePadding();
@@ -53927,6 +54358,7 @@
     method public void setAutoSizeMaxTextSize(int, float);
     method public void setAutoSizeMinTextSize(int, float);
     method public void setAutoSizeStepGranularity(int, float);
+    method public void setAutoSizeTextPresetSizes(int[]);
     method public void setAutoSizeTextType(int);
     method public void setBreakStrategy(int);
     method public void setCompoundDrawablePadding(int);
@@ -54020,7 +54452,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 {
@@ -54060,6 +54492,7 @@
     method public void setIs24HourView(java.lang.Boolean);
     method public void setMinute(int);
     method public void setOnTimeChangedListener(android.widget.TimePicker.OnTimeChangedListener);
+    method public boolean validateInput();
   }
 
   public static abstract interface TimePicker.OnTimeChangedListener {
@@ -54458,6 +54891,8 @@
     field public static final int OP_INVOKE_INTERFACE = 114; // 0x72
     field public static final int OP_INVOKE_INTERFACE_JUMBO = 9983; // 0x26ff
     field public static final int OP_INVOKE_INTERFACE_RANGE = 120; // 0x78
+    field public static final int OP_INVOKE_POLYMORPHIC = 250; // 0xfa
+    field public static final int OP_INVOKE_POLYMORPHIC_RANGE = 251; // 0xfb
     field public static final int OP_INVOKE_STATIC = 113; // 0x71
     field public static final int OP_INVOKE_STATIC_JUMBO = 9727; // 0x25ff
     field public static final int OP_INVOKE_STATIC_RANGE = 119; // 0x77
@@ -55857,6 +56292,13 @@
     field public static final java.lang.Class<java.lang.Boolean> TYPE;
   }
 
+  public class BootstrapMethodError extends java.lang.LinkageError {
+    ctor public BootstrapMethodError();
+    ctor public BootstrapMethodError(java.lang.String);
+    ctor public BootstrapMethodError(java.lang.String, java.lang.Throwable);
+    ctor public BootstrapMethodError(java.lang.Throwable);
+  }
+
   public final class Byte extends java.lang.Number implements java.lang.Comparable {
     ctor public Byte(byte);
     ctor public Byte(java.lang.String) throws java.lang.NumberFormatException;
@@ -57743,6 +58185,21 @@
 
 package java.lang.invoke {
 
+  public abstract class CallSite {
+    method public abstract java.lang.invoke.MethodHandle dynamicInvoker();
+    method public abstract java.lang.invoke.MethodHandle getTarget();
+    method public abstract void setTarget(java.lang.invoke.MethodHandle);
+    method public java.lang.invoke.MethodType type();
+  }
+
+  public class ConstantCallSite extends java.lang.invoke.CallSite {
+    ctor public ConstantCallSite(java.lang.invoke.MethodHandle);
+    ctor protected ConstantCallSite(java.lang.invoke.MethodType, java.lang.invoke.MethodHandle) throws java.lang.Throwable;
+    method public final java.lang.invoke.MethodHandle dynamicInvoker();
+    method public final java.lang.invoke.MethodHandle getTarget();
+    method public final void setTarget(java.lang.invoke.MethodHandle);
+  }
+
   public class LambdaConversionException extends java.lang.Exception {
     ctor public LambdaConversionException();
     ctor public LambdaConversionException(java.lang.String);
@@ -57752,12 +58209,15 @@
   }
 
   public abstract class MethodHandle {
+    method public java.lang.invoke.MethodHandle asCollector(java.lang.Class<?>, int);
     method public java.lang.invoke.MethodHandle asFixedArity();
+    method public java.lang.invoke.MethodHandle asSpreader(java.lang.Class<?>, int);
     method public java.lang.invoke.MethodHandle asType(java.lang.invoke.MethodType);
     method public java.lang.invoke.MethodHandle asVarargsCollector(java.lang.Class<?>);
     method public java.lang.invoke.MethodHandle bindTo(java.lang.Object);
     method public final java.lang.Object invoke(java.lang.Object...) throws java.lang.Throwable;
     method public final java.lang.Object invokeExact(java.lang.Object...) throws java.lang.Throwable;
+    method public java.lang.Object invokeWithArguments(java.lang.Object...) throws java.lang.Throwable;
     method public java.lang.Object invokeWithArguments(java.util.List<?>) throws java.lang.Throwable;
     method public boolean isVarargsCollector();
     method public java.lang.invoke.MethodType type();
@@ -57791,17 +58251,23 @@
     method public static java.lang.invoke.MethodHandle arrayElementGetter(java.lang.Class<?>) throws java.lang.IllegalArgumentException;
     method public static java.lang.invoke.MethodHandle arrayElementSetter(java.lang.Class<?>) throws java.lang.IllegalArgumentException;
     method public static java.lang.invoke.MethodHandle catchException(java.lang.invoke.MethodHandle, java.lang.Class<? extends java.lang.Throwable>, java.lang.invoke.MethodHandle);
+    method public static java.lang.invoke.MethodHandle collectArguments(java.lang.invoke.MethodHandle, int, java.lang.invoke.MethodHandle);
     method public static java.lang.invoke.MethodHandle constant(java.lang.Class<?>, java.lang.Object);
     method public static java.lang.invoke.MethodHandle dropArguments(java.lang.invoke.MethodHandle, int, java.util.List<java.lang.Class<?>>);
     method public static java.lang.invoke.MethodHandle dropArguments(java.lang.invoke.MethodHandle, int, java.lang.Class<?>...);
     method public static java.lang.invoke.MethodHandle exactInvoker(java.lang.invoke.MethodType);
+    method public static java.lang.invoke.MethodHandle filterArguments(java.lang.invoke.MethodHandle, int, java.lang.invoke.MethodHandle...);
     method public static java.lang.invoke.MethodHandle filterReturnValue(java.lang.invoke.MethodHandle, java.lang.invoke.MethodHandle);
+    method public static java.lang.invoke.MethodHandle foldArguments(java.lang.invoke.MethodHandle, java.lang.invoke.MethodHandle);
     method public static java.lang.invoke.MethodHandle guardWithTest(java.lang.invoke.MethodHandle, java.lang.invoke.MethodHandle, java.lang.invoke.MethodHandle);
     method public static java.lang.invoke.MethodHandle identity(java.lang.Class<?>);
+    method public static java.lang.invoke.MethodHandle insertArguments(java.lang.invoke.MethodHandle, int, java.lang.Object...);
     method public static java.lang.invoke.MethodHandle invoker(java.lang.invoke.MethodType);
     method public static java.lang.invoke.MethodHandles.Lookup lookup();
     method public static java.lang.invoke.MethodHandle permuteArguments(java.lang.invoke.MethodHandle, java.lang.invoke.MethodType, int...);
     method public static java.lang.invoke.MethodHandles.Lookup publicLookup();
+    method public static <T extends java.lang.reflect.Member> T reflectAs(java.lang.Class<T>, java.lang.invoke.MethodHandle);
+    method public static java.lang.invoke.MethodHandle spreadInvoker(java.lang.invoke.MethodType, int);
     method public static java.lang.invoke.MethodHandle throwException(java.lang.Class<?>, java.lang.Class<? extends java.lang.Throwable>);
   }
 
@@ -57818,7 +58284,7 @@
     method public java.lang.invoke.MethodHandles.Lookup in(java.lang.Class<?>);
     method public java.lang.Class<?> lookupClass();
     method public int lookupModes();
-    method public void throwMakeAccessException(java.lang.String, java.lang.Object) throws java.lang.IllegalAccessException;
+    method public java.lang.invoke.MethodHandleInfo revealDirect(java.lang.invoke.MethodHandle);
     method public java.lang.invoke.MethodHandle unreflect(java.lang.reflect.Method) throws java.lang.IllegalAccessException;
     method public java.lang.invoke.MethodHandle unreflectConstructor(java.lang.reflect.Constructor<?>) throws java.lang.IllegalAccessException;
     method public java.lang.invoke.MethodHandle unreflectGetter(java.lang.reflect.Field) throws java.lang.IllegalAccessException;
@@ -57861,6 +58327,22 @@
     method public java.lang.invoke.MethodType wrap();
   }
 
+  public class MutableCallSite extends java.lang.invoke.CallSite {
+    ctor public MutableCallSite(java.lang.invoke.MethodType);
+    ctor public MutableCallSite(java.lang.invoke.MethodHandle);
+    method public final java.lang.invoke.MethodHandle dynamicInvoker();
+    method public final java.lang.invoke.MethodHandle getTarget();
+    method public void setTarget(java.lang.invoke.MethodHandle);
+  }
+
+  public class VolatileCallSite extends java.lang.invoke.CallSite {
+    ctor public VolatileCallSite(java.lang.invoke.MethodType);
+    ctor public VolatileCallSite(java.lang.invoke.MethodHandle);
+    method public final java.lang.invoke.MethodHandle dynamicInvoker();
+    method public final java.lang.invoke.MethodHandle getTarget();
+    method public void setTarget(java.lang.invoke.MethodHandle);
+  }
+
   public class WrongMethodTypeException extends java.lang.RuntimeException {
     ctor public WrongMethodTypeException();
     ctor public WrongMethodTypeException(java.lang.String);
diff --git a/api/test-current.txt b/api/test-current.txt
index 896c142..cd7ba58 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";
@@ -118,6 +120,8 @@
     field public static final java.lang.String REQUEST_IGNORE_BATTERY_OPTIMIZATIONS = "android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS";
     field public static final java.lang.String REQUEST_INSTALL_PACKAGES = "android.permission.REQUEST_INSTALL_PACKAGES";
     field public static final deprecated java.lang.String RESTART_PACKAGES = "android.permission.RESTART_PACKAGES";
+    field public static final java.lang.String RESTRICTED_VR_ACCESS = "android.permission.RESTRICTED_VR_ACCESS";
+    field public static final java.lang.String RUN_IN_BACKGROUND = "android.permission.RUN_IN_BACKGROUND";
     field public static final java.lang.String SEND_RESPOND_VIA_MESSAGE = "android.permission.SEND_RESPOND_VIA_MESSAGE";
     field public static final java.lang.String SEND_SMS = "android.permission.SEND_SMS";
     field public static final java.lang.String SET_ALARM = "com.android.alarm.permission.SET_ALARM";
@@ -136,6 +140,7 @@
     field public static final java.lang.String TRANSMIT_IR = "android.permission.TRANSMIT_IR";
     field public static final java.lang.String UNINSTALL_SHORTCUT = "com.android.launcher.permission.UNINSTALL_SHORTCUT";
     field public static final java.lang.String UPDATE_DEVICE_STATS = "android.permission.UPDATE_DEVICE_STATS";
+    field public static final java.lang.String USE_DATA_IN_BACKGROUND = "android.permission.USE_DATA_IN_BACKGROUND";
     field public static final java.lang.String USE_FINGERPRINT = "android.permission.USE_FINGERPRINT";
     field public static final java.lang.String USE_SIP = "android.permission.USE_SIP";
     field public static final java.lang.String VIBRATE = "android.permission.VIBRATE";
@@ -203,7 +208,6 @@
 
   public static final class R.attr {
     ctor public R.attr();
-    field public static final int __removed0 = 16844097; // 0x1010541
     field public static final int __removed1 = 16844099; // 0x1010543
     field public static final int absListViewStyle = 16842858; // 0x101006a
     field public static final int accessibilityEventTypes = 16843648; // 0x1010380
@@ -269,6 +273,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 +303,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
@@ -598,6 +603,8 @@
     field public static final int font = 16844082; // 0x1010532
     field public static final int fontFamily = 16843692; // 0x10103ac
     field public static final int fontFeatureSettings = 16843959; // 0x10104b7
+    field public static final int fontProviderAuthority = 16844114; // 0x1010552
+    field public static final int fontProviderQuery = 16844115; // 0x1010553
     field public static final int fontStyle = 16844081; // 0x1010531
     field public static final int fontWeight = 16844083; // 0x1010533
     field public static final int footerDividersEnabled = 16843311; // 0x101022f
@@ -923,6 +930,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
@@ -1270,6 +1278,7 @@
     field public static final int targetId = 16843740; // 0x10103dc
     field public static final int targetName = 16843853; // 0x101044d
     field public static final int targetPackage = 16842785; // 0x1010021
+    field public static final int targetProcess = 16844097; // 0x1010541
     field public static final int targetSandboxVersion = 16844110; // 0x101054e
     field public static final int targetSdkVersion = 16843376; // 0x1010270
     field public static final int taskAffinity = 16842770; // 0x1010012
@@ -2688,11 +2697,25 @@
 
 package android.accessibilityservice {
 
+  public final class AccessibilityButtonController {
+    method public boolean isAccessibilityButtonAvailable();
+    method public void registerAccessibilityButtonCallback(android.accessibilityservice.AccessibilityButtonController.AccessibilityButtonCallback);
+    method public void registerAccessibilityButtonCallback(android.accessibilityservice.AccessibilityButtonController.AccessibilityButtonCallback, android.os.Handler);
+    method public void unregisterAccessibilityButtonCallback(android.accessibilityservice.AccessibilityButtonController.AccessibilityButtonCallback);
+  }
+
+  public static abstract class AccessibilityButtonController.AccessibilityButtonCallback {
+    ctor public AccessibilityButtonController.AccessibilityButtonCallback();
+    method public void onAvailabilityChanged(android.accessibilityservice.AccessibilityButtonController, boolean);
+    method public void onClicked(android.accessibilityservice.AccessibilityButtonController);
+  }
+
   public abstract class AccessibilityService extends android.app.Service {
     ctor public AccessibilityService();
     method public final void disableSelf();
     method public final boolean dispatchGesture(android.accessibilityservice.GestureDescription, android.accessibilityservice.AccessibilityService.GestureResultCallback, android.os.Handler);
     method public android.view.accessibility.AccessibilityNodeInfo findFocus(int);
+    method public final android.accessibilityservice.AccessibilityButtonController getAccessibilityButtonController();
     method public final android.accessibilityservice.FingerprintGestureController getFingerprintGestureController();
     method public final android.accessibilityservice.AccessibilityService.MagnificationController getMagnificationController();
     method public android.view.accessibility.AccessibilityNodeInfo getRootInActiveWindow();
@@ -2805,6 +2828,7 @@
     field public static final int FLAG_ENABLE_ACCESSIBILITY_VOLUME = 128; // 0x80
     field public static final int FLAG_INCLUDE_NOT_IMPORTANT_VIEWS = 2; // 0x2
     field public static final int FLAG_REPORT_VIEW_IDS = 16; // 0x10
+    field public static final int FLAG_REQUEST_ACCESSIBILITY_BUTTON = 256; // 0x100
     field public static final int FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 8; // 0x8
     field public static final int FLAG_REQUEST_FILTER_KEY_EVENTS = 32; // 0x20
     field public static final int FLAG_REQUEST_TOUCH_EXPLORATION_MODE = 4; // 0x4
@@ -2909,7 +2933,7 @@
   public class AccountManager {
     method public android.accounts.AccountManagerFuture<android.os.Bundle> addAccount(java.lang.String, java.lang.String, java.lang.String[], android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
     method public boolean addAccountExplicitly(android.accounts.Account, java.lang.String, android.os.Bundle);
-    method public boolean addAccountExplicitly(android.accounts.Account, java.lang.String, android.os.Bundle, java.util.Map<java.lang.Integer, java.lang.Integer>);
+    method public boolean addAccountExplicitly(android.accounts.Account, java.lang.String, android.os.Bundle, java.util.Map<java.lang.String, java.lang.Integer>);
     method public void addOnAccountsUpdatedListener(android.accounts.OnAccountsUpdateListener, android.os.Handler, boolean);
     method public void addOnAccountsUpdatedListener(android.accounts.OnAccountsUpdateListener, android.os.Handler, boolean, java.lang.String[]);
     method public java.lang.String blockingGetAuthToken(android.accounts.Account, java.lang.String, boolean) throws android.accounts.AuthenticatorException, java.io.IOException, android.accounts.OperationCanceledException;
@@ -2918,7 +2942,7 @@
     method public android.accounts.AccountManagerFuture<android.os.Bundle> editProperties(java.lang.String, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
     method public android.accounts.AccountManagerFuture<android.os.Bundle> finishSession(android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
     method public static android.accounts.AccountManager get(android.content.Context);
-    method public int getAccountVisibility(android.accounts.Account, int);
+    method public int getAccountVisibility(android.accounts.Account, java.lang.String);
     method public android.accounts.Account[] getAccounts();
     method public java.util.Map<android.accounts.Account, java.lang.Integer> getAccountsAndVisibilityForPackage(java.lang.String, java.lang.String);
     method public android.accounts.Account[] getAccountsByType(java.lang.String);
@@ -2929,9 +2953,9 @@
     method public android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, java.lang.String, android.os.Bundle, boolean, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
     method public android.accounts.AccountManagerFuture<android.os.Bundle> getAuthTokenByFeatures(java.lang.String, java.lang.String, java.lang.String[], android.app.Activity, android.os.Bundle, android.os.Bundle, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
     method public android.accounts.AuthenticatorDescription[] getAuthenticatorTypes();
+    method public java.util.Map<java.lang.String, java.lang.Integer> getPackagesAndVisibilityForAccount(android.accounts.Account);
     method public java.lang.String getPassword(android.accounts.Account);
     method public java.lang.String getPreviousName(android.accounts.Account);
-    method public java.util.Map<java.lang.Integer, java.lang.Integer> getUidsAndVisibilityForAccount(android.accounts.Account);
     method public java.lang.String getUserData(android.accounts.Account, java.lang.String);
     method public android.accounts.AccountManagerFuture<java.lang.Boolean> hasFeatures(android.accounts.Account, java.lang.String[], android.accounts.AccountManagerCallback<java.lang.Boolean>, android.os.Handler);
     method public void invalidateAuthToken(java.lang.String, java.lang.String);
@@ -2945,7 +2969,7 @@
     method public boolean removeAccountExplicitly(android.accounts.Account);
     method public void removeOnAccountsUpdatedListener(android.accounts.OnAccountsUpdateListener);
     method public android.accounts.AccountManagerFuture<android.accounts.Account> renameAccount(android.accounts.Account, java.lang.String, android.accounts.AccountManagerCallback<android.accounts.Account>, android.os.Handler);
-    method public boolean setAccountVisibility(android.accounts.Account, int, int);
+    method public boolean setAccountVisibility(android.accounts.Account, java.lang.String, int);
     method public void setAuthToken(android.accounts.Account, java.lang.String, java.lang.String);
     method public void setPassword(android.accounts.Account, java.lang.String);
     method public void setUserData(android.accounts.Account, java.lang.String, java.lang.String);
@@ -2985,8 +3009,8 @@
     field public static final java.lang.String KEY_PASSWORD = "password";
     field public static final java.lang.String KEY_USERDATA = "userdata";
     field public static final deprecated java.lang.String LOGIN_ACCOUNTS_CHANGED_ACTION = "android.accounts.LOGIN_ACCOUNTS_CHANGED";
-    field public static final int UID_KEY_DEFAULT_LEGACY_VISIBILITY = -3; // 0xfffffffd
-    field public static final int UID_KEY_DEFAULT_VISIBILITY = -2; // 0xfffffffe
+    field public static final java.lang.String PACKAGE_NAME_KEY_LEGACY_NOT_VISIBLE = "android.accounts.key_legacy_not_visible";
+    field public static final java.lang.String PACKAGE_NAME_KEY_LEGACY_VISIBLE = "android.accounts.key_legacy_visible";
     field public static final int VISIBILITY_NOT_VISIBLE = 3; // 0x3
     field public static final int VISIBILITY_UNDEFINED = 0; // 0x0
     field public static final int VISIBILITY_USER_MANAGED_NOT_VISIBLE = 4; // 0x4
@@ -3121,6 +3145,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();
@@ -4181,7 +4206,6 @@
     method public abstract void onActivityCreated(android.app.Activity, android.os.Bundle);
     method public abstract void onActivityDestroyed(android.app.Activity);
     method public abstract void onActivityPaused(android.app.Activity);
-    method public default void onActivityPreCreated(android.app.Activity, android.os.Bundle);
     method public abstract void onActivityResumed(android.app.Activity);
     method public abstract void onActivitySaveInstanceState(android.app.Activity, android.os.Bundle);
     method public abstract void onActivityStarted(android.app.Activity);
@@ -4815,6 +4839,7 @@
     method public void addMonitor(android.app.Instrumentation.ActivityMonitor);
     method public android.app.Instrumentation.ActivityMonitor addMonitor(android.content.IntentFilter, android.app.Instrumentation.ActivityResult, boolean);
     method public android.app.Instrumentation.ActivityMonitor addMonitor(java.lang.String, android.app.Instrumentation.ActivityResult, boolean);
+    method public void addResults(android.os.Bundle);
     method public void callActivityOnCreate(android.app.Activity, android.os.Bundle);
     method public void callActivityOnCreate(android.app.Activity, android.os.Bundle, android.os.PersistableBundle);
     method public void callActivityOnDestroy(android.app.Activity);
@@ -4839,6 +4864,7 @@
     method public android.os.Bundle getBinderCounts();
     method public android.content.ComponentName getComponentName();
     method public android.content.Context getContext();
+    method public java.lang.String getProcessName();
     method public android.content.Context getTargetContext();
     method public android.app.UiAutomation getUiAutomation();
     method public android.app.UiAutomation getUiAutomation(int);
@@ -5055,14 +5081,19 @@
     ctor public Notification(android.os.Parcel);
     method public android.app.Notification clone();
     method public int describeContents();
+    method public int getBadgeIcon();
     method public java.lang.String getChannel();
     method public java.lang.String getGroup();
     method public android.graphics.drawable.Icon getLargeIcon();
+    method public java.lang.String getShortcutId();
     method public android.graphics.drawable.Icon getSmallIcon();
     method public java.lang.String getSortKey();
     method public long getTimeout();
     method public void writeToParcel(android.os.Parcel, int);
     field public static final android.media.AudioAttributes AUDIO_ATTRIBUTES_DEFAULT;
+    field public static final int BADGE_ICON_LARGE = 2; // 0x2
+    field public static final int BADGE_ICON_NONE = 0; // 0x0
+    field public static final int BADGE_ICON_SMALL = 1; // 0x1
     field public static final java.lang.String CATEGORY_ALARM = "alarm";
     field public static final java.lang.String CATEGORY_CALL = "call";
     field public static final java.lang.String CATEGORY_EMAIL = "email";
@@ -5087,6 +5118,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";
@@ -5154,7 +5186,7 @@
     field public deprecated int ledARGB;
     field public deprecated int ledOffMS;
     field public deprecated int ledOnMS;
-    field public deprecated int number;
+    field public int number;
     field public deprecated int priority;
     field public android.app.Notification publicVersion;
     field public deprecated android.net.Uri sound;
@@ -5242,6 +5274,7 @@
     method public android.app.Notification.Builder addExtras(android.os.Bundle);
     method public android.app.Notification.Builder addPerson(java.lang.String);
     method public android.app.Notification build();
+    method public android.app.Notification.Builder chooseBadgeIcon(int);
     method public android.widget.RemoteViews createBigContentView();
     method public android.widget.RemoteViews createContentView();
     method public android.widget.RemoteViews createHeadsUpContentView();
@@ -5274,13 +5307,14 @@
     method public android.app.Notification.Builder setLargeIcon(android.graphics.drawable.Icon);
     method public deprecated android.app.Notification.Builder setLights(int, int, int);
     method public android.app.Notification.Builder setLocalOnly(boolean);
-    method public deprecated android.app.Notification.Builder setNumber(int);
+    method public android.app.Notification.Builder setNumber(int);
     method public android.app.Notification.Builder setOngoing(boolean);
     method public android.app.Notification.Builder setOnlyAlertOnce(boolean);
     method public deprecated android.app.Notification.Builder setPriority(int);
     method public android.app.Notification.Builder setProgress(int, int, boolean);
     method public android.app.Notification.Builder setPublicVersion(android.app.Notification);
     method public android.app.Notification.Builder setRemoteInputHistory(java.lang.CharSequence[]);
+    method public android.app.Notification.Builder setShortcutId(java.lang.String);
     method public android.app.Notification.Builder setShowWhen(boolean);
     method public android.app.Notification.Builder setSmallIcon(int);
     method public android.app.Notification.Builder setSmallIcon(int, int);
@@ -5458,11 +5492,13 @@
     method public boolean canBypassDnd();
     method public boolean canShowBadge();
     method public int describeContents();
+    method public void enableLights(boolean);
     method public void enableVibration(boolean);
     method public android.media.AudioAttributes getAudioAttributes();
     method public java.lang.String getGroup();
     method public java.lang.String getId();
     method public int getImportance();
+    method public int getLightColor();
     method public int getLockscreenVisibility();
     method public java.lang.CharSequence getName();
     method public android.net.Uri getSound();
@@ -5470,7 +5506,7 @@
     method public void setBypassDnd(boolean);
     method public void setGroup(java.lang.String);
     method public void setImportance(int);
-    method public void setLights(boolean);
+    method public void setLightColor(int);
     method public void setLockscreenVisibility(int);
     method public void setShowBadge(boolean);
     method public void setSound(android.net.Uri, android.media.AudioAttributes);
@@ -5485,6 +5521,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();
@@ -5653,10 +5690,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);
@@ -5665,10 +5701,11 @@
   }
 
   public final class RemoteAction implements android.os.Parcelable {
-    ctor public RemoteAction(android.graphics.drawable.Icon, java.lang.CharSequence, java.lang.CharSequence, android.app.RemoteAction.OnActionListener);
+    ctor public RemoteAction(android.graphics.drawable.Icon, java.lang.CharSequence, java.lang.CharSequence, android.app.PendingIntent);
     method public android.app.RemoteAction clone();
     method public int describeContents();
     method public void dump(java.lang.String, java.io.PrintWriter);
+    method public android.app.PendingIntent getActionIntent();
     method public java.lang.CharSequence getContentDescription();
     method public android.graphics.drawable.Icon getIcon();
     method public java.lang.CharSequence getTitle();
@@ -5676,10 +5713,6 @@
     field public static final android.os.Parcelable.Creator<android.app.RemoteAction> CREATOR;
   }
 
-  public static abstract interface RemoteAction.OnActionListener {
-    method public abstract void onAction(android.app.RemoteAction);
-  }
-
   public final class RemoteInput implements android.os.Parcelable {
     method public static void addDataResultToIntent(android.app.RemoteInput, android.content.Intent, java.util.Map<java.lang.String, android.net.Uri>);
     method public static void addResultsToIntent(android.app.RemoteInput[], android.content.Intent, android.os.Bundle);
@@ -6186,6 +6219,7 @@
     method public void clearDeviceOwnerApp(java.lang.String);
     method public void clearPackagePersistentPreferredActivities(android.content.ComponentName, java.lang.String);
     method public void clearProfileOwner(android.content.ComponentName);
+    method public boolean clearResetPasswordToken(android.content.ComponentName);
     method public void clearUserRestriction(android.content.ComponentName, java.lang.String);
     method public android.content.Intent createAdminSupportIntent(java.lang.String);
     method public android.os.UserHandle createAndManageUser(android.content.ComponentName, java.lang.String, android.content.ComponentName, android.os.PersistableBundle, int);
@@ -6215,6 +6249,7 @@
     method public long getLastBugReportRequestTime();
     method public long getLastNetworkLogRetrievalTime();
     method public long getLastSecurityLogRetrievalTime();
+    method public java.lang.String[] getLockTaskPackages(android.content.ComponentName);
     method public java.lang.CharSequence getLongSupportMessage(android.content.ComponentName);
     method public int getMaximumFailedPasswordsForWipe(android.content.ComponentName);
     method public long getMaximumTimeToLock(android.content.ComponentName);
@@ -6266,6 +6301,7 @@
     method public boolean isPackageSuspended(android.content.ComponentName, java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
     method public boolean isProfileOwnerApp(java.lang.String);
     method public boolean isProvisioningAllowed(java.lang.String);
+    method public boolean isResetPasswordTokenActive(android.content.ComponentName);
     method public boolean isSecurityLoggingEnabled(android.content.ComponentName);
     method public boolean isUninstallBlocked(android.content.ComponentName, java.lang.String);
     method public void lockNow();
@@ -6277,6 +6313,7 @@
     method public boolean removeUser(android.content.ComponentName, android.os.UserHandle);
     method public boolean requestBugreport(android.content.ComponentName);
     method public boolean resetPassword(java.lang.String, int);
+    method public boolean resetPasswordWithToken(android.content.ComponentName, java.lang.String, byte[], int);
     method public java.util.List<android.app.admin.NetworkEvent> retrieveNetworkLogs(android.content.ComponentName, long);
     method public java.util.List<android.app.admin.SecurityLog.SecurityEvent> retrievePreRebootSecurityLogs(android.content.ComponentName);
     method public java.util.List<android.app.admin.SecurityLog.SecurityEvent> retrieveSecurityLogs(android.content.ComponentName);
@@ -6325,6 +6362,7 @@
     method public void setProfileName(android.content.ComponentName, java.lang.String);
     method public void setRecommendedGlobalProxy(android.content.ComponentName, android.net.ProxyInfo);
     method public void setRequiredStrongAuthTimeout(android.content.ComponentName, long);
+    method public boolean setResetPasswordToken(android.content.ComponentName, byte[]);
     method public void setRestrictionsProvider(android.content.ComponentName, android.content.ComponentName);
     method public void setScreenCaptureDisabled(android.content.ComponentName, boolean);
     method public void setSecureSetting(android.content.ComponentName, java.lang.String, java.lang.String);
@@ -6340,6 +6378,8 @@
     method public void uninstallAllUserCaCerts(android.content.ComponentName);
     method public void uninstallCaCert(android.content.ComponentName, byte[]);
     method public void wipeData(int);
+    field public static final java.lang.String ACCOUNT_FEATURE_DEVICE_OR_PROFILE_OWNER_ALLOWED = "android.account.DEVICE_OR_PROFILE_OWNER_ALLOWED";
+    field public static final java.lang.String ACCOUNT_FEATURE_DEVICE_OR_PROFILE_OWNER_DISALLOWED = "android.account.DEVICE_OR_PROFILE_OWNER_DISALLOWED";
     field public static final java.lang.String ACTION_ADD_DEVICE_ADMIN = "android.app.action.ADD_DEVICE_ADMIN";
     field public static final java.lang.String ACTION_APPLICATION_DELEGATION_SCOPES_CHANGED = "android.app.action.APPLICATION_DELEGATION_SCOPES_CHANGED";
     field public static final java.lang.String ACTION_DEVICE_OWNER_CHANGED = "android.app.action.DEVICE_OWNER_CHANGED";
@@ -6559,6 +6599,7 @@
     method public int getTextStyle();
     method public int getTop();
     method public android.graphics.Matrix getTransformation();
+    method public java.lang.String getUrl();
     method public int getVisibility();
     method public int getWidth();
     method public boolean isAccessibilityFocused();
@@ -6597,6 +6638,7 @@
   public abstract class BackupAgent extends android.content.ContextWrapper {
     ctor public BackupAgent();
     method public final void fullBackupFile(java.io.File, android.app.backup.FullBackupDataOutput);
+    method public long getBackupQuota();
     method public abstract void onBackup(android.os.ParcelFileDescriptor, android.app.backup.BackupDataOutput, android.os.ParcelFileDescriptor) throws java.io.IOException;
     method public void onCreate();
     method public void onDestroy();
@@ -7965,6 +8007,65 @@
 
 }
 
+package android.companion {
+
+  public final class AssociationRequest<F extends android.companion.DeviceFilter> implements android.os.Parcelable {
+    method public int describeContents();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.companion.AssociationRequest> CREATOR;
+  }
+
+  public static final class AssociationRequest.Builder<F extends android.companion.DeviceFilter> {
+    method public android.companion.AssociationRequest<F> build();
+    method public static android.companion.AssociationRequest.Builder<android.companion.BluetoothDeviceFilter> createForBluetoothDevice();
+    method public static android.companion.AssociationRequest.Builder<android.companion.BluetoothLEDeviceFilter> createForBluetoothLEDevice();
+    method public android.companion.AssociationRequest.Builder<F> setDeviceFilter(F);
+    method public android.companion.AssociationRequest.Builder<F> setSingleDevice(boolean);
+  }
+
+  public final class BluetoothDeviceFilter implements android.companion.DeviceFilter {
+    method public int describeContents();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.companion.BluetoothDeviceFilter> CREATOR;
+  }
+
+  public static final class BluetoothDeviceFilter.Builder {
+    ctor public BluetoothDeviceFilter.Builder();
+    method public android.companion.BluetoothDeviceFilter.Builder addServiceUuid(android.os.ParcelUuid, android.os.ParcelUuid);
+    method public android.companion.BluetoothDeviceFilter build();
+    method public android.companion.BluetoothDeviceFilter.Builder setAddress(java.lang.String);
+    method public android.companion.BluetoothDeviceFilter.Builder setNamePattern(java.util.regex.Pattern);
+  }
+
+  public final class BluetoothLEDeviceFilter implements android.companion.DeviceFilter {
+    method public int describeContents();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.companion.BluetoothLEDeviceFilter> CREATOR;
+  }
+
+  public static final class BluetoothLEDeviceFilter.Builder {
+    ctor public BluetoothLEDeviceFilter.Builder();
+    method public android.companion.BluetoothLEDeviceFilter build();
+    method public android.companion.BluetoothLEDeviceFilter.Builder setNamePattern(java.util.regex.Pattern);
+    method public android.companion.BluetoothLEDeviceFilter.Builder setScanFilter(android.bluetooth.le.ScanFilter);
+  }
+
+  public final class CompanionDeviceManager {
+    method public void associate(android.companion.AssociationRequest<?>, android.companion.CompanionDeviceManager.Callback, android.os.Handler);
+    field public static final java.lang.String EXTRA_DEVICE = "android.companion.extra.DEVICE";
+  }
+
+  public static abstract class CompanionDeviceManager.Callback {
+    ctor public CompanionDeviceManager.Callback();
+    method public abstract void onDeviceFound(android.content.IntentSender);
+    method public abstract void onFailure(java.lang.CharSequence);
+  }
+
+  public abstract interface DeviceFilter<D extends android.os.Parcelable> implements android.os.Parcelable {
+  }
+
+}
+
 package android.content {
 
   public abstract class AbstractThreadedSyncAdapter {
@@ -8579,6 +8680,7 @@
     field public static final java.lang.String CAPTIONING_SERVICE = "captioning";
     field public static final java.lang.String CARRIER_CONFIG_SERVICE = "carrier_config";
     field public static final java.lang.String CLIPBOARD_SERVICE = "clipboard";
+    field public static final java.lang.String COMPANION_DEVICE_SERVICE = "companion_device";
     field public static final java.lang.String CONNECTIVITY_SERVICE = "connectivity";
     field public static final java.lang.String CONSUMER_IR_SERVICE = "consumer_ir";
     field public static final int CONTEXT_IGNORE_SECURITY = 2; // 0x2
@@ -9153,7 +9255,7 @@
     field public static final java.lang.String EXTRA_PHONE_NUMBER = "android.intent.extra.PHONE_NUMBER";
     field public static final java.lang.String EXTRA_PROCESS_TEXT = "android.intent.extra.PROCESS_TEXT";
     field public static final java.lang.String EXTRA_PROCESS_TEXT_READONLY = "android.intent.extra.PROCESS_TEXT_READONLY";
-    field public static final java.lang.String EXTRA_QUICK_VIEW_PLAIN = "android.intent.extra.QUICK_VIEW_PLAIN";
+    field public static final java.lang.String EXTRA_QUICK_VIEW_ADVANCED = "android.intent.extra.QUICK_VIEW_ADVANCED";
     field public static final java.lang.String EXTRA_QUIET_MODE = "android.intent.extra.QUIET_MODE";
     field public static final java.lang.String EXTRA_REFERRER = "android.intent.extra.REFERRER";
     field public static final java.lang.String EXTRA_REFERRER_NAME = "android.intent.extra.REFERRER_NAME";
@@ -9860,6 +9962,15 @@
     method public final int compare(android.content.pm.ApplicationInfo, android.content.pm.ApplicationInfo);
   }
 
+  public final class ChangedPackages implements android.os.Parcelable {
+    ctor public ChangedPackages(int, java.util.List<java.lang.String>);
+    method public int describeContents();
+    method public java.util.List<java.lang.String> getPackageNames();
+    method public int getSequenceNumber();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.content.pm.ChangedPackages> CREATOR;
+  }
+
   public class ComponentInfo extends android.content.pm.PackageItemInfo {
     ctor public ComponentInfo();
     ctor public ComponentInfo(android.content.pm.ComponentInfo);
@@ -9932,6 +10043,7 @@
     field public java.lang.String[] splitPublicSourceDirs;
     field public java.lang.String[] splitSourceDirs;
     field public java.lang.String targetPackage;
+    field public java.lang.String targetProcess;
   }
 
   public class LabeledIntent extends android.content.Intent {
@@ -10206,6 +10318,7 @@
     method public abstract java.lang.CharSequence getApplicationLabel(android.content.pm.ApplicationInfo);
     method public abstract android.graphics.drawable.Drawable getApplicationLogo(android.content.pm.ApplicationInfo);
     method public abstract android.graphics.drawable.Drawable getApplicationLogo(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
+    method public abstract android.content.pm.ChangedPackages getChangedPackages(int);
     method public abstract int getComponentEnabledSetting(android.content.ComponentName);
     method public abstract android.graphics.drawable.Drawable getDefaultActivityIcon();
     method public abstract java.lang.String getDefaultBrowserPackageNameAsUser(int);
@@ -10357,6 +10470,7 @@
     field public static final java.lang.String FEATURE_VERIFIED_BOOT = "android.software.verified_boot";
     field public static final java.lang.String FEATURE_VR_MODE = "android.software.vr.mode";
     field public static final java.lang.String FEATURE_VR_MODE_HIGH_PERFORMANCE = "android.hardware.vr.high_performance";
+    field public static final java.lang.String FEATURE_VULKAN_HARDWARE_COMPUTE = "android.hardware.vulkan.compute";
     field public static final java.lang.String FEATURE_VULKAN_HARDWARE_LEVEL = "android.hardware.vulkan.level";
     field public static final java.lang.String FEATURE_VULKAN_HARDWARE_VERSION = "android.hardware.vulkan.version";
     field public static final java.lang.String FEATURE_WATCH = "android.hardware.type.watch";
@@ -12183,6 +12297,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;
@@ -12238,13 +12353,18 @@
   public class Canvas {
     ctor public Canvas();
     ctor public Canvas(android.graphics.Bitmap);
-    method public boolean clipPath(android.graphics.Path, android.graphics.Region.Op);
+    method public boolean clipOutPath(android.graphics.Path);
+    method public boolean clipOutRect(android.graphics.RectF);
+    method public boolean clipOutRect(android.graphics.Rect);
+    method public boolean clipOutRect(float, float, float, float);
+    method public boolean clipOutRect(int, int, int, int);
+    method public deprecated boolean clipPath(android.graphics.Path, android.graphics.Region.Op);
     method public boolean clipPath(android.graphics.Path);
-    method public boolean clipRect(android.graphics.RectF, android.graphics.Region.Op);
-    method public boolean clipRect(android.graphics.Rect, android.graphics.Region.Op);
+    method public deprecated boolean clipRect(android.graphics.RectF, android.graphics.Region.Op);
+    method public deprecated boolean clipRect(android.graphics.Rect, android.graphics.Region.Op);
     method public boolean clipRect(android.graphics.RectF);
     method public boolean clipRect(android.graphics.Rect);
-    method public boolean clipRect(float, float, float, float, android.graphics.Region.Op);
+    method public deprecated boolean clipRect(float, float, float, float, android.graphics.Region.Op);
     method public boolean clipRect(float, float, float, float);
     method public boolean clipRect(int, int, int, int);
     method public void concat(android.graphics.Matrix);
@@ -12312,14 +12432,14 @@
     method public void rotate(float);
     method public final void rotate(float, float, float);
     method public int save();
-    method public int save(int);
-    method public int saveLayer(android.graphics.RectF, android.graphics.Paint, int);
+    method public deprecated int save(int);
+    method public deprecated int saveLayer(android.graphics.RectF, android.graphics.Paint, int);
     method public int saveLayer(android.graphics.RectF, android.graphics.Paint);
-    method public int saveLayer(float, float, float, float, android.graphics.Paint, int);
+    method public deprecated int saveLayer(float, float, float, float, android.graphics.Paint, int);
     method public int saveLayer(float, float, float, float, android.graphics.Paint);
-    method public int saveLayerAlpha(android.graphics.RectF, int, int);
+    method public deprecated int saveLayerAlpha(android.graphics.RectF, int, int);
     method public int saveLayerAlpha(android.graphics.RectF, int);
-    method public int saveLayerAlpha(float, float, float, float, int, int);
+    method public deprecated int saveLayerAlpha(float, float, float, float, int, int);
     method public int saveLayerAlpha(float, float, float, float, int);
     method public void scale(float, float);
     method public final void scale(float, float, float, float);
@@ -12330,11 +12450,11 @@
     method public void skew(float, float);
     method public void translate(float, float);
     field public static final int ALL_SAVE_FLAG = 31; // 0x1f
-    field public static final int CLIP_SAVE_FLAG = 2; // 0x2
-    field public static final int CLIP_TO_LAYER_SAVE_FLAG = 16; // 0x10
-    field public static final int FULL_COLOR_LAYER_SAVE_FLAG = 8; // 0x8
-    field public static final int HAS_ALPHA_LAYER_SAVE_FLAG = 4; // 0x4
-    field public static final int MATRIX_SAVE_FLAG = 1; // 0x1
+    field public static final deprecated int CLIP_SAVE_FLAG = 2; // 0x2
+    field public static final deprecated int CLIP_TO_LAYER_SAVE_FLAG = 16; // 0x10
+    field public static final deprecated int FULL_COLOR_LAYER_SAVE_FLAG = 8; // 0x8
+    field public static final deprecated int HAS_ALPHA_LAYER_SAVE_FLAG = 4; // 0x4
+    field public static final deprecated int MATRIX_SAVE_FLAG = 1; // 0x1
   }
 
   public static final class Canvas.EdgeType extends java.lang.Enum {
@@ -13711,6 +13831,7 @@
     method public static android.graphics.drawable.Icon createWithContentUri(android.net.Uri);
     method public static android.graphics.drawable.Icon createWithData(byte[], int, int);
     method public static android.graphics.drawable.Icon createWithFilePath(java.lang.String);
+    method public static android.graphics.drawable.Icon createWithMaskableBitmap(android.graphics.Bitmap);
     method public static android.graphics.drawable.Icon createWithResource(android.content.Context, int);
     method public static android.graphics.drawable.Icon createWithResource(java.lang.String, int);
     method public int describeContents();
@@ -13794,20 +13915,19 @@
   }
 
   public class MaskableIconDrawable extends android.graphics.drawable.Drawable implements android.graphics.drawable.Drawable.Callback {
-    ctor public MaskableIconDrawable(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable);
     method public void draw(android.graphics.Canvas);
     method public android.graphics.drawable.Drawable getBackground();
+    method public static float getExtraInsetPercentage();
     method public android.graphics.drawable.Drawable getForeground();
     method public android.graphics.Path getIconMask();
     method public int getOpacity();
+    method public android.graphics.Region getSafeZone();
     method public void invalidateDrawable(android.graphics.drawable.Drawable);
     method public void scheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable, long);
     method public void setAlpha(int);
     method public void setColorFilter(android.graphics.ColorFilter);
     method public void setOpacity(int);
     method public void unscheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable);
-    field public static final float DEFAULT_VIEW_PORT_SCALE = 0.6666667f;
-    field public static final float MASK_SIZE = 100.0f;
   }
 
   public class NinePatchDrawable extends android.graphics.drawable.Drawable {
@@ -14366,6 +14486,7 @@
     field public static final java.lang.String STRING_TYPE_HEART_RATE = "android.sensor.heart_rate";
     field public static final java.lang.String STRING_TYPE_LIGHT = "android.sensor.light";
     field public static final java.lang.String STRING_TYPE_LINEAR_ACCELERATION = "android.sensor.linear_acceleration";
+    field public static final java.lang.String STRING_TYPE_LOW_LATENCY_OFFBODY_DETECT = "android.sensor.low_latency_offbody";
     field public static final java.lang.String STRING_TYPE_MAGNETIC_FIELD = "android.sensor.magnetic_field";
     field public static final java.lang.String STRING_TYPE_MAGNETIC_FIELD_UNCALIBRATED = "android.sensor.magnetic_field_uncalibrated";
     field public static final java.lang.String STRING_TYPE_MOTION_DETECT = "android.sensor.motion_detect";
@@ -14394,6 +14515,7 @@
     field public static final int TYPE_HEART_RATE = 21; // 0x15
     field public static final int TYPE_LIGHT = 5; // 0x5
     field public static final int TYPE_LINEAR_ACCELERATION = 10; // 0xa
+    field public static final int TYPE_LOW_LATENCY_OFFBODY_DETECT = 34; // 0x22
     field public static final int TYPE_MAGNETIC_FIELD = 2; // 0x2
     field public static final int TYPE_MAGNETIC_FIELD_UNCALIBRATED = 14; // 0xe
     field public static final int TYPE_MOTION_DETECT = 30; // 0x1e
@@ -20533,6 +20655,7 @@
     method public int getContentType();
     method public int getFlags();
     method public int getUsage();
+    method public static int getVolumeControlStream(android.media.AudioAttributes);
     method public void writeToParcel(android.os.Parcel, int);
     field public static final int CONTENT_TYPE_MOVIE = 3; // 0x3
     field public static final int CONTENT_TYPE_MUSIC = 2; // 0x2
@@ -20704,7 +20827,7 @@
     method public int getStreamMaxVolume(int);
     method public int getStreamVolume(int);
     method public deprecated int getVibrateSetting(int);
-    method public boolean isBluetoothA2dpOn();
+    method public deprecated boolean isBluetoothA2dpOn();
     method public boolean isBluetoothScoAvailableOffCall();
     method public boolean isBluetoothScoOn();
     method public boolean isMicrophoneMute();
@@ -21993,6 +22116,7 @@
     method public boolean advance();
     method public long getCachedDuration();
     method public android.media.DrmInitData getDrmInitData();
+    method public android.os.Bundle getMetrics();
     method public java.util.Map<java.util.UUID, byte[]> getPsshInfo();
     method public boolean getSampleCryptoInfo(android.media.MediaCodec.CryptoInfo);
     method public int getSampleFlags();
@@ -22255,6 +22379,7 @@
   }
 
   public static final class MediaMuxer.OutputFormat {
+    field public static final int MUXER_OUTPUT_3GPP = 2; // 0x2
     field public static final int MUXER_OUTPUT_MPEG_4 = 0; // 0x0
     field public static final int MUXER_OUTPUT_WEBM = 1; // 0x1
   }
@@ -22293,7 +22418,7 @@
     method public void pause() throws java.lang.IllegalStateException;
     method public void prepare() throws java.io.IOException, java.lang.IllegalStateException;
     method public void prepareAsync() throws java.lang.IllegalStateException;
-    method public void prepareDrm(java.util.UUID, android.media.MediaPlayer.OnDrmConfigCallback) throws android.media.MediaPlayer.ProvisioningErrorException, android.media.ResourceBusyException, android.media.UnsupportedSchemeException;
+    method public void prepareDrm(java.util.UUID) throws android.media.MediaPlayer.ProvisioningErrorException, android.media.ResourceBusyException, android.media.UnsupportedSchemeException;
     method public byte[] provideKeyResponse(byte[], byte[]) throws android.media.DeniedByServerException, android.media.MediaPlayer.NoDrmSchemeException;
     method public void release();
     method public void releaseDrm() throws android.media.MediaPlayer.NoDrmSchemeException;
@@ -22308,6 +22433,7 @@
     method public void setAuxEffectSendLevel(float);
     method public void setBufferingParams(android.media.BufferingParams);
     method public void setDataSource(android.content.Context, android.net.Uri) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.SecurityException;
+    method public void setDataSource(android.content.Context, android.net.Uri, java.util.Map<java.lang.String, java.lang.String>, java.util.List<java.net.HttpCookie>) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.SecurityException;
     method public void setDataSource(android.content.Context, android.net.Uri, java.util.Map<java.lang.String, java.lang.String>) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.SecurityException;
     method public void setDataSource(java.lang.String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.SecurityException;
     method public void setDataSource(android.content.res.AssetFileDescriptor) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
@@ -22320,6 +22446,7 @@
     method public void setNextMediaPlayer(android.media.MediaPlayer);
     method public void setOnBufferingUpdateListener(android.media.MediaPlayer.OnBufferingUpdateListener);
     method public void setOnCompletionListener(android.media.MediaPlayer.OnCompletionListener);
+    method public void setOnDrmConfigListener(android.media.MediaPlayer.OnDrmConfigListener);
     method public void setOnDrmInfoListener(android.media.MediaPlayer.OnDrmInfoListener);
     method public void setOnDrmInfoListener(android.media.MediaPlayer.OnDrmInfoListener, android.os.Handler);
     method public void setOnDrmPreparedListener(android.media.MediaPlayer.OnDrmPreparedListener);
@@ -22384,9 +22511,8 @@
     method public abstract void onCompletion(android.media.MediaPlayer);
   }
 
-  public static abstract class MediaPlayer.OnDrmConfigCallback {
-    ctor public MediaPlayer.OnDrmConfigCallback();
-    method public void onDrmConfig(android.media.MediaPlayer);
+  public static abstract interface MediaPlayer.OnDrmConfigListener {
+    method public abstract void onDrmConfig(android.media.MediaPlayer);
   }
 
   public static abstract interface MediaPlayer.OnDrmInfoListener {
@@ -23675,6 +23801,8 @@
 
   public final class MediaController {
     ctor public MediaController(android.content.Context, android.media.session.MediaSession.Token);
+    method public void addQueueItem(android.media.MediaDescription);
+    method public void addQueueItem(android.media.MediaDescription, int);
     method public void adjustVolume(int, int);
     method public boolean dispatchMediaButtonEvent(android.view.KeyEvent);
     method public android.os.Bundle getExtras();
@@ -23693,6 +23821,8 @@
     method public boolean isShuffleModeEnabled();
     method public void registerCallback(android.media.session.MediaController.Callback);
     method public void registerCallback(android.media.session.MediaController.Callback, android.os.Handler);
+    method public void removeQueueItem(android.media.MediaDescription);
+    method public void removeQueueItemAt(int);
     method public void sendCommand(java.lang.String, android.os.Bundle, android.os.ResultReceiver);
     method public void setVolumeTo(int, int);
     method public void unregisterCallback(android.media.session.MediaController.Callback);
@@ -23770,11 +23900,14 @@
     method public void setSessionActivity(android.app.PendingIntent);
     method public void setShuffleModeEnabled(boolean);
     field public static final int FLAG_HANDLES_MEDIA_BUTTONS = 1; // 0x1
+    field public static final int FLAG_HANDLES_QUEUE_COMMANDS = 4; // 0x4
     field public static final int FLAG_HANDLES_TRANSPORT_CONTROLS = 2; // 0x2
   }
 
   public static abstract class MediaSession.Callback {
     ctor public MediaSession.Callback();
+    method public void onAddQueueItem(android.media.MediaDescription);
+    method public void onAddQueueItem(android.media.MediaDescription, int);
     method public void onCommand(java.lang.String, android.os.Bundle, android.os.ResultReceiver);
     method public void onCustomAction(java.lang.String, android.os.Bundle);
     method public void onFastForward();
@@ -23788,6 +23921,8 @@
     method public void onPrepareFromMediaId(java.lang.String, android.os.Bundle);
     method public void onPrepareFromSearch(java.lang.String, android.os.Bundle);
     method public void onPrepareFromUri(android.net.Uri, android.os.Bundle);
+    method public void onRemoveQueueItem(android.media.MediaDescription);
+    method public void onRemoveQueueItemAt(int);
     method public void onRewind();
     method public void onSeekTo(long);
     method public void onSetRating(android.media.Rating);
@@ -23932,6 +24067,9 @@
     method public static final android.net.Uri buildChannelUriForPassthroughInput(java.lang.String);
     method public static final android.net.Uri buildChannelsUriForInput(java.lang.String);
     method public static final java.lang.String buildInputId(android.content.ComponentName);
+    method public static final android.net.Uri buildPreviewProgramUri(long);
+    method public static final android.net.Uri buildPreviewProgramsUriForChannel(long);
+    method public static final android.net.Uri buildPreviewProgramsUriForChannel(android.net.Uri);
     method public static final android.net.Uri buildProgramUri(long);
     method public static final android.net.Uri buildProgramsUriForChannel(long);
     method public static final android.net.Uri buildProgramsUriForChannel(android.net.Uri);
@@ -23945,6 +24083,31 @@
     field public static final java.lang.String AUTHORITY = "android.media.tv";
   }
 
+  public static abstract interface TvContract.BaseProgramColumns implements android.media.tv.TvContract.BaseTvColumns {
+    field public static final java.lang.String COLUMN_AUDIO_LANGUAGE = "audio_language";
+    field public static final java.lang.String COLUMN_CANONICAL_GENRE = "canonical_genre";
+    field public static final java.lang.String COLUMN_CHANNEL_ID = "channel_id";
+    field public static final java.lang.String COLUMN_CONTENT_RATING = "content_rating";
+    field public static final java.lang.String COLUMN_EPISODE_DISPLAY_NUMBER = "episode_display_number";
+    field public static final java.lang.String COLUMN_EPISODE_TITLE = "episode_title";
+    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_DATA = "internal_provider_data";
+    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG1 = "internal_provider_flag1";
+    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG2 = "internal_provider_flag2";
+    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG3 = "internal_provider_flag3";
+    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG4 = "internal_provider_flag4";
+    field public static final java.lang.String COLUMN_LONG_DESCRIPTION = "long_description";
+    field public static final java.lang.String COLUMN_POSTER_ART_URI = "poster_art_uri";
+    field public static final java.lang.String COLUMN_SEARCHABLE = "searchable";
+    field public static final java.lang.String COLUMN_SEASON_DISPLAY_NUMBER = "season_display_number";
+    field public static final java.lang.String COLUMN_SEASON_TITLE = "season_title";
+    field public static final java.lang.String COLUMN_SHORT_DESCRIPTION = "short_description";
+    field public static final java.lang.String COLUMN_THUMBNAIL_URI = "thumbnail_uri";
+    field public static final java.lang.String COLUMN_TITLE = "title";
+    field public static final java.lang.String COLUMN_VERSION_NUMBER = "version_number";
+    field public static final java.lang.String COLUMN_VIDEO_HEIGHT = "video_height";
+    field public static final java.lang.String COLUMN_VIDEO_WIDTH = "video_width";
+  }
+
   public static abstract interface TvContract.BaseTvColumns implements android.provider.BaseColumns {
     field public static final java.lang.String COLUMN_PACKAGE_NAME = "package_name";
   }
@@ -23960,6 +24123,7 @@
     field public static final java.lang.String COLUMN_DISPLAY_NAME = "display_name";
     field public static final java.lang.String COLUMN_DISPLAY_NUMBER = "display_number";
     field public static final java.lang.String COLUMN_INPUT_ID = "input_id";
+    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_ID = "internal_provider_id";
     field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_DATA = "internal_provider_data";
     field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG1 = "internal_provider_flag1";
     field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG2 = "internal_provider_flag2";
@@ -24027,7 +24191,7 @@
     field public static final java.lang.String CONTENT_DIRECTORY = "logo";
   }
 
-  public static final class TvContract.Programs implements android.media.tv.TvContract.BaseTvColumns {
+  public static final class TvContract.PreviewPrograms implements android.media.tv.TvContract.BaseProgramColumns {
     field public static final java.lang.String ASPECT_RATIO_16_9 = "ASPECT_RATIO_16_9";
     field public static final java.lang.String ASPECT_RATIO_1_1 = "ASPECT_RATIO_1_1";
     field public static final java.lang.String ASPECT_RATIO_2_3 = "ASPECT_RATIO_2_3";
@@ -24035,58 +24199,31 @@
     field public static final java.lang.String AVAILABILITY_AVAILABLE = "AVAILABILITY_AVAILABLE";
     field public static final java.lang.String AVAILABILITY_FREE_WITH_SUBSCRIPTION = "AVAILABILITY_FREE_WITH_SUBSCRIPTION";
     field public static final java.lang.String AVAILABILITY_PAID_CONTENT = "AVAILABILITY_PAID_CONTENT";
-    field public static final java.lang.String COLUMN_AUDIO_LANGUAGE = "audio_language";
+    field public static final java.lang.String COLUMN_APP_LINK_INTENT_URI = "app_link_intent_uri";
     field public static final java.lang.String COLUMN_AUTHOR = "author";
     field public static final java.lang.String COLUMN_AVAILABILITY = "availability";
-    field public static final java.lang.String COLUMN_BROADCAST_GENRE = "broadcast_genre";
-    field public static final java.lang.String COLUMN_CANONICAL_GENRE = "canonical_genre";
-    field public static final java.lang.String COLUMN_CHANNEL_ID = "channel_id";
-    field public static final java.lang.String COLUMN_CONTENT_RATING = "content_rating";
-    field public static final java.lang.String COLUMN_END_TIME_UTC_MILLIS = "end_time_utc_millis";
-    field public static final java.lang.String COLUMN_EPISODE_DISPLAY_NUMBER = "episode_display_number";
-    field public static final deprecated java.lang.String COLUMN_EPISODE_NUMBER = "episode_number";
-    field public static final java.lang.String COLUMN_EPISODE_TITLE = "episode_title";
+    field public static final java.lang.String COLUMN_BROWSABLE = "browsable";
+    field public static final java.lang.String COLUMN_DURATION_MILLIS = "duration_millis";
     field public static final java.lang.String COLUMN_INTERACTION_COUNT = "interaction_count";
     field public static final java.lang.String COLUMN_INTERACTION_TYPE = "interaction_type";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_DATA = "internal_provider_data";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG1 = "internal_provider_flag1";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG2 = "internal_provider_flag2";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG3 = "internal_provider_flag3";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG4 = "internal_provider_flag4";
     field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_ID = "internal_provider_id";
     field public static final java.lang.String COLUMN_ITEM_COUNT = "item_count";
+    field public static final java.lang.String COLUMN_LAST_PLAYBACK_POSITION_MILLIS = "last_playback_position_millis";
     field public static final java.lang.String COLUMN_LIVE = "live";
-    field public static final java.lang.String COLUMN_LOGO = "logo";
-    field public static final java.lang.String COLUMN_LONG_DESCRIPTION = "long_description";
+    field public static final java.lang.String COLUMN_LOGO_URI = "logo_uri";
     field public static final java.lang.String COLUMN_OFFER_PRICE = "offer_price";
     field public static final java.lang.String COLUMN_POSTER_ART_ASPECT_RATIO = "poster_art_aspect_ratio";
-    field public static final java.lang.String COLUMN_POSTER_ART_URI = "poster_art_uri";
-    field public static final java.lang.String COLUMN_PREVIEW_DURATION = "preview_duration";
-    field public static final java.lang.String COLUMN_PREVIEW_INTENT_URI = "preview_intent_uri";
-    field public static final java.lang.String COLUMN_PREVIEW_LAST_PLAYBACK_POSITION = "preview_last_playback_position";
     field public static final java.lang.String COLUMN_PREVIEW_VIDEO_URI = "preview_video_uri";
-    field public static final java.lang.String COLUMN_PREVIEW_WEIGHT = "preview_weight";
-    field public static final java.lang.String COLUMN_RECORDING_PROHIBITED = "recording_prohibited";
     field public static final java.lang.String COLUMN_RELEASE_DATE = "release_date";
     field public static final java.lang.String COLUMN_REVIEW_RATING = "review_rating";
     field public static final java.lang.String COLUMN_REVIEW_RATING_STYLE = "review_rating_style";
-    field public static final java.lang.String COLUMN_SEARCHABLE = "searchable";
-    field public static final java.lang.String COLUMN_SEASON_DISPLAY_NUMBER = "season_display_number";
-    field public static final deprecated java.lang.String COLUMN_SEASON_NUMBER = "season_number";
-    field public static final java.lang.String COLUMN_SEASON_TITLE = "season_title";
-    field public static final java.lang.String COLUMN_SHORT_DESCRIPTION = "short_description";
     field public static final java.lang.String COLUMN_STARTING_PRICE = "starting_price";
-    field public static final java.lang.String COLUMN_START_TIME_UTC_MILLIS = "start_time_utc_millis";
     field public static final java.lang.String COLUMN_THUMBNAIL_ASPECT_RATIO = "poster_thumbnail_aspect_ratio";
-    field public static final java.lang.String COLUMN_THUMBNAIL_URI = "thumbnail_uri";
-    field public static final java.lang.String COLUMN_TITLE = "title";
     field public static final java.lang.String COLUMN_TYPE = "type";
-    field public static final java.lang.String COLUMN_VERSION_NUMBER = "version_number";
-    field public static final java.lang.String COLUMN_VIDEO_HEIGHT = "video_height";
-    field public static final java.lang.String COLUMN_VIDEO_WIDTH = "video_width";
     field public static final java.lang.String COLUMN_WATCH_NEXT_TYPE = "watch_next_type";
-    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/program";
-    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/program";
+    field public static final java.lang.String COLUMN_WEIGHT = "weight";
+    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/preview_program";
+    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/preview_program";
     field public static final android.net.Uri CONTENT_URI;
     field public static final java.lang.String INTERACTION_TYPE_FANS = "INTERACTION_TYPE_FANS";
     field public static final java.lang.String INTERACTION_TYPE_FOLLOWERS = "INTERACTION_TYPE_FOLLOWERS";
@@ -24115,6 +24252,18 @@
     field public static final java.lang.String WATCH_NEXT_TYPE_NEXT = "WATCH_NEXT_TYPE_NEXT";
   }
 
+  public static final class TvContract.Programs implements android.media.tv.TvContract.BaseProgramColumns {
+    field public static final java.lang.String COLUMN_BROADCAST_GENRE = "broadcast_genre";
+    field public static final java.lang.String COLUMN_END_TIME_UTC_MILLIS = "end_time_utc_millis";
+    field public static final deprecated java.lang.String COLUMN_EPISODE_NUMBER = "episode_number";
+    field public static final java.lang.String COLUMN_RECORDING_PROHIBITED = "recording_prohibited";
+    field public static final deprecated java.lang.String COLUMN_SEASON_NUMBER = "season_number";
+    field public static final java.lang.String COLUMN_START_TIME_UTC_MILLIS = "start_time_utc_millis";
+    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/program";
+    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/program";
+    field public static final android.net.Uri CONTENT_URI;
+  }
+
   public static final class TvContract.Programs.Genres {
     method public static java.lang.String[] decode(java.lang.String);
     method public static java.lang.String encode(java.lang.String...);
@@ -24138,37 +24287,15 @@
     field public static final java.lang.String TRAVEL = "TRAVEL";
   }
 
-  public static final class TvContract.RecordedPrograms implements android.media.tv.TvContract.BaseTvColumns {
-    field public static final java.lang.String COLUMN_AUDIO_LANGUAGE = "audio_language";
+  public static final class TvContract.RecordedPrograms implements android.media.tv.TvContract.BaseProgramColumns {
     field public static final java.lang.String COLUMN_BROADCAST_GENRE = "broadcast_genre";
-    field public static final java.lang.String COLUMN_CANONICAL_GENRE = "canonical_genre";
-    field public static final java.lang.String COLUMN_CHANNEL_ID = "channel_id";
-    field public static final java.lang.String COLUMN_CONTENT_RATING = "content_rating";
     field public static final java.lang.String COLUMN_END_TIME_UTC_MILLIS = "end_time_utc_millis";
-    field public static final java.lang.String COLUMN_EPISODE_DISPLAY_NUMBER = "episode_display_number";
-    field public static final java.lang.String COLUMN_EPISODE_TITLE = "episode_title";
     field public static final java.lang.String COLUMN_INPUT_ID = "input_id";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_DATA = "internal_provider_data";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG1 = "internal_provider_flag1";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG2 = "internal_provider_flag2";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG3 = "internal_provider_flag3";
-    field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG4 = "internal_provider_flag4";
-    field public static final java.lang.String COLUMN_LONG_DESCRIPTION = "long_description";
-    field public static final java.lang.String COLUMN_POSTER_ART_URI = "poster_art_uri";
     field public static final java.lang.String COLUMN_RECORDING_DATA_BYTES = "recording_data_bytes";
     field public static final java.lang.String COLUMN_RECORDING_DATA_URI = "recording_data_uri";
     field public static final java.lang.String COLUMN_RECORDING_DURATION_MILLIS = "recording_duration_millis";
     field public static final java.lang.String COLUMN_RECORDING_EXPIRE_TIME_UTC_MILLIS = "recording_expire_time_utc_millis";
-    field public static final java.lang.String COLUMN_SEARCHABLE = "searchable";
-    field public static final java.lang.String COLUMN_SEASON_DISPLAY_NUMBER = "season_display_number";
-    field public static final java.lang.String COLUMN_SEASON_TITLE = "season_title";
-    field public static final java.lang.String COLUMN_SHORT_DESCRIPTION = "short_description";
     field public static final java.lang.String COLUMN_START_TIME_UTC_MILLIS = "start_time_utc_millis";
-    field public static final java.lang.String COLUMN_THUMBNAIL_URI = "thumbnail_uri";
-    field public static final java.lang.String COLUMN_TITLE = "title";
-    field public static final java.lang.String COLUMN_VERSION_NUMBER = "version_number";
-    field public static final java.lang.String COLUMN_VIDEO_HEIGHT = "video_height";
-    field public static final java.lang.String COLUMN_VIDEO_WIDTH = "video_width";
     field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/recorded_program";
     field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/recorded_program";
     field public static final android.net.Uri CONTENT_URI;
@@ -24225,11 +24352,13 @@
     field public static final java.lang.String ACTION_BLOCKED_RATINGS_CHANGED = "android.media.tv.action.BLOCKED_RATINGS_CHANGED";
     field public static final java.lang.String ACTION_MAKE_CHANNEL_BROWSABLE = "android.media.tv.action.MAKE_CHANNEL_BROWSABLE";
     field public static final java.lang.String ACTION_PARENTAL_CONTROLS_ENABLED_CHANGED = "android.media.tv.action.PARENTAL_CONTROLS_ENABLED_CHANGED";
+    field public static final java.lang.String ACTION_PROGRAM_BROWSABLE_DISABLED = "android.media.tv.action.PROGRAM_BROWSABLE_DISABLED";
     field public static final java.lang.String ACTION_QUERY_CONTENT_RATING_SYSTEMS = "android.media.tv.action.QUERY_CONTENT_RATING_SYSTEMS";
     field public static final java.lang.String ACTION_SETUP_INPUTS = "android.media.tv.action.SETUP_INPUTS";
     field public static final java.lang.String ACTION_VIEW_RECORDING_SCHEDULES = "android.media.tv.action.VIEW_RECORDING_SCHEDULES";
     field public static final java.lang.String EXTRA_CHANNEL_ID = "android.media.tv.extra.CHANNEL_ID";
     field public static final java.lang.String EXTRA_PACKAGE_NAME = "android.media.tv.extra.PACKAGE_NAME";
+    field public static final java.lang.String EXTRA_PROGRAM_ID = "android.media.tv.extra.PROGRAM_ID";
     field public static final int INPUT_STATE_CONNECTED = 0; // 0x0
     field public static final int INPUT_STATE_CONNECTED_STANDBY = 1; // 0x1
     field public static final int INPUT_STATE_DISCONNECTED = 2; // 0x2
@@ -25698,7 +25827,7 @@
     field public boolean isHomeProviderNetwork;
     field public int networkId;
     field public java.lang.String preSharedKey;
-    field public int priority;
+    field public deprecated int priority;
     field public java.lang.String providerFriendlyName;
     field public long[] roamingConsortiumIds;
     field public int status;
@@ -25803,11 +25932,14 @@
   }
 
   public static final class WifiEnterpriseConfig.Phase2 {
+    field public static final int AKA = 6; // 0x6
+    field public static final int AKA_PRIME = 7; // 0x7
     field public static final int GTC = 4; // 0x4
     field public static final int MSCHAP = 2; // 0x2
     field public static final int MSCHAPV2 = 3; // 0x3
     field public static final int NONE = 0; // 0x0
     field public static final int PAP = 1; // 0x1
+    field public static final int SIM = 5; // 0x5
   }
 
   public class WifiInfo implements android.os.Parcelable {
@@ -25830,6 +25962,7 @@
 
   public class WifiManager {
     method public int addNetwork(android.net.wifi.WifiConfiguration);
+    method public boolean addOrUpdatePasspointConfiguration(android.net.wifi.hotspot2.PasspointConfiguration);
     method public static int calculateSignalLevel(int, int);
     method public void cancelWps(android.net.wifi.WifiManager.WpsCallback);
     method public static int compareSignalLevel(int, int);
@@ -25842,6 +25975,7 @@
     method public java.util.List<android.net.wifi.WifiConfiguration> getConfiguredNetworks();
     method public android.net.wifi.WifiInfo getConnectionInfo();
     method public android.net.DhcpInfo getDhcpInfo();
+    method public java.util.List<android.net.wifi.hotspot2.PasspointConfiguration> getPasspointConfigurations();
     method public java.util.List<android.net.wifi.ScanResult> getScanResults();
     method public int getWifiState();
     method public boolean is5GHzBandSupported();
@@ -25852,12 +25986,13 @@
     method public boolean isScanAlwaysAvailable();
     method public boolean isTdlsSupported();
     method public boolean isWifiEnabled();
-    method public boolean pingSupplicant();
+    method public deprecated boolean pingSupplicant();
     method public void queryPasspointIcon(long, java.lang.String);
     method public boolean reassociate();
     method public boolean reconnect();
     method public boolean removeNetwork(int);
-    method public boolean saveConfiguration();
+    method public boolean removePasspointConfiguration(java.lang.String);
+    method public deprecated boolean saveConfiguration();
     method public void setTdlsEnabled(java.net.InetAddress, boolean);
     method public void setTdlsEnabledWithMacAddress(java.lang.String, boolean);
     method public boolean setWifiEnabled(boolean);
@@ -26071,6 +26206,241 @@
 
 }
 
+package android.net.wifi.hotspot2 {
+
+  public final class ConfigParser {
+    method public static android.net.wifi.hotspot2.PasspointConfiguration parsePasspointConfig(java.lang.String, byte[]);
+  }
+
+  public final class PasspointConfiguration implements android.os.Parcelable {
+    ctor public PasspointConfiguration();
+    ctor public PasspointConfiguration(android.net.wifi.hotspot2.PasspointConfiguration);
+    method public int describeContents();
+    method public android.net.wifi.hotspot2.pps.Credential getCredential();
+    method public int getCredentialPriority();
+    method public android.net.wifi.hotspot2.pps.HomeSp getHomeSp();
+    method public android.net.wifi.hotspot2.pps.Policy getPolicy();
+    method public long getSubscriptionCreationTimeInMs();
+    method public long getSubscriptionExpirationTimeInMs();
+    method public java.lang.String getSubscriptionType();
+    method public android.net.wifi.hotspot2.pps.UpdateParameter getSubscriptionUpdate();
+    method public java.util.Map<java.lang.String, byte[]> getTrustRootCertList();
+    method public int getUpdateIdentifier();
+    method public long getUsageLimitDataLimit();
+    method public long getUsageLimitStartTimeInMs();
+    method public long getUsageLimitTimeLimitInMinutes();
+    method public long getUsageLimitUsageTimePeriodInMinutes();
+    method public void setCredential(android.net.wifi.hotspot2.pps.Credential);
+    method public void setCredentialPriority(int);
+    method public void setHomeSp(android.net.wifi.hotspot2.pps.HomeSp);
+    method public void setPolicy(android.net.wifi.hotspot2.pps.Policy);
+    method public void setSubscriptionCreationTimeInMs(long);
+    method public void setSubscriptionExpirationTimeInMs(long);
+    method public void setSubscriptionType(java.lang.String);
+    method public void setSubscriptionUpdate(android.net.wifi.hotspot2.pps.UpdateParameter);
+    method public void setTrustRootCertList(java.util.Map<java.lang.String, byte[]>);
+    method public void setUpdateIdentifier(int);
+    method public void setUsageLimitDataLimit(long);
+    method public void setUsageLimitStartTimeInMs(long);
+    method public void setUsageLimitTimeLimitInMinutes(long);
+    method public void setUsageLimitUsageTimePeriodInMinutes(long);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.PasspointConfiguration> CREATOR;
+  }
+
+}
+
+package android.net.wifi.hotspot2.omadm {
+
+  public final class PpsMoParser {
+    method public static android.net.wifi.hotspot2.PasspointConfiguration parseMoText(java.lang.String);
+  }
+
+}
+
+package android.net.wifi.hotspot2.pps {
+
+  public final class Credential implements android.os.Parcelable {
+    ctor public Credential();
+    ctor public Credential(android.net.wifi.hotspot2.pps.Credential);
+    method public int describeContents();
+    method public java.security.cert.X509Certificate getCaCertificate();
+    method public android.net.wifi.hotspot2.pps.Credential.CertificateCredential getCertCredential();
+    method public boolean getCheckAaaServerCertStatus();
+    method public java.security.cert.X509Certificate[] getClientCertificateChain();
+    method public java.security.PrivateKey getClientPrivateKey();
+    method public long getCreationTimeInMs();
+    method public long getExpirationTimeInMs();
+    method public java.lang.String getRealm();
+    method public android.net.wifi.hotspot2.pps.Credential.SimCredential getSimCredential();
+    method public android.net.wifi.hotspot2.pps.Credential.UserCredential getUserCredential();
+    method public void setCaCertificate(java.security.cert.X509Certificate);
+    method public void setCertCredential(android.net.wifi.hotspot2.pps.Credential.CertificateCredential);
+    method public void setCheckAaaServerCertStatus(boolean);
+    method public void setClientCertificateChain(java.security.cert.X509Certificate[]);
+    method public void setClientPrivateKey(java.security.PrivateKey);
+    method public void setCreationTimeInMs(long);
+    method public void setExpirationTimeInMs(long);
+    method public void setRealm(java.lang.String);
+    method public void setSimCredential(android.net.wifi.hotspot2.pps.Credential.SimCredential);
+    method public void setUserCredential(android.net.wifi.hotspot2.pps.Credential.UserCredential);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.Credential> CREATOR;
+  }
+
+  public static final class Credential.CertificateCredential implements android.os.Parcelable {
+    ctor public Credential.CertificateCredential();
+    ctor public Credential.CertificateCredential(android.net.wifi.hotspot2.pps.Credential.CertificateCredential);
+    method public int describeContents();
+    method public byte[] getCertSha256Fingerprint();
+    method public java.lang.String getCertType();
+    method public void setCertSha256Fingerprint(byte[]);
+    method public void setCertType(java.lang.String);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.Credential.CertificateCredential> CREATOR;
+  }
+
+  public static final class Credential.SimCredential implements android.os.Parcelable {
+    ctor public Credential.SimCredential();
+    ctor public Credential.SimCredential(android.net.wifi.hotspot2.pps.Credential.SimCredential);
+    method public int describeContents();
+    method public int getEapType();
+    method public java.lang.String getImsi();
+    method public void setEapType(int);
+    method public void setImsi(java.lang.String);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.Credential.SimCredential> CREATOR;
+  }
+
+  public static final class Credential.UserCredential implements android.os.Parcelable {
+    ctor public Credential.UserCredential();
+    ctor public Credential.UserCredential(android.net.wifi.hotspot2.pps.Credential.UserCredential);
+    method public int describeContents();
+    method public boolean getAbleToShare();
+    method public int getEapType();
+    method public boolean getMachineManaged();
+    method public java.lang.String getNonEapInnerMethod();
+    method public java.lang.String getPassword();
+    method public java.lang.String getSoftTokenApp();
+    method public java.lang.String getUsername();
+    method public void setAbleToShare(boolean);
+    method public void setEapType(int);
+    method public void setMachineManaged(boolean);
+    method public void setNonEapInnerMethod(java.lang.String);
+    method public void setPassword(java.lang.String);
+    method public void setSoftTokenApp(java.lang.String);
+    method public void setUsername(java.lang.String);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.Credential.UserCredential> CREATOR;
+  }
+
+  public final class HomeSp implements android.os.Parcelable {
+    ctor public HomeSp();
+    ctor public HomeSp(android.net.wifi.hotspot2.pps.HomeSp);
+    method public int describeContents();
+    method public java.lang.String getFqdn();
+    method public java.lang.String getFriendlyName();
+    method public java.util.Map<java.lang.String, java.lang.Long> getHomeNetworkIds();
+    method public java.lang.String getIconUrl();
+    method public long[] getMatchAllOis();
+    method public long[] getMatchAnyOis();
+    method public java.lang.String[] getOtherHomePartners();
+    method public long[] getRoamingConsortiumOis();
+    method public void setFqdn(java.lang.String);
+    method public void setFriendlyName(java.lang.String);
+    method public void setHomeNetworkIds(java.util.Map<java.lang.String, java.lang.Long>);
+    method public void setIconUrl(java.lang.String);
+    method public void setMatchAllOis(long[]);
+    method public void setMatchAnyOis(long[]);
+    method public void setOtherHomePartners(java.lang.String[]);
+    method public void setRoamingConsortiumOis(long[]);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.HomeSp> CREATOR;
+  }
+
+  public final class Policy implements android.os.Parcelable {
+    ctor public Policy();
+    ctor public Policy(android.net.wifi.hotspot2.pps.Policy);
+    method public int describeContents();
+    method public java.lang.String[] getExcludedSsidList();
+    method public int getMaximumBssLoadValue();
+    method public long getMinHomeDownlinkBandwidth();
+    method public long getMinHomeUplinkBandwidth();
+    method public long getMinRoamingDownlinkBandwidth();
+    method public long getMinRoamingUplinkBandwidth();
+    method public android.net.wifi.hotspot2.pps.UpdateParameter getPolicyUpdate();
+    method public java.util.List<android.net.wifi.hotspot2.pps.Policy.RoamingPartner> getPreferredRoamingPartnerList();
+    method public java.util.Map<java.lang.Integer, java.lang.String> getRequiredProtoPortMap();
+    method public void setExcludedSsidList(java.lang.String[]);
+    method public void setMaximumBssLoadValue(int);
+    method public void setMinHomeDownlinkBandwidth(long);
+    method public void setMinHomeUplinkBandwidth(long);
+    method public void setMinRoamingDownlinkBandwidth(long);
+    method public void setMinRoamingUplinkBandwidth(long);
+    method public void setPolicyUpdate(android.net.wifi.hotspot2.pps.UpdateParameter);
+    method public void setPreferredRoamingPartnerList(java.util.List<android.net.wifi.hotspot2.pps.Policy.RoamingPartner>);
+    method public void setRequiredProtoPortMap(java.util.Map<java.lang.Integer, java.lang.String>);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.Policy> CREATOR;
+  }
+
+  public static final class Policy.RoamingPartner implements android.os.Parcelable {
+    ctor public Policy.RoamingPartner();
+    ctor public Policy.RoamingPartner(android.net.wifi.hotspot2.pps.Policy.RoamingPartner);
+    method public int describeContents();
+    method public java.lang.String getCountries();
+    method public java.lang.String getFqdn();
+    method public boolean getFqdnExactMatch();
+    method public int getPriority();
+    method public void setCountries(java.lang.String);
+    method public void setFqdn(java.lang.String);
+    method public void setFqdnExactMatch(boolean);
+    method public void setPriority(int);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.Policy.RoamingPartner> CREATOR;
+  }
+
+  public final class UpdateParameter implements android.os.Parcelable {
+    ctor public UpdateParameter();
+    ctor public UpdateParameter(android.net.wifi.hotspot2.pps.UpdateParameter);
+    method public int describeContents();
+    method public java.lang.String getBase64EncodedPassword();
+    method public java.lang.String getRestriction();
+    method public java.lang.String getServerUri();
+    method public byte[] getTrustRootCertSha256Fingerprint();
+    method public java.lang.String getTrustRootCertUrl();
+    method public long getUpdateIntervalInMinutes();
+    method public java.lang.String getUpdateMethod();
+    method public java.lang.String getUsername();
+    method public void setBase64EncodedPassword(java.lang.String);
+    method public void setRestriction(java.lang.String);
+    method public void setServerUri(java.lang.String);
+    method public void setTrustRootCertSha256Fingerprint(byte[]);
+    method public void setTrustRootCertUrl(java.lang.String);
+    method public void setUpdateIntervalInMinutes(long);
+    method public void setUpdateMethod(java.lang.String);
+    method public void setUsername(java.lang.String);
+    method public boolean validate();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.UpdateParameter> CREATOR;
+    field public static final long UPDATE_CHECK_INTERVAL_NEVER = 4294967295L; // 0xffffffffL
+    field public static final java.lang.String UPDATE_METHOD_OMADM = "OMA-DM-ClientInitiated";
+    field public static final java.lang.String UPDATE_METHOD_SSP = "SSP-ClientInitiated";
+    field public static final java.lang.String UPDATE_RESTRICTION_HOMESP = "HomeSP";
+    field public static final java.lang.String UPDATE_RESTRICTION_ROAMING_PARTNER = "RoamingPartner";
+    field public static final java.lang.String UPDATE_RESTRICTION_UNRESTRICTED = "Unrestricted";
+  }
+
+}
+
 package android.net.wifi.p2p {
 
   public class WifiP2pConfig implements android.os.Parcelable {
@@ -29612,6 +29982,7 @@
     field public static final int BATTERY_PLUGGED_AC = 1; // 0x1
     field public static final int BATTERY_PLUGGED_USB = 2; // 0x2
     field public static final int BATTERY_PLUGGED_WIRELESS = 4; // 0x4
+    field public static final int BATTERY_PROPERTY_BATTERY_STATUS = 6; // 0x6
     field public static final int BATTERY_PROPERTY_CAPACITY = 4; // 0x4
     field public static final int BATTERY_PROPERTY_CHARGE_COUNTER = 1; // 0x1
     field public static final int BATTERY_PROPERTY_CURRENT_AVERAGE = 3; // 0x3
@@ -30995,6 +31366,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();
@@ -31013,6 +31387,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 {
@@ -33853,6 +34228,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";
@@ -35990,26 +36366,44 @@
     ctor public AutoFillService();
     method public final android.os.IBinder onBind(android.content.Intent);
     method public void onConnected();
-    method public void onDatasetAuthenticationRequest(android.os.Bundle, int);
     method public void onDisconnected();
     method public abstract void onFillRequest(android.app.assist.AssistStructure, android.os.Bundle, android.os.CancellationSignal, android.service.autofill.FillCallback);
-    method public void onFillResponseAuthenticationRequest(android.os.Bundle, int);
     method public abstract void onSaveRequest(android.app.assist.AssistStructure, android.os.Bundle, android.service.autofill.SaveCallback);
-    field public static final java.lang.String EXTRA_DATASET_EXTRAS = "android.service.autofill.extra.DATASET_EXTRAS";
-    field public static final java.lang.String EXTRA_RESPONSE_EXTRAS = "android.service.autofill.extra.RESPONSE_EXTRAS";
-    field public static final int FLAG_AUTHENTICATION_ERROR = 4; // 0x4
-    field public static final int FLAG_AUTHENTICATION_REQUESTED = 1; // 0x1
-    field public static final int FLAG_AUTHENTICATION_SUCCESS = 2; // 0x2
-    field public static final int FLAG_FINGERPRINT_AUTHENTICATION_NOT_AVAILABLE = 8; // 0x8
     field public static final java.lang.String SERVICE_INTERFACE = "android.service.autofill.AutoFillService";
     field public static final java.lang.String SERVICE_META_DATA = "android.autofill";
   }
 
+  public final class Dataset implements android.os.Parcelable {
+    method public int describeContents();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.service.autofill.Dataset> CREATOR;
+  }
+
+  public static final class Dataset.Builder {
+    ctor public Dataset.Builder(java.lang.CharSequence);
+    method public android.service.autofill.Dataset build();
+    method public android.service.autofill.Dataset.Builder setAuthentication(android.content.IntentSender);
+    method public android.service.autofill.Dataset.Builder setValue(android.view.autofill.AutoFillId, android.view.autofill.AutoFillValue);
+  }
+
   public final class FillCallback {
-    method public void onDatasetAuthentication(android.view.autofill.Dataset, int);
     method public void onFailure(java.lang.CharSequence);
-    method public void onFillResponseAuthentication(int);
-    method public void onSuccess(android.view.autofill.FillResponse);
+    method public void onSuccess(android.service.autofill.FillResponse);
+  }
+
+  public final class FillResponse implements android.os.Parcelable {
+    method public int describeContents();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.service.autofill.FillResponse> CREATOR;
+  }
+
+  public static final class FillResponse.Builder {
+    ctor public FillResponse.Builder();
+    method public android.service.autofill.FillResponse.Builder addDataset(android.service.autofill.Dataset);
+    method public android.service.autofill.FillResponse.Builder addSavableFields(android.view.autofill.AutoFillId...);
+    method public android.service.autofill.FillResponse build();
+    method public android.service.autofill.FillResponse.Builder setAuthentication(android.content.IntentSender);
+    method public android.service.autofill.FillResponse.Builder setExtras(android.os.Bundle);
   }
 
   public final class SaveCallback {
@@ -36575,6 +36969,7 @@
     method public boolean onKeyUp(int, android.view.KeyEvent);
     method public void onLockscreenShown();
     method public void onLowMemory();
+    method public void onPrepareShow(android.os.Bundle, int);
     method public void onRequestAbortVoice(android.service.voice.VoiceInteractionSession.AbortVoiceRequest);
     method public void onRequestCommand(android.service.voice.VoiceInteractionSession.CommandRequest);
     method public void onRequestCompleteVoice(android.service.voice.VoiceInteractionSession.CompleteVoiceRequest);
@@ -36588,7 +36983,9 @@
     method public void setDisabledShowContext(int);
     method public void setKeepAwake(boolean);
     method public void setTheme(int);
+    method public void setUiEnabled(boolean);
     method public void show(android.os.Bundle, int);
+    method public void startAssistantActivity(android.content.Intent);
     method public void startVoiceActivity(android.content.Intent);
     field public static final int SHOW_SOURCE_ACTIVITY = 16; // 0x10
     field public static final int SHOW_SOURCE_APPLICATION = 8; // 0x8
@@ -39084,6 +39481,8 @@
     method public boolean setOperatorBrandOverride(java.lang.String);
     method public boolean setPreferredNetworkTypeToGlobal();
     method public boolean setVoiceMailNumber(java.lang.String, java.lang.String);
+    method public void setVoicemailRingtoneUri(android.telecom.PhoneAccountHandle, android.net.Uri);
+    method public void setVoicemailVibrationEnabled(android.telecom.PhoneAccountHandle, boolean);
     field public static final java.lang.String ACTION_CONFIGURE_VOICEMAIL = "android.telephony.action.CONFIGURE_VOICEMAIL";
     field public static final java.lang.String ACTION_PHONE_STATE_CHANGED = "android.intent.action.PHONE_STATE";
     field public static final java.lang.String ACTION_RESPOND_VIA_MESSAGE = "android.intent.action.RESPOND_VIA_MESSAGE";
@@ -39838,6 +40237,7 @@
     method public java.lang.CharSequence getApplicationLabel(android.content.pm.ApplicationInfo);
     method public android.graphics.drawable.Drawable getApplicationLogo(android.content.pm.ApplicationInfo);
     method public android.graphics.drawable.Drawable getApplicationLogo(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
+    method public android.content.pm.ChangedPackages getChangedPackages(int);
     method public int getComponentEnabledSetting(android.content.ComponentName);
     method public android.graphics.drawable.Drawable getDefaultActivityIcon();
     method public java.lang.String getDefaultBrowserPackageNameAsUser(int);
@@ -40823,19 +41223,23 @@
   }
 
   public class DateKeyListener extends android.text.method.NumberKeyListener {
-    ctor public DateKeyListener();
+    ctor public deprecated DateKeyListener();
+    ctor public DateKeyListener(java.util.Locale);
     method protected char[] getAcceptedChars();
     method public int getInputType();
-    method public static android.text.method.DateKeyListener getInstance();
-    field public static final char[] CHARACTERS;
+    method public static deprecated android.text.method.DateKeyListener getInstance();
+    method public static android.text.method.DateKeyListener getInstance(java.util.Locale);
+    field public static final deprecated char[] CHARACTERS;
   }
 
   public class DateTimeKeyListener extends android.text.method.NumberKeyListener {
-    ctor public DateTimeKeyListener();
+    ctor public deprecated DateTimeKeyListener();
+    ctor public DateTimeKeyListener(java.util.Locale);
     method protected char[] getAcceptedChars();
     method public int getInputType();
-    method public static android.text.method.DateTimeKeyListener getInstance();
-    field public static final char[] CHARACTERS;
+    method public static deprecated android.text.method.DateTimeKeyListener getInstance();
+    method public static android.text.method.DateTimeKeyListener getInstance(java.util.Locale);
+    field public static final deprecated char[] CHARACTERS;
   }
 
   public class DialerKeyListener extends android.text.method.NumberKeyListener {
@@ -40847,12 +41251,16 @@
   }
 
   public class DigitsKeyListener extends android.text.method.NumberKeyListener {
-    ctor public DigitsKeyListener();
-    ctor public DigitsKeyListener(boolean, boolean);
+    ctor public deprecated DigitsKeyListener();
+    ctor public deprecated DigitsKeyListener(boolean, boolean);
+    ctor public DigitsKeyListener(java.util.Locale);
+    ctor public DigitsKeyListener(java.util.Locale, boolean, boolean);
     method protected char[] getAcceptedChars();
     method public int getInputType();
-    method public static android.text.method.DigitsKeyListener getInstance();
-    method public static android.text.method.DigitsKeyListener getInstance(boolean, boolean);
+    method public static deprecated android.text.method.DigitsKeyListener getInstance();
+    method public static deprecated android.text.method.DigitsKeyListener getInstance(boolean, boolean);
+    method public static android.text.method.DigitsKeyListener getInstance(java.util.Locale);
+    method public static android.text.method.DigitsKeyListener getInstance(java.util.Locale, boolean, boolean);
     method public static android.text.method.DigitsKeyListener getInstance(java.lang.String);
   }
 
@@ -40996,11 +41404,13 @@
   }
 
   public class TimeKeyListener extends android.text.method.NumberKeyListener {
-    ctor public TimeKeyListener();
+    ctor public deprecated TimeKeyListener();
+    ctor public TimeKeyListener(java.util.Locale);
     method protected char[] getAcceptedChars();
     method public int getInputType();
-    method public static android.text.method.TimeKeyListener getInstance();
-    field public static final char[] CHARACTERS;
+    method public static deprecated android.text.method.TimeKeyListener getInstance();
+    method public static android.text.method.TimeKeyListener getInstance(java.util.Locale);
+    field public static final deprecated char[] CHARACTERS;
   }
 
   public class Touch {
@@ -41850,6 +42260,15 @@
     method public android.transition.TransitionManager inflateTransitionManager(int, android.view.ViewGroup);
   }
 
+  public abstract class TransitionListenerAdapter implements android.transition.Transition.TransitionListener {
+    ctor public TransitionListenerAdapter();
+    method public void onTransitionCancel(android.transition.Transition);
+    method public void onTransitionEnd(android.transition.Transition);
+    method public void onTransitionPause(android.transition.Transition);
+    method public void onTransitionResume(android.transition.Transition);
+    method public void onTransitionStart(android.transition.Transition);
+  }
+
   public class TransitionManager {
     ctor public TransitionManager();
     method public static void beginDelayedTransition(android.view.ViewGroup);
@@ -43796,6 +44215,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 {
@@ -43808,6 +44228,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();
@@ -43815,6 +44236,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();
@@ -43831,6 +44253,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);
@@ -43839,9 +44262,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);
@@ -44010,6 +44435,7 @@
     field public static final int AXIS_RX = 12; // 0xc
     field public static final int AXIS_RY = 13; // 0xd
     field public static final int AXIS_RZ = 14; // 0xe
+    field public static final int AXIS_SCROLL = 26; // 0x1a
     field public static final int AXIS_SIZE = 3; // 0x3
     field public static final int AXIS_THROTTLE = 19; // 0x13
     field public static final int AXIS_TILT = 25; // 0x19
@@ -44333,6 +44759,7 @@
     ctor public View(android.content.Context, android.util.AttributeSet, int);
     ctor public View(android.content.Context, android.util.AttributeSet, int, int);
     method public void addChildrenForAccessibility(java.util.ArrayList<android.view.View>);
+    method public void addExtraDataToAccessibilityNodeInfo(android.view.accessibility.AccessibilityNodeInfo, java.lang.String, android.os.Bundle);
     method public void addFocusables(java.util.ArrayList<android.view.View>, int);
     method public void addFocusables(java.util.ArrayList<android.view.View>, int, int);
     method public void addKeyboardNavigationClusters(java.util.Collection<android.view.View>, int);
@@ -44342,6 +44769,7 @@
     method public android.view.ViewPropertyAnimator animate();
     method public void announceForAccessibility(java.lang.CharSequence);
     method public void autoFill(android.view.autofill.AutoFillValue);
+    method public void autoFillVirtual(int, android.view.autofill.AutoFillValue);
     method protected boolean awakenScrollBars();
     method protected boolean awakenScrollBars(int);
     method protected boolean awakenScrollBars(int, boolean);
@@ -44415,8 +44843,8 @@
     method public void drawableHotspotChanged(float, float);
     method protected void drawableStateChanged();
     method public android.view.View findFocus();
-    method public final <T extends android.view.View> T findViewById(int);
-    method public final <T extends android.view.View> T findViewWithTag(java.lang.Object);
+    method public final android.view.View findViewById(int);
+    method public final android.view.View findViewWithTag(java.lang.Object);
     method public void findViewsWithText(java.util.ArrayList<android.view.View>, java.lang.CharSequence, int);
     method protected deprecated boolean fitSystemWindows(android.graphics.Rect);
     method public android.view.View focusSearch(int);
@@ -44432,7 +44860,7 @@
     method public android.view.animation.Animation getAnimation();
     method public android.os.IBinder getApplicationWindowToken();
     method public android.view.autofill.AutoFillType getAutoFillType();
-    method public android.view.autofill.VirtualViewDelegate getAutoFillVirtualViewDelegate(android.view.autofill.VirtualViewDelegate.Callback);
+    method public android.view.autofill.AutoFillValue getAutoFillValue();
     method public android.graphics.drawable.Drawable getBackground();
     method public android.content.res.ColorStateList getBackgroundTintList();
     method public android.graphics.PorterDuff.Mode getBackgroundTintMode();
@@ -44545,7 +44973,7 @@
     method public java.lang.Object getTag(int);
     method public int getTextAlignment();
     method public int getTextDirection();
-    method public final java.lang.CharSequence getTooltipText();
+    method public java.lang.CharSequence getTooltipText();
     method public android.view.View getTooltipView();
     method public final int getTop();
     method protected float getTopFadingEdgeStrength();
@@ -44571,6 +44999,7 @@
     method public float getX();
     method public float getY();
     method public float getZ();
+    method public boolean hasExplicitFocusable();
     method public boolean hasFocus();
     method public boolean hasFocusable();
     method public boolean hasNestedScrollingParent();
@@ -44731,7 +45160,7 @@
     method public final void requestUnbufferedDispatch(android.view.MotionEvent);
     method public static int resolveSize(int, int);
     method public static int resolveSizeAndState(int, int, int);
-    method public boolean restoreDefaultFocus(int);
+    method public boolean restoreDefaultFocus();
     method public void restoreHierarchyState(android.util.SparseArray<android.os.Parcelable>);
     method public void saveHierarchyState(android.util.SparseArray<android.os.Parcelable>);
     method public void scheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable, long);
@@ -44851,7 +45280,7 @@
     method public void setTag(int, java.lang.Object);
     method public void setTextAlignment(int);
     method public void setTextDirection(int);
-    method public final void setTooltipText(java.lang.CharSequence);
+    method public void setTooltipText(java.lang.CharSequence);
     method public final void setTop(int);
     method public void setTouchDelegate(android.view.TouchDelegate);
     method public final void setTransitionName(java.lang.String);
@@ -45028,6 +45457,7 @@
 
   public static class View.AccessibilityDelegate {
     ctor public View.AccessibilityDelegate();
+    method public void addExtraDataToAccessibilityNodeInfo(android.view.View, android.view.accessibility.AccessibilityNodeInfo, java.lang.String, android.os.Bundle);
     method public boolean dispatchPopulateAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent);
     method public android.view.accessibility.AccessibilityNodeProvider getAccessibilityNodeProvider(android.view.View);
     method public void onInitializeAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent);
@@ -45561,6 +45991,7 @@
     method public abstract void setTextLines(int[], int[]);
     method public abstract void setTextStyle(float, int, int, int);
     method public abstract void setTransformation(android.graphics.Matrix);
+    method public abstract void setUrl(java.lang.String);
     method public abstract void setVisibility(int);
     field public static final int AUTO_FILL_FLAG_SANITIZED = 1; // 0x1
   }
@@ -45996,6 +46427,7 @@
     field public static final int TYPE_APPLICATION = 2; // 0x2
     field public static final int TYPE_APPLICATION_ATTACHED_DIALOG = 1003; // 0x3eb
     field public static final int TYPE_APPLICATION_MEDIA = 1001; // 0x3e9
+    field public static final int TYPE_APPLICATION_OVERLAY = 2038; // 0x7f6
     field public static final int TYPE_APPLICATION_PANEL = 1000; // 0x3e8
     field public static final int TYPE_APPLICATION_STARTING = 3; // 0x3
     field public static final int TYPE_APPLICATION_SUB_PANEL = 1002; // 0x3ea
@@ -46005,17 +46437,17 @@
     field public static final int TYPE_INPUT_METHOD = 2011; // 0x7db
     field public static final int TYPE_INPUT_METHOD_DIALOG = 2012; // 0x7dc
     field public static final int TYPE_KEYGUARD_DIALOG = 2009; // 0x7d9
-    field public static final int TYPE_PHONE = 2002; // 0x7d2
-    field public static final int TYPE_PRIORITY_PHONE = 2007; // 0x7d7
+    field public static final deprecated int TYPE_PHONE = 2002; // 0x7d2
+    field public static final deprecated int TYPE_PRIORITY_PHONE = 2007; // 0x7d7
     field public static final int TYPE_PRIVATE_PRESENTATION = 2030; // 0x7ee
     field public static final int TYPE_SEARCH_BAR = 2001; // 0x7d1
     field public static final int TYPE_STATUS_BAR = 2000; // 0x7d0
     field public static final int TYPE_STATUS_BAR_PANEL = 2014; // 0x7de
-    field public static final int TYPE_SYSTEM_ALERT = 2003; // 0x7d3
+    field public static final deprecated int TYPE_SYSTEM_ALERT = 2003; // 0x7d3
     field public static final int TYPE_SYSTEM_DIALOG = 2008; // 0x7d8
-    field public static final int TYPE_SYSTEM_ERROR = 2010; // 0x7da
-    field public static final int TYPE_SYSTEM_OVERLAY = 2006; // 0x7d6
-    field public static final int TYPE_TOAST = 2005; // 0x7d5
+    field public static final deprecated int TYPE_SYSTEM_ERROR = 2010; // 0x7da
+    field public static final deprecated int TYPE_SYSTEM_OVERLAY = 2006; // 0x7d6
+    field public static final deprecated int TYPE_TOAST = 2005; // 0x7d5
     field public static final int TYPE_WALLPAPER = 2013; // 0x7dd
     field public float alpha;
     field public float buttonBrightness;
@@ -46151,6 +46583,7 @@
     method public android.view.accessibility.AccessibilityNodeInfo focusSearch(int);
     method public java.util.List<android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction> getActionList();
     method public deprecated int getActions();
+    method public java.util.List<java.lang.String> getAvailableExtraData();
     method public void getBoundsInParent(android.graphics.Rect);
     method public void getBoundsInScreen(android.graphics.Rect);
     method public android.view.accessibility.AccessibilityNodeInfo getChild(int);
@@ -46207,11 +46640,13 @@
     method public boolean performAction(int, android.os.Bundle);
     method public void recycle();
     method public boolean refresh();
+    method public boolean refreshWithExtraData(java.lang.String, android.os.Bundle);
     method public deprecated void removeAction(int);
     method public boolean removeAction(android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction);
     method public boolean removeChild(android.view.View);
     method public boolean removeChild(android.view.View, int);
     method public void setAccessibilityFocused(boolean);
+    method public void setAvailableExtraData(java.util.List<java.lang.String>);
     method public void setBoundsInParent(android.graphics.Rect);
     method public void setBoundsInScreen(android.graphics.Rect);
     method public void setCanOpenPopup(boolean);
@@ -46295,6 +46730,9 @@
     field public static final int ACTION_SET_SELECTION = 131072; // 0x20000
     field public static final int ACTION_SET_TEXT = 2097152; // 0x200000
     field public static final android.os.Parcelable.Creator<android.view.accessibility.AccessibilityNodeInfo> CREATOR;
+    field public static final java.lang.String EXTRA_DATA_TEXT_CHARACTER_LOCATION_ARG_LENGTH = "android.view.accessibility.extra.DATA_TEXT_CHARACTER_LOCATION_ARG_LENGTH";
+    field public static final java.lang.String EXTRA_DATA_TEXT_CHARACTER_LOCATION_ARG_START_INDEX = "android.view.accessibility.extra.DATA_TEXT_CHARACTER_LOCATION_ARG_START_INDEX";
+    field public static final java.lang.String EXTRA_DATA_TEXT_CHARACTER_LOCATION_KEY = "android.view.accessibility.extra.DATA_TEXT_CHARACTER_LOCATION_KEY";
     field public static final int FOCUS_ACCESSIBILITY = 2; // 0x2
     field public static final int FOCUS_INPUT = 1; // 0x1
     field public static final int MOVEMENT_GRANULARITY_CHARACTER = 1; // 0x1
@@ -46376,6 +46814,7 @@
 
   public abstract class AccessibilityNodeProvider {
     ctor public AccessibilityNodeProvider();
+    method public void addExtraDataToAccessibilityNodeInfo(int, android.view.accessibility.AccessibilityNodeInfo, java.lang.String, android.os.Bundle);
     method public android.view.accessibility.AccessibilityNodeInfo createAccessibilityNodeInfo(int);
     method public java.util.List<android.view.accessibility.AccessibilityNodeInfo> findAccessibilityNodeInfosByText(java.lang.String, int);
     method public android.view.accessibility.AccessibilityNodeInfo findFocus(int);
@@ -46787,11 +47226,13 @@
   }
 
   public final class AutoFillManager {
-    method public void onValueChanged(android.view.View, android.view.autofill.AutoFillValue);
-    method public void updateAutoFillInput(android.view.View, int);
-    method public void updateAutoFillInput(android.view.View, int, android.graphics.Rect, int);
-    field public static final int FLAG_UPDATE_UI_HIDE = 2; // 0x2
-    field public static final int FLAG_UPDATE_UI_SHOW = 1; // 0x1
+    method public void focusChanged(android.view.View, boolean);
+    method public void reset();
+    method public void valueChanged(android.view.View);
+    method public void virtualFocusChanged(android.view.View, int, android.graphics.Rect, boolean);
+    method public void virtualValueChanged(android.view.View, int, android.view.autofill.AutoFillValue);
+    field public static final java.lang.String EXTRA_ASSIST_STRUCTURE = "android.view.autofill.extra.ASSIST_STRUCTURE";
+    field public static final java.lang.String EXTRA_AUTHENTICATION_RESULT = "android.view.autofill.extra.AUTHENTICATION_RESULT";
   }
 
   public final class AutoFillType implements android.os.Parcelable {
@@ -46819,49 +47260,6 @@
     field public static final android.os.Parcelable.Creator<android.view.autofill.AutoFillValue> CREATOR;
   }
 
-  public final class Dataset implements android.os.Parcelable {
-    method public int describeContents();
-    method public void writeToParcel(android.os.Parcel, int);
-    field public static final android.os.Parcelable.Creator<android.view.autofill.Dataset> CREATOR;
-  }
-
-  public static final class Dataset.Builder {
-    ctor public Dataset.Builder(java.lang.CharSequence);
-    method public android.view.autofill.Dataset build();
-    method public android.view.autofill.Dataset.Builder requiresCustomAuthentication(android.os.Bundle, int);
-    method public android.view.autofill.Dataset.Builder requiresFingerprintAuthentication(android.hardware.fingerprint.FingerprintManager.CryptoObject, android.os.Bundle, int);
-    method public android.view.autofill.Dataset.Builder setExtras(android.os.Bundle);
-    method public android.view.autofill.Dataset.Builder setValue(android.view.autofill.AutoFillId, android.view.autofill.AutoFillValue);
-  }
-
-  public final class FillResponse implements android.os.Parcelable {
-    method public int describeContents();
-    method public void writeToParcel(android.os.Parcel, int);
-    field public static final android.os.Parcelable.Creator<android.view.autofill.FillResponse> CREATOR;
-  }
-
-  public static final class FillResponse.Builder {
-    ctor public FillResponse.Builder();
-    method public android.view.autofill.FillResponse.Builder addDataset(android.view.autofill.Dataset);
-    method public android.view.autofill.FillResponse.Builder addSavableFields(android.view.autofill.AutoFillId...);
-    method public android.view.autofill.FillResponse build();
-    method public android.view.autofill.FillResponse.Builder requiresCustomAuthentication(android.os.Bundle, int);
-    method public android.view.autofill.FillResponse.Builder requiresFingerprintAuthentication(android.hardware.fingerprint.FingerprintManager.CryptoObject, android.os.Bundle, int);
-    method public android.view.autofill.FillResponse.Builder setExtras(android.os.Bundle);
-  }
-
-  public abstract class VirtualViewDelegate {
-    ctor public VirtualViewDelegate();
-    method public abstract void autoFill(int, android.view.autofill.AutoFillValue);
-  }
-
-  public static abstract class VirtualViewDelegate.Callback {
-    ctor public VirtualViewDelegate.Callback();
-    method public void onAutoFillInputUpdated(int, android.graphics.Rect, int);
-    method public void onNodeRemoved(int...);
-    method public void onValueChanged(int);
-  }
-
 }
 
 package android.view.inputmethod {
@@ -47306,6 +47704,7 @@
     field public static final java.lang.String TYPE_EMAIL = "email";
     field public static final java.lang.String TYPE_OTHER = "other";
     field public static final java.lang.String TYPE_PHONE = "phone";
+    field public static final java.lang.String TYPE_URL = "url";
   }
 
   public static abstract class TextClassifier.EntityType implements java.lang.annotation.Annotation {
@@ -50364,6 +50763,7 @@
     method public int getAutoSizeMaxTextSize();
     method public int getAutoSizeMinTextSize();
     method public int getAutoSizeStepGranularity();
+    method public int[] getAutoSizeTextAvailableSizes();
     method public int getAutoSizeTextType();
     method public int getBreakStrategy();
     method public int getCompoundDrawablePadding();
@@ -50477,6 +50877,7 @@
     method public void setAutoSizeMaxTextSize(int, float);
     method public void setAutoSizeMinTextSize(int, float);
     method public void setAutoSizeStepGranularity(int, float);
+    method public void setAutoSizeTextPresetSizes(int[]);
     method public void setAutoSizeTextType(int);
     method public void setBreakStrategy(int);
     method public void setCompoundDrawablePadding(int);
@@ -50570,7 +50971,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 {
@@ -50615,6 +51016,7 @@
     method public void setIs24HourView(java.lang.Boolean);
     method public void setMinute(int);
     method public void setOnTimeChangedListener(android.widget.TimePicker.OnTimeChangedListener);
+    method public boolean validateInput();
     field public static final int MODE_CLOCK = 2; // 0x2
     field public static final int MODE_SPINNER = 1; // 0x1
   }
@@ -51016,6 +51418,8 @@
     field public static final int OP_INVOKE_INTERFACE = 114; // 0x72
     field public static final int OP_INVOKE_INTERFACE_JUMBO = 9983; // 0x26ff
     field public static final int OP_INVOKE_INTERFACE_RANGE = 120; // 0x78
+    field public static final int OP_INVOKE_POLYMORPHIC = 250; // 0xfa
+    field public static final int OP_INVOKE_POLYMORPHIC_RANGE = 251; // 0xfb
     field public static final int OP_INVOKE_STATIC = 113; // 0x71
     field public static final int OP_INVOKE_STATIC_JUMBO = 9727; // 0x25ff
     field public static final int OP_INVOKE_STATIC_RANGE = 119; // 0x77
@@ -52415,6 +52819,13 @@
     field public static final java.lang.Class<java.lang.Boolean> TYPE;
   }
 
+  public class BootstrapMethodError extends java.lang.LinkageError {
+    ctor public BootstrapMethodError();
+    ctor public BootstrapMethodError(java.lang.String);
+    ctor public BootstrapMethodError(java.lang.String, java.lang.Throwable);
+    ctor public BootstrapMethodError(java.lang.Throwable);
+  }
+
   public final class Byte extends java.lang.Number implements java.lang.Comparable {
     ctor public Byte(byte);
     ctor public Byte(java.lang.String) throws java.lang.NumberFormatException;
@@ -54301,6 +54712,21 @@
 
 package java.lang.invoke {
 
+  public abstract class CallSite {
+    method public abstract java.lang.invoke.MethodHandle dynamicInvoker();
+    method public abstract java.lang.invoke.MethodHandle getTarget();
+    method public abstract void setTarget(java.lang.invoke.MethodHandle);
+    method public java.lang.invoke.MethodType type();
+  }
+
+  public class ConstantCallSite extends java.lang.invoke.CallSite {
+    ctor public ConstantCallSite(java.lang.invoke.MethodHandle);
+    ctor protected ConstantCallSite(java.lang.invoke.MethodType, java.lang.invoke.MethodHandle) throws java.lang.Throwable;
+    method public final java.lang.invoke.MethodHandle dynamicInvoker();
+    method public final java.lang.invoke.MethodHandle getTarget();
+    method public final void setTarget(java.lang.invoke.MethodHandle);
+  }
+
   public class LambdaConversionException extends java.lang.Exception {
     ctor public LambdaConversionException();
     ctor public LambdaConversionException(java.lang.String);
@@ -54310,12 +54736,15 @@
   }
 
   public abstract class MethodHandle {
+    method public java.lang.invoke.MethodHandle asCollector(java.lang.Class<?>, int);
     method public java.lang.invoke.MethodHandle asFixedArity();
+    method public java.lang.invoke.MethodHandle asSpreader(java.lang.Class<?>, int);
     method public java.lang.invoke.MethodHandle asType(java.lang.invoke.MethodType);
     method public java.lang.invoke.MethodHandle asVarargsCollector(java.lang.Class<?>);
     method public java.lang.invoke.MethodHandle bindTo(java.lang.Object);
     method public final java.lang.Object invoke(java.lang.Object...) throws java.lang.Throwable;
     method public final java.lang.Object invokeExact(java.lang.Object...) throws java.lang.Throwable;
+    method public java.lang.Object invokeWithArguments(java.lang.Object...) throws java.lang.Throwable;
     method public java.lang.Object invokeWithArguments(java.util.List<?>) throws java.lang.Throwable;
     method public boolean isVarargsCollector();
     method public java.lang.invoke.MethodType type();
@@ -54349,17 +54778,23 @@
     method public static java.lang.invoke.MethodHandle arrayElementGetter(java.lang.Class<?>) throws java.lang.IllegalArgumentException;
     method public static java.lang.invoke.MethodHandle arrayElementSetter(java.lang.Class<?>) throws java.lang.IllegalArgumentException;
     method public static java.lang.invoke.MethodHandle catchException(java.lang.invoke.MethodHandle, java.lang.Class<? extends java.lang.Throwable>, java.lang.invoke.MethodHandle);
+    method public static java.lang.invoke.MethodHandle collectArguments(java.lang.invoke.MethodHandle, int, java.lang.invoke.MethodHandle);
     method public static java.lang.invoke.MethodHandle constant(java.lang.Class<?>, java.lang.Object);
     method public static java.lang.invoke.MethodHandle dropArguments(java.lang.invoke.MethodHandle, int, java.util.List<java.lang.Class<?>>);
     method public static java.lang.invoke.MethodHandle dropArguments(java.lang.invoke.MethodHandle, int, java.lang.Class<?>...);
     method public static java.lang.invoke.MethodHandle exactInvoker(java.lang.invoke.MethodType);
+    method public static java.lang.invoke.MethodHandle filterArguments(java.lang.invoke.MethodHandle, int, java.lang.invoke.MethodHandle...);
     method public static java.lang.invoke.MethodHandle filterReturnValue(java.lang.invoke.MethodHandle, java.lang.invoke.MethodHandle);
+    method public static java.lang.invoke.MethodHandle foldArguments(java.lang.invoke.MethodHandle, java.lang.invoke.MethodHandle);
     method public static java.lang.invoke.MethodHandle guardWithTest(java.lang.invoke.MethodHandle, java.lang.invoke.MethodHandle, java.lang.invoke.MethodHandle);
     method public static java.lang.invoke.MethodHandle identity(java.lang.Class<?>);
+    method public static java.lang.invoke.MethodHandle insertArguments(java.lang.invoke.MethodHandle, int, java.lang.Object...);
     method public static java.lang.invoke.MethodHandle invoker(java.lang.invoke.MethodType);
     method public static java.lang.invoke.MethodHandles.Lookup lookup();
     method public static java.lang.invoke.MethodHandle permuteArguments(java.lang.invoke.MethodHandle, java.lang.invoke.MethodType, int...);
     method public static java.lang.invoke.MethodHandles.Lookup publicLookup();
+    method public static <T extends java.lang.reflect.Member> T reflectAs(java.lang.Class<T>, java.lang.invoke.MethodHandle);
+    method public static java.lang.invoke.MethodHandle spreadInvoker(java.lang.invoke.MethodType, int);
     method public static java.lang.invoke.MethodHandle throwException(java.lang.Class<?>, java.lang.Class<? extends java.lang.Throwable>);
   }
 
@@ -54376,7 +54811,7 @@
     method public java.lang.invoke.MethodHandles.Lookup in(java.lang.Class<?>);
     method public java.lang.Class<?> lookupClass();
     method public int lookupModes();
-    method public void throwMakeAccessException(java.lang.String, java.lang.Object) throws java.lang.IllegalAccessException;
+    method public java.lang.invoke.MethodHandleInfo revealDirect(java.lang.invoke.MethodHandle);
     method public java.lang.invoke.MethodHandle unreflect(java.lang.reflect.Method) throws java.lang.IllegalAccessException;
     method public java.lang.invoke.MethodHandle unreflectConstructor(java.lang.reflect.Constructor<?>) throws java.lang.IllegalAccessException;
     method public java.lang.invoke.MethodHandle unreflectGetter(java.lang.reflect.Field) throws java.lang.IllegalAccessException;
@@ -54419,6 +54854,22 @@
     method public java.lang.invoke.MethodType wrap();
   }
 
+  public class MutableCallSite extends java.lang.invoke.CallSite {
+    ctor public MutableCallSite(java.lang.invoke.MethodType);
+    ctor public MutableCallSite(java.lang.invoke.MethodHandle);
+    method public final java.lang.invoke.MethodHandle dynamicInvoker();
+    method public final java.lang.invoke.MethodHandle getTarget();
+    method public void setTarget(java.lang.invoke.MethodHandle);
+  }
+
+  public class VolatileCallSite extends java.lang.invoke.CallSite {
+    ctor public VolatileCallSite(java.lang.invoke.MethodType);
+    ctor public VolatileCallSite(java.lang.invoke.MethodHandle);
+    method public final java.lang.invoke.MethodHandle dynamicInvoker();
+    method public final java.lang.invoke.MethodHandle getTarget();
+    method public void setTarget(java.lang.invoke.MethodHandle);
+  }
+
   public class WrongMethodTypeException extends java.lang.RuntimeException {
     ctor public WrongMethodTypeException();
     ctor public WrongMethodTypeException(java.lang.String);
diff --git a/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java b/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java
index 7e91391..bfcad1b 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;
@@ -126,6 +127,11 @@
             return;
         }
 
+        if ("cancel".equals(op)) {
+            doCancel();
+            return;
+        }
+
         if ("whitelist".equals(op)) {
             doPrintWhitelist();
             return;
@@ -269,6 +275,8 @@
                 return "Agent error";
             case BackupManager.ERROR_TRANSPORT_QUOTA_EXCEEDED:
                 return "Size quota exceeded";
+            case BackupManager.ERROR_BACKUP_CANCELLED:
+                return "Backup Cancelled";
             default:
                 return "Unknown error";
         }
@@ -312,8 +320,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();
@@ -359,6 +368,21 @@
         }
     }
 
+    private void doCancel() {
+        String arg = nextArg();
+        if ("backups".equals(arg)) {
+            try {
+                mBmgr.cancelBackups();
+            } catch (RemoteException e) {
+                System.err.println(e.toString());
+                System.err.println(BMGR_NOT_RUNNING_ERR);
+            }
+            return;
+        }
+
+        System.err.println("Unknown command.");
+    }
+
     private void doTransport() {
         try {
             String which = nextArg();
@@ -504,7 +528,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 +632,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 +660,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 +670,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;
                         }
@@ -715,6 +743,7 @@
         System.err.println("       bmgr wipe TRANSPORT PACKAGE");
         System.err.println("       bmgr fullbackup PACKAGE...");
         System.err.println("       bmgr backupnow --all|PACKAGE...");
+        System.err.println("       bmgr cancel backups");
         System.err.println("");
         System.err.println("The 'backup' command schedules a backup pass for the named package.");
         System.err.println("Note that the backup pass will effectively be a no-op if the package");
@@ -774,5 +803,6 @@
         System.err.println("For each package it will run key/value or full data backup ");
         System.err.println("depending on the package's manifest declarations.");
         System.err.println("The data is sent via the currently active transport.");
+        System.err.println("The 'cancel backups' command cancels all running backups.");
     }
 }
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index c773275..a6d2986 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -18,6 +18,7 @@
 #define LOG_TAG "BootAnimation"
 
 #include <stdint.h>
+#include <inttypes.h>
 #include <sys/inotify.h>
 #include <sys/poll.h>
 #include <sys/stat.h>
@@ -35,6 +36,7 @@
 #include <utils/Atomic.h>
 #include <utils/Errors.h>
 #include <utils/Log.h>
+#include <utils/SystemClock.h>
 
 #include <ui/PixelFormat.h>
 #include <ui/Rect.h>
@@ -350,6 +352,7 @@
 
 bool BootAnimation::android()
 {
+    ALOGD("BootAnimationShownTiming start time: %" PRId64 "ms", elapsedRealtime());
     initTexture(&mAndroid[0], mAssets, "images/android-logo-mask.png");
     initTexture(&mAndroid[1], mAssets, "images/android-logo-shine.png");
 
@@ -854,8 +857,8 @@
         mTimeCheckThread = nullptr;
     }
 
+    // We should have joined mInitAudioThread thread in playAnimation
     if (mInitAudioThread != nullptr) {
-        mInitAudioThread->requestExit();
         mInitAudioThread = nullptr;
     }
 
@@ -875,6 +878,7 @@
     const int animationX = (mWidth - animation.width) / 2;
     const int animationY = (mHeight - animation.height) / 2;
 
+    ALOGD("BootAnimationShownTiming start time: %" PRId64 "ms", elapsedRealtime());
     for (size_t i=0 ; i<pcount ; i++) {
         const Animation::Part& part(animation.parts[i]);
         const size_t fcount = part.frames.size();
diff --git a/cmds/pm/src/com/android/commands/pm/Pm.java b/cmds/pm/src/com/android/commands/pm/Pm.java
index 7015381..b336472 100644
--- a/cmds/pm/src/com/android/commands/pm/Pm.java
+++ b/cmds/pm/src/com/android/commands/pm/Pm.java
@@ -53,6 +53,7 @@
 import android.os.HandlerThread;
 import android.os.IUserManager;
 import android.os.ParcelFileDescriptor;
+import android.os.Process;
 import android.os.RemoteException;
 import android.os.ResultReceiver;
 import android.os.SELinux;
@@ -1004,7 +1005,8 @@
                 // In non-split user mode, userId can only be SYSTEM
                 int parentUserId = userId >= 0 ? userId : UserHandle.USER_SYSTEM;
                 info = mUm.createRestrictedProfile(name, parentUserId);
-                mAm.addSharedAccountsFromParentUser(parentUserId, userId);
+                mAm.addSharedAccountsFromParentUser(parentUserId, userId,
+                        (Process.myUid() == Process.ROOT_UID) ? "root" : "com.android.shell");
             } else if (userId < 0) {
                 info = mUm.createUser(name, flags);
             } else {
diff --git a/cmds/telecom/src/com/android/commands/telecom/Telecom.java b/cmds/telecom/src/com/android/commands/telecom/Telecom.java
index 63f6c92..8e9b91d 100644
--- a/cmds/telecom/src/com/android/commands/telecom/Telecom.java
+++ b/cmds/telecom/src/com/android/commands/telecom/Telecom.java
@@ -20,7 +20,6 @@
 import android.content.Context;
 import android.net.Uri;
 import android.os.IUserManager;
-import android.os.Process;
 import android.os.RemoteException;
 import android.os.ServiceManager;
 import android.os.UserHandle;
@@ -51,6 +50,7 @@
     private static final String COMMAND_SET_DEFAULT_DIALER = "set-default-dialer";
     private static final String COMMAND_GET_DEFAULT_DIALER = "get-default-dialer";
     private static final String COMMAND_GET_SYSTEM_DIALER = "get-system-dialer";
+    private static final String COMMAND_WAIT_ON_HANDLERS = "wait-on-handlers";
 
     private ComponentName mComponent;
     private String mAccountId;
@@ -69,6 +69,7 @@
                 "usage: telecom set-default-dialer <PACKAGE>\n" +
                 "usage: telecom get-default-dialer\n" +
                 "usage: telecom get-system-dialer\n" +
+                "usage: telecom wait-on-handlers\n" +
                 "\n" +
                 "telecom set-phone-account-enabled: Enables the given phone account, if it has \n" +
                 " already been registered with Telecom.\n" +
@@ -80,7 +81,9 @@
                 "\n" +
                 "telecom get-default-dialer: Displays the current default dialer. \n" +
                 "\n" +
-                "telecom get-system-dialer: Displays the current system dialer. \n"
+                "telecom get-system-dialer: Displays the current system dialer. \n" +
+                "\n" +
+                "telecom wait-on-handlers: Wait until all handlers finish their work. \n"
                 );
     }
 
@@ -125,6 +128,9 @@
             case COMMAND_GET_SYSTEM_DIALER:
                 runGetSystemDialer();
                 break;
+            case COMMAND_WAIT_ON_HANDLERS:
+                runWaitOnHandler();
+                break;
             default:
                 throw new IllegalArgumentException ("unknown command '" + command + "'");
         }
@@ -192,6 +198,10 @@
         System.out.println(mTelecomService.getSystemDialerPackage());
     }
 
+    private void runWaitOnHandler() throws RemoteException {
+
+    }
+
     private PhoneAccountHandle getPhoneAccountHandleFromArgs() throws RemoteException{
         final ComponentName component = parseComponentName(nextArgRequired());
         final String accountId = nextArgRequired();
diff --git a/cmds/uiautomator/library/core-src/com/android/uiautomator/core/InteractionController.java b/cmds/uiautomator/library/core-src/com/android/uiautomator/core/InteractionController.java
index 73e46f1..28a5646 100644
--- a/cmds/uiautomator/library/core-src/com/android/uiautomator/core/InteractionController.java
+++ b/cmds/uiautomator/library/core-src/com/android/uiautomator/core/InteractionController.java
@@ -32,8 +32,6 @@
 import android.view.MotionEvent.PointerProperties;
 import android.view.accessibility.AccessibilityEvent;
 
-import com.android.internal.util.Predicate;
-
 import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.TimeoutException;
@@ -261,7 +259,7 @@
     }
 
     /**
-     * Returns a Runnable for use in {@link #runAndWaitForEvents(Runnable, Predicate, long) to
+     * Returns a Runnable for use in {@link #runAndWaitForEvents(Runnable, AccessibilityEventFilter, long) to
      * perform a click.
      *
      * @param x coordinate
diff --git a/compiled-classes-phone b/compiled-classes-phone
index e4ffaa3..ea8f4a4 100644
--- a/compiled-classes-phone
+++ b/compiled-classes-phone
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2016 The Android Open Source Project
+# 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.
@@ -31,7 +31,6 @@
 android.R$styleable
 android.accessibilityservice.AccessibilityServiceInfo
 android.accessibilityservice.AccessibilityServiceInfo$1
-android.accessibilityservice.AccessibilityServiceInfo$CapabilityInfo
 android.accessibilityservice.IAccessibilityServiceClient
 android.accessibilityservice.IAccessibilityServiceConnection
 android.accessibilityservice.IAccessibilityServiceConnection$Stub
@@ -58,6 +57,8 @@
 android.accounts.AccountManager$Future2Task$1
 android.accounts.AccountManagerCallback
 android.accounts.AccountManagerFuture
+android.accounts.AccountManagerInternal
+android.accounts.AccountManagerInternal$OnAppPermissionChangeListener
 android.accounts.AccountsException
 android.accounts.AuthenticatorDescription
 android.accounts.AuthenticatorDescription$1
@@ -78,7 +79,6 @@
 android.accounts.OperationCanceledException
 android.animation.AnimationHandler
 android.animation.AnimationHandler$1
-android.animation.AnimationHandler$2
 android.animation.AnimationHandler$AnimationFrameCallback
 android.animation.AnimationHandler$AnimationFrameCallbackProvider
 android.animation.AnimationHandler$MyFrameCallbackProvider
@@ -90,9 +90,13 @@
 android.animation.AnimatorInflater$PathDataEvaluator
 android.animation.AnimatorListenerAdapter
 android.animation.AnimatorSet
-android.animation.AnimatorSet$AnimatorSetListener
+android.animation.AnimatorSet$1
+android.animation.AnimatorSet$2
+android.animation.AnimatorSet$3
+android.animation.AnimatorSet$AnimationEvent
 android.animation.AnimatorSet$Builder
 android.animation.AnimatorSet$Node
+android.animation.AnimatorSet$SeekState
 android.animation.ArgbEvaluator
 android.animation.FloatArrayEvaluator
 android.animation.FloatEvaluator
@@ -119,14 +123,15 @@
 android.animation.PathKeyframes
 android.animation.PathKeyframes$1
 android.animation.PathKeyframes$2
-android.animation.PathKeyframes$3
-android.animation.PathKeyframes$4
 android.animation.PathKeyframes$FloatKeyframesBase
 android.animation.PathKeyframes$IntKeyframesBase
 android.animation.PathKeyframes$SimpleKeyframes
 android.animation.PropertyValuesHolder
+android.animation.PropertyValuesHolder$1
 android.animation.PropertyValuesHolder$FloatPropertyValuesHolder
 android.animation.PropertyValuesHolder$IntPropertyValuesHolder
+android.animation.PropertyValuesHolder$PropertyValues
+android.animation.PropertyValuesHolder$PropertyValues$DataSource
 android.animation.RectEvaluator
 android.animation.RevealAnimator
 android.animation.StateListAnimator
@@ -139,22 +144,25 @@
 android.animation.TypeEvaluator
 android.animation.ValueAnimator
 android.animation.ValueAnimator$AnimatorUpdateListener
-android.annotation.TargetApi
+android.app.-$Lambda$36$c44uHH2WE4sJvw5tZZB6gRzEaHI
+android.app.-$Lambda$39$c44uHH2WE4sJvw5tZZB6gRzEaHI
+android.app.-$Lambda$57$vZ1qb742P9hE4drBY-TrOZB_qKo
+android.app.-$Lambda$7$u_rp3dnwvfyMTggc6hVftcuYJ3E
+android.app.-$Lambda$71$3eJ3p8XnIxdVOnT82Ns3R0V5ZQE
+android.app.-$Lambda$76$3eJ3p8XnIxdVOnT82Ns3R0V5ZQE
 android.app.ActionBar
 android.app.ActionBar$LayoutParams
 android.app.ActionBar$OnMenuVisibilityListener
-android.app.ActionBar$OnNavigationListener
 android.app.ActionBar$Tab
 android.app.ActionBar$TabListener
 android.app.Activity
 android.app.Activity$HostCallbacks
-android.app.Activity$NonConfigurationInstances
 android.app.ActivityManager
+android.app.ActivityManager$1
 android.app.ActivityManager$AppTask
 android.app.ActivityManager$MemoryInfo
 android.app.ActivityManager$MemoryInfo$1
-android.app.ActivityManager$ProcessErrorStateInfo
-android.app.ActivityManager$ProcessErrorStateInfo$1
+android.app.ActivityManager$OnUidImportanceListener
 android.app.ActivityManager$RecentTaskInfo
 android.app.ActivityManager$RecentTaskInfo$1
 android.app.ActivityManager$RunningAppProcessInfo
@@ -168,10 +176,12 @@
 android.app.ActivityManager$StackInfo$1
 android.app.ActivityManager$TaskDescription
 android.app.ActivityManager$TaskDescription$1
+android.app.ActivityManager$TaskSnapshot
+android.app.ActivityManager$TaskSnapshot$1
 android.app.ActivityManager$TaskThumbnail
-android.app.ActivityManager$TaskThumbnail$1
 android.app.ActivityManager$TaskThumbnailInfo
 android.app.ActivityManager$TaskThumbnailInfo$1
+android.app.ActivityManager$UidObserver
 android.app.ActivityManagerInternal
 android.app.ActivityManagerInternal$SleepToken
 android.app.ActivityOptions
@@ -189,6 +199,7 @@
 android.app.ActivityThread$ContextCleanupInfo
 android.app.ActivityThread$CreateServiceData
 android.app.ActivityThread$DropBoxReporter
+android.app.ActivityThread$DumpComponentInfo
 android.app.ActivityThread$EventLoggingReporter
 android.app.ActivityThread$GcIdler
 android.app.ActivityThread$H
@@ -199,18 +210,13 @@
 android.app.ActivityThread$ProviderKey
 android.app.ActivityThread$ProviderRefCount
 android.app.ActivityThread$ReceiverData
+android.app.ActivityThread$RequestAssistContextExtras
 android.app.ActivityThread$ResultData
 android.app.ActivityThread$ServiceArgsData
 android.app.ActivityThread$StopInfo
-android.app.ActivityTransitionCoordinator
-android.app.ActivityTransitionCoordinator$1
-android.app.ActivityTransitionCoordinator$2
-android.app.ActivityTransitionCoordinator$ContinueTransitionListener
-android.app.ActivityTransitionCoordinator$FixedEpicenterCallback
-android.app.ActivityTransitionCoordinator$SharedElementOriginalState
 android.app.ActivityTransitionState
+android.app.AlarmManager
 android.app.AlarmManager$AlarmClockInfo
-android.app.AlarmManager$AlarmClockInfo$1
 android.app.AlarmManager$ListenerWrapper
 android.app.AlarmManager$OnAlarmListener
 android.app.AlertDialog
@@ -227,71 +233,59 @@
 android.app.Application
 android.app.Application$ActivityLifecycleCallbacks
 android.app.ApplicationErrorReport
-android.app.ApplicationErrorReport$1
 android.app.ApplicationErrorReport$CrashInfo
+android.app.ApplicationErrorReport$ParcelableCrashInfo
 android.app.ApplicationLoaders
 android.app.ApplicationPackageManager
 android.app.ApplicationPackageManager$MoveCallbackDelegate
 android.app.ApplicationPackageManager$OnPermissionsChangeListenerDelegate
 android.app.ApplicationPackageManager$ResourceName
-android.app.ApplicationThreadProxy
 android.app.AutomaticZenRule
 android.app.BackStackRecord
 android.app.BackStackRecord$Op
-android.app.BackStackRecord$TransitionState
-android.app.BackStackState
-android.app.BackStackState$1
 android.app.BroadcastOptions
 android.app.ContentProviderHolder
 android.app.ContentProviderHolder$1
 android.app.ContextImpl
-android.app.ContextImpl$1
 android.app.ContextImpl$ApplicationContentResolver
 android.app.DatePickerDialog
 android.app.DatePickerDialog$OnDateSetListener
 android.app.Dialog
-android.app.Dialog$-void__init__android_content_Context_context_int_themeResId_boolean_createContextThemeWrapper_LambdaImpl0
 android.app.Dialog$ListenersHandler
 android.app.DialogFragment
 android.app.DownloadManager
 android.app.DownloadManager$CursorTranslator
 android.app.DownloadManager$Query
 android.app.DownloadManager$Request
-android.app.EnterTransitionCoordinator
-android.app.EnterTransitionCoordinator$1
-android.app.EnterTransitionCoordinator$4
-android.app.EnterTransitionCoordinator$5
-android.app.EnterTransitionCoordinator$5$1
-android.app.EnterTransitionCoordinator$5$1$1
-android.app.EnterTransitionCoordinator$6
-android.app.EnterTransitionCoordinator$7
-android.app.EnterTransitionCoordinator$8
-android.app.ExitTransitionCoordinator
-android.app.ExitTransitionCoordinator$10
-android.app.ExitTransitionCoordinator$11
-android.app.ExitTransitionCoordinator$4
 android.app.Fragment
 android.app.Fragment$1
+android.app.Fragment$AnimationInfo
+android.app.Fragment$OnStartEnterTransitionListener
 android.app.Fragment$SavedState
-android.app.FragmentBreadCrumbs
 android.app.FragmentContainer
 android.app.FragmentController
 android.app.FragmentHostCallback
 android.app.FragmentManager
 android.app.FragmentManager$BackStackEntry
+android.app.FragmentManager$FragmentLifecycleCallbacks
 android.app.FragmentManager$OnBackStackChangedListener
 android.app.FragmentManagerImpl
 android.app.FragmentManagerImpl$1
 android.app.FragmentManagerImpl$2
-android.app.FragmentManagerImpl$3
-android.app.FragmentManagerImpl$4
-android.app.FragmentManagerImpl$5
 android.app.FragmentManagerImpl$AnimateOnHWLayerIfNeededListener
+android.app.FragmentManagerImpl$OpGenerator
+android.app.FragmentManagerImpl$PopBackStackState
+android.app.FragmentManagerImpl$StartEnterTransitionListener
 android.app.FragmentManagerState
 android.app.FragmentManagerState$1
 android.app.FragmentState
 android.app.FragmentState$1
 android.app.FragmentTransaction
+android.app.FragmentTransition
+android.app.FragmentTransition$3
+android.app.FragmentTransition$4
+android.app.FragmentTransition$5
+android.app.FragmentTransition$FragmentContainerTransition
 android.app.IActivityContainer
 android.app.IActivityContainer$Stub
 android.app.IActivityContainerCallback
@@ -356,12 +350,11 @@
 android.app.JobSchedulerImpl
 android.app.KeyguardManager
 android.app.ListActivity
-android.app.ListActivity$1
-android.app.ListActivity$2
 android.app.ListFragment
 android.app.ListFragment$1
 android.app.ListFragment$2
 android.app.LoadedApk
+android.app.LoadedApk$DexLoadReporter
 android.app.LoadedApk$ReceiverDispatcher
 android.app.LoadedApk$ReceiverDispatcher$Args
 android.app.LoadedApk$ReceiverDispatcher$InnerReceiver
@@ -391,26 +384,34 @@
 android.app.Notification$InboxStyle
 android.app.Notification$MediaStyle
 android.app.Notification$MessagingStyle
+android.app.Notification$MessagingStyle$Message
+android.app.Notification$StandardTemplateParams
 android.app.Notification$Style
 android.app.Notification$WearableExtender
+android.app.NotificationChannel
+android.app.NotificationChannel$1
 android.app.NotificationManager
 android.app.NotificationManager$Policy
 android.app.NotificationManager$Policy$1
 android.app.OnActivityPausedListener
-android.app.PackageDeleteObserver
-android.app.PackageDeleteObserver$1
-android.app.PackageInstallObserver
-android.app.PackageInstallObserver$1
 android.app.PendingIntent
 android.app.PendingIntent$1
 android.app.PendingIntent$CanceledException
 android.app.PendingIntent$FinishedDispatcher
 android.app.PendingIntent$OnFinished
+android.app.PendingIntent$OnMarshaledListener
+android.app.PictureInPictureArgs
+android.app.PictureInPictureArgs$1
 android.app.Presentation
 android.app.ProfilerInfo
 android.app.ProgressDialog
 android.app.QueuedWork
+android.app.QueuedWork$QueuedWorkHandler
 android.app.ReceiverRestrictedContext
+android.app.RemoteAction
+android.app.RemoteAction$1
+android.app.RemoteAction$2
+android.app.RemoteAction$OnActionListener
 android.app.RemoteInput
 android.app.RemoteInput$1
 android.app.RemoteInput$Builder
@@ -419,13 +420,14 @@
 android.app.ResourcesManager$ActivityResources
 android.app.ResultInfo
 android.app.ResultInfo$1
+android.app.RetailDemoModeServiceInternal
+android.app.SearchManager
 android.app.SearchableInfo
 android.app.SearchableInfo$1
 android.app.Service
 android.app.ServiceConnectionLeaked
 android.app.SharedElementCallback
 android.app.SharedElementCallback$1
-android.app.SharedElementCallback$OnSharedElementsReadyListener
 android.app.SharedPreferencesImpl
 android.app.SharedPreferencesImpl$1
 android.app.SharedPreferencesImpl$2
@@ -509,6 +511,11 @@
 android.app.SystemServiceRegistry$72
 android.app.SystemServiceRegistry$73
 android.app.SystemServiceRegistry$74
+android.app.SystemServiceRegistry$75
+android.app.SystemServiceRegistry$76
+android.app.SystemServiceRegistry$77
+android.app.SystemServiceRegistry$78
+android.app.SystemServiceRegistry$79
 android.app.SystemServiceRegistry$8
 android.app.SystemServiceRegistry$9
 android.app.SystemServiceRegistry$CachedServiceFetcher
@@ -516,29 +523,43 @@
 android.app.SystemServiceRegistry$StaticApplicationContextServiceFetcher
 android.app.SystemServiceRegistry$StaticServiceFetcher
 android.app.TaskStackBuilder
-android.app.TimePickerDialog
+android.app.TaskStackListener
 android.app.TimePickerDialog$OnTimeSetListener
 android.app.UiModeManager
-android.app.WaitResult;
+android.app.UserSwitchObserver
+android.app.VoiceInteractor$PickOptionRequest$Option
+android.app.WaitResult
 android.app.WallpaperInfo
+android.app.WallpaperInfo$1
 android.app.WallpaperManager
 android.app.WallpaperManager$Globals
-android.app.admin.DeviceAdminInfo
-android.app.admin.DeviceAdminInfo$1
-android.app.admin.DeviceAdminInfo$PolicyInfo
 android.app.admin.DevicePolicyManager
 android.app.admin.DevicePolicyManagerInternal
 android.app.admin.DevicePolicyManagerInternal$OnCrossProfileWidgetProvidersChangeListener
 android.app.admin.IDevicePolicyManager
 android.app.admin.IDevicePolicyManager$Stub
 android.app.admin.IDevicePolicyManager$Stub$Proxy
+android.app.admin.PasswordMetrics
+android.app.admin.PasswordMetrics$1
 android.app.admin.SecurityLog
 android.app.admin.SecurityLog$SecurityEvent
 android.app.admin.SecurityLog$SecurityEvent$1
+android.app.admin.SystemUpdateInfo
+android.app.admin.SystemUpdateInfo$1
 android.app.admin.SystemUpdatePolicy
 android.app.admin.SystemUpdatePolicy$1
 android.app.assist.AssistContent
+android.app.assist.AssistContent$1
 android.app.assist.AssistStructure
+android.app.assist.AssistStructure$1
+android.app.assist.AssistStructure$ParcelTransferReader
+android.app.assist.AssistStructure$ParcelTransferWriter
+android.app.assist.AssistStructure$SendChannel
+android.app.assist.AssistStructure$ViewNode
+android.app.assist.AssistStructure$ViewNodeBuilder
+android.app.assist.AssistStructure$ViewNodeText
+android.app.assist.AssistStructure$ViewStackEntry
+android.app.assist.AssistStructure$WindowNode
 android.app.backup.BackupAgent
 android.app.backup.BackupAgentHelper
 android.app.backup.BackupDataInput
@@ -559,6 +580,7 @@
 android.app.backup.IBackupObserver
 android.app.backup.IFullBackupRestoreObserver
 android.app.backup.IRestoreSession
+android.app.backup.ISelectBackupTransportCallback
 android.app.backup.RestoreDescription
 android.app.backup.RestoreSet
 android.app.backup.SharedPreferencesBackupHelper
@@ -597,10 +619,15 @@
 android.app.trust.TrustManager$TrustListener
 android.app.usage.ConfigurationStats
 android.app.usage.ConfigurationStats$1
+android.app.usage.ExternalStorageStats
+android.app.usage.IStorageStatsManager
+android.app.usage.IStorageStatsManager$Stub
 android.app.usage.IUsageStatsManager
 android.app.usage.IUsageStatsManager$Stub
 android.app.usage.IUsageStatsManager$Stub$Proxy
 android.app.usage.NetworkStatsManager
+android.app.usage.StorageStats
+android.app.usage.StorageStatsManager
 android.app.usage.TimeSparseArray
 android.app.usage.UsageEvents
 android.app.usage.UsageEvents$1
@@ -626,18 +653,15 @@
 android.bluetooth.BluetoothActivityEnergyInfo$1
 android.bluetooth.BluetoothAdapter
 android.bluetooth.BluetoothAdapter$1
-android.bluetooth.BluetoothAdapter$2
-android.bluetooth.BluetoothAdapter$BluetoothStateChangeCallback
-android.bluetooth.BluetoothAdapter$LeScanCallback
-android.bluetooth.BluetoothAudioConfig
 android.bluetooth.BluetoothClass
 android.bluetooth.BluetoothClass$1
 android.bluetooth.BluetoothCodecConfig
+android.bluetooth.BluetoothCodecConfig$1
 android.bluetooth.BluetoothCodecStatus
+android.bluetooth.BluetoothCodecStatus$1
 android.bluetooth.BluetoothDevice
 android.bluetooth.BluetoothDevice$1
 android.bluetooth.BluetoothDevice$2
-android.bluetooth.BluetoothGattCallbackWrapper
 android.bluetooth.BluetoothGattCharacteristic
 android.bluetooth.BluetoothGattDescriptor
 android.bluetooth.BluetoothGattService
@@ -674,8 +698,6 @@
 android.bluetooth.IBluetoothA2dp
 android.bluetooth.IBluetoothA2dp$Stub
 android.bluetooth.IBluetoothA2dp$Stub$Proxy
-android.bluetooth.IBluetoothA2dpSink
-android.bluetooth.IBluetoothA2dpSink$Stub
 android.bluetooth.IBluetoothCallback
 android.bluetooth.IBluetoothCallback$Stub
 android.bluetooth.IBluetoothCallback$Stub$Proxy
@@ -683,14 +705,10 @@
 android.bluetooth.IBluetoothGatt$Stub
 android.bluetooth.IBluetoothGatt$Stub$Proxy
 android.bluetooth.IBluetoothGattCallback
-android.bluetooth.IBluetoothGattCallback$Stub
-android.bluetooth.IBluetoothGattCallback$Stub$Proxy
 android.bluetooth.IBluetoothGattServerCallback
 android.bluetooth.IBluetoothHeadset
 android.bluetooth.IBluetoothHeadset$Stub
 android.bluetooth.IBluetoothHeadset$Stub$Proxy
-android.bluetooth.IBluetoothHeadsetClient
-android.bluetooth.IBluetoothHeadsetClient$Stub
 android.bluetooth.IBluetoothHeadsetPhone
 android.bluetooth.IBluetoothHeadsetPhone$Stub
 android.bluetooth.IBluetoothHeadsetPhone$Stub$Proxy
@@ -715,8 +733,6 @@
 android.bluetooth.IBluetoothPbap
 android.bluetooth.IBluetoothPbap$Stub
 android.bluetooth.IBluetoothPbap$Stub$Proxy
-android.bluetooth.IBluetoothPbapClient
-android.bluetooth.IBluetoothPbapClient$Stub
 android.bluetooth.IBluetoothProfileServiceConnection
 android.bluetooth.IBluetoothProfileServiceConnection$Stub
 android.bluetooth.IBluetoothProfileServiceConnection$Stub$Proxy
@@ -736,11 +752,15 @@
 android.bluetooth.UidTraffic$1
 android.bluetooth.le.AdvertiseData
 android.bluetooth.le.AdvertiseSettings
-android.bluetooth.le.BluetoothLeAdvertiser
 android.bluetooth.le.BluetoothLeScanner
 android.bluetooth.le.BluetoothLeScanner$BleScanCallbackWrapper
 android.bluetooth.le.BluetoothLeScanner$BleScanCallbackWrapper$1
+android.bluetooth.le.BluetoothLeScanner$BleScanCallbackWrapper$2
 android.bluetooth.le.BluetoothLeUtils
+android.bluetooth.le.IAdvertiserCallback
+android.bluetooth.le.IScannerCallback
+android.bluetooth.le.IScannerCallback$Stub
+android.bluetooth.le.IScannerCallback$Stub$Proxy
 android.bluetooth.le.ScanCallback
 android.bluetooth.le.ScanFilter
 android.bluetooth.le.ScanFilter$1
@@ -826,6 +846,7 @@
 android.content.IIntentSender$Stub$Proxy
 android.content.IOnPrimaryClipChangedListener
 android.content.IOnPrimaryClipChangedListener$Stub
+android.content.IOnPrimaryClipChangedListener$Stub$Proxy
 android.content.IRestrictionsManager
 android.content.IRestrictionsManager$Stub
 android.content.IRestrictionsManager$Stub$Proxy
@@ -841,14 +862,11 @@
 android.content.Intent
 android.content.Intent$1
 android.content.Intent$FilterComparison
-android.content.Intent$ShortcutIconResource
-android.content.Intent$ShortcutIconResource$1
 android.content.IntentFilter
 android.content.IntentFilter$1
 android.content.IntentFilter$AuthorityEntry
 android.content.IntentFilter$MalformedMimeTypeException
 android.content.IntentSender
-android.content.IntentSender$1
 android.content.IntentSender$SendIntentException
 android.content.Loader
 android.content.Loader$ForceLoadContentObserver
@@ -893,11 +911,14 @@
 android.content.UriPermission
 android.content.pm.ActivityInfo
 android.content.pm.ActivityInfo$1
+android.content.pm.ActivityInfo$WindowLayout
 android.content.pm.ApplicationInfo
 android.content.pm.ApplicationInfo$1
 android.content.pm.ComponentInfo
 android.content.pm.ConfigurationInfo
 android.content.pm.ConfigurationInfo$1
+android.content.pm.EphemeralResponse
+android.content.pm.FallbackCategoryProvider
 android.content.pm.FeatureGroupInfo
 android.content.pm.FeatureGroupInfo$1
 android.content.pm.FeatureInfo
@@ -914,16 +935,9 @@
 android.content.pm.IOtaDexopt
 android.content.pm.IOtaDexopt$Stub
 android.content.pm.IPackageDataObserver
-android.content.pm.IPackageDataObserver$Stub
-android.content.pm.IPackageDataObserver$Stub$Proxy
 android.content.pm.IPackageDeleteObserver
-android.content.pm.IPackageDeleteObserver$Stub
 android.content.pm.IPackageDeleteObserver2
-android.content.pm.IPackageDeleteObserver2$Stub
-android.content.pm.IPackageInstallObserver
-android.content.pm.IPackageInstallObserver$Stub
 android.content.pm.IPackageInstallObserver2
-android.content.pm.IPackageInstallObserver2$Stub
 android.content.pm.IPackageInstaller
 android.content.pm.IPackageInstaller$Stub
 android.content.pm.IPackageInstaller$Stub$Proxy
@@ -931,8 +945,6 @@
 android.content.pm.IPackageInstallerCallback$Stub
 android.content.pm.IPackageInstallerCallback$Stub$Proxy
 android.content.pm.IPackageInstallerSession
-android.content.pm.IPackageInstallerSession$Stub
-android.content.pm.IPackageInstallerSession$Stub$Proxy
 android.content.pm.IPackageManager
 android.content.pm.IPackageManager$Stub
 android.content.pm.IPackageManager$Stub$Proxy
@@ -944,6 +956,7 @@
 android.content.pm.IPackageStatsObserver$Stub$Proxy
 android.content.pm.IShortcutService
 android.content.pm.IShortcutService$Stub
+android.content.pm.IShortcutService$Stub$Proxy
 android.content.pm.InstrumentationInfo
 android.content.pm.InstrumentationInfo$1
 android.content.pm.IntentFilterVerificationInfo
@@ -956,46 +969,49 @@
 android.content.pm.LauncherApps$Callback
 android.content.pm.LauncherApps$CallbackMessageHandler
 android.content.pm.LauncherApps$CallbackMessageHandler$CallbackInfo
+android.content.pm.LauncherApps$ShortcutQuery
 android.content.pm.PackageCleanItem
-android.content.pm.PackageCleanItem$1
 android.content.pm.PackageInfo
 android.content.pm.PackageInfo$1
 android.content.pm.PackageInfoLite
-android.content.pm.PackageInfoLite$1
 android.content.pm.PackageInstaller
 android.content.pm.PackageInstaller$Session
 android.content.pm.PackageInstaller$SessionCallback
 android.content.pm.PackageInstaller$SessionCallbackDelegate
 android.content.pm.PackageInstaller$SessionInfo
-android.content.pm.PackageInstaller$SessionInfo$1
 android.content.pm.PackageInstaller$SessionParams
-android.content.pm.PackageInstaller$SessionParams$1
 android.content.pm.PackageItemInfo
 android.content.pm.PackageManager
-android.content.pm.PackageManager$LegacyPackageDeleteObserver
 android.content.pm.PackageManager$MoveCallback
 android.content.pm.PackageManager$NameNotFoundException
 android.content.pm.PackageManager$OnPermissionsChangedListener
 android.content.pm.PackageManagerInternal
+android.content.pm.PackageManagerInternal$ExternalSourcesPolicy
 android.content.pm.PackageManagerInternal$PackagesProvider
 android.content.pm.PackageManagerInternal$SyncAdapterPackagesProvider
 android.content.pm.PackageParser
 android.content.pm.PackageParser$Activity
+android.content.pm.PackageParser$Activity$1
 android.content.pm.PackageParser$ActivityIntentInfo
 android.content.pm.PackageParser$ApkLite
 android.content.pm.PackageParser$Component
 android.content.pm.PackageParser$IntentInfo
 android.content.pm.PackageParser$NewPermissionInfo
 android.content.pm.PackageParser$Package
+android.content.pm.PackageParser$Package$1
 android.content.pm.PackageParser$PackageLite
 android.content.pm.PackageParser$PackageParserException
 android.content.pm.PackageParser$ParseComponentArgs
 android.content.pm.PackageParser$ParsePackageItemArgs
 android.content.pm.PackageParser$Permission
+android.content.pm.PackageParser$Permission$1
 android.content.pm.PackageParser$PermissionGroup
+android.content.pm.PackageParser$PermissionGroup$1
 android.content.pm.PackageParser$Provider
+android.content.pm.PackageParser$Provider$1
 android.content.pm.PackageParser$ProviderIntentInfo
 android.content.pm.PackageParser$Service
+android.content.pm.PackageParser$Service$1
 android.content.pm.PackageParser$ServiceIntentInfo
 android.content.pm.PackageParser$SplitNameComparator
 android.content.pm.PackageParser$SplitPermissionInfo
@@ -1024,6 +1040,11 @@
 android.content.pm.ResolveInfo$1
 android.content.pm.ServiceInfo
 android.content.pm.ServiceInfo$1
+android.content.pm.SharedLibraryInfo
+android.content.pm.SharedLibraryInfo$1
+android.content.pm.ShortcutInfo
+android.content.pm.ShortcutInfo$1
+android.content.pm.ShortcutInfo$Builder
 android.content.pm.ShortcutManager
 android.content.pm.ShortcutServiceInternal
 android.content.pm.ShortcutServiceInternal$ShortcutChangeListener
@@ -1033,7 +1054,18 @@
 android.content.pm.UserInfo$1
 android.content.pm.VerifierDeviceIdentity
 android.content.pm.VerifierInfo
+android.content.pm.VersionedPackage
+android.content.pm.VersionedPackage$1
 android.content.pm.XmlSerializerAndParser
+android.content.pm.permission.IRuntimePermissionPresenter
+android.content.pm.permission.IRuntimePermissionPresenter$Stub
+android.content.pm.permission.IRuntimePermissionPresenter$Stub$Proxy
+android.content.pm.permission.RuntimePermissionPresentationInfo
+android.content.pm.permission.RuntimePermissionPresentationInfo$1
+android.content.pm.permission.RuntimePermissionPresenter
+android.content.pm.permission.RuntimePermissionPresenter$OnResultCallback
+android.content.pm.permission.RuntimePermissionPresenter$RemoteService
+android.content.pm.permission.RuntimePermissionPresenter$RemoteService$1
 android.content.res.AssetFileDescriptor
 android.content.res.AssetFileDescriptor$1
 android.content.res.AssetFileDescriptor$AutoCloseInputStream
@@ -1109,6 +1141,7 @@
 android.database.SQLException
 android.database.sqlite.DatabaseObjectNotClosedException
 android.database.sqlite.SQLiteAbortException
+android.database.sqlite.SQLiteAccessPermException
 android.database.sqlite.SQLiteCantOpenDatabaseException
 android.database.sqlite.SQLiteClosable
 android.database.sqlite.SQLiteConnection
@@ -1144,6 +1177,7 @@
 android.database.sqlite.SQLiteProgram
 android.database.sqlite.SQLiteQuery
 android.database.sqlite.SQLiteQueryBuilder
+android.database.sqlite.SQLiteReadOnlyDatabaseException
 android.database.sqlite.SQLiteSession
 android.database.sqlite.SQLiteSession$Transaction
 android.database.sqlite.SQLiteStatement
@@ -1170,6 +1204,7 @@
 android.drm.DrmManagerClient$OnInfoListener
 android.drm.DrmOutputStream
 android.drm.DrmSupportInfo
+android.graphics.BaseCanvas
 android.graphics.Bitmap
 android.graphics.Bitmap$1
 android.graphics.Bitmap$CompressFormat
@@ -1196,23 +1231,20 @@
 android.graphics.DiscretePathEffect
 android.graphics.DrawFilter
 android.graphics.EmbossMaskFilter
-android.graphics.FontConfig
-android.graphics.FontConfig$Alias
-android.graphics.FontConfig$Axis
-android.graphics.FontConfig$Family
-android.graphics.FontConfig$Font
 android.graphics.FontFamily
 android.graphics.FontListParser
+android.graphics.GraphicBuffer
+android.graphics.GraphicBuffer$1
 android.graphics.ImageFormat
 android.graphics.Insets
 android.graphics.Interpolator
 android.graphics.Interpolator$Result
-android.graphics.LayerRasterizer
 android.graphics.LightingColorFilter
 android.graphics.LinearGradient
 android.graphics.MaskFilter
 android.graphics.Matrix
 android.graphics.Matrix$1
+android.graphics.Matrix$NoImagePreloadHolder
 android.graphics.Matrix$ScaleToFit
 android.graphics.Movie
 android.graphics.NinePatch
@@ -1246,7 +1278,6 @@
 android.graphics.PorterDuffColorFilter
 android.graphics.PorterDuffXfermode
 android.graphics.RadialGradient
-android.graphics.Rasterizer
 android.graphics.Rect
 android.graphics.Rect$1
 android.graphics.Rect$UnflattenHelper
@@ -1270,7 +1301,6 @@
 android.graphics.YuvImage
 android.graphics.drawable.Animatable
 android.graphics.drawable.Animatable2
-android.graphics.drawable.Animatable2$AnimationCallback
 android.graphics.drawable.AnimatedRotateDrawable
 android.graphics.drawable.AnimatedRotateDrawable$1
 android.graphics.drawable.AnimatedRotateDrawable$AnimatedRotateState
@@ -1282,7 +1312,6 @@
 android.graphics.drawable.AnimatedStateListDrawable$Transition
 android.graphics.drawable.AnimatedVectorDrawable
 android.graphics.drawable.AnimatedVectorDrawable$1
-android.graphics.drawable.AnimatedVectorDrawable$2
 android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState
 android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState$PendingAnimator
 android.graphics.drawable.AnimatedVectorDrawable$VectorDrawableAnimator
@@ -1301,6 +1330,7 @@
 android.graphics.drawable.Drawable$ConstantState
 android.graphics.drawable.DrawableContainer
 android.graphics.drawable.DrawableContainer$1
+android.graphics.drawable.DrawableContainer$BlockInvalidateCallback
 android.graphics.drawable.DrawableContainer$DrawableContainerState
 android.graphics.drawable.DrawableInflater
 android.graphics.drawable.DrawableWrapper
@@ -1349,13 +1379,31 @@
 android.graphics.drawable.VectorDrawable$VClipPath
 android.graphics.drawable.VectorDrawable$VFullPath
 android.graphics.drawable.VectorDrawable$VFullPath$1
+android.graphics.drawable.VectorDrawable$VFullPath$10
+android.graphics.drawable.VectorDrawable$VFullPath$2
+android.graphics.drawable.VectorDrawable$VFullPath$3
+android.graphics.drawable.VectorDrawable$VFullPath$4
+android.graphics.drawable.VectorDrawable$VFullPath$5
+android.graphics.drawable.VectorDrawable$VFullPath$6
+android.graphics.drawable.VectorDrawable$VFullPath$7
+android.graphics.drawable.VectorDrawable$VFullPath$8
+android.graphics.drawable.VectorDrawable$VFullPath$9
 android.graphics.drawable.VectorDrawable$VGroup
 android.graphics.drawable.VectorDrawable$VGroup$1
+android.graphics.drawable.VectorDrawable$VGroup$2
+android.graphics.drawable.VectorDrawable$VGroup$3
+android.graphics.drawable.VectorDrawable$VGroup$4
+android.graphics.drawable.VectorDrawable$VGroup$5
+android.graphics.drawable.VectorDrawable$VGroup$6
+android.graphics.drawable.VectorDrawable$VGroup$7
+android.graphics.drawable.VectorDrawable$VGroup$8
+android.graphics.drawable.VectorDrawable$VGroup$9
 android.graphics.drawable.VectorDrawable$VObject
 android.graphics.drawable.VectorDrawable$VPath
+android.graphics.drawable.VectorDrawable$VPath$1
 android.graphics.drawable.VectorDrawable$VectorDrawableState
+android.graphics.drawable.VectorDrawable$VectorDrawableState$1
 android.graphics.drawable.shapes.OvalShape
-android.graphics.drawable.shapes.PathShape
 android.graphics.drawable.shapes.RectShape
 android.graphics.drawable.shapes.RoundRectShape
 android.graphics.drawable.shapes.Shape
@@ -1363,7 +1411,6 @@
 android.graphics.pdf.PdfEditor
 android.graphics.pdf.PdfRenderer
 android.hardware.Camera
-android.hardware.Camera$Area
 android.hardware.Camera$AutoFocusCallback
 android.hardware.Camera$AutoFocusMoveCallback
 android.hardware.Camera$CameraInfo
@@ -1377,9 +1424,13 @@
 android.hardware.Camera$PreviewCallback
 android.hardware.Camera$ShutterCallback
 android.hardware.Camera$Size
+android.hardware.CameraStatus
+android.hardware.CameraStatus$1
 android.hardware.ConsumerIrManager
 android.hardware.GeomagneticField
 android.hardware.GeomagneticField$LegendreTable
+android.hardware.HardwareBuffer
+android.hardware.HardwareBuffer$1
 android.hardware.ICameraService
 android.hardware.ICameraService$Stub
 android.hardware.ICameraService$Stub$Proxy
@@ -1419,8 +1470,11 @@
 android.hardware.camera2.CameraManager
 android.hardware.camera2.CameraManager$AvailabilityCallback
 android.hardware.camera2.CameraManager$CameraManagerGlobal
+android.hardware.camera2.CameraManager$CameraManagerGlobal$1
+android.hardware.camera2.CameraManager$CameraManagerGlobal$2
 android.hardware.camera2.CameraManager$CameraManagerGlobal$3
 android.hardware.camera2.CameraManager$CameraManagerGlobal$4
+android.hardware.camera2.CameraManager$CameraManagerGlobal$5
 android.hardware.camera2.CameraManager$TorchCallback
 android.hardware.camera2.CameraMetadata
 android.hardware.camera2.CaptureFailure
@@ -1461,6 +1515,7 @@
 android.hardware.camera2.impl.CameraDeviceImpl
 android.hardware.camera2.impl.CameraDeviceImpl$1
 android.hardware.camera2.impl.CameraDeviceImpl$10
+android.hardware.camera2.impl.CameraDeviceImpl$11
 android.hardware.camera2.impl.CameraDeviceImpl$2
 android.hardware.camera2.impl.CameraDeviceImpl$3
 android.hardware.camera2.impl.CameraDeviceImpl$4
@@ -1472,7 +1527,6 @@
 android.hardware.camera2.impl.CameraDeviceImpl$CameraDeviceCallbacks$2
 android.hardware.camera2.impl.CameraDeviceImpl$CameraDeviceCallbacks$3
 android.hardware.camera2.impl.CameraDeviceImpl$CameraDeviceCallbacks$4
-android.hardware.camera2.impl.CameraDeviceImpl$CameraDeviceCallbacks$5
 android.hardware.camera2.impl.CameraDeviceImpl$CameraDeviceCallbacks$6
 android.hardware.camera2.impl.CameraDeviceImpl$CaptureCallback
 android.hardware.camera2.impl.CameraDeviceImpl$CaptureCallbackHolder
@@ -1565,7 +1619,6 @@
 android.hardware.camera2.params.StreamConfigurationDuration
 android.hardware.camera2.params.StreamConfigurationMap
 android.hardware.camera2.params.TonemapCurve
-android.hardware.camera2.utils.ArrayUtils
 android.hardware.camera2.utils.HashCodeHelpers
 android.hardware.camera2.utils.SubmitInfo
 android.hardware.camera2.utils.SubmitInfo$1
@@ -1605,21 +1658,11 @@
 android.hardware.fingerprint.FingerprintManager
 android.hardware.fingerprint.FingerprintManager$1
 android.hardware.fingerprint.FingerprintManager$2
-android.hardware.fingerprint.FingerprintManager$2$1
 android.hardware.fingerprint.FingerprintManager$AuthenticationCallback
 android.hardware.fingerprint.FingerprintManager$AuthenticationResult
-android.hardware.fingerprint.FingerprintManager$CryptoObject
-android.hardware.fingerprint.FingerprintManager$EnrollmentCallback
 android.hardware.fingerprint.FingerprintManager$LockoutResetCallback
 android.hardware.fingerprint.FingerprintManager$MyHandler
-android.hardware.fingerprint.FingerprintManager$OnAuthenticationCancelListener
-android.hardware.fingerprint.FingerprintManager$OnEnrollCancelListener
-android.hardware.fingerprint.FingerprintManager$RemovalCallback
-android.hardware.fingerprint.IFingerprintDaemon
-android.hardware.fingerprint.IFingerprintDaemon$Stub
-android.hardware.fingerprint.IFingerprintDaemon$Stub$Proxy
-android.hardware.fingerprint.IFingerprintDaemonCallback
-android.hardware.fingerprint.IFingerprintDaemonCallback$Stub
+android.hardware.fingerprint.IFingerprintClientActiveCallback
 android.hardware.fingerprint.IFingerprintService
 android.hardware.fingerprint.IFingerprintService$Stub
 android.hardware.fingerprint.IFingerprintService$Stub$Proxy
@@ -1628,14 +1671,8 @@
 android.hardware.fingerprint.IFingerprintServiceLockoutResetCallback$Stub$Proxy
 android.hardware.fingerprint.IFingerprintServiceReceiver
 android.hardware.fingerprint.IFingerprintServiceReceiver$Stub
-android.hardware.fingerprint.IFingerprintServiceReceiver$Stub$Proxy
-android.hardware.hdmi.HdmiClient
 android.hardware.hdmi.HdmiControlManager
-android.hardware.hdmi.HdmiPlaybackClient
 android.hardware.hdmi.HdmiPlaybackClient$DisplayStatusCallback
-android.hardware.hdmi.HdmiTvClient
-android.hardware.hdmi.IHdmiControlService
-android.hardware.hdmi.IHdmiControlService$Stub
 android.hardware.input.IInputDevicesChangedListener
 android.hardware.input.IInputDevicesChangedListener$Stub
 android.hardware.input.IInputDevicesChangedListener$Stub$Proxy
@@ -1655,13 +1692,15 @@
 android.hardware.input.KeyboardLayout$1
 android.hardware.input.TouchCalibration
 android.hardware.input.TouchCalibration$1
-android.hardware.location.ActivityChangedEvent
 android.hardware.location.ActivityRecognitionHardware
-android.hardware.location.ActivityRecognitionHardware$SinkList
 android.hardware.location.ContextHubInfo
 android.hardware.location.ContextHubInfo$1
 android.hardware.location.ContextHubManager
-android.hardware.location.ContextHubService
+android.hardware.location.ContextHubManager$1
+android.hardware.location.ContextHubManager$Callback
+android.hardware.location.ContextHubManager$ICallback
+android.hardware.location.ContextHubMessage
+android.hardware.location.ContextHubMessage$1
 android.hardware.location.GeofenceHardware
 android.hardware.location.GeofenceHardware$GeofenceHardwareMonitorCallbackWrapper
 android.hardware.location.GeofenceHardwareCallback
@@ -1671,27 +1710,21 @@
 android.hardware.location.GeofenceHardwareImpl$3
 android.hardware.location.GeofenceHardwareImpl$Reaper
 android.hardware.location.GeofenceHardwareMonitorCallback
-android.hardware.location.GeofenceHardwareRequestParcelable
 android.hardware.location.GeofenceHardwareService
 android.hardware.location.GeofenceHardwareService$1
 android.hardware.location.IActivityRecognitionHardware
 android.hardware.location.IActivityRecognitionHardware$Stub
-android.hardware.location.IActivityRecognitionHardware$Stub$Proxy
 android.hardware.location.IActivityRecognitionHardwareClient
 android.hardware.location.IActivityRecognitionHardwareClient$Stub
 android.hardware.location.IActivityRecognitionHardwareClient$Stub$Proxy
-android.hardware.location.IActivityRecognitionHardwareSink
-android.hardware.location.IActivityRecognitionHardwareSink$Stub
-android.hardware.location.IActivityRecognitionHardwareSink$Stub$Proxy
 android.hardware.location.IActivityRecognitionHardwareWatcher
+android.hardware.location.IContextHubCallback
+android.hardware.location.IContextHubCallback$Stub
+android.hardware.location.IContextHubCallback$Stub$Proxy
 android.hardware.location.IContextHubService
 android.hardware.location.IContextHubService$Stub
+android.hardware.location.IContextHubService$Stub$Proxy
 android.hardware.location.IFusedLocationHardware
-android.hardware.location.IFusedLocationHardware$Stub
-android.hardware.location.IFusedLocationHardware$Stub$Proxy
-android.hardware.location.IFusedLocationHardwareSink
-android.hardware.location.IFusedLocationHardwareSink$Stub
-android.hardware.location.IFusedLocationHardwareSink$Stub$Proxy
 android.hardware.location.IGeofenceHardware
 android.hardware.location.IGeofenceHardware$Stub
 android.hardware.location.IGeofenceHardware$Stub$Proxy
@@ -1699,6 +1732,10 @@
 android.hardware.location.IGeofenceHardwareMonitorCallback$Stub
 android.hardware.location.IGeofenceHardwareMonitorCallback$Stub$Proxy
 android.hardware.location.MemoryRegion
+android.hardware.location.MemoryRegion$1
+android.hardware.location.NanoApp
+android.hardware.location.NanoAppFilter
+android.hardware.location.NanoAppFilter$1
 android.hardware.location.NanoAppInstanceInfo
 android.hardware.location.NanoAppInstanceInfo$1
 android.hardware.radio.RadioManager
@@ -1722,6 +1759,21 @@
 android.hardware.radio.RadioMetadata$1
 android.hardware.radio.RadioModule
 android.hardware.radio.RadioTuner
+android.hardware.radio.V1_0.Call
+android.hardware.radio.V1_0.CardStatus
+android.hardware.radio.V1_0.CdmaSignalStrength
+android.hardware.radio.V1_0.EvdoSignalStrength
+android.hardware.radio.V1_0.GsmSignalStrength
+android.hardware.radio.V1_0.IRadio
+android.hardware.radio.V1_0.IRadio$Proxy
+android.hardware.radio.V1_0.IRadioIndication
+android.hardware.radio.V1_0.IRadioIndication$Stub
+android.hardware.radio.V1_0.IRadioResponse
+android.hardware.radio.V1_0.IRadioResponse$Stub
+android.hardware.radio.V1_0.LteSignalStrength
+android.hardware.radio.V1_0.RadioResponseInfo
+android.hardware.radio.V1_0.SignalStrength
+android.hardware.radio.V1_0.TdScdmaSignalStrength
 android.hardware.soundtrigger.IRecognitionStatusCallback
 android.hardware.soundtrigger.IRecognitionStatusCallback$Stub
 android.hardware.soundtrigger.KeyphraseEnrollmentInfo
@@ -1757,21 +1809,28 @@
 android.hardware.usb.UsbAccessory
 android.hardware.usb.UsbDevice
 android.hardware.usb.UsbDeviceConnection
-android.hardware.usb.UsbInterface
 android.hardware.usb.UsbManager
 android.hardware.usb.UsbPort
 android.hardware.usb.UsbPort$1
 android.hardware.usb.UsbPortStatus
 android.hardware.usb.UsbPortStatus$1
 android.hardware.usb.UsbRequest
+android.hidl.base.V1_0.IBase
 android.icu.impl.BMPSet
 android.icu.impl.CacheBase
 android.icu.impl.CacheValue
 android.icu.impl.CacheValue$NullValue
 android.icu.impl.CacheValue$SoftValue
 android.icu.impl.CacheValue$Strength
-android.icu.impl.CalendarData
+android.icu.impl.CalendarAstronomer
+android.icu.impl.CalendarAstronomer$2
+android.icu.impl.CalendarAstronomer$CoordFunc
+android.icu.impl.CalendarAstronomer$Equatorial
+android.icu.impl.CalendarAstronomer$MoonAge
+android.icu.impl.CalendarAstronomer$SolarLongitude
 android.icu.impl.CalendarUtil
+android.icu.impl.CalendarUtil$CalendarPreferences
+android.icu.impl.CaseMap$StringContextIterator
 android.icu.impl.CharTrie
 android.icu.impl.CharacterIteration
 android.icu.impl.ClassLoaderUtil
@@ -1779,6 +1838,8 @@
 android.icu.impl.CurrencyData$CurrencyDisplayInfo
 android.icu.impl.CurrencyData$CurrencyDisplayInfoProvider
 android.icu.impl.CurrencyData$CurrencySpacingInfo
+android.icu.impl.CurrencyData$CurrencySpacingInfo$SpacingPattern
+android.icu.impl.CurrencyData$CurrencySpacingInfo$SpacingType
 android.icu.impl.DateNumberFormat
 android.icu.impl.DontCareFieldPosition
 android.icu.impl.Grego
@@ -1792,6 +1853,7 @@
 android.icu.impl.ICUConfig
 android.icu.impl.ICUCurrencyDisplayInfoProvider
 android.icu.impl.ICUCurrencyDisplayInfoProvider$ICUCurrencyDisplayInfo
+android.icu.impl.ICUCurrencyDisplayInfoProvider$ICUCurrencyDisplayInfo$SpacingInfoSink
 android.icu.impl.ICUCurrencyMetaInfo
 android.icu.impl.ICUCurrencyMetaInfo$Collector
 android.icu.impl.ICUCurrencyMetaInfo$CurrencyCollector
@@ -1809,8 +1871,11 @@
 android.icu.impl.ICUResourceBundle
 android.icu.impl.ICUResourceBundle$1
 android.icu.impl.ICUResourceBundle$2
-android.icu.impl.ICUResourceBundle$2$1
+android.icu.impl.ICUResourceBundle$3
+android.icu.impl.ICUResourceBundle$3$1
+android.icu.impl.ICUResourceBundle$4
 android.icu.impl.ICUResourceBundle$AvailEntry
+android.icu.impl.ICUResourceBundle$Loader
 android.icu.impl.ICUResourceBundle$OpenType
 android.icu.impl.ICUResourceBundle$WholeBundle
 android.icu.impl.ICUResourceBundleImpl
@@ -1844,6 +1909,7 @@
 android.icu.impl.JavaTimeZone
 android.icu.impl.LocaleDisplayNamesImpl
 android.icu.impl.LocaleDisplayNamesImpl$Cache
+android.icu.impl.LocaleDisplayNamesImpl$CapitalizationContextSink
 android.icu.impl.LocaleDisplayNamesImpl$CapitalizationContextUsage
 android.icu.impl.LocaleDisplayNamesImpl$DataTable
 android.icu.impl.LocaleDisplayNamesImpl$DataTables
@@ -1875,21 +1941,10 @@
 android.icu.impl.ReplaceableUCharacterIterator
 android.icu.impl.RuleCharacterIterator
 android.icu.impl.SimpleCache
-android.icu.impl.SimplePatternFormatter
+android.icu.impl.SimpleFormatterImpl
 android.icu.impl.SoftCache
 android.icu.impl.StandardPlural
 android.icu.impl.StringPrepDataReader
-android.icu.impl.TextTrieMap
-android.icu.impl.TextTrieMap$CharIterator
-android.icu.impl.TextTrieMap$Node
-android.icu.impl.TimeZoneNamesFactoryImpl
-android.icu.impl.TimeZoneNamesImpl
-android.icu.impl.TimeZoneNamesImpl$MZ2TZsCache
-android.icu.impl.TimeZoneNamesImpl$MZMapEntry
-android.icu.impl.TimeZoneNamesImpl$NameInfo
-android.icu.impl.TimeZoneNamesImpl$TZ2MZsCache
-android.icu.impl.TimeZoneNamesImpl$ZNames
-android.icu.impl.TimeZoneNamesImpl$ZNamesLoader
 android.icu.impl.Trie
 android.icu.impl.Trie$DataManipulate
 android.icu.impl.Trie$DefaultGetFoldingOffset
@@ -1942,8 +1997,10 @@
 android.icu.impl.UPropertyAliases
 android.icu.impl.UPropertyAliases$IsAcceptable
 android.icu.impl.URLHandler$URLVisitor
+android.icu.impl.UResource$Array
 android.icu.impl.UResource$Key
-android.icu.impl.UResource$TableSink
+android.icu.impl.UResource$Sink
+android.icu.impl.UResource$Table
 android.icu.impl.UResource$Value
 android.icu.impl.USerializedSet
 android.icu.impl.Utility
@@ -1979,7 +2036,6 @@
 android.icu.impl.locale.LocaleObjectCache$CacheEntry
 android.icu.impl.locale.LocaleSyntaxException
 android.icu.lang.UCharacter
-android.icu.lang.UCharacter$StringContextIterator
 android.icu.lang.UCharacterEnums$ECharacterCategory
 android.icu.lang.UCharacterEnums$ECharacterDirection
 android.icu.lang.UScript
@@ -2014,26 +2070,36 @@
 android.icu.text.DateFormat$BooleanAttribute
 android.icu.text.DateFormat$Field
 android.icu.text.DateFormatSymbols
+android.icu.text.DateFormatSymbols$1
+android.icu.text.DateFormatSymbols$CalendarDataSink
+android.icu.text.DateFormatSymbols$CalendarDataSink$AliasType
 android.icu.text.DateFormatSymbols$CapitalizationContextUsage
 android.icu.text.DateIntervalFormat
 android.icu.text.DateIntervalFormat$BestMatchInfo
 android.icu.text.DateIntervalFormat$SkeletonAndItsBestMatch
 android.icu.text.DateIntervalInfo
+android.icu.text.DateIntervalInfo$DateIntervalSink
 android.icu.text.DateIntervalInfo$PatternInfo
 android.icu.text.DateTimePatternGenerator
+android.icu.text.DateTimePatternGenerator$AppendItemFormatsSink
+android.icu.text.DateTimePatternGenerator$AppendItemNamesSink
+android.icu.text.DateTimePatternGenerator$AvailableFormatsSink
 android.icu.text.DateTimePatternGenerator$DTPGflags
 android.icu.text.DateTimePatternGenerator$DateTimeMatcher
+android.icu.text.DateTimePatternGenerator$DayPeriodAllowedHoursSink
 android.icu.text.DateTimePatternGenerator$DistanceInfo
 android.icu.text.DateTimePatternGenerator$FormatParser
 android.icu.text.DateTimePatternGenerator$PatternInfo
 android.icu.text.DateTimePatternGenerator$PatternWithMatcher
 android.icu.text.DateTimePatternGenerator$PatternWithSkeletonFlag
+android.icu.text.DateTimePatternGenerator$SkeletonFields
 android.icu.text.DateTimePatternGenerator$VariableField
 android.icu.text.DecimalFormat
 android.icu.text.DecimalFormat$Unit
 android.icu.text.DecimalFormatSymbols
 android.icu.text.DecimalFormatSymbols$1
 android.icu.text.DecimalFormatSymbols$CacheData
+android.icu.text.DecimalFormatSymbols$DecFmtDataSink
 android.icu.text.DigitList
 android.icu.text.DisplayContext
 android.icu.text.DisplayContext$Type
@@ -2045,14 +2111,6 @@
 android.icu.text.ListFormatter$Style
 android.icu.text.LocaleDisplayNames
 android.icu.text.LocaleDisplayNames$DialectHandling
-android.icu.text.MessageFormat
-android.icu.text.MessageFormat$AppendableWrapper
-android.icu.text.MessageFormat$Field
-android.icu.text.MessagePattern
-android.icu.text.MessagePattern$ApostropheMode
-android.icu.text.MessagePattern$ArgType
-android.icu.text.MessagePattern$Part
-android.icu.text.MessagePattern$Part$Type
 android.icu.text.Normalizer
 android.icu.text.Normalizer$FCDMode
 android.icu.text.Normalizer$Mode
@@ -2074,6 +2132,9 @@
 android.icu.text.NumberFormatServiceShim$NFService
 android.icu.text.NumberFormatServiceShim$NFService$1RBNumberFormatFactory
 android.icu.text.NumberingSystem
+android.icu.text.NumberingSystem$1
+android.icu.text.NumberingSystem$2
+android.icu.text.NumberingSystem$LocaleLookupData
 android.icu.text.PluralRanges
 android.icu.text.PluralRanges$Matrix
 android.icu.text.PluralRules
@@ -2101,20 +2162,18 @@
 android.icu.text.RelativeDateTimeFormatter
 android.icu.text.RelativeDateTimeFormatter$AbsoluteUnit
 android.icu.text.RelativeDateTimeFormatter$Cache
+android.icu.text.RelativeDateTimeFormatter$Cache$1
 android.icu.text.RelativeDateTimeFormatter$Direction
 android.icu.text.RelativeDateTimeFormatter$Loader
-android.icu.text.RelativeDateTimeFormatter$RelDateTimeFmtDataSink
-android.icu.text.RelativeDateTimeFormatter$RelDateTimeFmtDataSink$DateTimeUnit
-android.icu.text.RelativeDateTimeFormatter$RelDateTimeFmtDataSink$RelativeSink
-android.icu.text.RelativeDateTimeFormatter$RelDateTimeFmtDataSink$RelativeTimeDetailSink
-android.icu.text.RelativeDateTimeFormatter$RelDateTimeFmtDataSink$RelativeTimeSink
-android.icu.text.RelativeDateTimeFormatter$RelDateTimeFmtDataSink$UnitSink
+android.icu.text.RelativeDateTimeFormatter$RelDateTimeDataSink
+android.icu.text.RelativeDateTimeFormatter$RelDateTimeDataSink$DateTimeUnit
 android.icu.text.RelativeDateTimeFormatter$RelativeDateTimeFormatterData
 android.icu.text.RelativeDateTimeFormatter$RelativeUnit
 android.icu.text.RelativeDateTimeFormatter$Style
 android.icu.text.Replaceable
 android.icu.text.ReplaceableString
 android.icu.text.RuleBasedBreakIterator
+android.icu.text.RuleBasedBreakIterator$LookAheadResults
 android.icu.text.RuleBasedCollator
 android.icu.text.RuleBasedCollator$CollationBuffer
 android.icu.text.RuleBasedCollator$CollationKeyByteSink
@@ -2125,9 +2184,6 @@
 android.icu.text.SimpleDateFormat$PatternItem
 android.icu.text.StringPrep
 android.icu.text.StringPrepParseException
-android.icu.text.TimeZoneNames
-android.icu.text.TimeZoneNames$Cache
-android.icu.text.TimeZoneNames$Factory
 android.icu.text.TimeZoneNames$NameType
 android.icu.text.UCharacterIterator
 android.icu.text.UFieldPosition
@@ -2156,12 +2212,19 @@
 android.icu.util.CharsTrie
 android.icu.util.CharsTrie$Entry
 android.icu.util.CharsTrie$Iterator
+android.icu.util.ChineseCalendar
 android.icu.util.Currency
+android.icu.util.Currency$1
 android.icu.util.Currency$CurrencyUsage
 android.icu.util.Currency$EquivalenceRelation
 android.icu.util.CurrencyAmount
 android.icu.util.Freezable
 android.icu.util.GregorianCalendar
+android.icu.util.HebrewCalendar
+android.icu.util.ICUException
+android.icu.util.IndianCalendar
+android.icu.util.IslamicCalendar
+android.icu.util.IslamicCalendar$CalculationType
 android.icu.util.LocaleData
 android.icu.util.Measure
 android.icu.util.MeasureUnit
@@ -2175,11 +2238,13 @@
 android.icu.util.TimeZone
 android.icu.util.TimeZone$ConstantZone
 android.icu.util.ULocale
+android.icu.util.ULocale$1
+android.icu.util.ULocale$2
 android.icu.util.ULocale$Category
 android.icu.util.ULocale$JDKLocaleHelper
 android.icu.util.ULocale$Type
 android.icu.util.UResourceBundle
-android.icu.util.UResourceBundle$ResourceCacheKey
+android.icu.util.UResourceBundle$RootType
 android.icu.util.UResourceBundleIterator
 android.icu.util.UResourceTypeMismatchException
 android.icu.util.VersionInfo
@@ -2197,26 +2262,17 @@
 android.inputmethodservice.InputMethodService$InputMethodSessionImpl
 android.inputmethodservice.InputMethodService$Insets
 android.inputmethodservice.InputMethodService$SettingsObserver
-android.inputmethodservice.Keyboard
-android.inputmethodservice.Keyboard$Key
-android.inputmethodservice.Keyboard$Row
-android.inputmethodservice.KeyboardView
-android.inputmethodservice.KeyboardView$1
-android.inputmethodservice.KeyboardView$2
-android.inputmethodservice.KeyboardView$OnKeyboardActionListener
-android.inputmethodservice.KeyboardView$SwipeTracker
 android.inputmethodservice.SoftInputWindow
+android.inputmethodservice.SoftInputWindow$Callback
 android.location.Address
 android.location.Address$1
 android.location.Country
 android.location.Country$1
 android.location.CountryDetector
 android.location.CountryDetector$ListenerTransport
+android.location.CountryDetector$ListenerTransport$1
 android.location.CountryListener
 android.location.Criteria
-android.location.Criteria$1
-android.location.FusedBatchOptions
-android.location.FusedBatchOptions$1
 android.location.Geocoder
 android.location.GeocoderParams
 android.location.GeocoderParams$1
@@ -2238,11 +2294,8 @@
 android.location.ICountryListener
 android.location.ICountryListener$Stub
 android.location.ICountryListener$Stub$Proxy
-android.location.IFusedGeofenceHardware
-android.location.IFusedGeofenceHardware$Stub
 android.location.IFusedProvider
 android.location.IFusedProvider$Stub
-android.location.IFusedProvider$Stub$Proxy
 android.location.IGeocodeProvider
 android.location.IGeocodeProvider$Stub
 android.location.IGeocodeProvider$Stub$Proxy
@@ -2284,7 +2337,6 @@
 android.location.LocationProvider
 android.location.LocationRequest
 android.location.LocationRequest$1
-android.media.AmrInputStream
 android.media.AudioAttributes
 android.media.AudioAttributes$1
 android.media.AudioAttributes$Builder
@@ -2303,6 +2355,7 @@
 android.media.AudioManager
 android.media.AudioManager$1
 android.media.AudioManager$2
+android.media.AudioManager$3
 android.media.AudioManager$NativeEventHandlerDelegate
 android.media.AudioManager$NativeEventHandlerDelegate$1
 android.media.AudioManager$OnAmPortUpdateListener
@@ -2315,6 +2368,10 @@
 android.media.AudioMixPort
 android.media.AudioMixPortConfig
 android.media.AudioPatch
+android.media.AudioPlaybackConfiguration
+android.media.AudioPlaybackConfiguration$1
+android.media.AudioPlaybackConfiguration$IPlayerShell
+android.media.AudioPlaybackConfiguration$PlayerDeathMonitor
 android.media.AudioPort
 android.media.AudioPortConfig
 android.media.AudioPortEventHandler
@@ -2331,6 +2388,8 @@
 android.media.AudioSystem$ErrorCallback
 android.media.AudioTimestamp
 android.media.AudioTrack
+android.media.BufferingParams
+android.media.BufferingParams$1
 android.media.CamcorderProfile
 android.media.CameraProfile
 android.media.Cea708CaptionRenderer
@@ -2339,11 +2398,9 @@
 android.media.DeniedByServerException
 android.media.EncoderCapabilities
 android.media.ExifInterface
-android.media.ExifInterface$ByteOrderAwarenessDataInputStream
-android.media.ExifInterface$ByteOrderAwarenessDataOutputStream
+android.media.ExifInterface$ByteOrderedDataInputStream
 android.media.ExifInterface$ExifAttribute
 android.media.ExifInterface$ExifTag
-android.media.ExifInterface$Rational
 android.media.IAudioFocusDispatcher
 android.media.IAudioFocusDispatcher$Stub
 android.media.IAudioFocusDispatcher$Stub$Proxy
@@ -2357,12 +2414,23 @@
 android.media.IMediaHTTPConnection$Stub
 android.media.IMediaHTTPService
 android.media.IMediaHTTPService$Stub
+android.media.IMediaResourceMonitor
+android.media.IMediaResourceMonitor$Stub
 android.media.IMediaRouterClient
 android.media.IMediaRouterClient$Stub
 android.media.IMediaRouterClient$Stub$Proxy
 android.media.IMediaRouterService
 android.media.IMediaRouterService$Stub
 android.media.IMediaRouterService$Stub$Proxy
+android.media.IMediaScannerListener
+android.media.IMediaScannerListener$Stub
+android.media.IMediaScannerService
+android.media.IMediaScannerService$Stub
+android.media.IPlaybackConfigDispatcher
+android.media.IPlaybackConfigDispatcher$Stub
+android.media.IPlayer
+android.media.IPlayer$Stub
+android.media.IPlayer$Stub$Proxy
 android.media.IRecordingConfigDispatcher
 android.media.IRecordingConfigDispatcher$Stub
 android.media.IRemoteVolumeController
@@ -2390,14 +2458,10 @@
 android.media.ImageWriter$WriterSurfaceImage
 android.media.ImageWriter$WriterSurfaceImage$SurfacePlane
 android.media.JetPlayer
-android.media.MediaActionSound
-android.media.MediaActionSound$1
-android.media.MediaActionSound$SoundState
 android.media.MediaCodec
 android.media.MediaCodec$BufferInfo
 android.media.MediaCodec$BufferMap
 android.media.MediaCodec$BufferMap$CodecBuffer
-android.media.MediaCodec$Callback
 android.media.MediaCodec$CodecException
 android.media.MediaCodec$CryptoException
 android.media.MediaCodec$CryptoInfo
@@ -2413,7 +2477,6 @@
 android.media.MediaCodecInfo$VideoCapabilities
 android.media.MediaCodecList
 android.media.MediaCrypto
-android.media.MediaCryptoException
 android.media.MediaDescription
 android.media.MediaDescription$1
 android.media.MediaDescription$Builder
@@ -2423,7 +2486,6 @@
 android.media.MediaDrm$EventHandler
 android.media.MediaDrm$KeyRequest
 android.media.MediaDrm$MediaDrmStateException
-android.media.MediaDrm$OnEventListener
 android.media.MediaDrm$ProvisionRequest
 android.media.MediaDrmException
 android.media.MediaExtractor
@@ -2441,7 +2503,8 @@
 android.media.MediaPlayer
 android.media.MediaPlayer$1
 android.media.MediaPlayer$2
-android.media.MediaPlayer$2$1
+android.media.MediaPlayer$3
+android.media.MediaPlayer$3$1
 android.media.MediaPlayer$EventHandler
 android.media.MediaPlayer$OnBufferingUpdateListener
 android.media.MediaPlayer$OnCompletionListener
@@ -2473,6 +2536,7 @@
 android.media.MediaRouter$Static$Client$1
 android.media.MediaRouter$UserRouteInfo
 android.media.MediaRouter$VolumeCallback
+android.media.MediaRouter$VolumeCallbackInfo
 android.media.MediaRouter$VolumeChangeReceiver
 android.media.MediaRouter$WifiDisplayStatusChangedReceiver
 android.media.MediaRouterClientState
@@ -2480,7 +2544,13 @@
 android.media.MediaRouterClientState$RouteInfo
 android.media.MediaRouterClientState$RouteInfo$1
 android.media.MediaScanner
+android.media.MediaScanner$FileEntry
+android.media.MediaScanner$MediaBulkDeleter
+android.media.MediaScanner$MyMediaScannerClient
+android.media.MediaScannerClient
 android.media.MediaScannerConnection
+android.media.MediaScannerConnection$1
+android.media.MediaScannerConnection$ClientProxy
 android.media.MediaScannerConnection$MediaScannerConnectionClient
 android.media.MediaScannerConnection$OnScanCompletedListener
 android.media.MediaSync
@@ -2493,6 +2563,9 @@
 android.media.PlaybackParams$1
 android.media.PlayerBase
 android.media.PlayerBase$1
+android.media.PlayerBase$2
+android.media.PlayerBase$PlayerIdCard
+android.media.PlayerBase$PlayerIdCard$1
 android.media.Rating
 android.media.Rating$1
 android.media.RemoteControlClient
@@ -2504,7 +2577,6 @@
 android.media.Ringtone$MyOnCompletionListener
 android.media.RingtoneManager
 android.media.SoundPool
-android.media.SoundPool$1
 android.media.SoundPool$Builder
 android.media.SoundPool$EventHandler
 android.media.SoundPool$OnLoadCompleteListener
@@ -2520,7 +2592,6 @@
 android.media.ThumbnailUtils$SizedThumbnailBitmap
 android.media.ToneGenerator
 android.media.TtmlRenderer
-android.media.UnsupportedSchemeException
 android.media.Utils
 android.media.Utils$1
 android.media.Utils$2
@@ -2528,10 +2599,8 @@
 android.media.VolumePolicy$1
 android.media.VolumeProvider
 android.media.WebVttRenderer
-android.media.audiofx.AcousticEchoCanceler
 android.media.audiofx.AudioEffect
 android.media.audiofx.AudioEffect$Descriptor
-android.media.audiofx.AutomaticGainControl
 android.media.audiofx.BassBoost
 android.media.audiofx.BassBoost$Settings
 android.media.audiofx.Equalizer
@@ -2541,12 +2610,20 @@
 android.media.audiofx.Virtualizer
 android.media.audiofx.Virtualizer$Settings
 android.media.audiofx.Visualizer
+android.media.audiofx.Visualizer$OnDataCaptureListener
 android.media.audiopolicy.AudioMix
 android.media.audiopolicy.AudioMixingRule
 android.media.audiopolicy.AudioMixingRule$AudioMixMatchCriterion
 android.media.audiopolicy.AudioPolicyConfig
 android.media.audiopolicy.IAudioPolicyCallback
 android.media.audiopolicy.IAudioPolicyCallback$Stub
+android.media.browse.MediaBrowser
+android.media.browse.MediaBrowser$10
+android.media.browse.MediaBrowser$ConnectionCallback
+android.media.browse.MediaBrowser$MediaItem
+android.media.browse.MediaBrowser$MediaServiceConnection
+android.media.browse.MediaBrowser$MediaServiceConnection$1
+android.media.browse.MediaBrowser$ServiceCallbacks
 android.media.midi.IMidiDeviceListener
 android.media.midi.IMidiDeviceOpenCallback
 android.media.midi.IMidiDeviceServer
@@ -2569,6 +2646,8 @@
 android.media.session.IActiveSessionsListener
 android.media.session.IActiveSessionsListener$Stub
 android.media.session.IActiveSessionsListener$Stub$Proxy
+android.media.session.IOnMediaKeyListener
+android.media.session.IOnVolumeKeyLongPressListener
 android.media.session.ISession
 android.media.session.ISession$Stub
 android.media.session.ISession$Stub$Proxy
@@ -2617,12 +2696,12 @@
 android.media.tv.TvInputManager
 android.media.tv.TvStreamConfig
 android.media.tv.TvStreamConfig$Builder
+android.metrics.LogMaker
 android.mtp.MtpDatabase
 android.mtp.MtpDevice
 android.mtp.MtpDeviceInfo
 android.mtp.MtpEvent
 android.mtp.MtpObjectInfo
-android.mtp.MtpObjectInfo$Builder
 android.mtp.MtpPropertyGroup
 android.mtp.MtpPropertyList
 android.mtp.MtpServer
@@ -2632,14 +2711,13 @@
 android.net.ConnectivityManager$CallbackHandler
 android.net.ConnectivityManager$NetworkCallback
 android.net.ConnectivityManager$OnNetworkActiveListener
-android.net.ConnectivityManager$OnStartTetheringCallback
 android.net.ConnectivityManager$PacketKeepalive
 android.net.ConnectivityManager$PacketKeepaliveCallback
 android.net.ConnectivityMetricsEvent
 android.net.ConnectivityMetricsEvent$1
 android.net.ConnectivityMetricsEvent$Reference
-android.net.ConnectivityMetricsLogger
 android.net.ConnectivityThread
+android.net.ConnectivityThread$Singleton
 android.net.Credentials
 android.net.DataUsageRequest
 android.net.DhcpInfo
@@ -2649,16 +2727,22 @@
 android.net.EthernetManager
 android.net.EthernetManager$1
 android.net.EthernetManager$2
+android.net.EventLogTags
 android.net.IConnectivityManager
 android.net.IConnectivityManager$Stub
 android.net.IConnectivityManager$Stub$Proxy
 android.net.IConnectivityMetricsLogger
 android.net.IConnectivityMetricsLogger$Stub
-android.net.IConnectivityMetricsLogger$Stub$Proxy
 android.net.IEthernetManager
 android.net.IEthernetManager$Stub
 android.net.IEthernetServiceListener
 android.net.IEthernetServiceListener$Stub
+android.net.IIpConnectivityMetrics
+android.net.IIpConnectivityMetrics$Stub
+android.net.INetd
+android.net.INetd$Stub
+android.net.INetd$Stub$Proxy
+android.net.INetdEventCallback
 android.net.INetworkManagementEventObserver
 android.net.INetworkManagementEventObserver$Stub
 android.net.INetworkPolicyListener
@@ -2669,6 +2753,7 @@
 android.net.INetworkPolicyManager$Stub$Proxy
 android.net.INetworkScoreCache
 android.net.INetworkScoreCache$Stub
+android.net.INetworkScoreCache$Stub$Proxy
 android.net.INetworkScoreService
 android.net.INetworkScoreService$Stub
 android.net.INetworkScoreService$Stub$Proxy
@@ -2704,6 +2789,7 @@
 android.net.Network$2
 android.net.Network$NetworkBoundSocketFactory
 android.net.NetworkAgent
+android.net.NetworkBadging
 android.net.NetworkCapabilities
 android.net.NetworkCapabilities$1
 android.net.NetworkConfig
@@ -2725,6 +2811,7 @@
 android.net.NetworkRequest
 android.net.NetworkRequest$1
 android.net.NetworkRequest$Builder
+android.net.NetworkRequest$Type
 android.net.NetworkScoreManager
 android.net.NetworkScorerAppManager
 android.net.NetworkState
@@ -2745,13 +2832,17 @@
 android.net.Proxy
 android.net.ProxyInfo
 android.net.ProxyInfo$1
+android.net.RecommendationRequest
+android.net.RecommendationResult
 android.net.RouteInfo
 android.net.RouteInfo$1
 android.net.RssiCurve
+android.net.RssiCurve$1
 android.net.SSLCertificateSocketFactory
 android.net.SSLCertificateSocketFactory$1
 android.net.SSLSessionCache
 android.net.ScoredNetwork
+android.net.ScoredNetwork$1
 android.net.SntpClient
 android.net.StaticIpConfiguration
 android.net.StaticIpConfiguration$1
@@ -2771,7 +2862,7 @@
 android.net.Uri$PathSegmentsBuilder
 android.net.Uri$StringUri
 android.net.UrlQuerySanitizer
-android.net.UrlQuerySanitizer$ValueSanitizer
+android.net.VpnService
 android.net.WebAddress
 android.net.WifiKey
 android.net.WifiKey$1
@@ -2784,19 +2875,23 @@
 android.net.http.SslCertificate
 android.net.http.SslError
 android.net.http.X509TrustManagerExtensions
+android.net.metrics.ApfProgramEvent
+android.net.metrics.ApfProgramEvent$1
+android.net.metrics.ConnectStats
 android.net.metrics.DefaultNetworkEvent
 android.net.metrics.DefaultNetworkEvent$1
 android.net.metrics.DhcpClientEvent
 android.net.metrics.DhcpClientEvent$1
 android.net.metrics.DnsEvent
 android.net.metrics.DnsEvent$1
-android.net.metrics.IpConnectivityEvent
+android.net.metrics.IpConnectivityLog
 android.net.metrics.IpManagerEvent
 android.net.metrics.IpManagerEvent$1
-android.net.metrics.IpReachabilityEvent
-android.net.metrics.IpReachabilityEvent$1
 android.net.metrics.NetworkEvent
 android.net.metrics.NetworkEvent$1
+android.net.metrics.RaEvent
+android.net.metrics.RaEvent$1
+android.net.metrics.RaEvent$Builder
 android.net.metrics.ValidationProbeEvent
 android.net.metrics.ValidationProbeEvent$1
 android.net.metrics.ValidationProbeEvent$Decoder
@@ -2806,8 +2901,6 @@
 android.net.sip.ISipService
 android.net.sip.ISipService$Stub
 android.net.sip.SipManager
-android.net.sip.SipProfile
-android.net.sip.SipProfile$Builder
 android.net.wifi.IRttManager
 android.net.wifi.IRttManager$Stub
 android.net.wifi.IRttManager$Stub$Proxy
@@ -2817,9 +2910,10 @@
 android.net.wifi.IWifiScanner
 android.net.wifi.IWifiScanner$Stub
 android.net.wifi.IWifiScanner$Stub$Proxy
+android.net.wifi.ParcelUtil
+android.net.wifi.RssiPacketCountInfo
 android.net.wifi.RttManager
 android.net.wifi.RttManager$RttCapabilities
-android.net.wifi.RttManager$RttCapabilities$1
 android.net.wifi.RttManager$RttListener
 android.net.wifi.RttManager$RttResult
 android.net.wifi.RttManager$ServiceHandler
@@ -2831,6 +2925,7 @@
 android.net.wifi.SupplicantState$1
 android.net.wifi.WifiActivityEnergyInfo
 android.net.wifi.WifiActivityEnergyInfo$1
+android.net.wifi.WifiChannel
 android.net.wifi.WifiConfiguration
 android.net.wifi.WifiConfiguration$1
 android.net.wifi.WifiConfiguration$AuthAlgorithm
@@ -2844,9 +2939,6 @@
 android.net.wifi.WifiConnectionStatistics$1
 android.net.wifi.WifiEnterpriseConfig
 android.net.wifi.WifiEnterpriseConfig$1
-android.net.wifi.WifiEnterpriseConfig$Eap
-android.net.wifi.WifiEnterpriseConfig$Phase2
-android.net.wifi.WifiEnterpriseConfig$SupplicantLoader
 android.net.wifi.WifiInfo
 android.net.wifi.WifiInfo$1
 android.net.wifi.WifiLinkLayerStats
@@ -2855,25 +2947,30 @@
 android.net.wifi.WifiManager$ActionListener
 android.net.wifi.WifiManager$MulticastLock
 android.net.wifi.WifiManager$WifiLock
+android.net.wifi.WifiNetworkScoreCache
+android.net.wifi.WifiNetworkScoreCache$CacheListener
 android.net.wifi.WifiScanner
 android.net.wifi.WifiScanner$ActionListener
 android.net.wifi.WifiScanner$ChannelSpec
-android.net.wifi.WifiScanner$OperationResult
-android.net.wifi.WifiScanner$OperationResult$1
 android.net.wifi.WifiScanner$ParcelableScanData
 android.net.wifi.WifiScanner$ParcelableScanData$1
+android.net.wifi.WifiScanner$ParcelableScanResults
+android.net.wifi.WifiScanner$ParcelableScanResults$1
 android.net.wifi.WifiScanner$PnoScanListener
 android.net.wifi.WifiScanner$ScanData
 android.net.wifi.WifiScanner$ScanData$1
 android.net.wifi.WifiScanner$ScanListener
 android.net.wifi.WifiScanner$ScanSettings
 android.net.wifi.WifiScanner$ScanSettings$1
+android.net.wifi.WifiScanner$ScanSettings$HiddenNetwork
 android.net.wifi.WifiScanner$ServiceHandler
 android.net.wifi.WifiSsid
 android.net.wifi.WifiSsid$1
+android.net.wifi.WifiWakeReasonAndCounts
 android.net.wifi.WpsInfo
 android.net.wifi.WpsInfo$1
-android.net.wifi.nan.WifiNanManager
+android.net.wifi.aware.WifiAwareManager
+android.net.wifi.hotspot2.PasspointConfiguration
 android.net.wifi.p2p.IWifiP2pManager
 android.net.wifi.p2p.IWifiP2pManager$Stub
 android.net.wifi.p2p.WifiP2pConfig
@@ -2925,7 +3022,6 @@
 android.nfc.NfcAdapter$1
 android.nfc.NfcAdapter$CreateBeamUrisCallback
 android.nfc.NfcAdapter$CreateNdefMessageCallback
-android.nfc.NfcAdapter$NfcUnlockHandler
 android.nfc.NfcAdapter$OnNdefPushCompleteCallback
 android.nfc.NfcEvent
 android.nfc.NfcManager
@@ -2976,11 +3072,17 @@
 android.opengl.GLSurfaceView$GLThread
 android.opengl.GLSurfaceView$GLThreadManager
 android.opengl.GLSurfaceView$Renderer
+android.opengl.GLSurfaceView$SimpleEGLConfigChooser
 android.opengl.GLU
 android.opengl.GLUtils
 android.opengl.Matrix
 android.opengl.Visibility
+android.os.-$Lambda$0$-dncxFEc2F2bgG2fsIoC6FC6WNE
+android.os.-$Lambda$1$-dncxFEc2F2bgG2fsIoC6FC6WNE
+android.os.-$Lambda$5$6x30vPJhBKUfNY8tswxuZo3DCe0
+android.os.-$Lambda$67$OsaxDBgigpqjZN1F4C6nYRYm1YQ
 android.os.AsyncResult
+android.os.AsyncTask
 android.os.AsyncTask$1
 android.os.AsyncTask$2
 android.os.AsyncTask$3
@@ -3000,12 +3102,14 @@
 android.os.BatteryStats
 android.os.BatteryStats$BitDescription
 android.os.BatteryStats$ControllerActivityCounter
+android.os.BatteryStats$Counter
 android.os.BatteryStats$DailyItem
 android.os.BatteryStats$HistoryEventTracker
 android.os.BatteryStats$HistoryItem
 android.os.BatteryStats$HistoryPrinter
 android.os.BatteryStats$HistoryStepDetails
 android.os.BatteryStats$HistoryTag
+android.os.BatteryStats$IntToString
 android.os.BatteryStats$LevelStepTracker
 android.os.BatteryStats$LongCounter
 android.os.BatteryStats$PackageChange
@@ -3014,6 +3118,7 @@
 android.os.BatteryStats$Uid$Pid
 android.os.BatteryStats$Uid$Pkg
 android.os.BatteryStats$Uid$Pkg$Serv
+android.os.BatteryStats$Uid$Proc
 android.os.BatteryStats$Uid$Sensor
 android.os.BatteryStats$Uid$Wakelock
 android.os.Binder
@@ -3042,16 +3147,20 @@
 android.os.Environment
 android.os.Environment$UserEnvironment
 android.os.FactoryTest
-android.os.FileBridge
-android.os.FileBridge$FileBridgeOutputStream
+android.os.FileObserver
 android.os.FileObserver$ObserverThread
 android.os.FileUtils
+android.os.GraphicsEnvironment
 android.os.Handler
 android.os.Handler$BlockingRunnable
 android.os.Handler$Callback
 android.os.Handler$MessengerImpl
 android.os.HandlerThread
 android.os.HardwarePropertiesManager
+android.os.HwBinder
+android.os.HwBlob
+android.os.HwParcel
+android.os.HwRemoteBinder
 android.os.IBatteryPropertiesListener
 android.os.IBatteryPropertiesListener$Stub
 android.os.IBatteryPropertiesRegistrar
@@ -3062,11 +3171,22 @@
 android.os.ICancellationSignal
 android.os.ICancellationSignal$Stub
 android.os.ICancellationSignal$Stub$Proxy
+android.os.IDeviceIdentifiersPolicyService
+android.os.IDeviceIdentifiersPolicyService$Stub
 android.os.IDeviceIdleController
 android.os.IDeviceIdleController$Stub
 android.os.IDeviceIdleController$Stub$Proxy
 android.os.IHardwarePropertiesManager
 android.os.IHardwarePropertiesManager$Stub
+android.os.IHardwarePropertiesManager$Stub$Proxy
+android.os.IHwBinder
+android.os.IHwBinder$DeathRecipient
+android.os.IHwInterface
+android.os.IIncidentManager
+android.os.IIncidentManager$Stub
+android.os.IInstalld
+android.os.IInstalld$Stub
+android.os.IInstalld$Stub$Proxy
 android.os.IInterface
 android.os.IMaintenanceActivityListener
 android.os.IMessenger
@@ -3084,10 +3204,8 @@
 android.os.IProcessInfoService
 android.os.IProcessInfoService$Stub
 android.os.IProgressListener
-android.os.IProgressListener$Stub
 android.os.IRecoverySystem
 android.os.IRecoverySystem$Stub
-android.os.IRecoverySystem$Stub$Proxy
 android.os.IRecoverySystemProgressListener
 android.os.IRemoteCallback
 android.os.IRemoteCallback$Stub
@@ -3103,6 +3221,7 @@
 android.os.IVibratorService
 android.os.IVibratorService$Stub
 android.os.IVibratorService$Stub$Proxy
+android.os.IncidentManager
 android.os.LocaleList
 android.os.LocaleList$1
 android.os.Looper
@@ -3115,7 +3234,6 @@
 android.os.MessageQueue$OnFileDescriptorEventListener
 android.os.Messenger
 android.os.Messenger$1
-android.os.NetworkOnMainThreadException
 android.os.NullVibrator
 android.os.OperationCanceledException
 android.os.Parcel
@@ -3141,6 +3259,8 @@
 android.os.PersistableBundle
 android.os.PersistableBundle$1
 android.os.PersistableBundle$MyReadMapCallback
+android.os.PooledStringReader
+android.os.PooledStringWriter
 android.os.PowerManager
 android.os.PowerManager$WakeLock
 android.os.PowerManager$WakeLock$1
@@ -3148,12 +3268,14 @@
 android.os.PowerManagerInternal$LowPowerModeListener
 android.os.Process
 android.os.Process$ProcessStartResult
-android.os.Process$ZygoteState
 android.os.RecoverySystem
-android.os.RecoverySystem$ProgressListener
 android.os.Registrant
 android.os.RegistrantList
 android.os.RemoteCallback
+android.os.RemoteCallback$1
+android.os.RemoteCallback$2
+android.os.RemoteCallback$3
+android.os.RemoteCallback$OnResultListener
 android.os.RemoteCallbackList
 android.os.RemoteCallbackList$Callback
 android.os.RemoteException
@@ -3163,9 +3285,13 @@
 android.os.ResultReceiver$MyRunnable
 android.os.SELinux
 android.os.ServiceManager
+android.os.ServiceManager$ServiceNotFoundException
 android.os.ServiceManagerNative
 android.os.ServiceManagerProxy
 android.os.ServiceSpecificException
+android.os.ShellCallback
+android.os.ShellCallback$1
+android.os.ShellCommand
 android.os.StatFs
 android.os.StrictMode
 android.os.StrictMode$1
@@ -3191,6 +3317,7 @@
 android.os.StrictMode$ThreadPolicy$Builder
 android.os.StrictMode$ThreadSpanState
 android.os.StrictMode$ViolationInfo
+android.os.StrictMode$ViolationInfo$1
 android.os.StrictMode$VmPolicy
 android.os.StrictMode$VmPolicy$Builder
 android.os.SynchronousResultReceiver
@@ -3203,11 +3330,9 @@
 android.os.SystemVibrator
 android.os.TokenWatcher
 android.os.TokenWatcher$1
-android.os.TokenWatcher$Death
 android.os.Trace
 android.os.Trace$1
 android.os.TransactionTooLargeException
-android.os.TransactionTracker
 android.os.UEventObserver
 android.os.UEventObserver$UEvent
 android.os.UEventObserver$UEventThread
@@ -3220,26 +3345,30 @@
 android.os.Vibrator
 android.os.WorkSource
 android.os.WorkSource$1
+android.os.ZygoteProcess
+android.os.ZygoteProcess$ZygoteState
 android.os.ZygoteStartFailedEx
+android.os.health.HealthStats
 android.os.health.HealthStatsParceler
 android.os.health.SystemHealthManager
+android.os.health.TimerStat
 android.os.storage.DiskInfo
 android.os.storage.DiskInfo$1
-android.os.storage.IStorageManager
-android.os.storage.IStorageManager$Stub
-android.os.storage.IStorageManager$Stub$Proxy
+android.os.storage.IObbActionListener
+android.os.storage.IObbActionListener$Stub
 android.os.storage.IStorageEventListener
 android.os.storage.IStorageEventListener$Stub
 android.os.storage.IStorageEventListener$Stub$Proxy
+android.os.storage.IStorageManager
+android.os.storage.IStorageManager$Stub
+android.os.storage.IStorageManager$Stub$Proxy
 android.os.storage.IStorageShutdownObserver
-android.os.storage.IObbActionListener
-android.os.storage.IObbActionListener$Stub
-android.os.storage.StorageManagerInternal
-android.os.storage.StorageManagerInternal$ExternalStorageMountPolicy
 android.os.storage.StorageEventListener
 android.os.storage.StorageManager
 android.os.storage.StorageManager$ObbActionListener
 android.os.storage.StorageManager$StorageEventListenerDelegate
+android.os.storage.StorageManagerInternal
+android.os.storage.StorageManagerInternal$ExternalStorageMountPolicy
 android.os.storage.StorageVolume
 android.os.storage.StorageVolume$1
 android.os.storage.VolumeInfo
@@ -3247,30 +3376,30 @@
 android.os.storage.VolumeInfo$2
 android.os.storage.VolumeRecord
 android.os.storage.VolumeRecord$1
+android.permissionpresenterservice.RuntimePermissionPresenterService
+android.permissionpresenterservice.RuntimePermissionPresenterService$1
+android.permissionpresenterservice.RuntimePermissionPresenterService$MyHandler
+android.preference.CheckBoxPreference
 android.preference.DialogPreference
-android.preference.GenericInflater
 android.preference.GenericInflater$Parent
 android.preference.ListPreference
 android.preference.Preference
+android.preference.Preference$BaseSavedState
+android.preference.Preference$BaseSavedState$1
 android.preference.Preference$OnPreferenceChangeInternalListener
 android.preference.Preference$OnPreferenceChangeListener
 android.preference.Preference$OnPreferenceClickListener
 android.preference.PreferenceActivity
-android.preference.PreferenceActivity$1
-android.preference.PreferenceActivity$Header
-android.preference.PreferenceActivity$Header$1
 android.preference.PreferenceFragment
 android.preference.PreferenceFragment$1
 android.preference.PreferenceFragment$2
 android.preference.PreferenceFragment$3
 android.preference.PreferenceFragment$OnPreferenceStartFragmentCallback
 android.preference.PreferenceFrameLayout
-android.preference.PreferenceFrameLayout$LayoutParams
 android.preference.PreferenceGroup
 android.preference.PreferenceGroupAdapter
 android.preference.PreferenceGroupAdapter$1
 android.preference.PreferenceGroupAdapter$PreferenceLayout
-android.preference.PreferenceInflater
 android.preference.PreferenceManager
 android.preference.PreferenceManager$OnActivityDestroyListener
 android.preference.PreferenceManager$OnPreferenceTreeClickListener
@@ -3285,8 +3414,6 @@
 android.preference.TwoStatePreference
 android.print.IPrintDocumentAdapter
 android.print.IPrintJobStateChangeListener
-android.print.IPrintJobStateChangeListener$Stub
-android.print.IPrintJobStateChangeListener$Stub$Proxy
 android.print.IPrintManager
 android.print.IPrintManager$Stub
 android.print.IPrintManager$Stub$Proxy
@@ -3298,7 +3425,6 @@
 android.print.IPrintSpooler$Stub$Proxy
 android.print.IPrintSpoolerCallbacks
 android.print.IPrintSpoolerCallbacks$Stub
-android.print.IPrintSpoolerCallbacks$Stub$Proxy
 android.print.IPrintSpoolerClient
 android.print.IPrintSpoolerClient$Stub
 android.print.IPrintSpoolerClient$Stub$Proxy
@@ -3314,31 +3440,25 @@
 android.print.PrintDocumentAdapter$WriteResultCallback
 android.print.PrintDocumentInfo
 android.print.PrintDocumentInfo$Builder
-android.print.PrintJob
 android.print.PrintJobId
 android.print.PrintJobInfo
-android.print.PrintJobInfo$1
 android.print.PrintManager
 android.print.PrintManager$1
-android.print.PrintManager$PrintJobStateChangeListener
-android.print.PrintManager$PrintJobStateChangeListenerWrapper
 android.print.PrintManager$PrintServicesChangeListener
 android.print.PrintManager$PrintServicesChangeListenerWrapper
 android.print.PrintServicesLoader
 android.print.PrintServicesLoader$1
 android.print.PrintServicesLoader$MyHandler
 android.print.PrinterId
-android.print.pdf.PrintedPdfDocument
 android.printservice.IPrintServiceClient
 android.printservice.IPrintServiceClient$Stub
 android.printservice.PrintServiceInfo
 android.printservice.PrintServiceInfo$1
 android.printservice.recommendation.IRecommendationsChangeListener
+android.provider.-$Lambda$46$87WmhkvObehVg0OMBzwa_MTVV8g
 android.provider.BaseColumns
 android.provider.BlockedNumberContract
 android.provider.BlockedNumberContract$BlockedNumbers
-android.provider.BlockedNumberContract$SystemContract
-android.provider.BlockedNumberContract$SystemContract$BlockSuppressionStatus
 android.provider.CalendarContract
 android.provider.CalendarContract$Attendees
 android.provider.CalendarContract$AttendeesColumns
@@ -3367,12 +3487,16 @@
 android.provider.CallLog
 android.provider.CallLog$Calls
 android.provider.Contacts
+android.provider.Contacts$ContactMethods
+android.provider.Contacts$ContactMethodsColumns
+android.provider.Contacts$PeopleColumns
 android.provider.ContactsContract
 android.provider.ContactsContract$AggregationExceptions
 android.provider.ContactsContract$BaseSyncColumns
 android.provider.ContactsContract$CommonDataKinds$BaseTypes
 android.provider.ContactsContract$CommonDataKinds$Callable
 android.provider.ContactsContract$CommonDataKinds$CommonColumns
+android.provider.ContactsContract$CommonDataKinds$Contactables
 android.provider.ContactsContract$CommonDataKinds$Email
 android.provider.ContactsContract$CommonDataKinds$Event
 android.provider.ContactsContract$CommonDataKinds$Im
@@ -3385,7 +3509,6 @@
 android.provider.ContactsContract$ContactOptionsColumns
 android.provider.ContactsContract$ContactStatusColumns
 android.provider.ContactsContract$Contacts
-android.provider.ContactsContract$Contacts$AggregationSuggestions$Builder
 android.provider.ContactsContract$ContactsColumns
 android.provider.ContactsContract$Data
 android.provider.ContactsContract$DataColumns
@@ -3397,7 +3520,6 @@
 android.provider.ContactsContract$Directory
 android.provider.ContactsContract$DisplayPhoto
 android.provider.ContactsContract$Groups
-android.provider.ContactsContract$Groups$EntityIteratorImpl
 android.provider.ContactsContract$GroupsColumns
 android.provider.ContactsContract$MetadataSync
 android.provider.ContactsContract$MetadataSyncColumns
@@ -3408,7 +3530,6 @@
 android.provider.ContactsContract$ProviderStatus
 android.provider.ContactsContract$QuickContact
 android.provider.ContactsContract$RawContacts
-android.provider.ContactsContract$RawContacts$EntityIteratorImpl
 android.provider.ContactsContract$RawContactsColumns
 android.provider.ContactsContract$RawContactsEntity
 android.provider.ContactsContract$Settings
@@ -3418,8 +3539,8 @@
 android.provider.ContactsContract$StreamItemsColumns
 android.provider.ContactsContract$SyncColumns
 android.provider.ContactsContract$SyncState
+android.provider.ContactsInternal
 android.provider.DocumentsContract
-android.provider.DocumentsContract$Root
 android.provider.DocumentsProvider
 android.provider.Downloads
 android.provider.Downloads$Impl
@@ -3450,12 +3571,11 @@
 android.provider.SearchIndexablesContract
 android.provider.SearchIndexablesProvider
 android.provider.SearchRecentSuggestions
-android.provider.SearchRecentSuggestions$1
 android.provider.Settings
+android.provider.Settings$ContentProviderHolder
 android.provider.Settings$GenerationTracker
 android.provider.Settings$Global
 android.provider.Settings$NameValueCache
-android.provider.Settings$NameValueCache$-java_lang_String_getStringForUser_android_content_ContentResolver_cr_java_lang_String_name_int_userHandle_LambdaImpl0
 android.provider.Settings$NameValueTable
 android.provider.Settings$Secure
 android.provider.Settings$SettingNotFoundException
@@ -3492,18 +3612,21 @@
 android.provider.VoicemailContract$Status
 android.provider.VoicemailContract$Voicemails
 android.renderscript.Allocation
+android.renderscript.Allocation$MipmapControl
 android.renderscript.BaseObj
 android.renderscript.Element
-android.renderscript.Matrix4f
-android.renderscript.RSRuntimeException
+android.renderscript.Element$DataKind
+android.renderscript.Element$DataType
 android.renderscript.RenderScript
+android.renderscript.RenderScript$ContextType
+android.renderscript.RenderScript$MessageThread
 android.renderscript.RenderScriptCacheDir
 android.renderscript.Script
 android.renderscript.ScriptIntrinsic
 android.renderscript.ScriptIntrinsicBlur
 android.renderscript.Type
-android.security.Credentials
-android.security.FrameworkNetworkSecurityPolicy
+android.renderscript.Type$Builder
+android.renderscript.Type$CubemapFace
 android.security.GateKeeper
 android.security.IKeyChainService
 android.security.IKeyChainService$Stub
@@ -3514,10 +3637,11 @@
 android.security.KeyChain
 android.security.KeyChain$1
 android.security.KeyChain$KeyChainConnection
-android.security.KeyChainAliasCallback
 android.security.KeyStore
-android.security.KeyStore$State
 android.security.NetworkSecurityPolicy
+android.security.keymaster.IKeyAttestationApplicationIdProvider
+android.security.keymaster.IKeyAttestationApplicationIdProvider$Stub
+android.security.keymaster.KeyAttestationApplicationId
 android.security.keymaster.KeymasterArguments
 android.security.keymaster.KeymasterArguments$1
 android.security.keystore.AndroidKeyStoreBCWorkaroundProvider
@@ -3559,12 +3683,20 @@
 android.security.net.config.RootTrustManager
 android.security.net.config.RootTrustManagerFactorySpi
 android.security.net.config.SystemCertificateSource
-android.security.net.config.TrustAnchor
+android.security.net.config.SystemCertificateSource$NoPreloadHolder
 android.security.net.config.TrustedCertificateStoreAdapter
 android.security.net.config.UserCertificateSource
+android.security.net.config.UserCertificateSource$NoPreloadHolder
+android.security.net.config.XmlConfigSource
+android.security.net.config.XmlConfigSource$ParserException
+android.service.autofill.IAutoFillManagerService
+android.service.autofill.IAutoFillManagerService$Stub
+android.service.autofill.IAutoFillManagerService$Stub$Proxy
 android.service.carrier.CarrierIdentifier
+android.service.carrier.CarrierIdentifier$1
 android.service.carrier.ICarrierService
 android.service.carrier.ICarrierService$Stub
+android.service.carrier.ICarrierService$Stub$Proxy
 android.service.chooser.ChooserTarget
 android.service.chooser.ChooserTargetService
 android.service.dreams.DreamManagerInternal
@@ -3580,13 +3712,22 @@
 android.service.dreams.IDreamService
 android.service.dreams.IDreamService$Stub
 android.service.dreams.IDreamService$Stub$Proxy
-android.service.gatekeeper.GateKeeperResponse
-android.service.gatekeeper.GateKeeperResponse$1
 android.service.gatekeeper.IGateKeeperService
 android.service.gatekeeper.IGateKeeperService$Stub
 android.service.gatekeeper.IGateKeeperService$Stub$Proxy
-android.service.media.CameraPrewarmService
+android.service.media.IMediaBrowserService
+android.service.media.IMediaBrowserService$Stub
+android.service.media.IMediaBrowserService$Stub$Proxy
+android.service.media.IMediaBrowserServiceCallbacks
+android.service.media.IMediaBrowserServiceCallbacks$Stub
+android.service.media.IMediaBrowserServiceCallbacks$Stub$Proxy
 android.service.media.MediaBrowserService
+android.service.media.MediaBrowserService$1
+android.service.media.MediaBrowserService$BrowserRoot
+android.service.media.MediaBrowserService$ConnectionRecord
+android.service.media.MediaBrowserService$Result
+android.service.media.MediaBrowserService$ServiceBinder
+android.service.media.MediaBrowserService$ServiceBinder$1
 android.service.notification.Adjustment
 android.service.notification.Condition
 android.service.notification.Condition$1
@@ -3597,6 +3738,7 @@
 android.service.notification.IConditionListener$Stub
 android.service.notification.IConditionProvider
 android.service.notification.IConditionProvider$Stub
+android.service.notification.IConditionProvider$Stub$Proxy
 android.service.notification.INotificationListener
 android.service.notification.INotificationListener$Stub
 android.service.notification.INotificationListener$Stub$Proxy
@@ -3609,9 +3751,6 @@
 android.service.notification.NotificationListenerService$Ranking
 android.service.notification.NotificationListenerService$RankingMap
 android.service.notification.NotificationListenerService$RankingMap$1
-android.service.notification.NotificationAssistantService
-android.service.notification.NotificationAssistantService$MyHandler
-android.service.notification.NotificationAssistantService$NotificationRankingServiceWrapper
 android.service.notification.NotificationRankingUpdate
 android.service.notification.NotificationRankingUpdate$1
 android.service.notification.StatusBarNotification
@@ -3620,9 +3759,7 @@
 android.service.notification.ZenModeConfig$1
 android.service.notification.ZenModeConfig$Diff
 android.service.notification.ZenModeConfig$EventInfo
-android.service.notification.ZenModeConfig$Migration
 android.service.notification.ZenModeConfig$ScheduleInfo
-android.service.notification.ZenModeConfig$XmlV1
 android.service.notification.ZenModeConfig$ZenRule
 android.service.notification.ZenModeConfig$ZenRule$1
 android.service.persistentdata.IPersistentDataBlockService
@@ -3633,6 +3770,7 @@
 android.service.quicksettings.IQSService$Stub
 android.service.quicksettings.IQSTileService
 android.service.quicksettings.Tile
+android.service.quicksettings.Tile$1
 android.service.quicksettings.TileService
 android.service.textservice.SpellCheckerService
 android.service.textservice.SpellCheckerService$InternalISpellCheckerSession
@@ -3641,16 +3779,6 @@
 android.service.textservice.SpellCheckerService$SentenceLevelAdapter$SentenceWordItem
 android.service.textservice.SpellCheckerService$Session
 android.service.textservice.SpellCheckerService$SpellCheckerServiceBinder
-android.service.trust.ITrustAgentService
-android.service.trust.ITrustAgentService$Stub
-android.service.trust.ITrustAgentService$Stub$Proxy
-android.service.trust.ITrustAgentServiceCallback
-android.service.trust.ITrustAgentServiceCallback$Stub
-android.service.trust.ITrustAgentServiceCallback$Stub$Proxy
-android.service.trust.TrustAgentService
-android.service.trust.TrustAgentService$1
-android.service.trust.TrustAgentService$ConfigurationData
-android.service.trust.TrustAgentService$TrustAgentServiceWrapper
 android.service.voice.AlwaysOnHotwordDetector
 android.service.voice.AlwaysOnHotwordDetector$Callback
 android.service.voice.AlwaysOnHotwordDetector$EventPayload
@@ -3661,12 +3789,33 @@
 android.service.voice.IVoiceInteractionService$Stub
 android.service.voice.IVoiceInteractionService$Stub$Proxy
 android.service.voice.IVoiceInteractionSession
+android.service.voice.IVoiceInteractionSession$Stub
+android.service.voice.IVoiceInteractionSession$Stub$Proxy
+android.service.voice.IVoiceInteractionSessionService
+android.service.voice.IVoiceInteractionSessionService$Stub
+android.service.voice.IVoiceInteractionSessionService$Stub$Proxy
 android.service.voice.VoiceInteractionManagerInternal
 android.service.voice.VoiceInteractionService
 android.service.voice.VoiceInteractionService$1
 android.service.voice.VoiceInteractionService$MyHandler
 android.service.voice.VoiceInteractionServiceInfo
 android.service.voice.VoiceInteractionSession
+android.service.voice.VoiceInteractionSession$1
+android.service.voice.VoiceInteractionSession$2
+android.service.voice.VoiceInteractionSession$2$1
+android.service.voice.VoiceInteractionSession$3
+android.service.voice.VoiceInteractionSession$4
+android.service.voice.VoiceInteractionSession$AbortVoiceRequest
+android.service.voice.VoiceInteractionSession$CommandRequest
+android.service.voice.VoiceInteractionSession$CompleteVoiceRequest
+android.service.voice.VoiceInteractionSession$ConfirmationRequest
+android.service.voice.VoiceInteractionSession$Insets
+android.service.voice.VoiceInteractionSession$MyCallbacks
+android.service.voice.VoiceInteractionSession$PickOptionRequest
+android.service.voice.VoiceInteractionSession$Request
+android.service.voice.VoiceInteractionSessionService
+android.service.voice.VoiceInteractionSessionService$1
+android.service.voice.VoiceInteractionSessionService$2
 android.service.vr.IVrManager
 android.service.vr.IVrManager$Stub
 android.service.vr.IVrManager$Stub$Proxy
@@ -3733,6 +3882,7 @@
 android.system.StructFlock
 android.system.StructGroupReq
 android.system.StructGroupSourceReq
+android.system.StructIfaddrs
 android.system.StructLinger
 android.system.StructPasswd
 android.system.StructPollfd
@@ -3742,6 +3892,7 @@
 android.system.StructUcred
 android.system.StructUtsname
 android.system.UnixSocketAddress
+android.telecom.-$Lambda$3$afyb_ODGzn3xMew6fjs8ANSIdVo
 android.telecom.AudioState
 android.telecom.AudioState$1
 android.telecom.Call
@@ -3760,8 +3911,8 @@
 android.telecom.Connection
 android.telecom.Connection$1
 android.telecom.Connection$2
+android.telecom.Connection$FailureSignalingConnection
 android.telecom.Connection$Listener
-android.telecom.Connection$VideoProvider
 android.telecom.ConnectionRequest
 android.telecom.ConnectionRequest$1
 android.telecom.ConnectionService
@@ -3783,12 +3934,29 @@
 android.telecom.InCallService$2
 android.telecom.InCallService$InCallServiceBinder
 android.telecom.InCallService$VideoCall
-android.telecom.InCallService$VideoCall$Callback
 android.telecom.Log
 android.telecom.Log$1
+android.telecom.Logging.-$Lambda$2$OwO3BlCgqcOx28O1BaOAPVPor24
+android.telecom.Logging.-$Lambda$35$OwO3BlCgqcOx28O1BaOAPVPor24
+android.telecom.Logging.-$Lambda$47$OwO3BlCgqcOx28O1BaOAPVPor24
+android.telecom.Logging.EventManager
+android.telecom.Logging.EventManager$Event
+android.telecom.Logging.EventManager$EventListener
+android.telecom.Logging.EventManager$EventRecord
+android.telecom.Logging.EventManager$Loggable
+android.telecom.Logging.EventManager$TimedEventPair
+android.telecom.Logging.Runnable
+android.telecom.Logging.Runnable$1
+android.telecom.Logging.Session
+android.telecom.Logging.Session$Info
+android.telecom.Logging.Session$Info$1
+android.telecom.Logging.SessionManager
+android.telecom.Logging.SessionManager$ICurrentThreadId
+android.telecom.Logging.SessionManager$ISessionCleanupTimeoutMs
+android.telecom.Logging.SessionManager$ISessionIdQueryHandler
+android.telecom.Logging.SessionManager$ISessionListener
 android.telecom.ParcelableCall
 android.telecom.ParcelableCall$1
-android.telecom.ParcelableCallAnalytics
 android.telecom.ParcelableConference
 android.telecom.ParcelableConnection
 android.telecom.ParcelableConnection$1
@@ -3800,40 +3968,41 @@
 android.telecom.PhoneAccountHandle
 android.telecom.PhoneAccountHandle$1
 android.telecom.RemoteConnectionManager
-android.telecom.Response
 android.telecom.StatusHints
+android.telecom.TelecomAnalytics
+android.telecom.TelecomAnalytics$SessionTiming
+android.telecom.TelecomAnalytics$SessionTiming$1
 android.telecom.TelecomManager
+android.telecom.TimedEvent
 android.telecom.VideoProfile
 android.telecom.VideoProfile$1
-android.telecom.Voicemail
-android.telecom.Voicemail$Builder
 android.telephony.CarrierConfigManager
 android.telephony.CellBroadcastMessage
 android.telephony.CellIdentityCdma
 android.telephony.CellIdentityGsm
 android.telephony.CellIdentityLte
-android.telephony.CellIdentityLte$1
 android.telephony.CellIdentityWcdma
+android.telephony.CellIdentityWcdma$1
 android.telephony.CellInfo
 android.telephony.CellInfo$1
 android.telephony.CellInfoCdma
 android.telephony.CellInfoGsm
 android.telephony.CellInfoLte
-android.telephony.CellInfoLte$1
 android.telephony.CellInfoWcdma
+android.telephony.CellInfoWcdma$1
 android.telephony.CellLocation
 android.telephony.CellSignalStrength
 android.telephony.CellSignalStrengthCdma
 android.telephony.CellSignalStrengthGsm
 android.telephony.CellSignalStrengthLte
-android.telephony.CellSignalStrengthLte$1
 android.telephony.CellSignalStrengthWcdma
+android.telephony.CellSignalStrengthWcdma$1
+android.telephony.ClientRequestStats
+android.telephony.ClientRequestStats$1
 android.telephony.DisconnectCause
 android.telephony.IccOpenLogicalChannelResponse
 android.telephony.ModemActivityInfo
 android.telephony.ModemActivityInfo$1
-android.telephony.NeighboringCellInfo
-android.telephony.NeighboringCellInfo$1
 android.telephony.PhoneNumberFormattingTextWatcher
 android.telephony.PhoneNumberUtils
 android.telephony.PhoneStateListener
@@ -3844,7 +4013,6 @@
 android.telephony.PreciseDataConnectionState
 android.telephony.PreciseDataConnectionState$1
 android.telephony.RadioAccessFamily
-android.telephony.RadioAccessFamily$1
 android.telephony.Rlog
 android.telephony.ServiceState
 android.telephony.ServiceState$1
@@ -3859,26 +4027,41 @@
 android.telephony.SubscriptionManager$OnSubscriptionsChangedListener
 android.telephony.SubscriptionManager$OnSubscriptionsChangedListener$1
 android.telephony.SubscriptionManager$OnSubscriptionsChangedListener$2
+android.telephony.TelephonyHistogram
+android.telephony.TelephonyHistogram$1
 android.telephony.TelephonyManager
 android.telephony.TelephonyManager$MultiSimVariants
+android.telephony.VisualVoicemailSmsFilterSettings
 android.telephony.VoLteServiceState
 android.telephony.VoLteServiceState$1
 android.telephony.cdma.CdmaCellLocation
+android.telephony.cdma.CdmaSmsCbProgramData
 android.telephony.gsm.GsmCellLocation
 android.telephony.gsm.SmsMessage
 android.text.AndroidBidi
 android.text.AndroidCharacter
 android.text.Annotation
-android.text.AutoText
 android.text.BidiFormatter
 android.text.BidiFormatter$DirectionalityEstimator
 android.text.BoringLayout
 android.text.BoringLayout$Metrics
+android.text.CharSequenceCharacterIterator
 android.text.ClipboardManager
 android.text.DynamicLayout
 android.text.DynamicLayout$ChangeWatcher
 android.text.Editable
 android.text.Editable$Factory
+android.text.FontConfig
+android.text.FontConfig$1
+android.text.FontConfig$Alias
+android.text.FontConfig$Alias$1
+android.text.FontConfig$Axis
+android.text.FontConfig$Axis$1
+android.text.FontConfig$Family
+android.text.FontConfig$Family$1
+android.text.FontConfig$Font
+android.text.FontConfig$Font$1
+android.text.FontManager
 android.text.GetChars
 android.text.GraphicsOperations
 android.text.Html
@@ -3889,6 +4072,8 @@
 android.text.HtmlToSpannedConverter$Bold
 android.text.HtmlToSpannedConverter$Href
 android.text.Hyphenator
+android.text.ITextClassificationService
+android.text.ITextClassificationService$Stub
 android.text.InputFilter
 android.text.InputFilter$LengthFilter
 android.text.InputType
@@ -3948,16 +4133,12 @@
 android.text.method.BaseKeyListener
 android.text.method.BaseMovementMethod
 android.text.method.DialerKeyListener
-android.text.method.DigitsKeyListener
 android.text.method.KeyListener
 android.text.method.LinkMovementMethod
 android.text.method.MetaKeyKeyListener
 android.text.method.MovementMethod
 android.text.method.NumberKeyListener
 android.text.method.PasswordTransformationMethod
-android.text.method.PasswordTransformationMethod$PasswordCharSequence
-android.text.method.PasswordTransformationMethod$ViewReference
-android.text.method.PasswordTransformationMethod$Visible
 android.text.method.QwertyKeyListener
 android.text.method.QwertyKeyListener$Replaced
 android.text.method.ReplacementTransformationMethod
@@ -3975,7 +4156,6 @@
 android.text.method.WordIterator
 android.text.style.AbsoluteSizeSpan
 android.text.style.AlignmentSpan
-android.text.style.AlignmentSpan$Standard
 android.text.style.BackgroundColorSpan
 android.text.style.BulletSpan
 android.text.style.CharacterStyle
@@ -3994,7 +4174,6 @@
 android.text.style.MetricAffectingSpan
 android.text.style.MetricAffectingSpan$Passthrough
 android.text.style.ParagraphStyle
-android.text.style.QuoteSpan
 android.text.style.RelativeSizeSpan
 android.text.style.ReplacementSpan
 android.text.style.SpellCheckSpan
@@ -4002,7 +4181,6 @@
 android.text.style.StyleSpan
 android.text.style.SubscriptSpan
 android.text.style.SuggestionSpan
-android.text.style.SuggestionSpan$1
 android.text.style.SuperscriptSpan
 android.text.style.TabStopSpan
 android.text.style.TextAppearanceSpan
@@ -4012,7 +4190,6 @@
 android.text.style.TtsSpan$SemioticClassBuilder
 android.text.style.TtsSpan$TelephoneBuilder
 android.text.style.TtsSpan$TextBuilder
-android.text.style.TtsSpan$VerbatimBuilder
 android.text.style.TypefaceSpan
 android.text.style.URLSpan
 android.text.style.UnderlineSpan
@@ -4028,7 +4205,6 @@
 android.text.util.Linkify$TransformFilter
 android.text.util.Rfc822Token
 android.text.util.Rfc822Tokenizer
-android.transition.ArcMotion
 android.transition.AutoTransition
 android.transition.ChangeBounds
 android.transition.ChangeBounds$1
@@ -4051,8 +4227,6 @@
 android.transition.ChangeTransform$GhostListener
 android.transition.ChangeTransform$PathAnimatorMatrix
 android.transition.ChangeTransform$Transforms
-android.transition.CircularPropagation
-android.transition.Explode
 android.transition.Fade
 android.transition.Fade$1
 android.transition.Fade$FadeAnimatorListener
@@ -4074,7 +4248,6 @@
 android.transition.Transition$2
 android.transition.Transition$3
 android.transition.Transition$AnimationInfo
-android.transition.Transition$ArrayListManager
 android.transition.Transition$EpicenterCallback
 android.transition.Transition$TransitionListener
 android.transition.Transition$TransitionListenerAdapter
@@ -4087,7 +4260,6 @@
 android.transition.TransitionSet$1
 android.transition.TransitionSet$TransitionSetListener
 android.transition.TransitionUtils
-android.transition.TransitionUtils$MatrixEvaluator
 android.transition.TransitionValues
 android.transition.TransitionValuesMaps
 android.transition.TranslationAnimationCreator
@@ -4109,7 +4281,7 @@
 android.util.Base64$Coder
 android.util.Base64$Decoder
 android.util.Base64$Encoder
-android.util.Base64DataException
+android.util.BootTimingsTraceLog
 android.util.ContainerHelpers
 android.util.DebugUtils
 android.util.DisplayMetrics
@@ -4130,12 +4302,14 @@
 android.util.Log
 android.util.Log$1
 android.util.Log$ImmediateLogWriter
-android.util.Log$TerribleFailure
+android.util.Log$NoPreloadHolder
 android.util.Log$TerribleFailureHandler
 android.util.LogPrinter
+android.util.LongArray
 android.util.LongSparseArray
 android.util.LongSparseLongArray
 android.util.LruCache
+android.util.MalformedJsonException
 android.util.MapCollections
 android.util.MapCollections$ArrayIterator
 android.util.MapCollections$EntrySet
@@ -4161,6 +4335,7 @@
 android.util.Property
 android.util.Range
 android.util.Rational
+android.util.ReflectiveProperty
 android.util.Singleton
 android.util.Size
 android.util.SizeF
@@ -4172,7 +4347,6 @@
 android.util.Spline
 android.util.Spline$MonotoneCubicSpline
 android.util.StateSet
-android.util.StringBuilderPrinter
 android.util.SuperNotCalledException
 android.util.TimeFormatException
 android.util.TimeUtils
@@ -4184,18 +4358,17 @@
 android.util.Xml$Encoding
 android.util.Xml$XmlSerializerFactory
 android.util.apk.ApkSignatureSchemeV2Verifier
+android.util.apk.ApkSignatureSchemeV2Verifier$ByteBufferDataSource
+android.util.apk.ApkSignatureSchemeV2Verifier$DataSource
+android.util.apk.ApkSignatureSchemeV2Verifier$MemoryMappedFileDataSource
+android.util.apk.ApkSignatureSchemeV2Verifier$SignatureInfo
 android.util.apk.ApkSignatureSchemeV2Verifier$SignatureNotFoundException
+android.util.apk.ApkSignatureSchemeV2Verifier$VerbatimX509Certificate
+android.util.apk.ApkSignatureSchemeV2Verifier$WrappedX509Certificate
 android.util.apk.ZipUtils
 android.util.jar.StrictJarFile
-android.util.jar.StrictJarFile$EntryIterator
-android.util.jar.StrictJarFile$JarFileInputStream
-android.util.jar.StrictJarFile$RAFStream
-android.util.jar.StrictJarFile$ZipInflaterInputStream
-android.util.jar.StrictJarManifest
-android.util.jar.StrictJarManifest$Chunk
-android.util.jar.StrictJarManifestReader
-android.util.jar.StrictJarVerifier
-android.util.jar.StrictJarVerifier$VerifierEntry
+android.view.-$Lambda$48$iU_USrtPm1XIm5H9QYQvXfBGDE4
+android.view.-$Lambda$49$iU_USrtPm1XIm5H9QYQvXfBGDE4
 android.view.AbsSavedState
 android.view.AbsSavedState$1
 android.view.AbsSavedState$2
@@ -4219,8 +4392,6 @@
 android.view.ContextMenu$ContextMenuInfo
 android.view.ContextThemeWrapper
 android.view.Display
-android.view.Display$ColorTransform
-android.view.Display$ColorTransform$1
 android.view.Display$HdrCapabilities
 android.view.Display$HdrCapabilities$1
 android.view.Display$Mode
@@ -4247,8 +4418,6 @@
 android.view.GestureDetector$OnGestureListener
 android.view.GestureDetector$SimpleOnGestureListener
 android.view.GhostView
-android.view.GraphicBuffer
-android.view.GraphicBuffer$1
 android.view.Gravity
 android.view.HandlerActionQueue
 android.view.HandlerActionQueue$HandlerAction
@@ -4266,8 +4435,15 @@
 android.view.IGraphicsStats$Stub$Proxy
 android.view.IInputFilter
 android.view.IOnKeyguardExitResult
+android.view.IPinnedStackController
+android.view.IPinnedStackController$Stub
+android.view.IPinnedStackController$Stub$Proxy
+android.view.IPinnedStackListener
+android.view.IPinnedStackListener$Stub
+android.view.IPinnedStackListener$Stub$Proxy
 android.view.IRotationWatcher
 android.view.IRotationWatcher$Stub
+android.view.IRotationWatcher$Stub$Proxy
 android.view.IWindow
 android.view.IWindow$Stub
 android.view.IWindow$Stub$Proxy
@@ -4307,8 +4483,6 @@
 android.view.KeyEvent$1
 android.view.KeyEvent$Callback
 android.view.KeyEvent$DispatcherState
-android.view.KeyboardShortcutGroup
-android.view.KeyboardShortcutInfo
 android.view.LayoutInflater
 android.view.LayoutInflater$Factory
 android.view.LayoutInflater$Factory2
@@ -4327,16 +4501,20 @@
 android.view.MotionEvent$PointerProperties
 android.view.NotificationHeaderView
 android.view.NotificationHeaderView$1
+android.view.NotificationHeaderView$2
 android.view.NotificationHeaderView$HeaderTouchListener
 android.view.OrientationEventListener
 android.view.OrientationEventListener$SensorEventListenerImpl
 android.view.PointerIcon
 android.view.PointerIcon$1
+android.view.RecordingCanvas
 android.view.RemotableViewMethod
 android.view.RenderNode
+android.view.RenderNode$NoImagePreloadHolder
 android.view.RenderNodeAnimator
 android.view.RenderNodeAnimator$1
 android.view.RenderNodeAnimator$DelayedAnimationHelper
+android.view.RenderNodeAnimatorSetHelper
 android.view.ScaleGestureDetector
 android.view.ScaleGestureDetector$1
 android.view.ScaleGestureDetector$OnScaleGestureListener
@@ -4347,6 +4525,7 @@
 android.view.Surface
 android.view.Surface$1
 android.view.Surface$CompatibleCanvas
+android.view.Surface$HwuiContext
 android.view.Surface$OutOfResourcesException
 android.view.SurfaceControl
 android.view.SurfaceControl$PhysicalDisplayInfo
@@ -4364,7 +4543,7 @@
 android.view.TextureView$1
 android.view.TextureView$SurfaceTextureListener
 android.view.ThreadedRenderer
-android.view.ThreadedRenderer$HardwareDrawCallbacks
+android.view.ThreadedRenderer$DrawCallbacks
 android.view.ThreadedRenderer$ProcessInitializer
 android.view.TouchDelegate
 android.view.VelocityTracker
@@ -4412,21 +4591,24 @@
 android.view.View$PerformClick
 android.view.View$ScrollabilityCache
 android.view.View$TintInfo
+android.view.View$TooltipInfo
 android.view.View$TransformationInfo
 android.view.View$UnsetPressedState
 android.view.ViewAnimationUtils
 android.view.ViewConfiguration
+android.view.ViewDebug$CapturedViewProperty
+android.view.ViewDebug$ExportedProperty
 android.view.ViewDebug$HierarchyHandler
 android.view.ViewGroup
 android.view.ViewGroup$1
 android.view.ViewGroup$2
 android.view.ViewGroup$3
+android.view.ViewGroup$4
 android.view.ViewGroup$LayoutParams
 android.view.ViewGroup$MarginLayoutParams
 android.view.ViewGroup$OnHierarchyChangeListener
 android.view.ViewGroup$TouchTarget
 android.view.ViewGroupOverlay
-android.view.ViewHierarchyEncoder
 android.view.ViewManager
 android.view.ViewOutlineProvider
 android.view.ViewOutlineProvider$1
@@ -4489,6 +4671,7 @@
 android.view.Window
 android.view.Window$Callback
 android.view.Window$OnWindowDismissedCallback
+android.view.Window$OnWindowSwipeDismissedCallback
 android.view.Window$WindowControllerCallback
 android.view.WindowAnimationFrameStats
 android.view.WindowAnimationFrameStats$1
@@ -4520,18 +4703,20 @@
 android.view.WindowManagerPolicy$OnKeyguardExitResult
 android.view.WindowManagerPolicy$PointerEventListener
 android.view.WindowManagerPolicy$ScreenOnListener
+android.view.WindowManagerPolicy$StartingSurface
 android.view.WindowManagerPolicy$WindowManagerFuncs
 android.view.WindowManagerPolicy$WindowState
 android.view.accessibility.AccessibilityEvent
-android.view.accessibility.AccessibilityEvent$1
 android.view.accessibility.AccessibilityEventSource
 android.view.accessibility.AccessibilityManager
 android.view.accessibility.AccessibilityManager$1
+android.view.accessibility.AccessibilityManager$AccessibilityServicesStateChangeListener
 android.view.accessibility.AccessibilityManager$AccessibilityStateChangeListener
 android.view.accessibility.AccessibilityManager$HighTextContrastChangeListener
 android.view.accessibility.AccessibilityManager$MyHandler
 android.view.accessibility.AccessibilityManager$TouchExplorationStateChangeListener
 android.view.accessibility.AccessibilityNodeInfo
+android.view.accessibility.AccessibilityNodeInfo$1
 android.view.accessibility.AccessibilityNodeInfo$AccessibilityAction
 android.view.accessibility.AccessibilityNodeInfo$CollectionInfo
 android.view.accessibility.AccessibilityNodeInfo$CollectionItemInfo
@@ -4561,6 +4746,8 @@
 android.view.animation.Animation$NoImagePreloadHolder
 android.view.animation.AnimationSet
 android.view.animation.AnimationUtils
+android.view.animation.AnimationUtils$1
+android.view.animation.AnimationUtils$AnimationState
 android.view.animation.BaseInterpolator
 android.view.animation.ClipRectAnimation
 android.view.animation.CycleInterpolator
@@ -4576,12 +4763,16 @@
 android.view.animation.ScaleAnimation
 android.view.animation.Transformation
 android.view.animation.TranslateAnimation
+android.view.autofill.AutoFillId
+android.view.autofill.AutoFillId$1
+android.view.autofill.AutoFillManager
+android.view.autofill.AutoFillType
+android.view.autofill.AutoFillType$1
 android.view.inputmethod.BaseInputConnection
 android.view.inputmethod.CompletionInfo
 android.view.inputmethod.CompletionInfo$1
 android.view.inputmethod.ComposingText
 android.view.inputmethod.CorrectionInfo
-android.view.inputmethod.CorrectionInfo$1
 android.view.inputmethod.CursorAnchorInfo
 android.view.inputmethod.CursorAnchorInfo$Builder
 android.view.inputmethod.EditorInfo
@@ -4595,6 +4786,7 @@
 android.view.inputmethod.InputConnection
 android.view.inputmethod.InputConnectionInspector
 android.view.inputmethod.InputConnectionWrapper
+android.view.inputmethod.InputContentInfo
 android.view.inputmethod.InputMethod
 android.view.inputmethod.InputMethod$SessionCallback
 android.view.inputmethod.InputMethodInfo
@@ -4614,6 +4806,8 @@
 android.view.inputmethod.InputMethodSubtype$1
 android.view.inputmethod.InputMethodSubtype$InputMethodSubtypeBuilder
 android.view.inputmethod.InputMethodSubtypeArray
+android.view.textclassifier.TextClassificationManager
+android.view.textclassifier.TextLanguage
 android.view.textservice.SentenceSuggestionsInfo
 android.view.textservice.SentenceSuggestionsInfo$1
 android.view.textservice.SpellCheckerInfo
@@ -4645,10 +4839,13 @@
 android.webkit.JsPromptResult
 android.webkit.JsResult
 android.webkit.MimeTypeMap
+android.webkit.ServiceWorkerClient
 android.webkit.ServiceWorkerController
+android.webkit.ServiceWorkerWebSettings
 android.webkit.SslErrorHandler
 android.webkit.TokenBindingService
 android.webkit.URLUtil
+android.webkit.UserPackage
 android.webkit.ValueCallback
 android.webkit.WebBackForwardList
 android.webkit.WebChromeClient
@@ -4657,7 +4854,6 @@
 android.webkit.WebIconDatabase
 android.webkit.WebMessage
 android.webkit.WebMessagePort
-android.webkit.WebResourceError
 android.webkit.WebResourceRequest
 android.webkit.WebResourceResponse
 android.webkit.WebSettings
@@ -4693,12 +4889,13 @@
 android.webkit.WebViewProviderInfo$1
 android.webkit.WebViewProviderResponse
 android.webkit.WebViewProviderResponse$1
+android.webkit.WebViewZygote
+android.widget.-$Lambda$50$tfOQKOmkDz_xLYaBQX_cysn8vbE
 android.widget.AbsListView
 android.widget.AbsListView$3
 android.widget.AbsListView$4
 android.widget.AbsListView$AbsPositionScroller
 android.widget.AbsListView$AdapterDataSetObserver
-android.widget.AbsListView$CheckForLongPress
 android.widget.AbsListView$CheckForTap
 android.widget.AbsListView$FlingRunnable
 android.widget.AbsListView$FlingRunnable$1
@@ -4709,6 +4906,7 @@
 android.widget.AbsListView$OnScrollListener
 android.widget.AbsListView$PerformClick
 android.widget.AbsListView$PositionScroller
+android.widget.AbsListView$PositionScroller$1
 android.widget.AbsListView$RecycleBin
 android.widget.AbsListView$RecyclerListener
 android.widget.AbsListView$SavedState
@@ -4746,7 +4944,6 @@
 android.widget.AdapterView$OnItemLongClickListener
 android.widget.AdapterView$OnItemSelectedListener
 android.widget.AdapterView$SelectionNotifier
-android.widget.Advanceable
 android.widget.ArrayAdapter
 android.widget.AutoCompleteTextView
 android.widget.AutoCompleteTextView$DropDownItemClickListener
@@ -4768,7 +4965,6 @@
 android.widget.CompoundButton$SavedState$1
 android.widget.CursorAdapter
 android.widget.CursorFilter$CursorFilterClient
-android.widget.DatePicker
 android.widget.DatePicker$OnDateChangedListener
 android.widget.DateTimeView
 android.widget.DateTimeView$ReceiverInfo
@@ -4781,7 +4977,6 @@
 android.widget.Editor$1
 android.widget.Editor$2
 android.widget.Editor$Blink
-android.widget.Editor$CorrectionHighlighter
 android.widget.Editor$CursorAnchorInfoNotifier
 android.widget.Editor$CursorController
 android.widget.Editor$EditOperation
@@ -4794,6 +4989,7 @@
 android.widget.Editor$InsertionPointCursorController
 android.widget.Editor$PositionListener
 android.widget.Editor$ProcessTextIntentActionsHandler
+android.widget.Editor$SelectionHandleView
 android.widget.Editor$SelectionModifierCursorController
 android.widget.Editor$SpanController
 android.widget.Editor$SuggestionHelper
@@ -4802,7 +4998,6 @@
 android.widget.Editor$TextViewPositionListener
 android.widget.Editor$UndoInputFilter
 android.widget.ExpandableListConnector
-android.widget.ExpandableListView
 android.widget.FastScroller
 android.widget.FastScroller$1
 android.widget.FastScroller$2
@@ -4896,7 +5091,6 @@
 android.widget.PopupWindow$1
 android.widget.PopupWindow$2
 android.widget.PopupWindow$3
-android.widget.PopupWindow$4
 android.widget.PopupWindow$OnDismissListener
 android.widget.PopupWindow$PopupBackgroundView
 android.widget.PopupWindow$PopupDecorView
@@ -4904,6 +5098,7 @@
 android.widget.PopupWindow$PopupDecorView$2
 android.widget.PopupWindow$PopupDecorView$2$1
 android.widget.PopupWindow$PopupDecorView$3
+android.widget.PopupWindow$PopupDecorView$4
 android.widget.ProgressBar
 android.widget.ProgressBar$1
 android.widget.ProgressBar$ProgressTintInfo
@@ -4943,10 +5138,7 @@
 android.widget.RemoteViews$SetDrawableParameters
 android.widget.RemoteViews$SetOnClickPendingIntent
 android.widget.RemoteViews$SetOnClickPendingIntent$1
-android.widget.RemoteViews$SetRemoteInputsAction
-android.widget.RemoteViews$TextViewDrawableAction
 android.widget.RemoteViews$ViewGroupAction
-android.widget.RemoteViews$ViewPaddingAction
 android.widget.RemoteViewsAdapter$RemoteAdapterConnectionCallback
 android.widget.RemoteViewsService
 android.widget.RemoteViewsService$RemoteViewsFactory
@@ -4973,11 +5165,10 @@
 android.widget.SearchView$OnCloseListener
 android.widget.SearchView$OnQueryTextListener
 android.widget.SearchView$SearchAutoComplete
+android.widget.SearchView$UpdatableTouchDelegate
 android.widget.SectionIndexer
 android.widget.SeekBar
 android.widget.SeekBar$OnSeekBarChangeListener
-android.widget.SimpleAdapter
-android.widget.SimpleAdapter$ViewBinder
 android.widget.SimpleCursorAdapter
 android.widget.Space
 android.widget.SpellChecker
@@ -4985,7 +5176,6 @@
 android.widget.SpellChecker$SpellParser
 android.widget.Spinner
 android.widget.Spinner$1
-android.widget.Spinner$DialogPopup
 android.widget.Spinner$DropDownAdapter
 android.widget.Spinner$DropdownPopup
 android.widget.Spinner$DropdownPopup$1
@@ -5035,7 +5225,6 @@
 android.widget.Toast
 android.widget.Toast$TN
 android.widget.Toast$TN$1
-android.widget.Toast$TN$2
 android.widget.ToggleButton
 android.widget.Toolbar
 android.widget.Toolbar$1
@@ -5059,6 +5248,7 @@
 android.widget.ViewFlipper$2
 android.widget.ViewSwitcher
 android.widget.WrapperListAdapter
+android.widget.ZoomButtonsController
 com.android.dex.ClassData
 com.android.dex.ClassData$Method
 com.android.dex.ClassDef
@@ -5085,9 +5275,19 @@
 com.android.dex.util.ByteOutput
 com.android.dex.util.ExceptionWithContext
 com.android.dex.util.FileUtils
+com.android.framework.protobuf.nano.CodedInputByteBufferNano
+com.android.framework.protobuf.nano.CodedOutputByteBufferNano
+com.android.framework.protobuf.nano.ExtendableMessageNano
+com.android.framework.protobuf.nano.InternalNano
+com.android.framework.protobuf.nano.InvalidProtocolBufferNanoException
+com.android.framework.protobuf.nano.MessageNano
+com.android.framework.protobuf.nano.WireFormatNano
+com.android.i18n.phonenumbers.AlternateFormatsCountryCodeSet
 com.android.i18n.phonenumbers.AsYouTypeFormatter
 com.android.i18n.phonenumbers.CountryCodeToRegionCodeMap
 com.android.i18n.phonenumbers.MetadataLoader
+com.android.i18n.phonenumbers.MetadataManager
+com.android.i18n.phonenumbers.MetadataManager$1
 com.android.i18n.phonenumbers.MetadataSource
 com.android.i18n.phonenumbers.MultiFileMetadataSourceImpl
 com.android.i18n.phonenumbers.NumberParseException
@@ -5096,7 +5296,6 @@
 com.android.i18n.phonenumbers.PhoneNumberMatcher$State
 com.android.i18n.phonenumbers.PhoneNumberUtil
 com.android.i18n.phonenumbers.PhoneNumberUtil$1
-com.android.i18n.phonenumbers.PhoneNumberUtil$2
 com.android.i18n.phonenumbers.PhoneNumberUtil$Leniency
 com.android.i18n.phonenumbers.PhoneNumberUtil$Leniency$1
 com.android.i18n.phonenumbers.PhoneNumberUtil$Leniency$2
@@ -5114,19 +5313,13 @@
 com.android.i18n.phonenumbers.RegexCache
 com.android.i18n.phonenumbers.RegexCache$LRUCache
 com.android.i18n.phonenumbers.RegexCache$LRUCache$1
+com.android.i18n.phonenumbers.ShortNumbersRegionCodeSet
 com.android.i18n.phonenumbers.geocoding.PhoneNumberOfflineGeocoder
-com.android.i18n.phonenumbers.prefixmapper.DefaultMapStorage
 com.android.i18n.phonenumbers.prefixmapper.MappingFileProvider
-com.android.i18n.phonenumbers.prefixmapper.PhonePrefixMap
-com.android.i18n.phonenumbers.prefixmapper.PhonePrefixMapStorageStrategy
 com.android.i18n.phonenumbers.prefixmapper.PrefixFileReader
-com.android.ims.ImsCall
-com.android.ims.ImsCall$ImsCallSessionListenerProxy
 com.android.ims.ImsCall$Listener
 com.android.ims.ImsCallForwardInfo
 com.android.ims.ImsCallProfile
-com.android.ims.ImsCallProfile$1
-com.android.ims.ImsConferenceState
 com.android.ims.ImsConfig
 com.android.ims.ImsConfigListener
 com.android.ims.ImsConfigListener$Stub
@@ -5141,37 +5334,77 @@
 com.android.ims.ImsManager$2
 com.android.ims.ImsManager$ImsRegistrationListenerProxy
 com.android.ims.ImsManager$ImsServiceDeathRecipient
+com.android.ims.ImsMultiEndpoint
+com.android.ims.ImsMultiEndpoint$ImsExternalCallStateListenerProxy
 com.android.ims.ImsReasonInfo
 com.android.ims.ImsReasonInfo$1
 com.android.ims.ImsSsInfo
-com.android.ims.ImsStreamMediaProfile
-com.android.ims.ImsStreamMediaProfile$1
-com.android.ims.ImsSuppServiceNotification
-com.android.ims.internal.ICall
 com.android.ims.internal.IImsCallSession
-com.android.ims.internal.IImsCallSession$Stub
 com.android.ims.internal.IImsCallSessionListener
-com.android.ims.internal.IImsCallSessionListener$Stub
 com.android.ims.internal.IImsConfig
 com.android.ims.internal.IImsConfig$Stub
+com.android.ims.internal.IImsConfig$Stub$Proxy
 com.android.ims.internal.IImsEcbm
 com.android.ims.internal.IImsEcbm$Stub
 com.android.ims.internal.IImsEcbmListener
 com.android.ims.internal.IImsEcbmListener$Stub
+com.android.ims.internal.IImsExternalCallStateListener
+com.android.ims.internal.IImsExternalCallStateListener$Stub
 com.android.ims.internal.IImsMultiEndpoint
+com.android.ims.internal.IImsMultiEndpoint$Stub
 com.android.ims.internal.IImsRegistrationListener
 com.android.ims.internal.IImsRegistrationListener$Stub
+com.android.ims.internal.IImsRegistrationListener$Stub$Proxy
 com.android.ims.internal.IImsService
 com.android.ims.internal.IImsService$Stub
+com.android.ims.internal.IImsService$Stub$Proxy
+com.android.ims.internal.IImsServiceController
+com.android.ims.internal.IImsServiceFeatureListener
 com.android.ims.internal.IImsUt
 com.android.ims.internal.IImsUt$Stub
 com.android.ims.internal.IImsUtListener
 com.android.ims.internal.IImsUtListener$Stub
-com.android.ims.internal.IImsVideoCallProvider
-com.android.ims.internal.ImsCallSession
-com.android.ims.internal.ImsCallSession$IImsCallSessionListenerProxy
-com.android.ims.internal.ImsCallSession$Listener
-com.android.ims.internal.ImsCallSession$State
+com.android.ims.internal.uce.common.CapInfo
+com.android.ims.internal.uce.common.CapInfo$1
+com.android.ims.internal.uce.common.StatusCode
+com.android.ims.internal.uce.common.StatusCode$1
+com.android.ims.internal.uce.common.UceLong
+com.android.ims.internal.uce.common.UceLong$1
+com.android.ims.internal.uce.options.IOptionsListener
+com.android.ims.internal.uce.options.IOptionsService
+com.android.ims.internal.uce.presence.IPresenceListener
+com.android.ims.internal.uce.presence.IPresenceListener$Stub
+com.android.ims.internal.uce.presence.IPresenceListener$Stub$Proxy
+com.android.ims.internal.uce.presence.IPresenceService
+com.android.ims.internal.uce.presence.IPresenceService$Stub
+com.android.ims.internal.uce.presence.IPresenceService$Stub$Proxy
+com.android.ims.internal.uce.presence.PresCapInfo
+com.android.ims.internal.uce.presence.PresCmdId
+com.android.ims.internal.uce.presence.PresCmdId$1
+com.android.ims.internal.uce.presence.PresCmdStatus
+com.android.ims.internal.uce.presence.PresCmdStatus$1
+com.android.ims.internal.uce.presence.PresPublishTriggerType
+com.android.ims.internal.uce.presence.PresPublishTriggerType$1
+com.android.ims.internal.uce.presence.PresResInfo
+com.android.ims.internal.uce.presence.PresResInfo$1
+com.android.ims.internal.uce.presence.PresResInstanceInfo
+com.android.ims.internal.uce.presence.PresResInstanceInfo$1
+com.android.ims.internal.uce.presence.PresRlmiInfo
+com.android.ims.internal.uce.presence.PresRlmiInfo$1
+com.android.ims.internal.uce.presence.PresServiceInfo
+com.android.ims.internal.uce.presence.PresSipResponse
+com.android.ims.internal.uce.presence.PresSipResponse$1
+com.android.ims.internal.uce.presence.PresSubscriptionState
+com.android.ims.internal.uce.presence.PresSubscriptionState$1
+com.android.ims.internal.uce.presence.PresTupleInfo
+com.android.ims.internal.uce.presence.PresTupleInfo$1
+com.android.ims.internal.uce.uceservice.IUceListener
+com.android.ims.internal.uce.uceservice.IUceListener$Stub
+com.android.ims.internal.uce.uceservice.IUceService
+com.android.ims.internal.uce.uceservice.IUceService$Stub
+com.android.ims.internal.uce.uceservice.IUceService$Stub$Proxy
+com.android.ims.internal.uce.uceservice.ImsUceManager
+com.android.ims.internal.uce.uceservice.ImsUceManager$UceServiceDeathRecipient
 com.android.internal.R$styleable
 com.android.internal.alsa.AlsaCardsParser
 com.android.internal.alsa.AlsaCardsParser$AlsaCardRecord
@@ -5186,17 +5419,6 @@
 com.android.internal.app.AlertController$CheckedItemAdapter
 com.android.internal.app.AlertController$RecycleListView
 com.android.internal.app.AssistUtils
-com.android.internal.app.ChooserActivity
-com.android.internal.app.ChooserActivity$1
-com.android.internal.app.ChooserActivity$BaseChooserTargetComparator
-com.android.internal.app.ChooserActivity$ChooserListAdapter
-com.android.internal.app.ChooserActivity$ChooserRowAdapter
-com.android.internal.app.ChooserActivity$ChooserRowAdapter$1
-com.android.internal.app.ChooserActivity$ChooserRowAdapter$2
-com.android.internal.app.ChooserActivity$ChooserRowAdapter$3
-com.android.internal.app.ChooserActivity$OffsetDataSetObserver
-com.android.internal.app.ChooserActivity$RowScale
-com.android.internal.app.ChooserActivity$RowViewHolder
 com.android.internal.app.IAppOpsCallback
 com.android.internal.app.IAppOpsCallback$Stub
 com.android.internal.app.IAppOpsCallback$Stub$Proxy
@@ -5204,6 +5426,7 @@
 com.android.internal.app.IAppOpsService$Stub
 com.android.internal.app.IAppOpsService$Stub$Proxy
 com.android.internal.app.IAssistScreenshotReceiver
+com.android.internal.app.IAssistScreenshotReceiver$Stub
 com.android.internal.app.IBatteryStats
 com.android.internal.app.IBatteryStats$Stub
 com.android.internal.app.IBatteryStats$Stub$Proxy
@@ -5215,41 +5438,34 @@
 com.android.internal.app.IVoiceInteractionManagerService
 com.android.internal.app.IVoiceInteractionManagerService$Stub
 com.android.internal.app.IVoiceInteractionManagerService$Stub$Proxy
+com.android.internal.app.IVoiceInteractionSessionListener
+com.android.internal.app.IVoiceInteractionSessionListener$Stub
+com.android.internal.app.IVoiceInteractionSessionListener$Stub$Proxy
 com.android.internal.app.IVoiceInteractionSessionShowCallback
 com.android.internal.app.IVoiceInteractionSessionShowCallback$Stub
+com.android.internal.app.IVoiceInteractionSessionShowCallback$Stub$Proxy
 com.android.internal.app.IVoiceInteractor
 com.android.internal.app.IVoiceInteractor$Stub
-com.android.internal.app.IntentForwarderActivity
+com.android.internal.app.IVoiceInteractor$Stub$Proxy
 com.android.internal.app.LocaleHelper
 com.android.internal.app.LocalePicker
 com.android.internal.app.LocalePickerWithRegion$LocaleSelectedListener
-com.android.internal.app.PlatLogoActivity
+com.android.internal.app.NightDisplayController
+com.android.internal.app.NightDisplayController$1
+com.android.internal.app.NightDisplayController$Callback
+com.android.internal.app.NightDisplayController$LocalTime
 com.android.internal.app.ProcessMap
 com.android.internal.app.ResolverActivity
-com.android.internal.app.ResolverActivity$1
-com.android.internal.app.ResolverActivity$2
-com.android.internal.app.ResolverActivity$3
-com.android.internal.app.ResolverActivity$DisplayResolveInfo
-com.android.internal.app.ResolverActivity$LoadAdapterIconTask
-com.android.internal.app.ResolverActivity$LoadIconTask
-com.android.internal.app.ResolverActivity$ResolveListAdapter
-com.android.internal.app.ResolverActivity$ResolvedComponentInfo
-com.android.internal.app.ResolverActivity$TargetInfo
-com.android.internal.app.ResolverActivity$ViewHolder
-com.android.internal.app.ResolverComparator
-com.android.internal.app.ResolverComparator$ScoredTarget
 com.android.internal.app.ToolbarActionBar
 com.android.internal.app.ToolbarActionBar$1
 com.android.internal.app.ToolbarActionBar$2
 com.android.internal.app.ToolbarActionBar$ActionMenuPresenterCallback
 com.android.internal.app.ToolbarActionBar$MenuBuilderCallback
 com.android.internal.app.ToolbarActionBar$ToolbarCallbackWrapper
-com.android.internal.app.UnlaunchableAppActivity
 com.android.internal.app.WindowDecorActionBar
 com.android.internal.app.WindowDecorActionBar$1
 com.android.internal.app.WindowDecorActionBar$2
 com.android.internal.app.WindowDecorActionBar$3
-com.android.internal.app.WindowDecorActionBar$ActionModeImpl
 com.android.internal.app.procstats.DumpUtils
 com.android.internal.app.procstats.DurationsTable
 com.android.internal.app.procstats.IProcessStats
@@ -5281,11 +5497,16 @@
 com.android.internal.backup.LocalTransport
 com.android.internal.backup.LocalTransportService
 com.android.internal.content.NativeLibraryHelper
-com.android.internal.content.NativeLibraryHelper$Handle
 com.android.internal.content.PackageHelper
 com.android.internal.content.PackageMonitor
 com.android.internal.content.ReferrerIntent
 com.android.internal.content.ReferrerIntent$1
+com.android.internal.font.IFontManager
+com.android.internal.font.IFontManager$Stub
+com.android.internal.graphics.drawable.AnimationScaleListDrawable
+com.android.internal.graphics.drawable.AnimationScaleListDrawable$AnimationScaleListState
+com.android.internal.hardware.AmbientDisplayConfiguration
+com.android.internal.inputmethod.IInputContentUriToken
 com.android.internal.inputmethod.InputMethodSubtypeHandle
 com.android.internal.inputmethod.InputMethodSubtypeSwitchingController
 com.android.internal.inputmethod.InputMethodSubtypeSwitchingController$ControllerImpl
@@ -5296,6 +5517,7 @@
 com.android.internal.inputmethod.InputMethodSubtypeSwitchingController$StaticRotationList
 com.android.internal.inputmethod.InputMethodUtils
 com.android.internal.inputmethod.InputMethodUtils$1
+com.android.internal.inputmethod.InputMethodUtils$InputMethodListBuilder
 com.android.internal.inputmethod.InputMethodUtils$InputMethodSettings
 com.android.internal.inputmethod.LocaleUtils
 com.android.internal.inputmethod.LocaleUtils$LocaleExtractor
@@ -5321,6 +5543,7 @@
 com.android.internal.net.VpnInfo
 com.android.internal.net.VpnProfile
 com.android.internal.os.AndroidPrintStream
+com.android.internal.os.AppFuseMount
 com.android.internal.os.AtomicFile
 com.android.internal.os.BackgroundThread
 com.android.internal.os.BatterySipper
@@ -5334,6 +5557,8 @@
 com.android.internal.os.BatteryStatsImpl$BatteryCallback
 com.android.internal.os.BatteryStatsImpl$Clocks
 com.android.internal.os.BatteryStatsImpl$ControllerActivityCounterImpl
+com.android.internal.os.BatteryStatsImpl$Counter
+com.android.internal.os.BatteryStatsImpl$DurationTimer
 com.android.internal.os.BatteryStatsImpl$ExternalStatsSync
 com.android.internal.os.BatteryStatsImpl$LongSamplingCounter
 com.android.internal.os.BatteryStatsImpl$MyHandler
@@ -5351,6 +5576,7 @@
 com.android.internal.os.BatteryStatsImpl$Uid$3
 com.android.internal.os.BatteryStatsImpl$Uid$Pkg
 com.android.internal.os.BatteryStatsImpl$Uid$Pkg$Serv
+com.android.internal.os.BatteryStatsImpl$Uid$Proc
 com.android.internal.os.BatteryStatsImpl$Uid$Sensor
 com.android.internal.os.BatteryStatsImpl$Uid$Wakelock
 com.android.internal.os.BinderInternal
@@ -5359,6 +5585,9 @@
 com.android.internal.os.CameraPowerCalculator
 com.android.internal.os.CpuPowerCalculator
 com.android.internal.os.FlashlightPowerCalculator
+com.android.internal.os.FuseAppLoop
+com.android.internal.os.FuseAppLoop$1
+com.android.internal.os.FuseAppLoop$UnmountedException
 com.android.internal.os.HandlerCaller
 com.android.internal.os.HandlerCaller$Callback
 com.android.internal.os.HandlerCaller$MyHandler
@@ -5369,15 +5598,18 @@
 com.android.internal.os.IResultReceiver
 com.android.internal.os.IResultReceiver$Stub
 com.android.internal.os.IResultReceiver$Stub$Proxy
-com.android.internal.os.InstallerConnection
-com.android.internal.os.InstallerConnection$InstallerException
+com.android.internal.os.IShellCallback
+com.android.internal.os.IShellCallback$Stub
+com.android.internal.os.IShellCallback$Stub$Proxy
 com.android.internal.os.KernelCpuSpeedReader
+com.android.internal.os.KernelMemoryBandwidthStats
 com.android.internal.os.KernelUidCpuTimeReader
 com.android.internal.os.KernelWakelockReader
 com.android.internal.os.KernelWakelockStats
 com.android.internal.os.KernelWakelockStats$Entry
 com.android.internal.os.LoggingPrintStream
 com.android.internal.os.LoggingPrintStream$1
+com.android.internal.os.MemoryPowerCalculator
 com.android.internal.os.MobileRadioPowerCalculator
 com.android.internal.os.PathClassLoaderFactory
 com.android.internal.os.PowerCalculator
@@ -5385,31 +5617,35 @@
 com.android.internal.os.PowerProfile$CpuClusterKey
 com.android.internal.os.ProcessCpuTracker
 com.android.internal.os.ProcessCpuTracker$1
+com.android.internal.os.ProcessCpuTracker$FilterStats
 com.android.internal.os.ProcessCpuTracker$Stats
+com.android.internal.os.RoSystemProperties
 com.android.internal.os.RuntimeInit
 com.android.internal.os.RuntimeInit$1
 com.android.internal.os.RuntimeInit$Arguments
-com.android.internal.os.RuntimeInit$UncaughtHandler
+com.android.internal.os.RuntimeInit$KillApplicationHandler
+com.android.internal.os.RuntimeInit$LoggingHandler
 com.android.internal.os.SamplingProfilerIntegration
 com.android.internal.os.SensorPowerCalculator
 com.android.internal.os.SomeArgs
+com.android.internal.os.TransferPipe
 com.android.internal.os.WakelockPowerCalculator
-com.android.internal.os.WifiPowerEstimator
+com.android.internal.os.WifiPowerCalculator
 com.android.internal.os.Zygote
+com.android.internal.os.Zygote$MethodAndArgsCaller
 com.android.internal.os.ZygoteConnection
 com.android.internal.os.ZygoteConnection$Arguments
 com.android.internal.os.ZygoteInit
-com.android.internal.os.ZygoteInit$MethodAndArgsCaller
 com.android.internal.os.ZygoteSecurityException
+com.android.internal.os.ZygoteServer
 com.android.internal.policy.DecorContext
 com.android.internal.policy.DecorView
 com.android.internal.policy.DecorView$1
-com.android.internal.policy.DecorView$4
-com.android.internal.policy.DecorView$ActionModeCallback2Wrapper
 com.android.internal.policy.DecorView$ColorViewState
 com.android.internal.policy.DividerSnapAlgorithm
 com.android.internal.policy.DividerSnapAlgorithm$SnapTarget
 com.android.internal.policy.DockedDividerUtils
+com.android.internal.policy.IKeyguardDismissCallback
 com.android.internal.policy.IKeyguardDrawnCallback
 com.android.internal.policy.IKeyguardDrawnCallback$Stub
 com.android.internal.policy.IKeyguardDrawnCallback$Stub$Proxy
@@ -5434,6 +5670,8 @@
 com.android.internal.policy.PhoneWindow$PhoneWindowMenuCallback
 com.android.internal.policy.PhoneWindow$RotationWatcher
 com.android.internal.policy.PhoneWindow$RotationWatcher$1
+com.android.internal.policy.PipMotionHelper
+com.android.internal.policy.PipSnapAlgorithm
 com.android.internal.statusbar.IStatusBar
 com.android.internal.statusbar.IStatusBar$Stub
 com.android.internal.statusbar.IStatusBar$Stub$Proxy
@@ -5464,10 +5702,8 @@
 com.android.internal.telecom.RemoteServiceCallback
 com.android.internal.telecom.RemoteServiceCallback$Stub
 com.android.internal.telecom.RemoteServiceCallback$Stub$Proxy
-com.android.internal.telephony.ATParseEx
-com.android.internal.telephony.AsyncEmergencyContactNotifier
+com.android.internal.telephony.AppSmsManager
 com.android.internal.telephony.BaseCommands
-com.android.internal.telephony.BlockChecker
 com.android.internal.telephony.Call
 com.android.internal.telephony.Call$SrvccState
 com.android.internal.telephony.Call$State
@@ -5481,28 +5717,30 @@
 com.android.internal.telephony.CallerInfoAsyncQuery$CallerInfoAsyncQueryHandler$CallerInfoWorkerHandler
 com.android.internal.telephony.CallerInfoAsyncQuery$CookieWrapper
 com.android.internal.telephony.CallerInfoAsyncQuery$OnQueryCompleteListener
+com.android.internal.telephony.CarrierActionAgent
 com.android.internal.telephony.CarrierAppUtils
 com.android.internal.telephony.CarrierServiceBindHelper
 com.android.internal.telephony.CarrierServiceBindHelper$1
 com.android.internal.telephony.CarrierServiceBindHelper$2
 com.android.internal.telephony.CarrierServiceBindHelper$AppBinding
 com.android.internal.telephony.CarrierServiceBindHelper$CarrierServicePackageMonitor
+com.android.internal.telephony.CarrierServiceStateTracker
+com.android.internal.telephony.CarrierServiceStateTracker$1
+com.android.internal.telephony.CarrierSignalAgent
+com.android.internal.telephony.CarrierSignalAgent$1
 com.android.internal.telephony.CellBroadcastHandler
 com.android.internal.telephony.CellNetworkScanResult
+com.android.internal.telephony.ClientWakelockAccountant
+com.android.internal.telephony.ClientWakelockTracker
 com.android.internal.telephony.CommandException
 com.android.internal.telephony.CommandException$Error
 com.android.internal.telephony.CommandsInterface
 com.android.internal.telephony.CommandsInterface$RadioState
 com.android.internal.telephony.Connection
-com.android.internal.telephony.Connection$Listener
-com.android.internal.telephony.Connection$ListenerBase
-com.android.internal.telephony.Connection$PostDialListener
-com.android.internal.telephony.Connection$PostDialState
 com.android.internal.telephony.DctConstants$Activity
 com.android.internal.telephony.DctConstants$State
 com.android.internal.telephony.DebugService
 com.android.internal.telephony.DefaultPhoneNotifier
-com.android.internal.telephony.DriverCall
 com.android.internal.telephony.EncodeException
 com.android.internal.telephony.GsmAlphabet
 com.android.internal.telephony.GsmAlphabet$TextEncodingDetails
@@ -5514,6 +5752,7 @@
 com.android.internal.telephony.GsmCdmaPhone$1
 com.android.internal.telephony.GsmCdmaPhone$2
 com.android.internal.telephony.HardwareConfig
+com.android.internal.telephony.HbpcdUtils
 com.android.internal.telephony.ICarrierConfigLoader
 com.android.internal.telephony.ICarrierConfigLoader$Stub
 com.android.internal.telephony.ICarrierConfigLoader$Stub$Proxy
@@ -5521,7 +5760,6 @@
 com.android.internal.telephony.IIccPhoneBook$Stub
 com.android.internal.telephony.IMms
 com.android.internal.telephony.IMms$Stub
-com.android.internal.telephony.IMms$Stub$Proxy
 com.android.internal.telephony.IOnSubscriptionsChangedListener
 com.android.internal.telephony.IOnSubscriptionsChangedListener$Stub
 com.android.internal.telephony.IOnSubscriptionsChangedListener$Stub$Proxy
@@ -5555,20 +5793,16 @@
 com.android.internal.telephony.IccSmsInterfaceManager$CellBroadcastRangeManager
 com.android.internal.telephony.ImsSMSDispatcher
 com.android.internal.telephony.InboundSmsHandler
+com.android.internal.telephony.InboundSmsHandler$1
 com.android.internal.telephony.InboundSmsHandler$DefaultState
 com.android.internal.telephony.InboundSmsHandler$DeliveringState
 com.android.internal.telephony.InboundSmsHandler$IdleState
-com.android.internal.telephony.InboundSmsHandler$SmsBroadcastReceiver
+com.android.internal.telephony.InboundSmsHandler$NewMessageNotificationActionReceiver
 com.android.internal.telephony.InboundSmsHandler$StartupState
 com.android.internal.telephony.InboundSmsHandler$WaitingState
-com.android.internal.telephony.InboundSmsTracker
 com.android.internal.telephony.IntRangeManager
-com.android.internal.telephony.IntRangeManager$ClientRange
-com.android.internal.telephony.IntRangeManager$IntRange
 com.android.internal.telephony.MccTable
 com.android.internal.telephony.MccTable$MccEntry
-com.android.internal.telephony.MmiCode
-com.android.internal.telephony.MmiCode$State
 com.android.internal.telephony.OperatorInfo
 com.android.internal.telephony.Phone
 com.android.internal.telephony.Phone$1
@@ -5577,7 +5811,6 @@
 com.android.internal.telephony.PhoneFactory
 com.android.internal.telephony.PhoneInternalInterface
 com.android.internal.telephony.PhoneInternalInterface$DataActivityState
-com.android.internal.telephony.PhoneInternalInterface$SuppService
 com.android.internal.telephony.PhoneNotifier
 com.android.internal.telephony.PhoneStateIntentReceiver
 com.android.internal.telephony.PhoneSubInfoController
@@ -5593,43 +5826,39 @@
 com.android.internal.telephony.RIL$2
 com.android.internal.telephony.RIL$RILReceiver
 com.android.internal.telephony.RIL$RILSender
+com.android.internal.telephony.RIL$RadioProxyDeathRecipient
+com.android.internal.telephony.RIL$RilHandler
 com.android.internal.telephony.RILConstants
 com.android.internal.telephony.RILRequest
 com.android.internal.telephony.RadioCapability
+com.android.internal.telephony.RadioIndication
+com.android.internal.telephony.RadioResponse
+com.android.internal.telephony.RatRatcheter
+com.android.internal.telephony.RatRatcheter$1
 com.android.internal.telephony.RestrictedState
 com.android.internal.telephony.RetryManager
-com.android.internal.telephony.RetryManager$RetryRec
+com.android.internal.telephony.RilWakelockInfo
 com.android.internal.telephony.SMSDispatcher
 com.android.internal.telephony.SMSDispatcher$SettingsObserver
-com.android.internal.telephony.SMSDispatcher$SmsTracker
 com.android.internal.telephony.ServiceStateTracker
 com.android.internal.telephony.ServiceStateTracker$1
 com.android.internal.telephony.ServiceStateTracker$2
 com.android.internal.telephony.ServiceStateTracker$3
 com.android.internal.telephony.ServiceStateTracker$CellInfoResult
 com.android.internal.telephony.ServiceStateTracker$SstSubscriptionsChangedListener
-com.android.internal.telephony.SmsAddress
 com.android.internal.telephony.SmsApplication
 com.android.internal.telephony.SmsApplication$SmsApplicationData
 com.android.internal.telephony.SmsApplication$SmsPackageMonitor
 com.android.internal.telephony.SmsBroadcastUndelivered
 com.android.internal.telephony.SmsBroadcastUndelivered$1
 com.android.internal.telephony.SmsBroadcastUndelivered$ScanRawTableThread
-com.android.internal.telephony.SmsConstants$MessageClass
-com.android.internal.telephony.SmsHeader
-com.android.internal.telephony.SmsHeader$PortAddrs
 com.android.internal.telephony.SmsMessageBase
-com.android.internal.telephony.SmsMessageBase$SubmitPduBase
-com.android.internal.telephony.SmsNumberUtils
-com.android.internal.telephony.SmsResponse
 com.android.internal.telephony.SmsStorageMonitor
 com.android.internal.telephony.SmsStorageMonitor$1
 com.android.internal.telephony.SmsUsageMonitor
 com.android.internal.telephony.SmsUsageMonitor$SettingsObserver
 com.android.internal.telephony.SmsUsageMonitor$SettingsObserverHandler
-com.android.internal.telephony.SmsUsageMonitor$ShortCodePatternMatcher
 com.android.internal.telephony.SubscriptionController
-com.android.internal.telephony.SubscriptionController$1
 com.android.internal.telephony.SubscriptionController$ScLocalLog
 com.android.internal.telephony.SubscriptionInfoUpdater
 com.android.internal.telephony.SubscriptionInfoUpdater$1
@@ -5640,10 +5869,8 @@
 com.android.internal.telephony.TelephonyCapabilities
 com.android.internal.telephony.TelephonyComponentFactory
 com.android.internal.telephony.TelephonyDevController
-com.android.internal.telephony.TelephonyEventLog
 com.android.internal.telephony.TelephonyTester
 com.android.internal.telephony.TelephonyTester$1
-com.android.internal.telephony.UUSInfo
 com.android.internal.telephony.UiccPhoneBookController
 com.android.internal.telephony.UiccSmsController
 com.android.internal.telephony.WakeLockStateMachine
@@ -5652,45 +5879,36 @@
 com.android.internal.telephony.WakeLockStateMachine$IdleState
 com.android.internal.telephony.WakeLockStateMachine$WaitingState
 com.android.internal.telephony.WapPushOverSms
+com.android.internal.telephony.WapPushOverSms$1
+com.android.internal.telephony.WapPushOverSms$BindServiceThread
 com.android.internal.telephony.cat.AppInterface
-com.android.internal.telephony.cat.CatException
+com.android.internal.telephony.cat.AppInterface$CommandType
+com.android.internal.telephony.cat.CatCmdMessage
+com.android.internal.telephony.cat.CatCmdMessage$BrowserSettings
+com.android.internal.telephony.cat.CatCmdMessage$CallSettings
+com.android.internal.telephony.cat.CatCmdMessage$SetupEventListSettings
 com.android.internal.telephony.cat.CatLog
+com.android.internal.telephony.cat.CatResponseMessage
 com.android.internal.telephony.cat.CatService
-com.android.internal.telephony.cat.CommandParamsFactory
-com.android.internal.telephony.cat.IconLoader
-com.android.internal.telephony.cat.ResultException
-com.android.internal.telephony.cat.RilMessageDecoder
-com.android.internal.telephony.cat.RilMessageDecoder$StateCmdParamsReady
-com.android.internal.telephony.cat.RilMessageDecoder$StateStart
-com.android.internal.telephony.cdma.CdmaCallWaitingNotification
+com.android.internal.telephony.cat.Input
+com.android.internal.telephony.cat.Item
+com.android.internal.telephony.cat.LaunchBrowserMode
+com.android.internal.telephony.cat.Menu
+com.android.internal.telephony.cat.ResultCode
+com.android.internal.telephony.cat.TextMessage
+com.android.internal.telephony.cat.ToneSettings
 com.android.internal.telephony.cdma.CdmaInboundSmsHandler
-com.android.internal.telephony.cdma.CdmaInformationRecords$CdmaDisplayInfoRec
-com.android.internal.telephony.cdma.CdmaInformationRecords$CdmaSignalInfoRec
 com.android.internal.telephony.cdma.CdmaSMSDispatcher
 com.android.internal.telephony.cdma.CdmaServiceCategoryProgramHandler
 com.android.internal.telephony.cdma.CdmaServiceCategoryProgramHandler$1
-com.android.internal.telephony.cdma.CdmaSmsBroadcastConfigInfo
 com.android.internal.telephony.cdma.CdmaSubscriptionSourceManager
 com.android.internal.telephony.cdma.EriInfo
 com.android.internal.telephony.cdma.EriManager
+com.android.internal.telephony.cdma.EriManager$EriDisplayInformation
 com.android.internal.telephony.cdma.EriManager$EriFile
-com.android.internal.telephony.cdma.SignalToneUtil
 com.android.internal.telephony.dataconnection.ApnContext
-com.android.internal.telephony.dataconnection.ApnSetting
-com.android.internal.telephony.dataconnection.DataCallResponse
-com.android.internal.telephony.dataconnection.DataCallResponse$SetupResult
 com.android.internal.telephony.dataconnection.DataConnection
-com.android.internal.telephony.dataconnection.DataConnection$ConnectionParams
-com.android.internal.telephony.dataconnection.DataConnection$DcActivatingState
-com.android.internal.telephony.dataconnection.DataConnection$DcActiveState
-com.android.internal.telephony.dataconnection.DataConnection$DcDefaultState
-com.android.internal.telephony.dataconnection.DataConnection$DcDisconnectingState
-com.android.internal.telephony.dataconnection.DataConnection$DcDisconnectionErrorCreatingConnection
-com.android.internal.telephony.dataconnection.DataConnection$DcInactiveState
-com.android.internal.telephony.dataconnection.DataConnection$DcNetworkAgent
-com.android.internal.telephony.dataconnection.DataConnection$DisconnectParams
-com.android.internal.telephony.dataconnection.DataConnection$UpdateLinkPropertyResult
-com.android.internal.telephony.dataconnection.DcAsyncChannel
+com.android.internal.telephony.dataconnection.DataEnabledSettings
 com.android.internal.telephony.dataconnection.DcController
 com.android.internal.telephony.dataconnection.DcController$1
 com.android.internal.telephony.dataconnection.DcController$DccDefaultState
@@ -5717,19 +5935,24 @@
 com.android.internal.telephony.gsm.GsmCellBroadcastHandler
 com.android.internal.telephony.gsm.GsmInboundSmsHandler
 com.android.internal.telephony.gsm.GsmSMSDispatcher
-com.android.internal.telephony.gsm.GsmSmsAddress
-com.android.internal.telephony.gsm.SimTlv
-com.android.internal.telephony.gsm.SmsBroadcastConfigInfo
 com.android.internal.telephony.gsm.SmsMessage
-com.android.internal.telephony.gsm.SmsMessage$PduParser
-com.android.internal.telephony.gsm.SmsMessage$SubmitPdu
-com.android.internal.telephony.gsm.SuppServiceNotification
 com.android.internal.telephony.gsm.UsimDataDownloadHandler
-com.android.internal.telephony.gsm.UsimPhoneBookManager
+com.android.internal.telephony.ims.-$Lambda$2$6hDwuvYxqWrzW_Ex5wc53XnUOpg
+com.android.internal.telephony.ims.-$Lambda$3$6hDwuvYxqWrzW_Ex5wc53XnUOpg
+com.android.internal.telephony.ims.-$Lambda$4$6hDwuvYxqWrzW_Ex5wc53XnUOpg
+com.android.internal.telephony.ims.ImsResolver
+com.android.internal.telephony.ims.ImsResolver$1
+com.android.internal.telephony.ims.ImsResolver$2
+com.android.internal.telephony.ims.ImsResolver$3
+com.android.internal.telephony.ims.ImsResolver$ImsServiceControllerFactory
+com.android.internal.telephony.ims.ImsResolver$SubscriptionManagerProxy
+com.android.internal.telephony.ims.ImsServiceController$ImsServiceControllerCallbacks
 com.android.internal.telephony.imsphone.ImsExternalCallTracker
+com.android.internal.telephony.imsphone.ImsExternalCallTracker$1
+com.android.internal.telephony.imsphone.ImsExternalCallTracker$2
 com.android.internal.telephony.imsphone.ImsExternalCallTracker$ExternalCallStateListener
 com.android.internal.telephony.imsphone.ImsExternalCallTracker$ExternalConnectionListener
-com.android.internal.telephony.imsphone.ImsExternalConnection
+com.android.internal.telephony.imsphone.ImsExternalCallTracker$ImsCallNotify
 com.android.internal.telephony.imsphone.ImsExternalConnection$Listener
 com.android.internal.telephony.imsphone.ImsPhone
 com.android.internal.telephony.imsphone.ImsPhone$1
@@ -5743,64 +5966,43 @@
 com.android.internal.telephony.imsphone.ImsPhoneCallTracker$3
 com.android.internal.telephony.imsphone.ImsPhoneCallTracker$4
 com.android.internal.telephony.imsphone.ImsPhoneCallTracker$5
-com.android.internal.telephony.imsphone.ImsPhoneCallTracker$6
+com.android.internal.telephony.imsphone.ImsPhoneCallTracker$PhoneStateListener
 com.android.internal.telephony.imsphone.ImsPhoneCommandInterface
-com.android.internal.telephony.imsphone.ImsPhoneConnection
-com.android.internal.telephony.imsphone.ImsPhoneConnection$MyHandler
 com.android.internal.telephony.imsphone.ImsPhoneFactory
-com.android.internal.telephony.imsphone.ImsPhoneMmiCode
 com.android.internal.telephony.imsphone.ImsPullCall
-com.android.internal.telephony.sip.SipPhone
-com.android.internal.telephony.sip.SipPhoneBase
+com.android.internal.telephony.metrics.CallSessionEventBuilder
+com.android.internal.telephony.metrics.InProgressCallSession
+com.android.internal.telephony.metrics.InProgressSmsSession
+com.android.internal.telephony.metrics.SmsSessionEventBuilder
+com.android.internal.telephony.metrics.TelephonyEventBuilder
+com.android.internal.telephony.metrics.TelephonyMetrics
+com.android.internal.telephony.nano.TelephonyProto$ImsCapabilities
+com.android.internal.telephony.nano.TelephonyProto$ImsConnectionState
+com.android.internal.telephony.nano.TelephonyProto$ImsReasonInfo
+com.android.internal.telephony.nano.TelephonyProto$RilDataCall
+com.android.internal.telephony.nano.TelephonyProto$SmsSession$Event
+com.android.internal.telephony.nano.TelephonyProto$TelephonyCallSession$Event
+com.android.internal.telephony.nano.TelephonyProto$TelephonyCallSession$Event$RilCall
+com.android.internal.telephony.nano.TelephonyProto$TelephonyEvent
+com.android.internal.telephony.nano.TelephonyProto$TelephonyServiceState
+com.android.internal.telephony.nano.TelephonyProto$TelephonyServiceState$TelephonyOperator
+com.android.internal.telephony.nano.TelephonyProto$TelephonySettings
 com.android.internal.telephony.test.SimulatedRadioControl
-com.android.internal.telephony.uicc.AdnRecord
-com.android.internal.telephony.uicc.AdnRecord$1
-com.android.internal.telephony.uicc.AdnRecordCache
-com.android.internal.telephony.uicc.AdnRecordLoader
 com.android.internal.telephony.uicc.IccCardApplicationStatus
-com.android.internal.telephony.uicc.IccCardApplicationStatus$AppState
 com.android.internal.telephony.uicc.IccCardApplicationStatus$AppType
-com.android.internal.telephony.uicc.IccCardApplicationStatus$PersoSubState
 com.android.internal.telephony.uicc.IccCardProxy
 com.android.internal.telephony.uicc.IccCardStatus
 com.android.internal.telephony.uicc.IccCardStatus$CardState
 com.android.internal.telephony.uicc.IccCardStatus$PinState
 com.android.internal.telephony.uicc.IccConstants
-com.android.internal.telephony.uicc.IccFileHandler
-com.android.internal.telephony.uicc.IccFileHandler$LoadLinearFixedContext
-com.android.internal.telephony.uicc.IccIoResult
 com.android.internal.telephony.uicc.IccRecords
-com.android.internal.telephony.uicc.IccRecords$IccRecordLoaded
-com.android.internal.telephony.uicc.IccServiceTable
+com.android.internal.telephony.uicc.IccRefreshResponse
 com.android.internal.telephony.uicc.IccUtils
-com.android.internal.telephony.uicc.IsimFileHandler
-com.android.internal.telephony.uicc.IsimRecords
-com.android.internal.telephony.uicc.IsimUiccRecords
-com.android.internal.telephony.uicc.IsimUiccRecords$EfIsimDomainLoaded
-com.android.internal.telephony.uicc.IsimUiccRecords$EfIsimImpiLoaded
-com.android.internal.telephony.uicc.IsimUiccRecords$EfIsimImpuLoaded
-com.android.internal.telephony.uicc.IsimUiccRecords$EfIsimIstLoaded
-com.android.internal.telephony.uicc.IsimUiccRecords$EfIsimPcscfLoaded
-com.android.internal.telephony.uicc.SIMRecords
-com.android.internal.telephony.uicc.SIMRecords$1
-com.android.internal.telephony.uicc.SIMRecords$EfPlLoaded
-com.android.internal.telephony.uicc.SIMRecords$EfUsimLiLoaded
-com.android.internal.telephony.uicc.SIMRecords$GetSpnFsmState
-com.android.internal.telephony.uicc.SpnOverride
 com.android.internal.telephony.uicc.UiccCard
 com.android.internal.telephony.uicc.UiccCard$1
 com.android.internal.telephony.uicc.UiccCardApplication
-com.android.internal.telephony.uicc.UiccCardApplication$1
-com.android.internal.telephony.uicc.UiccCarrierPrivilegeRules
-com.android.internal.telephony.uicc.UiccCarrierPrivilegeRules$1
 com.android.internal.telephony.uicc.UiccController
-com.android.internal.telephony.uicc.UiccPkcs15
-com.android.internal.telephony.uicc.UiccPkcs15$FileHandler
-com.android.internal.telephony.uicc.UiccPkcs15$Pkcs15Selector
-com.android.internal.telephony.uicc.UsimFileHandler
-com.android.internal.telephony.uicc.UsimServiceTable
-com.android.internal.telephony.uicc.UsimServiceTable$UsimService
-com.android.internal.telephony.uicc.VoiceMailConstants
+com.android.internal.telephony.uicc.UiccStateChangedLauncher
 com.android.internal.textservice.ISpellCheckerService
 com.android.internal.textservice.ISpellCheckerService$Stub
 com.android.internal.textservice.ISpellCheckerService$Stub$Proxy
@@ -5828,6 +6030,9 @@
 com.android.internal.util.AsyncChannel$DeathMonitor
 com.android.internal.util.AsyncChannel$SyncMessenger
 com.android.internal.util.AsyncChannel$SyncMessenger$SyncHandler
+com.android.internal.util.ConcurrentUtils
+com.android.internal.util.ConcurrentUtils$1
+com.android.internal.util.ConcurrentUtils$1$1
 com.android.internal.util.DumpUtils$Dump
 com.android.internal.util.FastMath
 com.android.internal.util.FastPrintWriter
@@ -5850,7 +6055,6 @@
 com.android.internal.util.MessageUtils
 com.android.internal.util.NotificationColorUtil
 com.android.internal.util.NotificationColorUtil$ColorUtilsFromCompat
-com.android.internal.util.ParcelableString
 com.android.internal.util.Preconditions
 com.android.internal.util.Predicate
 com.android.internal.util.ProcFileReader
@@ -5865,7 +6069,8 @@
 com.android.internal.util.StateMachine$SmHandler$HaltingState
 com.android.internal.util.StateMachine$SmHandler$QuittingState
 com.android.internal.util.StateMachine$SmHandler$StateInfo
-com.android.internal.util.UserIcons
+com.android.internal.util.ToBooleanFunction
+com.android.internal.util.TokenBucket
 com.android.internal.util.VirtualRefBasePtr
 com.android.internal.util.WakeupMessage
 com.android.internal.util.XmlUtils
@@ -5874,12 +6079,6 @@
 com.android.internal.view.ActionBarPolicy
 com.android.internal.view.BaseIWindow
 com.android.internal.view.BaseSurfaceHolder
-com.android.internal.view.FloatingActionMode
-com.android.internal.view.FloatingActionMode$1
-com.android.internal.view.FloatingActionMode$2
-com.android.internal.view.FloatingActionMode$3
-com.android.internal.view.FloatingActionMode$4
-com.android.internal.view.FloatingActionMode$FloatingToolbarVisibilityHelper
 com.android.internal.view.IInputConnectionWrapper
 com.android.internal.view.IInputConnectionWrapper$MyHandler
 com.android.internal.view.IInputConnectionWrapper$SomeArgs
@@ -5908,11 +6107,13 @@
 com.android.internal.view.InputBindResult$1
 com.android.internal.view.InputConnectionWrapper
 com.android.internal.view.InputConnectionWrapper$InputContextCallback
+com.android.internal.view.OneShotPreDrawListener
 com.android.internal.view.RootViewSurfaceTaker
 com.android.internal.view.RotationPolicy
-com.android.internal.view.RotationPolicy$1
 com.android.internal.view.RotationPolicy$RotationPolicyListener
 com.android.internal.view.RotationPolicy$RotationPolicyListener$1
+com.android.internal.view.SurfaceCallbackHelper
+com.android.internal.view.SurfaceCallbackHelper$1
 com.android.internal.view.WindowManagerPolicyThread
 com.android.internal.view.animation.FallbackLUTInterpolator
 com.android.internal.view.animation.HasNativeInterpolator
@@ -5922,7 +6123,6 @@
 com.android.internal.view.menu.ActionMenuItemView
 com.android.internal.view.menu.ActionMenuItemView$PopupCallback
 com.android.internal.view.menu.BaseMenuPresenter
-com.android.internal.view.menu.ContextMenuBuilder
 com.android.internal.view.menu.ListMenuItemView
 com.android.internal.view.menu.MenuAdapter
 com.android.internal.view.menu.MenuBuilder
@@ -5942,12 +6142,12 @@
 com.android.internal.view.menu.StandardMenuPopup$1
 com.android.internal.view.menu.StandardMenuPopup$2
 com.android.internal.view.menu.SubMenuBuilder
+com.android.internal.widget.-$Lambda$6$LaTFiUorkqfcqmu-zMQbCLeO77c
 com.android.internal.widget.AbsActionBarView
 com.android.internal.widget.AbsActionBarView$VisibilityAnimListener
 com.android.internal.widget.ActionBarContainer
 com.android.internal.widget.ActionBarContainer$ActionBarBackgroundDrawable
 com.android.internal.widget.ActionBarContextView
-com.android.internal.widget.ActionBarContextView$1
 com.android.internal.widget.ActionBarOverlayLayout
 com.android.internal.widget.ActionBarOverlayLayout$1
 com.android.internal.widget.ActionBarOverlayLayout$2
@@ -5959,60 +6159,29 @@
 com.android.internal.widget.AlertDialogLayout
 com.android.internal.widget.BackgroundFallback
 com.android.internal.widget.ButtonBarLayout
+com.android.internal.widget.CachingIconView
 com.android.internal.widget.DecorContentParent
 com.android.internal.widget.DecorToolbar
 com.android.internal.widget.DialogTitle
 com.android.internal.widget.EditableInputConnection
-com.android.internal.widget.FloatingToolbar
-com.android.internal.widget.FloatingToolbar$1
-com.android.internal.widget.FloatingToolbar$2
-com.android.internal.widget.FloatingToolbar$FloatingToolbarPopup
-com.android.internal.widget.FloatingToolbar$FloatingToolbarPopup$1
-com.android.internal.widget.FloatingToolbar$FloatingToolbarPopup$12
-com.android.internal.widget.FloatingToolbar$FloatingToolbarPopup$13
-com.android.internal.widget.FloatingToolbar$FloatingToolbarPopup$14
-com.android.internal.widget.FloatingToolbar$FloatingToolbarPopup$15
-com.android.internal.widget.FloatingToolbar$FloatingToolbarPopup$16
-com.android.internal.widget.FloatingToolbar$FloatingToolbarPopup$2
-com.android.internal.widget.FloatingToolbar$FloatingToolbarPopup$3
-com.android.internal.widget.FloatingToolbar$FloatingToolbarPopup$4
-com.android.internal.widget.FloatingToolbar$FloatingToolbarPopup$5
-com.android.internal.widget.FloatingToolbar$FloatingToolbarPopup$LogAccelerateInterpolator
-com.android.internal.widget.FloatingToolbar$FloatingToolbarPopup$OverflowPanel
-com.android.internal.widget.FloatingToolbar$FloatingToolbarPopup$OverflowPanelViewHelper
+com.android.internal.widget.ICheckCredentialProgressCallback
 com.android.internal.widget.ILockSettings
 com.android.internal.widget.ILockSettings$Stub
 com.android.internal.widget.ILockSettings$Stub$Proxy
 com.android.internal.widget.ImageFloatingTextView
-com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
-com.android.internal.widget.LockPatternChecker
-com.android.internal.widget.LockPatternChecker$3
-com.android.internal.widget.LockPatternChecker$5
-com.android.internal.widget.LockPatternChecker$OnCheckCallback
-com.android.internal.widget.LockPatternChecker$OnVerifyCallback
 com.android.internal.widget.LockPatternUtils
-com.android.internal.widget.LockPatternUtils$1
 com.android.internal.widget.LockPatternUtils$RequestThrottledException
 com.android.internal.widget.LockPatternUtils$StrongAuthTracker
 com.android.internal.widget.LockPatternUtils$StrongAuthTracker$1
 com.android.internal.widget.LockPatternUtils$StrongAuthTracker$H
 com.android.internal.widget.MediaNotificationView
 com.android.internal.widget.NotificationActionListLayout
-com.android.internal.widget.NotificationActionListLayout$-void__clinit___LambdaImpl0
+com.android.internal.widget.NotificationExpandButton
 com.android.internal.widget.PreferenceImageView
-com.android.internal.widget.ResolverDrawerLayout
-com.android.internal.widget.ResolverDrawerLayout$1
-com.android.internal.widget.ResolverDrawerLayout$LayoutParams
-com.android.internal.widget.ResolverDrawerLayout$OnDismissedListener
 com.android.internal.widget.ScrollBarUtils
-com.android.internal.widget.TextViewInputDisabler
-com.android.internal.widget.TextViewInputDisabler$1
 com.android.internal.widget.ToolbarWidgetWrapper
 com.android.internal.widget.ToolbarWidgetWrapper$1
-com.android.internal.widget.ToolbarWidgetWrapper$2
-com.android.internal.widget.ToolbarWidgetWrapper$3
 com.android.internal.widget.VerifyCredentialResponse
-com.android.internal.widget.VerifyCredentialResponse$1
 com.android.okhttp.Address
 com.android.okhttp.AndroidInternal
 com.android.okhttp.AndroidShimResponseCache
@@ -6032,6 +6201,8 @@
 com.android.okhttp.ConnectionSpec
 com.android.okhttp.ConnectionSpec$Builder
 com.android.okhttp.Dispatcher
+com.android.okhttp.Dns
+com.android.okhttp.Dns$1
 com.android.okhttp.Handshake
 com.android.okhttp.Headers
 com.android.okhttp.Headers$Builder
@@ -6060,12 +6231,11 @@
 com.android.okhttp.internal.DiskLruCache$1
 com.android.okhttp.internal.DiskLruCache$2
 com.android.okhttp.internal.DiskLruCache$3
+com.android.okhttp.internal.DiskLruCache$Editor
 com.android.okhttp.internal.DiskLruCache$Entry
 com.android.okhttp.internal.FaultHidingSink
 com.android.okhttp.internal.Internal
 com.android.okhttp.internal.InternalCache
-com.android.okhttp.internal.Network
-com.android.okhttp.internal.Network$1
 com.android.okhttp.internal.OptionalMethod
 com.android.okhttp.internal.Platform
 com.android.okhttp.internal.RouteDatabase
@@ -6076,17 +6246,17 @@
 com.android.okhttp.internal.http.CacheStrategy
 com.android.okhttp.internal.http.CacheStrategy$Factory
 com.android.okhttp.internal.http.HeaderParser
-com.android.okhttp.internal.http.HttpConnection
-com.android.okhttp.internal.http.HttpConnection$AbstractSource
-com.android.okhttp.internal.http.HttpConnection$ChunkedSink
-com.android.okhttp.internal.http.HttpConnection$ChunkedSource
-com.android.okhttp.internal.http.HttpConnection$FixedLengthSink
-com.android.okhttp.internal.http.HttpConnection$FixedLengthSource
-com.android.okhttp.internal.http.HttpConnection$UnknownLengthSource
+com.android.okhttp.internal.http.Http1xStream
+com.android.okhttp.internal.http.Http1xStream$AbstractSource
+com.android.okhttp.internal.http.Http1xStream$ChunkedSink
+com.android.okhttp.internal.http.Http1xStream$ChunkedSource
+com.android.okhttp.internal.http.Http1xStream$FixedLengthSink
+com.android.okhttp.internal.http.Http1xStream$FixedLengthSource
+com.android.okhttp.internal.http.Http1xStream$UnknownLengthSource
 com.android.okhttp.internal.http.HttpEngine
 com.android.okhttp.internal.http.HttpEngine$1
 com.android.okhttp.internal.http.HttpMethod
-com.android.okhttp.internal.http.HttpTransport
+com.android.okhttp.internal.http.HttpStream
 com.android.okhttp.internal.http.OkHeaders
 com.android.okhttp.internal.http.OkHeaders$1
 com.android.okhttp.internal.http.RealResponseBody
@@ -6096,12 +6266,13 @@
 com.android.okhttp.internal.http.RouteException
 com.android.okhttp.internal.http.RouteSelector
 com.android.okhttp.internal.http.StatusLine
-com.android.okhttp.internal.http.Transport
+com.android.okhttp.internal.http.StreamAllocation
 com.android.okhttp.internal.huc.DelegatingHttpsURLConnection
 com.android.okhttp.internal.huc.HttpURLConnectionImpl
 com.android.okhttp.internal.huc.HttpsURLConnectionImpl
 com.android.okhttp.internal.io.FileSystem
 com.android.okhttp.internal.io.FileSystem$1
+com.android.okhttp.internal.io.RealConnection
 com.android.okhttp.internal.tls.OkHostnameVerifier
 com.android.okhttp.okio.AsyncTimeout
 com.android.okhttp.okio.AsyncTimeout$1
@@ -6145,20 +6316,34 @@
 com.android.org.bouncycastle.asn1.x509.X509ObjectIdentifiers
 com.android.org.bouncycastle.asn1.x9.X9ObjectIdentifiers
 com.android.org.bouncycastle.crypto.AsymmetricBlockCipher
+com.android.org.bouncycastle.crypto.BlockCipher
+com.android.org.bouncycastle.crypto.BufferedBlockCipher
 com.android.org.bouncycastle.crypto.CipherKeyGenerator
+com.android.org.bouncycastle.crypto.CipherParameters
 com.android.org.bouncycastle.crypto.CryptoException
+com.android.org.bouncycastle.crypto.DataLengthException
 com.android.org.bouncycastle.crypto.Digest
 com.android.org.bouncycastle.crypto.ExtendedDigest
 com.android.org.bouncycastle.crypto.InvalidCipherTextException
 com.android.org.bouncycastle.crypto.KeyGenerationParameters
+com.android.org.bouncycastle.crypto.OutputLengthException
+com.android.org.bouncycastle.crypto.RuntimeCryptoException
 com.android.org.bouncycastle.crypto.digests.AndroidDigestFactory
 com.android.org.bouncycastle.crypto.digests.AndroidDigestFactoryInterface
 com.android.org.bouncycastle.crypto.digests.AndroidDigestFactoryOpenSSL
 com.android.org.bouncycastle.crypto.digests.OpenSSLDigest
 com.android.org.bouncycastle.crypto.digests.OpenSSLDigest$SHA1
 com.android.org.bouncycastle.crypto.encodings.OAEPEncoding
+com.android.org.bouncycastle.crypto.engines.AESEngine
 com.android.org.bouncycastle.crypto.engines.RSABlindedEngine
 com.android.org.bouncycastle.crypto.engines.RSACoreEngine
+com.android.org.bouncycastle.crypto.paddings.BlockCipherPadding
+com.android.org.bouncycastle.crypto.paddings.PKCS7Padding
+com.android.org.bouncycastle.crypto.paddings.PaddedBufferedBlockCipher
+com.android.org.bouncycastle.crypto.params.KeyParameter
+com.android.org.bouncycastle.crypto.params.ParametersWithRandom
+com.android.org.bouncycastle.jcajce.PBKDFKey
+com.android.org.bouncycastle.jcajce.PKCS12Key
 com.android.org.bouncycastle.jcajce.provider.asymmetric.DH$Mappings
 com.android.org.bouncycastle.jcajce.provider.asymmetric.DSA$Mappings
 com.android.org.bouncycastle.jcajce.provider.asymmetric.EC$Mappings
@@ -6196,6 +6381,8 @@
 com.android.org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi
 com.android.org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi$Std
 com.android.org.bouncycastle.jcajce.provider.symmetric.AES
+com.android.org.bouncycastle.jcajce.provider.symmetric.AES$ECB
+com.android.org.bouncycastle.jcajce.provider.symmetric.AES$ECB$1
 com.android.org.bouncycastle.jcajce.provider.symmetric.AES$KeyGen
 com.android.org.bouncycastle.jcajce.provider.symmetric.AES$Mappings
 com.android.org.bouncycastle.jcajce.provider.symmetric.ARC4
@@ -6206,18 +6393,31 @@
 com.android.org.bouncycastle.jcajce.provider.symmetric.DES$Mappings
 com.android.org.bouncycastle.jcajce.provider.symmetric.DESede
 com.android.org.bouncycastle.jcajce.provider.symmetric.DESede$Mappings
+com.android.org.bouncycastle.jcajce.provider.symmetric.PBEPBKDF2
+com.android.org.bouncycastle.jcajce.provider.symmetric.PBEPBKDF2$Mappings
 com.android.org.bouncycastle.jcajce.provider.symmetric.PBEPKCS12
 com.android.org.bouncycastle.jcajce.provider.symmetric.PBEPKCS12$Mappings
+com.android.org.bouncycastle.jcajce.provider.symmetric.PBES2AlgorithmParameters
+com.android.org.bouncycastle.jcajce.provider.symmetric.PBES2AlgorithmParameters$Mappings
 com.android.org.bouncycastle.jcajce.provider.symmetric.RC2
 com.android.org.bouncycastle.jcajce.provider.symmetric.RC2$Mappings
 com.android.org.bouncycastle.jcajce.provider.symmetric.SymmetricAlgorithmProvider
 com.android.org.bouncycastle.jcajce.provider.symmetric.Twofish
 com.android.org.bouncycastle.jcajce.provider.symmetric.Twofish$Mappings
+com.android.org.bouncycastle.jcajce.provider.symmetric.util.BCPBEKey
+com.android.org.bouncycastle.jcajce.provider.symmetric.util.BaseBlockCipher
+com.android.org.bouncycastle.jcajce.provider.symmetric.util.BaseBlockCipher$AEADGenericBlockCipher
+com.android.org.bouncycastle.jcajce.provider.symmetric.util.BaseBlockCipher$BufferedGenericBlockCipher
+com.android.org.bouncycastle.jcajce.provider.symmetric.util.BaseBlockCipher$GenericBlockCipher
 com.android.org.bouncycastle.jcajce.provider.symmetric.util.BaseKeyGenerator
+com.android.org.bouncycastle.jcajce.provider.symmetric.util.BaseWrapCipher
+com.android.org.bouncycastle.jcajce.provider.symmetric.util.BlockCipherProvider
+com.android.org.bouncycastle.jcajce.provider.symmetric.util.PBE
 com.android.org.bouncycastle.jcajce.provider.util.AlgorithmProvider
 com.android.org.bouncycastle.jcajce.provider.util.AsymmetricAlgorithmProvider
 com.android.org.bouncycastle.jcajce.provider.util.AsymmetricKeyInfoConverter
 com.android.org.bouncycastle.jcajce.provider.util.DigestFactory
+com.android.org.bouncycastle.jcajce.spec.AEADParameterSpec
 com.android.org.bouncycastle.jcajce.util.BCJcaJceHelper
 com.android.org.bouncycastle.jcajce.util.JcaJceHelper
 com.android.org.bouncycastle.jcajce.util.ProviderJcaJceHelper
@@ -6227,19 +6427,25 @@
 com.android.org.bouncycastle.jce.provider.BouncyCastleProviderConfiguration
 com.android.org.bouncycastle.util.Arrays
 com.android.org.bouncycastle.util.Encodable
+com.android.org.bouncycastle.util.Pack
 com.android.org.bouncycastle.util.Strings
 com.android.org.bouncycastle.util.Strings$1
+com.android.org.conscrypt.AbstractOpenSSLSession
 com.android.org.conscrypt.AbstractSessionContext
 com.android.org.conscrypt.AbstractSessionContext$1
 com.android.org.conscrypt.AddressUtils
 com.android.org.conscrypt.ByteArray
-com.android.org.conscrypt.CertPinManager
+com.android.org.conscrypt.CertBlacklist
 com.android.org.conscrypt.CertificatePriorityComparator
 com.android.org.conscrypt.ChainStrengthAnalyzer
 com.android.org.conscrypt.ClientSessionContext
 com.android.org.conscrypt.ClientSessionContext$HostAndPort
 com.android.org.conscrypt.CryptoUpcalls
+com.android.org.conscrypt.EvpMdRef$MD5
+com.android.org.conscrypt.EvpMdRef$SHA1
+com.android.org.conscrypt.EvpMdRef$SHA256
 com.android.org.conscrypt.FileClientSessionCache
+com.android.org.conscrypt.FileClientSessionCache$CacheFile
 com.android.org.conscrypt.FileClientSessionCache$Impl
 com.android.org.conscrypt.Hex
 com.android.org.conscrypt.JSSEProvider
@@ -6278,7 +6484,6 @@
 com.android.org.conscrypt.OpenSSLMessageDigestJDK$MD5
 com.android.org.conscrypt.OpenSSLMessageDigestJDK$SHA1
 com.android.org.conscrypt.OpenSSLMessageDigestJDK$SHA256
-com.android.org.conscrypt.OpenSSLMessageDigestJDK$SHA512
 com.android.org.conscrypt.OpenSSLProvider
 com.android.org.conscrypt.OpenSSLRSAKeyFactory
 com.android.org.conscrypt.OpenSSLRSAKeyPairGenerator
@@ -6305,10 +6510,8 @@
 com.android.org.conscrypt.OpenSSLX509CertificateFactory$2
 com.android.org.conscrypt.OpenSSLX509CertificateFactory$Parser
 com.android.org.conscrypt.OpenSSLX509CertificateFactory$ParsingException
-com.android.org.conscrypt.PinEntryException
-com.android.org.conscrypt.PinListEntry
-com.android.org.conscrypt.PinManagerException
 com.android.org.conscrypt.Platform
+com.android.org.conscrypt.Platform$NoPreloadHolder
 com.android.org.conscrypt.SSLClientSessionCache
 com.android.org.conscrypt.SSLParametersImpl
 com.android.org.conscrypt.SSLParametersImpl$AliasChooser
@@ -6326,12 +6529,20 @@
 com.android.org.conscrypt.TrustedCertificateStore$4
 com.android.org.conscrypt.TrustedCertificateStore$5
 com.android.org.conscrypt.TrustedCertificateStore$CertSelector
+com.android.org.conscrypt.ct.CTLogInfo
+com.android.org.conscrypt.ct.CTLogStore
+com.android.org.conscrypt.ct.CTLogStoreImpl
+com.android.org.conscrypt.ct.CTLogStoreImpl$InvalidLogFileException
+com.android.org.conscrypt.ct.CTPolicy
+com.android.org.conscrypt.ct.CTPolicyImpl
+com.android.org.conscrypt.ct.CTVerifier
+com.android.org.conscrypt.ct.KnownLogs
+com.android.org.conscrypt.ct.SerializationException
 com.android.org.conscrypt.util.ArrayUtils
 com.android.org.conscrypt.util.EmptyArray
 com.android.server.AppWidgetBackupBridge
 com.android.server.BootReceiver
 com.android.server.BootReceiver$1
-com.android.server.BootReceiver$2
 com.android.server.LocalServices
 com.android.server.NetworkManagementSocketTagger
 com.android.server.NetworkManagementSocketTagger$1
@@ -6341,6 +6552,7 @@
 com.android.server.WidgetBackupProvider
 com.android.server.backup.AccountSyncSettingsBackupHelper
 com.android.server.net.BaseNetworkObserver
+com.android.server.net.DnsServerEntry
 com.android.server.net.DnsServerRepository
 com.android.server.net.NetlinkTracker
 com.android.server.net.NetlinkTracker$Callback
@@ -6350,6 +6562,17 @@
 com.android.server.sip.SipWakeLock
 com.android.server.sip.SipWakeupTimer
 com.android.server.sip.SipWakeupTimer$MyEventComparator
+com.android.server.wifi.nano.WifiMetricsProto$AlertReasonCount
+com.android.server.wifi.nano.WifiMetricsProto$ConnectionEvent
+com.android.server.wifi.nano.WifiMetricsProto$RouterFingerPrint
+com.android.server.wifi.nano.WifiMetricsProto$RssiPollCount
+com.android.server.wifi.nano.WifiMetricsProto$SoftApDurationBucket
+com.android.server.wifi.nano.WifiMetricsProto$SoftApReturnCodeCount
+com.android.server.wifi.nano.WifiMetricsProto$WifiLog
+com.android.server.wifi.nano.WifiMetricsProto$WifiLog$ScanReturnEntry
+com.android.server.wifi.nano.WifiMetricsProto$WifiLog$WifiSystemStateEntry
+com.android.server.wifi.nano.WifiMetricsProto$WifiScoreCount
+com.android.server.wm.nano.WindowManagerProtos$TaskSnapshotProto
 com.google.android.collect.Lists
 com.google.android.collect.Maps
 com.google.android.collect.Sets
@@ -6363,15 +6586,21 @@
 com.google.android.mms.pdu.GenericPdu
 com.google.android.mms.pdu.PduComposer
 com.google.android.mms.pdu.PduPersister
+dalvik.annotation.optimization.CriticalNative
+dalvik.annotation.optimization.FastNative
 dalvik.system.BaseDexClassLoader
+dalvik.system.BaseDexClassLoader$Reporter
 dalvik.system.BlockGuard
 dalvik.system.BlockGuard$1
 dalvik.system.BlockGuard$2
 dalvik.system.BlockGuard$BlockGuardPolicyException
 dalvik.system.BlockGuard$Policy
+dalvik.system.ClassExt
 dalvik.system.CloseGuard
 dalvik.system.CloseGuard$DefaultReporter
+dalvik.system.CloseGuard$DefaultTracker
 dalvik.system.CloseGuard$Reporter
+dalvik.system.CloseGuard$Tracker
 dalvik.system.DalvikLogHandler
 dalvik.system.DalvikLogging
 dalvik.system.DexClassLoader
@@ -6379,6 +6608,10 @@
 dalvik.system.DexFile$DFEnum
 dalvik.system.DexPathList
 dalvik.system.DexPathList$Element
+dalvik.system.DexPathList$NativeLibraryElement
+dalvik.system.EmulatedStackFrame
+dalvik.system.EmulatedStackFrame$Range
+dalvik.system.InMemoryDexClassLoader$DexData
 dalvik.system.PathClassLoader
 dalvik.system.SocketTagger
 dalvik.system.SocketTagger$1
@@ -6386,11 +6619,6 @@
 dalvik.system.VMRuntime
 dalvik.system.VMStack
 dalvik.system.ZygoteHooks
-java.beans.ChangeListenerMap
-java.beans.PropertyChangeEvent
-java.beans.PropertyChangeListener
-java.beans.PropertyChangeSupport
-java.beans.PropertyChangeSupport$PropertyChangeListenerMap
 java.io.Bits
 java.io.BufferedInputStream
 java.io.BufferedOutputStream
@@ -6407,6 +6635,7 @@
 java.io.DataInputStream
 java.io.DataOutput
 java.io.DataOutputStream
+java.io.DefaultFileSystem
 java.io.EOFException
 java.io.ExpiringCache
 java.io.ExpiringCache$1
@@ -6414,7 +6643,9 @@
 java.io.Externalizable
 java.io.File
 java.io.File$PathStatus
+java.io.File$TempDirectory
 java.io.FileDescriptor
+java.io.FileDescriptor$1
 java.io.FileFilter
 java.io.FileInputStream
 java.io.FileInputStream$UseManualSkipException
@@ -6434,6 +6665,7 @@
 java.io.InterruptedIOException
 java.io.InvalidClassException
 java.io.InvalidObjectException
+java.io.NotSerializableException
 java.io.ObjectInput
 java.io.ObjectInputStream
 java.io.ObjectInputStream$BlockDataInputStream
@@ -6445,6 +6677,7 @@
 java.io.ObjectOutputStream
 java.io.ObjectOutputStream$BlockDataOutputStream
 java.io.ObjectOutputStream$HandleTable
+java.io.ObjectOutputStream$PutField
 java.io.ObjectOutputStream$ReplaceTable
 java.io.ObjectStreamClass
 java.io.ObjectStreamClass$1
@@ -6475,13 +6708,17 @@
 java.io.SerialCallbackContext
 java.io.Serializable
 java.io.SerializablePermission
+java.io.StreamCorruptedException
 java.io.StringBufferInputStream
 java.io.StringReader
 java.io.StringWriter
+java.io.SyncFailedException
 java.io.UTFDataFormatException
 java.io.UnixFileSystem
 java.io.UnsupportedEncodingException
 java.io.Writer
+java.lang.-$Lambda$250$S9HjrJh0nDg7IyU6wZdPArnZWRQ
+java.lang.-$Lambda$251$S9HjrJh0nDg7IyU6wZdPArnZWRQ
 java.lang.AbstractMethodError
 java.lang.AbstractStringBuilder
 java.lang.AndroidHardcodedSystemProperties
@@ -6498,8 +6735,6 @@
 java.lang.CaseMapper
 java.lang.CaseMapper$1
 java.lang.CharSequence
-java.lang.CharSequence$-java_util_stream_IntStream_chars__LambdaImpl0
-java.lang.CharSequence$-java_util_stream_IntStream_codePoints__LambdaImpl0
 java.lang.CharSequence$1CharIterator
 java.lang.CharSequence$1CodePointIterator
 java.lang.Character
@@ -6531,9 +6766,6 @@
 java.lang.Exception
 java.lang.ExceptionInInitializerError
 java.lang.Float
-java.lang.FloatingDecimal
-java.lang.FloatingDecimal$1
-java.lang.FloatingDecimal$2
 java.lang.IllegalAccessError
 java.lang.IllegalAccessException
 java.lang.IllegalArgumentException
@@ -6543,6 +6775,7 @@
 java.lang.IncompatibleClassChangeError
 java.lang.IndexOutOfBoundsException
 java.lang.InheritableThreadLocal
+java.lang.InstantiationError
 java.lang.InstantiationException
 java.lang.Integer
 java.lang.Integer$IntegerCache
@@ -6554,7 +6787,8 @@
 java.lang.Long
 java.lang.Long$LongCache
 java.lang.Math
-java.lang.Math$NoImagePreloadHolder
+java.lang.Math$RandomNumberGeneratorHolder
+java.lang.NegativeArraySizeException
 java.lang.NoClassDefFoundError
 java.lang.NoSuchFieldError
 java.lang.NoSuchFieldException
@@ -6586,7 +6820,6 @@
 java.lang.SecurityManager
 java.lang.Short
 java.lang.Short$ShortCache
-java.lang.Shutdown
 java.lang.StackOverflowError
 java.lang.StackTraceElement
 java.lang.StrictMath
@@ -6594,7 +6827,6 @@
 java.lang.String$CaseInsensitiveComparator
 java.lang.StringBuffer
 java.lang.StringBuilder
-java.lang.StringCoding
 java.lang.StringFactory
 java.lang.StringIndexOutOfBoundsException
 java.lang.System
@@ -6636,6 +6868,22 @@
 java.lang.annotation.Inherited
 java.lang.annotation.Retention
 java.lang.annotation.Target
+java.lang.invoke.MethodHandle
+java.lang.invoke.MethodHandleImpl
+java.lang.invoke.MethodHandleImpl$HandleInfo
+java.lang.invoke.MethodHandleInfo
+java.lang.invoke.MethodHandleStatics
+java.lang.invoke.MethodHandles
+java.lang.invoke.MethodType
+java.lang.invoke.MethodType$ConcurrentWeakInternSet
+java.lang.invoke.MethodType$ConcurrentWeakInternSet$WeakEntry
+java.lang.invoke.MethodTypeForm
+java.lang.invoke.Transformers$BindTo
+java.lang.invoke.Transformers$Collector
+java.lang.invoke.Transformers$Spreader
+java.lang.invoke.Transformers$Transformer
+java.lang.invoke.Transformers$VarargsCollector
+java.lang.invoke.WrongMethodTypeException
 java.lang.ref.FinalizerReference
 java.lang.ref.FinalizerReference$Sentinel
 java.lang.ref.PhantomReference
@@ -6643,27 +6891,40 @@
 java.lang.ref.ReferenceQueue
 java.lang.ref.SoftReference
 java.lang.ref.WeakReference
-java.lang.reflect.AbstractMethod
-java.lang.reflect.AbstractMethod$GenericInfo
 java.lang.reflect.AccessibleObject
 java.lang.reflect.AnnotatedElement
 java.lang.reflect.Array
 java.lang.reflect.Constructor
+java.lang.reflect.Executable
+java.lang.reflect.Executable$GenericInfo
 java.lang.reflect.Field
 java.lang.reflect.GenericArrayType
 java.lang.reflect.GenericDeclaration
 java.lang.reflect.InvocationHandler
 java.lang.reflect.InvocationTargetException
+java.lang.reflect.MalformedParametersException
 java.lang.reflect.Member
 java.lang.reflect.Method
 java.lang.reflect.Method$1
 java.lang.reflect.Modifier
+java.lang.reflect.Parameter
 java.lang.reflect.ParameterizedType
 java.lang.reflect.Proxy
 java.lang.reflect.Proxy$1
+java.lang.reflect.Proxy$Key1
+java.lang.reflect.Proxy$Key2
+java.lang.reflect.Proxy$KeyFactory
+java.lang.reflect.Proxy$KeyX
+java.lang.reflect.Proxy$ProxyClassFactory
 java.lang.reflect.Type
 java.lang.reflect.TypeVariable
 java.lang.reflect.UndeclaredThrowableException
+java.lang.reflect.WeakCache
+java.lang.reflect.WeakCache$CacheKey
+java.lang.reflect.WeakCache$CacheValue
+java.lang.reflect.WeakCache$Factory
+java.lang.reflect.WeakCache$LookupValue
+java.lang.reflect.WeakCache$Value
 java.lang.reflect.WildcardType
 java.math.BigDecimal
 java.math.BigInt
@@ -6671,7 +6932,6 @@
 java.math.BitLevel
 java.math.Conversion
 java.math.Division
-java.math.Logical
 java.math.MathContext
 java.math.Multiplication
 java.math.NativeBN
@@ -6718,6 +6978,7 @@
 java.net.InMemoryCookieStore
 java.net.Inet4Address
 java.net.Inet6Address
+java.net.Inet6Address$Inet6AddressHolder
 java.net.Inet6AddressImpl
 java.net.InetAddress
 java.net.InetAddress$1
@@ -6730,7 +6991,6 @@
 java.net.MalformedURLException
 java.net.MulticastSocket
 java.net.NetworkInterface
-java.net.NetworkInterface$1
 java.net.NetworkInterface$1checkedAddresses
 java.net.NoRouteToHostException
 java.net.Parts
@@ -6739,14 +6999,12 @@
 java.net.PlainSocketImpl
 java.net.PortUnreachableException
 java.net.ProtocolException
-java.net.ProtocolFamily
 java.net.Proxy
 java.net.Proxy$Type
 java.net.ProxySelector
 java.net.ResponseCache
 java.net.ServerSocket
 java.net.Socket
-java.net.Socket$1
 java.net.Socket$2
 java.net.Socket$3
 java.net.SocketAddress
@@ -6758,8 +7016,6 @@
 java.net.SocketTimeoutException
 java.net.SocksConsts
 java.net.SocksSocketImpl
-java.net.SocksSocketImpl$3
-java.net.StandardProtocolFamily
 java.net.URI
 java.net.URI$Parser
 java.net.URISyntaxException
@@ -6805,7 +7061,6 @@
 java.nio.channels.CancelledKeyException
 java.nio.channels.Channel
 java.nio.channels.Channels
-java.nio.channels.Channels$1
 java.nio.channels.Channels$ReadableByteChannelImpl
 java.nio.channels.ClosedByInterruptException
 java.nio.channels.ClosedChannelException
@@ -6815,6 +7070,7 @@
 java.nio.channels.FileLock
 java.nio.channels.GatheringByteChannel
 java.nio.channels.InterruptibleChannel
+java.nio.channels.MulticastChannel
 java.nio.channels.NetworkChannel
 java.nio.channels.NonWritableChannelException
 java.nio.channels.OverlappingFileLockException
@@ -6822,19 +7078,12 @@
 java.nio.channels.ScatteringByteChannel
 java.nio.channels.SeekableByteChannel
 java.nio.channels.SelectableChannel
-java.nio.channels.SelectionKey
-java.nio.channels.Selector
 java.nio.channels.ServerSocketChannel
 java.nio.channels.SocketChannel
 java.nio.channels.WritableByteChannel
 java.nio.channels.spi.AbstractInterruptibleChannel
 java.nio.channels.spi.AbstractInterruptibleChannel$1
 java.nio.channels.spi.AbstractSelectableChannel
-java.nio.channels.spi.AbstractSelectionKey
-java.nio.channels.spi.AbstractSelector
-java.nio.channels.spi.AbstractSelector$1
-java.nio.channels.spi.SelectorProvider
-java.nio.channels.spi.SelectorProvider$1
 java.nio.charset.CharacterCodingException
 java.nio.charset.Charset
 java.nio.charset.CharsetDecoder
@@ -6850,6 +7099,21 @@
 java.nio.charset.IllegalCharsetNameException
 java.nio.charset.StandardCharsets
 java.nio.charset.UnsupportedCharsetException
+java.nio.file.FileAlreadyExistsException
+java.nio.file.FileSystem
+java.nio.file.FileSystemException
+java.nio.file.FileSystems
+java.nio.file.FileSystems$DefaultFileSystemHolder
+java.nio.file.FileSystems$DefaultFileSystemHolder$1
+java.nio.file.Files
+java.nio.file.NoSuchFileException
+java.nio.file.OpenOption
+java.nio.file.Path
+java.nio.file.Watchable
+java.nio.file.attribute.BasicFileAttributes
+java.nio.file.attribute.FileAttribute
+java.nio.file.attribute.PosixFileAttributes
+java.nio.file.spi.FileSystemProvider
 java.security.AccessControlContext
 java.security.AccessControlException
 java.security.AccessController
@@ -6912,6 +7176,7 @@
 java.security.cert.CRL
 java.security.cert.CRLException
 java.security.cert.CertPath
+java.security.cert.CertPathBuilderException
 java.security.cert.CertPathChecker
 java.security.cert.CertPathHelperImpl
 java.security.cert.CertPathParameters
@@ -6950,7 +7215,6 @@
 java.security.interfaces.RSAPublicKey
 java.security.spec.AlgorithmParameterSpec
 java.security.spec.ECField
-java.security.spec.ECFieldF2m
 java.security.spec.ECFieldFp
 java.security.spec.ECGenParameterSpec
 java.security.spec.ECParameterSpec
@@ -6964,6 +7228,8 @@
 java.security.spec.KeySpec
 java.security.spec.MGF1ParameterSpec
 java.security.spec.PKCS8EncodedKeySpec
+java.security.spec.RSAPrivateCrtKeySpec
+java.security.spec.RSAPrivateKeySpec
 java.security.spec.RSAPublicKeySpec
 java.security.spec.X509EncodedKeySpec
 java.sql.Date
@@ -6999,17 +7265,23 @@
 java.text.RuleBasedCollator
 java.text.SimpleDateFormat
 java.text.StringCharacterIterator
-java.text.spi.DateFormatProvider
-java.text.spi.DateFormatSymbolsProvider
-java.text.spi.DecimalFormatSymbolsProvider
-java.text.spi.NumberFormatProvider
+java.time.DateTimeException
+java.util.-$Lambda$181$4EqhxufgNKat19m0CB0-toH_lzo
+java.util.-$Lambda$182$4EqhxufgNKat19m0CB0-toH_lzo
+java.util.-$Lambda$183$4EqhxufgNKat19m0CB0-toH_lzo
+java.util.-$Lambda$184$4EqhxufgNKat19m0CB0-toH_lzo
+java.util.-$Lambda$267$4EqhxufgNKat19m0CB0-toH_lzo
+java.util.-$Lambda$268$4EqhxufgNKat19m0CB0-toH_lzo
+java.util.-$Lambda$291$aUGKT4ItCOku5-JSG-x8Aqj2pJw
+java.util.-$Lambda$292$aUGKT4ItCOku5-JSG-x8Aqj2pJw
+java.util.-$Lambda$293$aUGKT4ItCOku5-JSG-x8Aqj2pJw
+java.util.-$Lambda$294$aUGKT4ItCOku5-JSG-x8Aqj2pJw
 java.util.AbstractCollection
 java.util.AbstractList
 java.util.AbstractList$Itr
 java.util.AbstractList$ListItr
 java.util.AbstractMap
 java.util.AbstractMap$1
-java.util.AbstractMap$1$1
 java.util.AbstractMap$2
 java.util.AbstractMap$2$1
 java.util.AbstractMap$SimpleEntry
@@ -7019,14 +7291,31 @@
 java.util.AbstractSet
 java.util.ArrayDeque
 java.util.ArrayDeque$DeqIterator
+java.util.ArrayDeque$DescendingIterator
 java.util.ArrayList
 java.util.ArrayList$ArrayListSpliterator
 java.util.ArrayList$Itr
 java.util.ArrayList$ListItr
 java.util.ArrayList$SubList
 java.util.ArrayList$SubList$1
+java.util.ArrayPrefixHelpers$CumulateTask
+java.util.ArrayPrefixHelpers$DoubleCumulateTask
+java.util.ArrayPrefixHelpers$IntCumulateTask
+java.util.ArrayPrefixHelpers$LongCumulateTask
 java.util.Arrays
 java.util.Arrays$ArrayList
+java.util.Arrays$NaturalOrder
+java.util.ArraysParallelSortHelpers$FJByte$Sorter
+java.util.ArraysParallelSortHelpers$FJChar$Sorter
+java.util.ArraysParallelSortHelpers$FJDouble$Sorter
+java.util.ArraysParallelSortHelpers$FJFloat$Sorter
+java.util.ArraysParallelSortHelpers$FJInt$Sorter
+java.util.ArraysParallelSortHelpers$FJLong$Sorter
+java.util.ArraysParallelSortHelpers$FJObject$Sorter
+java.util.ArraysParallelSortHelpers$FJShort$Sorter
+java.util.Base64
+java.util.Base64$Decoder
+java.util.Base64$Encoder
 java.util.BitSet
 java.util.Calendar
 java.util.Collection
@@ -7038,6 +7327,9 @@
 java.util.Collections$CheckedCollection
 java.util.Collections$CheckedList
 java.util.Collections$CheckedMap
+java.util.Collections$CheckedNavigableMap
+java.util.Collections$CheckedNavigableSet
+java.util.Collections$CheckedQueue
 java.util.Collections$CheckedRandomAccessList
 java.util.Collections$CheckedSet
 java.util.Collections$CheckedSortedMap
@@ -7058,6 +7350,8 @@
 java.util.Collections$SynchronizedCollection
 java.util.Collections$SynchronizedList
 java.util.Collections$SynchronizedMap
+java.util.Collections$SynchronizedNavigableMap
+java.util.Collections$SynchronizedNavigableSet
 java.util.Collections$SynchronizedRandomAccessList
 java.util.Collections$SynchronizedSet
 java.util.Collections$SynchronizedSortedMap
@@ -7070,18 +7364,16 @@
 java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet
 java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1
 java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$UnmodifiableEntry
+java.util.Collections$UnmodifiableNavigableMap
+java.util.Collections$UnmodifiableNavigableMap$EmptyNavigableMap
+java.util.Collections$UnmodifiableNavigableSet
+java.util.Collections$UnmodifiableNavigableSet$EmptyNavigableSet
 java.util.Collections$UnmodifiableRandomAccessList
 java.util.Collections$UnmodifiableSet
 java.util.Collections$UnmodifiableSortedMap
 java.util.Collections$UnmodifiableSortedSet
 java.util.ComparableTimSort
 java.util.Comparator
-java.util.Comparator$-java_util_Comparator_comparingDouble_java_util_function_ToDoubleFunction_keyExtractor_LambdaImpl0
-java.util.Comparator$-java_util_Comparator_comparingInt_java_util_function_ToIntFunction_keyExtractor_LambdaImpl0
-java.util.Comparator$-java_util_Comparator_comparingLong_java_util_function_ToLongFunction_keyExtractor_LambdaImpl0
-java.util.Comparator$-java_util_Comparator_comparing_java_util_function_Function_keyExtractor_LambdaImpl0
-java.util.Comparator$-java_util_Comparator_comparing_java_util_function_Function_keyExtractor_java_util_Comparator_keyComparator_LambdaImpl0
-java.util.Comparator$-java_util_Comparator_thenComparing_java_util_Comparator_other_LambdaImpl0
 java.util.Comparators$NaturalOrderComparator
 java.util.Comparators$NullComparator
 java.util.ConcurrentModificationException
@@ -7105,8 +7397,6 @@
 java.util.EnumSet$SerializationProxy
 java.util.Enumeration
 java.util.EventListener
-java.util.EventObject
-java.util.FormatFlagsConversionMismatchException
 java.util.Formattable
 java.util.Formatter
 java.util.Formatter$Conversion
@@ -7121,9 +7411,10 @@
 java.util.HashMap$EntryIterator
 java.util.HashMap$EntrySet
 java.util.HashMap$HashIterator
-java.util.HashMap$HashMapEntry
 java.util.HashMap$KeyIterator
 java.util.HashMap$KeySet
+java.util.HashMap$Node
+java.util.HashMap$TreeNode
 java.util.HashMap$ValueIterator
 java.util.HashMap$Values
 java.util.HashSet
@@ -7148,11 +7439,14 @@
 java.util.JumboEnumSet
 java.util.JumboEnumSet$EnumSetIterator
 java.util.LinkedHashMap
-java.util.LinkedHashMap$EntryIterator
-java.util.LinkedHashMap$KeyIterator
+java.util.LinkedHashMap$LinkedEntryIterator
+java.util.LinkedHashMap$LinkedEntrySet
 java.util.LinkedHashMap$LinkedHashIterator
 java.util.LinkedHashMap$LinkedHashMapEntry
-java.util.LinkedHashMap$ValueIterator
+java.util.LinkedHashMap$LinkedKeyIterator
+java.util.LinkedHashMap$LinkedKeySet
+java.util.LinkedHashMap$LinkedValueIterator
+java.util.LinkedHashMap$LinkedValues
 java.util.LinkedHashSet
 java.util.LinkedList
 java.util.LinkedList$DescendingIterator
@@ -7160,10 +7454,13 @@
 java.util.LinkedList$Node
 java.util.List
 java.util.ListIterator
+java.util.ListResourceBundle
 java.util.Locale
 java.util.Locale$Builder
 java.util.Locale$Cache
 java.util.Locale$Category
+java.util.Locale$FilteringMode
+java.util.Locale$LanguageRange
 java.util.Locale$LocaleKey
 java.util.Map
 java.util.Map$Entry
@@ -7197,14 +7494,8 @@
 java.util.ResourceBundle$Control$1
 java.util.ResourceBundle$Control$CandidateListCache
 java.util.ResourceBundle$LoaderReference
-java.util.ResourceBundle$RBClassLoader
-java.util.ResourceBundle$RBClassLoader$1
 java.util.Scanner
 java.util.Scanner$1
-java.util.ServiceConfigurationError
-java.util.ServiceLoader
-java.util.ServiceLoader$1
-java.util.ServiceLoader$LazyIterator
 java.util.Set
 java.util.SimpleTimeZone
 java.util.SortedMap
@@ -7220,6 +7511,7 @@
 java.util.Spliterators$EmptySpliterator$OfInt
 java.util.Spliterators$EmptySpliterator$OfLong
 java.util.Spliterators$EmptySpliterator$OfRef
+java.util.Spliterators$IteratorSpliterator
 java.util.Stack
 java.util.StringJoiner
 java.util.StringTokenizer
@@ -7264,6 +7556,7 @@
 java.util.WeakHashMap$KeySet
 java.util.WeakHashMap$ValueIterator
 java.util.WeakHashMap$Values
+java.util.concurrent.-$Lambda$269$xR9BLpu6SifNikvFgr4lEiECBsk
 java.util.concurrent.AbstractExecutorService
 java.util.concurrent.ArrayBlockingQueue
 java.util.concurrent.BlockingDeque
@@ -7279,15 +7572,48 @@
 java.util.concurrent.CompletionStage
 java.util.concurrent.ConcurrentHashMap
 java.util.concurrent.ConcurrentHashMap$BaseIterator
+java.util.concurrent.ConcurrentHashMap$BulkTask
 java.util.concurrent.ConcurrentHashMap$CollectionView
 java.util.concurrent.ConcurrentHashMap$CounterCell
 java.util.concurrent.ConcurrentHashMap$EntryIterator
 java.util.concurrent.ConcurrentHashMap$EntrySetView
+java.util.concurrent.ConcurrentHashMap$ForEachEntryTask
+java.util.concurrent.ConcurrentHashMap$ForEachKeyTask
+java.util.concurrent.ConcurrentHashMap$ForEachMappingTask
+java.util.concurrent.ConcurrentHashMap$ForEachTransformedEntryTask
+java.util.concurrent.ConcurrentHashMap$ForEachTransformedKeyTask
+java.util.concurrent.ConcurrentHashMap$ForEachTransformedMappingTask
+java.util.concurrent.ConcurrentHashMap$ForEachTransformedValueTask
+java.util.concurrent.ConcurrentHashMap$ForEachValueTask
 java.util.concurrent.ConcurrentHashMap$ForwardingNode
 java.util.concurrent.ConcurrentHashMap$KeyIterator
 java.util.concurrent.ConcurrentHashMap$KeySetView
 java.util.concurrent.ConcurrentHashMap$MapEntry
+java.util.concurrent.ConcurrentHashMap$MapReduceEntriesTask
+java.util.concurrent.ConcurrentHashMap$MapReduceEntriesToDoubleTask
+java.util.concurrent.ConcurrentHashMap$MapReduceEntriesToIntTask
+java.util.concurrent.ConcurrentHashMap$MapReduceEntriesToLongTask
+java.util.concurrent.ConcurrentHashMap$MapReduceKeysTask
+java.util.concurrent.ConcurrentHashMap$MapReduceKeysToDoubleTask
+java.util.concurrent.ConcurrentHashMap$MapReduceKeysToIntTask
+java.util.concurrent.ConcurrentHashMap$MapReduceKeysToLongTask
+java.util.concurrent.ConcurrentHashMap$MapReduceMappingsTask
+java.util.concurrent.ConcurrentHashMap$MapReduceMappingsToDoubleTask
+java.util.concurrent.ConcurrentHashMap$MapReduceMappingsToIntTask
+java.util.concurrent.ConcurrentHashMap$MapReduceMappingsToLongTask
+java.util.concurrent.ConcurrentHashMap$MapReduceValuesTask
+java.util.concurrent.ConcurrentHashMap$MapReduceValuesToDoubleTask
+java.util.concurrent.ConcurrentHashMap$MapReduceValuesToIntTask
+java.util.concurrent.ConcurrentHashMap$MapReduceValuesToLongTask
 java.util.concurrent.ConcurrentHashMap$Node
+java.util.concurrent.ConcurrentHashMap$ReduceEntriesTask
+java.util.concurrent.ConcurrentHashMap$ReduceKeysTask
+java.util.concurrent.ConcurrentHashMap$ReduceValuesTask
+java.util.concurrent.ConcurrentHashMap$ReservationNode
+java.util.concurrent.ConcurrentHashMap$SearchEntriesTask
+java.util.concurrent.ConcurrentHashMap$SearchKeysTask
+java.util.concurrent.ConcurrentHashMap$SearchMappingsTask
+java.util.concurrent.ConcurrentHashMap$SearchValuesTask
 java.util.concurrent.ConcurrentHashMap$Segment
 java.util.concurrent.ConcurrentHashMap$Traverser
 java.util.concurrent.ConcurrentHashMap$TreeBin
@@ -7306,15 +7632,15 @@
 java.util.concurrent.ConcurrentSkipListMap$KeyIterator
 java.util.concurrent.ConcurrentSkipListMap$KeySet
 java.util.concurrent.ConcurrentSkipListMap$Node
-java.util.concurrent.ConcurrentSkipListMap$SubMap
 java.util.concurrent.ConcurrentSkipListMap$ValueIterator
 java.util.concurrent.ConcurrentSkipListMap$Values
 java.util.concurrent.ConcurrentSkipListSet
 java.util.concurrent.CopyOnWriteArrayList
-java.util.concurrent.CopyOnWriteArrayList$CowIterator
+java.util.concurrent.CopyOnWriteArrayList$COWIterator
 java.util.concurrent.CopyOnWriteArraySet
 java.util.concurrent.CountDownLatch
 java.util.concurrent.CountDownLatch$Sync
+java.util.concurrent.CountedCompleter
 java.util.concurrent.DelayQueue
 java.util.concurrent.Delayed
 java.util.concurrent.ExecutionException
@@ -7346,6 +7672,8 @@
 java.util.concurrent.LinkedBlockingQueue
 java.util.concurrent.LinkedBlockingQueue$Itr
 java.util.concurrent.LinkedBlockingQueue$Node
+java.util.concurrent.Phaser
+java.util.concurrent.Phaser$QNode
 java.util.concurrent.PriorityBlockingQueue
 java.util.concurrent.RejectedExecutionException
 java.util.concurrent.RejectedExecutionHandler
@@ -7368,6 +7696,7 @@
 java.util.concurrent.ThreadLocalRandom$1
 java.util.concurrent.ThreadPoolExecutor
 java.util.concurrent.ThreadPoolExecutor$AbortPolicy
+java.util.concurrent.ThreadPoolExecutor$DiscardOldestPolicy
 java.util.concurrent.ThreadPoolExecutor$DiscardPolicy
 java.util.concurrent.ThreadPoolExecutor$Worker
 java.util.concurrent.TimeUnit
@@ -7412,21 +7741,35 @@
 java.util.concurrent.locks.ReentrantReadWriteLock$Sync$HoldCounter
 java.util.concurrent.locks.ReentrantReadWriteLock$Sync$ThreadLocalHoldCounter
 java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock
+java.util.function.-$Lambda$276$1MZdIZ-DL_fjy9l0o8IMJk57T2g
 java.util.function.BiConsumer
 java.util.function.BiFunction
+java.util.function.BinaryOperator
 java.util.function.Consumer
+java.util.function.DoubleBinaryOperator
 java.util.function.Function
+java.util.function.IntBinaryOperator
+java.util.function.IntConsumer
+java.util.function.IntFunction
+java.util.function.IntToDoubleFunction
+java.util.function.IntToLongFunction
+java.util.function.IntUnaryOperator
+java.util.function.LongBinaryOperator
+java.util.function.LongUnaryOperator
 java.util.function.Predicate
 java.util.function.Supplier
+java.util.function.ToDoubleBiFunction
 java.util.function.ToDoubleFunction
+java.util.function.ToIntBiFunction
 java.util.function.ToIntFunction
+java.util.function.ToLongBiFunction
 java.util.function.ToLongFunction
 java.util.function.UnaryOperator
 java.util.jar.Attributes
 java.util.jar.Attributes$Name
 java.util.jar.JarEntry
 java.util.jar.JarFile
-java.util.jar.JarFile$1
+java.util.jar.JarFile$JarEntryIterator
 java.util.jar.JarFile$JarFileEntry
 java.util.jar.JarVerifier
 java.util.jar.JarVerifier$1
@@ -7434,9 +7777,6 @@
 java.util.jar.Manifest
 java.util.jar.Manifest$FastInputStream
 java.util.logging.ErrorManager
-java.util.logging.FileHandler
-java.util.logging.FileHandler$InitializationErrorManager
-java.util.logging.FileHandler$MeteredStream
 java.util.logging.Filter
 java.util.logging.Formatter
 java.util.logging.Handler
@@ -7445,7 +7785,8 @@
 java.util.logging.LogManager
 java.util.logging.LogManager$1
 java.util.logging.LogManager$2
-java.util.logging.LogManager$4
+java.util.logging.LogManager$3
+java.util.logging.LogManager$5
 java.util.logging.LogManager$Cleaner
 java.util.logging.LogManager$LogNode
 java.util.logging.LogManager$LoggerContext
@@ -7456,31 +7797,71 @@
 java.util.logging.LogRecord
 java.util.logging.Logger
 java.util.logging.Logger$1
+java.util.logging.Logger$LoggerBundle
 java.util.logging.LoggingPermission
 java.util.logging.LoggingProxyImpl
-java.util.logging.SimpleFormatter
-java.util.logging.StreamHandler
-java.util.logging.XMLFormatter
 java.util.prefs.AbstractPreferences
 java.util.prefs.FileSystemPreferences
 java.util.prefs.Preferences
 java.util.regex.MatchResult
 java.util.regex.Matcher
+java.util.regex.Matcher$OffsetBasedMatchResult
 java.util.regex.Pattern
 java.util.regex.PatternSyntaxException
-java.util.spi.LocaleServiceProvider
+java.util.stream.-$Lambda$155$qTstLJg88fs2C3g6LH-R51vCVP0
+java.util.stream.-$Lambda$41$qTstLJg88fs2C3g6LH-R51vCVP0
+java.util.stream.-$Lambda$67$qTstLJg88fs2C3g6LH-R51vCVP0
+java.util.stream.-$Lambda$89$qTstLJg88fs2C3g6LH-R51vCVP0
+java.util.stream.AbstractPipeline
 java.util.stream.BaseStream
+java.util.stream.Collector
+java.util.stream.Collector$Characteristics
+java.util.stream.Collectors
+java.util.stream.Collectors$CollectorImpl
+java.util.stream.DoubleStream
+java.util.stream.ForEachOps
+java.util.stream.ForEachOps$ForEachOp
+java.util.stream.ForEachOps$ForEachOp$OfRef
 java.util.stream.IntStream
+java.util.stream.LongStream
+java.util.stream.PipelineHelper
+java.util.stream.ReduceOps
+java.util.stream.ReduceOps$3
+java.util.stream.ReduceOps$3ReducingSink
+java.util.stream.ReduceOps$AccumulatingSink
+java.util.stream.ReduceOps$Box
+java.util.stream.ReduceOps$ReduceOp
+java.util.stream.ReferencePipeline
+java.util.stream.ReferencePipeline$2
+java.util.stream.ReferencePipeline$2$1
+java.util.stream.ReferencePipeline$Head
+java.util.stream.ReferencePipeline$StatefulOp
+java.util.stream.ReferencePipeline$StatelessOp
+java.util.stream.Sink
+java.util.stream.Sink$ChainedReference
+java.util.stream.SliceOps
+java.util.stream.SliceOps$1
+java.util.stream.SliceOps$1$1
 java.util.stream.Stream
+java.util.stream.StreamOpFlag
+java.util.stream.StreamOpFlag$MaskBuilder
+java.util.stream.StreamOpFlag$Type
+java.util.stream.StreamShape
+java.util.stream.StreamSpliterators$InfiniteSupplyingSpliterator
+java.util.stream.StreamSpliterators$InfiniteSupplyingSpliterator$OfRef
 java.util.stream.StreamSupport
+java.util.stream.TerminalOp
+java.util.stream.TerminalSink
 java.util.zip.Adler32
 java.util.zip.CRC32
 java.util.zip.CheckedInputStream
+java.util.zip.CheckedOutputStream
 java.util.zip.Checksum
 java.util.zip.DataFormatException
 java.util.zip.Deflater
 java.util.zip.DeflaterOutputStream
 java.util.zip.GZIPInputStream
+java.util.zip.GZIPInputStream$1
 java.util.zip.GZIPOutputStream
 java.util.zip.Inflater
 java.util.zip.InflaterInputStream
@@ -7488,13 +7869,15 @@
 java.util.zip.ZipCoder
 java.util.zip.ZipConstants
 java.util.zip.ZipEntry
+java.util.zip.ZipError
 java.util.zip.ZipException
 java.util.zip.ZipFile
-java.util.zip.ZipFile$1
+java.util.zip.ZipFile$ZipEntryIterator
 java.util.zip.ZipFile$ZipFileInflaterInputStream
 java.util.zip.ZipFile$ZipFileInputStream
 java.util.zip.ZipInputStream
 java.util.zip.ZipOutputStream
+java.util.zip.ZipUtils
 javax.crypto.BadPaddingException
 javax.crypto.Cipher
 javax.crypto.Cipher$CipherSpiAndProvider
@@ -7506,7 +7889,6 @@
 javax.crypto.CipherInputStream
 javax.crypto.CipherOutputStream
 javax.crypto.CipherSpi
-javax.crypto.EncryptedPrivateKeyInfo
 javax.crypto.IllegalBlockSizeException
 javax.crypto.JarVerifier
 javax.crypto.JceSecurity
@@ -7518,11 +7900,11 @@
 javax.crypto.NoSuchPaddingException
 javax.crypto.NullCipher
 javax.crypto.SecretKey
-javax.crypto.SecretKeyFactory
 javax.crypto.ShortBufferException
+javax.crypto.interfaces.PBEKey
+javax.crypto.spec.GCMParameterSpec
 javax.crypto.spec.IvParameterSpec
 javax.crypto.spec.OAEPParameterSpec
-javax.crypto.spec.PBEKeySpec
 javax.crypto.spec.PBEParameterSpec
 javax.crypto.spec.PSource
 javax.crypto.spec.PSource$PSpecified
@@ -7546,6 +7928,7 @@
 javax.net.ssl.HandshakeCompletedListener
 javax.net.ssl.HostnameVerifier
 javax.net.ssl.HttpsURLConnection
+javax.net.ssl.HttpsURLConnection$NoPreloadHolder
 javax.net.ssl.KeyManager
 javax.net.ssl.KeyManagerFactory
 javax.net.ssl.KeyManagerFactory$1
@@ -7574,9 +7957,11 @@
 javax.net.ssl.X509ExtendedTrustManager
 javax.net.ssl.X509KeyManager
 javax.net.ssl.X509TrustManager
+javax.security.auth.Destroyable
 javax.security.auth.callback.UnsupportedCallbackException
 javax.security.auth.x500.X500Principal
 javax.security.cert.Certificate
+javax.security.cert.CertificateEncodingException
 javax.security.cert.CertificateException
 javax.security.cert.X509Certificate
 javax.sip.SipException
@@ -7607,8 +7992,6 @@
 libcore.icu.TimeZoneNames$ZoneStringsCache
 libcore.internal.StringPool
 libcore.io.AsynchronousCloseMonitor
-libcore.io.Base64
-libcore.io.Base64$InvalidBase64ByteException
 libcore.io.BlockGuardOs
 libcore.io.BufferIterator
 libcore.io.ClassPathURLStreamHandler
@@ -7622,6 +8005,8 @@
 libcore.io.EventLogger$Reporter
 libcore.io.ForwardingOs
 libcore.io.IoBridge
+libcore.io.IoTracker
+libcore.io.IoTracker$Mode
 libcore.io.IoUtils
 libcore.io.IoUtils$FileReader
 libcore.io.Libcore
@@ -7638,6 +8023,8 @@
 libcore.net.UriCodec
 libcore.net.event.NetworkEventDispatcher
 libcore.net.event.NetworkEventListener
+libcore.net.http.HttpDate
+libcore.net.http.HttpDate$1
 libcore.reflect.AnnotatedElements
 libcore.reflect.AnnotationFactory
 libcore.reflect.AnnotationMember
@@ -7683,21 +8070,16 @@
 org.apache.harmony.xml.ExpatParser$ExpatLocator
 org.apache.harmony.xml.ExpatReader
 org.apache.harmony.xml.dom.AttrImpl
-org.apache.harmony.xml.dom.CDATASectionImpl
 org.apache.harmony.xml.dom.CharacterDataImpl
-org.apache.harmony.xml.dom.CommentImpl
 org.apache.harmony.xml.dom.DOMImplementationImpl
 org.apache.harmony.xml.dom.DocumentImpl
-org.apache.harmony.xml.dom.DocumentTypeImpl
 org.apache.harmony.xml.dom.ElementImpl
 org.apache.harmony.xml.dom.ElementImpl$ElementAttrNamedNodeMapImpl
-org.apache.harmony.xml.dom.EntityReferenceImpl
 org.apache.harmony.xml.dom.InnerNodeImpl
 org.apache.harmony.xml.dom.LeafNodeImpl
 org.apache.harmony.xml.dom.NodeImpl
 org.apache.harmony.xml.dom.NodeImpl$1
 org.apache.harmony.xml.dom.NodeListImpl
-org.apache.harmony.xml.dom.ProcessingInstructionImpl
 org.apache.harmony.xml.dom.TextImpl
 org.apache.harmony.xml.parsers.DocumentBuilderFactoryImpl
 org.apache.harmony.xml.parsers.DocumentBuilderImpl
@@ -7736,7 +8118,6 @@
 org.apache.http.ReasonPhraseCatalog
 org.apache.http.RequestLine
 org.apache.http.StatusLine
-org.apache.http.TokenIterator
 org.apache.http.auth.AuthSchemeFactory
 org.apache.http.auth.AuthSchemeRegistry
 org.apache.http.auth.AuthState
@@ -7774,7 +8155,6 @@
 org.apache.http.client.utils.URLEncodedUtils
 org.apache.http.conn.BasicManagedEntity
 org.apache.http.conn.ClientConnectionManager
-org.apache.http.conn.ClientConnectionManagerFactory
 org.apache.http.conn.ClientConnectionOperator
 org.apache.http.conn.ClientConnectionRequest
 org.apache.http.conn.ConnectTimeoutException
@@ -7829,7 +8209,6 @@
 org.apache.http.entity.BasicHttpEntity
 org.apache.http.entity.ByteArrayEntity
 org.apache.http.entity.ContentLengthStrategy
-org.apache.http.entity.FileEntity
 org.apache.http.entity.HttpEntityWrapper
 org.apache.http.entity.InputStreamEntity
 org.apache.http.entity.StringEntity
@@ -7849,7 +8228,6 @@
 org.apache.http.impl.client.AbstractHttpClient
 org.apache.http.impl.client.BasicCookieStore
 org.apache.http.impl.client.BasicCredentialsProvider
-org.apache.http.impl.client.BasicResponseHandler
 org.apache.http.impl.client.ClientParamsStack
 org.apache.http.impl.client.DefaultConnectionKeepAliveStrategy
 org.apache.http.impl.client.DefaultHttpClient
@@ -7860,6 +8238,7 @@
 org.apache.http.impl.client.DefaultTargetAuthenticationHandler
 org.apache.http.impl.client.DefaultUserTokenHandler
 org.apache.http.impl.client.EntityEnclosingRequestWrapper
+org.apache.http.impl.client.RedirectLocations
 org.apache.http.impl.client.RequestWrapper
 org.apache.http.impl.client.RoutedRequest
 org.apache.http.impl.client.TunnelRefusedException
@@ -7872,10 +8251,6 @@
 org.apache.http.impl.conn.IdleConnectionHandler
 org.apache.http.impl.conn.IdleConnectionHandler$TimeValues
 org.apache.http.impl.conn.ProxySelectorRoutePlanner
-org.apache.http.impl.conn.SingleClientConnManager
-org.apache.http.impl.conn.SingleClientConnManager$1
-org.apache.http.impl.conn.SingleClientConnManager$ConnAdapter
-org.apache.http.impl.conn.SingleClientConnManager$PoolEntry
 org.apache.http.impl.conn.tsccm.AbstractConnPool
 org.apache.http.impl.conn.tsccm.BasicPoolEntry
 org.apache.http.impl.conn.tsccm.BasicPoolEntryRef
@@ -7951,7 +8326,6 @@
 org.apache.http.message.BasicHeaderElement
 org.apache.http.message.BasicHeaderElementIterator
 org.apache.http.message.BasicHeaderValueParser
-org.apache.http.message.BasicHttpEntityEnclosingRequest
 org.apache.http.message.BasicHttpRequest
 org.apache.http.message.BasicHttpResponse
 org.apache.http.message.BasicLineFormatter
@@ -7960,7 +8334,6 @@
 org.apache.http.message.BasicNameValuePair
 org.apache.http.message.BasicRequestLine
 org.apache.http.message.BasicStatusLine
-org.apache.http.message.BasicTokenIterator
 org.apache.http.message.BufferedHeader
 org.apache.http.message.HeaderGroup
 org.apache.http.message.HeaderValueParser
@@ -8002,7 +8375,6 @@
 org.apache.http.util.EncodingUtils
 org.apache.http.util.EntityUtils
 org.apache.http.util.LangUtils
-org.apache.http.util.VersionInfo
 org.ccil.cowan.tagsoup.AttributesImpl
 org.ccil.cowan.tagsoup.AutoDetector
 org.ccil.cowan.tagsoup.Element
@@ -8027,16 +8399,12 @@
 org.kxml2.io.KXmlParser$ValueContext
 org.kxml2.io.KXmlSerializer
 org.w3c.dom.Attr
-org.w3c.dom.CDATASection
 org.w3c.dom.CharacterData
-org.w3c.dom.Comment
-org.w3c.dom.DOMException
 org.w3c.dom.DOMImplementation
 org.w3c.dom.Document
 org.w3c.dom.DocumentFragment
 org.w3c.dom.DocumentType
 org.w3c.dom.Element
-org.w3c.dom.EntityReference
 org.w3c.dom.NamedNodeMap
 org.w3c.dom.Node
 org.w3c.dom.NodeList
@@ -8055,9 +8423,6 @@
 org.xml.sax.SAXNotSupportedException
 org.xml.sax.SAXParseException
 org.xml.sax.XMLReader
-org.xml.sax.ext.DeclHandler
-org.xml.sax.ext.DefaultHandler2
-org.xml.sax.ext.EntityResolver2
 org.xml.sax.ext.LexicalHandler
 org.xml.sax.helpers.AttributesImpl
 org.xml.sax.helpers.DefaultHandler
@@ -8065,22 +8430,28 @@
 org.xmlpull.v1.XmlPullParserException
 org.xmlpull.v1.XmlPullParserFactory
 org.xmlpull.v1.XmlSerializer
+sun.invoke.util.BytecodeDescriptor
+sun.invoke.util.Wrapper
 sun.misc.ASCIICaseInsensitiveComparator
-sun.misc.BASE64Decoder
-sun.misc.CEStreamExhausted
-sun.misc.CharacterDecoder
 sun.misc.Cleaner
 sun.misc.CompoundEnumeration
-sun.misc.FDBigInt
+sun.misc.FDBigInteger
+sun.misc.FloatingDecimal
+sun.misc.FloatingDecimal$1
+sun.misc.FloatingDecimal$ASCIIToBinaryBuffer
+sun.misc.FloatingDecimal$ASCIIToBinaryConverter
+sun.misc.FloatingDecimal$BinaryToASCIIBuffer
+sun.misc.FloatingDecimal$BinaryToASCIIConverter
+sun.misc.FloatingDecimal$ExceptionalBinaryToASCIIBuffer
+sun.misc.FloatingDecimal$PreparedASCIIToBinaryBuffer
 sun.misc.FormattedFloatingDecimal
 sun.misc.FormattedFloatingDecimal$1
 sun.misc.FormattedFloatingDecimal$Form
-sun.misc.FpUtils
-sun.misc.Hashing
 sun.misc.IOUtils
-sun.misc.IoTrace
+sun.misc.JavaIOFileDescriptorAccess
 sun.misc.LRUCache
 sun.misc.REException
+sun.misc.SharedSecrets
 sun.misc.Unsafe
 sun.misc.VM
 sun.misc.Version
@@ -8097,17 +8468,13 @@
 sun.net.www.ParseUtil
 sun.net.www.protocol.file.Handler
 sun.net.www.protocol.jar.Handler
-sun.nio.ch.AbstractPollArrayWrapper
-sun.nio.ch.AbstractPollSelectorImpl
-sun.nio.ch.AllocatedNativeObject
 sun.nio.ch.ChannelInputStream
 sun.nio.ch.DatagramChannelImpl
 sun.nio.ch.DatagramDispatcher
-sun.nio.ch.DefaultSelectorProvider
 sun.nio.ch.DirectBuffer
+sun.nio.ch.EPollArrayWrapper
 sun.nio.ch.FileChannelImpl
 sun.nio.ch.FileChannelImpl$Unmapper
-sun.nio.ch.FileDescriptorHolderSocketImpl
 sun.nio.ch.FileDispatcher
 sun.nio.ch.FileDispatcherImpl
 sun.nio.ch.FileKey
@@ -8115,33 +8482,18 @@
 sun.nio.ch.FileLockTable
 sun.nio.ch.IOStatus
 sun.nio.ch.IOUtil
-sun.nio.ch.InheritedChannel
 sun.nio.ch.Interruptible
 sun.nio.ch.NativeDispatcher
-sun.nio.ch.NativeObject
 sun.nio.ch.NativeThread
 sun.nio.ch.NativeThreadSet
 sun.nio.ch.Net
-sun.nio.ch.Net$1
-sun.nio.ch.PollArrayWrapper
-sun.nio.ch.PollSelectorImpl
-sun.nio.ch.PollSelectorProvider
 sun.nio.ch.SelChImpl
-sun.nio.ch.SelectionKeyImpl
-sun.nio.ch.SelectorImpl
-sun.nio.ch.SelectorProviderImpl
 sun.nio.ch.ServerSocketChannelImpl
 sun.nio.ch.SharedFileLockTable
 sun.nio.ch.SharedFileLockTable$FileLockReference
-sun.nio.ch.SocketAdaptor
-sun.nio.ch.SocketAdaptor$1
-sun.nio.ch.SocketAdaptor$2
-sun.nio.ch.SocketAdaptor$SocketInputStream
 sun.nio.ch.SocketChannelImpl
-sun.nio.ch.SocketDispatcher
 sun.nio.ch.Util
 sun.nio.ch.Util$1
-sun.nio.ch.Util$2
 sun.nio.ch.Util$BufferCache
 sun.nio.cs.ArrayDecoder
 sun.nio.cs.ArrayEncoder
@@ -8151,15 +8503,30 @@
 sun.nio.cs.ThreadLocalCoders$1
 sun.nio.cs.ThreadLocalCoders$2
 sun.nio.cs.ThreadLocalCoders$Cache
-sun.reflect.annotation.AnnotationType
+sun.nio.fs.AbstractFileSystemProvider
+sun.nio.fs.AbstractPath
+sun.nio.fs.DefaultFileSystemProvider
+sun.nio.fs.LinuxFileSystem
+sun.nio.fs.LinuxFileSystemProvider
+sun.nio.fs.NativeBuffer
+sun.nio.fs.NativeBuffer$Deallocator
+sun.nio.fs.NativeBuffers
+sun.nio.fs.UnixChannelFactory
+sun.nio.fs.UnixChannelFactory$Flags
+sun.nio.fs.UnixConstants
+sun.nio.fs.UnixException
+sun.nio.fs.UnixFileAttributes
+sun.nio.fs.UnixFileModeAttribute
+sun.nio.fs.UnixFileStoreAttributes
+sun.nio.fs.UnixFileSystem
+sun.nio.fs.UnixFileSystemProvider
+sun.nio.fs.UnixMountEntry
+sun.nio.fs.UnixNativeDispatcher
+sun.nio.fs.UnixPath
+sun.nio.fs.Util
 sun.reflect.misc.ReflectUtil
 sun.security.action.GetBooleanAction
 sun.security.action.GetPropertyAction
-sun.security.ec.ECKeyFactory
-sun.security.ec.ECKeyFactory$1
-sun.security.ec.ECKeyFactory$2
-sun.security.ec.ECParameters
-sun.security.ec.NamedCurve
 sun.security.jca.GetInstance
 sun.security.jca.GetInstance$Instance
 sun.security.jca.JCAUtil
@@ -8175,8 +8542,9 @@
 sun.security.jca.ServiceId
 sun.security.pkcs.ContentInfo
 sun.security.pkcs.PKCS7
+sun.security.pkcs.PKCS7$VerbatimX509Certificate
+sun.security.pkcs.PKCS7$WrappedX509Certificate
 sun.security.pkcs.PKCS9Attribute
-sun.security.pkcs.ParsingException
 sun.security.pkcs.SignerInfo
 sun.security.provider.CertPathProvider
 sun.security.provider.X509Factory
@@ -8192,7 +8560,9 @@
 sun.security.provider.certpath.PKIXMasterCertPathValidator
 sun.security.provider.certpath.PolicyChecker
 sun.security.provider.certpath.PolicyNodeImpl
-sun.security.provider.certpath.UntrustedChecker
+sun.security.util.-$Lambda$179$Kli5xKA4dAwmFO1sy_hpNWmbfH4
+sun.security.util.AbstractAlgorithmConstraints
+sun.security.util.AlgorithmDecomposer
 sun.security.util.BitArray
 sun.security.util.ByteArrayLexOrder
 sun.security.util.ByteArrayTagOrder
@@ -8206,7 +8576,6 @@
 sun.security.util.DerOutputStream
 sun.security.util.DerValue
 sun.security.util.DisabledAlgorithmConstraints
-sun.security.util.DisabledAlgorithmConstraints$1
 sun.security.util.DisabledAlgorithmConstraints$KeySizeConstraint
 sun.security.util.DisabledAlgorithmConstraints$KeySizeConstraint$Operator
 sun.security.util.DisabledAlgorithmConstraints$KeySizeConstraints
@@ -8221,9 +8590,7 @@
 sun.security.util.MemoryCache$CacheEntry
 sun.security.util.MemoryCache$SoftCacheEntry
 sun.security.util.ObjectIdentifier
-sun.security.util.SecurityConstants
 sun.security.util.SignatureFileVerifier
-sun.security.util.UntrustedCertificates
 sun.security.x509.AVA
 sun.security.x509.AVAKeyword
 sun.security.x509.AccessDescription
@@ -8280,25 +8647,19 @@
 sun.security.x509.X509CertImpl
 sun.security.x509.X509CertInfo
 sun.security.x509.X509Key
-sun.util.LocaleServiceProviderPool
-sun.util.LocaleServiceProviderPool$1
 sun.util.calendar.AbstractCalendar
 sun.util.calendar.BaseCalendar
 sun.util.calendar.BaseCalendar$Date
 sun.util.calendar.CalendarDate
 sun.util.calendar.CalendarSystem
 sun.util.calendar.CalendarUtils
-sun.util.calendar.Era
 sun.util.calendar.Gregorian
 sun.util.calendar.Gregorian$Date
-sun.util.calendar.ImmutableGregorianDate
 sun.util.calendar.JulianCalendar
-sun.util.calendar.JulianCalendar$Date
 sun.util.calendar.LocalGregorianCalendar
 sun.util.locale.BaseLocale
 sun.util.locale.BaseLocale$Cache
 sun.util.locale.BaseLocale$Key
-sun.util.locale.Extension
 sun.util.locale.InternalLocaleBuilder
 sun.util.locale.InternalLocaleBuilder$CaseInsensitiveChar
 sun.util.locale.LanguageTag
@@ -8309,11 +8670,9 @@
 sun.util.locale.LocaleUtils
 sun.util.locale.ParseStatus
 sun.util.locale.StringTokenIterator
-sun.util.locale.UnicodeLocaleExtension
 sun.util.logging.LoggingProxy
 sun.util.logging.LoggingSupport
 sun.util.logging.LoggingSupport$1
-sun.util.logging.LoggingSupport$2
 sun.util.logging.PlatformLogger
 sun.util.logging.PlatformLogger$1
 sun.util.logging.PlatformLogger$JavaLoggerProxy
diff --git a/core/java/android/accessibilityservice/AccessibilityButtonController.java b/core/java/android/accessibilityservice/AccessibilityButtonController.java
new file mode 100644
index 0000000..c3a5dab
--- /dev/null
+++ b/core/java/android/accessibilityservice/AccessibilityButtonController.java
@@ -0,0 +1,223 @@
+/*
+ * 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.accessibilityservice;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.os.Handler;
+import android.os.RemoteException;
+import android.util.ArrayMap;
+import android.util.Slog;
+
+/**
+ * Controller for the accessibility button within the system's navigation area
+ * <p>
+ * This class may be used to query the accessibility button's state and register
+ * callbacks for interactions with and state changes to the accessibility button when
+ * {@link AccessibilityServiceInfo#FLAG_REQUEST_ACCESSIBILITY_BUTTON} is set.
+ * </p>
+ * <p>
+ * <strong>Note:</strong> This class and
+ * {@link AccessibilityServiceInfo#FLAG_REQUEST_ACCESSIBILITY_BUTTON} should not be used as
+ * the sole means for offering functionality to users via an {@link AccessibilityService}.
+ * Some device implementations may choose not to provide a software-rendered system
+ * navigation area, making this affordance permanently unavailable.
+ * </p>
+ * <p>
+ * <strong>Note:</strong> On device implementations where the accessibility button is
+ * supported, it may not be available at all times, such as when a foreground application uses
+ * {@link android.view.View#SYSTEM_UI_FLAG_HIDE_NAVIGATION}. A user may also choose to assign
+ * this button to another accessibility service or feature. In each of these cases, a
+ * registered {@link AccessibilityButtonCallback}'s
+ * {@link AccessibilityButtonCallback#onAvailabilityChanged(AccessibilityButtonController, boolean)}
+ * method will be invoked to provide notifications of changes in the accessibility button's
+ * availability to the registering service.
+ * </p>
+ */
+public final class AccessibilityButtonController {
+    private static final String LOG_TAG = "A11yButtonController";
+
+    private final IAccessibilityServiceConnection mServiceConnection;
+    private final Object mLock;
+    private ArrayMap<AccessibilityButtonCallback, Handler> mCallbacks;
+
+    AccessibilityButtonController(@NonNull IAccessibilityServiceConnection serviceConnection) {
+        mServiceConnection = serviceConnection;
+        mLock = new Object();
+    }
+
+    /**
+     * Retrieves whether the accessibility button in the system's navigation area is
+     * available to the calling service.
+     * <p>
+     * <strong>Note:</strong> If the service is not yet connected (e.g.
+     * {@link AccessibilityService#onServiceConnected()} has not yet been called) or the
+     * service has been disconnected, this method will have no effect and return {@code false}.
+     * </p>
+     *
+     * @return {@code true} if the accessibility button in the system's navigation area is
+     * available to the calling service, {@code false} otherwise
+     */
+    public boolean isAccessibilityButtonAvailable() {
+        try {
+            return mServiceConnection.isAccessibilityButtonAvailable();
+        } catch (RemoteException re) {
+            Slog.w(LOG_TAG, "Failed to get accessibility button availability.", re);
+            re.rethrowFromSystemServer();
+            return false;
+        }
+    }
+
+    /**
+     * Registers the provided {@link AccessibilityButtonCallback} for interaction and state
+     * changes callbacks related to the accessibility button.
+     *
+     * @param callback the callback to add, must be non-null
+     */
+    public void registerAccessibilityButtonCallback(@NonNull AccessibilityButtonCallback callback) {
+        registerAccessibilityButtonCallback(callback, null);
+    }
+
+    /**
+     * Registers the provided {@link AccessibilityButtonCallback} for interaction and state
+     * change callbacks related to the accessibility button. The callback will occur on the
+     * specified {@link Handler}'s thread, or on the services's main thread if the handler is
+     * {@code null}.
+     *
+     * @param callback the callback to add, must be non-null
+     * @param handler the handler on which to callback should execute, or {@code null} to
+     *                execute on the service's main thread
+     */
+    public void registerAccessibilityButtonCallback(@NonNull AccessibilityButtonCallback callback,
+            @Nullable Handler handler) {
+        synchronized (mLock) {
+            if (mCallbacks == null) {
+                mCallbacks = new ArrayMap<>();
+            }
+
+            mCallbacks.put(callback, handler);
+        }
+    }
+
+    /**
+     * Unregisters the provided {@link AccessibilityButtonCallback} for interaction and state
+     * change callbacks related to the accessibility button.
+     *
+     * @param callback the callback to remove, must be non-null
+     */
+    public void unregisterAccessibilityButtonCallback(
+            @NonNull AccessibilityButtonCallback callback) {
+        synchronized (mLock) {
+            if (mCallbacks == null) {
+                return;
+            }
+
+            final int keyIndex = mCallbacks.indexOfKey(callback);
+            final boolean hasKey = keyIndex >= 0;
+            if (hasKey) {
+                mCallbacks.removeAt(keyIndex);
+            }
+        }
+    }
+
+    /**
+     * Dispatches the accessibility button click to any registered callbacks. This should
+     * be called on the service's main thread.
+     */
+    void dispatchAccessibilityButtonClicked() {
+        final ArrayMap<AccessibilityButtonCallback, Handler> entries;
+        synchronized (mLock) {
+            if (mCallbacks == null || mCallbacks.isEmpty()) {
+                Slog.w(LOG_TAG, "Received accessibility button click with no callbacks!");
+                return;
+            }
+
+            // Callbacks may remove themselves. Perform a shallow copy to avoid concurrent
+            // modification.
+            entries = new ArrayMap<>(mCallbacks);
+        }
+
+        for (int i = 0, count = entries.size(); i < count; i++) {
+            final AccessibilityButtonCallback callback = entries.keyAt(i);
+            final Handler handler = entries.valueAt(i);
+            if (handler != null) {
+                handler.post(() -> callback.onClicked(this));
+            } else {
+                // We're already on the main thread, just run the callback.
+                callback.onClicked(this);
+            }
+        }
+    }
+
+    /**
+     * Dispatches the accessibility button availability changes to any registered callbacks.
+     * This should be called on the service's main thread.
+     */
+    void dispatchAccessibilityButtonAvailabilityChanged(boolean available) {
+        final ArrayMap<AccessibilityButtonCallback, Handler> entries;
+        synchronized (mLock) {
+            if (mCallbacks == null || mCallbacks.isEmpty()) {
+                Slog.w(LOG_TAG,
+                        "Received accessibility button availability change with no callbacks!");
+                return;
+            }
+
+            // Callbacks may remove themselves. Perform a shallow copy to avoid concurrent
+            // modification.
+            entries = new ArrayMap<>(mCallbacks);
+        }
+
+        for (int i = 0, count = entries.size(); i < count; i++) {
+            final AccessibilityButtonCallback callback = entries.keyAt(i);
+            final Handler handler = entries.valueAt(i);
+            if (handler != null) {
+                handler.post(() -> callback.onAvailabilityChanged(this, available));
+            } else {
+                // We're already on the main thread, just run the callback.
+                callback.onAvailabilityChanged(this, available);
+            }
+        }
+    }
+
+    /**
+     * Callback for interaction with and changes to state of the accessibility button
+     * within the system's navigation area.
+     */
+    public static abstract class AccessibilityButtonCallback {
+
+        /**
+         * Called when the accessibility button in the system's navigation area is clicked.
+         *
+         * @param controller the controller used to register for this callback
+         */
+        public void onClicked(AccessibilityButtonController controller) {}
+
+        /**
+         * Called when the availability of the accessibility button in the system's
+         * navigation area has changed. The accessibility button may become unavailable
+         * because the device shopped showing the button, the button was assigned to another
+         * service, or for other reasons.
+         *
+         * @param controller the controller used to register for this callback
+         * @param available {@code true} if the accessibility button is available to this
+         *                  service, {@code false} otherwise
+         */
+        public void onAvailabilityChanged(AccessibilityButtonController controller,
+                boolean available) {
+        }
+    }
+}
diff --git a/core/java/android/accessibilityservice/AccessibilityService.java b/core/java/android/accessibilityservice/AccessibilityService.java
index a036b6a..9e486d5 100644
--- a/core/java/android/accessibilityservice/AccessibilityService.java
+++ b/core/java/android/accessibilityservice/AccessibilityService.java
@@ -378,6 +378,8 @@
         void onPerformGestureResult(int sequence, boolean completedSuccessfully);
         void onFingerprintCapturingGesturesChanged(boolean active);
         void onFingerprintGesture(int gesture);
+        void onAccessibilityButtonClicked();
+        void onAccessibilityButtonAvailabilityChanged(boolean available);
     }
 
     /**
@@ -400,6 +402,7 @@
 
     private MagnificationController mMagnificationController;
     private SoftKeyboardController mSoftKeyboardController;
+    private AccessibilityButtonController mAccessibilityButtonController;
 
     private int mGestureStatusCallbackSequence;
 
@@ -431,6 +434,9 @@
         if (mMagnificationController != null) {
             mMagnificationController.onServiceConnected();
         }
+        if (mSoftKeyboardController != null) {
+            mSoftKeyboardController.onServiceConnected();
+        }
 
         // The client gets to handle service connection last, after we've set
         // up any state upon which their code may rely.
@@ -809,12 +815,10 @@
         }
 
         /**
-         * Removes all instances of the specified change listener from the list
-         * of magnification change listeners.
+         * Removes the specified change listener from the list of magnification change listeners.
          *
          * @param listener the listener to remove, must be non-null
-         * @return {@code true} if at least one instance of the listener was
-         *         removed
+         * @return {@code true} if the listener was removed, {@code false} otherwise
          */
         public boolean removeListener(@NonNull OnMagnificationChangedListener listener) {
             if (mListeners == null) {
@@ -1203,11 +1207,11 @@
         }
 
         /**
-         * Removes all instances of the specified change listener from the list of magnification
-         * change listeners.
+         * Removes the specified change listener from the list of keyboard show mode change
+         * listeners.
          *
          * @param listener the listener to remove, must be non-null
-         * @return {@code true} if at least one instance of the listener was removed
+         * @return {@code true} if the listener was removed, {@code false} otherwise
          */
         public boolean removeOnShowModeChangedListener(@NonNull OnShowModeChangedListener listener) {
             if (mListeners == null) {
@@ -1252,7 +1256,7 @@
             final ArrayMap<OnShowModeChangedListener, Handler> entries;
             synchronized (mLock) {
                 if (mListeners == null || mListeners.isEmpty()) {
-                    Slog.d(LOG_TAG, "Received soft keyboard show mode changed callback"
+                    Slog.w(LOG_TAG, "Received soft keyboard show mode changed callback"
                             + " with no listeners registered!");
                     setSoftKeyboardCallbackEnabled(false);
                     return;
@@ -1308,9 +1312,9 @@
          * The lastto this method will be honored, regardless of any previous calls (including those
          * made by other AccessibilityServices).
          * <p>
-         * <strong>Note:</strong> If the service is not yet conected (e.g.
+         * <strong>Note:</strong> If the service is not yet connected (e.g.
          * {@link AccessibilityService#onServiceConnected()} has not yet been called) or the
-         * service has been disconnected, this method will hav no effect and return {@code false}.
+         * service has been disconnected, this method will have no effect and return {@code false}.
          *
          * @param showMode the new show mode for the soft keyboard
          * @return {@code true} on success
@@ -1349,6 +1353,39 @@
     }
 
     /**
+     * Returns the controller for the accessibility button within the system's navigation area.
+     * This instance may be used to query the accessibility button's state and register listeners
+     * for interactions with and state changes for the accessibility button when
+     * {@link AccessibilityServiceInfo#FLAG_REQUEST_ACCESSIBILITY_BUTTON} is set.
+     * <p>
+     * <strong>Note:</strong> Not all devices are capable of displaying the accessibility button
+     * within a navigation area, and as such, use of this class should be considered only as an
+     * optional feature or shortcut on supported device implementations.
+     * </p>
+     *
+     * @return the accessibility button controller for this {@link AccessibilityService}
+     */
+    @NonNull
+    public final AccessibilityButtonController getAccessibilityButtonController() {
+        synchronized (mLock) {
+            if (mAccessibilityButtonController == null) {
+                mAccessibilityButtonController = new AccessibilityButtonController(
+                        AccessibilityInteractionClient.getInstance().getConnection(mConnectionId));
+            }
+            return mAccessibilityButtonController;
+        }
+    }
+
+    private void onAccessibilityButtonClicked() {
+        getAccessibilityButtonController().dispatchAccessibilityButtonClicked();
+    }
+
+    private void onAccessibilityButtonAvailabilityChanged(boolean available) {
+        getAccessibilityButtonController().dispatchAccessibilityButtonAvailabilityChanged(
+                available);
+    }
+
+    /**
      * Performs a global action. Such an action can be performed
      * at any moment regardless of the current application or user
      * location in that application. For example going back, going
@@ -1543,6 +1580,16 @@
             public void onFingerprintGesture(int gesture) {
                 AccessibilityService.this.onFingerprintGesture(gesture);
             }
+
+            @Override
+            public void onAccessibilityButtonClicked() {
+                AccessibilityService.this.onAccessibilityButtonClicked();
+            }
+
+            @Override
+            public void onAccessibilityButtonAvailabilityChanged(boolean available) {
+                AccessibilityService.this.onAccessibilityButtonAvailabilityChanged(available);
+            }
         });
     }
 
@@ -1565,6 +1612,8 @@
         private static final int DO_GESTURE_COMPLETE = 9;
         private static final int DO_ON_FINGERPRINT_ACTIVE_CHANGED = 10;
         private static final int DO_ON_FINGERPRINT_GESTURE = 11;
+        private static final int DO_ACCESSIBILITY_BUTTON_CLICKED = 12;
+        private static final int DO_ACCESSIBILITY_BUTTON_AVAILABILITY_CHANGED = 13;
 
         private final HandlerCaller mCaller;
 
@@ -1645,6 +1694,17 @@
             mCaller.sendMessage(mCaller.obtainMessageI(DO_ON_FINGERPRINT_GESTURE, gesture));
         }
 
+        public void onAccessibilityButtonClicked() {
+            final Message message = mCaller.obtainMessage(DO_ACCESSIBILITY_BUTTON_CLICKED);
+            mCaller.sendMessage(message);
+        }
+
+        public void onAccessibilityButtonAvailabilityChanged(boolean available) {
+            final Message message = mCaller.obtainMessageI(
+                    DO_ACCESSIBILITY_BUTTON_AVAILABILITY_CHANGED, (available ? 1 : 0));
+            mCaller.sendMessage(message);
+        }
+
         @Override
         public void executeMessage(Message message) {
             switch (message.what) {
@@ -1750,6 +1810,15 @@
                     mCallback.onFingerprintGesture(message.arg1);
                 } return;
 
+                case (DO_ACCESSIBILITY_BUTTON_CLICKED): {
+                    mCallback.onAccessibilityButtonClicked();
+                } return;
+
+                case (DO_ACCESSIBILITY_BUTTON_AVAILABILITY_CHANGED): {
+                    final boolean available = (message.arg1 != 0);
+                    mCallback.onAccessibilityButtonAvailabilityChanged(available);
+                } return;
+
                 default :
                     Log.w(LOG_TAG, "Unknown message type " + message.what);
             }
diff --git a/core/java/android/accessibilityservice/AccessibilityServiceInfo.java b/core/java/android/accessibilityservice/AccessibilityServiceInfo.java
index 18e57cb..e135ffd 100644
--- a/core/java/android/accessibilityservice/AccessibilityServiceInfo.java
+++ b/core/java/android/accessibilityservice/AccessibilityServiceInfo.java
@@ -306,6 +306,12 @@
      */
     public static final int FLAG_ENABLE_ACCESSIBILITY_VOLUME = 0x00000080;
 
+     /**
+     * This flag indicates to the system that the accessibility service requests that an
+     * accessibility button be shown within the system's navigation area, if available.
+     */
+    public static final int FLAG_REQUEST_ACCESSIBILITY_BUTTON = 0x00000100;
+
     /**
      * This flag requests that all fingerprint gestures be sent to the accessibility service.
      * It is handled in {@link FingerprintGestureController}
@@ -396,6 +402,8 @@
      * @see #FLAG_REQUEST_FILTER_KEY_EVENTS
      * @see #FLAG_REPORT_VIEW_IDS
      * @see #FLAG_RETRIEVE_INTERACTIVE_WINDOWS
+     * @see #FLAG_ENABLE_ACCESSIBILITY_VOLUME
+     * @see #FLAG_REQUEST_ACCESSIBILITY_BUTTON
      */
     public int flags;
 
@@ -631,7 +639,7 @@
      * @see #CAPABILITY_CAN_RETRIEVE_WINDOW_CONTENT
      * @see #CAPABILITY_CAN_REQUEST_TOUCH_EXPLORATION
      * @see #CAPABILITY_CAN_REQUEST_ENHANCED_WEB_ACCESSIBILITY
-     * @see #CAPABILITY_FILTER_KEY_EVENTS
+     * @see #CAPABILITY_CAN_REQUEST_FILTER_KEY_EVENTS
      * @see #CAPABILITY_CAN_CONTROL_MAGNIFICATION
      * @see #CAPABILITY_CAN_PERFORM_GESTURES
      */
@@ -648,7 +656,7 @@
      * @see #CAPABILITY_CAN_RETRIEVE_WINDOW_CONTENT
      * @see #CAPABILITY_CAN_REQUEST_TOUCH_EXPLORATION
      * @see #CAPABILITY_CAN_REQUEST_ENHANCED_WEB_ACCESSIBILITY
-     * @see #CAPABILITY_FILTER_KEY_EVENTS
+     * @see #CAPABILITY_CAN_REQUEST_FILTER_KEY_EVENTS
      * @see #CAPABILITY_CAN_CONTROL_MAGNIFICATION
      * @see #CAPABILITY_CAN_PERFORM_GESTURES
      *
@@ -936,6 +944,8 @@
                 return "FLAG_RETRIEVE_INTERACTIVE_WINDOWS";
             case FLAG_ENABLE_ACCESSIBILITY_VOLUME:
                 return "FLAG_ENABLE_ACCESSIBILITY_VOLUME";
+            case FLAG_REQUEST_ACCESSIBILITY_BUTTON:
+                return "FLAG_REQUEST_ACCESSIBILITY_BUTTON";
             case FLAG_CAPTURE_FINGERPRINT_GESTURES:
                 return "FLAG_CAPTURE_FINGERPRINT_GESTURES";
             default:
@@ -960,7 +970,7 @@
             case CAPABILITY_CAN_REQUEST_ENHANCED_WEB_ACCESSIBILITY:
                 return "CAPABILITY_CAN_REQUEST_ENHANCED_WEB_ACCESSIBILITY";
             case CAPABILITY_CAN_REQUEST_FILTER_KEY_EVENTS:
-                return "CAPABILITY_CAN_FILTER_KEY_EVENTS";
+                return "CAPABILITY_CAN_REQUEST_FILTER_KEY_EVENTS";
             case CAPABILITY_CAN_CONTROL_MAGNIFICATION:
                 return "CAPABILITY_CAN_CONTROL_MAGNIFICATION";
             case CAPABILITY_CAN_PERFORM_GESTURES:
diff --git a/core/java/android/accessibilityservice/IAccessibilityServiceClient.aidl b/core/java/android/accessibilityservice/IAccessibilityServiceClient.aidl
index 3f778ad..4e96b8f 100644
--- a/core/java/android/accessibilityservice/IAccessibilityServiceClient.aidl
+++ b/core/java/android/accessibilityservice/IAccessibilityServiceClient.aidl
@@ -50,4 +50,8 @@
     void onFingerprintCapturingGesturesChanged(boolean capturing);
 
     void onFingerprintGesture(int gesture);
+
+    void onAccessibilityButtonClicked();
+
+    void onAccessibilityButtonAvailabilityChanged(boolean available);
 }
diff --git a/core/java/android/accessibilityservice/IAccessibilityServiceConnection.aidl b/core/java/android/accessibilityservice/IAccessibilityServiceConnection.aidl
index 5499bd5..7a1931718 100644
--- a/core/java/android/accessibilityservice/IAccessibilityServiceConnection.aidl
+++ b/core/java/android/accessibilityservice/IAccessibilityServiceConnection.aidl
@@ -37,7 +37,8 @@
 
     boolean findAccessibilityNodeInfoByAccessibilityId(int accessibilityWindowId,
         long accessibilityNodeId, int interactionId,
-        IAccessibilityInteractionConnectionCallback callback, int flags, long threadId);
+        IAccessibilityInteractionConnectionCallback callback, int flags, long threadId,
+        in Bundle arguments);
 
     boolean findAccessibilityNodeInfosByText(int accessibilityWindowId, long accessibilityNodeId,
         String text, int interactionId, IAccessibilityInteractionConnectionCallback callback,
@@ -88,6 +89,8 @@
 
     void setSoftKeyboardCallbackEnabled(boolean enabled);
 
+    boolean isAccessibilityButtonAvailable();
+
     void sendGesture(int sequence, in ParceledListSlice gestureSteps);
 
     boolean isFingerprintGestureDetectionAvailable();
diff --git a/core/java/android/accounts/AccountManager.java b/core/java/android/accounts/AccountManager.java
index def0ff9..7d039ef 100644
--- a/core/java/android/accounts/AccountManager.java
+++ b/core/java/android/accounts/AccountManager.java
@@ -338,21 +338,24 @@
         "android.accounts.LOGIN_ACCOUNTS_CHANGED";
 
     /**
-     * Uid key to set default visibility for applications targeting API level
+     * Key to set default visibility for applications targeting API level
      * {@link android.os.Build.VERSION_CODES#O} or above and don't have the same signature as
      * authenticator See {@link #getAccountVisibility}. If the value was not set by authenticator
-     * USER_MANAGED_NOT_VISIBLE is used.
+     * {@link #VISIBILITY_USER_MANAGED_NOT_VISIBLE} is used.
      */
-    public static final int UID_KEY_DEFAULT_VISIBILITY = -2;
+    public static final String PACKAGE_NAME_KEY_LEGACY_VISIBLE =
+            "android.accounts.key_legacy_visible";
 
     /**
-     * Uid key to set visibility for applications targeting API level below
-     * {@link android.os.Build.VERSION_CODES#O} with GET_ACCOUNS permission, or applications with
-     * any targeting API level with the same signature as authenticator. See
-     * {@link #getAccountVisibility}. If the value was not set by authenticator USER_MANAGED_VISIBLE
-     * is used.
+     * Key to set visibility for applications targeting API level below
+     * {@link android.os.Build.VERSION_CODES#O} with
+     * {@link android.Manifest.permission#GET_ACCOUNTS} permission, or applications with any
+     * targeting API level with the same signature as authenticator. See
+     * {@link #getAccountVisibility}. If the value was not set by authenticator
+     * {@link #VISIBILITY_USER_MANAGED_VISIBLE} is used.
      */
-    public static final int UID_KEY_DEFAULT_LEGACY_VISIBILITY = -3;
+    public static final String PACKAGE_NAME_KEY_LEGACY_NOT_VISIBLE =
+            "android.accounts.key_legacy_not_visible";
 
     /**
      * @hide
@@ -565,12 +568,14 @@
     }
 
     /**
-     * Returns the accounts visible to the specified package, in an environment where some apps
-     * are not authorized to view all accounts. This method can only be called by system apps.
+     * Returns the accounts visible to the specified package, in an environment where some apps are
+     * not authorized to view all accounts. This method can only be called by system apps and
+     * authenticators managing the type
+     *
      * @param type The type of accounts to return, null to retrieve all accounts
      * @param packageName The package name of the app for which the accounts are to be returned
-     * @return An array of {@link Account}, one per matching account.  Empty
-     *     (never null) if no accounts of the specified type have been added.
+     * @return An array of {@link Account}, one per matching account. Empty (never null) if no
+     *         accounts of the specified type have been added.
      */
     @NonNull
     public Account[] getAccountsByTypeForPackage(String type, String packageName) {
@@ -609,7 +614,8 @@
      *
      * <p>
      * <b>NOTE:</b> If targeting your app to work on API level
-     * {@link android.os.Build.VERSION_CODES#LOLLIPOP_MR1} and before, GET_ACCOUNTS permission is
+     * {@link android.os.Build.VERSION_CODES#LOLLIPOP_MR1} and before,
+     * {@link android.Manifest.permission#GET_ACCOUNTS} permission is
      * needed for those platforms, irrespective of uid or signature match. See docs for this
      * function in API level {@link android.os.Build.VERSION_CODES#LOLLIPOP_MR1}.
      *
@@ -750,7 +756,8 @@
      * accounts managed by AbstractAccountAuthenticators whose signature matches the client.
      * <p>
      * <b>NOTE:</b> If targeting your app to work on API level
-     * {@link android.os.Build.VERSION_CODES#LOLLIPOP_MR1} and before, GET_ACCOUNTS permission is
+     * {@link android.os.Build.VERSION_CODES#LOLLIPOP_MR1} and before,
+     * {@link android.Manifest.permission#GET_ACCOUNTS} permission is
      * needed for those platforms, irrespective of uid or signature match. See docs for this
      * function in API level {@link android.os.Build.VERSION_CODES#LOLLIPOP_MR1}.
      *
@@ -822,9 +829,8 @@
     }
 
     /**
-     * Adds an account directly to the AccountManager. Additionally this makes the Account visible
-     * to desired UIDs of applications on the device, and sends directed broadcasts to these
-     * individual applications.
+     * Adds an account directly to the AccountManager. Additionally it specifies Account visiblity
+     * for given list of packages.
      * <p>
      * Normally used by sign-up wizards associated with authenticators, not directly by
      * applications.
@@ -841,14 +847,14 @@
      * @param account The {@link Account} to add
      * @param password The password to associate with the account, null for none
      * @param extras String values to use for the account's userdata, null for none
-     * @param visibility Map from uid to visibility values which will be set before account is
-     *        added. See getAccountVisibility for possilbe values.
+     * @param visibility Map from packageName to visibility values which will be set before account
+     *        is added. See {@link #getAccountVisibility} for possible values.
      *
      * @return True if the account was successfully added, false if the account already exists, the
      *         account is null, or another error occurs.
      */
     public boolean addAccountExplicitly(Account account, String password, Bundle extras,
-            Map<Integer, Integer> visibility) {
+            Map<String, Integer> visibility) {
         if (account == null)
             throw new IllegalArgumentException("account is null");
         try {
@@ -860,20 +866,22 @@
     }
 
     /**
-     * Returns UIDs of applications for which visibility of given account was explicitly set.
+     * Returns package names and visibility which were explicitly set for given account.
      * <p>
      * This method requires the caller to have a signature match with the authenticator that owns
      * the specified account.
      *
      * @param account The account for which visibility data should be returned.
      *
-     * @return Map from uid to visibility for given account.
+     * @return Map from package names to visibility for given account.
      */
-    public Map<Integer, Integer> getUidsAndVisibilityForAccount(Account account) {
+    public Map<String, Integer> getPackagesAndVisibilityForAccount(Account account) {
         try {
+            if (account == null)
+                throw new IllegalArgumentException("account is null");
             @SuppressWarnings("unchecked")
-            Map<Integer, Integer> result = (Map<Integer, Integer>) mService
-                    .getUidsAndVisibilityForAccount(account);
+            Map<String, Integer> result = (Map<String, Integer>) mService
+                    .getPackagesAndVisibilityForAccount(account);
             return result;
         } catch (RemoteException re) {
             throw re.rethrowFromSystemServer();
@@ -907,30 +915,34 @@
     }
 
     /**
-     * Set visibility value of given account to certain UID.
+     * Set visibility value of given account to certain packageName.
+     * Package name must match installed application, or be equal to
+     * {@link #PACKAGE_NAME_KEY_LEGACY_VISIBLE} or {@link #PACKAGE_NAME_KEY_LEGACY_NOT_VISIBLE}.
      * <p>
      * See {@link #getAccountVisibility} for possible values.
      * <p>
      * This method requires the caller to have a signature match with the authenticator that owns
      * the specified account.
      *
-     * @param account Account to make visible.
-     * @param uid The UID of the application to modify account visibility.
+     * @param account Account to update visibility
+     * @param packageName Package name of the application to modify account visibility.
      * @param visibility - new visibility value.
      *
      * @return True if visibility value was succesfully updated.
      */
-    public boolean setAccountVisibility(Account account, int uid,
+    public boolean setAccountVisibility(Account account, String packageName,
             @AccountVisibility int visibility) {
+        if (account == null)
+            throw new IllegalArgumentException("account is null");
         try {
-            return mService.setAccountVisibility(account, uid, visibility);
+            return mService.setAccountVisibility(account, packageName, visibility);
         } catch (RemoteException re) {
             throw re.rethrowFromSystemServer();
         }
     }
 
     /**
-     * Gets visibility of certain account for given UID. Possible returned values are:
+     * Get visibility of certain account for given application. Possible returned values are:
      * <ul>
      * <li>{@link #VISIBILITY_UNDEFINED}</li>
      * <li>{@link #VISIBILITY_VISIBLE}</li>
@@ -944,13 +956,15 @@
      * the specified account.
      *
      * @param account Account to get visibility.
-     * @param uid The UID of the application to get account visibility.
+     * @param packageName Package name of the application to get account visibility
      *
-     * @return int Visibility for given account and uid.
+     * @return int Visibility for given account and package.
      */
-    public @AccountVisibility int getAccountVisibility(Account account, int uid) {
+    public @AccountVisibility int getAccountVisibility(Account account, String packageName) {
+        if (account == null)
+            throw new IllegalArgumentException("account is null");
         try {
-            return mService.getAccountVisibility(account, uid);
+            return mService.getAccountVisibility(account, packageName);
         } catch (RemoteException re) {
             throw re.rethrowFromSystemServer();
         }
@@ -1788,7 +1802,7 @@
     public void addSharedAccountsFromParentUser(UserHandle parentUser, UserHandle user) {
         try {
             mService.addSharedAccountsFromParentUser(parentUser.getIdentifier(),
-                    user.getIdentifier());
+                    user.getIdentifier(), mContext.getOpPackageName());
         } catch (RemoteException re) {
             throw re.rethrowFromSystemServer();
         }
diff --git a/core/java/android/accounts/ChooseTypeAndAccountActivity.java b/core/java/android/accounts/ChooseTypeAndAccountActivity.java
index 95fdfef..35011b5 100644
--- a/core/java/android/accounts/ChooseTypeAndAccountActivity.java
+++ b/core/java/android/accounts/ChooseTypeAndAccountActivity.java
@@ -437,7 +437,7 @@
         }
         if (oldVisibility != null
                 && oldVisibility == AccountManager.VISIBILITY_USER_MANAGED_NOT_VISIBLE) {
-            AccountManager.get(this).setAccountVisibility(account, mCallingUid,
+            AccountManager.get(this).setAccountVisibility(account, mCallingPackage,
                     AccountManager.VISIBILITY_USER_MANAGED_VISIBLE);
         }
         Bundle bundle = new Bundle();
diff --git a/core/java/android/accounts/IAccountManager.aidl b/core/java/android/accounts/IAccountManager.aidl
index 63a0919..49cd2c6 100644
--- a/core/java/android/accounts/IAccountManager.aidl
+++ b/core/java/android/accounts/IAccountManager.aidl
@@ -80,7 +80,7 @@
     /* Shared accounts */
     Account[] getSharedAccountsAsUser(int userId);
     boolean removeSharedAccountAsUser(in Account account, int userId);
-    void addSharedAccountsFromParentUser(int parentUserId, int userId);
+    void addSharedAccountsFromParentUser(int parentUserId, int userId, String opPackageName);
 
     /* Account renaming. */
     void renameAccount(in IAccountManagerResponse response, in Account accountToRename, String newName);
@@ -108,15 +108,12 @@
     void isCredentialsUpdateSuggested(in IAccountManagerResponse response, in Account account,
         String statusToken);
 
-    /* Returns Map<Integer, Integer> from UID to visibility with all values stored for given account*/
-    Map getUidsAndVisibilityForAccount(in Account account);
-
+    /* Returns Map<String, Integer> from package name to visibility with all values stored for given account */
+    Map getPackagesAndVisibilityForAccount(in Account account);
     boolean addAccountExplicitlyWithVisibility(in Account account, String password, in Bundle extras,
             in Map visibility);
-
-    boolean setAccountVisibility(in Account a, int uid, int newVisibility);
-    int getAccountVisibility(in Account a, int uid);
-
+    boolean setAccountVisibility(in Account a, in String packageName, int newVisibility);
+    int getAccountVisibility(in Account a, in String packageName);
     /* Type may be null returns Map <Account, Integer>*/
     Map getAccountsAndVisibilityForPackage(in String packageName, in String accountType);
 
diff --git a/core/java/android/animation/AnimatorSet.java b/core/java/android/animation/AnimatorSet.java
index 4e3b7d0..fca26f8 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;
         }
     }
@@ -1756,7 +1865,8 @@
             if (mEvent == ANIMATION_START) {
                 return mNode.mStartTime;
             } else if (mEvent == ANIMATION_DELAY_ENDED) {
-                return mNode.mStartTime + mNode.mAnimation.getStartDelay();
+                return mNode.mStartTime == DURATION_INFINITE
+                        ? DURATION_INFINITE : mNode.mStartTime + mNode.mAnimation.getStartDelay();
             } else {
                 return mNode.mEndTime;
             }
@@ -1797,6 +1907,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 55ac1f4..4e31e44 100644
--- a/core/java/android/animation/ValueAnimator.java
+++ b/core/java/android/animation/ValueAnimator.java
@@ -637,13 +637,16 @@
     public void setCurrentFraction(float fraction) {
         initAnimation();
         fraction = clampFraction(fraction);
-        long seekTime = (long) (getScaledDuration() * fraction);
-        long currentTime = AnimationUtils.currentAnimationTimeMillis();
-        mStartTime = currentTime - seekTime;
         mStartTimeCommitted = true; // do not allow start time to be compensated for jank
-        if (!isPulsingInternal()) {
-            // If the animation loop hasn't started, the startTime will be adjusted in the first
-            // frame based on seek fraction.
+        if (isPulsingInternal()) {
+            long seekTime = (long) (getScaledDuration() * fraction);
+            long currentTime = AnimationUtils.currentAnimationTimeMillis();
+            // Only modify the start time when the animation is running. Seek fraction will ensure
+            // non-running animations skip to the correct start time.
+            mStartTime = currentTime - seekTime;
+        } else {
+            // If the animation loop hasn't started, or during start delay, the startTime will be
+            // adjusted once the delay has passed based on seek fraction.
             mSeekFraction = fraction;
         }
         mOverallFraction = fraction;
@@ -1028,7 +1031,8 @@
         // started-but-not-yet-reached-the-first-frame phase.
         mLastFrameTime = -1;
         mFirstFrameTime = -1;
-        addAnimationCallback((long) (mStartDelay * sDurationScale));
+        mStartTime = -1;
+        addAnimationCallback(0);
 
         if (mStartDelay == 0 || mSeekFraction >= 0 || mReversing) {
             // If there's no start delay, init the animation and notify start listeners right away
@@ -1196,7 +1200,7 @@
         mStartListenersCalled = false;
         mLastFrameTime = -1;
         mFirstFrameTime = -1;
-        mReversing = false;
+        mStartTime = -1;
         if (notify && mListeners != null) {
             ArrayList<AnimatorListener> tmpListeners =
                     (ArrayList<AnimatorListener>) mListeners.clone();
@@ -1205,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(),
@@ -1389,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
@@ -1408,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 0ac30de..4449454 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -16,6 +16,9 @@
 
 package android.app;
 
+import android.view.autofill.AutoFillId;
+import android.view.autofill.AutoFillManager;
+import android.view.autofill.AutoFillValue;
 import com.android.internal.annotations.GuardedBy;
 import com.android.internal.app.IVoiceInteractor;
 import com.android.internal.app.ToolbarActionBar;
@@ -49,7 +52,6 @@
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageManager;
 import android.content.pm.PackageManager.NameNotFoundException;
-import android.content.pm.ParceledListSlice;
 import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.content.res.TypedArray;
@@ -74,8 +76,6 @@
 import android.os.StrictMode;
 import android.os.SystemProperties;
 import android.os.UserHandle;
-import android.service.autofill.AutoFillService;
-import android.service.autofill.IAutoFillAppCallback;
 import android.text.Selection;
 import android.text.SpannableStringBuilder;
 import android.text.TextUtils;
@@ -116,9 +116,6 @@
 import android.view.WindowManager;
 import android.view.WindowManagerGlobal;
 import android.view.accessibility.AccessibilityEvent;
-import android.view.autofill.AutoFillId;
-import android.view.autofill.AutoFillManager;
-import android.view.autofill.AutoFillSession;
 import android.widget.AdapterView;
 import android.widget.Toast;
 import android.widget.Toolbar;
@@ -127,7 +124,6 @@
 import java.io.PrintWriter;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
-import java.lang.ref.WeakReference;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -693,7 +689,8 @@
         implements LayoutInflater.Factory2,
         Window.Callback, KeyEvent.Callback,
         OnCreateContextMenuListener, ComponentCallbacks2,
-        Window.OnWindowDismissedCallback, WindowControllerCallback {
+        Window.OnWindowDismissedCallback, WindowControllerCallback,
+        AutoFillManager.AutoFillClient {
     private static final String TAG = "Activity";
     private static final boolean DEBUG_LIFECYCLE = false;
 
@@ -731,6 +728,7 @@
             "android:hasCurrentPermissionsRequest";
 
     private static final String REQUEST_PERMISSIONS_WHO_PREFIX = "@android:requestPermissions:";
+    private static final String AUTO_FILL_AUTH_WHO_PREFIX = "@android:autoFillAuth:";
 
     private static final String KEYBOARD_SHORTCUTS_RECEIVER_PKG_NAME = "com.android.systemui";
 
@@ -846,9 +844,6 @@
 
     private boolean mHasCurrentPermissionsRequest;
 
-    @GuardedBy("this")
-    private AutoFillSession mAutoFillSession;
-
     private static native String getDlWarning();
 
     /** Return the intent that started this activity. */
@@ -969,9 +964,7 @@
                     ? mLastNonConfigurationInstances.fragments : null);
         }
         mFragments.dispatchCreate();
-        if (!isAtLeastO()) {
-            getApplication().dispatchActivityCreated(this, savedInstanceState);
-        }
+        getApplication().dispatchActivityCreated(this, savedInstanceState);
         if (mVoiceInteractor != null) {
             mVoiceInteractor.attachActivity(this);
         }
@@ -1199,9 +1192,8 @@
         mCalled = true;
 
         mFragments.doLoaderStart();
-        if (!isAtLeastO()) {
-            getApplication().dispatchActivityStarted(this);
-        }
+
+        getApplication().dispatchActivityStarted(this);
     }
 
     /**
@@ -1262,9 +1254,7 @@
     @CallSuper
     protected void onResume() {
         if (DEBUG_LIFECYCLE) Slog.v(TAG, "onResume " + this);
-        if (!isAtLeastO()) {
-            getApplication().dispatchActivityResumed(this);
-        }
+        getApplication().dispatchActivityResumed(this);
         mActivityTransitionState.onResume(this, isTopOfTask());
         mCalled = true;
     }
@@ -1431,9 +1421,6 @@
         saveManagedDialogs(outState);
         mActivityTransitionState.saveState(outState);
         storeHasCurrentPermissionRequest(outState);
-        if (isAtLeastO()) {
-            getApplication().dispatchActivitySaveInstanceState(this, outState);
-        }
         if (DEBUG_LIFECYCLE) Slog.v(TAG, "onSaveInstanceState " + this + ": " + outState);
     }
 
@@ -1450,9 +1437,6 @@
         onSaveInstanceState(outState, outPersistentState);
         saveManagedDialogs(outState);
         storeHasCurrentPermissionRequest(outState);
-        if (isAtLeastO()) {
-            getApplication().dispatchActivitySaveInstanceState(this, outState);
-        }
         if (DEBUG_LIFECYCLE) Slog.v(TAG, "onSaveInstanceState " + this + ": " + outState +
                 ", " + outPersistentState);
     }
@@ -1508,9 +1492,7 @@
         if (p != null) {
             outState.putParcelable(FRAGMENTS_TAG, p);
         }
-        if (!isAtLeastO()) {
-            getApplication().dispatchActivitySaveInstanceState(this, outState);
-        }
+        getApplication().dispatchActivitySaveInstanceState(this, outState);
     }
 
     /**
@@ -1608,9 +1590,7 @@
     @CallSuper
     protected void onPause() {
         if (DEBUG_LIFECYCLE) Slog.v(TAG, "onPause " + this);
-        if (!isAtLeastO()) {
-            getApplication().dispatchActivityPaused(this);
-        }
+        getApplication().dispatchActivityPaused(this);
         mCalled = true;
     }
 
@@ -1715,20 +1695,6 @@
     }
 
     /**
-     * Lazily gets the {@link IAutoFillAppCallback} for this activitity.
-     *
-     * <p>This callback is used by the {@link AutoFillService} app to auto-fill the activity fields.
-     */
-    IAutoFillAppCallback getAutoFillCallback() {
-        synchronized (this) {
-            if (mAutoFillSession == null) {
-                mAutoFillSession = new AutoFillSession(this);
-            }
-            return mAutoFillSession.getCallback();
-        }
-    }
-
-    /**
      * Request the Keyboard Shortcuts screen to show up. This will trigger
      * {@link #onProvideKeyboardShortcuts} to retrieve the shortcuts for the foreground activity.
      */
@@ -1759,13 +1725,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) {
@@ -1810,11 +1777,12 @@
         if (DEBUG_LIFECYCLE) Slog.v(TAG, "onStop " + this);
         if (mActionBar != null) mActionBar.setShowHideAnimationEnabled(false);
         mActivityTransitionState.onStop();
-        if (!isAtLeastO()) {
-            getApplication().dispatchActivityStopped(this);
-        }
+        getApplication().dispatchActivityStopped(this);
         mTranslucentCallback = null;
         mCalled = true;
+        if (isFinishing() && AutoFillManager.isClientActive(getActivityToken())) {
+            getSystemService(AutoFillManager.class).reset();
+        }
     }
 
     /**
@@ -1882,9 +1850,8 @@
         if (mActionBar != null) {
             mActionBar.onDestroy();
         }
-        if (!isAtLeastO()) {
-            getApplication().dispatchActivityDestroyed(this);
-        }
+
+        getApplication().dispatchActivityDestroyed(this);
     }
 
     /**
@@ -6034,11 +6001,6 @@
             getWindow().peekDecorView().getViewRootImpl().dump(prefix, fd, writer, args);
         }
 
-        if (mAutoFillSession!= null) {
-            writer.print(prefix); writer.print("mAutoFillSession: " );
-                    writer.println(mAutoFillSession);
-        }
-
         mHandler.getLooper().dump(new PrintWriterPrinter(writer), prefix);
     }
 
@@ -6761,6 +6723,8 @@
         mCurrentConfig = config;
 
         mWindow.setColorMode(info.colorMode);
+
+        AutoFillManager.addClient(token, this);
     }
 
     /** @hide */
@@ -6768,33 +6732,25 @@
         return mParent != null ? mParent.getActivityToken() : mToken;
     }
 
-    final void performCreateCommon(Bundle icicle) {
-        mActivityTransitionState.readState(icicle);
+    final void performCreateCommon() {
         mVisibleFromClient = !mWindow.getWindowStyle().getBoolean(
                 com.android.internal.R.styleable.Window_windowNoDisplay, false);
         mFragments.dispatchActivityCreated();
         mActivityTransitionState.setEnterActivityOptions(this, getActivityOptions());
-        if (isAtLeastO()) {
-            getApplication().dispatchActivityCreated(this, icicle);
-        }
     }
 
     final void performCreate(Bundle icicle) {
         restoreHasCurrentPermissionRequest(icicle);
-        if (isAtLeastO()) {
-            getApplication().dispatchActivityPreCreated(this, icicle);
-        }
         onCreate(icicle);
-        performCreateCommon(icicle);
+        mActivityTransitionState.readState(icicle);
+        performCreateCommon();
     }
 
     final void performCreate(Bundle icicle, PersistableBundle persistentState) {
         restoreHasCurrentPermissionRequest(icicle);
-        if (isAtLeastO()) {
-            getApplication().dispatchActivityPreCreated(this, icicle);
-        }
         onCreate(icicle, persistentState);
-        performCreateCommon(icicle);
+        mActivityTransitionState.readState(icicle);
+        performCreateCommon();
     }
 
     final void performStart() {
@@ -6837,9 +6793,6 @@
         }
 
         mActivityTransitionState.enterReady(this);
-        if (isAtLeastO()) {
-            getApplication().dispatchActivityStarted(this);
-        }
     }
 
     final void performRestart() {
@@ -6915,9 +6868,7 @@
 
         mFragments.dispatchResume();
         mFragments.execPendingActions();
-        if (isAtLeastO()) {
-            getApplication().dispatchActivityResumed(this);
-        }
+
         onPostResume();
         if (!mCalled) {
             throw new SuperNotCalledException(
@@ -6932,15 +6883,13 @@
         mCalled = false;
         onPause();
         mResumed = false;
-        if (isAtLeastO()) {
-            getApplication().dispatchActivityPaused(this);
-        }
         if (!mCalled && getApplicationInfo().targetSdkVersion
                 >= android.os.Build.VERSION_CODES.GINGERBREAD) {
             throw new SuperNotCalledException(
                     "Activity " + mComponent.toShortString() +
                     " did not call through to super.onPause()");
         }
+        mResumed = false;
     }
 
     final void performUserLeaving() {
@@ -6951,7 +6900,7 @@
     final void performStop(boolean preserveWindow) {
         mDoReportFullyDrawn = false;
         mFragments.doLoaderStop(mChangingConfigurations /*retain*/);
-        boolean dispatchActivityStopped = !mStopped;
+
         if (!mStopped) {
             if (mWindow != null) {
                 mWindow.closeAllPanels();
@@ -6988,9 +6937,6 @@
             mStopped = true;
         }
         mResumed = false;
-        if (dispatchActivityStopped && isAtLeastO()) {
-            getApplication().dispatchActivityStopped(this);
-        }
     }
 
     final void performDestroy() {
@@ -7002,13 +6948,6 @@
         if (mVoiceInteractor != null) {
             mVoiceInteractor.detachActivity();
         }
-        if (isAtLeastO()) {
-            getApplication().dispatchActivityDestroyed(this);
-        }
-    }
-
-    private boolean isAtLeastO() {
-        return getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.O;
     }
 
     final void dispatchMultiWindowModeChanged(boolean isInMultiWindowMode) {
@@ -7076,6 +7015,8 @@
                     return;
                 }
             }
+        } else if (who.startsWith(AUTO_FILL_AUTH_WHO_PREFIX)) {
+            getSystemService(AutoFillManager.class).onAuthenticationResult(data);
         } else {
             Fragment frag = mFragments.findFragmentByWho(who);
             if (frag != null) {
@@ -7216,6 +7157,39 @@
         fragment.onRequestPermissionsResult(requestCode, permissions, grantResults);
     }
 
+    /** @hide */
+    @Override
+    public void autoFill(List<AutoFillId> ids, List<AutoFillValue> values) {
+        final View root = getWindow().getDecorView();
+        final int itemCount = ids.size();
+        for (int i = 0; i < itemCount; i++) {
+            final AutoFillId id = ids.get(i);
+            final AutoFillValue value = values.get(i);
+            final int viewId = id.getViewId();
+            final View view = root.findViewByAccessibilityIdTraversal(viewId);
+            if (view == null) {
+                Log.w(TAG, "autoFill(): no View with id " + viewId);
+                continue;
+            }
+            if (id.isVirtual()) {
+                view.autoFillVirtual(id.getVirtualChildId(), value);
+            } else {
+                view.autoFill(value);
+            }
+        }
+    }
+
+    /** @hide */
+    @Override
+    public void authenticate(IntentSender intent, Intent fillInIntent) {
+        try {
+            startIntentSenderForResultInner(intent, AUTO_FILL_AUTH_WHO_PREFIX,
+                    0, fillInIntent, 0, 0, null);
+        } catch (IntentSender.SendIntentException e) {
+            Log.e(TAG, "authenticate() failed for intent:" + intent, e);
+        }
+    }
+
     class HostCallbacks extends FragmentHostCallback<Activity> {
         public HostCallbacks() {
             super(Activity.this /*activity*/);
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java
index 5b05d58..fda9966 100644
--- a/core/java/android/app/ActivityManager.java
+++ b/core/java/android/app/ActivityManager.java
@@ -133,7 +133,7 @@
     public final static boolean ENABLE_TASK_SNAPSHOTS;
 
     static {
-        ENABLE_TASK_SNAPSHOTS = SystemProperties.getBoolean("persist.enable_task_snapshots", true);
+        ENABLE_TASK_SNAPSHOTS = SystemProperties.getBoolean("persist.enable_task_snapshots", false);
     }
 
     static final class UidObserver extends IUidObserver.Stub {
@@ -616,11 +616,14 @@
         /** ID of stack that always on top (always visible) when it exist. */
         public static final int PINNED_STACK_ID = DOCKED_STACK_ID + 1;
 
-        /** Recents activity stack ID. */
+        /** ID of stack that contains the Recents activity. */
         public static final int RECENTS_STACK_ID = PINNED_STACK_ID + 1;
 
+        /** ID of stack that contains activities launched by the assistant. */
+        public static final int ASSISTANT_STACK_ID = RECENTS_STACK_ID + 1;
+
         /** Last static stack stack ID. */
-        public static final int LAST_STATIC_STACK_ID = RECENTS_STACK_ID;
+        public static final int LAST_STATIC_STACK_ID = ASSISTANT_STACK_ID;
 
         /** Start of ID range used by stacks that are created dynamically. */
         public static final int FIRST_DYNAMIC_STACK_ID = LAST_STATIC_STACK_ID + 1;
@@ -665,7 +668,7 @@
          * Returns true if dynamic stacks are allowed to be visible behind the input stack.
          */
         public static boolean isDynamicStacksVisibleBehindAllowed(int stackId) {
-            return stackId == PINNED_STACK_ID;
+            return stackId == PINNED_STACK_ID || stackId == ASSISTANT_STACK_ID;
         }
 
         /**
@@ -681,8 +684,8 @@
          * Returns true if Stack size is affected by the docked stack changing size.
          */
         public static boolean isResizeableByDockedStack(int stackId) {
-            return isStaticStack(stackId) &&
-                    stackId != DOCKED_STACK_ID && stackId != PINNED_STACK_ID;
+            return isStaticStack(stackId) && stackId != DOCKED_STACK_ID
+                    && stackId != PINNED_STACK_ID && stackId != ASSISTANT_STACK_ID;
         }
 
         /**
@@ -691,14 +694,16 @@
          */
         public static boolean isTaskResizeableByDockedStack(int stackId) {
             return isStaticStack(stackId) && stackId != FREEFORM_WORKSPACE_STACK_ID
-                    && stackId != DOCKED_STACK_ID && stackId != PINNED_STACK_ID;
+                    && stackId != DOCKED_STACK_ID && stackId != PINNED_STACK_ID
+                    && stackId != ASSISTANT_STACK_ID;
         }
 
         /**
          * Returns true if the input stack is affected by drag resizing.
          */
         public static boolean isStackAffectedByDragResizing(int stackId) {
-            return isStaticStack(stackId) && stackId != PINNED_STACK_ID;
+            return isStaticStack(stackId) && stackId != PINNED_STACK_ID
+                    && stackId != ASSISTANT_STACK_ID;
         }
 
         /**
@@ -722,19 +727,31 @@
         }
 
         /**
+         * Return whether a stackId is a stack that be a backdrop to a translucent activity.  These
+         * are generally fullscreen stacks.
+         */
+        public static boolean isBackdropToTranslucentActivity(int stackId) {
+            return stackId == FULLSCREEN_WORKSPACE_STACK_ID
+                    || stackId == ASSISTANT_STACK_ID;
+        }
+
+        /**
          * Returns true if animation specs should be constructed for app transition that moves
          * the task to the specified stack.
          */
         public static boolean useAnimationSpecForAppTransition(int stackId) {
-
             // TODO: INVALID_STACK_ID is also animated because we don't persist stack id's across
             // reboots.
             return stackId == FREEFORM_WORKSPACE_STACK_ID
-                    || stackId == FULLSCREEN_WORKSPACE_STACK_ID || stackId == DOCKED_STACK_ID
+                    || stackId == FULLSCREEN_WORKSPACE_STACK_ID
+                    || stackId == ASSISTANT_STACK_ID
+                    || stackId == DOCKED_STACK_ID
                     || stackId == INVALID_STACK_ID;
         }
 
-        /** Returns true if the windows in the stack can receive input keys. */
+        /**
+         * Returns true if the windows in the stack can receive input keys.
+         */
         public static boolean canReceiveKeys(int stackId) {
             return stackId != PINNED_STACK_ID;
         }
@@ -743,7 +760,17 @@
          * Returns true if the stack can be visible above lockscreen.
          */
         public static boolean isAllowedOverLockscreen(int stackId) {
-            return stackId == HOME_STACK_ID || stackId == FULLSCREEN_WORKSPACE_STACK_ID;
+            return stackId == HOME_STACK_ID || stackId == FULLSCREEN_WORKSPACE_STACK_ID ||
+                    stackId == ASSISTANT_STACK_ID;
+        }
+
+        /**
+         * Returns true if activities from stasks in the given {@param stackId} are allowed to
+         * enter picture-in-picture.
+         */
+        public static boolean isAllowedToEnterPictureInPicture(int stackId) {
+            return stackId != HOME_STACK_ID && stackId != ASSISTANT_STACK_ID &&
+                    stackId != RECENTS_STACK_ID;
         }
 
         public static boolean isAlwaysOnTop(int stackId) {
@@ -799,8 +826,8 @@
          * @see android.app.ActivityManager#supportsMultiWindow
          */
         public static boolean isMultiWindowStack(int stackId) {
-            return isStaticStack(stackId) || stackId == PINNED_STACK_ID
-                    || stackId == FREEFORM_WORKSPACE_STACK_ID || stackId == DOCKED_STACK_ID;
+            return stackId == PINNED_STACK_ID || stackId == FREEFORM_WORKSPACE_STACK_ID
+                    || stackId == DOCKED_STACK_ID;
         }
 
         /**
@@ -815,20 +842,20 @@
          * calling {@link Activity#requestVisibleBehind}.
          */
         public static boolean activitiesCanRequestVisibleBehind(int stackId) {
-            return stackId == FULLSCREEN_WORKSPACE_STACK_ID;
+            return stackId == FULLSCREEN_WORKSPACE_STACK_ID ||
+                    stackId == ASSISTANT_STACK_ID;
         }
 
         /**
-         * Returns true if this stack may be scaled without resizing,
-         * and windows within may need to be configured as such.
+         * Returns true if this stack may be scaled without resizing, and windows within may need
+         * to be configured as such.
          */
         public static boolean windowsAreScaleable(int stackId) {
             return stackId == PINNED_STACK_ID;
         }
 
         /**
-         * Returns true if windows in this stack should be given move animations
-         * by default.
+         * Returns true if windows in this stack should be given move animations by default.
          */
         public static boolean hasMovementAnimations(int stackId) {
             return stackId != PINNED_STACK_ID;
@@ -836,8 +863,11 @@
 
         /** Returns true if the input stack and its content can affect the device orientation. */
         public static boolean canSpecifyOrientation(int stackId) {
-            return stackId == HOME_STACK_ID || stackId == RECENTS_STACK_ID
-                    || stackId == FULLSCREEN_WORKSPACE_STACK_ID || isDynamicStack(stackId);
+            return stackId == HOME_STACK_ID
+                    || stackId == RECENTS_STACK_ID
+                    || stackId == FULLSCREEN_WORKSPACE_STACK_ID
+                    || stackId == ASSISTANT_STACK_ID
+                    || isDynamicStack(stackId);
         }
     }
 
diff --git a/core/java/android/app/ActivityManagerInternal.java b/core/java/android/app/ActivityManagerInternal.java
index e848080..4e34552 100644
--- a/core/java/android/app/ActivityManagerInternal.java
+++ b/core/java/android/app/ActivityManagerInternal.java
@@ -22,6 +22,7 @@
 import android.content.IIntentSender;
 import android.content.Intent;
 import android.content.res.Configuration;
+import android.net.NetworkPolicyManager.UidStateWithSeqObserver;
 import android.os.Bundle;
 import android.os.IBinder;
 import android.service.voice.IVoiceInteractionSession;
@@ -154,12 +155,6 @@
     public abstract List<IBinder> getTopVisibleActivities();
 
     /**
-     * Returns the top, focused activity of the currently visible stack, but only if it belongs to
-     * the given UID.
-     */
-    public abstract IBinder getTopVisibleActivity(int uid);
-
-    /**
      * Callback for window manager to let activity manager know that docked stack changes its
      * minimized state.
      */
@@ -230,4 +225,25 @@
      * Called when the trusted state of Keyguard has changed.
      */
     public abstract void notifyKeyguardTrustedChanged();
+
+    /**
+     * Sets if the given pid has an overlay UI or not.
+     *
+     * @param pid The pid we are setting overlay UI for.
+     * @param hasOverlayUi True if the process has overlay UI.
+     * @see android.view.WindowManager.LayoutParams#TYPE_APPLICATION_OVERLAY
+     */
+    public abstract void setHasOverlayUi(int pid, boolean hasOverlayUi);
+
+    /**
+     * Set observer which listens to uid state changes. Uid state change along with the sequence
+     * number associated with it needs to be passed to {@link UidStateWithSeqObserver}.
+     */
+    public abstract void setUidStateWithSeqObserver(UidStateWithSeqObserver observer);
+
+    /**
+     * Notifies that NetworkPolicyManagerService has updated the network policy rules for
+     * a specific {@param uid} and {@param procStateSeq}.
+     */
+    public abstract void notifyNetworkPolicyRulesUpdated(int uid, long procStateSeq);
 }
diff --git a/core/java/android/app/ActivityOptions.java b/core/java/android/app/ActivityOptions.java
index 04510da..0b9479d 100644
--- a/core/java/android/app/ActivityOptions.java
+++ b/core/java/android/app/ActivityOptions.java
@@ -33,6 +33,7 @@
 import android.os.RemoteException;
 import android.os.ResultReceiver;
 import android.transition.Transition;
+import android.transition.TransitionListenerAdapter;
 import android.transition.TransitionManager;
 import android.util.Pair;
 import android.util.Slog;
@@ -1342,7 +1343,7 @@
                 + mStartY + ", mWidth=" + mWidth + ", mHeight=" + mHeight;
     }
 
-    private static class HideWindowListener extends Transition.TransitionListenerAdapter
+    private static class HideWindowListener extends TransitionListenerAdapter
         implements ExitTransitionCoordinator.HideSharedElementsCallback {
         private final Window mWindow;
         private final ExitTransitionCoordinator mExit;
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index d5371f8..1f8e6db 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -89,8 +89,6 @@
 import android.provider.Settings;
 import android.security.NetworkSecurityPolicy;
 import android.security.net.config.NetworkSecurityConfigProvider;
-import android.service.autofill.AutoFillService;
-import android.service.autofill.IAutoFillAppCallback;
 import android.util.AndroidRuntimeException;
 import android.util.ArrayMap;
 import android.util.DisplayMetrics;
@@ -180,6 +178,7 @@
     public static final boolean DEBUG_CONFIGURATION = false;
     private static final boolean DEBUG_SERVICE = false;
     private static final boolean DEBUG_MEMORY_TRIM = false;
+    private static final boolean DEBUG_NETWORK = false;
     private static final boolean DEBUG_PROVIDER = false;
     private static final boolean DEBUG_ORDER = false;
     private static final long MIN_TIME_BETWEEN_GCS = 5*1000;
@@ -202,6 +201,55 @@
     // Whether to invoke an activity callback after delivering new configuration.
     private static final boolean REPORT_TO_ACTIVITY = true;
 
+    /**
+     * This is the time main thread waits for the NetworkPolicyManagerService to notify
+     * that network is unrestricted. After this the app components will be launched anyway.
+     */
+    private long mWaitForNetworkTimeoutMs;
+
+    /**
+     * This is only for logging purposes. This will help us identify if the waiting for network
+     * is responsible for any lag that user might see.
+     */
+    private static final int WAIT_FOR_NETWORK_THRESHOLD_MS = 100; // 0.1 sec
+
+    /**
+     * State indicating that there is no need for any blocking for network.
+     */
+    public static final int NETWORK_STATE_NO_CHANGE = 0;
+
+    /**
+     * State indicating that main thread should wait for ActivityManagerService to notify
+     * before the app components are launched.
+     */
+    public static final int NETWORK_STATE_BLOCK = 1;
+
+    /**
+     * State indicating that any threads waiting for ActivityManagerService to notify should
+     * be unblocked.
+     */
+    public static final int NETWORK_STATE_UNBLOCK = 2;
+
+    /**
+     * Constant for indicating a invalid sequence number.
+     */
+    public static final long INVALID_PROC_STATE_SEQ = -1;
+
+    /**
+     * Current sequence number associated with the process state change.
+     */
+    @GuardedBy("mNetworkPolicyLock")
+    private long mCurProcStateSeq;
+
+    /**
+     * Indicates whether any component being launched should block for network before
+     * proceeding.
+     */
+    @GuardedBy("mNetworkPolicyLock")
+    private boolean mShouldBlockForNetwork;
+
+    private Object mNetworkPolicyLock = new Object();
+
     private ContextImpl mSystemContext;
 
     static volatile IPackageManager sPackageManager;
@@ -1306,6 +1354,18 @@
         }
 
         @Override
+        public void setBlockForNetworkState(int blockState, long targetProcStateSeq) {
+            synchronized (mNetworkPolicyLock) {
+                if (blockState == NETWORK_STATE_UNBLOCK) {
+                    unblockForNetworkAccessLN(targetProcStateSeq);
+                } else if (blockState == NETWORK_STATE_BLOCK) {
+                    mShouldBlockForNetwork = true;
+                }
+                mCurProcStateSeq = targetProcStateSeq;
+            }
+        }
+
+        @Override
         public void scheduleInstallProvider(ProviderInfo provider) {
             sendMessage(H.INSTALL_PROVIDER, provider);
         }
@@ -1388,6 +1448,13 @@
         public void handleTrustStorageUpdate() {
             NetworkSecurityPolicy.getInstance().handleTrustStorageUpdate();
         }
+
+        @Override
+        public void notifyNetworkStateUpdated(long curProcStateSeq) {
+            synchronized (mNetworkPolicyLock) {
+                unblockForNetworkAccessLN(curProcStateSeq);
+            }
+        }
     }
 
     private int getLifecycleSeq() {
@@ -2079,6 +2146,79 @@
         }
     }
 
+    void blockForNetworkAccessInForegroundService(long procStateSeq) {
+        synchronized (mNetworkPolicyLock) {
+            if (mCurProcStateSeq >= procStateSeq) {
+                if (mShouldBlockForNetwork) {
+                    blockForNetworkAccessLN();
+                }
+            } else {
+                mCurProcStateSeq = procStateSeq;
+                mShouldBlockForNetwork = true;
+                blockForNetworkAccessLN();
+            }
+        }
+    }
+
+    /**
+     * Block for unrestricted network. It will register a listener to AMS and wait for it to
+     * notify that network policy rules are updated. This method is called before relevant app
+     * components are launched.
+     */
+    private void blockForNetworkAccessLN() {
+        try {
+            if (ActivityManager.getService().registerNetworkRulesUpdateListener(
+                    mAppThread, mCurProcStateSeq)) {
+                try {
+                    Slog.d(TAG, "Uid: " + mBoundApplication.appInfo.uid
+                            + " seq: " + mCurProcStateSeq
+                            + ". Blocking for network. callers: " + Debug.getCallers(3));
+                    final long blockStartTime = SystemClock.elapsedRealtime();
+                    mNetworkPolicyLock.wait(mWaitForNetworkTimeoutMs);
+                    final long totalWaitTime = (SystemClock.elapsedRealtime() - blockStartTime);
+                    if (totalWaitTime >= mWaitForNetworkTimeoutMs) {
+                        Slog.wtf(TAG, "Timed out waiting for the network rules to get updated."
+                                + " Uid: " + mBoundApplication.appInfo.uid + " seq: "
+                                + mCurProcStateSeq);
+                    } else if (totalWaitTime >= WAIT_FOR_NETWORK_THRESHOLD_MS) {
+                        Slog.d(TAG, "Waited for time greater than threshold."
+                                + " Uid: " + mBoundApplication.appInfo.uid + " seq: "
+                                + mCurProcStateSeq);
+                    }
+                    if (DEBUG_NETWORK) {
+                        Slog.d(TAG, "Uid: " + mBoundApplication.appInfo.uid
+                                + " seq: " + mCurProcStateSeq
+                                + ". Time waited for network: " + totalWaitTime);
+                    }
+                } catch (InterruptedException ignored) {
+                }
+            }
+        } catch (RemoteException ignored) {
+        }
+    }
+
+    public void checkAndBlockForNetworkAccess() {
+        synchronized (mNetworkPolicyLock) {
+            if (mWaitForNetworkTimeoutMs > 0 && mShouldBlockForNetwork) {
+                blockForNetworkAccessLN();
+            }
+        }
+    }
+
+    /**
+     * Unblock the main thread if it is waiting for network.
+     */
+    private void unblockForNetworkAccessLN(long procStateSeq) {
+        if (mShouldBlockForNetwork && procStateSeq >= mCurProcStateSeq) {
+            if (DEBUG_NETWORK) {
+                Slog.d(TAG, "Unblocking threads waiting for network. uid: "
+                        + mBoundApplication.appInfo.uid + " procStateSeq: " + procStateSeq);
+            }
+            mNetworkPolicyLock.notifyAll();
+            mShouldBlockForNetwork = false;
+        }
+    }
+
     ActivityThread() {
         mResourcesManager = ResourcesManager.getInstance();
     }
@@ -2671,6 +2811,7 @@
                     activity.mIntent = customIntent;
                 }
                 r.lastNonConfigurationInstances = null;
+                checkAndBlockForNetworkAccess();
                 activity.mStartedActivity = false;
                 int theme = r.activityInfo.getThemeResource();
                 if (theme != 0) {
@@ -2931,16 +3072,13 @@
             if (cmd.requestType == ActivityManager.ASSIST_CONTEXT_FULL || forAutoFill) {
                 structure = new AssistStructure(r.activity, forAutoFill);
                 Intent activityIntent = r.activity.getIntent();
-                boolean addAutoFillCallback = false;
                 // TODO(b/33197203): re-evaluate conditions below for auto-fill. In particular,
                 // FLAG_SECURE might be allowed on AUTO_FILL but not on AUTO_FILL_SAVE)
                 boolean notSecure = r.window == null ||
                         (r.window.getAttributes().flags
                                 & WindowManager.LayoutParams.FLAG_SECURE) == 0;
                 if (activityIntent != null && notSecure) {
-                    if (forAutoFill) {
-                        addAutoFillCallback = true;
-                    } else {
+                    if (!forAutoFill) {
                         Intent intent = new Intent(activityIntent);
                         intent.setFlags(intent.getFlags() & ~(Intent.FLAG_GRANT_WRITE_URI_PERMISSION
                                 | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION));
@@ -2950,21 +3088,10 @@
                 } else {
                     if (!forAutoFill) {
                         content.setDefaultIntent(new Intent());
-                    } else {
-                        // activityIntent is unlikely to be null, but if it is, we should still
-                        // set the auto-fill callback.
-                        addAutoFillCallback = notSecure;
                     }
                 }
                 if (!forAutoFill) {
                     r.activity.onProvideAssistContent(content);
-                } else if (addAutoFillCallback) {
-                    IAutoFillAppCallback cb = r.activity.getAutoFillCallback();
-                    if (cb != null) {
-                        data.putBinder(AutoFillService.KEY_CALLBACK, cb.asBinder());
-                    } else {
-                        Slog.w(TAG, "handleRequestAssistContextExtras(): callback was GCed");
-                    }
                 }
             }
         }
@@ -5355,6 +5482,9 @@
         View.mDebugViewAttributes =
                 mCoreSettings.getInt(Settings.Global.DEBUG_VIEW_ATTRIBUTES, 0) != 0;
 
+        mWaitForNetworkTimeoutMs = mCoreSettings.getLong(
+                Settings.Global.WAIT_FOR_NETWORK_TIMEOUT_MS);
+
         /**
          * For system applications on userdebug/eng builds, log stack
          * traces of disk and network access to dropbox for analysis.
@@ -5592,6 +5722,24 @@
         } finally {
             StrictMode.setThreadPolicy(savedPolicy);
         }
+
+        // Preload fonts resources
+        try {
+            final ApplicationInfo info =
+                    getPackageManager().getApplicationInfo(
+                            data.appInfo.packageName,
+                            PackageManager.GET_META_DATA /*flags*/,
+                            UserHandle.myUserId());
+            if (info.metaData != null) {
+                final int preloadedFontsResource = info.metaData.getInt(
+                        ApplicationInfo.METADATA_PRELOADED_FONTS, 0);
+                if (preloadedFontsResource != 0) {
+                    data.info.mResources.preloadFonts(preloadedFontsResource);
+                }
+            }
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
     }
 
     /*package*/ final void finishInstrumentation(int resultCode, Bundle results) {
diff --git a/core/java/android/app/ActivityTransitionCoordinator.java b/core/java/android/app/ActivityTransitionCoordinator.java
index 1eaf029..a512350 100644
--- a/core/java/android/app/ActivityTransitionCoordinator.java
+++ b/core/java/android/app/ActivityTransitionCoordinator.java
@@ -24,6 +24,7 @@
 import android.os.Parcelable;
 import android.os.ResultReceiver;
 import android.transition.Transition;
+import android.transition.TransitionListenerAdapter;
 import android.transition.TransitionSet;
 import android.transition.Visibility;
 import android.util.ArrayMap;
@@ -916,7 +917,7 @@
 
     protected void onTransitionsComplete() {}
 
-    protected class ContinueTransitionListener extends Transition.TransitionListenerAdapter {
+    protected class ContinueTransitionListener extends TransitionListenerAdapter {
         @Override
         public void onTransitionStart(Transition transition) {
             mIsStartingTransition = false;
diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java
index 603126b..6dd31a8 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,8 +353,12 @@
             = "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 = {
+    private static final int[] RUNTIME_AND_APPOP_PERMISSIONS_OPS = {
+            // RUNTIME PERMISSIONS
             // Contacts
             OP_READ_CONTACTS,
             OP_WRITE_CONTACTS,
@@ -387,7 +393,13 @@
             // Camera
             OP_CAMERA,
             // Body sensors
-            OP_BODY_SENSORS
+            OP_BODY_SENSORS,
+
+            // APPOP PERMISSIONS
+            OP_ACCESS_NOTIFICATIONS,
+            OP_SYSTEM_ALERT_WINDOW,
+            OP_WRITE_SETTINGS,
+            OP_REQUEST_INSTALL_PACKAGES,
     };
 
     /**
@@ -467,6 +479,7 @@
             OP_READ_PHONE_NUMBER,
             OP_REQUEST_INSTALL_PACKAGES,
             OP_ENTER_PICTURE_IN_PICTURE_ON_HIDE,
+            OP_INSTANT_APP_START_FOREGROUND,
     };
 
     /**
@@ -542,6 +555,7 @@
             OPSTR_READ_PHONE_NUMBER,
             null, // OP_REQUEST_INSTALL_PACKAGES
             null,
+            OPSTR_INSTANT_APP_START_FOREGROUND,
     };
 
     /**
@@ -617,6 +631,7 @@
             "READ_PHONE_NUMBER",
             "REQUEST_INSTALL_PACKAGES",
             "OP_ENTER_PICTURE_IN_PICTURE_ON_HIDE",
+            "INSTANT_APP_START_FOREGROUND",
     };
 
     /**
@@ -692,6 +707,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 +784,7 @@
             null, // READ_PHONE_NUMBER
             null, // REQUEST_INSTALL_PACKAGES
             null, // ENTER_PICTURE_IN_PICTURE_ON_HIDE
+            null, // INSTANT_APP_START_FOREGROUND
     };
 
     /**
@@ -843,6 +860,7 @@
             false, // READ_PHONE_NUMBER
             false, // REQUEST_INSTALL_PACKAGES
             false, // ENTER_PICTURE_IN_PICTURE_ON_HIDE
+            false, // INSTANT_APP_START_FOREGROUND
     };
 
     /**
@@ -915,8 +933,9 @@
             AppOpsManager.MODE_ALLOWED,  // OP_RUN_IN_BACKGROUND
             AppOpsManager.MODE_ALLOWED,  // OP_AUDIO_ACCESSIBILITY_VOLUME
             AppOpsManager.MODE_ALLOWED,
-            AppOpsManager.MODE_DEFAULT, // OP_REQUEST_INSTALL_PACKAGES
+            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 +1014,7 @@
             false,
             false, // OP_REQUEST_INSTALL_PACKAGES
             false, // OP_ENTER_PICTURE_IN_PICTURE_ON_HIDE
+            false,
     };
 
     /**
@@ -1005,7 +1025,7 @@
     /**
      * Mapping from a permission to the corresponding app op.
      */
-    private static HashMap<String, Integer> sRuntimePermToOp = new HashMap<>();
+    private static HashMap<String, Integer> sPermToOp = new HashMap<>();
 
     static {
         if (sOpToSwitch.length != _NUM_OP) {
@@ -1045,9 +1065,9 @@
                 sOpStrToOp.put(sOpToString[i], i);
             }
         }
-        for (int op : RUNTIME_PERMISSIONS_OPS) {
+        for (int op : RUNTIME_AND_APPOP_PERMISSIONS_OPS) {
             if (sOpPerms[op] != null) {
-                sRuntimePermToOp.put(sOpPerms[op], op);
+                sPermToOp.put(sOpPerms[op], op);
             }
         }
     }
@@ -1099,12 +1119,12 @@
 
     /**
      * Retrieve the app op code for a permission, or null if there is not one.
-     * This API is intended to be used for mapping runtime permissions to the
-     * corresponding app op.
+     * This API is intended to be used for mapping runtime or appop permissions
+     * to the corresponding app op.
      * @hide
      */
     public static int permissionToOpCode(String permission) {
-        Integer boxedOpCode = sRuntimePermToOp.get(permission);
+        Integer boxedOpCode = sPermToOp.get(permission);
         return boxedOpCode != null ? boxedOpCode : OP_NONE;
     }
 
@@ -1449,7 +1469,7 @@
      * @return The app op associated with the permission or null.
      */
     public static String permissionToOp(String permission) {
-        final Integer opCode = sRuntimePermToOp.get(permission);
+        final Integer opCode = sPermToOp.get(permission);
         if (opCode == null) {
             return null;
         }
diff --git a/core/java/android/app/Application.java b/core/java/android/app/Application.java
index 03efe68..156df36 100644
--- a/core/java/android/app/Application.java
+++ b/core/java/android/app/Application.java
@@ -55,7 +55,6 @@
     public LoadedApk mLoadedApk;
 
     public interface ActivityLifecycleCallbacks {
-        default void onActivityPreCreated(Activity activity, Bundle savedInstanceState) {}
         void onActivityCreated(Activity activity, Bundle savedInstanceState);
         void onActivityStarted(Activity activity);
         void onActivityResumed(Activity activity);
@@ -191,16 +190,6 @@
         mLoadedApk = ContextImpl.getImpl(context).mPackageInfo;
     }
 
-    /* package */ void dispatchActivityPreCreated(Activity activity, Bundle savedInstanceState) {
-        Object[] callbacks = collectActivityLifecycleCallbacks();
-        if (callbacks != null) {
-            for (int i = 0; i < callbacks.length; i++) {
-                ((ActivityLifecycleCallbacks) callbacks[i]).onActivityPreCreated(activity,
-                        savedInstanceState);
-            }
-        }
-    }
-
     /* package */ void dispatchActivityCreated(Activity activity, Bundle savedInstanceState) {
         Object[] callbacks = collectActivityLifecycleCallbacks();
         if (callbacks != null) {
diff --git a/core/java/android/app/ApplicationPackageManager.java b/core/java/android/app/ApplicationPackageManager.java
index 0c6c4ba..333e412 100644
--- a/core/java/android/app/ApplicationPackageManager.java
+++ b/core/java/android/app/ApplicationPackageManager.java
@@ -29,6 +29,7 @@
 import android.content.IntentSender;
 import android.content.pm.ActivityInfo;
 import android.content.pm.ApplicationInfo;
+import android.content.pm.ChangedPackages;
 import android.content.pm.ComponentInfo;
 import android.content.pm.InstantAppInfo;
 import android.content.pm.FeatureInfo;
@@ -506,6 +507,15 @@
     }
 
     @Override
+    public ChangedPackages getChangedPackages(int sequenceNumber) {
+        try {
+            return mPM.getChangedPackages(sequenceNumber, mContext.getUserId());
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    @Override
     @SuppressWarnings("unchecked")
     public FeatureInfo[] getSystemAvailableFeatures() {
         try {
diff --git a/core/java/android/app/BackStackRecord.java b/core/java/android/app/BackStackRecord.java
index 66b2355..c88448a 100644
--- a/core/java/android/app/BackStackRecord.java
+++ b/core/java/android/app/BackStackRecord.java
@@ -813,8 +813,11 @@
     /**
      * Reverses the execution of the operations within this transaction. The Fragment states will
      * only be modified if optimizations are not allowed.
+     *
+     * @param moveToState {@code true} if added fragments should be moved to their final state
+     *                    in unoptimized transactions
      */
-    void executePopOps() {
+    void executePopOps(boolean moveToState) {
         for (int opNum = mOps.size() - 1; opNum >= 0; opNum--) {
             final Op op = mOps.get(opNum);
             Fragment f = op.fragment;
@@ -860,7 +863,7 @@
                 mManager.moveFragmentToExpectedState(f);
             }
         }
-        if (!mAllowOptimization) {
+        if (!mAllowOptimization && moveToState) {
             mManager.moveToState(mManager.mCurState, true);
         }
     }
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index 9db2b92..16989c0 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -1896,7 +1896,7 @@
                 pi.getResDir(),
                 pi.getSplitResDirs(),
                 pi.getOverlayDirs(),
-                pi.getSharedLibraries(),
+                pi.getApplicationInfo().sharedLibraryFiles,
                 displayId,
                 overrideConfig,
                 compatInfo,
@@ -2180,7 +2180,7 @@
                 packageInfo.getResDir(),
                 splitDirs,
                 packageInfo.getOverlayDirs(),
-                packageInfo.getSharedLibraries(),
+                packageInfo.getApplicationInfo().sharedLibraryFiles,
                 displayId,
                 overrideConfiguration,
                 compatInfo,
diff --git a/core/java/android/app/EnterTransitionCoordinator.java b/core/java/android/app/EnterTransitionCoordinator.java
index 0454acb..445b687 100644
--- a/core/java/android/app/EnterTransitionCoordinator.java
+++ b/core/java/android/app/EnterTransitionCoordinator.java
@@ -26,6 +26,7 @@
 import android.os.ResultReceiver;
 import android.text.TextUtils;
 import android.transition.Transition;
+import android.transition.TransitionListenerAdapter;
 import android.transition.TransitionManager;
 import android.util.ArrayMap;
 import android.view.View;
@@ -491,7 +492,7 @@
                 sharedElementTransitionStarted();
                 sharedElementTransitionComplete();
             } else {
-                sharedElementTransition.addListener(new Transition.TransitionListenerAdapter() {
+                sharedElementTransition.addListener(new TransitionListenerAdapter() {
                     @Override
                     public void onTransitionStart(Transition transition) {
                         sharedElementTransitionStarted();
@@ -592,7 +593,7 @@
                 });
                 mBackgroundAnimator.start();
             } else if (transition != null) {
-                transition.addListener(new Transition.TransitionListenerAdapter() {
+                transition.addListener(new TransitionListenerAdapter() {
                     @Override
                     public void onTransitionEnd(Transition transition) {
                         transition.removeListener(this);
diff --git a/core/java/android/app/ExitTransitionCoordinator.java b/core/java/android/app/ExitTransitionCoordinator.java
index f04eef2..29e10d8 100644
--- a/core/java/android/app/ExitTransitionCoordinator.java
+++ b/core/java/android/app/ExitTransitionCoordinator.java
@@ -31,6 +31,7 @@
 import android.os.Message;
 import android.os.ResultReceiver;
 import android.transition.Transition;
+import android.transition.TransitionListenerAdapter;
 import android.transition.TransitionManager;
 import android.view.View;
 import android.view.ViewGroup;
@@ -161,7 +162,7 @@
 
     private void startSharedElementExit(final ViewGroup decorView) {
         Transition transition = getSharedElementExitTransition();
-        transition.addListener(new Transition.TransitionListenerAdapter() {
+        transition.addListener(new TransitionListenerAdapter() {
             @Override
             public void onTransitionEnd(Transition transition) {
                 transition.removeListener(this);
diff --git a/core/java/android/app/FragmentManager.java b/core/java/android/app/FragmentManager.java
index 4f68ec7..d32cf3c 100644
--- a/core/java/android/app/FragmentManager.java
+++ b/core/java/android/app/FragmentManager.java
@@ -2077,8 +2077,6 @@
             } else {
                 record.trackAddedFragmentsInPop(mTmpAddedFragments);
             }
-            final int bumpAmount = isPop ? -1 : 1;
-            record.bumpBackStackNesting(bumpAmount);
             addToBackStack = addToBackStack || record.mAddToBackStack;
         }
         mTmpAddedFragments.clear();
@@ -2172,7 +2170,7 @@
                 if (isPop) {
                     record.executeOps();
                 } else {
-                    record.executePopOps();
+                    record.executePopOps(false);
                 }
 
                 // move to the end
@@ -2281,8 +2279,13 @@
             final BackStackRecord record = records.get(i);
             final boolean isPop = isRecordPop.get(i);
             if (isPop) {
-                record.executePopOps();
+                record.bumpBackStackNesting(-1);
+                // Only execute the add operations at the end of
+                // all transactions.
+                boolean moveToState = i == (endIndex - 1);
+                record.executePopOps(moveToState);
             } else {
+                record.bumpBackStackNesting(1);
                 record.executeOps();
             }
         }
diff --git a/core/java/android/app/FragmentTransition.java b/core/java/android/app/FragmentTransition.java
index 2570d92..f62ab8d 100644
--- a/core/java/android/app/FragmentTransition.java
+++ b/core/java/android/app/FragmentTransition.java
@@ -18,6 +18,7 @@
 import android.graphics.Rect;
 import android.os.Build;
 import android.transition.Transition;
+import android.transition.TransitionListenerAdapter;
 import android.transition.TransitionManager;
 import android.transition.TransitionSet;
 import android.util.ArrayMap;
@@ -332,7 +333,7 @@
             OneShotPreDrawListener.add(exitingFragment.mContainer, () -> {
                 setViewVisibility(exitingViews, View.INVISIBLE);
             });
-            exitTransition.addListener(new Transition.TransitionListenerAdapter() {
+            exitTransition.addListener(new TransitionListenerAdapter() {
                 @Override
                 public void onTransitionEnd(Transition transition) {
                     transition.removeListener(this);
@@ -995,7 +996,7 @@
             final Transition enterTransition, final ArrayList<View> enteringViews,
             final Transition exitTransition, final ArrayList<View> exitingViews,
             final TransitionSet sharedElementTransition, final ArrayList<View> sharedElementsIn) {
-        overalTransition.addListener(new Transition.TransitionListenerAdapter() {
+        overalTransition.addListener(new TransitionListenerAdapter() {
             @Override
             public void onTransitionStart(Transition transition) {
                 if (enterTransition != null) {
diff --git a/core/java/android/app/IActivityManager.aidl b/core/java/android/app/IActivityManager.aidl
index 3cc6282..6717491 100644
--- a/core/java/android/app/IActivityManager.aidl
+++ b/core/java/android/app/IActivityManager.aidl
@@ -145,6 +145,7 @@
             int flags, in Bundle arguments, in IInstrumentationWatcher watcher,
             in IUiAutomationConnection connection, int userId,
             in String abiOverride);
+    void addInstrumentationResults(in IApplicationThread target, in Bundle results);
     void finishInstrumentation(in IApplicationThread target, int resultCode,
             in Bundle results);
     /**
@@ -198,7 +199,7 @@
     int getRequestedOrientation(in IBinder token);
     void unbindFinished(in IBinder token, in Intent service, boolean doRebind);
     void setProcessForeground(in IBinder token, int pid, boolean isForeground);
-    void setServiceForeground(in ComponentName className, in IBinder token,
+    long setServiceForeground(in ComponentName className, in IBinder token,
             int id, in Notification notification, int flags);
     boolean moveActivityTaskToBack(in IBinder token, boolean nonRoot);
     void getMemoryInfo(out ActivityManager.MemoryInfo outInfo);
@@ -209,6 +210,7 @@
     boolean killPids(in int[] pids, in String reason, boolean secure);
     List<ActivityManager.RunningServiceInfo> getServices(int maxNum, int flags);
     ActivityManager.TaskThumbnail getTaskThumbnail(int taskId);
+    ActivityManager.TaskDescription getTaskDescription(int taskId);
     // Retrieve running application processes in the system
     List<ActivityManager.RunningAppProcessInfo> getRunningAppProcesses();
     // Get device configuration
@@ -388,6 +390,8 @@
             in Intent intent, in String resolvedType, in IVoiceInteractionSession session,
             in IVoiceInteractor interactor, int flags, in ProfilerInfo profilerInfo,
             in Bundle options, int userId);
+    int startAssistantActivity(in String callingPackage, int callingPid, int callingUid,
+            in Intent intent, in String resolvedType, in Bundle options, int userId);
     Bundle getActivityOptions(in IBinder token);
     List<IBinder> getAppTasks(in String callingPackage);
     void startSystemLockTaskMode(int taskId);
@@ -584,7 +588,7 @@
     void unregisterTaskStackListener(ITaskStackListener listener);
     void moveStackToDisplay(int stackId, int displayId);
     boolean requestAutoFillData(in IResultReceiver receiver, in Bundle receiverExtras,
-            int resultCode, in IBinder activityToken);
+                                in IBinder activityToken);
     void dismissKeyguard(in IBinder token, in IKeyguardDismissCallback callback);
     int restartUserInBackground(int userId);
 
@@ -600,6 +604,16 @@
     ActivityManager.TaskSnapshot getTaskSnapshot(int taskId);
 
     void scheduleApplicationInfoChanged(in List<String> packageNames, int userId);
+     /**
+      * Registers a listener for network rules state. When the network policy rules in
+      * NetworkPolicyManagerService are updated, ActivityManagerService will notify these
+      * registered listeners.
+      *
+      * @param procStateSeq The sequence number for which the listener is interested in knowing
+      *                     the network policy rules state.
+      * @return true if the listener is registered, false otherwise.
+      */
+    boolean registerNetworkRulesUpdateListener(IApplicationThread listener, long procStateSeq);
 
     // WARNING: when these transactions are updated, check if they are any callers on the native
     // side. If so, make sure they are using the correct transaction ids and arguments.
diff --git a/core/java/android/app/IApplicationThread.aidl b/core/java/android/app/IApplicationThread.aidl
index 4fc6fb9..7378e2b 100644
--- a/core/java/android/app/IApplicationThread.aidl
+++ b/core/java/android/app/IApplicationThread.aidl
@@ -153,4 +153,6 @@
     void handleTrustStorageUpdate();
     void attachAgent(String path);
     void scheduleApplicationInfoChanged(in ApplicationInfo ai);
+    void setBlockForNetworkState(int blockState, long procStateSeq);
+    void notifyNetworkStateUpdated(long procStateSeq);
 }
diff --git a/core/java/android/app/IBackupAgent.aidl b/core/java/android/app/IBackupAgent.aidl
index eda9603..a07374b 100644
--- a/core/java/android/app/IBackupAgent.aidl
+++ b/core/java/android/app/IBackupAgent.aidl
@@ -41,6 +41,8 @@
      * @param newState Read-write file, empty when onBackup() is called,
      *        where the new state blob is to be recorded.
      *
+     * @param quota Quota reported by the transport for this backup operation (in bytes).
+     *
      * @param token Opaque token identifying this transaction.  This must
      *        be echoed back to the backup service binder once the new
      *        data has been written to the data and newState files.
@@ -51,7 +53,7 @@
     void doBackup(in ParcelFileDescriptor oldState,
             in ParcelFileDescriptor data,
             in ParcelFileDescriptor newState,
-            int token, IBackupManager callbackBinder);
+            long quotaBytes, int token, IBackupManager callbackBinder);
 
     /**
      * Restore an entire data snapshot to the application.
@@ -89,6 +91,8 @@
      *        The data must be formatted correctly for the resulting archive to be
      *        legitimate, so that will be tightly controlled by the available API.
      *
+     * @param quota Quota reported by the transport for this backup operation (in bytes).
+     *
      * @param token Opaque token identifying this transaction.  This must
      *        be echoed back to the backup service binder once the agent is
      *        finished restoring the application based on the restore data
@@ -97,12 +101,12 @@
      * @param callbackBinder Binder on which to indicate operation completion,
      *        passed here as a convenience to the agent.
      */
-    void doFullBackup(in ParcelFileDescriptor data, int token, IBackupManager callbackBinder);
+    void doFullBackup(in ParcelFileDescriptor data, long quotaBytes, int token, IBackupManager callbackBinder);
 
     /**
      * Estimate how much data a full backup will deliver
      */
-    void doMeasureFullBackup(int token, IBackupManager callbackBinder);
+    void doMeasureFullBackup(long quotaBytes, int token, IBackupManager callbackBinder);
 
     /**
      * Tells the application agent that the backup data size exceeded current transport quota.
diff --git a/core/java/android/app/INotificationManager.aidl b/core/java/android/app/INotificationManager.aidl
index 58cd310..5ab767b 100644
--- a/core/java/android/app/INotificationManager.aidl
+++ b/core/java/android/app/INotificationManager.aidl
@@ -20,6 +20,7 @@
 import android.app.ITransientNotification;
 import android.app.Notification;
 import android.app.NotificationChannel;
+import android.app.NotificationChannelGroup;
 import android.app.NotificationManager;
 import android.content.ComponentName;
 import android.content.Intent;
@@ -40,7 +41,7 @@
 {
     void cancelAllNotifications(String pkg, int userId);
 
-    void clearData(String pkg, int uid);
+    void clearData(String pkg, int uid, boolean fromApp);
     void enqueueToast(String pkg, ITransientNotification callback, int duration);
     void cancelToast(String pkg, ITransientNotification callback);
     void enqueueNotificationWithTag(String pkg, String opPkg, String tag, int id,
@@ -57,12 +58,14 @@
     void createNotificationChannelGroups(String pkg, in ParceledListSlice channelGroupList);
     void createNotificationChannels(String pkg, in ParceledListSlice channelsList);
     ParceledListSlice getNotificationChannelGroupsForPackage(String pkg, int uid, boolean includeDeleted);
+    NotificationChannelGroup getNotificationChannelGroupForPackage(String groupId, String pkg, int uid);
     void updateNotificationChannelForPackage(String pkg, int uid, in NotificationChannel channel);
     NotificationChannel getNotificationChannel(String pkg, String channelId);
     NotificationChannel getNotificationChannelForPackage(String pkg, int uid, String channelId, boolean includeDeleted);
     void deleteNotificationChannel(String pkg, String channelId);
     ParceledListSlice getNotificationChannels(String pkg);
     ParceledListSlice getNotificationChannelsForPackage(String pkg, int uid, boolean includeDeleted);
+    int getNumNotificationChannelsForPackage(String pkg, int uid, boolean includeDeleted);
 
     // TODO: Remove this when callers have been migrated to the equivalent
     // INotificationListener method.
diff --git a/core/java/android/app/Instrumentation.java b/core/java/android/app/Instrumentation.java
index b1bdea1..4db29fb 100644
--- a/core/java/android/app/Instrumentation.java
+++ b/core/java/android/app/Instrumentation.java
@@ -186,11 +186,25 @@
             }
         }
     }
-    
+
+    /**
+     * Report some results in the middle of instrumentation execution.  Later results (including
+     * those provided by {@link #finish}) will be combined with {@link Bundle#putAll}.
+     */
+    public void addResults(Bundle results) {
+        IActivityManager am = ActivityManager.getService();
+        try {
+            am.addInstrumentationResults(mThread.getApplicationThread(), results);
+        } catch (RemoteException ex) {
+            throw ex.rethrowFromSystemServer();
+        }
+    }
+
     /**
      * Terminate instrumentation of the application.  This will cause the
      * application process to exit, removing this instrumentation from the next
-     * time the application is started. 
+     * time the application is started.  If multiple processes are currently running
+     * for this instrumentation, all of those processes will be killed.
      *  
      * @param resultCode Overall success/failure of instrumentation. 
      * @param results Any results to send back to the code that started the 
@@ -278,6 +292,18 @@
     }
 
     /**
+     * Return the name of the process this instrumentation is running in.  Note this should
+     * only be used for testing and debugging.  If you are thinking about using this to,
+     * for example, conditionalize what is initialized in an Application class, it is strongly
+     * recommended to instead use lazy initialization (such as a getter for the state that
+     * only creates it when requested).  This can greatly reduce the work your process does
+     * when created for secondary things, such as to receive a broadcast.
+     */
+    public String getProcessName() {
+        return mThread.getProcessName();
+    }
+
+    /**
      * Check whether this instrumentation was started with profiling enabled.
      * 
      * @return Returns true if profiling was enabled when starting, else false.
diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java
index 17f5edd..7ed96af 100644
--- a/core/java/android/app/LoadedApk.java
+++ b/core/java/android/app/LoadedApk.java
@@ -311,7 +311,7 @@
                 }
 
                 mResources = ResourcesManager.getInstance().getResources(null, mResDir,
-                        splitPaths, mOverlayDirs, mSharedLibraries,
+                        splitPaths, mOverlayDirs, mApplicationInfo.sharedLibraryFiles,
                         Display.DEFAULT_DISPLAY, null, getCompatibilityInfo(),
                         getClassLoader());
             }
@@ -923,10 +923,6 @@
         return mOverlayDirs;
     }
 
-    public String[] getSharedLibraries() {
-        return mSharedLibraries;
-    }
-
     public String getDataDir() {
         return mDataDir;
     }
@@ -958,7 +954,7 @@
             }
 
             mResources = ResourcesManager.getInstance().getResources(null, mResDir,
-                    splitPaths, mOverlayDirs, mSharedLibraries,
+                    splitPaths, mOverlayDirs, mApplicationInfo.sharedLibraryFiles,
                     Display.DEFAULT_DISPLAY, null, getCompatibilityInfo(),
                     getClassLoader());
         }
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index b7eda25..812daf8 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -28,6 +28,7 @@
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageManager;
 import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.pm.ShortcutInfo;
 import android.content.res.ColorStateList;
 import android.graphics.Bitmap;
 import android.graphics.Canvas;
@@ -109,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;
@@ -222,13 +230,11 @@
      * superimposed over the icon in the status bar. Starting with
      * {@link android.os.Build.VERSION_CODES#HONEYCOMB}, the template used by
      * {@link Notification.Builder} has displayed the number in the expanded notification view.
+     * Starting with {@link android.os.Build.VERSION_CODES#O}, the number may be displayed as a
+     * badge icon in Launchers that support badging.
      *
-     * If the number is 0 or negative, it is never shown.
-     *
-     * @deprecated this number is not shown anymore
      */
-    @Deprecated
-    public int number;
+    public int number = 1;
 
     /**
      * The intent to execute when the expanded status entry is clicked.  If
@@ -633,9 +639,10 @@
 
     /**
      * Special value of {@link #color} used as a place holder for an invalid color.
+     * @hide
      */
     @ColorInt
-    private static final int COLOR_INVALID = 1;
+    public static final int COLOR_INVALID = 1;
 
     /**
      * Sphere of visibility of this notification, which affects how and when the SystemUI reveals
@@ -1073,6 +1080,26 @@
     private String mChannelId;
     private long mTimeout;
 
+    private String mShortcutId;
+
+    /**
+     * If this notification is being shown as a badge, always show as a number.
+     */
+    public static final int BADGE_ICON_NONE = 0;
+
+    /**
+     * If this notification is being shown as a badge, use the {@link #getSmallIcon()} to
+     * represent this notification.
+     */
+    public static final int BADGE_ICON_SMALL = 1;
+
+    /**
+     * If this notification is being shown as a badge, use the {@link #getLargeIcon()} to
+     * represent this notification.
+     */
+    public static final int BADGE_ICON_LARGE = 2;
+    private int mBadgeIcon = BADGE_ICON_LARGE;
+
     /**
      * Structure to encapsulate a named action that can be shown as part of this notification.
      * It must include an icon, a label, and a {@link PendingIntent} to be fired when the action is
@@ -1817,6 +1844,12 @@
             mChannelId = parcel.readString();
         }
         mTimeout = parcel.readLong();
+
+        if (parcel.readInt() != 0) {
+            mShortcutId = parcel.readString();
+        }
+
+        mBadgeIcon = parcel.readInt();
     }
 
     @Override
@@ -2041,7 +2074,7 @@
         }
         try {
             // IMPORTANT: Add marshaling code in writeToParcelImpl as we
-            // want to intercept all pending events written to the pacel.
+            // want to intercept all pending events written to the parcel.
             writeToParcelImpl(parcel, flags);
             // Must be written last!
             parcel.writeArraySet(allPendingIntents);
@@ -2184,6 +2217,15 @@
             parcel.writeInt(0);
         }
         parcel.writeLong(mTimeout);
+
+        if (mShortcutId != null) {
+            parcel.writeInt(1);
+            parcel.writeString(mShortcutId);
+        } else {
+            parcel.writeInt(0);
+        }
+
+        parcel.writeInt(mBadgeIcon);
     }
 
     /**
@@ -2381,13 +2423,30 @@
     }
 
     /**
-     * Returns the time at which this notification should be canceled, if it's not canceled already.
+     * Returns the time at which this notification should be canceled by the system, if it's not
+     * canceled already.
      */
     public long getTimeout() {
         return mTimeout;
     }
 
     /**
+     * Returns what icon should be shown for this notification if it is being displayed in a
+     * Launcher that supports badging. Will be one of {@link #BADGE_ICON_NONE},
+     * {@link #BADGE_ICON_SMALL}, or {@link #BADGE_ICON_LARGE}.
+     */
+    public int getBadgeIcon() {
+        return mBadgeIcon;
+    }
+
+    /**
+     * Returns the {@link ShortcutInfo#getId() id} that this notification supersedes, if any.
+     */
+    public String getShortcutId() {
+        return mShortcutId;
+    }
+
+    /**
      * The small icon representing this notification in the status bar and content view.
      *
      * @return the small icon representing this notification.
@@ -2482,7 +2541,6 @@
         private NotificationColorUtil mColorUtil;
         private boolean mIsLegacy;
         private boolean mIsLegacyInitialized;
-        private boolean mColorUtilInited = false;
 
         /**
          * Caches a contrast-enhanced version of {@link #mCachedContrastColorIsFor}.
@@ -2600,16 +2658,42 @@
         }
 
         private NotificationColorUtil getColorUtil() {
-            if (!mColorUtilInited) {
-                mColorUtilInited = true;
-                if (isLegacy() || isColorized()) {
-                    mColorUtil = NotificationColorUtil.getInstance(mContext);
-                }
+            if (mColorUtil == null) {
+                mColorUtil = NotificationColorUtil.getInstance(mContext);
             }
             return mColorUtil;
         }
 
         /**
+         * If this notification is duplicative of a Launcher shortcut, sets the
+         * {@link ShortcutInfo#getId() id} of the shortcut, in case the Launcher wants to hide
+         * the shortcut.
+         *
+         * This field will be ignored by Launchers that don't support badging or
+         * {@link android.content.pm.ShortcutManager shortcuts}.
+         *
+         * @param shortcutId the {@link ShortcutInfo#getId() id} of the shortcut this notification
+         *                   supersedes
+         */
+        public Builder setShortcutId(String shortcutId) {
+            mN.mShortcutId = shortcutId;
+            return this;
+        }
+
+        /**
+         * Sets which icon to display as a badge for this notification.
+         *
+         * Must be one of {@link #BADGE_ICON_NONE}, {@link #BADGE_ICON_SMALL},
+         * {@link #BADGE_ICON_LARGE}.
+         *
+         * Note: This value might be ignored, for launchers that don't support badge icons.
+         */
+        public Builder chooseBadgeIcon(int icon) {
+            mN.mBadgeIcon = icon;
+            return this;
+        }
+
+        /**
          * Specifies the channel the notification should be delivered on.
          */
         public Builder setChannel(String channelId) {
@@ -2804,13 +2888,9 @@
         }
 
         /**
-         * Set the large number at the right-hand side of the notification.  This is
-         * equivalent to setContentInfo, although it might show the number in a different
-         * font size for readability.
-         *
-         * @deprecated this number is not shown anywhere anymore
+         * Sets the number of items this notification represents. May be displayed as a badge count
+         * for Launchers that support badging.
          */
-        @Deprecated
         public Builder setNumber(int number) {
             mN.number = number;
             return this;
@@ -3054,7 +3134,7 @@
 
          * Not all devices will honor all (or even any) of these values.
          *
-         * @deprecated use {@link NotificationChannel#setLights(boolean)} instead.
+         * @deprecated use {@link NotificationChannel#enableLights(boolean)} instead.
          * @see Notification#ledARGB
          * @see Notification#ledOnMS
          * @see Notification#ledOffMS
@@ -3095,12 +3175,16 @@
          * Set whether this notification should be colorized. When set, the color set with
          * {@link #setColor(int)} will be used as the background color of this notification.
          * <p>
-         * The coloring will only be applied if the notification is ongoing.
          * This should only be used for high priority ongoing tasks like navigation, an ongoing
          * call, or other similarly high-priority events for the user.
+         * <p>
+         * For most styles, the coloring will only be applied if the notification is ongoing.
+         * However, for {@link MediaStyle} and {@link DecoratedMediaCustomViewStyle} notifications
+         * that have a media session attached there is no requirement for it to be ongoing.
          *
          * @see Builder#setOngoing(boolean)
          * @see Builder#setColor(int)
+         * @see MediaStyle#setMediaSession(MediaSession.Token)
          */
         public Builder setColorized(boolean colorize) {
             mN.extras.putBoolean(EXTRA_COLORIZED, colorize);
@@ -3149,7 +3233,7 @@
          * For all default values, use {@link #DEFAULT_ALL}.
          *
          * @deprecated use {@link NotificationChannel#enableVibration(boolean)} and
-         * {@link NotificationChannel#setLights(boolean)} and
+         * {@link NotificationChannel#enableLights(boolean)} and
          * {@link NotificationChannel#setSound(Uri, AudioAttributes)} instead.
          */
         @Deprecated
@@ -3600,7 +3684,8 @@
                         mContext, backgroundColor);
                 mSecondaryTextColor = NotificationColorUtil.resolveSecondaryColor(
                         mContext, backgroundColor);
-                mActionBarColor = NotificationColorUtil.resolveActionBarColor(backgroundColor);
+                mActionBarColor = NotificationColorUtil.resolveActionBarColor(mContext,
+                        backgroundColor);
             }
         }
 
@@ -3681,13 +3766,21 @@
         }
 
         private void bindExpandButton(RemoteViews contentView) {
-            int color = isColorized() ? getPrimaryTextColor() : resolveContrastColor();
+            int color = getPrimaryHighlightColor();
             contentView.setDrawableParameters(R.id.expand_button, false, -1, color,
                     PorterDuff.Mode.SRC_ATOP, -1);
             contentView.setInt(R.id.notification_header, "setOriginalNotificationColor",
                     color);
         }
 
+        /**
+         * @return the color that is used as the first primary highlight color. This is applied
+         * in several places like the action buttons or the app name in the header.
+         */
+        private int getPrimaryHighlightColor() {
+            return isColorized() ? getPrimaryTextColor() : resolveContrastColor();
+        }
+
         private void bindHeaderChronometerAndTime(RemoteViews contentView) {
             if (showsTimeOrChronometer()) {
                 contentView.setViewVisibility(R.id.time_divider, View.VISIBLE);
@@ -3903,10 +3996,24 @@
          *   3. Standard template view
          */
         public RemoteViews createContentView() {
+            return createContentView(false /* increasedheight */ );
+        }
+
+        /**
+         * Construct a RemoteViews for the smaller content view.
+         *
+         *   @param increasedHeight true if this layout be created with an increased height. Some
+         *   styles may support showing more then just that basic 1U size
+         *   and the system may decide to render important notifications
+         *   slightly bigger even when collapsed.
+         *
+         *   @hide
+         */
+        public RemoteViews createContentView(boolean increasedHeight) {
             if (mN.contentView != null && (mStyle == null || !mStyle.displayCustomViewInline())) {
                 return mN.contentView;
             } else if (mStyle != null) {
-                final RemoteViews styleView = mStyle.makeContentView();
+                final RemoteViews styleView = mStyle.makeContentView(increasedHeight);
                 if (styleView != null) {
                     return styleView;
                 }
@@ -3976,16 +4083,23 @@
 
         /**
          * Construct a RemoteViews for the final heads-up notification layout.
+         *
+         * @param increasedHeight true if this layout be created with an increased height. Some
+         * styles may support showing more then just that basic 1U size
+         * and the system may decide to render important notifications
+         * slightly bigger even when collapsed.
+         *
+         * @hide
          */
-        public RemoteViews createHeadsUpContentView() {
+        public RemoteViews createHeadsUpContentView(boolean increasedHeight) {
             if (mN.headsUpContentView != null
                     && (mStyle == null ||  !mStyle.displayCustomViewInline())) {
                 return mN.headsUpContentView;
             } else if (mStyle != null) {
-                    final RemoteViews styleView = mStyle.makeHeadsUpContentView();
-                    if (styleView != null) {
-                        return styleView;
-                    }
+                final RemoteViews styleView = mStyle.makeHeadsUpContentView(increasedHeight);
+                if (styleView != null) {
+                    return styleView;
+                }
             } else if (mActions.size() == 0) {
                 return null;
             }
@@ -3994,6 +4108,13 @@
         }
 
         /**
+         * Construct a RemoteViews for the final heads-up notification layout.
+         */
+        public RemoteViews createHeadsUpContentView() {
+            return createHeadsUpContentView(false /* useIncreasedHeight */);
+        }
+
+        /**
          * Construct a RemoteViews for the display in public contexts like on the lockscreen.
          *
          * @hide
@@ -4046,12 +4167,21 @@
                     mN.extras.putCharSequence(EXTRA_SUB_TEXT, newSummary);
                 }
             }
+            Boolean colorized = (Boolean) mN.extras.get(EXTRA_COLORIZED);
+            mN.extras.putBoolean(EXTRA_COLORIZED, false);
+
             RemoteViews header = makeNotificationHeader();
+
             if (summary != null) {
                 mN.extras.putCharSequence(EXTRA_SUB_TEXT, summary);
             } else {
                 mN.extras.remove(EXTRA_SUB_TEXT);
             }
+            if (colorized != null) {
+                mN.extras.putBoolean(EXTRA_COLORIZED, colorized);
+            } else {
+                mN.extras.remove(EXTRA_COLORIZED);
+            }
             mN.color = color;
             return header;
         }
@@ -4250,7 +4380,7 @@
         }
 
         private CharSequence processLegacyText(CharSequence charSequence) {
-            if (isLegacy() || isColorized()) {
+            if (isLegacy() || textColorsNeedInversion()) {
                 return getColorUtil().invertCharSequenceColors(charSequence);
             } else {
                 return charSequence;
@@ -4263,7 +4393,7 @@
         private void processSmallIconColor(Icon smallIcon, RemoteViews contentView,
                 boolean ambient) {
             boolean colorable = !isLegacy() || getColorUtil().isGrayscaleIcon(mContext, smallIcon);
-            int color = ambient ? resolveAmbientColor() : resolveContrastColor();
+            int color = ambient ? resolveAmbientColor() : getPrimaryHighlightColor();
             if (colorable) {
                 contentView.setDrawableParameters(R.id.icon, false, -1, color,
                         PorterDuff.Mode.SRC_ATOP, -1);
@@ -4524,6 +4654,15 @@
         private boolean isColorized() {
             return mN.isColorized();
         }
+
+        private boolean textColorsNeedInversion() {
+            if (mStyle == null || !MediaStyle.class.equals(mStyle.getClass())) {
+                return false;
+            }
+            int targetSdkVersion = mContext.getApplicationInfo().targetSdkVersion;
+            return targetSdkVersion > Build.VERSION_CODES.M
+                    && targetSdkVersion < Build.VERSION_CODES.O;
+        }
     }
 
     /**
@@ -4536,12 +4675,44 @@
     }
 
     /**
-     * @return true if this notification is colorized. This also factors in wheather the
+     * @return whether this notification has a media session attached
+     * @hide
+     */
+    public boolean hasMediaSession() {
+        return extras.getParcelable(Notification.EXTRA_MEDIA_SESSION) != null;
+    }
+
+    /**
+     * @return the style class of this notification
+     * @hide
+     */
+    public Class<? extends Notification.Style> getNotificationStyle() {
+        String templateClass = extras.getString(Notification.EXTRA_TEMPLATE);
+
+        if (!TextUtils.isEmpty(templateClass)) {
+            return Notification.getNotificationStyleClass(templateClass);
+        }
+        return null;
+    }
+
+    /**
+     * @return true if this notification is colorized. This also factors in whether the
      * notification is ongoing.
      *
      * @hide
      */
     public boolean isColorized() {
+        Class<? extends Style> style = getNotificationStyle();
+        if (MediaStyle.class.equals(style)) {
+            Boolean colorized = (Boolean) extras.get(EXTRA_COLORIZED);
+            if ((colorized == null || colorized) && hasMediaSession()) {
+                return true;
+            }
+        } else if (DecoratedMediaCustomViewStyle.class.equals(style)) {
+            if (extras.getBoolean(EXTRA_COLORIZED) && hasMediaSession()) {
+                return true;
+            }
+        }
         return extras.getBoolean(EXTRA_COLORIZED) && isOngoing();
     }
 
@@ -4656,11 +4827,13 @@
         }
 
         /**
-         * Construct a Style-specific RemoteViews for the final 1U notification layout.
+         * Construct a Style-specific RemoteViews for the collapsed notification layout.
          * The default implementation has nothing additional to add.
+         *
+         * @param increasedHeight true if this layout be created with an increased height.
          * @hide
          */
-        public RemoteViews makeContentView() {
+        public RemoteViews makeContentView(boolean increasedHeight) {
             return null;
         }
 
@@ -4674,9 +4847,11 @@
 
         /**
          * Construct a Style-specific RemoteViews for the final HUN layout.
+         *
+         * @param increasedHeight true if this layout be created with an increased height.
          * @hide
          */
-        public RemoteViews makeHeadsUpContentView() {
+        public RemoteViews makeHeadsUpContentView(boolean increasedHeight) {
             return null;
         }
 
@@ -4944,9 +5119,6 @@
      */
     public static class BigTextStyle extends Style {
 
-        private static final int MAX_LINES = 13;
-        private static final int LINES_CONSUMED_BY_ACTIONS = 4;
-
         private CharSequence mBigText;
 
         public BigTextStyle() {
@@ -5006,6 +5178,34 @@
         }
 
         /**
+         * @param increasedHeight true if this layout be created with an increased height.
+         *
+         * @hide
+         */
+        @Override
+        public RemoteViews makeContentView(boolean increasedHeight) {
+            if (increasedHeight) {
+                ArrayList<Action> actions = mBuilder.mActions;
+                mBuilder.mActions = new ArrayList<>();
+                RemoteViews remoteViews = makeBigContentView();
+                mBuilder.mActions = actions;
+                return remoteViews;
+            }
+            return super.makeContentView(increasedHeight);
+        }
+
+        /**
+         * @hide
+         */
+        @Override
+        public RemoteViews makeHeadsUpContentView(boolean increasedHeight) {
+            if (increasedHeight && mBuilder.mActions.size() > 0) {
+                return makeBigContentView();
+            }
+            return super.makeHeadsUpContentView(increasedHeight);
+        }
+
+        /**
          * @hide
          */
         public RemoteViews makeBigContentView() {
@@ -5035,18 +5235,8 @@
             builder.setTextViewColorSecondary(contentView, R.id.big_text);
             contentView.setViewVisibility(R.id.big_text,
                     TextUtils.isEmpty(bigTextText) ? View.GONE : View.VISIBLE);
-            contentView.setInt(R.id.big_text, "setMaxLines", calculateMaxLines(builder));
             contentView.setBoolean(R.id.big_text, "setHasImage", builder.mN.hasLargeIcon());
         }
-
-        private static int calculateMaxLines(Builder builder) {
-            int lineCount = MAX_LINES;
-            boolean hasActions = builder.mActions.size() > 0;
-            if (hasActions) {
-                lineCount -= LINES_CONSUMED_BY_ACTIONS;
-            }
-            return lineCount;
-        }
     }
 
     /**
@@ -5269,17 +5459,25 @@
          * @hide
          */
         @Override
-        public RemoteViews makeContentView() {
-            Message m = findLatestIncomingMessage();
-            CharSequence title = mConversationTitle != null
-                    ? mConversationTitle
-                    : (m == null) ? null : m.mSender;
-            CharSequence text = (m == null)
-                    ? null
-                    : mConversationTitle != null ? makeMessageLine(m, mBuilder) : m.mText;
+        public RemoteViews makeContentView(boolean increasedHeight) {
+            if (!increasedHeight) {
+                Message m = findLatestIncomingMessage();
+                CharSequence title = mConversationTitle != null
+                        ? mConversationTitle
+                        : (m == null) ? null : m.mSender;
+                CharSequence text = (m == null)
+                        ? null
+                        : mConversationTitle != null ? makeMessageLine(m, mBuilder) : m.mText;
 
-            return mBuilder.applyStandardTemplateWithActions(mBuilder.getBaseLayoutResource(),
-                    mBuilder.mParams.reset().hasProgress(false).title(title).text(text));
+                return mBuilder.applyStandardTemplate(mBuilder.getBaseLayoutResource(),
+                        mBuilder.mParams.reset().hasProgress(false).title(title).text(text));
+            } else {
+                ArrayList<Action> actions = mBuilder.mActions;
+                mBuilder.mActions = new ArrayList<>();
+                RemoteViews remoteViews = makeBigContentView();
+                mBuilder.mActions = actions;
+                return remoteViews;
+            }
         }
 
         private Message findLatestIncomingMessage() {
@@ -5417,7 +5615,10 @@
          * @hide
          */
         @Override
-        public RemoteViews makeHeadsUpContentView() {
+        public RemoteViews makeHeadsUpContentView(boolean increasedHeight) {
+            if (increasedHeight) {
+                return makeBigContentView();
+            }
             Message m = findLatestIncomingMessage();
             CharSequence title = mConversationTitle != null
                     ? mConversationTitle
@@ -5760,21 +5961,27 @@
      * shown as icon-only pushbuttons, suitable for transport controls. The Bitmap given to
      * {@link Notification.Builder#setLargeIcon(android.graphics.Bitmap) setLargeIcon()} will be
      * treated as album artwork.
-     *
+     * <p>
      * Unlike the other styles provided here, MediaStyle can also modify the standard-size
      * {@link Notification#contentView}; by providing action indices to
      * {@link #setShowActionsInCompactView(int...)} you can promote up to 3 actions to be displayed
      * in the standard view alongside the usual content.
-     *
+     * <p>
      * Notifications created with MediaStyle will have their category set to
      * {@link Notification#CATEGORY_TRANSPORT CATEGORY_TRANSPORT} unless you set a different
      * category using {@link Notification.Builder#setCategory(String) setCategory()}.
-     *
+     * <p>
      * Finally, if you attach a {@link android.media.session.MediaSession.Token} using
      * {@link android.app.Notification.MediaStyle#setMediaSession(MediaSession.Token)},
      * the System UI can identify this as a notification representing an active media session
      * and respond accordingly (by showing album artwork in the lockscreen, for example).
      *
+     * <p>
+     * Starting at {@link android.os.Build.VERSION_CODES#O Android O} any notification that has a
+     * media session attached with {@link #setMediaSession(MediaSession.Token)} will be colorized.
+     * You can opt-out of this behavior by using {@link Notification.Builder#setColorized(boolean)}.
+     * <p>
+     *
      * To use this style with your Notification, feed it to
      * {@link Notification.Builder#setStyle(android.app.Notification.Style)} like so:
      * <pre class="prettyprint">
@@ -5789,6 +5996,7 @@
      * </pre>
      *
      * @see Notification#bigContentView
+     * @see Notification.Builder#setColorized(boolean)
      */
     public static class MediaStyle extends Style {
         static final int MAX_MEDIA_BUTTONS_IN_COMPACT = 3;
@@ -5844,7 +6052,7 @@
          * @hide
          */
         @Override
-        public RemoteViews makeContentView() {
+        public RemoteViews makeContentView(boolean increasedHeight) {
             return makeMediaContentView();
         }
 
@@ -5860,7 +6068,7 @@
          * @hide
          */
         @Override
-        public RemoteViews makeHeadsUpContentView() {
+        public RemoteViews makeHeadsUpContentView(boolean increasedHeight) {
             RemoteViews expanded = makeMediaBigContentView();
             return expanded != null ? expanded : makeMediaContentView();
         }
@@ -5926,7 +6134,7 @@
 
                     final Action action = mBuilder.mActions.get(mActionsToShowInCompact[i]);
                     final RemoteViews button = generateMediaActionButton(action,
-                            mBuilder.resolveContrastColor());
+                            getPrimaryHighlightColor());
                     view.addView(com.android.internal.R.id.media_actions, button);
                 }
             }
@@ -5940,6 +6148,10 @@
             return view;
         }
 
+        private int getPrimaryHighlightColor() {
+            return mBuilder.getPrimaryHighlightColor();
+        }
+
         private RemoteViews makeMediaBigContentView() {
             final int actionCount = Math.min(mBuilder.mActions.size(), MAX_MEDIA_BUTTONS);
             // Dont add an expanded view if there is no more content to be revealed
@@ -5957,7 +6169,7 @@
                 big.removeAllViews(com.android.internal.R.id.media_actions);
                 for (int i = 0; i < actionCount; i++) {
                     final RemoteViews button = generateMediaActionButton(mBuilder.mActions.get(i),
-                            mBuilder.resolveContrastColor());
+                            getPrimaryHighlightColor());
                     big.addView(com.android.internal.R.id.media_actions, button);
                 }
             }
@@ -6020,7 +6232,7 @@
          * @hide
          */
         @Override
-        public RemoteViews makeContentView() {
+        public RemoteViews makeContentView(boolean increasedHeight) {
             return makeStandardTemplateWithCustomContent(mBuilder.mN.contentView);
         }
 
@@ -6036,7 +6248,7 @@
          * @hide
          */
         @Override
-        public RemoteViews makeHeadsUpContentView() {
+        public RemoteViews makeHeadsUpContentView(boolean increasedHeight) {
             return makeDecoratedHeadsUpContentView();
         }
 
@@ -6102,7 +6314,10 @@
      * {@link android.app.Notification.Builder#setCustomBigContentView(RemoteViews)} and
      * {@link android.app.Notification.Builder#setCustomHeadsUpContentView(RemoteViews)} to set the
      * corresponding custom views to display.
-     *
+     * <p>
+     * Contrary to {@link MediaStyle} a developer has to opt-in to the colorizing of the
+     * notification by using {@link Notification.Builder#setColorized(boolean)}.
+     * <p>
      * To use this style with your Notification, feed it to
      * {@link Notification.Builder#setStyle(android.app.Notification.Style)} like so:
      * <pre class="prettyprint">
@@ -6134,8 +6349,8 @@
          * @hide
          */
         @Override
-        public RemoteViews makeContentView() {
-            RemoteViews remoteViews = super.makeContentView();
+        public RemoteViews makeContentView(boolean increasedHeight) {
+            RemoteViews remoteViews = super.makeContentView(false /* increasedHeight */);
             return buildIntoRemoteView(remoteViews, R.id.notification_content_container,
                     mBuilder.mN.contentView);
         }
@@ -6157,7 +6372,7 @@
                 return buildIntoRemoteView(remoteViews, R.id.notification_main_column,
                         customRemoteView);
             } else if (customRemoteView != mBuilder.mN.contentView){
-                remoteViews = super.makeContentView();
+                remoteViews = super.makeContentView(false /* increasedHeight */);
                 return buildIntoRemoteView(remoteViews, R.id.notification_content_container,
                         customRemoteView);
             } else {
@@ -6169,7 +6384,7 @@
          * @hide
          */
         @Override
-        public RemoteViews makeHeadsUpContentView() {
+        public RemoteViews makeHeadsUpContentView(boolean increasedHeight) {
             RemoteViews customRemoteView = mBuilder.mN.headsUpContentView != null
                     ? mBuilder.mN.headsUpContentView
                     : mBuilder.mN.contentView;
diff --git a/core/java/android/app/NotificationChannel.java b/core/java/android/app/NotificationChannel.java
index afcbcdf..1a51608 100644
--- a/core/java/android/app/NotificationChannel.java
+++ b/core/java/android/app/NotificationChannel.java
@@ -21,7 +21,7 @@
 import org.xmlpull.v1.XmlSerializer;
 
 import android.annotation.SystemApi;
-import android.app.NotificationManager;
+import android.graphics.Color;
 import android.media.AudioAttributes;
 import android.net.Uri;
 import android.os.Parcel;
@@ -51,7 +51,6 @@
     private static final String ATT_VISIBILITY = "visibility";
     private static final String ATT_IMPORTANCE = "importance";
     private static final String ATT_LIGHTS = "lights";
-    //TODO: add support for light colors
     private static final String ATT_LIGHT_COLOR = "light_color";
     private static final String ATT_VIBRATION = "vibration";
     private static final String ATT_VIBRATION_ENABLED = "vibration_enabled";
@@ -129,7 +128,7 @@
             USER_LOCKED_AUDIO_ATTRIBUTES
     };
 
-
+    private static final int DEFAULT_LIGHT_COLOR = 0;
     private static final int DEFAULT_VISIBILITY =
             NotificationManager.VISIBILITY_NO_OVERRIDE;
     private static final int DEFAULT_IMPORTANCE =
@@ -144,6 +143,7 @@
     private int mLockscreenVisibility = DEFAULT_VISIBILITY;
     private Uri mSound;
     private boolean mLights;
+    private int mLightColor = DEFAULT_LIGHT_COLOR;
     private long[] mVibration;
     private int mUserLockedFields;
     private boolean mVibrationEnabled;
@@ -194,6 +194,7 @@
             mGroup = null;
         }
         mAudioAttributes = in.readInt() > 0 ? AudioAttributes.CREATOR.createFromParcel(in) : null;
+        mLightColor = in.readInt();
     }
 
     @Override
@@ -232,6 +233,7 @@
         } else {
             dest.writeInt(0);
         }
+        dest.writeInt(mLightColor);
     }
 
     /**
@@ -331,11 +333,22 @@
      * Only modifiable before the channel is submitted to
      * {@link NotificationManager#notify(String, int, Notification)}.
      */
-    public void setLights(boolean lights) {
+    public void enableLights(boolean lights) {
         this.mLights = lights;
     }
 
     /**
+     * Sets the notification light color for notifications posted to this channel, if lights are
+     * {@link #enableLights(boolean) enabled} on this channel and the device supports that feature.
+     *
+     * Only modifiable before the channel is submitted to
+     * {@link NotificationManager#notify(String, int, Notification)}.
+     */
+    public void setLightColor(int argb) {
+        this.mLightColor = argb;
+    }
+
+    /**
      * Sets whether notification posted to this channel should vibrate. The vibration pattern can
      * be set with {@link #setVibrationPattern(long[])}.
      *
@@ -411,6 +424,14 @@
     }
 
     /**
+     * Returns the notification light color for notifications posted to this channel. Irrelevant
+     * unless {@link #shouldShowLights()}.
+     */
+    public int getLightColor() {
+        return mLightColor;
+    }
+
+    /**
      * Returns whether notifications posted to this channel always vibrate.
      */
     public boolean shouldVibrate() {
@@ -478,7 +499,8 @@
                 != safeInt(parser, ATT_PRIORITY, Notification.PRIORITY_DEFAULT));
         setLockscreenVisibility(safeInt(parser, ATT_VISIBILITY, DEFAULT_VISIBILITY));
         setSound(safeUri(parser, ATT_SOUND), safeAudioAttributes(parser));
-        setLights(safeBool(parser, ATT_LIGHTS, false));
+        enableLights(safeBool(parser, ATT_LIGHTS, false));
+        setLightColor(safeInt(parser, ATT_LIGHT_COLOR, DEFAULT_LIGHT_COLOR));
         enableVibration(safeBool(parser, ATT_VIBRATION_ENABLED, false));
         setVibrationPattern(safeLongArray(parser, ATT_VIBRATION, null));
         setShowBadge(safeBool(parser, ATT_SHOW_BADGE, false));
@@ -519,6 +541,9 @@
         if (shouldShowLights()) {
             out.attribute(null, ATT_LIGHTS, Boolean.toString(shouldShowLights()));
         }
+        if (getLightColor() != DEFAULT_LIGHT_COLOR) {
+            out.attribute(null, ATT_LIGHT_COLOR, Integer.toString(getLightColor()));
+        }
         if (shouldVibrate()) {
             out.attribute(null, ATT_VIBRATION_ENABLED, Boolean.toString(shouldVibrate()));
         }
@@ -569,6 +594,7 @@
             record.put(ATT_FLAGS, Integer.toString(getAudioAttributes().getFlags()));
         }
         record.put(ATT_LIGHTS, Boolean.toString(shouldShowLights()));
+        record.put(ATT_LIGHT_COLOR, Integer.toString(getLightColor()));
         record.put(ATT_VIBRATION_ENABLED, Boolean.toString(shouldVibrate()));
         record.put(ATT_USER_LOCKED, Integer.toString(getUserLockedFields()));
         record.put(ATT_VIBRATION, longArrayToString(getVibrationPattern()));
@@ -669,6 +695,7 @@
         if (mBypassDnd != that.mBypassDnd) return false;
         if (getLockscreenVisibility() != that.getLockscreenVisibility()) return false;
         if (mLights != that.mLights) return false;
+        if (getLightColor() != that.getLightColor()) return false;
         if (getUserLockedFields() != that.getUserLockedFields()) return false;
         if (mVibrationEnabled != that.mVibrationEnabled) return false;
         if (mShowBadge != that.mShowBadge) return false;
@@ -698,6 +725,7 @@
         result = 31 * result + getLockscreenVisibility();
         result = 31 * result + (getSound() != null ? getSound().hashCode() : 0);
         result = 31 * result + (mLights ? 1 : 0);
+        result = 31 * result + getLightColor();
         result = 31 * result + Arrays.hashCode(mVibration);
         result = 31 * result + getUserLockedFields();
         result = 31 * result + (mVibrationEnabled ? 1 : 0);
@@ -718,6 +746,7 @@
                 ", mLockscreenVisibility=" + mLockscreenVisibility +
                 ", mSound=" + mSound +
                 ", mLights=" + mLights +
+                ", mLightColor=" + mLightColor +
                 ", mVibration=" + Arrays.toString(mVibration) +
                 ", mUserLockedFields=" + mUserLockedFields +
                 ", mVibrationEnabled=" + mVibrationEnabled +
diff --git a/core/java/android/app/NotificationChannelGroup.java b/core/java/android/app/NotificationChannelGroup.java
index 68cac27..8854adc 100644
--- a/core/java/android/app/NotificationChannelGroup.java
+++ b/core/java/android/app/NotificationChannelGroup.java
@@ -170,6 +170,11 @@
     }
 
     @Override
+    public NotificationChannelGroup clone() {
+        return new NotificationChannelGroup(getId(), getName());
+    }
+
+    @Override
     public int hashCode() {
         int result = getId() != null ? getId().hashCode() : 0;
         result = 31 * result + (getName() != null ? getName().hashCode() : 0);
diff --git a/core/java/android/app/PendingIntent.java b/core/java/android/app/PendingIntent.java
index 02d5705..7d1a16a 100644
--- a/core/java/android/app/PendingIntent.java
+++ b/core/java/android/app/PendingIntent.java
@@ -346,8 +346,8 @@
                     flags, options, UserHandle.myUserId());
             return target != null ? new PendingIntent(target) : null;
         } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
         }
-        return null;
     }
 
     /**
@@ -371,8 +371,8 @@
                     flags, options, user.getIdentifier());
             return target != null ? new PendingIntent(target) : null;
         } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
         }
-        return null;
     }
 
     /**
@@ -487,8 +487,8 @@
                     UserHandle.myUserId());
             return target != null ? new PendingIntent(target) : null;
         } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
         }
-        return null;
     }
 
     /**
@@ -513,8 +513,8 @@
                     flags, options, user.getIdentifier());
             return target != null ? new PendingIntent(target) : null;
         } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
         }
-        return null;
     }
 
     /**
@@ -566,8 +566,8 @@
                     flags, null, userHandle.getIdentifier());
             return target != null ? new PendingIntent(target) : null;
         } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
         }
-        return null;
     }
 
     /**
@@ -609,8 +609,8 @@
                     flags, null, UserHandle.myUserId());
             return target != null ? new PendingIntent(target) : null;
         } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
         }
-        return null;
     }
 
     /**
@@ -856,8 +856,7 @@
             return ActivityManager.getService()
                 .getPackageForIntentSender(mTarget);
         } catch (RemoteException e) {
-            // Should never happen.
-            return null;
+            throw e.rethrowFromSystemServer();
         }
     }
 
@@ -885,8 +884,7 @@
             return ActivityManager.getService()
                 .getPackageForIntentSender(mTarget);
         } catch (RemoteException e) {
-            // Should never happen.
-            return null;
+            throw e.rethrowFromSystemServer();
         }
     }
 
@@ -913,8 +911,7 @@
             return ActivityManager.getService()
                 .getUidForIntentSender(mTarget);
         } catch (RemoteException e) {
-            // Should never happen.
-            return -1;
+            throw e.rethrowFromSystemServer();
         }
     }
 
@@ -945,8 +942,7 @@
                 .getUidForIntentSender(mTarget);
             return uid > 0 ? new UserHandle(UserHandle.getUserId(uid)) : null;
         } catch (RemoteException e) {
-            // Should never happen.
-            return null;
+            throw e.rethrowFromSystemServer();
         }
     }
 
@@ -959,8 +955,7 @@
             return ActivityManager.getService()
                 .isIntentSenderTargetedToPackage(mTarget);
         } catch (RemoteException e) {
-            // Should never happen.
-            return false;
+            throw e.rethrowFromSystemServer();
         }
     }
 
@@ -973,8 +968,7 @@
             return ActivityManager.getService()
                 .isIntentSenderAnActivity(mTarget);
         } catch (RemoteException e) {
-            // Should never happen.
-            return false;
+            throw e.rethrowFromSystemServer();
         }
     }
 
@@ -987,8 +981,7 @@
             return ActivityManager.getService()
                 .getIntentForIntentSender(mTarget);
         } catch (RemoteException e) {
-            // Should never happen.
-            return null;
+            throw e.rethrowFromSystemServer();
         }
     }
 
@@ -1001,8 +994,7 @@
             return ActivityManager.getService()
                 .getTagForIntentSender(mTarget, prefix);
         } catch (RemoteException e) {
-            // Should never happen.
-            return null;
+            throw e.rethrowFromSystemServer();
         }
     }
 
diff --git a/core/java/android/app/QueuedWork.java b/core/java/android/app/QueuedWork.java
index 0ae8505..a38fd43 100644
--- a/core/java/android/app/QueuedWork.java
+++ b/core/java/android/app/QueuedWork.java
@@ -46,13 +46,23 @@
  */
 public class QueuedWork {
     private static final String LOG_TAG = QueuedWork.class.getSimpleName();
+    private static final boolean DEBUG = true;
 
-    /** Delay for delayed runnables */
-    private static final long DELAY = 50;
+    /** Delay for delayed runnables, as big as possible but low enough to be barely perceivable */
+    private static final long DELAY = 100;
 
     /** Lock for this class */
     private static final Object sLock = new Object();
 
+    /**
+     * Used to make sure that only one thread is processing work items at a time. This means that
+     * they are processed in the order added.
+     *
+     * This is separate from {@link #sLock} as this is held the whole time while work is processed
+     * and we do not want to stall the whole class.
+     */
+    private static Object sProcessingWork = new Object();
+
     /** Finishers {@link #addFinisher added} and not yet {@link #removeFinisher removed} */
     @GuardedBy("sLock")
     private static final LinkedList<Runnable> sFinishers = new LinkedList<>();
@@ -78,7 +88,7 @@
         synchronized (sLock) {
             if (sHandler == null) {
                 HandlerThread handlerThread = new HandlerThread("queued-work-looper",
-                        Process.THREAD_PRIORITY_BACKGROUND);
+                        Process.THREAD_PRIORITY_FOREGROUND);
                 handlerThread.start();
 
                 sHandler = new QueuedWorkHandler(handlerThread.getLooper());
@@ -125,19 +135,32 @@
      * after Service command handling, etc. (so async work is never lost)
      */
     public static void waitToFinish() {
+        long startTime = 0;
+        boolean hadMessages = false;
+
+        if (DEBUG) {
+            startTime = System.currentTimeMillis();
+        }
+
         Handler handler = getHandler();
 
         synchronized (sLock) {
             if (handler.hasMessages(QueuedWorkHandler.MSG_RUN)) {
-                // Force the delayed work to be processed now
+                // Delayed work will be processed at processPendingWork() below
                 handler.removeMessages(QueuedWorkHandler.MSG_RUN);
-                handler.sendEmptyMessage(QueuedWorkHandler.MSG_RUN);
+
+                if (DEBUG) {
+                    hadMessages = true;
+                    Log.d(LOG_TAG, "waiting");
+                }
             }
 
             // We should not delay any work as this might delay the finishers
             sCanDelay = false;
         }
 
+        processPendingWork();
+
         try {
             while (true) {
                 Runnable finisher;
@@ -155,6 +178,14 @@
         } finally {
             sCanDelay = true;
         }
+
+        if (DEBUG) {
+            long waitTime = System.currentTimeMillis() - startTime;
+
+            if (waitTime > 0 || hadMessages) {
+                Log.d(LOG_TAG, "waited " + waitTime + " ms");
+            }
+        }
     }
 
     /**
@@ -186,6 +217,37 @@
         }
     }
 
+    private static void processPendingWork() {
+        long startTime = 0;
+
+        if (DEBUG) {
+            startTime = System.currentTimeMillis();
+        }
+
+        synchronized (sProcessingWork) {
+            LinkedList<Runnable> work;
+
+            synchronized (sLock) {
+                work = (LinkedList<Runnable>) sWork.clone();
+                sWork.clear();
+
+                // Remove all msg-s as all work will be processed now
+                getHandler().removeMessages(QueuedWorkHandler.MSG_RUN);
+            }
+
+            if (work.size() > 0) {
+                for (Runnable w : work) {
+                    w.run();
+                }
+
+                if (DEBUG) {
+                    Log.d(LOG_TAG, "processing " + work.size() + " items took " +
+                            +(System.currentTimeMillis() - startTime) + " ms");
+                }
+            }
+        }
+    }
+
     private static class QueuedWorkHandler extends Handler {
         static final int MSG_RUN = 1;
 
@@ -195,17 +257,7 @@
 
         public void handleMessage(Message msg) {
             if (msg.what == MSG_RUN) {
-                LinkedList<Runnable> work;
-
-                synchronized (sWork) {
-                    work = (LinkedList<Runnable>) sWork.clone();
-                    sWork.clear();
-
-                    // Remove all msg-s as all work will be processed now
-                    removeMessages(MSG_RUN);
-                }
-
-                work.forEach(Runnable::run);
+                processPendingWork();
             }
         }
     }
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/RemoteAction.java b/core/java/android/app/RemoteAction.java
index a37680f..5958bc1 100644
--- a/core/java/android/app/RemoteAction.java
+++ b/core/java/android/app/RemoteAction.java
@@ -35,55 +35,30 @@
  */
 public final class RemoteAction implements Parcelable {
 
-    /**
-     * Interface definition for a callback to be invoked when an action is invoked.
-     */
-    public interface OnActionListener {
-        /**
-         * Called when the associated action is invoked.
-         *
-         * @param action The action that was invoked.
-         */
-        void onAction(RemoteAction action);
-    }
-
     private static final String TAG = "RemoteAction";
 
-    private static final int MESSAGE_ACTION_INVOKED = 1;
-
     private final Icon mIcon;
     private final CharSequence mTitle;
     private final CharSequence mContentDescription;
-    private OnActionListener mActionCallback;
-    private final Messenger mMessenger;
+    private final PendingIntent mActionIntent;
 
     RemoteAction(Parcel in) {
         mIcon = Icon.CREATOR.createFromParcel(in);
         mTitle = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
         mContentDescription = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
-        mMessenger = in.readParcelable(Messenger.class.getClassLoader());
+        mActionIntent = PendingIntent.CREATOR.createFromParcel(in);
     }
 
     public RemoteAction(@NonNull Icon icon, @NonNull CharSequence title,
-            @NonNull CharSequence contentDescription, @NonNull OnActionListener callback) {
-        if (icon == null || title == null || contentDescription == null || callback == null) {
+            @NonNull CharSequence contentDescription, @NonNull PendingIntent intent) {
+        if (icon == null || title == null || contentDescription == null || intent == null) {
             throw new IllegalArgumentException("Expected icon, title, content description and " +
                     "action callback");
         }
         mIcon = icon;
         mTitle = title;
         mContentDescription = contentDescription;
-        mActionCallback = callback;
-        mMessenger = new Messenger(new Handler() {
-            @Override
-            public void handleMessage(Message msg) {
-                switch (msg.what) {
-                    case MESSAGE_ACTION_INVOKED:
-                        mActionCallback.onAction(RemoteAction.this);
-                        break;
-                }
-            }
-        });
+        mActionIntent = intent;
     }
 
     /**
@@ -108,22 +83,15 @@
     }
 
     /**
-     * Sends a message that the action was invoked.
-     * @hide
+     * Return the action intent.
      */
-    public void sendActionInvoked() {
-        Message m = Message.obtain();
-        m.what = MESSAGE_ACTION_INVOKED;
-        try {
-            mMessenger.send(m);
-        } catch (RemoteException e) {
-            Log.e(TAG, "Could not send action-invoked", e);
-        }
+    public @NonNull PendingIntent getActionIntent() {
+        return mActionIntent;
     }
 
     @Override
     public RemoteAction clone() {
-        return new RemoteAction(mIcon, mTitle, mContentDescription, mActionCallback);
+        return new RemoteAction(mIcon, mTitle, mContentDescription, mActionIntent);
     }
 
     @Override
@@ -136,7 +104,7 @@
         mIcon.writeToParcel(out, 0);
         TextUtils.writeToParcel(mTitle, out, flags);
         TextUtils.writeToParcel(mContentDescription, out, flags);
-        out.writeParcelable(mMessenger, flags);
+        mActionIntent.writeToParcel(out, flags);
     }
 
     public void dump(String prefix, PrintWriter pw) {
@@ -144,6 +112,7 @@
         pw.print("title=" + mTitle);
         pw.print(" contentDescription=" + mContentDescription);
         pw.print(" icon=" + mIcon);
+        pw.print(" action=" + mActionIntent.getIntent());
         pw.println();
     }
 
diff --git a/core/java/android/app/Service.java b/core/java/android/app/Service.java
index 4fe4f98..9cd048e 100644
--- a/core/java/android/app/Service.java
+++ b/core/java/android/app/Service.java
@@ -683,26 +683,28 @@
      * flag if killing your service would be disruptive to the user, such as
      * if your service is performing background music playback, so the user
      * would notice if their music stopped playing.
-     * 
+     *
      * <p>If you need your application to run on platform versions prior to API
      * level 5, you can use the following model to call the the older setForeground()
      * or this modern method as appropriate:
-     * 
+     *
      * {@sample development/samples/ApiDemos/src/com/example/android/apis/app/ForegroundService.java
      *   foreground_compatibility}
-     * 
+     *
      * @param id The identifier for this notification as per
      * {@link NotificationManager#notify(int, Notification)
      * NotificationManager.notify(int, Notification)}; must not be 0.
      * @param notification The Notification to be displayed.
-     * 
+     *
      * @see #stopForeground(boolean)
      */
     public final void startForeground(int id, Notification notification) {
         try {
-            mActivityManager.setServiceForeground(
-                    new ComponentName(this, mClassName), mToken, id,
-                    notification, 0);
+            final long procStateSeq = mActivityManager.setServiceForeground(
+                    new ComponentName(this, mClassName), mToken, id, notification, 0);
+            if (procStateSeq != ActivityThread.INVALID_PROC_STATE_SEQ && mThread != null) {
+                mThread.blockForNetworkAccessInForegroundService(procStateSeq);
+            }
         } catch (RemoteException ex) {
         }
     }
diff --git a/core/java/android/app/SharedPreferencesImpl.java b/core/java/android/app/SharedPreferencesImpl.java
index 023b4f3..11ba7ee 100644
--- a/core/java/android/app/SharedPreferencesImpl.java
+++ b/core/java/android/app/SharedPreferencesImpl.java
@@ -53,7 +53,7 @@
 
 final class SharedPreferencesImpl implements SharedPreferences {
     private static final String TAG = "SharedPreferencesImpl";
-    private static final boolean DEBUG = false;
+    private static final boolean DEBUG = true;
     private static final Object CONTENT = new Object();
 
     // Lock ordering rules:
@@ -318,6 +318,7 @@
 
         @GuardedBy("mWritingToDiskLock")
         volatile boolean writeToDiskResult = false;
+        boolean wasWritten = false;
 
         private MemoryCommitResult(long memoryStateGeneration, @Nullable List<String> keysModified,
                 @Nullable Set<OnSharedPreferenceChangeListener> listeners,
@@ -328,7 +329,8 @@
             this.mapToWriteToDisk = mapToWriteToDisk;
         }
 
-        void setDiskWriteResult(boolean result) {
+        void setDiskWriteResult(boolean wasWritten, boolean result) {
+            this.wasWritten = wasWritten;
             writeToDiskResult = result;
             writtenToDiskLatch.countDown();
         }
@@ -396,6 +398,8 @@
         }
 
         public void apply() {
+            final long startTime = System.currentTimeMillis();
+
             final MemoryCommitResult mcr = commitToMemory();
             final Runnable awaitCommit = new Runnable() {
                     public void run() {
@@ -403,6 +407,12 @@
                             mcr.writtenToDiskLatch.await();
                         } catch (InterruptedException ignored) {
                         }
+
+                        if (DEBUG && mcr.wasWritten) {
+                            Log.d(TAG, mFile.getName() + ":" + mcr.memoryStateGeneration
+                                    + " applied after " + (System.currentTimeMillis() - startTime)
+                                    + " ms");
+                        }
                     }
                 };
 
@@ -503,13 +513,26 @@
         }
 
         public boolean commit() {
+            long startTime = 0;
+
+            if (DEBUG) {
+                startTime = System.currentTimeMillis();
+            }
+
             MemoryCommitResult mcr = commitToMemory();
+
             SharedPreferencesImpl.this.enqueueDiskWrite(
                 mcr, null /* sync write on this thread okay */);
             try {
                 mcr.writtenToDiskLatch.await();
             } catch (InterruptedException e) {
                 return false;
+            } finally {
+                if (DEBUG) {
+                    Log.d(TAG, mFile.getName() + ":" + mcr.memoryStateGeneration
+                            + " committed after " + (System.currentTimeMillis() - startTime)
+                            + " ms");
+                }
             }
             notifyListeners(mcr);
             return mcr.writeToDiskResult;
@@ -587,10 +610,6 @@
             }
         }
 
-        if (DEBUG) {
-            Log.d(TAG, "queued " + mcr.memoryStateGeneration + " -> " + mFile.getName());
-        }
-
         QueuedWork.queue(writeToDiskRunnable, !isFromSyncCommit);
     }
 
@@ -619,8 +638,31 @@
 
     // Note: must hold mWritingToDiskLock
     private void writeToFile(MemoryCommitResult mcr, boolean isFromSyncCommit) {
+        long startTime = 0;
+        long existsTime = 0;
+        long backupExistsTime = 0;
+        long outputStreamCreateTime = 0;
+        long writeTime = 0;
+        long fsyncTime = 0;
+        long setPermTime = 0;
+        long fstatTime = 0;
+        long deleteTime = 0;
+
+        if (DEBUG) {
+            startTime = System.currentTimeMillis();
+        }
+
+        boolean fileExists = mFile.exists();
+
+        if (DEBUG) {
+            existsTime = System.currentTimeMillis();
+
+            // Might not be set, hence init them to a default value
+            backupExistsTime = existsTime;
+        }
+
         // Rename the current file so it may be used as a backup during the next read
-        if (mFile.exists()) {
+        if (fileExists) {
             boolean needsWrite = false;
 
             // Only need to write if the disk state is older than this commit
@@ -639,18 +681,21 @@
             }
 
             if (!needsWrite) {
-                if (DEBUG) {
-                    Log.d(TAG, "skipped " + mcr.memoryStateGeneration + " -> " + mFile.getName());
-                }
-                mcr.setDiskWriteResult(true);
+                mcr.setDiskWriteResult(false, true);
                 return;
             }
 
-            if (!mBackupFile.exists()) {
+            boolean backupFileExists = mBackupFile.exists();
+
+            if (DEBUG) {
+                backupExistsTime = System.currentTimeMillis();
+            }
+
+            if (!backupFileExists) {
                 if (!mFile.renameTo(mBackupFile)) {
                     Log.e(TAG, "Couldn't rename file " + mFile
                           + " to backup file " + mBackupFile);
-                    mcr.setDiskWriteResult(false);
+                    mcr.setDiskWriteResult(false, false);
                     return;
                 }
             } else {
@@ -663,19 +708,34 @@
         // from the backup.
         try {
             FileOutputStream str = createFileOutputStream(mFile);
+
+            if (DEBUG) {
+                outputStreamCreateTime = System.currentTimeMillis();
+            }
+
             if (str == null) {
-                mcr.setDiskWriteResult(false);
+                mcr.setDiskWriteResult(false, false);
                 return;
             }
             XmlUtils.writeMapXml(mcr.mapToWriteToDisk, str);
+
+            if (DEBUG) {
+                writeTime = System.currentTimeMillis();
+            }
+
             FileUtils.sync(str);
 
             if (DEBUG) {
-                Log.d(TAG, "wrote " + mcr.memoryStateGeneration + " -> " + mFile.getName());
+                fsyncTime = System.currentTimeMillis();
             }
 
             str.close();
             ContextImpl.setFilePermissionsFromMode(mFile.getPath(), mMode, 0);
+
+            if (DEBUG) {
+                setPermTime = System.currentTimeMillis();
+            }
+
             try {
                 final StructStat stat = Os.stat(mFile.getPath());
                 synchronized (mLock) {
@@ -685,12 +745,30 @@
             } catch (ErrnoException e) {
                 // Do nothing
             }
+
+            if (DEBUG) {
+                fstatTime = System.currentTimeMillis();
+            }
+
             // Writing was successful, delete the backup file if there is one.
             mBackupFile.delete();
 
+            if (DEBUG) {
+                deleteTime = System.currentTimeMillis();
+            }
+
             mDiskStateGeneration = mcr.memoryStateGeneration;
 
-            mcr.setDiskWriteResult(true);
+            mcr.setDiskWriteResult(true, true);
+
+            Log.d(TAG, "write: " + (existsTime - startTime) + "/"
+                    + (backupExistsTime - startTime) + "/"
+                    + (outputStreamCreateTime - startTime) + "/"
+                    + (writeTime - startTime) + "/"
+                    + (fsyncTime - startTime) + "/"
+                    + (setPermTime - startTime) + "/"
+                    + (fstatTime - startTime) + "/"
+                    + (deleteTime - startTime));
 
             return;
         } catch (XmlPullParserException e) {
@@ -698,12 +776,13 @@
         } catch (IOException e) {
             Log.w(TAG, "writeToFile: Got exception:", e);
         }
+
         // Clean up an unsuccessfully written file
         if (mFile.exists()) {
             if (!mFile.delete()) {
                 Log.e(TAG, "Couldn't clean up partially-written file " + mFile);
             }
         }
-        mcr.setDiskWriteResult(false);
+        mcr.setDiskWriteResult(false, false);
     }
 }
diff --git a/core/java/android/app/SystemServiceRegistry.java b/core/java/android/app/SystemServiceRegistry.java
index 5a75a67..f330a4b 100644
--- a/core/java/android/app/SystemServiceRegistry.java
+++ b/core/java/android/app/SystemServiceRegistry.java
@@ -30,6 +30,8 @@
 import android.app.usage.UsageStatsManager;
 import android.appwidget.AppWidgetManager;
 import android.bluetooth.BluetoothManager;
+import android.companion.CompanionDeviceManager;
+import android.companion.ICompanionDeviceManager;
 import android.content.ClipboardManager;
 import android.content.Context;
 import android.content.IRestrictionsManager;
@@ -112,9 +114,11 @@
 import android.os.storage.StorageManager;
 import android.print.IPrintManager;
 import android.print.PrintManager;
-import android.service.autofill.IAutoFillManagerService;
+import android.view.autofill.AutoFillManager;
+import android.view.autofill.IAutoFillManager;
 import android.service.persistentdata.IPersistentDataBlockService;
 import android.service.persistentdata.PersistentDataBlockManager;
+import android.service.vr.IVrManager;
 import android.telecom.TelecomManager;
 import android.telephony.CarrierConfigManager;
 import android.telephony.SubscriptionManager;
@@ -127,7 +131,6 @@
 import android.view.WindowManagerImpl;
 import android.view.accessibility.AccessibilityManager;
 import android.view.accessibility.CaptioningManager;
-import android.view.autofill.AutoFillManager;
 import android.view.inputmethod.InputMethodManager;
 import android.view.textclassifier.TextClassificationManager;
 import android.view.textservice.TextServicesManager;
@@ -633,6 +636,18 @@
                         UserHandle.getAppId(Process.myUid()));
             }});
 
+        registerService(Context.COMPANION_DEVICE_SERVICE, CompanionDeviceManager.class,
+                new CachedServiceFetcher<CompanionDeviceManager>() {
+                    @Override
+                    public CompanionDeviceManager createService(ContextImpl ctx)
+                            throws ServiceNotFoundException {
+                        IBinder iBinder =
+                                ServiceManager.getServiceOrThrow(Context.COMPANION_DEVICE_SERVICE);
+                        ICompanionDeviceManager service =
+                                ICompanionDeviceManager.Stub.asInterface(iBinder);
+                        return new CompanionDeviceManager(service, ctx);
+                    }});
+
         registerService(Context.CONSUMER_IR_SERVICE, ConsumerIrManager.class,
                 new CachedServiceFetcher<ConsumerIrManager>() {
             @Override
@@ -811,9 +826,17 @@
             @Override
             public AutoFillManager createService(ContextImpl ctx) throws ServiceNotFoundException {
                 IBinder b = ServiceManager.getServiceOrThrow(Context.AUTO_FILL_MANAGER_SERVICE);
-                IAutoFillManagerService service = IAutoFillManagerService.Stub.asInterface(b);
-                return new AutoFillManager(ctx, service);
+                IAutoFillManager service = IAutoFillManager.Stub.asInterface(b);
+                return new AutoFillManager(ctx.getOuterContext(), service);
             }});
+
+        registerService(Context.VR_SERVICE, VrManager.class, new CachedServiceFetcher<VrManager>() {
+            @Override
+            public VrManager createService(ContextImpl ctx) throws ServiceNotFoundException {
+                IBinder b = ServiceManager.getServiceOrThrow(Context.VR_SERVICE);
+                return new VrManager(IVrManager.Stub.asInterface(b));
+            }
+        });
     }
 
     /**
diff --git a/core/java/android/app/TimePickerDialog.java b/core/java/android/app/TimePickerDialog.java
index 3f467a0..b219f2a 100644
--- a/core/java/android/app/TimePickerDialog.java
+++ b/core/java/android/app/TimePickerDialog.java
@@ -145,14 +145,25 @@
     }
 
     @Override
+    public void show() {
+        super.show();
+        getButton(BUTTON_POSITIVE).setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                if (mTimePicker.validateInput()) {
+                    if (mTimeSetListener != null) {
+                        mTimeSetListener.onTimeSet(mTimePicker, mTimePicker.getCurrentHour(),
+                                mTimePicker.getCurrentMinute());
+                    }
+                    dismiss();
+                }
+            }
+        });
+    }
+
+    @Override
     public void onClick(DialogInterface dialog, int which) {
         switch (which) {
-            case BUTTON_POSITIVE:
-                if (mTimeSetListener != null) {
-                    mTimeSetListener.onTimeSet(mTimePicker, mTimePicker.getCurrentHour(),
-                            mTimePicker.getCurrentMinute());
-                }
-                break;
             case BUTTON_NEGATIVE:
                 cancel();
                 break;
diff --git a/core/java/android/app/UiAutomation.java b/core/java/android/app/UiAutomation.java
index 6d1d1a3..1d6f42e 100644
--- a/core/java/android/app/UiAutomation.java
+++ b/core/java/android/app/UiAutomation.java
@@ -1118,6 +1118,16 @@
                 public void onFingerprintGesture(int gesture) {
                     /* do nothing */
                 }
+
+                @Override
+                public void onAccessibilityButtonClicked() {
+                    /* do nothing */
+                }
+
+                @Override
+                public void onAccessibilityButtonAvailabilityChanged(boolean available) {
+                    /* do nothing */
+                }
             });
         }
     }
diff --git a/core/java/android/app/VrManager.java b/core/java/android/app/VrManager.java
new file mode 100644
index 0000000..a0b0eea
--- /dev/null
+++ b/core/java/android/app/VrManager.java
@@ -0,0 +1,44 @@
+package android.app;
+
+
+import android.annotation.SystemApi;
+import android.content.ComponentName;
+import android.os.RemoteException;
+import android.service.vr.IVrManager;
+
+/**
+ * Used to control aspects of a devices Virtual Reality (VR) capabilities.
+ * <p>
+ * You do not instantiate this class directly; instead, retrieve it through
+ * {@link android.content.Context#getSystemService}.
+ * @hide
+ */
+@SystemApi
+public class VrManager {
+    private final IVrManager mService;
+
+    /**
+     * {@hide}
+     */
+    public VrManager(IVrManager service) {
+        mService = service;
+    }
+
+    /**
+     * Sets the persistent VR mode state of a device. When a device is in persistent VR mode it will
+     * remain in VR mode even if the foreground does not specify Vr mode being enabled. Mainly used
+     * by VR viewers to indicate that a device is placed in a VR viewer.
+     *
+     * <p>Requires {@link android.Manifest.permission#ACCESS_VR_MANAGER} permission.</p>
+     *
+     * @see Activity#setVrModeEnabled(boolean, ComponentName)
+     * @param enabled true if the device should be placed in persistent VR mode.
+     */
+    public void setPersistentVrModeEnabled(boolean enabled) {
+        try {
+            mService.setPersistentVrModeEnabled(enabled);
+        } catch (RemoteException e) {
+            e.rethrowFromSystemServer();
+        }
+    }
+}
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index 52d7386..3b2562d 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -28,6 +28,7 @@
 import android.annotation.WorkerThread;
 import android.app.Activity;
 import android.app.IServiceConnection;
+import android.app.KeyguardManager;
 import android.app.admin.SecurityLog.SecurityEvent;
 import android.content.ComponentName;
 import android.content.Context;
@@ -377,7 +378,7 @@
      * @hide
      */
     public static final String ACTION_BUGREPORT_SHARING_ACCEPTED =
-            "com.android.server.action.BUGREPORT_SHARING_ACCEPTED";
+            "com.android.server.action.REMOTE_BUGREPORT_SHARING_ACCEPTED";
 
     /**
      * Action: Bugreport sharing with device owner has been declined by the user.
@@ -385,7 +386,7 @@
      * @hide
      */
     public static final String ACTION_BUGREPORT_SHARING_DECLINED =
-            "com.android.server.action.BUGREPORT_SHARING_DECLINED";
+            "com.android.server.action.REMOTE_BUGREPORT_SHARING_DECLINED";
 
     /**
      * Action: Bugreport has been collected and is dispatched to {@code DevicePolicyManagerService}.
@@ -1773,10 +1774,14 @@
      *     if any of the accounts have it.
      * </ul>
      */
+    @SystemApi
+    @TestApi
     public static final String ACCOUNT_FEATURE_DEVICE_OR_PROFILE_OWNER_ALLOWED =
             "android.account.DEVICE_OR_PROFILE_OWNER_ALLOWED";
 
     /** @hide See {@link #ACCOUNT_FEATURE_DEVICE_OR_PROFILE_OWNER_ALLOWED} */
+    @SystemApi
+    @TestApi
     public static final String ACCOUNT_FEATURE_DEVICE_OR_PROFILE_OWNER_DISALLOWED =
             "android.account.DEVICE_OR_PROFILE_OWNER_DISALLOWED";
 
@@ -2694,6 +2699,11 @@
      * Force a new device unlock password (the password needed to access the entire device, not for
      * individual accounts) on the user. This takes effect immediately.
      * <p>
+     * <em>For device owner and profile owners targeting SDK level
+     * {@link android.os.Build.VERSION_CODES#O} or above, this API is no longer available and will
+     * throw {@link SecurityException}. Please use the new API {@link #resetPasswordWithToken}
+     * instead. </em>
+     * <p>
      * <em>Note: This API has been limited as of {@link android.os.Build.VERSION_CODES#N} for
      * device admins that are not device owner and not profile owner.
      * The password can now only be changed if there is currently no password set.  Device owner
@@ -2740,6 +2750,127 @@
     }
 
     /**
+     * Called by a profile or device owner to provision a token which can later be used to reset the
+     * device lockscreen password (if called by device owner), or work challenge (if called by
+     * profile owner), via {@link #resetPasswordWithToken}.
+     * <p>
+     * If the user currently has a lockscreen password, the provisioned token will not be
+     * immediately usable; it only becomes active after the user performs a confirm credential
+     * operation, which can be triggered by {@link KeyguardManager#createConfirmDeviceCredentialIntent}.
+     * If the user has no lockscreen password, the token is activated immediately. In all cases,
+     * the active state of the current token can be checked by {@link #isResetPasswordTokenActive}.
+     * For security reasons, un-activated tokens are only stored in memory and will be lost once
+     * the device reboots. In this case a new token needs to be provisioned again.
+     * <p>
+     * Once provisioned and activated, the token will remain effective even if the user changes
+     * or clears the lockscreen password.
+     * <p>
+     * <em>This token is highly sensitive and should be treated at the same level as user
+     * credentials. In particular, NEVER store this token on device in plaintext, especially in
+     * Device-Encrypted storage if the token will be used to reset password on FBE devices before
+     * user unlocks.
+     * </em>
+     *
+     * @param admin Which {@link DeviceAdminReceiver} this request is associated with.
+     * @param token a secure token a least 32-byte long, which must be generated by a
+     *        cryptographically strong random number generator.
+     * @return true if the operation is successful, false otherwise.
+     * @throws IllegalArgumentException if the supplied token is invalid.
+     * @throws SecurityException
+     */
+    public boolean setResetPasswordToken(ComponentName admin, byte[] token) {
+        throwIfParentInstance("setResetPasswordToken");
+        if (mService != null) {
+            try {
+                return mService.setResetPasswordToken(admin, token);
+            } catch (RemoteException e) {
+                throw e.rethrowFromSystemServer();
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Called by a profile or device owner to revoke the current password reset token.
+     *
+     * @param admin Which {@link DeviceAdminReceiver} this request is associated with.
+     * @return true if the operation is successful, false otherwise.
+     */
+    public boolean clearResetPasswordToken(ComponentName admin) {
+        throwIfParentInstance("clearResetPasswordToken");
+        if (mService != null) {
+            try {
+                return mService.clearResetPasswordToken(admin);
+            } catch (RemoteException e) {
+                throw e.rethrowFromSystemServer();
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Called by a profile or device owner to check if the current reset password token is active.
+     *
+     * @param admin Which {@link DeviceAdminReceiver} this request is associated with.
+     * @return true if the token is active, false otherwise.
+     * @throws IllegalStateException if no token has been set.
+     */
+    public boolean isResetPasswordTokenActive(ComponentName admin) {
+        throwIfParentInstance("isResetPasswordTokenActive");
+        if (mService != null) {
+            try {
+                return mService.isResetPasswordTokenActive(admin);
+            } catch (RemoteException e) {
+                throw e.rethrowFromSystemServer();
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Called by device or profile owner to force set a new device unlock password or a work profile
+     * challenge on current user. This takes effect immediately.
+     * <p>
+     * Unlike {@link #resetPassword}, this API can change the password even before the user or
+     * device is unlocked or decrypted. The supplied token must have been previously provisioned via
+     * {@link #setResetPasswordToken}, and in active state {@link #isResetPasswordTokenActive}.
+     * <p>
+     * The given password must be sufficient for the current password quality and length constraints
+     * as returned by {@link #getPasswordQuality(ComponentName)} and
+     * {@link #getPasswordMinimumLength(ComponentName)}; if it does not meet these constraints, then
+     * it will be rejected and false returned. Note that the password may be a stronger quality
+     * (containing alphanumeric characters when the requested quality is only numeric), in which
+     * case the currently active quality will be increased to match.
+     * <p>
+     * Calling with a null or empty password will clear any existing PIN, pattern or password if the
+     * current password constraints allow it.
+     *
+     * @param admin Which {@link DeviceAdminReceiver} this request is associated with.
+     * @param password The new password for the user. Null or empty clears the password.
+     * @param token the password reset token previously provisioned by #setResetPasswordToken.
+     * @param flags May be 0 or combination of {@link #RESET_PASSWORD_REQUIRE_ENTRY} and
+     *            {@link #RESET_PASSWORD_DO_NOT_ASK_CREDENTIALS_ON_BOOT}.
+     * @return Returns true if the password was applied, or false if it is not acceptable for the
+     *         current constraints.
+     * @throws SecurityException if the calling application does not own an active administrator
+     *             that uses {@link DeviceAdminInfo#USES_POLICY_RESET_PASSWORD}
+     * @throws IllegalStateException if the provided token is not valid.
+     * @throws IllegalArgumentException if the password does not meet system requirements.
+     */
+    public boolean resetPasswordWithToken(@NonNull ComponentName admin, String password,
+            byte[] token, int flags) {
+        throwIfParentInstance("resetPassword");
+        if (mService != null) {
+            try {
+                return mService.resetPasswordWithToken(admin, password, token, flags);
+            } catch (RemoteException e) {
+                throw e.rethrowFromSystemServer();
+            }
+        }
+        return false;
+    }
+
+    /**
      * Called by an application that is administering the device to set the maximum time for user
      * activity until the device will lock. This limits the length that the user can set. It takes
      * effect immediately.
@@ -6073,20 +6204,24 @@
     /**
      * Sets which packages may enter lock task mode.
      * <p>
-     * Any packages that shares uid with an allowed package will also be allowed to activate lock
+     * Any packages that share uid with an allowed package will also be allowed to activate lock
      * task. From {@link android.os.Build.VERSION_CODES#M} removing packages from the lock task
-     * package list results in locked tasks belonging to those packages to be finished. This
-     * function can only be called by the device owner.
+     * package list results in locked tasks belonging to those packages to be finished.
+     * <p>
+     * This function can only be called by the device owner or by a profile owner of a user/profile
+     * that is affiliated with the device owner user. See {@link #setAffiliationIds}. Any packages
+     * set via this method will be cleared if the user becomes unaffiliated.
      *
      * @param packages The list of packages allowed to enter lock task mode
      * @param admin Which {@link DeviceAdminReceiver} this request is associated with.
-     * @throws SecurityException if {@code admin} is not a device owner.
+     * @throws SecurityException if {@code admin} is not the device owner, or the profile owner of
+     * an affiliated user or profile.
      * @see Activity#startLockTask()
      * @see DeviceAdminReceiver#onLockTaskModeEntering(Context, Intent, String)
      * @see DeviceAdminReceiver#onLockTaskModeExiting(Context, Intent)
      * @see UserManager#DISALLOW_CREATE_WINDOWS
      */
-    public void setLockTaskPackages(@NonNull ComponentName admin, String[] packages)
+    public void setLockTaskPackages(@NonNull ComponentName admin, @NonNull String[] packages)
             throws SecurityException {
         throwIfParentInstance("setLockTaskPackages");
         if (mService != null) {
@@ -6099,10 +6234,11 @@
     }
 
     /**
-     * This function returns the list of packages allowed to start the lock task mode.
+     * Returns the list of packages allowed to start the lock task mode.
      *
-     * @param admin Which {@link DeviceAdminReceiver} this request is associated with.
-     * @hide
+     * @throws SecurityException if {@code admin} is not the device owner, or the profile owner of
+     * an affiliated user or profile.
+     * @see #setLockTaskPackages
      */
     public @NonNull String[] getLockTaskPackages(@NonNull ComponentName admin) {
         throwIfParentInstance("getLockTaskPackages");
@@ -6113,7 +6249,7 @@
                 throw e.rethrowFromSystemServer();
             }
         }
-        return null;
+        return new String[0];
     }
 
     /**
diff --git a/core/java/android/app/admin/IDevicePolicyManager.aidl b/core/java/android/app/admin/IDevicePolicyManager.aidl
index 79fe10e..c2f75c8 100644
--- a/core/java/android/app/admin/IDevicePolicyManager.aidl
+++ b/core/java/android/app/admin/IDevicePolicyManager.aidl
@@ -342,4 +342,9 @@
     long getLastSecurityLogRetrievalTime();
     long getLastBugReportRequestTime();
     long getLastNetworkLogRetrievalTime();
+
+    boolean setResetPasswordToken(in ComponentName admin, in byte[] token);
+    boolean clearResetPasswordToken(in ComponentName admin);
+    boolean isResetPasswordTokenActive(in ComponentName admin);
+    boolean resetPasswordWithToken(in ComponentName admin, String password, in byte[] token, int flags);
 }
diff --git a/core/java/android/app/admin/SecurityLog.java b/core/java/android/app/admin/SecurityLog.java
index 2858991..91b87d7 100644
--- a/core/java/android/app/admin/SecurityLog.java
+++ b/core/java/android/app/admin/SecurityLog.java
@@ -144,8 +144,7 @@
         }
 
         /**
-         * Returns the payload contained in this log. Each call to this method will
-         * retrieve the next payload item. If no more payload exists, it returns {@code null}.
+         * Returns the payload contained in this log entry or {@code null} if there is no payload.
          */
         public Object getData() {
             return mEvent.getData();
diff --git a/core/java/android/app/assist/AssistStructure.java b/core/java/android/app/assist/AssistStructure.java
index 08aa5f2..8d385db 100644
--- a/core/java/android/app/assist/AssistStructure.java
+++ b/core/java/android/app/assist/AssistStructure.java
@@ -17,13 +17,13 @@
 import android.text.TextUtils;
 import android.util.Log;
 import android.view.View;
-import android.view.ViewStructure;
 import android.view.ViewRootImpl;
+import android.view.ViewStructure;
 import android.view.WindowManager;
 import android.view.WindowManagerGlobal;
+import android.view.autofill.AutoFillId;
 import android.view.autofill.AutoFillType;
 import android.view.autofill.AutoFillValue;
-import android.view.autofill.AutoFillId;
 
 import java.util.ArrayList;
 
@@ -420,18 +420,17 @@
             mRoot = new ViewNode();
 
             ViewNodeBuilder builder = new ViewNodeBuilder(assist, mRoot, false, 0);
-            if ((root.getWindowFlags()& WindowManager.LayoutParams.FLAG_SECURE) != 0) {
-                // This is a secure window, so it doesn't want a screenshot, and that
-                // means we should also not copy out its view hierarchy.
-
+            if ((root.getWindowFlags() & WindowManager.LayoutParams.FLAG_SECURE) != 0) {
                 if (forAutoFill) {
                     // NOTE: flags are currently not supported, hence 0
                     view.onProvideAutoFillStructure(builder, 0);
                 } else {
+                    // This is a secure window, so it doesn't want a screenshot, and that
+                    // means we should also not copy out its view hierarchy for Assist
                     view.onProvideStructure(builder);
+                    builder.setAssistBlocked(true);
+                    return;
                 }
-                builder.setAssistBlocked(true);
-                return;
             }
             if (forAutoFill) {
                 // NOTE: flags are currently not supported, hence 0
@@ -580,6 +579,7 @@
         static final int FLAGS_HAS_EXTRAS = 0x00400000;
         static final int FLAGS_HAS_ID = 0x00200000;
         static final int FLAGS_HAS_CHILDREN = 0x00100000;
+        static final int FLAGS_HAS_URL = 0x00080000;
         static final int FLAGS_ALL_CONTROL = 0xfff00000;
 
         int mFlags;
@@ -588,6 +588,7 @@
         CharSequence mContentDescription;
 
         ViewNodeText mText;
+        String mUrl;
         Bundle mExtras;
 
         ViewNode[] mChildren;
@@ -652,6 +653,9 @@
             if ((flags&FLAGS_HAS_TEXT) != 0) {
                 mText = new ViewNodeText(in, (flags&FLAGS_HAS_COMPLEX_TEXT) == 0);
             }
+            if ((flags&FLAGS_HAS_URL) != 0) {
+                mUrl = in.readString();
+            }
             if ((flags&FLAGS_HAS_EXTRAS) != 0) {
                 mExtras = in.readBundle();
             }
@@ -705,6 +709,9 @@
                     flags |= FLAGS_HAS_COMPLEX_TEXT;
                 }
             }
+            if (mUrl != null) {
+                flags |= FLAGS_HAS_URL;
+            }
             if (mExtras != null) {
                 flags |= FLAGS_HAS_EXTRAS;
             }
@@ -761,6 +768,9 @@
             if ((flags&FLAGS_HAS_TEXT) != 0) {
                 mText.writeToParcel(out, (flags&FLAGS_HAS_COMPLEX_TEXT) == 0, writeSensitive);
             }
+            if ((flags&FLAGS_HAS_URL) != 0) {
+                out.writeString(mUrl);
+            }
             if ((flags&FLAGS_HAS_EXTRAS) != 0) {
                 out.writeBundle(mExtras);
             }
@@ -1041,6 +1051,20 @@
         }
 
         /**
+         * Returns the URL represented by this node.
+         *
+         * <p>Typically used in 2 categories of nodes:
+         *
+         * <ol>
+         * <li>Root node (containing the URL of the HTML page)
+         * <li>Child nodes that represent hyperlinks (contains the hyperlink URL).
+         * </ol>
+         */
+        public String getUrl() {
+            return mUrl;
+        }
+
+        /**
          * Returns any text associated with the node that is displayed to the user, or null
          * if there is none.
          */
@@ -1487,6 +1511,11 @@
         public void setSanitized(boolean sanitized) {
             mNode.mSanitized = sanitized;
         }
+
+        @Override
+        public void setUrl(String url) {
+            mNode.mUrl = url;
+        }
     }
 
     /** @hide */
@@ -1584,6 +1613,10 @@
             Log.i(TAG, prefix + "  Text color fg: #" + Integer.toHexString(node.getTextColor())
                     + ", bg: #" + Integer.toHexString(node.getTextBackgroundColor()));
         }
+        CharSequence url = node.getUrl();
+        if (url != null) {
+            Log.i(TAG, prefix + "  URL: " + url);
+        }
         String hint = node.getHint();
         if (hint != null) {
             Log.i(TAG, prefix + "  Hint: " + hint);
diff --git a/core/java/android/app/backup/BackupAgent.java b/core/java/android/app/backup/BackupAgent.java
index 45d9fb7..11636a5 100644
--- a/core/java/android/app/backup/BackupAgent.java
+++ b/core/java/android/app/backup/BackupAgent.java
@@ -133,6 +133,8 @@
 
     Handler mHandler = null;
 
+    private long mBackupQuotaBytes = -1;
+
     Handler getHandler() {
         if (mHandler == null) {
             mHandler = new Handler(Looper.getMainLooper());
@@ -184,6 +186,21 @@
     }
 
     /**
+     * Returns the quota in bytes for the currently requested backup operation. The value can
+     * vary for each operation depending on the type of backup being done.
+     *
+     * <p>Can be called only from {@link BackupAgent#onFullBackup(FullBackupDataOutput)} or
+     * {@link BackupAgent#onBackup(ParcelFileDescriptor, BackupDataOutput, ParcelFileDescriptor)}.
+     */
+    public long getBackupQuota() {
+        if (mBackupQuotaBytes < 0) {
+            throw new IllegalStateException(
+                    "Backup quota is available only during backup operations.");
+        }
+        return mBackupQuotaBytes;
+    }
+
+    /**
      * The application is being asked to write any data changed since the last
      * time it performed a backup operation. The state data recorded during the
      * last backup pass is provided in the <code>oldState</code> file
@@ -897,10 +914,12 @@
         public void doBackup(ParcelFileDescriptor oldState,
                 ParcelFileDescriptor data,
                 ParcelFileDescriptor newState,
-                int token, IBackupManager callbackBinder) throws RemoteException {
+                long quotaBytes, int token, IBackupManager callbackBinder) throws RemoteException {
             // Ensure that we're running with the app's normal permission level
             long ident = Binder.clearCallingIdentity();
 
+            mBackupQuotaBytes = quotaBytes;
+
             if (DEBUG) Log.v(TAG, "doBackup() invoked");
             BackupDataOutput output = new BackupDataOutput(data.getFileDescriptor());
 
@@ -918,6 +937,9 @@
                 // guarantee themselves).
                 waitForSharedPrefs();
 
+                // Unset quota after onBackup is done.
+                mBackupQuotaBytes = -1;
+
                 Binder.restoreCallingIdentity(ident);
                 try {
                     callbackBinder.opComplete(token, 0);
@@ -971,10 +993,12 @@
 
         @Override
         public void doFullBackup(ParcelFileDescriptor data,
-                int token, IBackupManager callbackBinder) {
+                long quotaBytes, int token, IBackupManager callbackBinder) {
             // Ensure that we're running with the app's normal permission level
             long ident = Binder.clearCallingIdentity();
 
+            mBackupQuotaBytes = quotaBytes;
+
             if (DEBUG) Log.v(TAG, "doFullBackup() invoked");
 
             // Ensure that any SharedPreferences writes have landed *before*
@@ -993,6 +1017,9 @@
                 // ... and then again after, as in the doBackup() case
                 waitForSharedPrefs();
 
+                // Unset quota after onFullBackup is done.
+                mBackupQuotaBytes = -1;
+
                 // Send the EOD marker indicating that there is no more data
                 // forthcoming from this agent.
                 try {
@@ -1016,11 +1043,13 @@
             }
         }
 
-        public void doMeasureFullBackup(int token, IBackupManager callbackBinder) {
+        public void doMeasureFullBackup(long quotaBytes, int token, IBackupManager callbackBinder) {
             // Ensure that we're running with the app's normal permission level
             final long ident = Binder.clearCallingIdentity();
             FullBackupDataOutput measureOutput = new FullBackupDataOutput();
 
+            mBackupQuotaBytes = quotaBytes;
+
             waitForSharedPrefs();
             try {
                 BackupAgent.this.onFullBackup(measureOutput);
@@ -1031,6 +1060,8 @@
                 Log.d(TAG, "onFullBackup[M] (" + BackupAgent.this.getClass().getName() + ") threw", ex);
                 throw ex;
             } finally {
+                // Unset quota after onFullBackup is done.
+                mBackupQuotaBytes = -1;
                 Binder.restoreCallingIdentity(ident);
                 try {
                     callbackBinder.opComplete(token, measureOutput.getSize());
diff --git a/core/java/android/app/backup/BackupManager.java b/core/java/android/app/backup/BackupManager.java
index f0abe33..9d02f53 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;
@@ -88,6 +89,14 @@
     public static final int ERROR_PACKAGE_NOT_FOUND = -2002;
 
     /**
+     * The backup operation was cancelled.
+     *
+     * @hide
+     */
+    @SystemApi
+    public static final int ERROR_BACKUP_CANCELLED = -2003;
+
+    /**
      * The transport for some reason was not in a good state and
      * aborted the entire backup request. This is a transient
      * failure and should not be retried immediately.
@@ -257,16 +266,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 +318,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 +593,7 @@
      */
     @SystemApi
     public int requestBackup(String[] packages, BackupObserver observer) {
-        return requestBackup(packages, observer, 0);
+        return requestBackup(packages, observer, null, 0);
     }
 
     /**
@@ -570,20 +607,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");
             }
@@ -591,6 +634,26 @@
         return -1;
     }
 
+    /**
+     * Cancel all running backups. After this call returns, no currently running backups will
+     * interact with the selected transport.
+     *
+     * <p>Callers must hold the android.permission.BACKUP permission to use this method.
+     *
+     * @hide
+     */
+    @SystemApi
+    public void cancelBackups() {
+        checkServiceBinder();
+        if (sService != null) {
+            try {
+                sService.cancelBackups();
+            } catch (RemoteException e) {
+                Log.e(TAG, "cancelBackups() couldn't connect.");
+            }
+        }
+    }
+
     /*
      * We wrap incoming binder calls with a private class implementation that
      * redirects them into main-thread actions.  This serializes the backup
@@ -680,4 +743,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..59a941a 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,19 @@
      * @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);
+
+    /**
+     * Cancel all running backups. After this call returns, no currently running backups will
+     * interact with the selected transport.
+     */
+    void cancelBackups();
 }
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/app/usage/UsageStats.java b/core/java/android/app/usage/UsageStats.java
index 57f18f1..0874095 100644
--- a/core/java/android/app/usage/UsageStats.java
+++ b/core/java/android/app/usage/UsageStats.java
@@ -138,13 +138,13 @@
                     mPackageName + "' with UsageStats for package '" + right.mPackageName + "'.");
         }
 
+        // We use the mBeginTimeStamp due to a bug where UsageStats files can overlap with
+        // regards to their mEndTimeStamp.
         if (right.mBeginTimeStamp > mBeginTimeStamp) {
-            // The incoming UsageStat begins after this one, so use its last time used fields
-            // as the source of truth.
-            // We use the mBeginTimeStamp due to a bug where UsageStats files can overlap with
-            // regards to their mEndTimeStamp.
-            mLastEvent = right.mLastEvent;
-            mLastTimeUsed = right.mLastTimeUsed;
+            // Even though incoming UsageStat begins after this one, its last time used fields
+            // may somehow be empty or chronologically preceding the older UsageStat.
+            mLastEvent = Math.max(mLastEvent, right.mLastEvent);
+            mLastTimeUsed = Math.max(mLastTimeUsed, right.mLastTimeUsed);
         }
         mBeginTimeStamp = Math.min(mBeginTimeStamp, right.mBeginTimeStamp);
         mEndTimeStamp = Math.max(mEndTimeStamp, right.mEndTimeStamp);
diff --git a/core/java/android/bluetooth/BluetoothCodecConfig.java b/core/java/android/bluetooth/BluetoothCodecConfig.java
index a482103..176e48f 100644
--- a/core/java/android/bluetooth/BluetoothCodecConfig.java
+++ b/core/java/android/bluetooth/BluetoothCodecConfig.java
@@ -37,9 +37,11 @@
     public static final int SOURCE_CODEC_TYPE_APTX    = 2;
     public static final int SOURCE_CODEC_TYPE_APTX_HD = 3;
     public static final int SOURCE_CODEC_TYPE_LDAC    = 4;
+    public static final int SOURCE_CODEC_TYPE_MAX     = 5;
 
     public static final int SOURCE_CODEC_TYPE_INVALID = 1000 * 1000;
 
+    public static final int CODEC_PRIORITY_DISABLED = -1;
     public static final int CODEC_PRIORITY_DEFAULT = 0;
     public static final int CODEC_PRIORITY_HIGHEST = 1000 * 1000;
 
@@ -72,7 +74,7 @@
 
     public BluetoothCodecConfig(int codecType, int codecPriority,
                                 int sampleRate, int bitsPerSample,
-                                int channelMode,long codecSpecific1,
+                                int channelMode, long codecSpecific1,
                                 long codecSpecific2, long codecSpecific3,
                                 long codecSpecific4) {
         mCodecType = codecType;
diff --git a/core/java/android/bluetooth/le/ScanFilter.java b/core/java/android/bluetooth/le/ScanFilter.java
index 17a802d..b89c64a 100644
--- a/core/java/android/bluetooth/le/ScanFilter.java
+++ b/core/java/android/bluetooth/le/ScanFilter.java
@@ -67,7 +67,9 @@
     private final byte[] mManufacturerData;
     @Nullable
     private final byte[] mManufacturerDataMask;
-    private static final ScanFilter EMPTY = new ScanFilter.Builder().build() ;
+
+    /** @hide */
+    public static final ScanFilter EMPTY = new ScanFilter.Builder().build() ;
 
 
     private ScanFilter(String name, String deviceAddress, ParcelUuid uuid,
@@ -318,8 +320,12 @@
         return true;
     }
 
-    // Check if the uuid pattern is contained in a list of parcel uuids.
-    private boolean matchesServiceUuids(ParcelUuid uuid, ParcelUuid parcelUuidMask,
+    /**
+     * Check if the uuid pattern is contained in a list of parcel uuids.
+     *
+     * @hide
+     */
+    public static boolean matchesServiceUuids(ParcelUuid uuid, ParcelUuid parcelUuidMask,
             List<ParcelUuid> uuids) {
         if (uuid == null) {
             return true;
@@ -338,7 +344,7 @@
     }
 
     // Check if the uuid pattern matches the particular service uuid.
-    private boolean matchesServiceUuid(UUID uuid, UUID mask, UUID data) {
+    private static boolean matchesServiceUuid(UUID uuid, UUID mask, UUID data) {
         if (mask == null) {
             return uuid.equals(data);
         }
diff --git a/core/java/android/view/autofill/FillResponse.aidl b/core/java/android/companion/AssociationRequest.aidl
similarity index 75%
copy from core/java/android/view/autofill/FillResponse.aidl
copy to core/java/android/companion/AssociationRequest.aidl
index b018f15..6c91062 100644
--- a/core/java/android/view/autofill/FillResponse.aidl
+++ b/core/java/android/companion/AssociationRequest.aidl
@@ -1,11 +1,11 @@
-/**
- * Copyright (c) 2016, The Android Open Source Project
+/*
+ * 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
+ *      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,
@@ -14,6 +14,6 @@
  * limitations under the License.
  */
 
-package android.view.autofill;
+package android.companion;
 
-parcelable FillResponse;
\ No newline at end of file
+parcelable AssociationRequest;
diff --git a/core/java/android/companion/AssociationRequest.java b/core/java/android/companion/AssociationRequest.java
new file mode 100644
index 0000000..d477f43
--- /dev/null
+++ b/core/java/android/companion/AssociationRequest.java
@@ -0,0 +1,191 @@
+/*
+ * 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.companion;
+
+import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.provider.OneTimeUseBuilder;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * A request for the user to select a companion device to associate with.
+ *
+ * You can optionally set a {@link Builder#setDeviceFilter filter} for which devices to show to the
+ * user to select from.
+ * The exact type and fields of the filter you can set depend on the
+ * medium type. See {@link Builder}'s static factory methods for specific protocols that are
+ * supported.
+ *
+ * You can also set {@link Builder#setSingleDevice single device} to request a popup with single
+ * device to be shown instead of a list to choose from
+ *
+ * @param <F> Device filter type
+ */
+public final class AssociationRequest<F extends DeviceFilter> implements Parcelable {
+
+    /** @hide */
+    public static final int MEDIUM_TYPE_BLUETOOTH = 0;
+    /** @hide */
+    public static final int MEDIUM_TYPE_BLUETOOTH_LE = 1;
+    /** @hide */
+    public static final int MEDIUM_TYPE_WIFI = 2;
+
+    /** @hide */
+    @IntDef({MEDIUM_TYPE_BLUETOOTH, MEDIUM_TYPE_BLUETOOTH_LE, MEDIUM_TYPE_WIFI})
+    @Retention(RetentionPolicy.SOURCE)
+    public @interface MediumType {}
+
+    private final boolean mSingleDevice;
+    private final int mMediumType;
+    private final F mDeviceFilter;
+
+    private AssociationRequest(boolean singleDevice, int mMediumType, F deviceFilter) {
+        this.mSingleDevice = singleDevice;
+        this.mMediumType = mMediumType;
+        this.mDeviceFilter = deviceFilter;
+    }
+
+    private AssociationRequest(Parcel in) {
+        this(
+            in.readByte() != 0,
+            in.readInt(),
+            in.readParcelable(AssociationRequest.class.getClassLoader()));
+    }
+
+    /** @hide */
+    public boolean isSingleDevice() {
+        return mSingleDevice;
+    }
+
+    /** @hide */
+    @MediumType
+    public int getMediumType() {
+        return mMediumType;
+    }
+
+    /** @hide */
+    @Nullable
+    public F getDeviceFilter() {
+        return mDeviceFilter;
+    }
+
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeByte((byte) (mSingleDevice ? 1 : 0));
+        dest.writeInt(mMediumType);
+        dest.writeParcelable(mDeviceFilter, flags);
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    public static final Creator<AssociationRequest> CREATOR = new Creator<AssociationRequest>() {
+        @Override
+        public AssociationRequest createFromParcel(Parcel in) {
+            return new AssociationRequest(in);
+        }
+
+        @Override
+        public AssociationRequest[] newArray(int size) {
+            return new AssociationRequest[size];
+        }
+    };
+
+    /**
+     * A builder for {@link AssociationRequest}
+     *
+     * @param <F> the type of filter for the request.
+     */
+    public static final class Builder<F extends DeviceFilter>
+            extends OneTimeUseBuilder<AssociationRequest<F>> {
+        private boolean mSingleDevice = false;
+        @MediumType private int mMediumType;
+        @Nullable private F mDeviceFilter = null;
+
+        private Builder() {}
+
+        /**
+         * Create a new builder for an association request with a Bluetooth LE device
+         */
+        @NonNull
+        public static Builder<BluetoothLEDeviceFilter> createForBluetoothLEDevice() {
+            return new Builder<BluetoothLEDeviceFilter>()
+                    .setMediumType(MEDIUM_TYPE_BLUETOOTH_LE);
+        }
+
+        /**
+         * Create a new builder for an association request with a Bluetooth(non-LE) device
+         */
+        @NonNull
+        public static Builder<BluetoothDeviceFilter> createForBluetoothDevice() {
+            return new Builder<BluetoothDeviceFilter>()
+                    .setMediumType(MEDIUM_TYPE_BLUETOOTH);
+        }
+
+        //TODO implement, once specific filter classes are available
+//        public static Builder<> createForWiFiDevice()
+//        public static Builder<> createForNanDevice()
+
+        /**
+         * @param singleDevice if true, scanning for a device will stop as soon as at least one
+         *                     fitting device is found
+         */
+        @NonNull
+        public Builder<F> setSingleDevice(boolean singleDevice) {
+            checkNotUsed();
+            this.mSingleDevice = singleDevice;
+            return this;
+        }
+
+        /**
+         * @param deviceFilter if set, only devices matching the given filter will be shown to the
+         *                     user
+         */
+        @NonNull
+        public Builder<F> setDeviceFilter(@Nullable F deviceFilter) {
+            checkNotUsed();
+            this.mDeviceFilter = deviceFilter;
+            return this;
+        }
+
+        /**
+         * @param deviceType A type of medium over which to discover devices
+         *
+         * @see MediumType
+         */
+        @NonNull
+        private Builder<F> setMediumType(@MediumType int deviceType) {
+            mMediumType = deviceType;
+            return this;
+        }
+
+        /** @inheritDoc */
+        @NonNull
+        @Override
+        public AssociationRequest<F> build() {
+            markUsed();
+            return new AssociationRequest<>(mSingleDevice, mMediumType, mDeviceFilter);
+        }
+    }
+}
diff --git a/core/java/android/companion/BluetoothDeviceFilter.java b/core/java/android/companion/BluetoothDeviceFilter.java
new file mode 100644
index 0000000..5a69955
--- /dev/null
+++ b/core/java/android/companion/BluetoothDeviceFilter.java
@@ -0,0 +1,202 @@
+/*
+ * 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.companion;
+
+import static android.companion.BluetoothDeviceFilterUtils.matchesAddress;
+import static android.companion.BluetoothDeviceFilterUtils.matchesName;
+import static android.companion.BluetoothDeviceFilterUtils.matchesServiceUuids;
+import static android.companion.BluetoothDeviceFilterUtils.patternFromString;
+import static android.companion.BluetoothDeviceFilterUtils.patternToString;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.bluetooth.BluetoothDevice;
+import android.os.Parcel;
+import android.os.ParcelUuid;
+import android.provider.OneTimeUseBuilder;
+
+import com.android.internal.util.ArrayUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Pattern;
+
+/**
+ * A filter for Bluetooth(non-LE) devices
+ */
+public final class BluetoothDeviceFilter implements DeviceFilter<BluetoothDevice> {
+
+    private static BluetoothDeviceFilter NO_OP;
+
+    private final Pattern mNamePattern;
+    private final String mAddress;
+    private final List<ParcelUuid> mServiceUuids;
+    private final List<ParcelUuid> mServiceUuidMasks;
+
+    private BluetoothDeviceFilter(
+            Pattern namePattern,
+            String address,
+            List<ParcelUuid> serviceUuids,
+            List<ParcelUuid> serviceUuidMasks) {
+        mNamePattern = namePattern;
+        mAddress = address;
+        mServiceUuids = ArrayUtils.emptyIfNull(serviceUuids);
+        mServiceUuidMasks = ArrayUtils.emptyIfNull(serviceUuidMasks);
+    }
+
+    private BluetoothDeviceFilter(Parcel in) {
+        this(
+            patternFromString(in.readString()),
+            in.readString(),
+            readUuids(in),
+            readUuids(in));
+    }
+
+    private static List<ParcelUuid> readUuids(Parcel in) {
+        final ArrayList<ParcelUuid> list = new ArrayList<>();
+        in.readParcelableList(list, ParcelUuid.class.getClassLoader());
+        return list;
+    }
+
+    /** @hide */
+    @NonNull
+    public static BluetoothDeviceFilter nullsafe(@Nullable BluetoothDeviceFilter nullable) {
+        return nullable != null ? nullable : noOp();
+    }
+
+    /** @hide */
+    @NonNull
+    public static BluetoothDeviceFilter noOp() {
+        if (NO_OP == null) NO_OP = new Builder().build();
+        return NO_OP;
+    }
+
+    /** @hide */
+    @Override
+    public boolean matches(BluetoothDevice device) {
+        return matchesAddress(mAddress, device)
+                && matchesServiceUuids(mServiceUuids, mServiceUuidMasks, device)
+                && matchesName(getNamePattern(), device);
+    }
+
+    /** @hide */
+    @Nullable
+    public Pattern getNamePattern() {
+        return mNamePattern;
+    }
+
+    /** @hide */
+    @Nullable
+    public String getAddress() {
+        return mAddress;
+    }
+
+    /** @hide */
+    @NonNull
+    public List<ParcelUuid> getServiceUuids() {
+        return mServiceUuids;
+    }
+
+    /** @hide */
+    @NonNull
+    public List<ParcelUuid> getServiceUuidMasks() {
+        return mServiceUuidMasks;
+    }
+
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeString(patternToString(getNamePattern()));
+        dest.writeString(mAddress);
+        dest.writeParcelableList(mServiceUuids, flags);
+        dest.writeParcelableList(mServiceUuidMasks, flags);
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    public static final Creator<BluetoothDeviceFilter> CREATOR
+            = new Creator<BluetoothDeviceFilter>() {
+        @Override
+        public BluetoothDeviceFilter createFromParcel(Parcel in) {
+            return new BluetoothDeviceFilter(in);
+        }
+
+        @Override
+        public BluetoothDeviceFilter[] newArray(int size) {
+            return new BluetoothDeviceFilter[size];
+        }
+    };
+
+    /**
+     * A builder for {@link BluetoothDeviceFilter}
+     */
+    public static final class Builder extends OneTimeUseBuilder<BluetoothDeviceFilter> {
+        private Pattern mNamePattern;
+        private String mAddress;
+        private ArrayList<ParcelUuid> mServiceUuid;
+        private ArrayList<ParcelUuid> mServiceUuidMask;
+
+        /**
+         * @param regex if set, only devices with {@link BluetoothDevice#getName name} matching the
+         *              given regular expression will be shown
+         */
+        public Builder setNamePattern(@Nullable Pattern regex) {
+            checkNotUsed();
+            mNamePattern = regex;
+            return this;
+        }
+
+        /**
+         * @param address if set, only devices with MAC address exactly matching the given one will
+         *                pass the filter
+         */
+        @NonNull
+        public Builder setAddress(@Nullable String address) {
+            checkNotUsed();
+            mAddress = address;
+            return this;
+        }
+
+        /**
+         * Add filtering by certain bits of {@link BluetoothDevice#getUuids()}
+         *
+         * A device with any uuid matching the given bits is considered passing
+         *
+         * @param serviceUuid the values for the bits to match
+         * @param serviceUuidMask if provided, only those bits would have to match.
+         */
+        @NonNull
+        public Builder addServiceUuid(
+                @Nullable ParcelUuid serviceUuid, @Nullable ParcelUuid serviceUuidMask) {
+            checkNotUsed();
+            mServiceUuid = ArrayUtils.add(mServiceUuid, serviceUuid);
+            mServiceUuidMask = ArrayUtils.add(mServiceUuidMask, serviceUuidMask);
+            return this;
+        }
+
+        /** @inheritDoc */
+        @Override
+        @NonNull
+        public BluetoothDeviceFilter build() {
+            markUsed();
+            return new BluetoothDeviceFilter(
+                    mNamePattern, mAddress, mServiceUuid, mServiceUuidMask);
+        }
+    }
+}
diff --git a/core/java/android/companion/BluetoothDeviceFilterUtils.java b/core/java/android/companion/BluetoothDeviceFilterUtils.java
new file mode 100644
index 0000000..289f995
--- /dev/null
+++ b/core/java/android/companion/BluetoothDeviceFilterUtils.java
@@ -0,0 +1,107 @@
+/*
+ * 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.companion;
+
+import static android.text.TextUtils.firstNotEmpty;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.bluetooth.BluetoothDevice;
+import android.bluetooth.le.ScanFilter;
+import android.os.ParcelUuid;
+import android.util.Log;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.regex.Pattern;
+
+/** @hide */
+public class BluetoothDeviceFilterUtils {
+    private BluetoothDeviceFilterUtils() {}
+
+    private static final boolean DEBUG = false;
+    private static final String LOG_TAG = "BluetoothDeviceFilterUtil";
+
+    @Nullable
+    static String patternToString(@Nullable Pattern p) {
+        return p == null ? null : p.pattern();
+    }
+
+    @Nullable
+    static Pattern patternFromString(@Nullable String s) {
+        return s == null ? null : Pattern.compile(s);
+    }
+
+    static boolean matches(ScanFilter filter, BluetoothDevice device) {
+        return matchesAddress(filter.getDeviceAddress(), device)
+                && matchesServiceUuid(filter.getServiceUuid(), filter.getServiceUuidMask(), device);
+    }
+
+    static boolean matchesAddress(String deviceAddress, BluetoothDevice device) {
+        final boolean result = deviceAddress == null
+                || (device == null || !deviceAddress.equals(device.getAddress()));
+        if (DEBUG) debugLogMatchResult(result, device, deviceAddress);
+        return result;
+    }
+
+    static boolean matchesServiceUuids(List<ParcelUuid> serviceUuids,
+            List<ParcelUuid> serviceUuidMasks, BluetoothDevice device) {
+        for (int i = 0; i < serviceUuids.size(); i++) {
+            ParcelUuid uuid = serviceUuids.get(i);
+            ParcelUuid uuidMask = serviceUuidMasks.get(i);
+            if (!matchesServiceUuid(uuid, uuidMask, device)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    static boolean matchesServiceUuid(ParcelUuid serviceUuid, ParcelUuid serviceUuidMask,
+            BluetoothDevice device) {
+        final boolean result = serviceUuid == null ||
+                ScanFilter.matchesServiceUuids(
+                        serviceUuid,
+                        serviceUuidMask,
+                        Arrays.asList(device.getUuids()));
+        if (DEBUG) debugLogMatchResult(result, device, serviceUuid);
+        return result;
+    }
+
+    static boolean matchesName(@Nullable Pattern namePattern, BluetoothDevice device) {
+        boolean result;
+        if (namePattern == null)  {
+            result = true;
+        } else if (device == null) {
+            result = false;
+        } else {
+            final String name = device.getName();
+            result = name != null && namePattern.matcher(name).find();
+        }
+        if (DEBUG) debugLogMatchResult(result, device, namePattern);
+        return result;
+    }
+
+    private static void debugLogMatchResult(
+            boolean result, BluetoothDevice device, Object criteria) {
+        Log.i(LOG_TAG, getDeviceDisplayName(device) + (result ? " ~ " : " !~ ") + criteria);
+    }
+
+    public static String getDeviceDisplayName(@NonNull BluetoothDevice device) {
+        return firstNotEmpty(device.getAliasName(), device.getAddress());
+    }
+}
diff --git a/wifi/java/android/net/wifi/hotspot2/pps/HomeSP.aidl b/core/java/android/companion/BluetoothLEDeviceFilter.aidl
similarity index 74%
copy from wifi/java/android/net/wifi/hotspot2/pps/HomeSP.aidl
copy to core/java/android/companion/BluetoothLEDeviceFilter.aidl
index 62d5603..628cf7b 100644
--- a/wifi/java/android/net/wifi/hotspot2/pps/HomeSP.aidl
+++ b/core/java/android/companion/BluetoothLEDeviceFilter.aidl
@@ -1,11 +1,11 @@
-/**
- * Copyright (c) 2016, The Android Open Source Project
+/*
+ * 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
+ *      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,
@@ -14,6 +14,6 @@
  * limitations under the License.
  */
 
-package android.net.wifi.hotspot2.pps;
+package android.companion;
 
-parcelable HomeSP;
+parcelable BluetoothLEDeviceFilter;
diff --git a/core/java/android/companion/BluetoothLEDeviceFilter.java b/core/java/android/companion/BluetoothLEDeviceFilter.java
new file mode 100644
index 0000000..4a481ca
--- /dev/null
+++ b/core/java/android/companion/BluetoothLEDeviceFilter.java
@@ -0,0 +1,151 @@
+/*
+ * 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.companion;
+
+import static android.companion.BluetoothDeviceFilterUtils.patternFromString;
+import static android.companion.BluetoothDeviceFilterUtils.patternToString;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.annotation.SuppressLint;
+import android.bluetooth.BluetoothDevice;
+import android.bluetooth.le.ScanFilter;
+import android.os.Parcel;
+import android.provider.OneTimeUseBuilder;
+
+import com.android.internal.util.ObjectUtils;
+
+import java.util.regex.Pattern;
+
+/**
+ * A filter for Bluetooth LE devices
+ *
+ * @see ScanFilter
+ */
+public final class BluetoothLEDeviceFilter implements DeviceFilter<BluetoothDevice> {
+
+    private static BluetoothLEDeviceFilter NO_OP;
+
+    private final Pattern mNamePattern;
+    private final ScanFilter mScanFilter;
+
+    private BluetoothLEDeviceFilter(Pattern namePattern, ScanFilter scanFilter) {
+        mNamePattern = namePattern;
+        mScanFilter = ObjectUtils.firstNotNull(scanFilter, ScanFilter.EMPTY);
+    }
+
+    @SuppressLint("ParcelClassLoader")
+    private BluetoothLEDeviceFilter(Parcel in) {
+        this(
+            patternFromString(in.readString()),
+            in.readParcelable(null));
+    }
+
+    /** @hide */
+    @NonNull
+    public static BluetoothLEDeviceFilter nullsafe(@Nullable BluetoothLEDeviceFilter nullable) {
+        return nullable != null ? nullable : noOp();
+    }
+
+    /** @hide */
+    @NonNull
+    public static BluetoothLEDeviceFilter noOp() {
+        if (NO_OP == null) NO_OP = new Builder().build();
+        return NO_OP;
+    }
+
+    /** @hide */
+    @Nullable
+    public Pattern getNamePattern() {
+        return mNamePattern;
+    }
+
+    /** @hide */
+    @NonNull
+    public ScanFilter getScanFilter() {
+        return mScanFilter;
+    }
+
+    /** @hide */
+    @Override
+    public boolean matches(BluetoothDevice device) {
+        return BluetoothDeviceFilterUtils.matches(getScanFilter(), device)
+                && BluetoothDeviceFilterUtils.matchesName(getNamePattern(), device);
+    }
+
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeString(patternToString(getNamePattern()));
+        dest.writeParcelable(mScanFilter, flags);
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    public static final Creator<BluetoothLEDeviceFilter> CREATOR
+            = new Creator<BluetoothLEDeviceFilter>() {
+        @Override
+        public BluetoothLEDeviceFilter createFromParcel(Parcel in) {
+            return new BluetoothLEDeviceFilter(in);
+        }
+
+        @Override
+        public BluetoothLEDeviceFilter[] newArray(int size) {
+            return new BluetoothLEDeviceFilter[size];
+        }
+    };
+
+    /**
+     * Builder for {@link BluetoothLEDeviceFilter}
+     */
+    public static final class Builder extends OneTimeUseBuilder<BluetoothLEDeviceFilter> {
+        private ScanFilter mScanFilter;
+        private Pattern mNamePattern;
+
+        /**
+         * @param regex if set, only devices with {@link BluetoothDevice#getName name} matching the
+         *              given regular expression will be shown
+         */
+        public Builder setNamePattern(@Nullable Pattern regex) {
+            checkNotUsed();
+            mNamePattern = regex;
+            return this;
+        }
+
+        /**
+         * @param scanFilter a {@link ScanFilter} to filter devices by
+         *
+         * @see ScanFilter for specific details on its various fields
+         */
+        @NonNull
+        public Builder setScanFilter(@Nullable ScanFilter scanFilter) {
+            checkNotUsed();
+            mScanFilter = scanFilter;
+            return this;
+        }
+
+        /** @inheritDoc */
+        @Override
+        @NonNull
+        public BluetoothLEDeviceFilter build() {
+            markUsed();
+            return new BluetoothLEDeviceFilter(mNamePattern, mScanFilter);
+        }
+    }
+}
diff --git a/core/java/android/companion/CompanionDeviceManager.java b/core/java/android/companion/CompanionDeviceManager.java
new file mode 100644
index 0000000..c0c1a4d
--- /dev/null
+++ b/core/java/android/companion/CompanionDeviceManager.java
@@ -0,0 +1,153 @@
+/*
+ * 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.companion;
+
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.app.PendingIntent;
+import android.content.Context;
+import android.content.IntentSender;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.RemoteException;
+
+/**
+ * System level service for managing companion devices
+ *
+ * <p>To obtain an instance call {@link Context#getSystemService}({@link
+ * Context#COMPANION_DEVICE_SERVICE}) Then, call {@link #associate(AssociationRequest,
+ * Callback, Handler)} to initiate the flow of associating current package with a
+ * device selected by user.</p>
+ *
+ * @see AssociationRequest
+ */
+public final class CompanionDeviceManager {
+
+    /**
+     * A device, returned in the activity result of the {@link IntentSender} received in
+     * {@link Callback#onDeviceFound}
+     */
+    public static final String EXTRA_DEVICE = "android.companion.extra.DEVICE";
+
+    /**
+     * The package name of the companion device discovery component.
+     *
+     * @hide
+     */
+    public static final String COMPANION_DEVICE_DISCOVERY_PACKAGE_NAME =
+            "com.android.companiondevicemanager";
+
+    /**
+     * A callback to receive once at least one suitable device is found, or the search failed
+     * (e.g. timed out)
+     */
+    public abstract static class Callback {
+
+        /**
+         * Called once at least one suitable device is found
+         *
+         * @param chooserLauncher a {@link IntentSender} to launch the UI for user to select a
+         *                        device
+         */
+        public abstract void onDeviceFound(IntentSender chooserLauncher);
+
+        /**
+         * Called if there was an error looking for device(s), e.g. timeout
+         *
+         * @param error the cause of the error
+         */
+        public abstract void onFailure(CharSequence error);
+    }
+
+    private final ICompanionDeviceManager mService;
+    private final Context mContext;
+
+    /** @hide */
+    public CompanionDeviceManager(
+            @NonNull ICompanionDeviceManager service, @NonNull Context context) {
+        mService = service;
+        mContext = context;
+    }
+
+    /**
+     * Associate this app with a companion device, selected by user
+     *
+     * <p>Once at least one appropriate device is found, {@code callback} will be called with a
+     * {@link PendingIntent} that can be used to show the list of available devices for the user
+     * to select.
+     * It should be started for result (i.e. using
+     * {@link android.app.Activity#startIntentSenderForResult}), as the resulting
+     * {@link android.content.Intent} will contain extra {@link #EXTRA_DEVICE}, with the selected
+     * device. (e.g. {@link android.bluetooth.BluetoothDevice})</p>
+     *
+     * <p>If your app needs to be excluded from battery optimizations (run in the background)
+     * or to have unrestricted data access (use data in the background) you can declare that
+     * you use the {@link android.Manifest.permission#RUN_IN_BACKGROUND} and {@link
+     * android.Manifest.permission#USE_DATA_IN_BACKGROUND} respectively. Note that these
+     * special capabilities have a negative effect on the device's battery and user's data
+     * usage, therefore you should requested them when absolutely necessary.</p>
+     *
+     * @param request specific details about this request
+     * @param callback will be called once there's at least one device found for user to choose from
+     * @param handler A handler to control which thread the callback will be delivered on, or null,
+     *                to deliver it on main thread
+     *
+     * @see AssociationRequest
+     */
+    public void associate(
+            @NonNull AssociationRequest<?> request,
+            @NonNull Callback callback,
+            @Nullable Handler handler) {
+        final Handler finalHandler = handler != null
+                ? handler
+                : new Handler(Looper.getMainLooper());
+        try {
+            mService.associate(
+                    request,
+                    new IFindDeviceCallback.Stub() {
+                        @Override
+                        public void onSuccess(PendingIntent launcher) {
+                            finalHandler.post(() -> {
+                                callback.onDeviceFound(launcher.getIntentSender());
+                            });
+                        }
+
+                        @Override
+                        public void onFailure(CharSequence reason) {
+                            finalHandler.post(() -> callback.onFailure(reason));
+                        }
+                    },
+                    mContext.getPackageName());
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /** @hide */
+    public void requestNotificationAccess() {
+        //TODO implement
+        throw new UnsupportedOperationException("Not yet implemented");
+    }
+
+    /** @hide */
+    public boolean haveNotificationAccess() {
+        //TODO implement
+        throw new UnsupportedOperationException("Not yet implemented");
+    }
+
+}
diff --git a/core/java/android/companion/DeviceFilter.java b/core/java/android/companion/DeviceFilter.java
new file mode 100644
index 0000000..8362b2d
--- /dev/null
+++ b/core/java/android/companion/DeviceFilter.java
@@ -0,0 +1,46 @@
+/*
+ * 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.companion;
+
+import android.annotation.Nullable;
+import android.os.Parcelable;
+
+/**
+ * A filter for companion devices of type {@code D}
+ *
+ * @param <D> Type of devices, filtered by this filter,
+ *           e.g. {@link android.bluetooth.BluetoothDevice}, {@link android.net.wifi.WifiInfo}
+ */
+public interface DeviceFilter<D extends Parcelable> extends Parcelable {
+
+    /**
+     * @return whether the given device matches this filter
+     *
+     * @hide
+     */
+    boolean matches(D device);
+
+    /**
+     * A nullsafe {@link #matches(Parcelable)}, returning true if the filter is null
+     *
+     * @hide
+     */
+    static <D extends Parcelable> boolean matches(@Nullable DeviceFilter<D> filter, D device) {
+        return filter == null || filter.matches(device);
+    }
+}
diff --git a/core/java/android/companion/ICompanionDeviceDiscoveryService.aidl b/core/java/android/companion/ICompanionDeviceDiscoveryService.aidl
new file mode 100644
index 0000000..4d77963
--- /dev/null
+++ b/core/java/android/companion/ICompanionDeviceDiscoveryService.aidl
@@ -0,0 +1,30 @@
+/*
+ * 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.companion;
+
+import android.companion.AssociationRequest;
+import android.companion.ICompanionDeviceDiscoveryServiceCallback;
+import android.companion.IFindDeviceCallback;
+
+/** @hide */
+interface ICompanionDeviceDiscoveryService {
+    void startDiscovery(
+        in AssociationRequest request,
+        in String callingPackage,
+        in IFindDeviceCallback findCallback,
+        in ICompanionDeviceDiscoveryServiceCallback serviceCallback);
+}
diff --git a/core/java/android/service/autofill/CallbackHelper.java b/core/java/android/companion/ICompanionDeviceDiscoveryServiceCallback.aidl
similarity index 60%
copy from core/java/android/service/autofill/CallbackHelper.java
copy to core/java/android/companion/ICompanionDeviceDiscoveryServiceCallback.aidl
index ded8f97..7af708e 100644
--- a/core/java/android/service/autofill/CallbackHelper.java
+++ b/core/java/android/companion/ICompanionDeviceDiscoveryServiceCallback.aidl
@@ -10,21 +10,13 @@
  * 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
+ * See the License for the specific language governing per  missions and
  * limitations under the License.
  */
-package android.service.autofill;
 
-import java.io.PrintWriter;
+package android.companion;
 
-final class CallbackHelper {
-
-    static interface Dumpable {
-        void dump(String prefix, PrintWriter pw);
-        void setFinalizer(Finalizer f);
-    }
-
-    static interface Finalizer {
-        void gone();
-    }
+/** @hide */
+interface ICompanionDeviceDiscoveryServiceCallback {
+    void onDeviceSelected(String packageName, int userId);
 }
diff --git a/core/java/android/companion/ICompanionDeviceManager.aidl b/core/java/android/companion/ICompanionDeviceManager.aidl
new file mode 100644
index 0000000..1d30ada
--- /dev/null
+++ b/core/java/android/companion/ICompanionDeviceManager.aidl
@@ -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.
+ */
+
+package android.companion;
+
+import android.companion.IFindDeviceCallback;
+import android.companion.AssociationRequest;
+
+/**
+ * Interface for communication with the core companion device manager service.
+ *
+ * @hide
+ */
+interface ICompanionDeviceManager {
+    void associate(in AssociationRequest request,
+        in IFindDeviceCallback callback,
+        in String callingPackage);
+
+    //TODO add these
+//    boolean haveNotificationAccess(String packageName);
+//    oneway void requestNotificationAccess(String packageName);
+}
diff --git a/core/java/android/service/autofill/CallbackHelper.java b/core/java/android/companion/IFindDeviceCallback.aidl
similarity index 60%
copy from core/java/android/service/autofill/CallbackHelper.java
copy to core/java/android/companion/IFindDeviceCallback.aidl
index ded8f97..919e1519 100644
--- a/core/java/android/service/autofill/CallbackHelper.java
+++ b/core/java/android/companion/IFindDeviceCallback.aidl
@@ -10,21 +10,16 @@
  * 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
+ * See the License for the specific language governing per  missions and
  * limitations under the License.
  */
-package android.service.autofill;
 
-import java.io.PrintWriter;
+package android.companion;
 
-final class CallbackHelper {
+import android.app.PendingIntent;
 
-    static interface Dumpable {
-        void dump(String prefix, PrintWriter pw);
-        void setFinalizer(Finalizer f);
-    }
-
-    static interface Finalizer {
-        void gone();
-    }
+/** @hide */
+interface IFindDeviceCallback {
+    void onSuccess(in PendingIntent launcher);
+    void onFailure(in CharSequence reason);
 }
diff --git a/core/java/android/content/ClipData.java b/core/java/android/content/ClipData.java
index 7096771..6703bd4 100644
--- a/core/java/android/content/ClipData.java
+++ b/core/java/android/content/ClipData.java
@@ -17,6 +17,9 @@
 package android.content;
 
 import static android.content.ContentProvider.maybeAddUserId;
+import static android.content.ContentResolver.SCHEME_ANDROID_RESOURCE;
+import static android.content.ContentResolver.SCHEME_CONTENT;
+import static android.content.ContentResolver.SCHEME_FILE;
 
 import android.content.res.AssetFileDescriptor;
 import android.graphics.Bitmap;
@@ -353,6 +356,9 @@
                     }
                     return builder.toString();
 
+                } catch (SecurityException e) {
+                    Log.w("ClipData", "Failure opening stream", e);
+
                 } catch (FileNotFoundException e) {
                     // Unable to open content URI as text...  not really an
                     // error, just something to ignore.
@@ -371,8 +377,14 @@
                     }
                 }
 
-                // If we couldn't open the URI as a stream, then the URI itself
-                // probably serves fairly well as a textual representation.
+                // If we couldn't open the URI as a stream, use the URI itself as a textual
+                // representation (but not for "content", "android.resource" or "file" schemes).
+                final String scheme = uri.getScheme();
+                if (SCHEME_CONTENT.equals(scheme)
+                        || SCHEME_ANDROID_RESOURCE.equals(scheme)
+                        || SCHEME_FILE.equals(scheme)) {
+                    return "";
+                }
                 return uri.toString();
             }
 
@@ -536,6 +548,9 @@
                             return Html.escapeHtml(text);
                         }
 
+                    } catch (SecurityException e) {
+                        Log.w("ClipData", "Failure opening stream", e);
+
                     } catch (FileNotFoundException e) {
                         // Unable to open content URI as text...  not really an
                         // error, just something to ignore.
@@ -555,9 +570,15 @@
                     }
                 }
 
-                // If we couldn't open the URI as a stream, then we can build
-                // some HTML text with the URI itself.
-                // probably serves fairly well as a textual representation.
+                // If we couldn't open the URI as a stream, use the URI itself as a textual
+                // representation (but not for "content", "android.resource" or "file" schemes).
+                final String scheme = mUri.getScheme();
+                if (SCHEME_CONTENT.equals(scheme)
+                        || SCHEME_ANDROID_RESOURCE.equals(scheme)
+                        || SCHEME_FILE.equals(scheme)) {
+                    return "";
+                }
+
                 if (styled) {
                     return uriToStyledText(mUri.toString());
                 } else {
@@ -777,7 +798,7 @@
      */
     private static String[] getMimeTypes(ContentResolver resolver, Uri uri) {
         String[] mimeTypes = null;
-        if ("content".equals(uri.getScheme())) {
+        if (SCHEME_CONTENT.equals(uri.getScheme())) {
             String realType = resolver.getType(uri);
             mimeTypes = resolver.getStreamTypes(uri, "*/*");
             if (realType != null) {
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index f610a29..06f7303 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -35,6 +35,7 @@
 import android.app.IApplicationThread;
 import android.app.IServiceConnection;
 import android.app.Notification;
+import android.app.VrManager;
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageManager;
 import android.content.res.AssetManager;
@@ -3599,6 +3600,14 @@
     public static final String PRINT_SERVICE = "print";
 
     /**
+     * {@link android.companion.CompanionDeviceManager} for managing companion devices
+     *
+     * @see #getSystemService
+     * @see android.companion.CompanionDeviceManager
+     */
+    public static final String COMPANION_DEVICE_SERVICE = "companion_device";
+
+    /**
      * Use with {@link #getSystemService} to retrieve a
      * {@link android.hardware.ConsumerIrManager} for transmitting infrared
      * signals from the device.
@@ -3764,6 +3773,16 @@
     public static final String OVERLAY_SERVICE = "overlay";
 
     /**
+     * Use with {@link #getSystemService} to retrieve a
+     * {@link VrManager} for accessing the VR service.
+     *
+     * @see #getSystemService
+     * @hide
+     */
+    @SystemApi
+    public static final String VR_SERVICE = "vrmanager";
+
+    /**
      * Determine whether the given permission is allowed for a particular
      * process and user ID running in the system.
      *
diff --git a/core/java/android/content/DialogInterface.java b/core/java/android/content/DialogInterface.java
index 947eac6..511f356 100644
--- a/core/java/android/content/DialogInterface.java
+++ b/core/java/android/content/DialogInterface.java
@@ -19,45 +19,43 @@
 import android.view.KeyEvent;
 
 /**
- * 
+ * Interface that defines a dialog-type class that can be shown, dismissed, or
+ * canceled, and may have buttons that can be clicked.
  */
-public interface DialogInterface {    
-    /**
-     * The identifier for the positive button.
-     */
-    public static final int BUTTON_POSITIVE = -1;
+public interface DialogInterface {
+    /** The identifier for the positive button. */
+    int BUTTON_POSITIVE = -1;
 
-    /**
-     * The identifier for the negative button. 
-     */
-    public static final int BUTTON_NEGATIVE = -2;
+    /** The identifier for the negative button. */
+    int BUTTON_NEGATIVE = -2;
 
-    /**
-     * The identifier for the neutral button. 
-     */
-    public static final int BUTTON_NEUTRAL = -3;
+    /** The identifier for the neutral button. */
+    int BUTTON_NEUTRAL = -3;
 
-    /**
-     * @deprecated Use {@link #BUTTON_POSITIVE}
-     */
+    /** @deprecated Use {@link #BUTTON_POSITIVE} */
     @Deprecated
-    public static final int BUTTON1 = BUTTON_POSITIVE;
+    int BUTTON1 = BUTTON_POSITIVE;
+
+    /** @deprecated Use {@link #BUTTON_NEGATIVE} */
+    @Deprecated
+    int BUTTON2 = BUTTON_NEGATIVE;
+
+    /** @deprecated Use {@link #BUTTON_NEUTRAL} */
+    @Deprecated
+    int BUTTON3 = BUTTON_NEUTRAL;
 
     /**
-     * @deprecated Use {@link #BUTTON_NEGATIVE}
+     * Cancels the dialog, invoking the {@link OnCancelListener}.
+     * <p>
+     * The {@link OnDismissListener} may also be called if cancellation
+     * dismisses the dialog.
      */
-    @Deprecated
-    public static final int BUTTON2 = BUTTON_NEGATIVE;
+    void cancel();
 
     /**
-     * @deprecated Use {@link #BUTTON_NEUTRAL}
+     * Dismisses the dialog, invoking the {@link OnDismissListener}.
      */
-    @Deprecated
-    public static final int BUTTON3 = BUTTON_NEUTRAL;
-    
-    public void cancel();
-
-    public void dismiss();
+    void dismiss();
 
     /**
      * Interface used to allow the creator of a dialog to run some code when the
@@ -70,11 +68,11 @@
     interface OnCancelListener {
         /**
          * This method will be invoked when the dialog is canceled.
-         * 
-         * @param dialog The dialog that was canceled will be passed into the
-         *            method.
+         *
+         * @param dialog the dialog that was canceled will be passed into the
+         *               method
          */
-        public void onCancel(DialogInterface dialog);
+        void onCancel(DialogInterface dialog);
     }
 
     /**
@@ -84,11 +82,11 @@
     interface OnDismissListener {
         /**
          * This method will be invoked when the dialog is dismissed.
-         * 
-         * @param dialog The dialog that was dismissed will be passed into the
-         *            method.
+         *
+         * @param dialog the dialog that was dismissed will be passed into the
+         *               method
          */
-        public void onDismiss(DialogInterface dialog);
+        void onDismiss(DialogInterface dialog);
     }
 
     /**
@@ -99,29 +97,28 @@
         /**
          * This method will be invoked when the dialog is shown.
          *
-         * @param dialog The dialog that was shown will be passed into the
-         *            method.
+         * @param dialog the dialog that was shown will be passed into the
+         *               method
          */
-        public void onShow(DialogInterface dialog);
+        void onShow(DialogInterface dialog);
     }
 
     /**
      * Interface used to allow the creator of a dialog to run some code when an
-     * item on the dialog is clicked..
+     * item on the dialog is clicked.
      */
     interface OnClickListener {
         /**
          * This method will be invoked when a button in the dialog is clicked.
-         * 
-         * @param dialog The dialog that received the click.
-         * @param which The button that was clicked (e.g.
-         *            {@link DialogInterface#BUTTON1}) or the position
-         *            of the item clicked.
+         *
+         * @param dialog the dialog that received the click
+         * @param which the button that was clicked (ex.
+         *              {@link DialogInterface#BUTTON_POSITIVE}) or the position
+         *              of the item clicked
          */
-        /* TODO: Change to use BUTTON_POSITIVE after API council */
-        public void onClick(DialogInterface dialog, int which);
+        void onClick(DialogInterface dialog, int which);
     }
-    
+
     /**
      * Interface used to allow the creator of a dialog to run some code when an
      * item in a multi-choice dialog is clicked.
@@ -129,14 +126,15 @@
     interface OnMultiChoiceClickListener {
         /**
          * This method will be invoked when an item in the dialog is clicked.
-         * 
-         * @param dialog The dialog where the selection was made.
-         * @param which The position of the item in the list that was clicked.
-         * @param isChecked True if the click checked the item, else false.
+         *
+         * @param dialog the dialog where the selection was made
+         * @param which the position of the item in the list that was clicked
+         * @param isChecked {@code true} if the click checked the item, else
+         *                  {@code false}
          */
-        public void onClick(DialogInterface dialog, int which, boolean isChecked);
+        void onClick(DialogInterface dialog, int which, boolean isChecked);
     }
-    
+
     /**
      * Interface definition for a callback to be invoked when a key event is
      * dispatched to this dialog. The callback will be invoked before the key
@@ -146,13 +144,14 @@
         /**
          * Called when a key is dispatched to a dialog. This allows listeners to
          * get a chance to respond before the dialog.
-         * 
-         * @param dialog The dialog the key has been dispatched to.
-         * @param keyCode The code for the physical key that was pressed
-         * @param event The KeyEvent object containing full information about
-         *            the event.
-         * @return True if the listener has consumed the event, false otherwise.
+         *
+         * @param dialog the dialog the key has been dispatched to
+         * @param keyCode the code for the physical key that was pressed
+         * @param event the KeyEvent object containing full information about
+         *              the event
+         * @return {@code true} if the listener has consumed the event,
+         *         {@code false} otherwise
          */
-        public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event);
+        boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event);
     }
 }
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 1130327..b0505ac 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -669,13 +669,14 @@
      * preview. {@link #getClipData} contains an optional list of content URIs
      * if there is more than one item to preview. {@link #EXTRA_INDEX} is an
      * optional index of the URI in the clip data to show first.
-     * If {@link #EXTRA_QUICK_VIEW_PLAIN} is true, then the quick viewer should show
-     * basic UI without any extra features other than quick viewing the passed items.
-     * Especially, the quick viewer should not let users open the passed files
-     * in other apps, which includes sharing, opening, editing, printing, etc in the
-     * plain mode.
+     * <p>By default quick viewers are supposed to be lightweight and focus on
+     * previewing the content only. They should not expose features such as printing,
+     * opening in an external app, deleting, rotating, casting, etc.
+     * However, if {@link #EXTRA_QUICK_VIEW_ADVANCED} is true, then the quick viewer
+     * may show advanced UI which includes convenience actions suitable for the passed
+     * Uris.
      * <p>Output: nothing.
-     * @see #EXTRA_QUICK_VIEW_HIDE_DEFAULT_ACTIONS
+     * @see #EXTRA_QUICK_VIEW_ADVANCED
      * @see #EXTRA_INDEX
      */
     @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
@@ -4413,19 +4414,15 @@
     public static final String EXTRA_INDEX = "android.intent.extra.INDEX";
 
     /**
-     * Shows a plain quick viewer UI which doesn't provide any extra features other than
-     * quick viewing the items.
-     *
-     * <p>Especially, the quick viewer should not let users open the quick viewed files
-     * in other apps, which includes sharing, opening, editing, printing, etc.
-     *
-     * <p>This feature is optional, and may not be handled by all quick viewers.
+     * Tells the quick viewer to show additional UI actions suitable for the passed Uris,
+     * such as opening in other apps, sharing, opening, editing, printing, deleting,
+     * casting, etc.
      *
      * <p>The value is boolean. By default false.
      * @see ACTION_QUICK_VIEW
      */
-    public static final String EXTRA_QUICK_VIEW_PLAIN =
-            "android.intent.extra.QUICK_VIEW_PLAIN";
+    public static final String EXTRA_QUICK_VIEW_ADVANCED =
+            "android.intent.extra.QUICK_VIEW_ADVANCED";
 
     /**
      * Optional boolean extra indicating whether quiet mode has been switched on or off.
@@ -6004,6 +6001,12 @@
                 case "--receiver-foreground":
                     intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
                     break;
+                case "--receiver-no-abort":
+                    intent.addFlags(Intent.FLAG_RECEIVER_NO_ABORT);
+                    break;
+                case "--receiver-include-background":
+                    intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
+                    break;
                 case "--selector":
                     intent.setDataAndType(data, type);
                     intent = new Intent();
@@ -6127,7 +6130,8 @@
                 "    [--activity-single-top] [--activity-clear-task]",
                 "    [--activity-task-on-home]",
                 "    [--receiver-registered-only] [--receiver-replace-pending]",
-                "    [--receiver-foreground]",
+                "    [--receiver-foreground] [--receiver-no-abort]",
+                "    [--receiver-include-background]",
                 "    [--selector]",
                 "    [<URI> | <PACKAGE> | <COMPONENT>]"
         };
diff --git a/core/java/android/content/SyncRequest.java b/core/java/android/content/SyncRequest.java
index dd53eac..74d2f11 100644
--- a/core/java/android/content/SyncRequest.java
+++ b/core/java/android/content/SyncRequest.java
@@ -351,7 +351,7 @@
          * @param requiresCharging true if sync requires the phone to be plugged in. Default false.
          */
         public Builder setRequiresCharging(boolean requiresCharging) {
-            mRequiresCharging = true;
+            mRequiresCharging = requiresCharging;
             return this;
         }
 
diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java
index 92cb709..48c52d5 100644
--- a/core/java/android/content/pm/ActivityInfo.java
+++ b/core/java/android/content/pm/ActivityInfo.java
@@ -397,14 +397,6 @@
     public static final int FLAG_ALWAYS_FOCUSABLE = 0x40000;
 
     /**
-     * Bit in {@link #flags} indicating if the activity is a launcher activity which should always
-     * show up on the top of others.
-     * See android.R.attr#onTopLauncher.
-     * @hide
-     */
-    public static final int FLAG_ON_TOP_LAUNCHER = 0x80000;
-
-    /**
      * Bit in {@link #flags} indicating if the activity is visible to ephemeral applications.
      * @hide
      */
@@ -832,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/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index 8465f0f..1fa4181 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -573,6 +573,11 @@
     public int privateFlags;
 
     /**
+     * @hide
+     */
+    public static final String METADATA_PRELOADED_FONTS = "preloaded_fonts";
+
+    /**
      * The required smallest screen width the application can run on.  If 0,
      * nothing has been specified.  Comes from
      * {@link android.R.styleable#AndroidManifestSupportsScreens_requiresSmallestWidthDp
diff --git a/core/java/android/view/autofill/FillResponse.aidl b/core/java/android/content/pm/ChangedPackages.aidl
similarity index 83%
copy from core/java/android/view/autofill/FillResponse.aidl
copy to core/java/android/content/pm/ChangedPackages.aidl
index b018f15..1a9f5a1 100644
--- a/core/java/android/view/autofill/FillResponse.aidl
+++ b/core/java/android/content/pm/ChangedPackages.aidl
@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2016, The Android Open Source Project
+ * 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.
@@ -14,6 +14,6 @@
  * limitations under the License.
  */
 
-package android.view.autofill;
+package android.content.pm;
 
-parcelable FillResponse;
\ No newline at end of file
+parcelable ChangedPackages;
\ No newline at end of file
diff --git a/core/java/android/content/pm/ChangedPackages.java b/core/java/android/content/pm/ChangedPackages.java
new file mode 100644
index 0000000..94b8a5d
--- /dev/null
+++ b/core/java/android/content/pm/ChangedPackages.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.content.pm;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.content.Intent;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.List;
+
+/**
+ * Packages that have been changed since the last time they
+ * were requested.
+ */
+public final class ChangedPackages implements Parcelable {
+    /** The last known sequence number for these changes */
+    private final int mSequenceNumber;
+    /** The names of the packages that have changed */
+    private final List<String> mPackageNames;
+
+    public ChangedPackages(int sequenceNumber, @NonNull List<String> packageNames) {
+        this.mSequenceNumber = sequenceNumber;
+        this.mPackageNames = packageNames;
+    }
+
+    /** @hide */
+    protected ChangedPackages(Parcel in) {
+        mSequenceNumber = in.readInt();
+        mPackageNames = in.createStringArrayList();
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeInt(mSequenceNumber);
+        dest.writeStringList(mPackageNames);
+    }
+
+    /**
+     * Returns the last known sequence number for these changes.
+     */
+    public int getSequenceNumber() {
+        return mSequenceNumber;
+    }
+
+    /**
+     * Returns the names of the packages that have changed.
+     */
+    public @NonNull List<String> getPackageNames() {
+        return mPackageNames;
+    }
+
+    public static final Parcelable.Creator<ChangedPackages> CREATOR =
+            new Parcelable.Creator<ChangedPackages>() {
+        public ChangedPackages createFromParcel(Parcel in) {
+            return new ChangedPackages(in);
+        }
+
+        public ChangedPackages[] newArray(int size) {
+            return new ChangedPackages[size];
+        }
+    };
+}
diff --git a/core/java/android/content/pm/IPackageManager.aidl b/core/java/android/content/pm/IPackageManager.aidl
index 3fb46cf..9d36a73 100644
--- a/core/java/android/content/pm/IPackageManager.aidl
+++ b/core/java/android/content/pm/IPackageManager.aidl
@@ -23,6 +23,7 @@
 import android.content.pm.ActivityInfo;
 import android.content.pm.ApplicationInfo;
 import android.content.pm.ContainerEncryptionParams;
+import android.content.pm.ChangedPackages;
 import android.content.pm.InstantAppInfo;
 import android.content.pm.FeatureInfo;
 import android.content.pm.IPackageInstallObserver2;
@@ -611,6 +612,8 @@
     String getServicesSystemSharedLibraryPackageName();
     String getSharedSystemSharedLibraryPackageName();
 
+    ChangedPackages getChangedPackages(int sequenceNumber, int userId);
+
     boolean isPackageDeviceAdminOnAnyUser(String packageName);
 
     List<String> getPreviousCodePaths(in String packageName);
diff --git a/core/java/android/content/pm/InstrumentationInfo.java b/core/java/android/content/pm/InstrumentationInfo.java
index a135d8f..59c5307 100644
--- a/core/java/android/content/pm/InstrumentationInfo.java
+++ b/core/java/android/content/pm/InstrumentationInfo.java
@@ -34,6 +34,13 @@
     public String targetPackage;
 
     /**
+     * Names of the process(es) this instrumentation will run in.  If not specified, only
+     * runs in the main process of the targetPackage.  Can either be a comma-separated list
+     * of process names or '*' for any process that launches to run targetPackage code.
+     */
+    public String targetProcess;
+
+    /**
      * Full path to the base APK for this application.
      */
     public String sourceDir;
@@ -113,6 +120,7 @@
     public InstrumentationInfo(InstrumentationInfo orig) {
         super(orig);
         targetPackage = orig.targetPackage;
+        targetProcess = orig.targetProcess;
         sourceDir = orig.sourceDir;
         publicSourceDir = orig.publicSourceDir;
         splitNames = orig.splitNames;
@@ -141,6 +149,7 @@
     public void writeToParcel(Parcel dest, int parcelableFlags) {
         super.writeToParcel(dest, parcelableFlags);
         dest.writeString(targetPackage);
+        dest.writeString(targetProcess);
         dest.writeString(sourceDir);
         dest.writeString(publicSourceDir);
         dest.writeStringArray(splitNames);
@@ -170,6 +179,7 @@
     private InstrumentationInfo(Parcel source) {
         super(source);
         targetPackage = source.readString();
+        targetProcess = source.readString();
         sourceDir = source.readString();
         publicSourceDir = source.readString();
         splitNames = source.readStringArray();
diff --git a/core/java/android/content/pm/LauncherApps.java b/core/java/android/content/pm/LauncherApps.java
index 999b34f..40deeae 100644
--- a/core/java/android/content/pm/LauncherApps.java
+++ b/core/java/android/content/pm/LauncherApps.java
@@ -37,6 +37,7 @@
 import android.graphics.drawable.BitmapDrawable;
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.Icon;
+import android.graphics.drawable.MaskableIconDrawable;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Looper;
@@ -127,9 +128,10 @@
     public static final String EXTRA_PIN_ITEM_REQUEST =
             "android.content.pm.extra.PIN_ITEM_REQUEST";
 
-    private Context mContext;
-    private ILauncherApps mService;
-    private PackageManager mPm;
+    private final Context mContext;
+    private final ILauncherApps mService;
+    private final PackageManager mPm;
+    private final UserManager mUserManager;
 
     private List<CallbackMessageHandler> mCallbacks
             = new ArrayList<CallbackMessageHandler>();
@@ -387,6 +389,7 @@
         mContext = context;
         mService = service;
         mPm = context.getPackageManager();
+        mUserManager = context.getSystemService(UserManager.class);
     }
 
     /** @hide */
@@ -397,20 +400,29 @@
     }
 
     /**
+     * Show an error log on logcat, when the calling user is a managed profile, and the target
+     * user is different from the calling user, in order to help developers to detect it.
+     */
+    private void logErrorForInvalidProfileAccess(@NonNull UserHandle target) {
+        if (UserHandle.myUserId() != target.getIdentifier() && mUserManager.isManagedProfile()) {
+            Log.e(TAG, "Accessing other profiles/users from managed profile is no longer allowed.");
+        }
+    }
+
+    /**
      * Return a list of profiles that the caller can access via the {@link LauncherApps} APIs.
      *
      * <p>If the caller is running on a managed profile, it'll return only the current profile.
      * Otherwise it'll return the same list as {@link UserManager#getUserProfiles()} would.
      */
     public List<UserHandle> getProfiles() {
-        final UserManager um = mContext.getSystemService(UserManager.class);
-        if (um.isManagedProfile()) {
+        if (mUserManager.isManagedProfile()) {
             // If it's a managed profile, only return the current profile.
             final List result =  new ArrayList(1);
             result.add(android.os.Process.myUserHandle());
             return result;
         } else {
-            return um.getUserProfiles();
+            return mUserManager.getUserProfiles();
         }
     }
 
@@ -424,6 +436,7 @@
      * @return List of launchable activities. Can be an empty list but will not be null.
      */
     public List<LauncherActivityInfo> getActivityList(String packageName, UserHandle user) {
+        logErrorForInvalidProfileAccess(user);
         try {
             return convertToActivityList(mService.getLauncherActivities(mContext.getPackageName(),
                     packageName, user), user);
@@ -441,6 +454,7 @@
      * @return An activity info object if there is a match.
      */
     public LauncherActivityInfo resolveActivity(Intent intent, UserHandle user) {
+        logErrorForInvalidProfileAccess(user);
         try {
             ActivityInfo ai = mService.resolveActivity(mContext.getPackageName(),
                     intent.getComponent(), user);
@@ -464,6 +478,7 @@
      */
     public void startMainActivity(ComponentName component, UserHandle user, Rect sourceBounds,
             Bundle opts) {
+        logErrorForInvalidProfileAccess(user);
         if (DEBUG) {
             Log.i(TAG, "StartMainActivity " + component + " " + user.getIdentifier());
         }
@@ -486,6 +501,7 @@
      */
     public void startAppDetailsActivity(ComponentName component, UserHandle user,
             Rect sourceBounds, Bundle opts) {
+        logErrorForInvalidProfileAccess(user);
         try {
             mService.showAppDetailsAsUser(mContext.getPackageName(),
                     component, sourceBounds, opts, user);
@@ -507,6 +523,7 @@
      */
     public List<LauncherActivityInfo> getShortcutConfigActivityList(@Nullable String packageName,
             @NonNull UserHandle user) {
+        logErrorForInvalidProfileAccess(user);
         try {
             return convertToActivityList(mService.getShortcutConfigActivities(
                     mContext.getPackageName(), packageName, user),
@@ -553,6 +570,7 @@
      * @see Intent#ACTION_CREATE_SHORTCUT
      * @see android.app.Activity#startIntentSenderForResult
      */
+    @Nullable
     public IntentSender getShortcutConfigActivityIntent(@NonNull LauncherActivityInfo info) {
         try {
             return mService.getShortcutConfigActivityIntent(
@@ -571,6 +589,7 @@
      * @return true if the package exists and is enabled.
      */
     public boolean isPackageEnabled(String packageName, UserHandle user) {
+        logErrorForInvalidProfileAccess(user);
         try {
             return mService.isPackageEnabled(mContext.getPackageName(), packageName, user);
         } catch (RemoteException re) {
@@ -591,6 +610,7 @@
      */
     public ApplicationInfo getApplicationInfo(String packageName, @ApplicationInfoFlags int flags,
             UserHandle user) {
+        logErrorForInvalidProfileAccess(user);
         try {
             return mService.getApplicationInfo(mContext.getPackageName(), packageName, flags, user);
         } catch (RemoteException re) {
@@ -607,6 +627,7 @@
      * @return true if the activity exists and is enabled.
      */
     public boolean isActivityEnabled(ComponentName component, UserHandle user) {
+        logErrorForInvalidProfileAccess(user);
         try {
             return mService.isActivityEnabled(mContext.getPackageName(), component, user);
         } catch (RemoteException re) {
@@ -656,6 +677,7 @@
     @Nullable
     public List<ShortcutInfo> getShortcuts(@NonNull ShortcutQuery query,
             @NonNull UserHandle user) {
+        logErrorForInvalidProfileAccess(user);
         try {
             return mService.getShortcuts(mContext.getPackageName(),
                     query.mChangedSince, query.mPackage, query.mShortcutIds, query.mActivity,
@@ -699,6 +721,7 @@
      */
     public void pinShortcuts(@NonNull String packageName, @NonNull List<String> shortcutIds,
             @NonNull UserHandle user) {
+        logErrorForInvalidProfileAccess(user);
         try {
             mService.pinShortcuts(mContext.getPackageName(), packageName, shortcutIds, user);
         } catch (RemoteException e) {
@@ -781,7 +804,15 @@
             }
             try {
                 final Bitmap bmp = BitmapFactory.decodeFileDescriptor(pfd.getFileDescriptor());
-                return (bmp == null) ? null : new BitmapDrawable(mContext.getResources(), bmp);
+                if (bmp != null) {
+                    BitmapDrawable dr = new BitmapDrawable(mContext.getResources(), bmp);
+                    if (shortcut.hasMaskableBitmap()) {
+                        return new MaskableIconDrawable(null, dr);
+                    } else {
+                        return dr;
+                    }
+                }
+                return null;
             } finally {
                 try {
                     pfd.close();
@@ -799,7 +830,8 @@
                     return loadDrawableResourceFromPackage(shortcut.getPackage(),
                             icon.getResId(), shortcut.getUserHandle(), density);
                 }
-                case Icon.TYPE_BITMAP: {
+                case Icon.TYPE_BITMAP:
+                case Icon.TYPE_BITMAP_MASKABLE: {
                     return icon.loadDrawable(mContext);
                 }
                 default:
@@ -866,6 +898,8 @@
     public void startShortcut(@NonNull String packageName, @NonNull String shortcutId,
             @Nullable Rect sourceBounds, @Nullable Bundle startActivityOptions,
             @NonNull UserHandle user) {
+        logErrorForInvalidProfileAccess(user);
+
         startShortcut(packageName, shortcutId, sourceBounds, startActivityOptions,
                 user.getIdentifier());
     }
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index ab641c9..308153d 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -20,6 +20,7 @@
 import android.annotation.CheckResult;
 import android.annotation.DrawableRes;
 import android.annotation.IntDef;
+import android.annotation.IntRange;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.annotation.RequiresPermission;
@@ -1741,6 +1742,22 @@
 
     /**
      * Feature for {@link #getSystemAvailableFeatures} and
+     * {@link #hasSystemFeature(String, int)}: If this feature is supported, the Vulkan native API
+     * will enumerate at least one {@code VkPhysicalDevice}, and the feature version will indicate
+     * what level of optional compute features are supported beyond the Vulkan 1.0 requirements.
+     * <p>
+     * Compute level 0 indicates support for:
+     * <ul>
+     * <li>Ability to use pointers to buffer data from shaders</li>
+     * <li>Ability to load/store 16-bit values from buffers</li>
+     * <li>Ability to control shader floating point rounding mode</li>
+     * </ul>
+     */
+    @SdkConstant(SdkConstantType.FEATURE)
+    public static final String FEATURE_VULKAN_HARDWARE_COMPUTE = "android.hardware.vulkan.compute";
+
+    /**
+     * Feature for {@link #getSystemAvailableFeatures} and
      * {@link #hasSystemFeature(String, int)}: The version of this feature indicates the highest
      * {@code VkPhysicalDeviceProperties::apiVersion} supported by the physical devices that support
      * the hardware level indicated by {@link #FEATURE_VULKAN_HARDWARE_LEVEL}. The feature version
@@ -3837,6 +3854,17 @@
     public abstract @NonNull String getSharedSystemSharedLibraryPackageName();
 
     /**
+     * Returns the names of the packages that have been changed
+     * [eg. added, removed or updated] since the given sequence
+     * number.
+     * <p>If no packages have been changed, returns <code>null</code>.
+     * <p>The sequence number starts at <code>0</code> and is
+     * reset every boot.
+     */
+    public abstract @Nullable ChangedPackages getChangedPackages(
+            @IntRange(from=0) int sequenceNumber);
+
+    /**
      * Get a list of features that are available on the
      * system.
      *
diff --git a/core/java/android/content/pm/PackageManagerInternal.java b/core/java/android/content/pm/PackageManagerInternal.java
index e4e0a19..7d59bd6 100644
--- a/core/java/android/content/pm/PackageManagerInternal.java
+++ b/core/java/android/content/pm/PackageManagerInternal.java
@@ -275,6 +275,11 @@
     public abstract void setExternalSourcesPolicy(ExternalSourcesPolicy policy);
 
     /**
+     * Return true if the given package is a persistent app process.
+     */
+    public abstract boolean isPackagePersistent(String packageName);
+
+    /**
      * Get all overlay packages for a user.
      * @param userId The user for which to get the overlays.
      * @return A list of overlay packages. An empty list is returned if the
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index 13907ba..7a9aaaf 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -17,7 +17,6 @@
 package android.content.pm;
 
 import static android.content.pm.ActivityInfo.FLAG_ALWAYS_FOCUSABLE;
-import static android.content.pm.ActivityInfo.FLAG_ON_TOP_LAUNCHER;
 import static android.content.pm.ActivityInfo.FLAG_SUPPORTS_PICTURE_IN_PICTURE;
 import static android.content.pm.ActivityInfo.RESIZE_MODE_FORCE_RESIZABLE_LANDSCAPE_ONLY;
 import static android.content.pm.ActivityInfo.RESIZE_MODE_FORCE_RESIZABLE_PORTRAIT_ONLY;
@@ -1623,6 +1622,7 @@
             return parseApkLite(apkPath, parser, attrs, flags, signatures, certificates);
 
         } catch (XmlPullParserException | IOException | RuntimeException e) {
+            Slog.w(TAG, "Failed to parse " + apkPath, e);
             throw new PackageParserException(INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION,
                     "Failed to parse " + apkPath, e);
         } finally {
@@ -3160,6 +3160,10 @@
                 com.android.internal.R.styleable.AndroidManifestInstrumentation_targetPackage);
         a.info.targetPackage = str != null ? str.intern() : null;
 
+        str = sa.getNonResourceString(
+                com.android.internal.R.styleable.AndroidManifestInstrumentation_targetProcess);
+        a.info.targetProcess = str != null ? str.intern() : null;
+
         a.info.handleProfiling = sa.getBoolean(
                 com.android.internal.R.styleable.AndroidManifestInstrumentation_handleProfiling,
                 false);
@@ -4105,10 +4109,6 @@
                 a.info.flags |= FLAG_ALWAYS_FOCUSABLE;
             }
 
-            if (sa.getBoolean(R.styleable.AndroidManifestActivity_onTopLauncher, false)) {
-                a.info.flags |= FLAG_ON_TOP_LAUNCHER;
-            }
-
             a.info.lockTaskLaunchMode =
                     sa.getInt(R.styleable.AndroidManifestActivity_lockTaskMode, 0);
 
@@ -5033,9 +5033,7 @@
     }
 
     private boolean isWebBrowsableIntent(IntentInfo intent) {
-        return intent.hasAction(Intent.ACTION_VIEW)
-                && intent.hasCategory(Intent.CATEGORY_BROWSABLE)
-                && (intent.hasDataScheme("http") || intent.hasDataScheme("https"));
+        return intent.hasCategory(Intent.CATEGORY_BROWSABLE);
     }
 
     private boolean parseAllMetaData(Resources res, XmlResourceParser parser, String tag,
diff --git a/core/java/android/content/pm/ShortcutInfo.java b/core/java/android/content/pm/ShortcutInfo.java
index b4dcdf7..f1f2683 100644
--- a/core/java/android/content/pm/ShortcutInfo.java
+++ b/core/java/android/content/pm/ShortcutInfo.java
@@ -92,6 +92,9 @@
     public static final int FLAG_IMMUTABLE = 1 << 8;
 
     /** @hide */
+    public static final int FLAG_MASKABLE_BITMAP = 1 << 9;
+
+    /** @hide */
     @IntDef(flag = true,
             value = {
             FLAG_DYNAMIC,
@@ -103,6 +106,7 @@
             FLAG_DISABLED,
             FLAG_STRINGS_RESOLVED,
             FLAG_IMMUTABLE,
+            FLAG_MASKABLE_BITMAP,
     })
     @Retention(RetentionPolicy.SOURCE)
     public @interface ShortcutFlags {}
@@ -690,6 +694,7 @@
         switch (icon.getType()) {
             case Icon.TYPE_RESOURCE:
             case Icon.TYPE_BITMAP:
+            case Icon.TYPE_BITMAP_MASKABLE:
                 break; // OK
             default:
                 throw getInvalidIconException();
@@ -815,8 +820,9 @@
          * <p>Tints set with {@link Icon#setTint} or {@link Icon#setTintList} are not supported
          * and will be ignored.
          *
-         * <p>Only icons created with {@link Icon#createWithBitmap(Bitmap)} and
-         * {@link Icon#createWithResource} are supported.
+         * <p>Only icons created with {@link Icon#createWithBitmap(Bitmap)},
+         * {@link Icon#createWithMaskableBitmap(Bitmap)}
+         * and {@link Icon#createWithResource} are supported.
          * Other types, such as URI-based icons, are not supported.
          *
          * @see LauncherApps#getShortcutIconDrawable(ShortcutInfo, int)
@@ -1442,6 +1448,15 @@
     }
 
     /**
+     * Return whether a shortcut's icon is maskable.
+     *
+     * @hide internal/unit tests only
+     */
+    public boolean hasMaskableBitmap() {
+        return hasFlags(FLAG_MASKABLE_BITMAP);
+    }
+
+    /**
      * Return whether a shortcut only contains "key" information only or not.  If true, only the
      * following fields are available.
      * <ul>
diff --git a/core/java/android/content/res/FontResourcesParser.java b/core/java/android/content/res/FontResourcesParser.java
index 15f3a09..3f8f90e 100644
--- a/core/java/android/content/res/FontResourcesParser.java
+++ b/core/java/android/content/res/FontResourcesParser.java
@@ -33,7 +33,7 @@
  */
 public class FontResourcesParser {
     private static final int NORMAL_WEIGHT = 400;
-    private static final String ITALIC = "italic";
+    private static final int ITALIC = 1;
 
     public static FontConfig parse(XmlPullParser parser, Resources resources)
             throws XmlPullParserException, IOException {
@@ -64,6 +64,17 @@
 
     private static FontConfig.Family readFamily(XmlPullParser parser, Resources resources)
             throws XmlPullParserException, IOException {
+        AttributeSet attrs = Xml.asAttributeSet(parser);
+        TypedArray array = resources.obtainAttributes(attrs, R.styleable.FontFamily);
+        String authority = array.getString(R.styleable.FontFamily_fontProviderAuthority);
+        String query = array.getString(R.styleable.FontFamily_fontProviderQuery);
+        array.recycle();
+        if (authority != null && query != null) {
+            while (parser.next() != XmlPullParser.END_TAG) {
+                skip(parser);
+            }
+            return new FontConfig.Family(authority, query);
+        }
         List<FontConfig.Font> fonts = new ArrayList<>();
         while (parser.next() != XmlPullParser.END_TAG) {
             if (parser.getEventType() != XmlPullParser.START_TAG) continue;
@@ -82,10 +93,14 @@
         AttributeSet attrs = Xml.asAttributeSet(parser);
         TypedArray array = resources.obtainAttributes(attrs, R.styleable.FontFamilyFont);
         int weight = array.getInt(R.styleable.FontFamilyFont_fontWeight, NORMAL_WEIGHT);
-        boolean isItalic = ITALIC.equals(array.getString(R.styleable.FontFamilyFont_fontStyle));
+        boolean isItalic = ITALIC == array.getInt(R.styleable.FontFamilyFont_fontStyle, 0);
         String filename = array.getString(R.styleable.FontFamilyFont_font);
+        int resourceId = array.getResourceId(R.styleable.FontFamilyFont_font, 0);
         array.recycle();
-        return new FontConfig.Font(filename, 0, null, weight, isItalic);
+        while (parser.next() != XmlPullParser.END_TAG) {
+            skip(parser);
+        }
+        return new FontConfig.Font(filename, 0, null, weight, isItalic, resourceId);
     }
 
     private static void skip(XmlPullParser parser) throws XmlPullParserException, IOException {
diff --git a/core/java/android/content/res/Resources.java b/core/java/android/content/res/Resources.java
index 04e4454..21d4b22 100644
--- a/core/java/android/content/res/Resources.java
+++ b/core/java/android/content/res/Resources.java
@@ -373,6 +373,20 @@
     }
 
     /**
+     * @hide
+     */
+    public void preloadFonts(@FontRes int id) {
+        final TypedValue value = obtainTempTypedValue();
+        try {
+            final ResourcesImpl impl = mResourcesImpl;
+            impl.getValue(id, value, true);
+            impl.preloadFonts(this, value, id);
+        } finally {
+            releaseTempTypedValue(value);
+        }
+    }
+
+    /**
      * Returns the character sequence necessary for grammatically correct pluralization
      * of the given resource ID for the given quantity.
      * Note that the character sequence is selected based solely on grammatical necessity,
diff --git a/core/java/android/content/res/ResourcesImpl.java b/core/java/android/content/res/ResourcesImpl.java
index 3cf36d7..38efa49 100644
--- a/core/java/android/content/res/ResourcesImpl.java
+++ b/core/java/android/content/res/ResourcesImpl.java
@@ -32,6 +32,7 @@
 import android.content.pm.ActivityInfo.Config;
 import android.content.res.Configuration.NativeConfig;
 import android.content.res.Resources.NotFoundException;
+import android.graphics.FontFamily;
 import android.graphics.Typeface;
 import android.graphics.drawable.ColorDrawable;
 import android.graphics.drawable.Drawable;
@@ -52,6 +53,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.Arrays;
+import java.util.List;
 import java.util.Locale;
 
 /**
@@ -753,7 +755,7 @@
         }
 
         final String file = value.string.toString();
-        Typeface cached = Typeface.createFromCache(mAssets, file);
+        Typeface cached = Typeface.findFromCache(mAssets, file);
         if (cached != null) {
             return cached;
         }
@@ -782,6 +784,43 @@
     }
 
     /**
+     * @hide
+     */
+    public void preloadFonts(Resources wrapper, TypedValue value, int id) {
+        if (value.string == null) {
+            throw new NotFoundException("Resource \"" + getResourceName(id) + "\" ("
+                    + Integer.toHexString(id) + ") is not a Font: " + value);
+        }
+
+        final String file = value.string.toString();
+
+        Trace.traceBegin(Trace.TRACE_TAG_RESOURCES, file);
+        try {
+            final XmlResourceParser rp = loadXmlResourceParser(
+                    file, id, value.assetCookie, "font");
+            final FontConfig config = FontResourcesParser.parse(rp, wrapper);
+            final List<FontConfig.Family> families = config.getFamilies();
+            if (families == null || families.isEmpty()) {
+                return;
+            }
+            for (int j = 0; j < families.size(); j++) {
+                final FontConfig.Family family = families.get(j);
+                final List<FontConfig.Font> fonts = family.getFonts();
+                for (int i = 0; i < fonts.size(); i++) {
+                    int resourceId = fonts.get(i).getResourceId();
+                    wrapper.getFont(resourceId);
+                }
+            }
+        } catch (XmlPullParserException e) {
+            Log.e(TAG, "Failed to parse xml resource " + file, e);
+        } catch (IOException e) {
+            Log.e(TAG, "Failed to read xml resource " + file, e);
+        } finally {
+            Trace.traceEnd(Trace.TRACE_TAG_RESOURCES);
+        }
+    }
+
+    /**
      * Given the value and id, we can get the XML filename as in value.data, based on that, we
      * first try to load CSL from the cache. If not found, try to get from the constant state.
      * Last, parse the XML and generate the CSL.
diff --git a/core/java/android/hardware/Sensor.java b/core/java/android/hardware/Sensor.java
index d87c55e..8c13cc8 100644
--- a/core/java/android/hardware/Sensor.java
+++ b/core/java/android/hardware/Sensor.java
@@ -649,9 +649,22 @@
      * to be in the same order as the HAL. Skipping this sensor
      */
 
-    /* TYPE_LOW_LATENCY_OFF_BODY_SENSOR - defined as type 34 in the HAL needs to
-     * be defined in this space.
+    /**
+     * A constant describing a low latency off-body detect sensor.
+     *
+     * See {@link android.hardware.SensorEvent#values SensorEvent.values} for more details.
+     *
      */
+    public static final int TYPE_LOW_LATENCY_OFFBODY_DETECT = 34;
+
+
+    /**
+     * A constant string describing a low-latency offbody detector sensor.
+     *
+     * @see #TYPE_LOW_LATENCY_OFFBODY_DETECT
+     */
+    public static final String STRING_TYPE_LOW_LATENCY_OFFBODY_DETECT =
+            "android.sensor.low_latency_offbody";
 
     /**
      * A constant describing an uncalibrated accelerometer sensor.
@@ -669,6 +682,7 @@
      */
     public static final String STRING_TYPE_ACCELEROMETER_UNCALIBRATED =
             "android.sensor.accelerometer_uncalibrated";
+
     /**
      * A constant describing all sensor types.
      */
@@ -786,7 +800,7 @@
             1, // SENSOR_TYPE_HEART_BEAT
             2, // SENSOR_TYPE_DYNAMIC_SENSOR_META
             16,// skip over additional sensor info type
-            1, // reserving for LLOB sensor type
+            1, // SENSOR_TYPE_LOW_LATENCY_OFFBODY_DETECT
             6, // SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED
     };
 
@@ -1195,6 +1209,9 @@
             case TYPE_DYNAMIC_SENSOR_META:
                 mStringType = STRING_TYPE_DYNAMIC_SENSOR_META;
                 return true;
+            case TYPE_LOW_LATENCY_OFFBODY_DETECT:
+                mStringType = STRING_TYPE_LOW_LATENCY_OFFBODY_DETECT;
+                return true;
             case TYPE_ACCELEROMETER_UNCALIBRATED:
                 mStringType = STRING_TYPE_ACCELEROMETER_UNCALIBRATED;
                 return true;
diff --git a/core/java/android/hardware/SensorEvent.java b/core/java/android/hardware/SensorEvent.java
index 9b72757a..c0bca97 100644
--- a/core/java/android/hardware/SensorEvent.java
+++ b/core/java/android/hardware/SensorEvent.java
@@ -564,6 +564,42 @@
      * completely unlikely to be anywhere else on the QRS complex.
      * </p>
      *
+     * <h4>{@link android.hardware.Sensor#TYPE_LOW_LATENCY_OFFBODY_DETECT
+     * Sensor.TYPE_LOW_LATENCY_OFFBODY_DETECT}:</h4>
+     *
+     * <p>
+     * A sensor of this type returns an event every time the device transitions
+     * from off-body to on-body and from on-body to off-body (e.g. a wearable
+     * device being removed from the wrist would trigger an event indicating an
+     * off-body transition). The event returned will contain a single value to
+     * indicate off-body state:
+     * </p>
+     *
+     * <ul>
+     *  <li> values[0]: off-body state</li>
+     * </ul>
+     *
+     * <p>
+     *     Valid values for off-body state:
+     * <ul>
+     *  <li> 1.0 (device is on-body)</li>
+     *  <li> 0.0 (device is off-body)</li>
+     * </ul>
+     * </p>
+     *
+     * <p>
+     * When a sensor of this type is activated, it must deliver the initial
+     * on-body or off-body event representing the current device state within
+     * 5 seconds of activating the sensor.
+     * </p>
+     *
+     * <p>
+     * This sensor must be able to detect and report an on-body to off-body
+     * transition within 1 second of the device being removed from the body,
+     * and must be able to detect and report an off-body to on-body transition
+     * within 5 seconds of the device being put back onto the body.
+     * </p>
+     *
      * <h4>{@link android.hardware.Sensor#TYPE_ACCELEROMETER_UNCALIBRATED
      * Sensor.TYPE_ACCELEROMETER_UNCALIBRATED}:</h4> All values are in SI
      * units (m/s^2)
diff --git a/core/java/android/hardware/camera2/CameraCaptureSession.java b/core/java/android/hardware/camera2/CameraCaptureSession.java
index bcebb7d..dcd069d 100644
--- a/core/java/android/hardware/camera2/CameraCaptureSession.java
+++ b/core/java/android/hardware/camera2/CameraCaptureSession.java
@@ -250,6 +250,10 @@
      * application must then call {@link OutputConfiguration#addSurface} before finalizing the
      * configuration with this method.</p>
      *
+     * <p>If the provided OutputConfigurations are unchanged from session creation, this function
+     * call has no effect. This function must only be called once for a particular output
+     * configuration. </p>
+     *
      * <p>The output Surfaces included by this list of
      * {@link OutputConfiguration OutputConfigurations} can be used as {@link CaptureRequest}
      * targets as soon as this call returns.</p>
diff --git a/core/java/android/hardware/camera2/legacy/LegacyMetadataMapper.java b/core/java/android/hardware/camera2/legacy/LegacyMetadataMapper.java
index bb0a042..5423ca9 100644
--- a/core/java/android/hardware/camera2/legacy/LegacyMetadataMapper.java
+++ b/core/java/android/hardware/camera2/legacy/LegacyMetadataMapper.java
@@ -646,7 +646,7 @@
 
         // Special case where the only scene mode listed is AUTO => no scene mode
         if (sceneModes != null && sceneModes.size() == 1 &&
-                sceneModes.get(0) == Parameters.SCENE_MODE_AUTO) {
+                sceneModes.get(0).equals(Parameters.SCENE_MODE_AUTO)) {
             supportedSceneModes = null;
         }
 
diff --git a/core/java/android/hardware/display/DisplayManagerInternal.java b/core/java/android/hardware/display/DisplayManagerInternal.java
index 3eb5844..98a5749 100644
--- a/core/java/android/hardware/display/DisplayManagerInternal.java
+++ b/core/java/android/hardware/display/DisplayManagerInternal.java
@@ -230,9 +230,6 @@
         public int dozeScreenBrightness;
         public int dozeScreenState;
 
-        // If true, use twilight to affect the brightness.
-        public boolean useTwilight;
-
         public DisplayPowerRequest() {
             policy = POLICY_BRIGHT;
             useProximitySensor = false;
@@ -268,7 +265,6 @@
             boostScreenBrightness = other.boostScreenBrightness;
             dozeScreenBrightness = other.dozeScreenBrightness;
             dozeScreenState = other.dozeScreenState;
-            useTwilight = other.useTwilight;
         }
 
         @Override
@@ -289,8 +285,7 @@
                     && lowPowerMode == other.lowPowerMode
                     && boostScreenBrightness == other.boostScreenBrightness
                     && dozeScreenBrightness == other.dozeScreenBrightness
-                    && dozeScreenState == other.dozeScreenState
-                    && useTwilight == other.useTwilight;
+                    && dozeScreenState == other.dozeScreenState;
         }
 
         @Override
@@ -310,8 +305,7 @@
                     + ", lowPowerMode=" + lowPowerMode
                     + ", boostScreenBrightness=" + boostScreenBrightness
                     + ", dozeScreenBrightness=" + dozeScreenBrightness
-                    + ", dozeScreenState=" + Display.stateToString(dozeScreenState)
-                    + ", useTwilight=" + useTwilight;
+                    + ", dozeScreenState=" + Display.stateToString(dozeScreenState);
         }
 
         public static String policyToString(int policy) {
diff --git a/core/java/android/hardware/fingerprint/FingerprintManager.java b/core/java/android/hardware/fingerprint/FingerprintManager.java
index 2c9e6c7..7947620 100644
--- a/core/java/android/hardware/fingerprint/FingerprintManager.java
+++ b/core/java/android/hardware/fingerprint/FingerprintManager.java
@@ -766,7 +766,7 @@
 
     /**
      * Retrieves the authenticator token for binding keys to the lifecycle
-     * of the current set of fingerprints. Used only by internal clients.
+     * of the calling user's fingerprints. Used only by internal clients.
      *
      * @hide
      */
diff --git a/core/java/android/inputmethodservice/IInputMethodWrapper.java b/core/java/android/inputmethodservice/IInputMethodWrapper.java
index 167d5a0..562f40b 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,22 @@
                 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 IBinder startInputToken = (IBinder) args.arg1;
+                final IInputContext inputContext = (IInputContext) args.arg2;
+                final EditorInfo info = (EditorInfo) args.arg3;
+                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);
+                }
+                inputMethod.dispatchStartInputWithToken(ic, info, true /* initial */,
+                        startInputToken);
                 args.recycle();
                 return;
             }
@@ -263,19 +258,11 @@
     }
 
     @Override
-    public void startInput(IInputContext inputContext,
+    public void startInput(IBinder startInputToken, 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.obtainMessageIIOOO(DO_START_INPUT,
+                missingMethods, restarting ? 1 : 0, startInputToken, inputContext, attribute));
     }
 
     @Override
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 5996fe2..7a20943 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -24,6 +24,7 @@
 import android.annotation.IntDef;
 import android.annotation.MainThread;
 import android.annotation.NonNull;
+import android.annotation.Nullable;
 import android.app.ActivityManager;
 import android.app.Dialog;
 import android.content.Context;
@@ -291,7 +292,20 @@
     boolean mCandidatesViewStarted;
     InputConnection mStartedInputConnection;
     EditorInfo mInputEditorInfo;
-    
+
+    /**
+     * A token to keep tracking the last IPC that triggered
+     * {@link #doStartInput(InputConnection, EditorInfo, boolean)}. If
+     * {@link #doStartInput(InputConnection, EditorInfo, boolean)} was not caused by IPCs from
+     * {@link com.android.server.InputMethodManagerService}, this needs to remain unchanged.
+     *
+     * <p>Some IPCs to {@link com.android.server.InputMethodManagerService} require this token to
+     * disentangle event flows for various purposes such as better window animation and providing
+     * fine-grained debugging information.</p>
+     */
+    @Nullable
+    private IBinder mStartInputToken;
+
     int mShowInputFlags;
     boolean mShowInputRequested;
     boolean mLastShowInputRequested;
@@ -387,8 +401,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();
         }
@@ -415,6 +430,23 @@
         }
 
         /**
+         * {@inheritDoc}
+         * @hide
+         */
+        @Override
+        public void dispatchStartInputWithToken(@Nullable InputConnection inputConnection,
+                @NonNull EditorInfo editorInfo, boolean restarting,
+                @NonNull IBinder startInputToken) {
+            mStartInputToken = startInputToken;
+
+            // This needs to be dispatched to interface methods rather than doStartInput().
+            // Otherwise IME developers who have overridden those interface methods will lose
+            // notifications.
+            super.dispatchStartInputWithToken(inputConnection, editorInfo, restarting,
+                    startInputToken);
+        }
+
+        /**
          * Handle a request by the system to hide the soft input area.
          */
         public void hideSoftInput(int flags, ResultReceiver resultReceiver) {
@@ -453,8 +485,8 @@
             clearInsetOfPreviousIme();
             // If user uses hard keyboard, IME button should always be shown.
             boolean showing = isInputViewShown();
-            mImm.setImeWindowStatus(mToken, IME_ACTIVE | (showing ? IME_VISIBLE : 0),
-                    mBackDisposition);
+            mImm.setImeWindowStatus(mToken, mStartInputToken,
+                    IME_ACTIVE | (showing ? IME_VISIBLE : 0), mBackDisposition);
             if (resultReceiver != null) {
                 resultReceiver.send(wasVis != isInputViewShown()
                         ? InputMethodManager.RESULT_SHOWN
@@ -925,8 +957,8 @@
             }
             // If user uses hard keyboard, IME button should always be shown.
             boolean showing = onEvaluateInputViewShown();
-            mImm.setImeWindowStatus(mToken, IME_ACTIVE | (showing ? IME_VISIBLE : 0),
-                    mBackDisposition);
+            mImm.setImeWindowStatus(mToken, mStartInputToken,
+                    IME_ACTIVE | (showing ? IME_VISIBLE : 0), mBackDisposition);
         }
     }
 
@@ -1027,8 +1059,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)
@@ -1651,7 +1684,8 @@
 
         final int nextImeWindowStatus = IME_ACTIVE | (isInputViewShown() ? IME_VISIBLE : 0);
         if (previousImeWindowStatus != nextImeWindowStatus) {
-            mImm.setImeWindowStatus(mToken, nextImeWindowStatus, mBackDisposition);
+            mImm.setImeWindowStatus(mToken, mStartInputToken, nextImeWindowStatus,
+                    mBackDisposition);
         }
         if ((previousImeWindowStatus & IME_ACTIVE) == 0) {
             if (DEBUG) Log.v(TAG, "showWindow: showing!");
@@ -1676,7 +1710,7 @@
     }
 
     private void doHideWindow() {
-        mImm.setImeWindowStatus(mToken, 0, mBackDisposition);
+        mImm.setImeWindowStatus(mToken, mStartInputToken, 0, mBackDisposition);
         hideWindow();
     }
 
@@ -2641,7 +2675,8 @@
         p.println("  mInputStarted=" + mInputStarted
                 + " mInputViewStarted=" + mInputViewStarted
                 + " mCandidatesViewStarted=" + mCandidatesViewStarted);
-        
+        p.println("  mStartInputToken=" + mStartInputToken);
+
         if (mInputEditorInfo != null) {
             p.println("  mInputEditorInfo:");
             mInputEditorInfo.dump(p, "    ");
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index 222953e..719a957 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -46,6 +46,7 @@
 import android.util.ArrayMap;
 import android.util.Log;
 import android.util.SparseArray;
+import android.util.SparseIntArray;
 
 import com.android.internal.telephony.ITelephony;
 import com.android.internal.telephony.PhoneConstants;
@@ -1240,36 +1241,27 @@
 
     private NetworkCapabilities networkCapabilitiesForFeature(int networkType, String feature) {
         if (networkType == TYPE_MOBILE) {
-            int cap = -1;
-            if ("enableMMS".equals(feature)) {
-                cap = NetworkCapabilities.NET_CAPABILITY_MMS;
-            } else if ("enableSUPL".equals(feature)) {
-                cap = NetworkCapabilities.NET_CAPABILITY_SUPL;
-            } else if ("enableDUN".equals(feature) || "enableDUNAlways".equals(feature)) {
-                cap = NetworkCapabilities.NET_CAPABILITY_DUN;
-            } else if ("enableHIPRI".equals(feature)) {
-                cap = NetworkCapabilities.NET_CAPABILITY_INTERNET;
-            } else if ("enableFOTA".equals(feature)) {
-                cap = NetworkCapabilities.NET_CAPABILITY_FOTA;
-            } else if ("enableIMS".equals(feature)) {
-                cap = NetworkCapabilities.NET_CAPABILITY_IMS;
-            } else if ("enableCBS".equals(feature)) {
-                cap = NetworkCapabilities.NET_CAPABILITY_CBS;
-            } else {
-                return null;
+            switch (feature) {
+                case "enableCBS":
+                    return networkCapabilitiesForType(TYPE_MOBILE_CBS);
+                case "enableDUN":
+                case "enableDUNAlways":
+                    return networkCapabilitiesForType(TYPE_MOBILE_DUN);
+                case "enableFOTA":
+                    return networkCapabilitiesForType(TYPE_MOBILE_FOTA);
+                case "enableHIPRI":
+                    return networkCapabilitiesForType(TYPE_MOBILE_HIPRI);
+                case "enableIMS":
+                    return networkCapabilitiesForType(TYPE_MOBILE_IMS);
+                case "enableMMS":
+                    return networkCapabilitiesForType(TYPE_MOBILE_MMS);
+                case "enableSUPL":
+                    return networkCapabilitiesForType(TYPE_MOBILE_SUPL);
+                default:
+                    return null;
             }
-            NetworkCapabilities netCap = new NetworkCapabilities();
-            netCap.addTransportType(NetworkCapabilities.TRANSPORT_CELLULAR).addCapability(cap);
-            netCap.maybeMarkCapabilitiesRestricted();
-            return netCap;
-        } else if (networkType == TYPE_WIFI) {
-            if ("p2p".equals(feature)) {
-                NetworkCapabilities netCap = new NetworkCapabilities();
-                netCap.addTransportType(NetworkCapabilities.TRANSPORT_WIFI);
-                netCap.addCapability(NetworkCapabilities.NET_CAPABILITY_WIFI_P2P);
-                netCap.maybeMarkCapabilitiesRestricted();
-                return netCap;
-            }
+        } else if (networkType == TYPE_WIFI && "p2p".equals(feature)) {
+            return networkCapabilitiesForType(TYPE_WIFI_P2P);
         }
         return null;
     }
@@ -1461,8 +1453,9 @@
     private void sendExpireMsgForFeature(NetworkCapabilities netCap, int seqNum, int delay) {
         if (delay >= 0) {
             Log.d(TAG, "sending expire msg with seqNum " + seqNum + " and delay " + delay);
-            Message msg = sCallbackHandler.obtainMessage(EXPIRE_LEGACY_REQUEST, seqNum, 0, netCap);
-            sCallbackHandler.sendMessageDelayed(msg, delay);
+            CallbackHandler handler = getHandler();
+            Message msg = handler.obtainMessage(EXPIRE_LEGACY_REQUEST, seqNum, 0, netCap);
+            handler.sendMessageDelayed(msg, delay);
         }
     }
 
@@ -1477,6 +1470,59 @@
         return true;
     }
 
+    private static final SparseIntArray sLegacyTypeToTransport = new SparseIntArray();
+    static {
+        sLegacyTypeToTransport.put(TYPE_MOBILE,       NetworkCapabilities.TRANSPORT_CELLULAR);
+        sLegacyTypeToTransport.put(TYPE_MOBILE_CBS,   NetworkCapabilities.TRANSPORT_CELLULAR);
+        sLegacyTypeToTransport.put(TYPE_MOBILE_DUN,   NetworkCapabilities.TRANSPORT_CELLULAR);
+        sLegacyTypeToTransport.put(TYPE_MOBILE_FOTA,  NetworkCapabilities.TRANSPORT_CELLULAR);
+        sLegacyTypeToTransport.put(TYPE_MOBILE_HIPRI, NetworkCapabilities.TRANSPORT_CELLULAR);
+        sLegacyTypeToTransport.put(TYPE_MOBILE_IMS,   NetworkCapabilities.TRANSPORT_CELLULAR);
+        sLegacyTypeToTransport.put(TYPE_MOBILE_MMS,   NetworkCapabilities.TRANSPORT_CELLULAR);
+        sLegacyTypeToTransport.put(TYPE_MOBILE_SUPL,  NetworkCapabilities.TRANSPORT_CELLULAR);
+        sLegacyTypeToTransport.put(TYPE_WIFI,         NetworkCapabilities.TRANSPORT_WIFI);
+        sLegacyTypeToTransport.put(TYPE_WIFI_P2P,     NetworkCapabilities.TRANSPORT_WIFI);
+        sLegacyTypeToTransport.put(TYPE_BLUETOOTH,    NetworkCapabilities.TRANSPORT_BLUETOOTH);
+        sLegacyTypeToTransport.put(TYPE_ETHERNET,     NetworkCapabilities.TRANSPORT_ETHERNET);
+    }
+
+    private static final SparseIntArray sLegacyTypeToCapability = new SparseIntArray();
+    static {
+        sLegacyTypeToCapability.put(TYPE_MOBILE_CBS,  NetworkCapabilities.NET_CAPABILITY_CBS);
+        sLegacyTypeToCapability.put(TYPE_MOBILE_DUN,  NetworkCapabilities.NET_CAPABILITY_DUN);
+        sLegacyTypeToCapability.put(TYPE_MOBILE_FOTA, NetworkCapabilities.NET_CAPABILITY_FOTA);
+        sLegacyTypeToCapability.put(TYPE_MOBILE_IMS,  NetworkCapabilities.NET_CAPABILITY_IMS);
+        sLegacyTypeToCapability.put(TYPE_MOBILE_MMS,  NetworkCapabilities.NET_CAPABILITY_MMS);
+        sLegacyTypeToCapability.put(TYPE_MOBILE_SUPL, NetworkCapabilities.NET_CAPABILITY_SUPL);
+        sLegacyTypeToCapability.put(TYPE_WIFI_P2P,    NetworkCapabilities.NET_CAPABILITY_WIFI_P2P);
+    }
+
+    /**
+     * Given a legacy type (TYPE_WIFI, ...) returns a NetworkCapabilities
+     * instance suitable for registering a request or callback.  Throws an
+     * IllegalArgumentException if no mapping from the legacy type to
+     * NetworkCapabilities is known.
+     *
+     * @hide
+     */
+    public static NetworkCapabilities networkCapabilitiesForType(int type) {
+        final NetworkCapabilities nc = new NetworkCapabilities();
+
+        // Map from type to transports.
+        final int NOT_FOUND = -1;
+        final int transport = sLegacyTypeToTransport.get(type, NOT_FOUND);
+        if (transport == NOT_FOUND) {
+            throw new IllegalArgumentException("unknown legacy type: " + type);
+        }
+        nc.addTransportType(transport);
+
+        // Map from type to capabilities.
+        nc.addCapability(sLegacyTypeToCapability.get(
+                type, NetworkCapabilities.NET_CAPABILITY_INTERNET));
+        nc.maybeMarkCapabilitiesRestricted();
+        return nc;
+    }
+
     /** @hide */
     public static class PacketKeepaliveCallback {
         /** The requested keepalive was successfully started. */
@@ -2852,19 +2898,19 @@
         }
     }
 
-    static final HashMap<NetworkRequest, NetworkCallback> sCallbacks = new HashMap<>();
-    static CallbackHandler sCallbackHandler;
+    private static final HashMap<NetworkRequest, NetworkCallback> sCallbacks = new HashMap<>();
+    private static CallbackHandler sCallbackHandler;
 
-    private final static int LISTEN  = 1;
-    private final static int REQUEST = 2;
+    private static final int LISTEN  = 1;
+    private static final int REQUEST = 2;
 
     private NetworkRequest sendRequestForNetwork(NetworkCapabilities need,
             NetworkCallback callback, int timeoutMs, int action, int legacyType) {
-        return sendRequestForNetwork(need, callback, getHandler(), timeoutMs, action, legacyType);
+        return sendRequestForNetwork(need, callback, timeoutMs, action, legacyType, getHandler());
     }
 
-    private NetworkRequest sendRequestForNetwork(NetworkCapabilities need,
-            NetworkCallback callback, Handler handler, int timeoutMs, int action, int legacyType) {
+    private NetworkRequest sendRequestForNetwork(NetworkCapabilities need, NetworkCallback callback,
+            int timeoutMs, int action, int legacyType, CallbackHandler handler) {
         if (callback == null) {
             throw new IllegalArgumentException("null NetworkCallback");
         }
@@ -2952,8 +2998,8 @@
      *
      * This function behaves identically to the non-timedout version, but if a suitable
      * network is not found within the given time (in milliseconds) the
-     * {@link NetworkCallback#unavailable} callback is called.  The request must
-     * still be released normally by calling {@link unregisterNetworkCallback(NetworkCallback)}.
+     * {@link NetworkCallback#onUnavailable()} callback is called.  The request must
+     * still be released normally by calling {@link #unregisterNetworkCallback(NetworkCallback)}.
      *
      * <p>This method requires the caller to hold either the
      * {@link android.Manifest.permission#CHANGE_NETWORK_STATE} permission
@@ -2965,10 +3011,7 @@
      *                        the callbacks must not be shared - they uniquely specify
      *                        this request.
      * @param timeoutMs The time in milliseconds to attempt looking for a suitable network
-     *                  before {@link NetworkCallback#unavailable} is called.
-     *
-     * TODO: Make timeouts work and then unhide this method.
-     *
+     *                  before {@link NetworkCallback#onUnavailable()} is called.
      * @hide
      */
     public void requestNetwork(NetworkRequest request, NetworkCallback networkCallback,
@@ -2978,13 +3021,6 @@
     }
 
     /**
-     * The maximum number of milliseconds the framework will look for a suitable network
-     * during a timeout-equiped call to {@link requestNetwork}.
-     * {@hide}
-     */
-    public final static int MAX_NETWORK_REQUEST_TIMEOUT_MS = 100 * 60 * 1000;
-
-    /**
      * The lookup key for a {@link Network} object included with the intent after
      * successfully finding a network for the applications request.  Retrieve it with
      * {@link android.content.Intent#getParcelableExtra(String)}.
diff --git a/core/java/android/net/ConnectivityMetricsLogger.java b/core/java/android/net/ConnectivityMetricsLogger.java
index 9a2d4e0..67b6908 100644
--- a/core/java/android/net/ConnectivityMetricsLogger.java
+++ b/core/java/android/net/ConnectivityMetricsLogger.java
@@ -46,32 +46,7 @@
 
     public static final String DATA_KEY_EVENTS_COUNT = "count";
 
-    /** {@hide} */ protected IConnectivityMetricsLogger mService;
-    /** {@hide} */ protected volatile long mServiceUnblockedTimestampMillis;
-    private int mNumSkippedEvents;
-
     public ConnectivityMetricsLogger() {
-        // TODO: consider not initializing mService in constructor
-        this(IConnectivityMetricsLogger.Stub.asInterface(
-                ServiceManager.getService(CONNECTIVITY_METRICS_LOGGER_SERVICE)));
-    }
-
-    /** {@hide} */
-    @VisibleForTesting
-    public ConnectivityMetricsLogger(IConnectivityMetricsLogger service) {
-        mService = service;
-    }
-
-    /** {@hide} */
-    protected boolean checkLoggerService() {
-        if (mService != null) {
-            return true;
-        }
-        // Two threads racing here will write the same pointer because getService
-        // is idempotent once MetricsLoggerService is initialized.
-        mService = IConnectivityMetricsLogger.Stub.asInterface(
-                ServiceManager.getService(CONNECTIVITY_METRICS_LOGGER_SERVICE));
-        return mService != null;
     }
 
     /**
@@ -88,62 +63,6 @@
      * @param data is a Parcelable instance representing the event.
      */
     public void logEvent(long timestamp, int componentTag, int eventTag, Parcelable data) {
-        if (mService == null) {
-            if (DBG) {
-                Log.d(TAG, "logEvent(" + componentTag + "," + eventTag + ") Service not ready");
-            }
-            return;
-        }
-
-        if (mServiceUnblockedTimestampMillis > 0) {
-            if (System.currentTimeMillis() < mServiceUnblockedTimestampMillis) {
-                // Service is throttling events.
-                // Don't send new events because they will be dropped.
-                mNumSkippedEvents++;
-                return;
-            }
-        }
-
-        ConnectivityMetricsEvent skippedEventsEvent = null;
-        if (mNumSkippedEvents > 0) {
-            // Log number of skipped events
-            Bundle b = new Bundle();
-            b.putInt(DATA_KEY_EVENTS_COUNT, mNumSkippedEvents);
-
-            // Log the skipped event.
-            // TODO: Note that some of the clients push all states events into the server,
-            // If we lose some states logged here, we might mess up the statistics happened at the
-            // backend. One of the options is to introduce a non-skippable flag for important events
-            // that are logged.
-            skippedEventsEvent = new ConnectivityMetricsEvent(mServiceUnblockedTimestampMillis,
-                    componentTag, TAG_SKIPPED_EVENTS, b);
-
-            mServiceUnblockedTimestampMillis = 0;
-        }
-
-        ConnectivityMetricsEvent event = new ConnectivityMetricsEvent(timestamp, componentTag,
-                eventTag, data);
-
-        try {
-            long result;
-            if (skippedEventsEvent == null) {
-                result = mService.logEvent(event);
-            } else {
-                result = mService.logEvents(new ConnectivityMetricsEvent[]
-                        {skippedEventsEvent, event});
-            }
-
-            if (result == 0) {
-                mNumSkippedEvents = 0;
-            } else {
-                mNumSkippedEvents++;
-                if (result > 0) { // events are throttled
-                    mServiceUnblockedTimestampMillis = result;
-                }
-            }
-        } catch (RemoteException e) {
-            Log.e(TAG, "Error logging event", e);
-        }
     }
 
     /**
@@ -157,33 +76,17 @@
      * @return events
      */
     public ConnectivityMetricsEvent[] getEvents(ConnectivityMetricsEvent.Reference reference) {
-        try {
-            return mService.getEvents(reference);
-        } catch (RemoteException e) {
-            Log.e(TAG, "IConnectivityMetricsLogger.getEvents", e);
-            return null;
-        }
+        return new ConnectivityMetricsEvent[0];
     }
 
     /**
      * Register PendingIntent which will be sent when new events are ready to be retrieved.
      */
     public boolean register(PendingIntent newEventsIntent) {
-        try {
-            return mService.register(newEventsIntent);
-        } catch (RemoteException e) {
-            Log.e(TAG, "IConnectivityMetricsLogger.register", e);
-            return false;
-        }
+        return false;
     }
 
     public boolean unregister(PendingIntent newEventsIntent) {
-        try {
-            mService.unregister(newEventsIntent);
-            return true;
-        } catch (RemoteException e) {
-            Log.e(TAG, "IConnectivityMetricsLogger.unregister", e);
-            return false;
-        }
+        return false;
     }
 }
diff --git a/core/java/android/net/INetworkScoreService.aidl b/core/java/android/net/INetworkScoreService.aidl
index 82432c7..f249daf 100644
--- a/core/java/android/net/INetworkScoreService.aidl
+++ b/core/java/android/net/INetworkScoreService.aidl
@@ -18,6 +18,7 @@
 
 import android.net.INetworkScoreCache;
 import android.net.NetworkKey;
+import android.net.NetworkScorerAppManager;
 import android.net.RecommendationRequest;
 import android.net.RecommendationResult;
 import android.net.ScoredNetwork;
@@ -130,4 +131,15 @@
      */
     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/NetworkKey.java b/core/java/android/net/NetworkKey.java
index e5f0bf0..31a74dc 100644
--- a/core/java/android/net/NetworkKey.java
+++ b/core/java/android/net/NetworkKey.java
@@ -24,6 +24,7 @@
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.text.TextUtils;
+import android.util.Log;
 
 import java.util.Objects;
 
@@ -41,6 +42,8 @@
 // etc.) so that clients can pull out these details depending on the type of network.
 public class NetworkKey implements Parcelable {
 
+    private static final String TAG = "NetworkKey";
+
     /** A wifi network, for which {@link #wifiKey} will be populated. */
     public static final int TYPE_WIFI = 1;
 
@@ -59,13 +62,28 @@
     /**
      * Constructs a new NetworkKey for the given wifi {@link ScanResult}.
      *
-     * @throws IllegalArgumentException if the given ScanResult is malformed
+     * @return  A new {@link NetworkKey} instance or <code>null</code> if the given
+     *          {@link ScanResult} instance is malformed.
      * @hide
      */
-    public static NetworkKey createFromScanResult(ScanResult result) {
-        return new NetworkKey(
-                new WifiKey(
-                        '"' + result.wifiSsid.toString() + '"', result.BSSID));
+    @Nullable
+    public static NetworkKey createFromScanResult(@Nullable ScanResult result) {
+        if (result != null && result.wifiSsid != null) {
+            final String ssid = result.wifiSsid.toString();
+            final String bssid = result.BSSID;
+            if (!TextUtils.isEmpty(ssid) && !ssid.equals(WifiSsid.NONE)
+                    && !TextUtils.isEmpty(bssid)) {
+                WifiKey wifiKey;
+                try {
+                    wifiKey = new WifiKey(String.format("\"%s\"", ssid), bssid);
+                } catch (IllegalArgumentException e) {
+                    Log.e(TAG, "Unable to create WifiKey.", e);
+                    return null;
+                }
+                return new NetworkKey(wifiKey);
+            }
+        }
+        return null;
     }
 
     /**
@@ -83,7 +101,14 @@
             final String bssid = wifiInfo.getBSSID();
             if (!TextUtils.isEmpty(ssid) && !ssid.equals(WifiSsid.NONE)
                     && !TextUtils.isEmpty(bssid)) {
-                return new NetworkKey(new WifiKey(ssid, bssid));
+                WifiKey wifiKey;
+                try {
+                    wifiKey = new WifiKey(ssid, bssid);
+                } catch (IllegalArgumentException e) {
+                    Log.e(TAG, "Unable to create WifiKey.", e);
+                    return null;
+                }
+                return new NetworkKey(wifiKey);
             }
         }
         return null;
diff --git a/core/java/android/net/NetworkPolicyManager.java b/core/java/android/net/NetworkPolicyManager.java
index 1b715af..4b184f1 100644
--- a/core/java/android/net/NetworkPolicyManager.java
+++ b/core/java/android/net/NetworkPolicyManager.java
@@ -19,6 +19,7 @@
 import static android.content.pm.PackageManager.GET_SIGNATURES;
 import static android.net.NetworkPolicy.CYCLE_NONE;
 
+import android.app.ActivityManager;
 import android.content.Context;
 import android.content.Intent;
 import android.content.pm.PackageManager;
@@ -65,6 +66,8 @@
      *
      * See network-policy-restrictions.md for more info.
      */
+    /** Not a valid rule */
+    public static final int RULE_INVALID = -1;
     /** No specific rule was set */
     public static final int RULE_NONE = 0;
     /** Allow traffic on metered networks. */
@@ -360,6 +363,8 @@
         final StringBuilder string = new StringBuilder().append(uidRules).append(" (");
         if (uidRules == RULE_NONE) {
             string.append("NONE");
+        } else if (uidRules == RULE_INVALID) {
+            string.append("INVALID");
         } else {
             string.append(DebugUtils.flagsToString(NetworkPolicyManager.class, "RULE_", uidRules));
         }
@@ -381,4 +386,25 @@
         string.append(")");
         return string.toString();
     }
+
+    /**
+     * @hide
+     */
+    public static boolean isProcStateAllowedWhileIdleOrPowerSaveMode(int procState) {
+        return procState <= ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE;
+    }
+
+    /**
+     * @hide
+     */
+    public static boolean isProcStateAllowedWhileRestrictBackgroundOn(int procState) {
+        return procState <= ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE;
+    }
+
+    /**
+     * @hide
+     */
+    public interface UidStateWithSeqObserver {
+        void onUidStateChangedWithSeq(int uid, int procState, long seq);
+    }
 }
diff --git a/core/java/android/net/NetworkRecommendationProvider.java b/core/java/android/net/NetworkRecommendationProvider.java
index 5739c79..8395864 100644
--- a/core/java/android/net/NetworkRecommendationProvider.java
+++ b/core/java/android/net/NetworkRecommendationProvider.java
@@ -1,6 +1,7 @@
 package android.net;
 
 import android.annotation.SystemApi;
+import android.os.Build;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.IBinder;
@@ -20,6 +21,7 @@
 @SystemApi
 public abstract class NetworkRecommendationProvider {
     private static final String TAG = "NetworkRecProvider";
+    private static final boolean VERBOSE = Build.IS_DEBUGGABLE && Log.isLoggable(TAG, Log.VERBOSE);
     /** The key into the callback Bundle where the RecommendationResult will be found. */
     public static final String EXTRA_RECOMMENDATION_RESULT =
             "android.net.extra.RECOMMENDATION_RESULT";
@@ -91,8 +93,10 @@
          * @param result a {@link RecommendationResult} instance.
          */
         public void onResult(RecommendationResult result) {
+            if (VERBOSE) Log.v(TAG, "onResult(seq=" + mSequence + ")");
             if (!mCallbackRun.compareAndSet(false, true)) {
-                throw new IllegalStateException("The callback cannot be run more than once.");
+                throw new IllegalStateException("The callback cannot be run more than once. "
+                        + "seq=" + mSequence);
             }
             final Bundle data = new Bundle();
             data.putInt(EXTRA_SEQUENCE, mSequence);
@@ -102,6 +106,7 @@
             } catch (RemoteException e) {
                 Log.w(TAG, "Callback failed for seq: " + mSequence, e);
             }
+            if (VERBOSE) Log.v(TAG, "onResult() complete. seq=" + mSequence);
         }
 
         @Override
@@ -134,9 +139,13 @@
         @Override
         public void requestRecommendation(final RecommendationRequest request,
                 final IRemoteCallback callback, final int sequence) throws RemoteException {
+            if (VERBOSE) Log.v(TAG, "requestRecommendation(seq=" + sequence + ")");
             mHandler.post(new Runnable() {
                 @Override
                 public void run() {
+                    if (VERBOSE) {
+                        Log.v(TAG, "requestRecommendation(seq=" + sequence + ") running...");
+                    }
                     ResultCallback resultCallback = new ResultCallback(callback, sequence);
                     onRequestRecommendation(request, resultCallback);
                 }
diff --git a/core/java/android/net/NetworkRequest.java b/core/java/android/net/NetworkRequest.java
index ae72470..cb78009 100644
--- a/core/java/android/net/NetworkRequest.java
+++ b/core/java/android/net/NetworkRequest.java
@@ -178,6 +178,20 @@
         }
 
         /**
+         * Set the {@code NetworkCapabilities} for this builder instance,
+         * overriding any capabilities that had been previously set.
+         *
+         * @param nc The superseding {@code NetworkCapabilities} instance.
+         * @return The builder to facilitate chaining.
+         * @hide
+         */
+        public Builder setCapabilities(NetworkCapabilities nc) {
+            mNetworkCapabilities.clearAll();
+            mNetworkCapabilities.combineCapabilities(nc);
+            return this;
+        }
+
+        /**
          * Completely clears all the {@code NetworkCapabilities} from this builder instance,
          * removing even the capabilities that are set by default when the object is constructed.
          *
diff --git a/core/java/android/net/NetworkScoreManager.java b/core/java/android/net/NetworkScoreManager.java
index 57cf1a5..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;
 
 /**
@@ -186,6 +187,34 @@
     }
 
     /**
+     * Returns metadata about the active scorer or <code>null</code> if there is no active scorer.
+     *
+     * @hide
+     */
+    @Nullable
+    public NetworkScorerAppData getActiveScorer() {
+        try {
+            return mService.getActiveScorer();
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
+     * 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/wifi/java/android/net/wifi/hotspot2/pps/HomeSP.aidl b/core/java/android/net/NetworkScorerAppManager.aidl
similarity index 80%
copy from wifi/java/android/net/wifi/hotspot2/pps/HomeSP.aidl
copy to core/java/android/net/NetworkScorerAppManager.aidl
index 62d5603..d968343 100644
--- a/wifi/java/android/net/wifi/hotspot2/pps/HomeSP.aidl
+++ b/core/java/android/net/NetworkScorerAppManager.aidl
@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2016, The Android Open Source Project
+ * 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.
@@ -14,6 +14,6 @@
  * limitations under the License.
  */
 
-package android.net.wifi.hotspot2.pps;
+package android.net;
 
-parcelable HomeSP;
+parcelable NetworkScorerAppManager.NetworkScorerAppData;
diff --git a/core/java/android/net/NetworkScorerAppManager.java b/core/java/android/net/NetworkScorerAppManager.java
index 9e4dd87..a166c7f 100644
--- a/core/java/android/net/NetworkScorerAppManager.java
+++ b/core/java/android/net/NetworkScorerAppManager.java
@@ -18,11 +18,14 @@
 
 import android.Manifest.permission;
 import android.annotation.Nullable;
+import android.content.ComponentName;
 import android.content.ContentResolver;
 import android.content.Context;
 import android.content.Intent;
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
+import android.os.Parcel;
+import android.os.Parcelable;
 import android.os.UserHandle;
 import android.provider.Settings;
 import android.text.TextUtils;
@@ -33,6 +36,7 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
+import java.util.Objects;
 
 /**
  * Internal class for discovering and managing the network scorer/recommendation application.
@@ -52,35 +56,82 @@
     /**
      * Holds metadata about a discovered network scorer/recommendation application.
      */
-    public static class NetworkScorerAppData {
-        /** Package name of this scorer app. */
-        public final String packageName;
-
+    public static final class NetworkScorerAppData implements Parcelable {
         /** UID of the scorer app. */
         public final int packageUid;
+        private final ComponentName mRecommendationService;
 
-        /**
-         * Name of the recommendation service we can bind to.
-         */
-        public final String recommendationServiceClassName;
-
-        public NetworkScorerAppData(String packageName, int packageUid,
-                String recommendationServiceClassName) {
-            this.packageName = packageName;
+        public NetworkScorerAppData(int packageUid, ComponentName recommendationServiceComp) {
             this.packageUid = packageUid;
-            this.recommendationServiceClassName = recommendationServiceClassName;
+            this.mRecommendationService = recommendationServiceComp;
+        }
+
+        protected NetworkScorerAppData(Parcel in) {
+            packageUid = in.readInt();
+            mRecommendationService = ComponentName.readFromParcel(in);
+        }
+
+        @Override
+        public void writeToParcel(Parcel dest, int flags) {
+            dest.writeInt(packageUid);
+            ComponentName.writeToParcel(mRecommendationService, dest);
+        }
+
+        @Override
+        public int describeContents() {
+            return 0;
+        }
+
+        public static final Creator<NetworkScorerAppData> CREATOR =
+                new Creator<NetworkScorerAppData>() {
+                    @Override
+                    public NetworkScorerAppData createFromParcel(Parcel in) {
+                        return new NetworkScorerAppData(in);
+                    }
+
+                    @Override
+                    public NetworkScorerAppData[] newArray(int size) {
+                        return new NetworkScorerAppData[size];
+                    }
+                };
+
+        public String getRecommendationServicePackageName() {
+            return mRecommendationService.getPackageName();
+        }
+
+        public ComponentName getRecommendationServiceComponent() {
+            return mRecommendationService;
         }
 
         @Override
         public String toString() {
-            final StringBuilder sb = new StringBuilder("NetworkScorerAppData{");
-            sb.append("mPackageName='").append(packageName).append('\'');
-            sb.append(", packageUid=").append(packageUid);
-            sb.append(", recommendationServiceClassName='")
-                    .append(recommendationServiceClassName).append('\'');
-            sb.append('}');
-            return sb.toString();
+            return "NetworkScorerAppData{" +
+                    "packageUid=" + packageUid +
+                    ", mRecommendationService=" + mRecommendationService +
+                    '}';
         }
+
+        @Override
+        public boolean equals(Object o) {
+            if (this == o) return true;
+            if (o == null || getClass() != o.getClass()) return false;
+            NetworkScorerAppData that = (NetworkScorerAppData) o;
+            return packageUid == that.packageUid &&
+                    Objects.equals(mRecommendationService, that.mRecommendationService);
+        }
+
+        @Override
+        public int hashCode() {
+            return Objects.hash(packageUid, mRecommendationService);
+        }
+    }
+
+    /**
+     * 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();
     }
 
     /**
@@ -110,16 +161,16 @@
             return null;
         }
 
-        final PackageManager pm = mContext.getPackageManager();
         for (int i = 0; i < potentialPkgs.size(); i++) {
             final String potentialPkg = potentialPkgs.get(i);
 
             // Look for the recommendation service class and required receiver.
             final ResolveInfo resolveServiceInfo = findRecommendationService(potentialPkg);
             if (resolveServiceInfo != null) {
-                return new NetworkScorerAppData(potentialPkg,
-                    resolveServiceInfo.serviceInfo.applicationInfo.uid,
-                    resolveServiceInfo.serviceInfo.name);
+                final ComponentName componentName =
+                        new ComponentName(potentialPkg, resolveServiceInfo.serviceInfo.name);
+                return new NetworkScorerAppData(resolveServiceInfo.serviceInfo.applicationInfo.uid,
+                        componentName);
             } else {
                 if (DEBUG) {
                     Log.d(TAG, potentialPkg + " does not have the required components, skipping.");
diff --git a/core/java/android/net/RecommendationRequest.java b/core/java/android/net/RecommendationRequest.java
index b89a245..9f97c5a 100644
--- a/core/java/android/net/RecommendationRequest.java
+++ b/core/java/android/net/RecommendationRequest.java
@@ -50,7 +50,7 @@
         private WifiConfiguration mDefaultConfig;
         private WifiConfiguration mConnectedConfig;
         private WifiConfiguration[] mConnectableConfigs;
-        private int mLastSelectedNetworkId;
+        private int mLastSelectedNetworkId = -1;
         private long mLastSelectedTimestamp;
 
         public Builder setScanResults(ScanResult[] scanResults) {
@@ -161,7 +161,7 @@
 
     /**
      * @return The {@link WifiConfiguration#networkId} of the last user selected network.
-     *         {@code 0} if not set.
+     *         {@code -1} if not set.
      */
     public int getLastSelectedNetworkId() {
         return mLastSelectedNetworkId;
diff --git a/core/java/android/net/ScoredNetwork.java b/core/java/android/net/ScoredNetwork.java
index d396b50..ba0a8b5 100644
--- a/core/java/android/net/ScoredNetwork.java
+++ b/core/java/android/net/ScoredNetwork.java
@@ -106,7 +106,7 @@
      * the Network Recommendation Provider.
      *
      * @see #ATTRIBUTES_KEY_HAS_CAPTIVE_PORTAL
-     * @see #ATTRIBUTES_KEY_RANKING_SCORE_OFFSET_KEY
+     * @see #ATTRIBUTES_KEY_RANKING_SCORE_OFFSET
      */
     @Nullable
     public final Bundle attributes;
diff --git a/core/java/android/net/WifiKey.java b/core/java/android/net/WifiKey.java
index 99de99e..68b505d 100644
--- a/core/java/android/net/WifiKey.java
+++ b/core/java/android/net/WifiKey.java
@@ -64,10 +64,10 @@
      * @throws IllegalArgumentException if either the SSID or BSSID is invalid.
      */
     public WifiKey(String ssid, String bssid) {
-        if (!SSID_PATTERN.matcher(ssid).matches()) {
+        if (ssid == null || !SSID_PATTERN.matcher(ssid).matches()) {
             throw new IllegalArgumentException("Invalid ssid: " + ssid);
         }
-        if (!BSSID_PATTERN.matcher(bssid).matches()) {
+        if (bssid == null || !BSSID_PATTERN.matcher(bssid).matches()) {
             throw new IllegalArgumentException("Invalid bssid: " + bssid);
         }
         this.ssid = ssid;
diff --git a/core/java/android/os/BatteryManager.java b/core/java/android/os/BatteryManager.java
index 263750a..3a441c7 100644
--- a/core/java/android/os/BatteryManager.java
+++ b/core/java/android/os/BatteryManager.java
@@ -201,6 +201,11 @@
      */
     public static final int BATTERY_PROPERTY_ENERGY_COUNTER = 5;
 
+    /**
+     * Battery charge status, from a BATTERY_STATUS_* value.
+     */
+    public static final int BATTERY_PROPERTY_BATTERY_STATUS = 6;
+
     private final IBatteryStats mBatteryStats;
     private final IBatteryPropertiesRegistrar mBatteryPropertiesRegistrar;
 
diff --git a/core/java/android/os/Debug.java b/core/java/android/os/Debug.java
index 210ddb6..e05bd89 100644
--- a/core/java/android/os/Debug.java
+++ b/core/java/android/os/Debug.java
@@ -2219,11 +2219,13 @@
     }
 
     /**
-     * Have the stack traces of the given native process dumped to the
-     * specified file.  Will be appended to the file.
+     * Append the stack traces of a given native process to a specified file.
+     * @param pid pid to dump.
+     * @param file path of file to append dump to.
+     * @param timeoutSecs time to wait in seconds, or 0 to wait forever.
      * @hide
      */
-    public static native void dumpNativeBacktraceToFile(int pid, String file);
+    public static native void dumpNativeBacktraceToFileTimeout(int pid, String file, int timeoutSecs);
 
     /**
      * Get description of unreachable native memory.
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/Parcel.java b/core/java/android/os/Parcel.java
index e99d303..f94e89a 100644
--- a/core/java/android/os/Parcel.java
+++ b/core/java/android/os/Parcel.java
@@ -17,6 +17,7 @@
 package android.os;
 
 import android.annotation.IntegerRes;
+import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.text.TextUtils;
 import android.util.ArrayMap;
@@ -1339,7 +1340,7 @@
     }
 
     /**
-     * Flatten a heterogeneous array containing a particular object type into
+     * Flatten a homogeneous array containing a particular object type into
      * the parcel, at
      * the current dataPosition() and growing dataCapacity() if needed.  The
      * type of the objects in the array must be one that implements Parcelable.
@@ -1361,7 +1362,7 @@
         if (val != null) {
             int N = val.length;
             writeInt(N);
-            for (int i=0; i<N; i++) {
+            for (int i = 0; i < N; i++) {
                 T item = val[i];
                 if (item != null) {
                     writeInt(1);
@@ -1376,6 +1377,146 @@
     }
 
     /**
+     * Write a uniform (all items are null or the same class) array list of
+     * parcelables.
+     *
+     * @param list The list to write.
+     *
+     * @hide
+     */
+    public final <T extends Parcelable> void writeTypedArrayList(@Nullable ArrayList<T> list,
+            int parcelableFlags) {
+        if (list != null) {
+            int N = list.size();
+            writeInt(N);
+            boolean wroteCreator = false;
+            for (int i = 0; i < N; i++) {
+                T item = list.get(i);
+                if (item != null) {
+                    writeInt(1);
+                    if (!wroteCreator) {
+                        writeParcelableCreator(item);
+                        wroteCreator = true;
+                    }
+                    item.writeToParcel(this, parcelableFlags);
+                } else {
+                    writeInt(0);
+                }
+            }
+        } else {
+            writeInt(-1);
+        }
+    }
+
+    /**
+     * Reads a uniform (all items are null or the same class) array list of
+     * parcelables.
+     *
+     * @return The list or null.
+     *
+     * @hide
+     */
+    public final @Nullable <T> ArrayList<T> readTypedArrayList(@Nullable ClassLoader loader) {
+        int N = readInt();
+        if (N <= 0) {
+            return null;
+        }
+        Parcelable.Creator<?> creator = null;
+        ArrayList<T> result = new ArrayList<T>(N);
+        for (int i = 0; i < N; i++) {
+            if (readInt() != 0) {
+                if (creator == null) {
+                    creator = readParcelableCreator(loader);
+                    if (creator == null) {
+                        return null;
+                    }
+                }
+                final T parcelable;
+                if (creator instanceof Parcelable.ClassLoaderCreator<?>) {
+                    Parcelable.ClassLoaderCreator<?> classLoaderCreator =
+                            (Parcelable.ClassLoaderCreator<?>) creator;
+                    parcelable = (T) classLoaderCreator.createFromParcel(this, loader);
+                } else {
+                    parcelable = (T) creator.createFromParcel(this);
+                }
+                result.add(parcelable);
+            } else {
+                result.add(null);
+            }
+        }
+        return result;
+    }
+
+    /**
+     * Write a uniform (all items are null or the same class) array set of
+     * parcelables.
+     *
+     * @param set The set to write.
+     *
+     * @hide
+     */
+    public final <T extends Parcelable> void writeTypedArraySet(@Nullable ArraySet<T> set,
+            int parcelableFlags) {
+        if (set != null) {
+            int N = set.size();
+            writeInt(N);
+            boolean wroteCreator = false;
+            for (int i = 0; i < N; i++) {
+                T item = set.valueAt(i);
+                if (item != null) {
+                    writeInt(1);
+                    if (!wroteCreator) {
+                        writeParcelableCreator(item);
+                        wroteCreator = true;
+                    }
+                    item.writeToParcel(this, parcelableFlags);
+                } else {
+                    writeInt(0);
+                }
+            }
+        } else {
+            writeInt(-1);
+        }
+    }
+
+    /**
+     * Reads a uniform (all items are null or the same class) array set of
+     * parcelables.
+     *
+     * @return The set or null.
+     *
+     * @hide
+     */
+    public final @Nullable <T> ArraySet<T> readTypedArraySet(@Nullable ClassLoader loader) {
+        int N = readInt();
+        if (N <= 0) {
+            return null;
+        }
+        Parcelable.Creator<?> creator = null;
+        ArraySet<T> result = new ArraySet<T>(N);
+        for (int i = 0; i < N; i++) {
+            T parcelable = null;
+            if (readInt() != 0) {
+                if (creator == null) {
+                    creator = readParcelableCreator(loader);
+                    if (creator == null) {
+                        return null;
+                    }
+                }
+                if (creator instanceof Parcelable.ClassLoaderCreator<?>) {
+                    Parcelable.ClassLoaderCreator<?> classLoaderCreator =
+                            (Parcelable.ClassLoaderCreator<?>) creator;
+                    parcelable = (T) classLoaderCreator.createFromParcel(this, loader);
+                } else {
+                    parcelable = (T) creator.createFromParcel(this);
+                }
+            }
+            result.append(parcelable);
+        }
+        return result;
+    }
+
+    /**
      * Flatten the Parcelable object into the parcel.
      *
      * @param val The Parcelable object to be written.
diff --git a/core/java/android/os/PowerManager.java b/core/java/android/os/PowerManager.java
index dff0a28..31b3bc9 100644
--- a/core/java/android/os/PowerManager.java
+++ b/core/java/android/os/PowerManager.java
@@ -508,15 +508,6 @@
     }
 
     /**
-     * Returns true if the twilight service should be used to adjust screen brightness
-     * policy.  This setting is experimental and disabled by default.
-     * @hide
-     */
-    public static boolean useTwilightAdjustmentFeature() {
-        return SystemProperties.getBoolean("persist.power.usetwilightadj", false);
-    }
-
-    /**
      * Creates a new wake lock with the specified level and flags.
      * <p>
      * The {@code levelAndFlags} parameter specifies a wake lock level and optional flags
diff --git a/wifi/java/android/net/wifi/hotspot2/pps/HomeSP.aidl b/core/java/android/os/Seccomp.java
similarity index 69%
copy from wifi/java/android/net/wifi/hotspot2/pps/HomeSP.aidl
copy to core/java/android/os/Seccomp.java
index 62d5603..f14e93f 100644
--- a/wifi/java/android/net/wifi/hotspot2/pps/HomeSP.aidl
+++ b/core/java/android/os/Seccomp.java
@@ -1,11 +1,11 @@
-/**
- * Copyright (c) 2016, The Android Open Source Project
+/*
+ * 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
+ *      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,
@@ -14,6 +14,11 @@
  * limitations under the License.
  */
 
-package android.net.wifi.hotspot2.pps;
+package android.os;
 
-parcelable HomeSP;
+/**
+ * @hide
+ */
+public final class Seccomp {
+    public static final native void setPolicy();
+}
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java
index 388054d..21c70f9 100644
--- a/core/java/android/os/UserManager.java
+++ b/core/java/android/os/UserManager.java
@@ -30,6 +30,7 @@
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
+import android.content.IntentFilter;
 import android.content.IntentSender;
 import android.content.pm.UserInfo;
 import android.content.res.Resources;
@@ -421,6 +422,14 @@
      * <p>
      * The default value is <code>false</code>.
      *
+     * <p><strong>Note:</strong> The user will still be able to perform those actions via other
+     * means (such as adb). Third party apps will also be able to uninstall apps via the
+     * {@link android.content.pm.PackageInstaller}. {@link #DISALLOW_UNINSTALL_APPS} or
+     * {@link DevicePolicyManager#setUninstallBlocked(ComponentName, String, boolean)} should be
+     * used to prevent the user from uninstalling apps completely, and
+     * {@link DevicePolicyManager#addPersistentPreferredActivity(ComponentName, IntentFilter, ComponentName)}
+     * to add a default intent handler for a given intent filter.
+     *
      * <p>Key for user restrictions.
      * <p>Type: Boolean
      * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -516,6 +525,7 @@
      * <li>{@link LayoutParams#TYPE_SYSTEM_ALERT}</li>
      * <li>{@link LayoutParams#TYPE_SYSTEM_ERROR}</li>
      * <li>{@link LayoutParams#TYPE_SYSTEM_OVERLAY}</li>
+     * <li>{@link LayoutParams#TYPE_APPLICATION_OVERLAY}</li>
      *
      * <p>This can only be set by device owners and profile owners on the primary user.
      * The default value is <code>false</code>.
@@ -634,7 +644,7 @@
      * @see #getUserRestrictions()
      * @hide
      */
-    public static final String DISALLLOW_UNMUTE_DEVICE = "disallow_unmute_device";
+    public static final String DISALLOW_UNMUTE_DEVICE = "disallow_unmute_device";
 
     /**
      * Specifies if a user is not allowed to use cellular data when roaming. This can only be set by
@@ -1047,6 +1057,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) {
@@ -1067,6 +1081,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) {
@@ -1141,6 +1159,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/ZygoteProcess.java b/core/java/android/os/ZygoteProcess.java
index fa9f394..b3366d8 100644
--- a/core/java/android/os/ZygoteProcess.java
+++ b/core/java/android/os/ZygoteProcess.java
@@ -506,4 +506,24 @@
             state.writer.flush();
         }
     }
+
+    /**
+     * Instructs the zygote to preload the default set of classes and resources. Returns
+     * {@code true} if a preload was performed as a result of this call, and {@code false}
+     * otherwise. The latter usually means that the zygote eagerly preloaded at startup
+     * or due to a previous call to {@code preloadDefault}. Note that this call is synchronous.
+     */
+    public boolean preloadDefault(String abi) throws ZygoteStartFailedEx, IOException {
+        synchronized (mLock) {
+            ZygoteState state = openZygoteSocketIfNeeded(abi);
+            // Each query starts with the argument count (1 in this case)
+            state.writer.write("1");
+            state.writer.newLine();
+            state.writer.write("--preload-default");
+            state.writer.newLine();
+            state.writer.flush();
+
+            return (state.inputStream.readInt() == 0);
+        }
+    }
 }
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/preference/PreferenceActivity.java b/core/java/android/preference/PreferenceActivity.java
index 06666f4..600d82f 100644
--- a/core/java/android/preference/PreferenceActivity.java
+++ b/core/java/android/preference/PreferenceActivity.java
@@ -16,6 +16,7 @@
 
 package android.preference;
 
+import android.animation.LayoutTransition;
 import android.annotation.Nullable;
 import android.annotation.StringRes;
 import android.annotation.XmlRes;
@@ -87,7 +88,7 @@
  * items.  Doing this implicitly switches the class into its new "headers
  * + fragments" mode rather than the old style of just showing a single
  * preferences list.
- * 
+ *
  * <div class="special reference">
  * <h3>Developer Guides</h3>
  * <p>For information about using {@code PreferenceActivity},
@@ -199,6 +200,9 @@
 
     private ViewGroup mPrefsContainer;
 
+    // Null if in legacy mode.
+    private ViewGroup mHeadersContainer;
+
     private FragmentBreadCrumbs mFragmentBreadCrumbs;
 
     private boolean mSinglePane;
@@ -292,7 +296,7 @@
                 holder = (HeaderViewHolder) view.getTag();
             }
 
-            // All view fields must be updated every time, because the view may be recycled 
+            // All view fields must be updated every time, because the view may be recycled
             Header header = getItem(position);
             if (mRemoveIconIfEmpty) {
                 if (header.iconRes == 0) {
@@ -469,7 +473,7 @@
             }
             return breadCrumbShortTitle;
         }
-        
+
         @Override
         public int describeContents() {
             return 0;
@@ -558,6 +562,7 @@
 
         mListFooter = (FrameLayout)findViewById(com.android.internal.R.id.list_footer);
         mPrefsContainer = (ViewGroup) findViewById(com.android.internal.R.id.prefs_frame);
+        mHeadersContainer = (ViewGroup) findViewById(com.android.internal.R.id.headers);
         boolean hidingHeaders = onIsHidingHeaders();
         mSinglePane = hidingHeaders || !onIsMultiPane();
         String initialFragment = getIntent().getStringExtra(EXTRA_SHOW_FRAGMENT);
@@ -575,66 +580,41 @@
                         (int) HEADER_ID_UNDEFINED);
                 if (curHeader >= 0 && curHeader < mHeaders.size()) {
                     setSelectedHeader(mHeaders.get(curHeader));
+                } else if (!mSinglePane && initialFragment == null) {
+                    switchToHeader(onGetInitialHeader());
                 }
+            } else {
+                // This will for instance hide breadcrumbs for single pane.
+                showBreadCrumbs(getTitle(), null);
+            }
+        } else {
+            if (!onIsHidingHeaders()) {
+                onBuildHeaders(mHeaders);
             }
 
-        } else {
-            if (initialFragment != null && mSinglePane) {
-                // If we are just showing a fragment, we want to run in
-                // new fragment mode, but don't need to compute and show
-                // the headers.
+            if (initialFragment != null) {
                 switchToHeader(initialFragment, initialArguments);
-                if (initialTitle != 0) {
-                    CharSequence initialTitleStr = getText(initialTitle);
-                    CharSequence initialShortTitleStr = initialShortTitle != 0
-                            ? getText(initialShortTitle) : null;
-                    showBreadCrumbs(initialTitleStr, initialShortTitleStr);
-                }
-
-            } else {
-                // We need to try to build the headers.
-                onBuildHeaders(mHeaders);
-
-                // If there are headers, then at this point we need to show
-                // them and, depending on the screen, we may also show in-line
-                // the currently selected preference fragment.
-                if (mHeaders.size() > 0) {
-                    if (!mSinglePane) {
-                        if (initialFragment == null) {
-                            Header h = onGetInitialHeader();
-                            switchToHeader(h);
-                        } else {
-                            switchToHeader(initialFragment, initialArguments);
-                        }
-                    }
-                }
+            } else if (!mSinglePane && mHeaders.size() > 0) {
+                switchToHeader(onGetInitialHeader());
             }
         }
 
-        // The default configuration is to only show the list view.  Adjust
-        // visibility for other configurations.
-        if (initialFragment != null && mSinglePane) {
-            // Single pane, showing just a prefs fragment.
-            findViewById(com.android.internal.R.id.headers).setVisibility(View.GONE);
-            mPrefsContainer.setVisibility(View.VISIBLE);
-            if (initialTitle != 0) {
-                CharSequence initialTitleStr = getText(initialTitle);
-                CharSequence initialShortTitleStr = initialShortTitle != 0
-                        ? getText(initialShortTitle) : null;
-                showBreadCrumbs(initialTitleStr, initialShortTitleStr);
-            }
-        } else if (mHeaders.size() > 0) {
+        if (mHeaders.size() > 0) {
             setListAdapter(new HeaderAdapter(this, mHeaders, mPreferenceHeaderItemResId,
                     mPreferenceHeaderRemoveEmptyIcon));
             if (!mSinglePane) {
-                // Multi-pane.
                 getListView().setChoiceMode(AbsListView.CHOICE_MODE_SINGLE);
-                if (mCurHeader != null) {
-                    setSelectedHeader(mCurHeader);
-                }
-                mPrefsContainer.setVisibility(View.VISIBLE);
             }
-        } else {
+        }
+
+        if (mSinglePane && initialFragment != null && initialTitle != 0) {
+            CharSequence initialTitleStr = getText(initialTitle);
+            CharSequence initialShortTitleStr = initialShortTitle != 0
+                    ? getText(initialShortTitle) : null;
+            showBreadCrumbs(initialTitleStr, initialShortTitleStr);
+        }
+
+        if (mHeaders.size() == 0 && initialFragment == null) {
             // If there are no headers, we are in the old "just show a screen
             // of preferences" mode.
             setContentView(com.android.internal.R.layout.preference_list_content_single);
@@ -642,6 +622,25 @@
             mPrefsContainer = (ViewGroup) findViewById(com.android.internal.R.id.prefs);
             mPreferenceManager = new PreferenceManager(this, FIRST_REQUEST_CODE);
             mPreferenceManager.setOnPreferenceTreeClickListener(this);
+            mHeadersContainer = null;
+        } else if (mSinglePane) {
+            // Single-pane so one of the header or prefs containers must be hidden.
+            if (initialFragment != null || mCurHeader != null) {
+                mHeadersContainer.setVisibility(View.GONE);
+            } else {
+                mPrefsContainer.setVisibility(View.GONE);
+            }
+
+            // This animates our manual transitions between headers and prefs panel in single-pane.
+            // It also comes last so we don't animate any initial layout changes done above.
+            ViewGroup container = (ViewGroup) findViewById(
+                    com.android.internal.R.id.prefs_container);
+            container.setLayoutTransition(new LayoutTransition());
+        } else {
+            // Multi-pane
+            if (mHeaders.size() > 0 && mCurHeader != null) {
+                setSelectedHeader(mCurHeader);
+            }
         }
 
         // see if we should show Back/Next buttons
@@ -697,12 +696,25 @@
         }
     }
 
+    @Override
+    public void onBackPressed() {
+        if (mCurHeader != null && mSinglePane && getFragmentManager().getBackStackEntryCount() == 0
+                && getIntent().getStringExtra(EXTRA_SHOW_FRAGMENT) == null) {
+            mCurHeader = null;
+
+            mPrefsContainer.setVisibility(View.GONE);
+            mHeadersContainer.setVisibility(View.VISIBLE);
+            getListView().clearChoices();
+        } else {
+            super.onBackPressed();
+        }
+    }
+
     /**
      * Returns true if this activity is currently showing the header list.
      */
     public boolean hasHeaders() {
-        return getListView().getVisibility() == View.VISIBLE
-                && mPreferenceManager == null;
+        return mHeadersContainer != null && mHeadersContainer.getVisibility() == View.VISIBLE;
     }
 
     /**
@@ -718,7 +730,7 @@
      * and a preference fragment.
      */
     public boolean isMultiPane() {
-        return hasHeaders() && mPrefsContainer.getVisibility() == View.VISIBLE;
+        return !mSinglePane;
     }
 
     /**
@@ -820,14 +832,14 @@
             if (!"preference-headers".equals(nodeName)) {
                 throw new RuntimeException(
                         "XML document must start with <preference-headers> tag; found"
-                        + nodeName + " at " + parser.getPositionDescription());
+                                + nodeName + " at " + parser.getPositionDescription());
             }
 
             Bundle curBundle = null;
 
             final int outerDepth = parser.getDepth();
             while ((type=parser.next()) != XmlPullParser.END_DOCUMENT
-                   && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) {
+                    && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) {
                 if (type == XmlPullParser.END_TAG || type == XmlPullParser.TEXT) {
                     continue;
                 }
@@ -889,7 +901,7 @@
 
                     final int innerDepth = parser.getDepth();
                     while ((type=parser.next()) != XmlPullParser.END_DOCUMENT
-                           && (type != XmlPullParser.END_TAG || parser.getDepth() > innerDepth)) {
+                            && (type != XmlPullParser.END_TAG || parser.getDepth() > innerDepth)) {
                         if (type == XmlPullParser.END_TAG || type == XmlPullParser.TEXT) {
                             continue;
                         }
@@ -939,8 +951,9 @@
         if (getApplicationInfo().targetSdkVersion  >= android.os.Build.VERSION_CODES.KITKAT) {
             throw new RuntimeException(
                     "Subclasses of PreferenceActivity must override isValidFragment(String)"
-                    + " to verify that the Fragment class is valid! " + this.getClass().getName()
-                    + " has not checked if fragment " + fragmentName + " is valid.");
+                            + " to verify that the Fragment class is valid! "
+                            + this.getClass().getName()
+                            + " has not checked if fragment " + fragmentName + " is valid.");
         } else {
             return true;
         }
@@ -1017,6 +1030,13 @@
         // Only call this if we didn't save the instance state for later.
         // If we did save it, it will be restored when we bind the adapter.
         super.onRestoreInstanceState(state);
+
+        if (!mSinglePane) {
+            // Multi-pane.
+            if (mCurHeader != null) {
+                setSelectedHeader(mCurHeader);
+            }
+        }
     }
 
     @Override
@@ -1061,18 +1081,7 @@
      */
     public void onHeaderClick(Header header, int position) {
         if (header.fragment != null) {
-            if (mSinglePane) {
-                int titleRes = header.breadCrumbTitleRes;
-                int shortTitleRes = header.breadCrumbShortTitleRes;
-                if (titleRes == 0) {
-                    titleRes = header.titleRes;
-                    shortTitleRes = 0;
-                }
-                startWithFragment(header.fragment, header.fragmentArguments, null, 0,
-                        titleRes, shortTitleRes);
-            } else {
-                switchToHeader(header);
-            }
+            switchToHeader(header);
         } else if (header.intent != null) {
             startActivity(header.intent);
         }
@@ -1084,7 +1093,7 @@
      * the selected fragment.  The default implementation constructs an Intent
      * that re-launches the current activity with the appropriate arguments to
      * display the fragment.
-     * 
+     *
      * @param fragmentName The name of the fragment to display.
      * @param args Optional arguments to supply to the fragment.
      * @param titleRes Optional resource ID of title to show for this item.
@@ -1103,7 +1112,7 @@
         intent.putExtra(EXTRA_NO_HEADERS, true);
         return intent;
     }
-    
+
     /**
      * Like {@link #startWithFragment(String, Bundle, Fragment, int, int, int)}
      * but uses a 0 titleRes.
@@ -1223,11 +1232,21 @@
             throw new IllegalArgumentException("Invalid fragment for this activity: "
                     + fragmentName);
         }
+
         Fragment f = Fragment.instantiate(this, fragmentName, args);
         FragmentTransaction transaction = getFragmentManager().beginTransaction();
-        transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
+        transaction.setTransition(mSinglePane
+                ? FragmentTransaction.TRANSIT_NONE
+                : FragmentTransaction.TRANSIT_FRAGMENT_FADE);
         transaction.replace(com.android.internal.R.id.prefs, f);
         transaction.commitAllowingStateLoss();
+
+        if (mSinglePane && mPrefsContainer.getVisibility() == View.GONE) {
+            // We are transitioning from headers to preferences panel in single-pane so we need
+            // to hide headers and show the prefs container.
+            mPrefsContainer.setVisibility(View.VISIBLE);
+            mHeadersContainer.setVisibility(View.GONE);
+        }
     }
 
     /**
@@ -1340,7 +1359,7 @@
      * be instantiated and placed in the appropriate pane.  If running in
      * single-pane mode, a new activity will be launched in which to show the
      * fragment.
-     * 
+     *
      * @param fragmentClass Full name of the class implementing the fragment.
      * @param args Any desired arguments to supply to the fragment.
      * @param titleRes Optional resource identifier of the title of this
@@ -1355,29 +1374,25 @@
      */
     public void startPreferencePanel(String fragmentClass, Bundle args, @StringRes int titleRes,
             CharSequence titleText, Fragment resultTo, int resultRequestCode) {
-        if (mSinglePane) {
-            startWithFragment(fragmentClass, args, resultTo, resultRequestCode, titleRes, 0);
-        } else {
-            Fragment f = Fragment.instantiate(this, fragmentClass, args);
-            if (resultTo != null) {
-                f.setTargetFragment(resultTo, resultRequestCode);
-            }
-            FragmentTransaction transaction = getFragmentManager().beginTransaction();
-            transaction.replace(com.android.internal.R.id.prefs, f);
-            if (titleRes != 0) {
-                transaction.setBreadCrumbTitle(titleRes);
-            } else if (titleText != null) {
-                transaction.setBreadCrumbTitle(titleText);
-            }
-            transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
-            transaction.addToBackStack(BACK_STACK_PREFS);
-            transaction.commitAllowingStateLoss();
+        Fragment f = Fragment.instantiate(this, fragmentClass, args);
+        if (resultTo != null) {
+            f.setTargetFragment(resultTo, resultRequestCode);
         }
+        FragmentTransaction transaction = getFragmentManager().beginTransaction();
+        transaction.replace(com.android.internal.R.id.prefs, f);
+        if (titleRes != 0) {
+            transaction.setBreadCrumbTitle(titleRes);
+        } else if (titleText != null) {
+            transaction.setBreadCrumbTitle(titleText);
+        }
+        transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
+        transaction.addToBackStack(BACK_STACK_PREFS);
+        transaction.commitAllowingStateLoss();
     }
 
     /**
      * Called by a preference panel fragment to finish itself.
-     * 
+     *
      * @param caller The fragment that is asking to be finished.
      * @param resultCode Optional result code to send back to the original
      * launching fragment.
@@ -1385,21 +1400,16 @@
      * launching fragment.
      */
     public void finishPreferencePanel(Fragment caller, int resultCode, Intent resultData) {
-        if (mSinglePane) {
-            setResult(resultCode, resultData);
-            finish();
-        } else {
-            // XXX be smarter about popping the stack.
-            onBackPressed();
-            if (caller != null) {
-                if (caller.getTargetFragment() != null) {
-                    caller.getTargetFragment().onActivityResult(caller.getTargetRequestCode(),
-                            resultCode, resultData);
-                }
+        // TODO: be smarter about popping the stack.
+        onBackPressed();
+        if (caller != null) {
+            if (caller.getTargetFragment() != null) {
+                caller.getTargetFragment().onActivityResult(caller.getTargetRequestCode(),
+                        resultCode, resultData);
             }
         }
     }
-    
+
     @Override
     public boolean onPreferenceStartFragment(PreferenceFragment caller, Preference pref) {
         startPreferencePanel(pref.getFragment(), pref.getExtras(), pref.getTitleRes(),
diff --git a/core/java/android/preference/SeekBarVolumizer.java b/core/java/android/preference/SeekBarVolumizer.java
index 11b9606..ee8eed1 100644
--- a/core/java/android/preference/SeekBarVolumizer.java
+++ b/core/java/android/preference/SeekBarVolumizer.java
@@ -348,8 +348,8 @@
             if (msg.what == UPDATE_SLIDER) {
                 if (mSeekBar != null) {
                     mLastProgress = msg.arg1;
-                    mLastAudibleStreamVolume = Math.abs(msg.arg2);
-                    final boolean muted = msg.arg2 < 0;
+                    mLastAudibleStreamVolume = msg.arg2;
+                    final boolean muted = ((Boolean)msg.obj).booleanValue();
                     if (muted != mMuted) {
                         mMuted = muted;
                         if (mCallback != null) {
@@ -362,8 +362,7 @@
         }
 
         public void postUpdateSlider(int volume, int lastAudibleVolume, boolean mute) {
-            final int arg2 = lastAudibleVolume * (mute ? -1 : 1);
-            obtainMessage(UPDATE_SLIDER, volume, arg2).sendToTarget();
+            obtainMessage(UPDATE_SLIDER, volume, lastAudibleVolume, new Boolean(mute)).sendToTarget();
         }
     }
 
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/OneTimeUseBuilder.java b/core/java/android/provider/OneTimeUseBuilder.java
new file mode 100644
index 0000000..682e9c7
--- /dev/null
+++ b/core/java/android/provider/OneTimeUseBuilder.java
@@ -0,0 +1,51 @@
+/*
+ * 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.provider;
+
+/**
+ * A builder that facilitates prohibiting its use after an instance was created with it.
+ *
+ * Suggested usage:
+ * call {@link #checkNotUsed} in each setter, and {@link #markUsed} in {@link #build}
+ *
+ * @param <T> Type of object being built
+ * @hide
+ */
+public abstract class OneTimeUseBuilder<T> {
+    private boolean used = false;
+
+    protected void markUsed() {
+        checkNotUsed();
+        used = true;
+    }
+
+    protected void checkNotUsed() {
+        if (used) {
+            throw new IllegalStateException(
+                    "This Builder should not be reused. Use a new Builder instance instead");
+        }
+    }
+
+    /**
+     * Builds the instance
+     *
+     * Once this method is called, this builder should no longer be used. Any subsequent calls to a
+     * setter or {@code build()} will throw an exception
+     */
+    public abstract T build();
+}
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index d83f2cb..aca41b8 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;
@@ -843,6 +844,22 @@
             "android.settings.SYSTEM_UPDATE_SETTINGS";
 
     /**
+     * Activity Action: Show settings for managed profile settings.
+     * <p>
+     * In some cases, a matching Activity may not exist, so ensure you
+     * safeguard against this.
+     * <p>
+     * Input: Nothing.
+     * <p>
+     * Output: Nothing.
+     *
+     * @hide
+     */
+    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+    public static final String ACTION_MANAGED_PROFILE_SETTINGS =
+            "android.settings.MANAGED_PROFILE_SETTINGS";
+
+    /**
      * Activity Action: Show settings to allow configuration of sync settings.
      * <p>
      * In some cases, a matching Activity may not exist, so ensure you
@@ -1279,9 +1296,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 +1304,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>
@@ -6615,6 +6628,14 @@
                 "lock_screen_show_notifications";
 
         /**
+         * This preference stores the last stack active task time for each user, which affects what
+         * tasks will be visible in Overview.
+         * @hide
+         */
+        public static final String OVERVIEW_LAST_STACK_ACTIVE_TIME =
+                "overview_last_stack_active_time";
+
+        /**
          * List of TV inputs that are currently hidden. This is a string
          * containing the IDs of all hidden TV inputs. Each ID is encoded by
          * {@link android.net.Uri#encode(String)} and separated by ':'.
@@ -6695,6 +6716,13 @@
                 "camera_double_twist_to_flip_enabled";
 
         /**
+         * Whether the assist gesture should be enabled.
+         *
+         * @hide
+         */
+        public static final String ASSIST_GESTURE_ENABLED = "assist_gesture_enabled";
+
+        /**
          * Control whether Night display is currently activated.
          * @hide
          */
@@ -6721,12 +6749,6 @@
         public static final String NIGHT_DISPLAY_CUSTOM_END_TIME = "night_display_custom_end_time";
 
         /**
-         * Whether brightness should automatically adjust based on twilight state.
-         * @hide
-         */
-        public static final String BRIGHTNESS_USE_TWILIGHT = "brightness_use_twilight";
-
-        /**
          * Names of the service components that the current user has explicitly allowed to
          * be a VR mode listener, separated by ':'.
          *
@@ -6831,39 +6853,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
          */
@@ -6983,7 +6972,9 @@
             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,
+            ASSIST_GESTURE_ENABLED
         };
 
         /**
@@ -8226,6 +8217,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.
          *
@@ -9585,6 +9589,16 @@
         public static final String RETAIL_DEMO_MODE_CONSTANTS = "retail_demo_mode_constants";
 
         /**
+         * When blocked for the network policy rules to get updated, the maximum time that the
+         * {@link ActivityThread} have to wait before unblocking.
+         *
+         * Type: long
+         *
+         * @hide
+         */
+        public static final String WAIT_FOR_NETWORK_TIMEOUT_MS = "wait_for_network_timeout_ms";
+
+        /**
          * The reason for the settings database being downgraded. This is only for
          * troubleshooting purposes and its value should not be interpreted in any way.
          *
diff --git a/core/java/android/provider/SettingsStringUtil.java b/core/java/android/provider/SettingsStringUtil.java
new file mode 100644
index 0000000..3dfedea
--- /dev/null
+++ b/core/java/android/provider/SettingsStringUtil.java
@@ -0,0 +1,174 @@
+/*
+ * 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.provider;
+
+import android.content.ComponentName;
+import android.content.ContentResolver;
+import android.text.TextUtils;
+
+import com.android.internal.util.ArrayUtils;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.function.Function;
+
+/**
+ * Utilities for dealing with {@link String} values in {@link Settings}
+ *
+ * @hide
+ */
+public class SettingsStringUtil {
+    private SettingsStringUtil() {}
+
+    public static final String DELIMITER = ":";
+
+    /**
+     * A {@link HashSet} of items, that uses a common convention of setting string
+     * serialization/deserialization of separating multiple items with {@link #DELIMITER}
+     */
+    public static abstract class ColonDelimitedSet<T> extends HashSet<T> {
+
+        public ColonDelimitedSet(String colonSeparatedItems) {
+            for (String cn :
+                    TextUtils.split(TextUtils.emptyIfNull(colonSeparatedItems), DELIMITER)) {
+                add(itemFromString(cn));
+            }
+        }
+
+        protected abstract T itemFromString(String s);
+        protected String itemToString(T item) {
+            return String.valueOf(item);
+        }
+
+        @Override
+        public String toString() {
+            StringBuilder sb = new StringBuilder();
+            Iterator<T> it = iterator();
+            if (it.hasNext()) {
+                sb.append(itemToString(it.next()));
+                while (it.hasNext()) {
+                    sb.append(DELIMITER);
+                    sb.append(itemToString(it.next()));
+                }
+            }
+            return sb.toString();
+        }
+
+
+        public static class OfStrings extends ColonDelimitedSet<String> {
+            public OfStrings(String colonSeparatedItems) {
+                super(colonSeparatedItems);
+            }
+
+            @Override
+            protected String itemFromString(String s) {
+                return s;
+            }
+
+            public static String add(String delimitedElements, String element) {
+                final ColonDelimitedSet<String> set
+                        = new ColonDelimitedSet.OfStrings(delimitedElements);
+                if (set.contains(element)) {
+                    return delimitedElements;
+                }
+                set.add(element);
+                return set.toString();
+            }
+
+            public static String remove(String delimitedElements, String element) {
+                final ColonDelimitedSet<String> set
+                        = new ColonDelimitedSet.OfStrings(delimitedElements);
+                if (!set.contains(element)) {
+                    return delimitedElements;
+                }
+                set.remove(element);
+                return set.toString();
+            }
+
+            public static boolean contains(String delimitedElements, String element) {
+                final String[] elements = TextUtils.split(delimitedElements, DELIMITER);
+                return ArrayUtils.indexOf(elements, element) != -1;
+            }
+        }
+    }
+
+    public static class ComponentNameSet extends ColonDelimitedSet<ComponentName> {
+        public ComponentNameSet(String colonSeparatedPackageNames) {
+            super(colonSeparatedPackageNames);
+        }
+
+        @Override
+        protected ComponentName itemFromString(String s) {
+            return ComponentName.unflattenFromString(s);
+        }
+
+        @Override
+        protected String itemToString(ComponentName item) {
+            return item.flattenToString();
+        }
+
+        public static String add(String delimitedElements, ComponentName element) {
+            final ComponentNameSet set = new ComponentNameSet(delimitedElements);
+            if (set.contains(element)) {
+                return delimitedElements;
+            }
+            set.add(element);
+            return set.toString();
+        }
+
+        public static String remove(String delimitedElements, ComponentName element) {
+            final ComponentNameSet set = new ComponentNameSet(delimitedElements);
+            if (!set.contains(element)) {
+                return delimitedElements;
+            }
+            set.remove(element);
+            return set.toString();
+        }
+
+        public static boolean contains(String delimitedElements, ComponentName element) {
+            return ColonDelimitedSet.OfStrings.contains(
+                    delimitedElements, element.flattenToString());
+        }
+    }
+
+    public static class SettingStringHelper {
+        private final ContentResolver mContentResolver;
+        private final String mSettingName;
+        private final int mUserId;
+
+        public SettingStringHelper(ContentResolver contentResolver, String name, int userId) {
+            mContentResolver = contentResolver;
+            mUserId = userId;
+            mSettingName = name;
+        }
+
+        public String read() {
+            return Settings.Secure.getStringForUser(
+                    mContentResolver, mSettingName, mUserId);
+        }
+
+        public boolean write(String value) {
+            return Settings.Secure.putStringForUser(
+                    mContentResolver, mSettingName, value, mUserId);
+        }
+
+        public boolean modify(Function<String, String> change) {
+            return write(change.apply(read()));
+        }
+    }
+}
diff --git a/core/java/android/service/autofill/AutoFillService.java b/core/java/android/service/autofill/AutoFillService.java
index bfaf23c..4099f59 100644
--- a/core/java/android/service/autofill/AutoFillService.java
+++ b/core/java/android/service/autofill/AutoFillService.java
@@ -15,7 +15,10 @@
  */
 package android.service.autofill;
 
-import android.annotation.CallSuper;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.os.RemoteException;
+import com.android.internal.os.HandlerCaller;
 import android.annotation.SdkConstant;
 import android.app.Activity;
 import android.app.Service;
@@ -24,21 +27,12 @@
 import android.os.Bundle;
 import android.os.CancellationSignal;
 import android.os.IBinder;
+import android.os.ICancellationSignal;
 import android.os.Looper;
-import android.os.Message;
-import android.os.RemoteException;
 import android.util.Log;
-import android.view.autofill.Dataset;
-import android.view.autofill.FillResponse;
 
-import com.android.internal.os.HandlerCaller;
 import com.android.internal.os.SomeArgs;
 
-import java.io.FileDescriptor;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.List;
-
 //TODO(b/33197203): improve javadoc (of both class and methods); in particular, make sure the
 //life-cycle (and how state could be maintained on server-side) is well documented.
 
@@ -48,12 +42,7 @@
  * <p>Apps providing auto-fill capabilities must extend this service.
  */
 public abstract class AutoFillService extends Service {
-
     private static final String TAG = "AutoFillService";
-    static final boolean DEBUG = true; // TODO(b/33197203): set to false once stable
-
-    // TODO(b/33197203): check for device's memory size instead of DEBUG?
-    static final boolean DEBUG_PENDING_CALLBACKS = DEBUG;
 
     /**
      * The {@link Intent} that must be declared as handled by the service.
@@ -77,87 +66,37 @@
      */
     public static final String SERVICE_META_DATA = "android.autofill";
 
-    // Internal bundle keys.
-    /** @hide */ public static final String KEY_CALLBACK = "callback";
-    /** @hide */ public static final String KEY_SAVABLE_IDS = "savable_ids";
-    /** @hide */ public static final String EXTRA_CRYPTO_OBJECT_ID = "crypto_object_id";
-
-    // Prefix for public bundle keys.
-    private static final String KEY_PREFIX = "android.service.autofill.extra.";
-
-    /**
-     * Key of the {@link Bundle} passed to methods such as
-     * {@link #onSaveRequest(AssistStructure, Bundle, SaveCallback)} containing the extras set by
-     * {@link android.view.autofill.FillResponse.Builder#setExtras(Bundle)}.
-     */
-    public static final String EXTRA_RESPONSE_EXTRAS = KEY_PREFIX + "RESPONSE_EXTRAS";
-
-    /**
-     * Key of the {@link Bundle} passed to methods such as
-     * {@link #onSaveRequest(AssistStructure, Bundle, SaveCallback)} containing the extras set by
-     * {@link android.view.autofill.Dataset.Builder#setExtras(Bundle)}.
-     */
-    public static final String EXTRA_DATASET_EXTRAS = KEY_PREFIX + "DATASET_EXTRAS";
-
-    /**
-     * Used to indicate the user selected an action that requires authentication.
-     */
-    public static final int FLAG_AUTHENTICATION_REQUESTED = 1 << 0;
-
-    /**
-     * Used to indicate the user authentication succeeded.
-     */
-    public static final int FLAG_AUTHENTICATION_SUCCESS = 1 << 1;
-
-    /**
-     * Used to indicate the user authentication failed.
-     */
-    public static final int FLAG_AUTHENTICATION_ERROR = 1 << 2;
-
-    /**
-     * Used when the service requested Fingerprint authentication but such option is not available.
-     */
-    public static final int FLAG_FINGERPRINT_AUTHENTICATION_NOT_AVAILABLE  = 1 << 3;
+    // Internal extras
+    /** @hide */
+    public static final String EXTRA_ACTIVITY_TOKEN =
+            "android.service.autofill.extra.ACTIVITY_TOKEN";
 
     // Handler messages.
     private static final int MSG_CONNECT = 1;
     private static final int MSG_DISCONNECT = 2;
-    private static final int MSG_AUTO_FILL_ACTIVITY = 3;
-    private static final int MSG_AUTHENTICATE_FILL_RESPONSE = 4;
-    private static final int MSG_AUTHENTICATE_DATASET = 5;
-    private static final int MSG_SAVE = 6;
+    private static final int MSG_ON_FILL_REQUEST = 3;
+    private static final int MSG_ON_SAVE_REQUEST = 4;
 
     private final IAutoFillService mInterface = new IAutoFillService.Stub() {
-
         @Override
-        public void autoFill(AssistStructure structure, IAutoFillServerCallback callback) {
-            mHandlerCaller
-                    .obtainMessageOO(MSG_AUTO_FILL_ACTIVITY, structure, callback)
+        public void onFillRequest(AssistStructure structure, Bundle extras,
+                IFillCallback callback) {
+            ICancellationSignal transport = CancellationSignal.createTransport();
+            try {
+                callback.onCancellable(transport);
+            } catch (RemoteException e) {
+                e.rethrowFromSystemServer();
+            }
+            mHandlerCaller.obtainMessageOOOO(MSG_ON_FILL_REQUEST, structure,
+                    CancellationSignal.fromTransport(transport), extras, callback)
                     .sendToTarget();
         }
 
         @Override
-        public void save(AssistStructure structure, IAutoFillServerCallback callback,
-                Bundle extras) throws RemoteException {
-            mHandlerCaller
-                    .obtainMessageOOO(MSG_SAVE, structure, callback, extras)
-                    .sendToTarget();
-        }
-
-        @Override
-        public void authenticateFillResponse(Bundle extras, int flags) {
-            final Message msg = mHandlerCaller.obtainMessage(MSG_AUTHENTICATE_FILL_RESPONSE);
-            msg.arg1 = flags;
-            msg.obj = extras;
-            mHandlerCaller.sendMessage(msg);
-        }
-
-        @Override
-        public void authenticateDataset(Bundle extras, int flags) {
-            final Message msg = mHandlerCaller.obtainMessage(MSG_AUTHENTICATE_DATASET);
-            msg.arg1 = flags;
-            msg.obj = extras;
-            mHandlerCaller.sendMessage(msg);
+        public void onSaveRequest(AssistStructure structure, Bundle extras,
+                ISaveCallback callback) {
+            mHandlerCaller.obtainMessageOOO(MSG_ON_SAVE_REQUEST, structure,
+                    extras, callback).sendToTarget();
         }
 
         @Override
@@ -171,63 +110,41 @@
         }
     };
 
-    private final HandlerCaller.Callback mHandlerCallback = new HandlerCaller.Callback() {
-
-        @Override
-        public void executeMessage(Message msg) {
-            switch (msg.what) {
-                case MSG_CONNECT: {
-                    onConnected();
-                    break;
-                } case MSG_AUTO_FILL_ACTIVITY: {
-                    final SomeArgs args = (SomeArgs) msg.obj;
-                    try {
-                        final AssistStructure structure = (AssistStructure) args.arg1;
-                        final IAutoFillServerCallback callback =
-                                (IAutoFillServerCallback) args.arg2;
-                        handleAutoFill(structure, callback);
-                    } finally {
-                        args.recycle();
-                    }
-                    break;
-                } case MSG_SAVE: {
-                    final SomeArgs args = (SomeArgs) msg.obj;
-                    try {
-                        final AssistStructure structure = (AssistStructure) args.arg1;
-                        final IAutoFillServerCallback callback =
-                                (IAutoFillServerCallback) args.arg2;
-                        final Bundle extras = (Bundle) args.arg3;
-                        handleSave(structure, callback, extras);
-                    } finally {
-                        args.recycle();
-                    }
-                    break;
-                } case MSG_AUTHENTICATE_FILL_RESPONSE: {
-                    final int flags = msg.arg1;
-                    final Bundle extras = (Bundle) msg.obj;
-                    onFillResponseAuthenticationRequest(extras, flags);
-                    break;
-                } case MSG_AUTHENTICATE_DATASET: {
-                    final int flags = msg.arg1;
-                    final Bundle extras = (Bundle) msg.obj;
-                    onDatasetAuthenticationRequest(extras, flags);
-                    break;
-                } case MSG_DISCONNECT: {
-                    onDisconnected();
-                    break;
-                } default: {
-                    Log.w(TAG, "MyCallbacks received invalid message type: " + msg);
-                }
+    private final HandlerCaller.Callback mHandlerCallback = (msg) -> {
+        switch (msg.what) {
+            case MSG_CONNECT: {
+                onConnected();
+                break;
+            } case MSG_ON_FILL_REQUEST: {
+                final SomeArgs args = (SomeArgs) msg.obj;
+                final AssistStructure structure = (AssistStructure) args.arg1;
+                final CancellationSignal cancellation = (CancellationSignal) args.arg2;
+                final Bundle extras = (Bundle) args.arg3;
+                final IFillCallback callback = (IFillCallback) args.arg4;
+                final FillCallback fillCallback = new FillCallback(callback);
+                args.recycle();
+                onFillRequest(structure, extras, cancellation, fillCallback);
+                break;
+            } case MSG_ON_SAVE_REQUEST: {
+                final SomeArgs args = (SomeArgs) msg.obj;
+                final AssistStructure structure = (AssistStructure) args.arg1;
+                final Bundle extras = (Bundle) args.arg2;
+                final ISaveCallback callback = (ISaveCallback) args.arg3;
+                final SaveCallback saveCallback = new SaveCallback(callback);
+                args.recycle();
+                onSaveRequest(structure, extras, saveCallback);
+                break;
+            } case MSG_DISCONNECT: {
+                onDisconnected();
+                break;
+            } default: {
+                Log.w(TAG, "MyCallbacks received invalid message type: " + msg);
             }
         }
     };
 
     private HandlerCaller mHandlerCaller;
 
-    // User for debugging purposes
-    private final List<CallbackHelper.Dumpable> mPendingCallbacks =
-            DEBUG_PENDING_CALLBACKS ? new ArrayList<>() : null;
-
     /**
      * {@inheritDoc}
      *
@@ -236,7 +153,6 @@
     @Override
     public void onCreate() {
         super.onCreate();
-
         mHandlerCaller = new HandlerCaller(null, Looper.getMainLooper(), mHandlerCallback, true);
     }
 
@@ -255,7 +171,7 @@
      * <p>You should generally do initialization here rather than in {@link #onCreate}.
      */
     public void onConnected() {
-        if (DEBUG) Log.d(TAG, "onConnected()");
+        //TODO(b/33197203): is not called anymore, fix it!
     }
 
     /**
@@ -263,18 +179,23 @@
      * service.
      *
      * <p>Service must call one of the {@link FillCallback} methods (like
-     * {@link FillCallback#onSuccess(FillResponse)} or {@link FillCallback#onFailure(CharSequence)})
+     * {@link FillCallback#onSuccess(FillResponse)}
+     * or {@link FillCallback#onFailure(CharSequence)})
      * to notify the result of the request.
      *
      * @param structure {@link Activity}'s view structure.
-     * @param data bundle containing additional arguments set by the Android system (currently none)
-     * or data passed by the service on previous calls to fullfill other sections of this activity
-     * (see {@link FillResponse} Javadoc for examples of multiple-sections requests).
-     * @param cancellationSignal signal for observing cancel requests.
+     * @param data bundle containing data passed by the service on previous calls to fill.
+     *     This bundle allows your service to keep state between fill and save requests
+     *     as well as when filling different sections of the UI as the system will try to
+     *     aggressively unbind from the service to conserve resources. See {@link
+     *     FillResponse} Javadoc for examples of multiple-sections requests.
+     * @param cancellationSignal signal for observing cancellation requests. The system will use
+     *     this to notify you that the fill result is no longer needed and you should stop
+     *     handling this fill request in order to save resources.
      * @param callback object used to notify the result of the request.
      */
-    public abstract void onFillRequest(AssistStructure structure, Bundle data,
-            CancellationSignal cancellationSignal, FillCallback callback);
+    public abstract void onFillRequest(@NonNull AssistStructure structure, @Nullable Bundle data,
+            @NonNull CancellationSignal cancellationSignal, @NonNull FillCallback callback);
 
     /**
      * Called when user requests service to save the fields of an {@link Activity}.
@@ -284,108 +205,15 @@
      * to notify the result of the request.
      *
      * @param structure {@link Activity}'s view structure.
-     * @param data bundle containing additional arguments set by the Android system (currently none)
-     * or data passed by the service in the {@link FillResponse} that originated this call.
+     * @param data bundle containing data passed by the service on previous calls to fill.
+     *     This bundle allows your service to keep state between fill and save requests
+     *     as well as when filling different sections of the UI as the system will try to
+     *     aggressively unbind from the service to conserve resources. See {@link
+     *     FillResponse} Javadoc for examples of multiple-sections requests.
      * @param callback object used to notify the result of the request.
      */
-    public abstract void onSaveRequest(AssistStructure structure, Bundle data,
-            SaveCallback callback);
-
-    /**
-     * Called as result of the user action for a {@link FillResponse} that required authentication.
-     *
-     * <p>When the {@link FillResponse} required authentication through
-     * {@link android.view.autofill.FillResponse.Builder#requiresCustomAuthentication(Bundle, int)},
-     * this call indicates the user is requesting the service to authenticate him/her (and
-     * {@code flags} contains {@link #FLAG_AUTHENTICATION_REQUESTED}), and {@code extras} contains
-     * the {@link Bundle} passed to that method.
-     *
-     * <p>When the {@link FillResponse} required authentication through
-     * {@link android.view.autofill.FillResponse.Builder#requiresFingerprintAuthentication(
-     * android.hardware.fingerprint.FingerprintManager.CryptoObject, Bundle, int)},
-     * {@code flags} this call contains the result of the fingerprint authentication (such as
-     * {@link #FLAG_AUTHENTICATION_SUCCESS}, {@link #FLAG_AUTHENTICATION_ERROR}, and
-     * {@link #FLAG_FINGERPRINT_AUTHENTICATION_NOT_AVAILABLE}) and {@code extras} contains the
-     * {@link Bundle} passed to that method.
-     */
-    public void onFillResponseAuthenticationRequest(@SuppressWarnings("unused") Bundle extras,
-            int flags) {
-        if (DEBUG) Log.d(TAG, "onFillResponseAuthenticationRequest(): flags=" + flags);
-    }
-
-    /**
-     * Called as result of the user action for a {@link Dataset} that required authentication.
-     *
-     * <p>When the {@link Dataset} required authentication through
-     * {@link android.view.autofill.Dataset.Builder#requiresCustomAuthentication(Bundle, int)}, this
-     * call indicates the user is requesting the service to authenticate him/her (and {@code flags}
-     * contains {@link #FLAG_AUTHENTICATION_REQUESTED}), and {@code extras} contains the
-     * {@link Bundle} passed to that method.
-     *
-     * <p>When the {@link Dataset} required authentication through
-     * {@link android.view.autofill.Dataset.Builder#requiresFingerprintAuthentication(
-     * android.hardware.fingerprint.FingerprintManager.CryptoObject, Bundle, int)},
-     * {@code flags} this call contains the result of the fingerprint authentication (such as
-     * {@link #FLAG_AUTHENTICATION_SUCCESS}, {@link #FLAG_AUTHENTICATION_ERROR}, and
-     * {@link #FLAG_FINGERPRINT_AUTHENTICATION_NOT_AVAILABLE}) and {@code extras} contains the
-     * {@link Bundle} passed to that method.
-     */
-    public void onDatasetAuthenticationRequest(@SuppressWarnings("unused") Bundle extras,
-            int flags) {
-        if (DEBUG) Log.d(TAG, "onDatasetAuthenticationRequest(): flags=" + flags);
-    }
-
-    @Override
-    @CallSuper
-    protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
-        if (mPendingCallbacks != null) {
-            pw.print("Number of pending callbacks: "); pw.println(mPendingCallbacks.size());
-            final String prefix = "  ";
-            for (int i = 0; i < mPendingCallbacks.size(); i++) {
-                final CallbackHelper.Dumpable cb = mPendingCallbacks.get(i);
-                pw.print('#'); pw.print(i + 1); pw.println(':');
-                cb.dump(prefix, pw);
-            }
-            pw.println();
-        } else {
-            pw.println("Dumping disabled");
-        }
-    }
-
-    private void handleAutoFill(AssistStructure structure, IAutoFillServerCallback callback) {
-        final FillCallback fillCallback = new FillCallback(callback);
-        if (DEBUG_PENDING_CALLBACKS) {
-            addPendingCallback(fillCallback);
-        }
-        // TODO(b/33197203): hook up the cancelationSignal
-        onFillRequest(structure, null, new CancellationSignal(), fillCallback);
-        return;
-    }
-
-    private void handleSave(AssistStructure structure, IAutoFillServerCallback callback,
-            Bundle extras) {
-        final SaveCallback saveCallback = new SaveCallback(callback);
-        if (DEBUG_PENDING_CALLBACKS) {
-            addPendingCallback(saveCallback);
-        }
-        onSaveRequest(structure, extras, saveCallback);
-    }
-
-    private void addPendingCallback(CallbackHelper.Dumpable callback) {
-        if (mPendingCallbacks == null) {
-            // Shouldn't happend since call is controlled by DEBUG_PENDING_CALLBACKS guard.
-            Log.wtf(TAG, "addPendingCallback(): mPendingCallbacks not set");
-            return;
-        }
-
-        if (DEBUG) Log.d(TAG, "Adding pending callback: " + callback);
-
-        callback.setFinalizer(() -> {
-            if (DEBUG) Log.d(TAG, "Removing pending callback: " + callback);
-            mPendingCallbacks.remove(callback);
-        });
-        mPendingCallbacks.add(callback);
-    }
+    public abstract void onSaveRequest(@NonNull AssistStructure structure, @Nullable Bundle data,
+            @NonNull SaveCallback callback);
 
     /**
      * Called when the Android system disconnects from the service.
@@ -393,6 +221,6 @@
      * <p> At this point this service may no longer be an active {@link AutoFillService}.
      */
     public void onDisconnected() {
-        if (DEBUG) Log.d(TAG, "onDisconnected()");
+        //TODO(b/33197203): is not called anymore, fix it!
     }
 }
diff --git a/core/java/android/service/autofill/AutoFillServiceInfo.java b/core/java/android/service/autofill/AutoFillServiceInfo.java
index fd957f1..985e32f 100644
--- a/core/java/android/service/autofill/AutoFillServiceInfo.java
+++ b/core/java/android/service/autofill/AutoFillServiceInfo.java
@@ -16,6 +16,7 @@
 package android.service.autofill;
 
 import android.Manifest;
+import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.app.AppGlobals;
 import android.content.ComponentName;
@@ -25,7 +26,6 @@
 import android.content.res.TypedArray;
 import android.content.res.XmlResourceParser;
 import android.os.RemoteException;
-import android.util.AndroidException;
 import android.util.AttributeSet;
 import android.util.Log;
 import android.util.Xml;
@@ -40,13 +40,10 @@
 /**
  * {@link ServiceInfo} and meta-data about an {@link AutoFillService}.
  *
- * <p>Upon construction, if {@link #getParseError()} is {@code null}, then the service is configured
- * correctly. Otherwise, {@link #getParseError()} indicates the parsing error.
- *
  * @hide
  */
 public final class AutoFillServiceInfo {
-    static final String TAG = "AutoFillServiceInfo";
+    private static final String TAG = "AutoFillServiceInfo";
 
     private static ServiceInfo getServiceInfoOrThrow(ComponentName comp, int userHandle)
             throws PackageManager.NameNotFoundException {
@@ -63,10 +60,9 @@
         throw new PackageManager.NameNotFoundException(comp.toString());
     }
 
-    @Nullable
-    private final String mParseError;
-
+    @NonNull
     private final ServiceInfo mServiceInfo;
+
     @Nullable
     private final String mSettingsActivity;
 
@@ -77,17 +73,7 @@
 
     public AutoFillServiceInfo(PackageManager pm, ServiceInfo si) {
         mServiceInfo = si;
-        TypedArray metaDataArray;
-        try {
-            metaDataArray = getMetaDataArray(pm, si);
-        } catch (AndroidException e) {
-            mParseError = e.getMessage();
-            mSettingsActivity = null;
-            Log.w(TAG, mParseError, e);
-            return;
-        }
-
-        mParseError = null;
+        final TypedArray metaDataArray = getMetaDataArray(pm, si);
         if (metaDataArray != null) {
             mSettingsActivity =
                     metaDataArray.getString(R.styleable.AutoFillService_settingsActivity);
@@ -101,12 +87,11 @@
      * Gets the meta-data as a TypedArray, or null if not provided, or throws if invalid.
      */
     @Nullable
-    private static TypedArray getMetaDataArray(PackageManager pm, ServiceInfo si)
-            throws AndroidException {
+    private static TypedArray getMetaDataArray(PackageManager pm, ServiceInfo si) {
         // Check for permissions.
         if (!Manifest.permission.BIND_AUTO_FILL.equals(si.permission)) {
-            throw new AndroidException(
-                "Service does not require permission " + Manifest.permission.BIND_AUTO_FILL);
+            Log.e(TAG, "Service does not require permission " + Manifest.permission.BIND_AUTO_FILL);
+            return null;
         }
 
         // Get the AutoFill metadata, if declared.
@@ -125,11 +110,13 @@
                         && type != XmlPullParser.START_TAG) {
                 }
             } catch (XmlPullParserException | IOException e) {
-                throw new AndroidException("Error parsing auto fill service meta-data: " + e, e);
+                Log.e(TAG, "Error parsing auto fill service meta-data", e);
+                return null;
             }
 
             if (!"autofill-service".equals(parser.getName())) {
-                throw new AndroidException("Meta-data does not start with autofill-service tag");
+                Log.e(TAG, "Meta-data does not start with autofill-service tag");
+                return null;
             }
             attrs = Xml.asAttributeSet(parser);
 
@@ -138,7 +125,8 @@
             try {
                 res = pm.getResourcesForApplication(si.applicationInfo);
             } catch (PackageManager.NameNotFoundException e) {
-                throw new AndroidException("Error getting application resources: " + e, e);
+                Log.e(TAG, "Error getting application resources", e);
+                return null;
             }
 
             return res.obtainAttributes(attrs, R.styleable.AutoFillService);
@@ -147,11 +135,6 @@
         }
     }
 
-    @Nullable
-    public String getParseError() {
-        return mParseError;
-    }
-
     public ServiceInfo getServiceInfo() {
         return mServiceInfo;
     }
diff --git a/core/java/android/view/autofill/Dataset.aidl b/core/java/android/service/autofill/Dataset.aidl
similarity index 94%
rename from core/java/android/view/autofill/Dataset.aidl
rename to core/java/android/service/autofill/Dataset.aidl
index 2a8e67c..2342c5f 100644
--- a/core/java/android/view/autofill/Dataset.aidl
+++ b/core/java/android/service/autofill/Dataset.aidl
@@ -14,6 +14,6 @@
  * limitations under the License.
  */
 
-package android.view.autofill;
+package android.service.autofill;
 
-parcelable Dataset;
\ No newline at end of file
+parcelable Dataset;
diff --git a/core/java/android/service/autofill/Dataset.java b/core/java/android/service/autofill/Dataset.java
new file mode 100644
index 0000000..bd38c7f
--- /dev/null
+++ b/core/java/android/service/autofill/Dataset.java
@@ -0,0 +1,246 @@
+/*
+ * Copyright (C) 2016 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.service.autofill;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.content.IntentSender;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.view.autofill.AutoFillId;
+import android.view.autofill.AutoFillValue;
+import com.android.internal.util.Preconditions;
+
+import java.util.ArrayList;
+
+/**
+ * A set of data that can be used to auto-fill an {@link android.app.Activity}.
+ *
+ * <p>It contains:
+ *
+ * <ol>
+ *   <li>A name used to identify the dataset in the UI.
+ *   <li>A list of id/value pairs for the fields that can be auto-filled.
+ *   <li>A list of savable ids in addition to the ones with a provided value.
+ * </ol>
+ *
+ * @see android.service.autofill.FillResponse for examples.
+ */
+public final class Dataset implements Parcelable {
+    private static final boolean DEBUG = false;
+
+    private final CharSequence mName;
+    private final ArrayList<AutoFillId> mFieldIds;
+    private final ArrayList<AutoFillValue> mFieldValues;
+    private final IntentSender mAuthentication;
+
+    private Dataset(Builder builder) {
+        mName = builder.mName;
+        mFieldIds = builder.mFieldIds;
+        mFieldValues = builder.mFieldValues;
+        mAuthentication = builder.mAuthentication;
+    }
+
+    /** @hide */
+    public @NonNull CharSequence getName() {
+        return mName;
+    }
+
+    /** @hide */
+    public @Nullable ArrayList<AutoFillId> getFieldIds() {
+        return mFieldIds;
+    }
+
+    /** @hide */
+    public @Nullable ArrayList<AutoFillValue> getFieldValues() {
+        return mFieldValues;
+    }
+
+    /** @hide */
+    public @Nullable IntentSender getAuthentication() {
+        return mAuthentication;
+    }
+
+    /** @hide */
+    public boolean isEmpty() {
+        return mFieldIds == null || mFieldIds.isEmpty();
+    }
+
+    @Override
+    public String toString() {
+        if (!DEBUG) return super.toString();
+
+        final StringBuilder builder = new StringBuilder("Dataset [name=").append(mName)
+                .append(", fieldIds=").append(mFieldIds)
+                .append(", fieldValues=").append(mFieldValues)
+                .append(", hasAuthentication=").append(mAuthentication != null);
+        return builder.append(']').toString();
+    }
+
+    /**
+     * A builder for {@link Dataset} objects. You must to provide at least
+     * one value for a field or set an authentication intent.
+     */
+    public static final class Builder {
+        private CharSequence mName;
+        private ArrayList<AutoFillId> mFieldIds;
+        private ArrayList<AutoFillValue> mFieldValues;
+        private IntentSender mAuthentication;
+        private boolean mDestroyed;
+
+        /**
+         * Creates a new builder.
+         *
+         * @param name Name used to identify the dataset in the UI. Typically it's the same value as
+         * the first field in the dataset (like username or email address) or a user-provided name
+         * (like "My Work Address").
+         */
+        public Builder(@NonNull CharSequence name) {
+            mName = Preconditions.checkStringNotEmpty(name, "name cannot be empty or null");
+        }
+
+        /**
+         * Requires a dataset authentication before auto-filling the activity with this dataset.
+         *
+         * <p>This method is called when you need to provide an authentication
+         * UI for the data set. For example, when a data set contains credit card information
+         * (such as number, expiration date, and verification code), you can display UI
+         * asking for the verification code to before filing in the data). Even if the
+         * data set is completely populated the system will launch the specified authentication
+         * intent and will need your approval to fill it in. Since the data set is "locked"
+         * until the user authenticates it, typically this data set name is masked
+         * (for example, "VISA....1234"). Typically you would want to store the data set
+         * labels non-encrypted and the actual sensitive data encrypted and not in memory.
+         * This allows showing the labels in the UI while involving the user if one of
+         * the items with these labels is chosen. Note that if you use sensitive data as
+         * a label, for example an email address, then it should also be encrypted.</p>
+         *
+         * <p>When a user triggers auto-fill, the system launches the provided intent
+         * whose extras will have the {@link
+         * android.view.autofill.AutoFillManager#EXTRA_ASSIST_STRUCTURE screen content}. Once
+         * you complete your authentication flow you should set the activity result to {@link
+         * android.app.Activity#RESULT_OK} and provide the fully populated {@link Dataset
+         * dataset} by setting it to the {@link
+         * android.view.autofill.AutoFillManager#EXTRA_AUTHENTICATION_RESULT} extra. For example,
+         * if you provided an credit card information without the CVV for the data set in the
+         * {@link FillResponse response} then the returned data set should contain the
+         * CVV entry.</p>
+         *
+         * <p></><strong>Note:</strong> Do not make the provided pending intent
+         * immutable by using {@link android.app.PendingIntent#FLAG_IMMUTABLE} as the
+         * platform needs to fill in the authentication arguments.</p>
+         *
+         * @param authentication Intent to an activity with your authentication flow.
+         *
+         * @see android.app.PendingIntent
+         */
+        public @NonNull Builder setAuthentication(@Nullable IntentSender authentication) {
+            throwIfDestroyed();
+            mAuthentication = authentication;
+            return this;
+        }
+
+        /**
+         * Sets the value of a field.
+         *
+         * @param id id returned by {@link
+         *         android.app.assist.AssistStructure.ViewNode#getAutoFillId()}.
+         * @param value value to be auto filled.
+         */
+        public @NonNull Builder setValue(@NonNull AutoFillId id, @NonNull AutoFillValue value) {
+            throwIfDestroyed();
+            Preconditions.checkNotNull(id, "id cannot be null");
+            Preconditions.checkNotNull(value, "value cannot be null");
+            if (mFieldIds != null) {
+                final int existingIdx = mFieldIds.indexOf(id);
+                if (existingIdx >= 0) {
+                    mFieldValues.set(existingIdx, value);
+                    return this;
+                }
+            } else {
+                mFieldIds = new ArrayList<>();
+                mFieldValues = new ArrayList<>();
+            }
+            mFieldIds.add(id);
+            mFieldValues.add(value);
+            return this;
+        }
+
+        /**
+         * Creates a new {@link Dataset} instance. You should not interact
+         * with this builder once this method is called.
+         */
+        public @NonNull Dataset build() {
+            throwIfDestroyed();
+            mDestroyed = true;
+            if (mFieldIds == null && mAuthentication == null) {
+                throw new IllegalArgumentException(
+                        "at least one value or an authentication must be set");
+            }
+            return new Dataset(this);
+        }
+
+        private void throwIfDestroyed() {
+            if (mDestroyed) {
+                throw new IllegalStateException("Already called #build()");
+            }
+        }
+    }
+
+    /////////////////////////////////////
+    //  Parcelable "contract" methods. //
+    /////////////////////////////////////
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public void writeToParcel(Parcel parcel, int flags) {
+        parcel.writeCharSequence(mName);
+        parcel.writeTypedArrayList(mFieldIds, 0);
+        parcel.writeTypedArrayList(mFieldValues, 0);
+        parcel.writeParcelable(mAuthentication, flags);
+    }
+
+    public static final Creator<Dataset> CREATOR = new Creator<Dataset>() {
+        @Override
+        public Dataset createFromParcel(Parcel parcel) {
+            // Always go through the builder to ensure the data ingested by
+            // the system obeys the contract of the builder to avoid attacks
+            // using specially crafted parcels.
+            final Builder builder = new Builder(parcel.readCharSequence());
+            final ArrayList<AutoFillId> ids = parcel.readTypedArrayList(null);
+            final ArrayList<AutoFillValue> values = parcel.readTypedArrayList(null);
+            final int idCount = (ids != null) ? ids.size() : 0;
+            final int valueCount = (values != null) ? values.size() : 0;
+            for (int i = 0; i < idCount; i++) {
+                AutoFillId id = ids.get(i);
+                AutoFillValue value = (valueCount > i) ? values.get(i) : null;
+                builder.setValue(id, value);
+            }
+            builder.setAuthentication(parcel.readParcelable(null));
+            return builder.build();
+        }
+
+        @Override
+        public Dataset[] newArray(int size) {
+            return new Dataset[size];
+        }
+    };
+}
diff --git a/core/java/android/service/autofill/FillCallback.java b/core/java/android/service/autofill/FillCallback.java
index 7cab7ae..69c9904 100644
--- a/core/java/android/service/autofill/FillCallback.java
+++ b/core/java/android/service/autofill/FillCallback.java
@@ -16,53 +16,21 @@
 
 package android.service.autofill;
 
-import static android.service.autofill.AutoFillService.DEBUG;
-import static android.util.DebugUtils.flagsToString;
-
 import android.annotation.Nullable;
 import android.app.Activity;
 import android.os.Bundle;
 import android.os.RemoteException;
-import android.service.autofill.CallbackHelper.Dumpable;
-import android.service.autofill.CallbackHelper.Finalizer;
-import android.util.Log;
-import android.view.autofill.Dataset;
-import android.view.autofill.FillResponse;
-
-import com.android.internal.annotations.GuardedBy;
-import com.android.internal.util.Preconditions;
-
-import java.io.PrintWriter;
 
 /**
  * Handles auto-fill requests from the {@link AutoFillService} into the {@link Activity} being
  * auto-filled.
- *
- * <p>This class is thread safe.
  */
-public final class FillCallback implements Dumpable {
-
-    private static final String TAG = "FillCallback";
-
-    // NOTE: constants below are public so they can be used by flagsToString()
-    /** @hide */ public static final int STATE_INITIAL = 1 << 0;
-    /** @hide */ public static final int STATE_WAITING_FILL_RESPONSE_AUTH_RESPONSE = 1 << 1;
-    /** @hide */ public static final int STATE_WAITING_DATASET_AUTH_RESPONSE = 1 << 2;
-    /** @hide */ public static final int STATE_FINISHED_OK = 1 << 3;
-    /** @hide */ public static final int STATE_FINISHED_FAILURE = 1 << 4;
-    /** @hide */ public static final int STATE_FINISHED_ERROR = 1 << 5;
-    /** @hide */ public static final int STATE_FINISHED_AUTHENTICATED = 1 << 6;
-
-    private final IAutoFillServerCallback mCallback;
-
-    @GuardedBy("mCallback")
-    private int mState = STATE_INITIAL;
-
-    @GuardedBy("mCallback")
-    private Finalizer mFinalizer;
+public final class FillCallback {
+    private final IFillCallback mCallback;
+    private boolean mCalled;
 
     /** @hide */
-    FillCallback(IAutoFillServerCallback callback) {
+    public FillCallback(IFillCallback callback) {
         mCallback = callback;
     }
 
@@ -76,43 +44,12 @@
      * {@link FillResponse} for examples.
      */
     public void onSuccess(@Nullable FillResponse response) {
-        final boolean authRequired = response != null && response.isAuthRequired();
-
-        if (DEBUG) Log.d(TAG, "onSuccess(): authReq= " + authRequired + ", resp=" + response);
-
-        synchronized (mCallback) {
-            if (authRequired) {
-                assertOnStateLocked(STATE_INITIAL);
-            } else {
-                assertOnStateLocked(STATE_INITIAL | STATE_WAITING_FILL_RESPONSE_AUTH_RESPONSE
-                        | STATE_WAITING_DATASET_AUTH_RESPONSE);
-            }
-
-            try {
-                mCallback.showResponse(response);
-                if (authRequired) {
-                    mState = STATE_WAITING_FILL_RESPONSE_AUTH_RESPONSE;
-                } else {
-                    // Check if at least one dataset requires authentication.
-                    boolean waitingAuth = false;
-                    if (response != null) {
-                        for (Dataset dataset : response.getDatasets()) {
-                            if (dataset.isAuthRequired()) {
-                                waitingAuth = true;
-                                break;
-                            }
-                        }
-                    }
-                    if (waitingAuth) {
-                        mState = STATE_WAITING_DATASET_AUTH_RESPONSE;
-                    } else {
-                        setFinalStateLocked(STATE_FINISHED_OK);
-                    }
-                }
-            } catch (RemoteException e) {
-                setFinalStateLocked(STATE_FINISHED_ERROR);
-                e.rethrowAsRuntimeException();
-            }
+        assertNotCalled();
+        mCalled = true;
+        try {
+            mCallback.onSuccess(response);
+        } catch (RemoteException e) {
+            e.rethrowAsRuntimeException();
         }
     }
 
@@ -124,118 +61,19 @@
      *
      * @param message error message to be displayed to the user.
      */
-    public void onFailure(CharSequence message) {
-        if (DEBUG) Log.d(TAG, "onFailure(): message=" + message);
-
-        Preconditions.checkArgument(message != null, "message cannot be null");
-
-        synchronized (mCallback) {
-            assertOnStateLocked(STATE_INITIAL | STATE_WAITING_FILL_RESPONSE_AUTH_RESPONSE
-                    | STATE_WAITING_DATASET_AUTH_RESPONSE);
-
-            try {
-                mCallback.showError(message);
-                setFinalStateLocked(STATE_FINISHED_FAILURE);
-            } catch (RemoteException e) {
-                setFinalStateLocked(STATE_FINISHED_ERROR);
-                e.rethrowAsRuntimeException();
-            }
+    public void onFailure(@Nullable CharSequence message) {
+        assertNotCalled();
+        mCalled = true;
+        try {
+            mCallback.onFailure(message);
+        } catch (RemoteException e) {
+            e.rethrowAsRuntimeException();
         }
     }
 
-    /**
-     * Notifies the Android System when the user authenticated a {@link FillResponse} previously
-     * passed to {@link #onSuccess(FillResponse)}.
-     *
-     * @param flags must contain either
-     * {@link android.service.autofill.AutoFillService#FLAG_AUTHENTICATION_ERROR} or
-     * {@link android.service.autofill.AutoFillService#FLAG_AUTHENTICATION_SUCCESS}.
-     */
-    public void onFillResponseAuthentication(int flags) {
-        if (DEBUG) Log.d(TAG, "onFillResponseAuthentication(): flags=" + flags);
-
-        synchronized (mCallback) {
-            assertOnStateLocked(STATE_WAITING_FILL_RESPONSE_AUTH_RESPONSE);
-
-            try {
-                mCallback.unlockFillResponse(flags);
-                setFinalStateLocked(STATE_FINISHED_AUTHENTICATED);
-            } catch (RemoteException e) {
-                setFinalStateLocked(STATE_FINISHED_ERROR);
-                e.rethrowAsRuntimeException();
-            }
+    private void assertNotCalled() {
+        if (mCalled) {
+            throw new IllegalStateException("Already called");
         }
     }
-
-    /**
-     * Notifies the Android System when the user authenticated a {@link Dataset} previously passed
-     * to {@link #onSuccess(FillResponse)}.
-     *
-     * @param dataset values to fill the activity with in case of successful authentication of a
-     * previously locked (and empty) dataset).
-     * @param flags must contain either
-     * {@link android.service.autofill.AutoFillService#FLAG_AUTHENTICATION_ERROR} or
-     * {@link android.service.autofill.AutoFillService#FLAG_AUTHENTICATION_SUCCESS}.
-     */
-    public void onDatasetAuthentication(@Nullable Dataset dataset, int flags) {
-        if (DEBUG) Log.d(TAG, "onDatasetAuthentication(): dataset=" + dataset + ", flags=" + flags);
-
-        synchronized (mCallback) {
-            assertOnStateLocked(STATE_WAITING_DATASET_AUTH_RESPONSE);
-
-            try {
-                mCallback.unlockDataset(dataset, flags);
-                setFinalStateLocked(STATE_FINISHED_AUTHENTICATED);
-            } catch (RemoteException e) {
-                setFinalStateLocked(STATE_FINISHED_ERROR);
-                e.rethrowAsRuntimeException();
-            }
-        }
-    }
-
-    @Override
-    public String toString() {
-        if (!DEBUG) return super.toString();
-
-        return "FillCallback: [mState = " + mState + "]";
-    }
-
-    /** @hide */
-    @Override
-    public void dump(String prefix, PrintWriter pw) {
-        pw.print(prefix); pw.print("FillCallback: mState="); pw.println(mState);
-    }
-
-    /** @hide */
-    @Override
-    public void setFinalizer(Finalizer f) {
-        synchronized (mCallback) {
-            mFinalizer = f;
-        }
-    }
-
-    /**
-     * Sets a final state (where the callback cannot be used anymore) and notifies the
-     * {@link Finalizer} (if any).
-     */
-    private void setFinalStateLocked(int state) {
-        if (DEBUG) Log.d(TAG, "setFinalState(): " + state);
-        mState = state;
-
-        if (mFinalizer != null) {
-            mFinalizer.gone();
-        }
-    }
-
-    // TODO(b/33197203): move and/or re-add state check logic on server side to avoid malicious app
-    // calling the callback on wrong state.
-
-    // Make sure callback method is called during the proper lifecycle state.
-    private void assertOnStateLocked(int flags) {
-        if (DEBUG) Log.d(TAG, "assertOnState(): current=" + mState + ", required=" + flags);
-
-        Preconditions.checkState((flags & mState) != 0,
-                "invalid state: required " + flagsToString(FillCallback.class, "STATE_", flags)
-                + ", current is " + flagsToString(FillCallback.class, "STATE_", mState));
-    }
 }
diff --git a/core/java/android/view/autofill/FillResponse.aidl b/core/java/android/service/autofill/FillResponse.aidl
similarity index 94%
rename from core/java/android/view/autofill/FillResponse.aidl
rename to core/java/android/service/autofill/FillResponse.aidl
index b018f15..e9c2d21 100644
--- a/core/java/android/view/autofill/FillResponse.aidl
+++ b/core/java/android/service/autofill/FillResponse.aidl
@@ -14,6 +14,6 @@
  * limitations under the License.
  */
 
-package android.view.autofill;
+package android.service.autofill;
 
-parcelable FillResponse;
\ No newline at end of file
+parcelable FillResponse;
diff --git a/core/java/android/service/autofill/FillResponse.java b/core/java/android/service/autofill/FillResponse.java
new file mode 100644
index 0000000..ea36e64
--- /dev/null
+++ b/core/java/android/service/autofill/FillResponse.java
@@ -0,0 +1,394 @@
+/*
+ * Copyright (C) 2016 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.service.autofill;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.content.IntentSender;
+import android.os.Bundle;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.util.ArraySet;
+import android.view.autofill.AutoFillId;
+import android.view.autofill.AutoFillManager;
+
+/**
+ * Response for a {@link
+ * AutoFillService#onFillRequest(android.app.assist.AssistStructure,
+ * Bundle, android.os.CancellationSignal, FillCallback)} and
+ * authentication requests.
+ *
+ * <p>The response typically contains one or more {@link Dataset}s, each representing a set of
+ * fields that can be auto-filled together, and the Android system displays a dataset picker UI
+ * affordance that the user must use before the {@link android.app.Activity} is filled with
+ * the dataset.
+ *
+ * <p>For example, for a login page with username/password where the user only has one account in
+ * the response could be:
+ *
+ * <pre class="prettyprint">
+ *  new FillResponse.Builder()
+ *      .add(new Dataset.Builder("homer")
+ *          .setTextFieldValue(id1, "homer")
+ *          .setTextFieldValue(id2, "D'OH!")
+ *          .build())
+ *      .build();
+ * </pre>
+ *
+ * <p>If the user had 2 accounts, each with its own user-provided names, the response could be:
+ *
+ * <pre class="prettyprint">
+ *  new FillResponse.Builder()
+ *      .add(new Dataset.Builder("Homer's Account")
+ *          .setTextFieldValue(id1, "homer")
+ *          .setTextFieldValue(id2, "D'OH!")
+ *          .build())
+ *      .add(new Dataset.Builder("Bart's Account")
+ *          .setTextFieldValue(id1, "elbarto")
+ *          .setTextFieldValue(id2, "cowabonga")
+ *          .build())
+ *      .build();
+ * </pre>
+ *
+ * <p>If the user does not have any data associated with this {@link android.app.Activity} but
+ * the service wants to offer the user the option to save the data that was entered, then the
+ * service could populate the response with {@code savableIds} instead of {@link Dataset}s:
+ *
+ * <pre class="prettyprint">
+ *  new FillResponse.Builder()
+ *      .addSavableFields(id1, id2)
+ *      .build();
+ * </pre>
+ *
+ * <p>Similarly, there might be cases where the user data on the service is enough to populate some
+ * fields but not all, and the service would still be interested on saving the other fields. In this
+ * scenario, the service could populate the response with both {@link Dataset}s and {@code
+ * savableIds}:
+ *
+ * <pre class="prettyprint">
+ *   new FillResponse.Builder()
+ *       .add(new Dataset.Builder("Homer")
+ *          .setTextFieldValue(id1, "Homer")                  // first name
+ *          .setTextFieldValue(id2, "Simpson")                // last name
+ *          .setTextFieldValue(id3, "742 Evergreen Terrace")  // street
+ *          .setTextFieldValue(id4, "Springfield")            // city
+ *          .build())
+ *       .addSavableFields(id5, id6) // state and zipcode
+ *       .build();
+ *
+ * </pre>
+ *
+ * <p>Notice that the ids that are part of a dataset (ids 1 to 4, in this example) are automatically
+ * added to the {@code savableIds} list.
+ *
+ * <p>If the service has multiple {@link Dataset}s for different sections of the activity,
+ * for example, a user section for which there are two datasets followed by an address
+ * section for which there are two datasets for each user user, then it should "partition"
+ * the activity in sections and populate the response with just a subset of the data that would
+ * fulfill the first section (the name in our example); then once the user fills the first
+ * section and taps a field from the next section (the address in our example), the Android
+ * system would issue another request for that section, and so on. Note that if the user
+ * chooses to populate the first section with a service provided dataset, the subsequent request
+ * would contain the populated values so you don't try to provide suggestions for the first
+ * section but ony for the second one based on the context of what was already filled. For
+ * example, the first response could be:
+ *
+ * <pre class="prettyprint">
+ *  new FillResponse.Builder()
+ *      .add(new Dataset.Builder("Homer")
+ *          .setTextFieldValue(id1, "Homer")
+ *          .setTextFieldValue(id2, "Simpson")
+ *          .build())
+ *      .add(new Dataset.Builder("Bart")
+ *          .setTextFieldValue(id1, "Bart")
+ *          .setTextFieldValue(id2, "Simpson")
+ *          .build())
+ *      .build();
+ * </pre>
+ *
+ * <p>Then after the user picks the {@code Homer} dataset and taps the {@code Street} field to
+ * trigger another auto-fill request, the second response could be:
+ *
+ * <pre class="prettyprint">
+ *  new FillResponse.Builder()
+ *      .add(new Dataset.Builder("Home")
+ *          .setTextFieldValue(id3, "742 Evergreen Terrace")
+ *          .setTextFieldValue(id4, "Springfield")
+ *          .build())
+ *      .add(new Dataset.Builder("Work")
+ *          .setTextFieldValue(id3, "Springfield Power Plant")
+ *          .setTextFieldValue(id4, "Springfield")
+ *          .build())
+ *      .build();
+ * </pre>
+ *
+ * <p>The service could require user authentication at the {@link FillResponse} or the
+ * {@link Dataset} level, prior to auto-filling an activity - see {@link FillResponse.Builder
+ * #setAuthentication(IntentSender)} and {@link Dataset.Builder#setAuthentication(IntentSender)}.
+ * It is recommended that you encrypt only the sensitive data but leave the labels unencrypted
+ * which would allow you to provide the dataset names to the user and if they choose one
+ * them challenge the user to onAuthenticate. For example, if the user has a home and a work
+ * address the Home and Work labels could be stored unencrypted as they don't have any sensitive
+ * data while the address data is in an encrypted storage. If the user chooses Home, then the
+ * platform will start your authentication flow. If you encrypt all data and require auth
+ * at the response level the user will have to interact with the fill UI to trigger a request
+ * for the datasets as they don't see Home and Work options which will trigger your auth
+ * flow and after successfully authenticating the user will be presented with the Home and
+ * Work options where they can pick one. Hence, you have flexibility how to implement your
+ * auth while storing labels non-encrypted and data encrypted provides a better user
+ * experience.</p>
+ */
+public final class FillResponse implements Parcelable {
+    private static final boolean DEBUG = false;
+
+    private final ArraySet<Dataset> mDatasets;
+    private final ArraySet<AutoFillId> mSavableIds;
+    private final Bundle mExtras;
+    private final IntentSender mAuthentication;
+
+    private FillResponse(@NonNull Builder builder) {
+        mDatasets = builder.mDatasets;
+        mSavableIds = builder.mSavableIds;
+        mExtras = builder.mExtras;
+        mAuthentication = builder.mAuthentication;
+    }
+
+    /** @hide */
+    public @Nullable Bundle getExtras() {
+        return mExtras;
+    }
+
+    /** @hide */
+    public @Nullable ArraySet<Dataset> getDatasets() {
+        return mDatasets;
+    }
+
+    /** @hide */
+    public @Nullable ArraySet<AutoFillId> getSavableIds() {
+        return mSavableIds;
+    }
+
+    /** @hide */
+    public @Nullable IntentSender getAuthentication() {
+        return mAuthentication;
+    }
+
+    /**
+     * Builder for {@link FillResponse} objects. You must to provide at least
+     * one dataset or set an authentication intent.
+     */
+    public static final class Builder {
+        private ArraySet<Dataset> mDatasets;
+        private ArraySet<AutoFillId> mSavableIds;
+        private Bundle mExtras;
+        private IntentSender mAuthentication;
+        private boolean mDestroyed;
+
+        /**
+         * Creates a new {@link FillResponse} builder.
+         */
+        public Builder() {
+
+        }
+
+        /**
+         * Requires a fill response authentication before auto-filling the activity with
+         * any data set in this response.
+         *
+         * <p>This is typically useful when a user interaction is required to unlock their
+         * data vault if you encrypt the data set labels and data set data. It is recommended
+         * to encrypt only the sensitive data and not the data set labels which would allow
+         * auth on the data set level leading to a better user experience. Note that if you
+         * use sensitive data as a label, for example an email address, then it should also
+         * be encrypted. The provided {@link android.app.PendingIntent intent} must be an
+         * activity which implements your authentication flow.</p>
+         *
+         * <p>When a user triggers auto-fill, the system launches the provided intent
+         * whose extras will have the {@link
+         * AutoFillManager#EXTRA_ASSIST_STRUCTURE screen
+         * content}. Once you complete your authentication flow you should set the activity
+         * result to {@link android.app.Activity#RESULT_OK} and provide the fully populated {@link
+         * FillResponse response} by setting it to the {@link
+         * AutoFillManager#EXTRA_AUTHENTICATION_RESULT} extra.
+         * For example, if you provided an empty {@link FillResponse resppnse} because the
+         * user's data was locked and marked that the response needs an authentication then
+         * in the response returned if authentication succeeds you need to provide all
+         * available data sets some of which may need to be further authenticated, for
+         * example a credit card whose CVV needs to be entered.</p>
+         *
+         * <p></><strong>Note:</strong> Do not make the provided pending intent
+         * immutable by using {@link android.app.PendingIntent#FLAG_IMMUTABLE} as the
+         * platform needs to fill in the authentication arguments.</p>
+         *
+         * @param authentication Intent to an activity with your authentication flow.
+         *
+         * @see android.app.PendingIntent#getIntentSender()
+         */
+        public @NonNull Builder setAuthentication(@Nullable IntentSender authentication) {
+            throwIfDestroyed();
+            mAuthentication = authentication;
+            return this;
+        }
+
+        /**
+         * Adds a new {@link Dataset} to this response. Adding a dataset with the
+         * same id updates the existing one.
+         *
+         * @throws IllegalArgumentException if a dataset with same {@code name} already exists.
+         */
+        public@NonNull Builder addDataset(@Nullable Dataset dataset) {
+            throwIfDestroyed();
+            if (dataset == null) {
+                return this;
+            }
+            if (mDatasets == null) {
+                mDatasets = new ArraySet<>();
+            }
+            final int datasetCount = mDatasets.size();
+            for (int i = 0; i < datasetCount; i++) {
+                if (mDatasets.valueAt(i).getName().equals(dataset.getName())) {
+                    throw new IllegalArgumentException("Duplicate dataset name: "
+                            + dataset.getName());
+                }
+            }
+            if (!mDatasets.add(dataset)) {
+                return this;
+            }
+            final int fieldCount = dataset.getFieldIds().size();
+            for (int i = 0; i < fieldCount; i++) {
+                final AutoFillId id = dataset.getFieldIds().get(i);
+                if (mSavableIds == null) {
+                    mSavableIds = new ArraySet<>();
+                }
+                mSavableIds.add(id);
+            }
+            return this;
+        }
+
+        /**
+         * Adds ids of additional fields that the service would be interested to save (through
+         * {@link AutoFillService#onSaveRequest(
+         * android.app.assist.AssistStructure, Bundle, SaveCallback)})
+         * but were not indirectly set through {@link #addDataset(Dataset)}.
+         *
+         * <p>See {@link FillResponse} for examples.
+         */
+        public @NonNull Builder addSavableFields(@Nullable AutoFillId... ids) {
+            throwIfDestroyed();
+            if (ids == null) {
+                return this;
+            }
+            for (AutoFillId id : ids) {
+                if (mSavableIds == null) {
+                    mSavableIds = new ArraySet<>();
+                }
+                mSavableIds.add(id);
+            }
+            return this;
+        }
+
+        /**
+         * Sets a {@link Bundle} that will be passed to subsequent APIs that
+         * manipulate this response. For example, they are passed to subsequent
+         * calls to {@link AutoFillService#onFillRequest(
+         * android.app.assist.AssistStructure, Bundle, android.os.CancellationSignal,
+         * FillCallback)} and {@link
+         * AutoFillService#onSaveRequest(
+         * android.app.assist.AssistStructure, Bundle,
+         * SaveCallback)}.
+         */
+        public Builder setExtras(Bundle extras) {
+            throwIfDestroyed();
+            mExtras = extras;
+            return this;
+        }
+
+        /**
+         * Builds a new {@link FillResponse} instance.
+         */
+        public FillResponse build() {
+            throwIfDestroyed();
+            mDestroyed = true;
+            return new FillResponse(this);
+        }
+
+        private void throwIfDestroyed() {
+            if (mDestroyed) {
+                throw new IllegalStateException("Already called #build()");
+            }
+        }
+    }
+
+    /////////////////////////////////////
+    //  Object "contract" methods. //
+    /////////////////////////////////////
+    @Override
+    public String toString() {
+        if (!DEBUG) return super.toString();
+        final StringBuilder builder = new StringBuilder(
+                "FillResponse: [datasets=").append(mDatasets)
+                .append(", savableIds=").append(mSavableIds)
+                .append(", hasExtras=").append(mExtras != null)
+                .append(", hasAuthentication=").append(mAuthentication != null);
+        return builder.append(']').toString();
+    }
+
+    /////////////////////////////////////
+    //  Parcelable "contract" methods. //
+    /////////////////////////////////////
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public void writeToParcel(Parcel parcel, int flags) {
+        parcel.writeTypedArraySet(mDatasets, 0);
+        parcel.writeTypedArraySet(mSavableIds, 0);
+        parcel.writeParcelable(mExtras, 0);
+        parcel.writeParcelable(mAuthentication, 0);
+    }
+
+    public static final Parcelable.Creator<FillResponse> CREATOR =
+            new Parcelable.Creator<FillResponse>() {
+        @Override
+        public FillResponse createFromParcel(Parcel parcel) {
+            // Always go through the builder to ensure the data ingested by
+            // the system obeys the contract of the builder to avoid attacks
+            // using specially crafted parcels.
+            final Builder builder = new Builder();
+            final ArraySet<Dataset> datasets = parcel.readTypedArraySet(null);
+            final int datasetCount = (datasets != null) ? datasets.size() : 0;
+            for (int i = 0; i < datasetCount; i++) {
+                builder.addDataset(datasets.valueAt(i));
+            }
+            final ArraySet<AutoFillId> fillIds = parcel.readTypedArraySet(null);
+            final int fillIdCount = (fillIds != null) ? fillIds.size() : 0;
+            for (int i = 0; i < fillIdCount; i++) {
+                builder.addSavableFields(fillIds.valueAt(i));
+            }
+            builder.setExtras(parcel.readParcelable(null));
+            builder.setAuthentication(parcel.readParcelable(null));
+            return builder.build();
+        }
+
+        @Override
+        public FillResponse[] newArray(int size) {
+            return new FillResponse[size];
+        }
+    };
+}
diff --git a/core/java/android/service/autofill/CallbackHelper.java b/core/java/android/service/autofill/IAuthenticationCallback.aidl
similarity index 62%
copy from core/java/android/service/autofill/CallbackHelper.java
copy to core/java/android/service/autofill/IAuthenticationCallback.aidl
index ded8f97..36b989d 100644
--- a/core/java/android/service/autofill/CallbackHelper.java
+++ b/core/java/android/service/autofill/IAuthenticationCallback.aidl
@@ -13,18 +13,19 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package android.service.autofill;
 
-import java.io.PrintWriter;
+package android.view.autofill;
 
-final class CallbackHelper {
+import android.view.autofill.Dataset;
+import android.service.autofill.FillResponse;
 
-    static interface Dumpable {
-        void dump(String prefix, PrintWriter pw);
-        void setFinalizer(Finalizer f);
-    }
-
-    static interface Finalizer {
-        void gone();
-    }
+/**
+ * Callback for delivering authentication result.
+ *
+ * {@hide}
+ */
+interface IAutoFillAuthCallback {
+    void onSuccessForDataset(in Dataset dataset);
+    void onSuccessForFillResponse(in FillResponse response);
+    void onFailure(CharSequence message);
 }
diff --git a/core/java/android/service/autofill/IAutoFillAppCallback.aidl b/core/java/android/service/autofill/IAutoFillAppCallback.aidl
deleted file mode 100644
index 8c3898a..0000000
--- a/core/java/android/service/autofill/IAutoFillAppCallback.aidl
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2016 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.service.autofill;
-
-import java.util.List;
-
-import android.view.autofill.Dataset;
-
-/**
- * Object running in the application process and responsible for auto-filling it.
- *
- * @hide
- */
-// TODO(b/33197203): rename IAutoFillAppSession
-oneway interface IAutoFillAppCallback {
-    /**
-      * Auto-fills the activity with the contents of a dataset.
-      */
-    void autoFill(in Dataset dataset);
-}
diff --git a/core/java/android/service/autofill/IAutoFillManagerService.aidl b/core/java/android/service/autofill/IAutoFillManagerService.aidl
deleted file mode 100644
index 088e649..0000000
--- a/core/java/android/service/autofill/IAutoFillManagerService.aidl
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2016 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.service.autofill;
-
-import android.graphics.Rect;
-import android.os.Bundle;
-import android.view.autofill.AutoFillId;
-import android.view.autofill.AutoFillValue;
-
-/**
- * Mediator between apps being auto-filled and auto-fill service implementations.
- *
- * {@hide}
- */
-oneway interface IAutoFillManagerService {
-
-    // Called by AutoFillManager (app).
-    void requestAutoFill(in AutoFillId id, in Rect bounds, int flags);
-
-    // Called by AutoFillManager (app).
-    void onValueChanged(in AutoFillId id, in AutoFillValue value);
-
-    // Called by ShellCommand only.
-    void requestAutoFillForUser(int userId);
-
-    // Called by ShellCommand only.
-    void requestSaveForUser(int userId);
-}
diff --git a/core/java/android/service/autofill/IAutoFillServerCallback.aidl b/core/java/android/service/autofill/IAutoFillServerCallback.aidl
deleted file mode 100644
index 480438a..0000000
--- a/core/java/android/service/autofill/IAutoFillServerCallback.aidl
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2016 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.service.autofill;
-
-import java.util.List;
-
-import android.os.Bundle;
-import android.view.autofill.AutoFillId;
-import android.view.autofill.Dataset;
-import android.view.autofill.FillResponse;
-
-/**
- * Object running in the AutoFillService process and used to communicate back with system_server.
- *
- * @hide
- */
-// TODO(b/33197203): rename to IAutoFillServerSession
-oneway interface IAutoFillServerCallback {
-    // TODO(b/33197203): document methods
-    void showResponse(in FillResponse response);
-    void showError(CharSequence message);
-    void onSaved();
-    void unlockFillResponse(int flags);
-    void unlockDataset(in Dataset dataset, int flags);
-}
diff --git a/core/java/android/service/autofill/IAutoFillService.aidl b/core/java/android/service/autofill/IAutoFillService.aidl
index a4e6ebc..fa1ea65 100644
--- a/core/java/android/service/autofill/IAutoFillService.aidl
+++ b/core/java/android/service/autofill/IAutoFillService.aidl
@@ -18,19 +18,20 @@
 
 import android.app.assist.AssistStructure;
 import android.os.Bundle;
-import android.service.autofill.IAutoFillServerCallback;
+import android.service.autofill.IFillCallback;
+import android.service.autofill.ISaveCallback;
 import com.android.internal.os.IResultReceiver;
 
 /**
+ * Interface from the system to an auto fill service.
+ *
  * @hide
  */
-// TODO(b/33197203): document class and methods
 oneway interface IAutoFillService {
-    // TODO(b/33197203): rename method to make them more consistent
-    void autoFill(in AssistStructure structure, in IAutoFillServerCallback callback);
-    void save(in AssistStructure structure, in IAutoFillServerCallback callback, in Bundle extras);
-    void authenticateFillResponse(in Bundle extras, int flags);
-    void authenticateDataset(in Bundle extras, int flags);
+    void onFillRequest(in AssistStructure structure, in Bundle extras,
+            in IFillCallback callback);
+    void onSaveRequest(in AssistStructure structure, in Bundle extras,
+            in ISaveCallback callback);
     void onConnected();
     void onDisconnected();
 }
diff --git a/core/java/android/service/autofill/CallbackHelper.java b/core/java/android/service/autofill/IFillCallback.aidl
similarity index 66%
copy from core/java/android/service/autofill/CallbackHelper.java
copy to core/java/android/service/autofill/IFillCallback.aidl
index ded8f97..2bb3e9a 100644
--- a/core/java/android/service/autofill/CallbackHelper.java
+++ b/core/java/android/service/autofill/IFillCallback.aidl
@@ -13,18 +13,20 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package android.service.autofill;
 
-import java.io.PrintWriter;
+import android.os.ICancellationSignal;
 
-final class CallbackHelper {
+import android.service.autofill.FillResponse;
 
-    static interface Dumpable {
-        void dump(String prefix, PrintWriter pw);
-        void setFinalizer(Finalizer f);
-    }
-
-    static interface Finalizer {
-        void gone();
-    }
+/**
+ * Interface to receive the result of a save request.
+ *
+ * @hide
+ */
+interface IFillCallback {
+    void onCancellable(in ICancellationSignal cancellation);
+    void onSuccess(in FillResponse response);
+    void onFailure(CharSequence message);
 }
diff --git a/core/java/android/service/autofill/CallbackHelper.java b/core/java/android/service/autofill/ISaveCallback.aidl
similarity index 72%
rename from core/java/android/service/autofill/CallbackHelper.java
rename to core/java/android/service/autofill/ISaveCallback.aidl
index ded8f97..e260c73 100644
--- a/core/java/android/service/autofill/CallbackHelper.java
+++ b/core/java/android/service/autofill/ISaveCallback.aidl
@@ -13,18 +13,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package android.service.autofill;
 
-import java.io.PrintWriter;
-
-final class CallbackHelper {
-
-    static interface Dumpable {
-        void dump(String prefix, PrintWriter pw);
-        void setFinalizer(Finalizer f);
-    }
-
-    static interface Finalizer {
-        void gone();
-    }
+/**
+ * Interface to receive the result of a save request.
+ *
+ * @hide
+ */
+interface ISaveCallback {
+    void onSuccess();
+    void onFailure(CharSequence message);
 }
diff --git a/core/java/android/service/autofill/SaveCallback.java b/core/java/android/service/autofill/SaveCallback.java
index 9dd9795..c6dd1df 100644
--- a/core/java/android/service/autofill/SaveCallback.java
+++ b/core/java/android/service/autofill/SaveCallback.java
@@ -16,42 +16,20 @@
 
 package android.service.autofill;
 
-import static android.service.autofill.AutoFillService.DEBUG;
-
 import android.app.Activity;
-import android.app.assist.AssistStructure.ViewNode;
 import android.os.Bundle;
 import android.os.RemoteException;
-import android.service.autofill.CallbackHelper.Dumpable;
-import android.service.autofill.CallbackHelper.Finalizer;
-import android.util.Log;
-import android.view.autofill.AutoFillId;
-
-import com.android.internal.annotations.GuardedBy;
-import com.android.internal.util.Preconditions;
-
-import java.io.PrintWriter;
 
 /**
  * Handles save requests from the {@link AutoFillService} into the {@link Activity} being
  * auto-filled.
- *
- * <p>This class is thread safe.
  */
-public final class SaveCallback implements Dumpable {
-
-    private static final String TAG = "SaveCallback";
-
-    private final IAutoFillServerCallback mCallback;
-
-    @GuardedBy("mCallback")
-    private boolean mReplied = false;
-
-    @GuardedBy("mCallback")
-    private Finalizer mFinalizer;
+public final class SaveCallback {
+    private final ISaveCallback mCallback;
+    private boolean mCalled;
 
     /** @hide */
-    SaveCallback(IAutoFillServerCallback callback) {
+    SaveCallback(ISaveCallback callback) {
         mCallback = callback;
     }
 
@@ -63,17 +41,12 @@
      * @throws RuntimeException if an error occurred while calling the Android System.
      */
     public void onSuccess() {
-        if (DEBUG) Log.d(TAG, "onSuccess()");
-
-        synchronized (mCallback) {
-            checkNotRepliedYetLocked();
-            try {
-                mCallback.onSaved();
-            } catch (RemoteException e) {
-                e.rethrowAsRuntimeException();
-            } finally {
-                setRepliedLocked();
-            }
+        assertNotCalled();
+        mCalled = true;
+        try {
+            mCallback.onSuccess();
+        } catch (RemoteException e) {
+            e.rethrowAsRuntimeException();
         }
     }
 
@@ -87,54 +60,18 @@
      * @throws RuntimeException if an error occurred while calling the Android System.
      */
     public void onFailure(CharSequence message) {
-        if (DEBUG) Log.d(TAG, "onFailure(): message=" + message);
-
-        synchronized (mCallback) {
-            checkNotRepliedYetLocked();
-
-            try {
-                mCallback.showError(message);
-            } catch (RemoteException e) {
-                e.rethrowAsRuntimeException();
-            } finally {
-                setRepliedLocked();
-            }
+        assertNotCalled();
+        mCalled = true;
+        try {
+            mCallback.onFailure(message);
+        } catch (RemoteException e) {
+            e.rethrowAsRuntimeException();
         }
     }
 
-    /** @hide */
-    @Override
-    public void dump(String prefix, PrintWriter pw) {
-        pw.print(prefix); pw.print("SaveCallback: mReplied="); pw.println(mReplied);
-    }
-
-    /** @hide */
-    @Override
-    public void setFinalizer(Finalizer f) {
-        synchronized (mCallback) {
-            mFinalizer = f;
-        }
-    }
-
-    @Override
-    public String toString() {
-        if (!DEBUG) return super.toString();
-
-        return "SaveCallback: [mReplied= " + mReplied + "]";
-    }
-
-    // There can be only one!!
-    private void checkNotRepliedYetLocked() {
-        Preconditions.checkState(!mReplied, "already replied");
-    }
-
-    private void setRepliedLocked() {
-        if (DEBUG) Log.d(TAG, "setReplied()");
-
-        mReplied = true;
-
-        if (mFinalizer != null) {
-            mFinalizer.gone();
+    private void assertNotCalled() {
+        if (mCalled) {
+            throw new IllegalStateException("Already called");
         }
     }
 }
diff --git a/core/java/android/service/quicksettings/TileService.java b/core/java/android/service/quicksettings/TileService.java
index 887f4b6..1781c2a 100644
--- a/core/java/android/service/quicksettings/TileService.java
+++ b/core/java/android/service/quicksettings/TileService.java
@@ -130,6 +130,11 @@
      */
     public static final String EXTRA_COMPONENT = "android.service.quicksettings.extra.COMPONENT";
 
+    /**
+     * @hide
+     */
+    public static final String EXTRA_STATE = "state";
+
     private final H mHandler = new H(Looper.getMainLooper());
 
     private boolean mListening = false;
diff --git a/core/java/android/service/textservice/SpellCheckerService.java b/core/java/android/service/textservice/SpellCheckerService.java
index 120a37a..bd1b44c 100644
--- a/core/java/android/service/textservice/SpellCheckerService.java
+++ b/core/java/android/service/textservice/SpellCheckerService.java
@@ -17,6 +17,7 @@
 package android.service.textservice;
 
 import com.android.internal.textservice.ISpellCheckerService;
+import com.android.internal.textservice.ISpellCheckerServiceCallback;
 import com.android.internal.textservice.ISpellCheckerSession;
 import com.android.internal.textservice.ISpellCheckerSessionListener;
 
@@ -311,16 +312,39 @@
             mInternalServiceRef = new WeakReference<SpellCheckerService>(service);
         }
 
+        /**
+         * Called from the system when an application is requesting a new spell checker session.
+         *
+         * <p>Note: This is an internal protocol used by the system to establish spell checker
+         * sessions, which is not guaranteed to be stable and is subject to change.</p>
+         *
+         * @param locale locale to be returned from {@link Session#getLocale()}
+         * @param listener IPC channel object to be used to implement
+         *                 {@link Session#onGetSuggestionsMultiple(TextInfo[], int, boolean)} and
+         *                 {@link Session#onGetSuggestions(TextInfo, int)}
+         * @param bundle bundle to be returned from {@link Session#getBundle()}
+         * @param callback IPC channel to return the result to the caller in an asynchronous manner
+         */
         @Override
-        public ISpellCheckerSession getISpellCheckerSession(
-                String locale, ISpellCheckerSessionListener listener, Bundle bundle) {
+        public void getISpellCheckerSession(
+                String locale, ISpellCheckerSessionListener listener, Bundle bundle,
+                ISpellCheckerServiceCallback callback) {
             final SpellCheckerService service = mInternalServiceRef.get();
-            if (service == null) return null;
-            final Session session = service.createSession();
-            final InternalISpellCheckerSession internalSession =
-                    new InternalISpellCheckerSession(locale, listener, bundle, session);
-            session.onCreate();
-            return internalSession;
+            final InternalISpellCheckerSession internalSession;
+            if (service == null) {
+                // If the owner SpellCheckerService object was already destroyed and got GC-ed,
+                // the weak-reference returns null and we should just ignore this request.
+                internalSession = null;
+            } else {
+                final Session session = service.createSession();
+                internalSession =
+                        new InternalISpellCheckerSession(locale, listener, bundle, session);
+                session.onCreate();
+            }
+            try {
+                callback.onSessionCreated(internalSession);
+            } catch (RemoteException e) {
+            }
         }
     }
 
diff --git a/core/java/android/service/voice/VoiceInteractionSession.java b/core/java/android/service/voice/VoiceInteractionSession.java
index e9bbc2d..a2a129d 100644
--- a/core/java/android/service/voice/VoiceInteractionSession.java
+++ b/core/java/android/service/voice/VoiceInteractionSession.java
@@ -135,6 +135,7 @@
     FrameLayout mContentFrame;
     SoftInputWindow mWindow;
 
+    boolean mUiEnabled = true;
     boolean mInitialized;
     boolean mWindowAdded;
     boolean mWindowVisible;
@@ -1001,35 +1002,40 @@
 
         try {
             mInShowWindow = true;
+            onPrepareShow(args, flags);
             if (!mWindowVisible) {
-                if (!mWindowAdded) {
-                    mWindowAdded = true;
-                    View v = onCreateContentView();
-                    if (v != null) {
-                        setContentView(v);
-                    }
-                }
+                ensureWindowAdded();
             }
             onShow(args, flags);
             if (!mWindowVisible) {
                 mWindowVisible = true;
-                mWindow.show();
+                if (mUiEnabled) {
+                    mWindow.show();
+                }
             }
             if (showCallback != null) {
-                mRootView.invalidate();
-                mRootView.getViewTreeObserver().addOnPreDrawListener(
-                        new ViewTreeObserver.OnPreDrawListener() {
-                            @Override
-                            public boolean onPreDraw() {
-                                mRootView.getViewTreeObserver().removeOnPreDrawListener(this);
-                                try {
-                                    showCallback.onShown();
-                                } catch (RemoteException e) {
-                                    Log.w(TAG, "Error calling onShown", e);
+                if (mUiEnabled) {
+                    mRootView.invalidate();
+                    mRootView.getViewTreeObserver().addOnPreDrawListener(
+                            new ViewTreeObserver.OnPreDrawListener() {
+                                @Override
+                                public boolean onPreDraw() {
+                                    mRootView.getViewTreeObserver().removeOnPreDrawListener(this);
+                                    try {
+                                        showCallback.onShown();
+                                    } catch (RemoteException e) {
+                                        Log.w(TAG, "Error calling onShown", e);
+                                    }
+                                    return true;
                                 }
-                                return true;
-                            }
-                        });
+                            });
+                } else {
+                    try {
+                        showCallback.onShown();
+                    } catch (RemoteException e) {
+                        Log.w(TAG, "Error calling onShown", e);
+                    }
+                }
             }
         } finally {
             mWindowWasVisible = true;
@@ -1039,7 +1045,7 @@
 
     void doHide() {
         if (mWindowVisible) {
-            mWindow.hide();
+            ensureWindowHidden();
             mWindowVisible = false;
             onHide();
         }
@@ -1058,19 +1064,56 @@
         }
     }
 
-    void initViews() {
+    void ensureWindowCreated() {
+        if (mInitialized) {
+            return;
+        }
+
+        if (!mUiEnabled) {
+            throw new IllegalStateException("setUiEnabled is false");
+        }
+
         mInitialized = true;
+        mInflater = (LayoutInflater)mContext.getSystemService(
+                Context.LAYOUT_INFLATER_SERVICE);
+        mWindow = new SoftInputWindow(mContext, "VoiceInteractionSession", mTheme,
+                mCallbacks, this, mDispatcherState,
+                WindowManager.LayoutParams.TYPE_VOICE_INTERACTION, Gravity.BOTTOM, true);
+        mWindow.getWindow().addFlags(
+                WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED |
+                        WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN |
+                        WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR);
 
         mThemeAttrs = mContext.obtainStyledAttributes(android.R.styleable.VoiceInteractionSession);
         mRootView = mInflater.inflate(
                 com.android.internal.R.layout.voice_interaction_session, null);
         mRootView.setSystemUiVisibility(
                 View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
-                | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
+                        | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
         mWindow.setContentView(mRootView);
         mRootView.getViewTreeObserver().addOnComputeInternalInsetsListener(mInsetsComputer);
 
         mContentFrame = (FrameLayout)mRootView.findViewById(android.R.id.content);
+
+        mWindow.getWindow().setLayout(MATCH_PARENT, MATCH_PARENT);
+        mWindow.setToken(mToken);
+    }
+
+    void ensureWindowAdded() {
+        if (mUiEnabled && !mWindowAdded) {
+            mWindowAdded = true;
+            ensureWindowCreated();
+            View v = onCreateContentView();
+            if (v != null) {
+                setContentView(v);
+            }
+        }
+    }
+
+    void ensureWindowHidden() {
+        if (mWindow != null) {
+            mWindow.hide();
+        }
     }
 
     /**
@@ -1151,6 +1194,24 @@
     }
 
     /**
+     * Control whether the UI layer for this session is enabled.  It is enabled by default.
+     * If set to false, you will not be able to provide a UI through {@link #onCreateContentView()}.
+     */
+    public void setUiEnabled(boolean enabled) {
+        if (mUiEnabled != enabled) {
+            mUiEnabled = enabled;
+            if (mWindowVisible) {
+                if (enabled) {
+                    ensureWindowAdded();
+                    mWindow.show();
+                } else {
+                    ensureWindowHidden();
+                }
+            }
+        }
+    }
+
+    /**
      * You can call this to customize the theme used by your IME's window.
      * This must be set before {@link #onCreate}, so you
      * will typically call it in your constructor with the resource ID
@@ -1200,6 +1261,36 @@
         }
     }
 
+
+
+    /**
+     * <p>Ask that a new assistant activity be started.  This will create a new task in the
+     * in activity manager: this means that
+     * {@link Intent#FLAG_ACTIVITY_NEW_TASK Intent.FLAG_ACTIVITY_NEW_TASK}
+     * will be set for you to make it a new task.</p>
+     *
+     * <p>The newly started activity will be displayed on top of other activities in the system
+     * in a new layer that is not affected by multi-window mode.  Tasks started from this activity
+     * will go into the normal activity layer and not this new layer.</p>
+     *
+     * <p>By default, the system will create a window for the UI for this session.  If you are using
+     * an assistant activity instead, then you can disable the window creation by calling
+     * {@link #setUiEnabled} in {@link #onPrepareShow(Bundle, int)}.</p>
+     */
+    public void startAssistantActivity(Intent intent) {
+        if (mToken == null) {
+            throw new IllegalStateException("Can't call before onCreate()");
+        }
+        try {
+            intent.migrateExtraStreamToClipData();
+            intent.prepareToLeaveProcess(mContext);
+            int res = mSystemService.startAssistantActivity(mToken, intent,
+                    intent.resolveType(mContext.getContentResolver()));
+            Instrumentation.checkStartActivityResult(res, intent);
+        } catch (RemoteException e) {
+        }
+    }
+
     /**
      * Set whether this session will keep the device awake while it is running a voice
      * activity.  By default, the system holds a wake lock for it while in this state,
@@ -1242,6 +1333,7 @@
      * Convenience for inflating views.
      */
     public LayoutInflater getLayoutInflater() {
+        ensureWindowCreated();
         return mInflater;
     }
 
@@ -1249,6 +1341,7 @@
      * Retrieve the window being used to show the session's UI.
      */
     public Dialog getWindow() {
+        ensureWindowCreated();
         return mWindow;
     }
 
@@ -1278,18 +1371,17 @@
     private void doOnCreate() {
         mTheme = mTheme != 0 ? mTheme
                 : com.android.internal.R.style.Theme_DeviceDefault_VoiceInteractionSession;
-        mInflater = (LayoutInflater)mContext.getSystemService(
-                Context.LAYOUT_INFLATER_SERVICE);
-        mWindow = new SoftInputWindow(mContext, "VoiceInteractionSession", mTheme,
-                mCallbacks, this, mDispatcherState,
-                WindowManager.LayoutParams.TYPE_VOICE_INTERACTION, Gravity.BOTTOM, true);
-        mWindow.getWindow().addFlags(
-                WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED |
-                WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN |
-                WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR);
-        initViews();
-        mWindow.getWindow().setLayout(MATCH_PARENT, MATCH_PARENT);
-        mWindow.setToken(mToken);
+    }
+
+    /**
+     * Called prior to {@link #onShow} before any UI setup has occurred.  Not generally useful.
+     *
+     * @param args The arguments that were supplied to
+     * {@link VoiceInteractionService#showSession VoiceInteractionService.showSession}.
+     * @param showFlags The show flags originally provided to
+     * {@link VoiceInteractionService#showSession VoiceInteractionService.showSession}.
+     */
+    public void onPrepareShow(Bundle args, int showFlags) {
     }
 
     /**
@@ -1327,6 +1419,7 @@
     }
 
     public void setContentView(View view) {
+        ensureWindowCreated();
         mContentFrame.removeAllViews();
         mContentFrame.addView(view, new FrameLayout.LayoutParams(
                 ViewGroup.LayoutParams.MATCH_PARENT,
@@ -1623,7 +1716,8 @@
     public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) {
         writer.print(prefix); writer.print("mToken="); writer.println(mToken);
         writer.print(prefix); writer.print("mTheme=#"); writer.println(Integer.toHexString(mTheme));
-        writer.print(prefix); writer.print("mInitialized="); writer.println(mInitialized);
+        writer.print(prefix); writer.print("mUiEnabled="); writer.println(mUiEnabled);
+        writer.print(" mInitialized="); writer.println(mInitialized);
         writer.print(prefix); writer.print("mWindowAdded="); writer.print(mWindowAdded);
         writer.print(" mWindowVisible="); writer.println(mWindowVisible);
         writer.print(prefix); writer.print("mWindowWasVisible="); writer.print(mWindowWasVisible);
diff --git a/core/java/android/service/vr/IVrManager.aidl b/core/java/android/service/vr/IVrManager.aidl
index 62ecab3..10e4177 100644
--- a/core/java/android/service/vr/IVrManager.aidl
+++ b/core/java/android/service/vr/IVrManager.aidl
@@ -42,5 +42,13 @@
      */
     boolean getVrModeState();
 
+    /**
+     * Sets the persistent VR mode state of a device. When a device is in persistent VR mode it will
+     * remain in VR mode even if the foreground does not specify VR mode being enabled. Mainly used
+     * by VR viewers to indicate that a device is placed in a VR viewer.
+     *
+     * @param enabled true if the device should be placed in persistent VR mode.
+     */
+    void setPersistentVrModeEnabled(in boolean enabled);
 }
 
diff --git a/core/java/android/speech/tts/SynthesisPlaybackQueueItem.java b/core/java/android/speech/tts/SynthesisPlaybackQueueItem.java
index cb5f220..491eabc 100644
--- a/core/java/android/speech/tts/SynthesisPlaybackQueueItem.java
+++ b/core/java/android/speech/tts/SynthesisPlaybackQueueItem.java
@@ -97,6 +97,8 @@
         }
 
         mAudioTrack.setPlaybackPositionUpdateListener(this);
+        // Ensure we set the first marker if there is one.
+        updateMarker();
 
         try {
             byte[] buffer = null;
diff --git a/core/java/android/speech/tts/TextToSpeechService.java b/core/java/android/speech/tts/TextToSpeechService.java
index 80d3c8a..08df64f 100644
--- a/core/java/android/speech/tts/TextToSpeechService.java
+++ b/core/java/android/speech/tts/TextToSpeechService.java
@@ -409,6 +409,10 @@
         return getSecureSettingInt(Settings.Secure.TTS_DEFAULT_RATE, Engine.DEFAULT_RATE);
     }
 
+    private int getDefaultPitch() {
+        return getSecureSettingInt(Settings.Secure.TTS_DEFAULT_PITCH, Engine.DEFAULT_PITCH);
+    }
+
     private String[] getSettingsLocale() {
         final Locale locale = mEngineHelper.getLocalePrefForEngine(mPackageName);
         return TtsEngines.toOldLocaleStringFormat(locale);
@@ -936,7 +940,7 @@
         }
 
         int getPitch() {
-            return getIntParam(mParams, Engine.KEY_PARAM_PITCH, Engine.DEFAULT_PITCH);
+            return getIntParam(mParams, Engine.KEY_PARAM_PITCH, getDefaultPitch());
         }
 
         @Override
diff --git a/core/java/android/text/Emoji.java b/core/java/android/text/Emoji.java
index b6d720d..83810b0 100644
--- a/core/java/android/text/Emoji.java
+++ b/core/java/android/text/Emoji.java
@@ -164,6 +164,8 @@
 
     public static int VARIATION_SELECTOR_16 = 0xFE0F;
 
+    public static int CANCEL_TAG = 0xE007F;
+
     // Returns true if the given code point is regional indicator symbol.
     public static boolean isRegionalIndicatorSymbol(int codepoint) {
         return 0x1F1E6 <= codepoint && codepoint <= 0x1F1FF;
@@ -188,4 +190,13 @@
     public static boolean isKeycapBase(int codePoint) {
         return ('0' <= codePoint && codePoint <= '9') || codePoint == '#' || codePoint == '*';
     }
+
+    /**
+     * Returns true if the character can be a part of tag_spec in emoji tag sequence.
+     *
+     * Note that 0xE007F (CANCEL TAG) is not included.
+     */
+    public static boolean isTagSpecChar(int codePoint) {
+        return 0xE0020 <= codePoint && codePoint <= 0xE007E;
+    }
 }
diff --git a/core/java/android/text/FontConfig.java b/core/java/android/text/FontConfig.java
index 3048a38..82e44dc 100644
--- a/core/java/android/text/FontConfig.java
+++ b/core/java/android/text/FontConfig.java
@@ -170,14 +170,24 @@
         private final int mWeight;
         private final boolean mIsItalic;
         private ParcelFileDescriptor mFd;
+        private final int mResourceId;
 
-        public Font(String fontName, int ttcIndex, List<Axis> axes, int weight, boolean isItalic) {
+        /**
+         * @hide
+         */
+        public Font(String fontName, int ttcIndex, List<Axis> axes, int weight, boolean isItalic,
+                int resourceId) {
             mFontName = fontName;
             mTtcIndex = ttcIndex;
             mAxes = axes;
             mWeight = weight;
             mIsItalic = isItalic;
             mFd = null;
+            mResourceId = resourceId;
+        }
+
+        public Font(String fontName, int ttcIndex, List<Axis> axes, int weight, boolean isItalic) {
+            this(fontName, ttcIndex, axes, weight, isItalic, 0);
         }
 
         public Font(Font origin) {
@@ -193,6 +203,7 @@
                     e.printStackTrace();
                 }
             }
+            mResourceId = origin.mResourceId;
         }
 
         /**
@@ -254,6 +265,13 @@
         /**
          * @hide
          */
+        public int getResourceId() {
+            return mResourceId;
+        }
+
+        /**
+         * @hide
+         */
         public Font(Parcel in) {
             mFontName = in.readString();
             mTtcIndex = in.readInt();
@@ -269,6 +287,7 @@
             } else {
                 mFd = null;
             }
+            mResourceId = in.readInt();
         }
 
         @Override
@@ -285,6 +304,7 @@
             if (mFd != null) {
                 mFd.writeToParcel(out, flag);
             }
+            out.writeInt(mResourceId);
         }
 
         @Override
@@ -382,22 +402,40 @@
         private final List<Font> mFonts;
         private final String mLanguage;
         private final String mVariant;
+        private final String mProviderAuthority;
+        private final String mQuery;
 
         public Family(String name, List<Font> fonts, String language, String variant) {
-            this.mName = name;
-            this.mFonts = fonts;
-            this.mLanguage = language;
-            this.mVariant = variant;
+            mName = name;
+            mFonts = fonts;
+            mLanguage = language;
+            mVariant = variant;
+            mProviderAuthority = null;
+            mQuery = null;
+        }
+
+        /**
+         * @hide
+         */
+        public Family(String providerAuthority, String query) {
+            mName = null;
+            mFonts = null;
+            mLanguage = null;
+            mVariant = null;
+            mProviderAuthority = providerAuthority;
+            mQuery = query;
         }
 
         public Family(Family origin) {
-            this.mName = origin.mName;
-            this.mLanguage = origin.mLanguage;
-            this.mVariant = origin.mVariant;
-            this.mFonts = new ArrayList<>();
+            mName = origin.mName;
+            mLanguage = origin.mLanguage;
+            mVariant = origin.mVariant;
+            mFonts = new ArrayList<>();
             for (int i = 0; i < origin.mFonts.size(); i++) {
                 mFonts.add(new Font(origin.mFonts.get(i)));
             }
+            mProviderAuthority = origin.mProviderAuthority;
+            mQuery = origin.mQuery;
         }
 
         /**
@@ -431,6 +469,20 @@
         /**
          * @hide
          */
+        public String getProviderAuthority() {
+            return mProviderAuthority;
+        }
+
+        /**
+         * @hide
+         */
+        public String getQuery() {
+            return mQuery;
+        }
+
+        /**
+         * @hide
+         */
         public Family(Parcel in) {
             mName = in.readString();
             final int size = in.readInt();
@@ -440,6 +492,16 @@
             }
             mLanguage = in.readString();
             mVariant = in.readString();
+            if (in.readInt() == 1) {
+                mProviderAuthority = in.readString();
+            } else {
+                mProviderAuthority = null;
+            }
+            if (in.readInt() == 1) {
+                mQuery = in.readString();
+            } else {
+                mQuery = null;
+            }
         }
 
         @Override
@@ -451,6 +513,14 @@
             }
             out.writeString(mLanguage);
             out.writeString(mVariant);
+            out.writeInt(mProviderAuthority == null ? 0 : 1);
+            if (mProviderAuthority != null) {
+                out.writeString(mProviderAuthority);
+            }
+            out.writeInt(mQuery == null ? 0 : 1);
+            if (mQuery != null) {
+                out.writeString(mQuery);
+            }
         }
 
         @Override
diff --git a/core/java/android/text/TextUtils.java b/core/java/android/text/TextUtils.java
index bb952ab..ac9c0d7 100644
--- a/core/java/android/text/TextUtils.java
+++ b/core/java/android/text/TextUtils.java
@@ -62,6 +62,7 @@
 
 import com.android.internal.R;
 import com.android.internal.util.ArrayUtils;
+import com.android.internal.util.Preconditions;
 
 import java.lang.reflect.Array;
 import java.util.Iterator;
@@ -455,10 +456,7 @@
      * @return true if str is null or zero length
      */
     public static boolean isEmpty(@Nullable CharSequence str) {
-        if (str == null || str.length() == 0)
-            return true;
-        else
-            return false;
+        return str == null || str.length() == 0;
     }
 
     /** {@hide} */
@@ -466,6 +464,16 @@
         return isEmpty(str) ? null : str;
     }
 
+    /** {@hide} */
+    public static String emptyIfNull(@Nullable String str) {
+        return str == null ? "" : str;
+    }
+
+    /** {@hide} */
+    public static String firstNotEmpty(@Nullable String a, @NonNull String b) {
+        return !isEmpty(a) ? a : Preconditions.checkStringNotEmpty(b);
+    }
+
     /**
      * Returns the length that the specified CharSequence would have if
      * spaces and ASCII control characters were trimmed from the start and end,
diff --git a/core/java/android/text/method/BaseKeyListener.java b/core/java/android/text/method/BaseKeyListener.java
index 90559dc..5f0a46d 100644
--- a/core/java/android/text/method/BaseKeyListener.java
+++ b/core/java/android/text/method/BaseKeyListener.java
@@ -145,8 +145,11 @@
         // The number of following RIS code points is even.
         final int STATE_EVEN_NUMBERED_RIS = 11;
 
+        // The offset is in emoji tag sequence.
+        final int STATE_IN_TAG_SEQUENCE = 12;
+
         // The state machine has been stopped.
-        final int STATE_FINISHED = 12;
+        final int STATE_FINISHED = 13;
 
         int deleteCharCount = 0;  // Char count to be deleted by backspace.
         int lastSeenVSCharCount = 0;  // Char count of previous variation selector.
@@ -173,6 +176,8 @@
                         state = STATE_BEFORE_KEYCAP;
                     } else if (Emoji.isEmoji(codePoint)) {
                         state = STATE_BEFORE_EMOJI;
+                    } else if (codePoint == Emoji.CANCEL_TAG) {
+                        state = STATE_IN_TAG_SEQUENCE;
                     } else {
                         state = STATE_FINISHED;
                     }
@@ -275,6 +280,20 @@
                         state = STATE_FINISHED;
                     }
                     break;
+                case STATE_IN_TAG_SEQUENCE:
+                    if (Emoji.isTagSpecChar(codePoint)) {
+                        deleteCharCount += 2; /* Char count of emoji tag spec character. */
+                        // Keep the same state.
+                    } else if (Emoji.isEmoji(codePoint)) {
+                        deleteCharCount += Character.charCount(codePoint);
+                        state = STATE_FINISHED;
+                    } else {
+                        // Couldn't find tag_base character. Delete the last tag_term character.
+                        deleteCharCount = 2;  // for U+E007F
+                        state = STATE_FINISHED;
+                    }
+                    // TODO: Need handle emoji variation selectors. Issue 35224297
+                    break;
                 default:
                     throw new IllegalArgumentException("state " + state + " is unknown");
             }
diff --git a/core/java/android/text/method/DateKeyListener.java b/core/java/android/text/method/DateKeyListener.java
index 88ef388..e14cd2c 100644
--- a/core/java/android/text/method/DateKeyListener.java
+++ b/core/java/android/text/method/DateKeyListener.java
@@ -16,9 +16,17 @@
 
 package android.text.method;
 
+import android.annotation.NonNull;
+import android.annotation.Nullable;
 import android.text.InputType;
 import android.view.KeyEvent;
 
+import com.android.internal.annotations.GuardedBy;
+
+import java.util.HashMap;
+import java.util.LinkedHashSet;
+import java.util.Locale;
+
 /**
  * For entering dates in a text field.
  * <p></p>
@@ -34,29 +42,76 @@
     }
 
     @Override
-    protected char[] getAcceptedChars()
-    {
-        return CHARACTERS;
-    }
-
-    public static DateKeyListener getInstance() {
-        if (sInstance != null)
-            return sInstance;
-
-        sInstance = new DateKeyListener();
-        return sInstance;
+    @NonNull
+    protected char[] getAcceptedChars() {
+        return mCharacters;
     }
 
     /**
-     * The characters that are used.
+     * @deprecated Use {@link #DateKeyListener(Locale)} instead.
+     */
+    @Deprecated
+    public DateKeyListener() {
+        this(null);
+    }
+
+    private static final String SYMBOLS_TO_IGNORE = "yMLd";
+    private static final String[] SKELETONS = {"yMd", "yM", "Md"};
+
+    public DateKeyListener(@Nullable Locale locale) {
+        final LinkedHashSet<Character> chars = new LinkedHashSet<>();
+        // First add the digits, then add all the non-pattern characters seen in the pattern for
+        // "yMd", which is supposed to only have numerical fields.
+        final boolean success = NumberKeyListener.addDigits(chars, locale)
+                                && NumberKeyListener.addFormatCharsFromSkeletons(
+                                        chars, locale, SKELETONS, SYMBOLS_TO_IGNORE);
+        mCharacters = success ? NumberKeyListener.collectionToArray(chars) : CHARACTERS;
+    }
+
+    /**
+     * @deprecated Use {@link #getInstance(Locale)} instead.
+     */
+    @Deprecated
+    @NonNull
+    public static DateKeyListener getInstance() {
+        return getInstance(null);
+    }
+
+    /**
+     * Returns an instance of DateKeyListener appropriate for the given locale.
+     */
+    @NonNull
+    public static DateKeyListener getInstance(@Nullable Locale locale) {
+        DateKeyListener instance;
+        synchronized (sLock) {
+            instance = sInstanceCache.get(locale);
+            if (instance == null) {
+                instance = new DateKeyListener(locale);
+                sInstanceCache.put(locale, instance);
+            }
+        }
+        return instance;
+    }
+
+    /**
+     * This field used to list the characters that were used. But is now a fixed data
+     * field that is the list of code units used for the deprecated case where the class
+     * is instantiated with null or no input parameter.
      *
      * @see KeyEvent#getMatch
      * @see #getAcceptedChars
+     *
+     * @deprecated Use {@link #getAcceptedChars()} instead.
      */
+    @Deprecated
     public static final char[] CHARACTERS = new char[] {
             '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
             '/', '-', '.'
         };
 
-    private static DateKeyListener sInstance;
+    private final char[] mCharacters;
+
+    private static final Object sLock = new Object();
+    @GuardedBy("sLock")
+    private static final HashMap<Locale, DateKeyListener> sInstanceCache = new HashMap<>();
 }
diff --git a/core/java/android/text/method/DateTimeKeyListener.java b/core/java/android/text/method/DateTimeKeyListener.java
index 523e986..62e3ade 100644
--- a/core/java/android/text/method/DateTimeKeyListener.java
+++ b/core/java/android/text/method/DateTimeKeyListener.java
@@ -16,9 +16,17 @@
 
 package android.text.method;
 
+import android.annotation.NonNull;
+import android.annotation.Nullable;
 import android.text.InputType;
 import android.view.KeyEvent;
 
+import com.android.internal.annotations.GuardedBy;
+
+import java.util.HashMap;
+import java.util.LinkedHashSet;
+import java.util.Locale;
+
 /**
  * For entering dates and times in the same text field.
  * <p></p>
@@ -34,29 +42,80 @@
     }
     
     @Override
+    @NonNull
     protected char[] getAcceptedChars()
     {
-        return CHARACTERS;
-    }
-
-    public static DateTimeKeyListener getInstance() {
-        if (sInstance != null)
-            return sInstance;
-
-        sInstance = new DateTimeKeyListener();
-        return sInstance;
+        return mCharacters;
     }
 
     /**
-     * The characters that are used.
+     * @deprecated Use {@link #DateTimeKeyListener(Locale)} instead.
+     */
+    @Deprecated
+    public DateTimeKeyListener() {
+        this(null);
+    }
+
+    private static final String SYMBOLS_TO_IGNORE = "yMLdahHKkms";
+    private static final String SKELETON_12HOUR = "yMdhms";
+    private static final String SKELETON_24HOUR = "yMdHms";
+
+    public DateTimeKeyListener(@Nullable Locale locale) {
+        final LinkedHashSet<Character> chars = new LinkedHashSet<>();
+        // First add the digits. Then, add all the character in AM and PM markers. Finally, add all
+        // the non-pattern characters seen in the patterns for "yMdhms" and "yMdHms".
+        boolean success = NumberKeyListener.addDigits(chars, locale)
+                          && NumberKeyListener.addAmPmChars(chars, locale)
+                          && NumberKeyListener.addFormatCharsFromSkeleton(
+                              chars, locale, SKELETON_12HOUR, SYMBOLS_TO_IGNORE)
+                          && NumberKeyListener.addFormatCharsFromSkeleton(
+                              chars, locale, SKELETON_24HOUR, SYMBOLS_TO_IGNORE);
+        mCharacters = success ? NumberKeyListener.collectionToArray(chars) : CHARACTERS;
+    }
+
+    /**
+     * @deprecated Use {@link #getInstance(Locale)} instead.
+     */
+    @Deprecated
+    @NonNull
+    public static DateTimeKeyListener getInstance() {
+        return getInstance(null);
+    }
+
+    /**
+     * Returns an instance of DateTimeKeyListener appropriate for the given locale.
+     */
+    @NonNull
+    public static DateTimeKeyListener getInstance(@Nullable Locale locale) {
+        DateTimeKeyListener instance;
+        synchronized (sLock) {
+            instance = sInstanceCache.get(locale);
+            if (instance == null) {
+                instance = new DateTimeKeyListener(locale);
+                sInstanceCache.put(locale, instance);
+            }
+        }
+        return instance;
+    }
+
+    /**
+     * This field used to list the characters that were used. But is now a fixed data
+     * field that is the list of code units used for the deprecated case where the class
+     * is instantiated with null or no input parameter.
      *
      * @see KeyEvent#getMatch
      * @see #getAcceptedChars
+     *
+     * @deprecated Use {@link #getAcceptedChars()} instead.
      */
     public static final char[] CHARACTERS = new char[] {
             '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'm',
             'p', ':', '/', '-', ' '
         };
 
-    private static DateTimeKeyListener sInstance;
+    private final char[] mCharacters;
+
+    private static final Object sLock = new Object();
+    @GuardedBy("sLock")
+    private static final HashMap<Locale, DateTimeKeyListener> sInstanceCache = new HashMap<>();
 }
diff --git a/core/java/android/text/method/DigitsKeyListener.java b/core/java/android/text/method/DigitsKeyListener.java
index 4aeb39a..26c69ab 100644
--- a/core/java/android/text/method/DigitsKeyListener.java
+++ b/core/java/android/text/method/DigitsKeyListener.java
@@ -16,11 +16,21 @@
 
 package android.text.method;
 
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.icu.lang.UCharacter;
+import android.icu.lang.UProperty;
+import android.icu.text.DecimalFormatSymbols;
 import android.text.InputType;
 import android.text.SpannableStringBuilder;
 import android.text.Spanned;
 import android.view.KeyEvent;
 
+import com.android.internal.annotations.GuardedBy;
+
+import java.util.HashMap;
+import java.util.LinkedHashSet;
+import java.util.Locale;
 
 /**
  * For digits-only text entry
@@ -32,8 +42,20 @@
 public class DigitsKeyListener extends NumberKeyListener
 {
     private char[] mAccepted;
-    private boolean mSign;
-    private boolean mDecimal;
+    private final boolean mSign;
+    private final boolean mDecimal;
+
+    private static final String DEFAULT_DECIMAL_POINT_CHARS = ".";
+    private static final String DEFAULT_SIGN_CHARS = "-+";
+
+    private static final char HYPHEN_MINUS = '-';
+    // Various locales use this as minus sign
+    private static final char MINUS_SIGN = '\u2212';
+    // Slovenian uses this as minus sign (a bug?): http://unicode.org/cldr/trac/ticket/10050
+    private static final char EN_DASH = '\u2013';
+
+    private String mDecimalPointChars = DEFAULT_DECIMAL_POINT_CHARS;
+    private String mSignChars = DEFAULT_SIGN_CHARS;
 
     private static final int SIGN = 1;
     private static final int DECIMAL = 2;
@@ -44,83 +66,218 @@
     }
 
     /**
-     * The characters that are used.
+     * The characters that are used in compatibility mode.
      *
      * @see KeyEvent#getMatch
      * @see #getAcceptedChars
      */
-    private static final char[][] CHARACTERS = {
+    private static final char[][] COMPATIBILITY_CHARACTERS = {
         { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' },
         { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '+' },
         { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.' },
         { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '+', '.' },
     };
 
-    private static boolean isSignChar(final char c) {
-        return c == '-' || c == '+';
+    private boolean isSignChar(final char c) {
+        return mSignChars.indexOf(c) != -1;
     }
 
-    // TODO: Needs internationalization
-    private static boolean isDecimalPointChar(final char c) {
-        return c == '.';
+    private boolean isDecimalPointChar(final char c) {
+        return mDecimalPointChars.indexOf(c) != -1;
     }
 
     /**
-     * Allocates a DigitsKeyListener that accepts the digits 0 through 9.
+     * Allocates a DigitsKeyListener that accepts the ASCII digits 0 through 9.
+     *
+     * @deprecated Use {@link #DigitsKeyListener(Locale)} instead.
      */
+    @Deprecated
     public DigitsKeyListener() {
-        this(false, false);
+        this(null, false, false);
     }
 
     /**
-     * Allocates a DigitsKeyListener that accepts the digits 0 through 9,
-     * plus the minus sign (only at the beginning) and/or decimal point
+     * Allocates a DigitsKeyListener that accepts the ASCII digits 0 through 9, plus the ASCII plus
+     * or minus sign (only at the beginning) and/or the ASCII period ('.') as the decimal point
      * (only one per field) if specified.
+     *
+     * @deprecated Use {@link #DigitsKeyListener(Locale, boolean, boolean)} instead.
      */
+    @Deprecated
     public DigitsKeyListener(boolean sign, boolean decimal) {
+        this(null, sign, decimal);
+    }
+
+    public DigitsKeyListener(@Nullable Locale locale) {
+        this(locale, false, false);
+    }
+
+    private void setToCompat(boolean sign, boolean decimal) {
+        mDecimalPointChars = DEFAULT_DECIMAL_POINT_CHARS;
+        mSignChars = DEFAULT_SIGN_CHARS;
+        final int kind = (sign ? SIGN : 0) | (decimal ? DECIMAL : 0);
+        mAccepted = COMPATIBILITY_CHARACTERS[kind];
+    }
+
+    // Takes a sign string and strips off its bidi controls, if any.
+    @NonNull
+    private static String stripBidiControls(@NonNull String sign) {
+        // For the sake of simplicity, we operate on code units, since all bidi controls are
+        // in the BMP. We also expect the string to be very short (almost always 1 character), so we
+        // don't need to use StringBuilder.
+        String result = "";
+        for (int i = 0; i < sign.length(); i++) {
+            final char c = sign.charAt(i);
+            if (!UCharacter.hasBinaryProperty(c, UProperty.BIDI_CONTROL)) {
+                if (result.isEmpty()) {
+                    result = String.valueOf(c);
+                } else {
+                    // This should happen very rarely, only if we have a multi-character sign,
+                    // or a sign outside BMP.
+                    result += c;
+                }
+            }
+        }
+        return result;
+    }
+
+    public DigitsKeyListener(@Nullable Locale locale, boolean sign, boolean decimal) {
         mSign = sign;
         mDecimal = decimal;
+        if (locale == null) {
+            setToCompat(sign, decimal);
+            return;
+        }
+        LinkedHashSet<Character> chars = new LinkedHashSet<>();
+        final boolean success = NumberKeyListener.addDigits(chars, locale);
+        if (!success) {
+            setToCompat(sign, decimal);
+            return;
+        }
+        if (sign || decimal) {
+            final DecimalFormatSymbols symbols = DecimalFormatSymbols.getInstance(locale);
+            if (sign) {
+                final String minusString = stripBidiControls(symbols.getMinusSignString());
+                final String plusString = stripBidiControls(symbols.getPlusSignString());
+                if (minusString.length() > 1 || plusString.length() > 1) {
+                    // non-BMP and multi-character signs are not supported.
+                    setToCompat(sign, decimal);
+                    return;
+                }
+                final char minus = minusString.charAt(0);
+                final char plus = plusString.charAt(0);
+                chars.add(Character.valueOf(minus));
+                chars.add(Character.valueOf(plus));
+                mSignChars = "" + minus + plus;
 
-        int kind = (sign ? SIGN : 0) | (decimal ? DECIMAL : 0);
-        mAccepted = CHARACTERS[kind];
+                if (minus == MINUS_SIGN || minus == EN_DASH) {
+                    // If the minus sign is U+2212 MINUS SIGN or U+2013 EN DASH, we also need to
+                    // accept the ASCII hyphen-minus.
+                    chars.add(HYPHEN_MINUS);
+                    mSignChars += HYPHEN_MINUS;
+                }
+            }
+            if (decimal) {
+                final String separatorString = symbols.getDecimalSeparatorString();
+                if (separatorString.length() > 1) {
+                    // non-BMP and multi-character decimal separators are not supported.
+                    setToCompat(sign, decimal);
+                    return;
+                }
+                final Character separatorChar = Character.valueOf(separatorString.charAt(0));
+                chars.add(separatorChar);
+                mDecimalPointChars = separatorChar.toString();
+            }
+        }
+        mAccepted = NumberKeyListener.collectionToArray(chars);
+    }
+
+    private DigitsKeyListener(@NonNull final String accepted) {
+        mSign = false;
+        mDecimal = false;
+        mAccepted = new char[accepted.length()];
+        accepted.getChars(0, accepted.length(), mAccepted, 0);
     }
 
     /**
-     * Returns a DigitsKeyListener that accepts the digits 0 through 9.
+     * Returns a DigitsKeyListener that accepts the ASCII digits 0 through 9.
+     *
+     * @deprecated Use {@link #getInstance(Locale)} instead.
      */
+    @Deprecated
+    @NonNull
     public static DigitsKeyListener getInstance() {
         return getInstance(false, false);
     }
 
     /**
-     * Returns a DigitsKeyListener that accepts the digits 0 through 9,
-     * plus the minus sign (only at the beginning) and/or decimal point
+     * Returns a DigitsKeyListener that accepts the ASCII digits 0 through 9, plus the ASCII plus
+     * or minus sign (only at the beginning) and/or the ASCII period ('.') as the decimal point
      * (only one per field) if specified.
+     *
+     * @deprecated Use {@link #getInstance(Locale, boolean, boolean)} instead.
      */
+    @Deprecated
+    @NonNull
     public static DigitsKeyListener getInstance(boolean sign, boolean decimal) {
-        int kind = (sign ? SIGN : 0) | (decimal ? DECIMAL : 0);
-
-        if (sInstance[kind] != null)
-            return sInstance[kind];
-
-        sInstance[kind] = new DigitsKeyListener(sign, decimal);
-        return sInstance[kind];
+        return getInstance(null, sign, decimal);
     }
 
     /**
+     * Returns a DigitsKeyListener that accepts the locale-appropriate digits.
+     */
+    @NonNull
+    public static DigitsKeyListener getInstance(@Nullable Locale locale) {
+        return getInstance(locale, false, false);
+    }
+
+    private static final Object sLocaleCacheLock = new Object();
+    @GuardedBy("sLocaleCacheLock")
+    private static final HashMap<Locale, DigitsKeyListener[]> sLocaleInstanceCache =
+            new HashMap<>();
+
+    /**
+     * Returns a DigitsKeyListener that accepts the locale-appropriate digits, plus the
+     * locale-appropriate plus or minus sign (only at the beginning) and/or the locale-appropriate
+     * decimal separator (only one per field) if specified.
+     */
+    @NonNull
+    public static DigitsKeyListener getInstance(
+            @Nullable Locale locale, boolean sign, boolean decimal) {
+        final int kind = (sign ? SIGN : 0) | (decimal ? DECIMAL : 0);
+        synchronized (sLocaleCacheLock) {
+            DigitsKeyListener[] cachedValue = sLocaleInstanceCache.get(locale);
+            if (cachedValue != null && cachedValue[kind] != null) {
+                return cachedValue[kind];
+            }
+            if (cachedValue == null) {
+                cachedValue = new DigitsKeyListener[4];
+                sLocaleInstanceCache.put(locale, cachedValue);
+            }
+            return cachedValue[kind] = new DigitsKeyListener(locale, sign, decimal);
+        }
+    }
+
+    private static final Object sStringCacheLock = new Object();
+    @GuardedBy("sStringCacheLock")
+    private static final HashMap<String, DigitsKeyListener> sStringInstanceCache = new HashMap<>();
+
+    /**
      * Returns a DigitsKeyListener that accepts only the characters
      * that appear in the specified String.  Note that not all characters
      * may be available on every keyboard.
      */
-    public static DigitsKeyListener getInstance(String accepted) {
-        // TODO: do we need a cache of these to avoid allocating?
-
-        DigitsKeyListener dim = new DigitsKeyListener();
-
-        dim.mAccepted = new char[accepted.length()];
-        accepted.getChars(0, accepted.length(), dim.mAccepted, 0);
-
-        return dim;
+    @NonNull
+    public static DigitsKeyListener getInstance(@NonNull String accepted) {
+        DigitsKeyListener result;
+        synchronized (sStringCacheLock) {
+            result = sStringInstanceCache.get(accepted);
+            if (result == null) {
+                result = new DigitsKeyListener(accepted);
+                sStringInstanceCache.put(accepted, result);
+            }
+        }
+        return result;
     }
 
     public int getInputType() {
@@ -226,6 +383,4 @@
             return null;
         }
     }
-
-    private static DigitsKeyListener[] sInstance = new DigitsKeyListener[4];
 }
diff --git a/core/java/android/text/method/LinkMovementMethod.java b/core/java/android/text/method/LinkMovementMethod.java
index 24c119f..31ed549 100644
--- a/core/java/android/text/method/LinkMovementMethod.java
+++ b/core/java/android/text/method/LinkMovementMethod.java
@@ -29,9 +29,6 @@
 /**
  * A movement method that traverses links in the text buffer and scrolls if necessary.
  * Supports clicking on links with DPad Center or Enter.
- *
- * <p>Note: Starting from Android 8.0 (API level 25) this class no longer handles the touch
- * clicks.
  */
 public class LinkMovementMethod extends ScrollingMovementMethod {
     private static final int CLICK = 1;
@@ -198,7 +195,7 @@
                                 MotionEvent event) {
         int action = event.getAction();
 
-        if (action == MotionEvent.ACTION_DOWN) {
+        if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_DOWN) {
             int x = (int) event.getX();
             int y = (int) event.getY();
 
@@ -215,9 +212,13 @@
             ClickableSpan[] links = buffer.getSpans(off, off, ClickableSpan.class);
 
             if (links.length != 0) {
-                Selection.setSelection(buffer,
+                if (action == MotionEvent.ACTION_UP) {
+                    links[0].onClick(widget);
+                } else if (action == MotionEvent.ACTION_DOWN) {
+                    Selection.setSelection(buffer,
                         buffer.getSpanStart(links[0]),
                         buffer.getSpanEnd(links[0]));
+                }
                 return true;
             } else {
                 Selection.removeSelection(buffer);
diff --git a/core/java/android/text/method/NumberKeyListener.java b/core/java/android/text/method/NumberKeyListener.java
index 6b12b7e..d40015ee 100644
--- a/core/java/android/text/method/NumberKeyListener.java
+++ b/core/java/android/text/method/NumberKeyListener.java
@@ -16,15 +16,24 @@
 
 package android.text.method;
 
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.icu.text.DecimalFormatSymbols;
 import android.text.Editable;
 import android.text.InputFilter;
 import android.text.Selection;
 import android.text.Spannable;
 import android.text.SpannableStringBuilder;
 import android.text.Spanned;
+import android.text.format.DateFormat;
 import android.view.KeyEvent;
 import android.view.View;
 
+import libcore.icu.LocaleData;
+
+import java.util.Collection;
+import java.util.Locale;
+
 /**
  * For numeric text entry
  * <p></p>
@@ -38,6 +47,7 @@
     /**
      * You can say which characters you can accept.
      */
+    @NonNull
     protected abstract char[] getAcceptedChars();
 
     protected int lookup(KeyEvent event, Spannable content) {
@@ -137,4 +147,109 @@
         adjustMetaAfterKeypress(content);
         return super.onKeyDown(view, content, keyCode, event);
     }
+
+    /* package */
+    @Nullable
+    static boolean addDigits(@NonNull Collection<Character> collection, @Nullable Locale locale) {
+        if (locale == null) {
+            return false;
+        }
+        final String[] digits = DecimalFormatSymbols.getInstance(locale).getDigitStrings();
+        for (int i = 0; i < 10; i++) {
+            if (digits[i].length() > 1) { // multi-codeunit digits. Not supported.
+                return false;
+            }
+            collection.add(Character.valueOf(digits[i].charAt(0)));
+        }
+        return true;
+    }
+
+    // From http://unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns
+    private static final String DATE_TIME_FORMAT_SYMBOLS =
+            "GyYuUrQqMLlwWdDFgEecabBhHKkjJCmsSAzZOvVXx";
+    private static final char SINGLE_QUOTE = '\'';
+
+    /* package */
+    static boolean addFormatCharsFromSkeleton(
+            @NonNull Collection<Character> collection, @Nullable Locale locale,
+            @NonNull String skeleton, @NonNull String symbolsToIgnore) {
+        if (locale == null) {
+            return false;
+        }
+        final String pattern = DateFormat.getBestDateTimePattern(locale, skeleton);
+        boolean outsideQuotes = true;
+        for (int i = 0; i < pattern.length(); i++) {
+            final char ch = pattern.charAt(i);
+            if (Character.isSurrogate(ch)) { // characters outside BMP are not supported.
+                return false;
+            } else if (ch == SINGLE_QUOTE) {
+                outsideQuotes = !outsideQuotes;
+                // Single quote characters should be considered if and only if they follow
+                // another single quote.
+                if (i == 0 || pattern.charAt(i - 1) != SINGLE_QUOTE) {
+                    continue;
+                }
+            }
+
+            if (outsideQuotes) {
+                if (symbolsToIgnore.indexOf(ch) != -1) {
+                    // Skip expected pattern characters.
+                    continue;
+                } else if (DATE_TIME_FORMAT_SYMBOLS.indexOf(ch) != -1) {
+                    // An unexpected symbols is seen. We've failed.
+                    return false;
+                }
+            }
+            // If we are here, we are either inside quotes, or we have seen a non-pattern
+            // character outside quotes. So ch is a valid character in a date.
+            collection.add(Character.valueOf(ch));
+        }
+        return true;
+    }
+
+    /* package */
+    static boolean addFormatCharsFromSkeletons(
+            @NonNull Collection<Character> collection, @Nullable Locale locale,
+            @NonNull String[] skeletons, @NonNull String symbolsToIgnore) {
+        for (int i = 0; i < skeletons.length; i++) {
+            final boolean success = addFormatCharsFromSkeleton(
+                    collection, locale, skeletons[i], symbolsToIgnore);
+            if (!success) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+
+    /* package */
+    static boolean addAmPmChars(@NonNull Collection<Character> collection,
+                                @Nullable Locale locale) {
+        if (locale == null) {
+            return false;
+        }
+        final String[] amPm = LocaleData.get(locale).amPm;
+        for (int i = 0; i < amPm.length; i++) {
+            for (int j = 0; j < amPm[i].length(); j++) {
+                final char ch = amPm[i].charAt(j);
+                if (Character.isBmpCodePoint(ch)) {
+                    collection.add(Character.valueOf(ch));
+                } else {  // We don't support non-BMP characters.
+                    return false;
+                }
+            }
+        }
+        return true;
+    }
+
+    /* package */
+    @NonNull
+    static char[] collectionToArray(@NonNull Collection<Character> chars) {
+        final char[] result = new char[chars.size()];
+        int i = 0;
+        for (Character ch : chars) {
+            result[i++] = ch;
+        }
+        return result;
+    }
 }
diff --git a/core/java/android/text/method/TimeKeyListener.java b/core/java/android/text/method/TimeKeyListener.java
index 01f4086..c9f9f9f 100644
--- a/core/java/android/text/method/TimeKeyListener.java
+++ b/core/java/android/text/method/TimeKeyListener.java
@@ -16,9 +16,17 @@
 
 package android.text.method;
 
+import android.annotation.NonNull;
+import android.annotation.Nullable;
 import android.text.InputType;
 import android.view.KeyEvent;
 
+import com.android.internal.annotations.GuardedBy;
+
+import java.util.HashMap;
+import java.util.LinkedHashSet;
+import java.util.Locale;
+
 /**
  * For entering times in a text field.
  * <p></p>
@@ -34,29 +42,80 @@
     }
 
     @Override
+    @NonNull
     protected char[] getAcceptedChars()
     {
-        return CHARACTERS;
-    }
-
-    public static TimeKeyListener getInstance() {
-        if (sInstance != null)
-            return sInstance;
-
-        sInstance = new TimeKeyListener();
-        return sInstance;
+        return mCharacters;
     }
 
     /**
-     * The characters that are used.
+     * @deprecated Use {@link #TimeKeyListener(Locale)} instead.
+     */
+    @Deprecated
+    public TimeKeyListener() {
+        this(null);
+    }
+
+    private static final String SYMBOLS_TO_IGNORE = "ahHKkms";
+    private static final String SKELETON_12HOUR = "hms";
+    private static final String SKELETON_24HOUR = "Hms";
+
+    public TimeKeyListener(@Nullable Locale locale) {
+        final LinkedHashSet<Character> chars = new LinkedHashSet<>();
+        // First add the digits. Then, add all the character in AM and PM markers. Finally, add all
+        // the non-pattern characters seen in the patterns for "hms" and "Hms".
+        boolean success = NumberKeyListener.addDigits(chars, locale)
+                          && NumberKeyListener.addAmPmChars(chars, locale)
+                          && NumberKeyListener.addFormatCharsFromSkeleton(
+                              chars, locale, SKELETON_12HOUR, SYMBOLS_TO_IGNORE)
+                          && NumberKeyListener.addFormatCharsFromSkeleton(
+                              chars, locale, SKELETON_24HOUR, SYMBOLS_TO_IGNORE);
+        mCharacters = success ? NumberKeyListener.collectionToArray(chars) : CHARACTERS;
+    }
+
+    /**
+     * @deprecated Use {@link #getInstance(Locale)} instead.
+     */
+    @Deprecated
+    @NonNull
+    public static TimeKeyListener getInstance() {
+        return getInstance(null);
+    }
+
+    /**
+     * Returns an instance of TimeKeyListener appropriate for the given locale.
+     */
+    @NonNull
+    public static TimeKeyListener getInstance(@Nullable Locale locale) {
+        TimeKeyListener instance;
+        synchronized (sLock) {
+            instance = sInstanceCache.get(locale);
+            if (instance == null) {
+                instance = new TimeKeyListener(locale);
+                sInstanceCache.put(locale, instance);
+            }
+        }
+        return instance;
+    }
+
+    /**
+     * This field used to list the characters that were used. But is now a fixed data
+     * field that is the list of code units used for the deprecated case where the class
+     * is instantiated with null or no input parameter.
      *
      * @see KeyEvent#getMatch
      * @see #getAcceptedChars
+     *
+     * @deprecated Use {@link #getAcceptedChars()} instead.
      */
     public static final char[] CHARACTERS = new char[] {
             '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'm',
             'p', ':'
         };
 
-    private static TimeKeyListener sInstance;
+    private final char[] mCharacters;
+
+    private static final Object sLock = new Object();
+    @GuardedBy("sLock")
+    private static final HashMap<Locale, TimeKeyListener> sInstanceCache = new HashMap<>();
 }
diff --git a/core/java/android/text/style/ClickableSpan.java b/core/java/android/text/style/ClickableSpan.java
index a183427..b098f16 100644
--- a/core/java/android/text/style/ClickableSpan.java
+++ b/core/java/android/text/style/ClickableSpan.java
@@ -22,7 +22,7 @@
 /**
  * If an object of this type is attached to the text of a TextView
  * with a movement method of LinkMovementMethod, the affected spans of
- * text can be selected.  If clicked, the {@link #onClick} method will
+ * text can be selected. If selected and clicked, the {@link #onClick} method will
  * be called.
  */
 public abstract class ClickableSpan extends CharacterStyle implements UpdateAppearance {
diff --git a/core/java/android/transition/ChangeTransform.java b/core/java/android/transition/ChangeTransform.java
index 4b0b065..5303855 100644
--- a/core/java/android/transition/ChangeTransform.java
+++ b/core/java/android/transition/ChangeTransform.java
@@ -141,9 +141,10 @@
      * child view will be relative to its parent's final position, so it may appear to "jump"
      * at the beginning.</p>
      *
-     * @return <code>true</code> when a changed parent should execute the transition
-     * inside the scene root's overlay or <code>false</code> if a parent change only
-     * affects the transform of the transitioning view.
+     * @param reparentWithOverlay <code>true</code> when a changed parent should execute the
+     *                            transition inside the scene root's overlay or <code>false</code>
+     *                            if a parent change only affects the transform of the transitioning
+     *                            view.
      * @attr ref android.R.styleable#ChangeTransform_reparentWithOverlay
      */
     public void setReparentWithOverlay(boolean reparentWithOverlay) {
@@ -465,7 +466,7 @@
         }
     }
 
-    private static class GhostListener extends Transition.TransitionListenerAdapter {
+    private static class GhostListener extends TransitionListenerAdapter {
         private View mView;
         private View mStartView;
         private GhostView mGhostView;
diff --git a/core/java/android/transition/Transition.java b/core/java/android/transition/Transition.java
index 8823605..af2547e 100644
--- a/core/java/android/transition/Transition.java
+++ b/core/java/android/transition/Transition.java
@@ -2342,34 +2342,6 @@
     }
 
     /**
-     * Utility adapter class to avoid having to override all three methods
-     * whenever someone just wants to listen for a single event.
-     *
-     * @hide
-     * */
-    public static class TransitionListenerAdapter implements TransitionListener {
-        @Override
-        public void onTransitionStart(Transition transition) {
-        }
-
-        @Override
-        public void onTransitionEnd(Transition transition) {
-        }
-
-        @Override
-        public void onTransitionCancel(Transition transition) {
-        }
-
-        @Override
-        public void onTransitionPause(Transition transition) {
-        }
-
-        @Override
-        public void onTransitionResume(Transition transition) {
-        }
-    }
-
-    /**
      * Holds information about each animator used when a new transition starts
      * while other transitions are still running to determine whether a running
      * animation should be canceled or a new animation noop'd. The structure holds
diff --git a/core/java/android/transition/TransitionListenerAdapter.java b/core/java/android/transition/TransitionListenerAdapter.java
new file mode 100644
index 0000000..c217949
--- /dev/null
+++ b/core/java/android/transition/TransitionListenerAdapter.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2016 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.transition;
+
+/**
+ * This adapter class provides empty implementations of the methods from {@link
+ * android.transition.Transition.TransitionListener}.
+ * Any custom listener that cares only about a subset of the methods of this listener can
+ * simply subclass this adapter class instead of implementing the interface directly.
+ */
+public abstract class TransitionListenerAdapter implements Transition.TransitionListener {
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void onTransitionStart(Transition transition) {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void onTransitionEnd(Transition transition) {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void onTransitionCancel(Transition transition) {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void onTransitionPause(Transition transition) {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void onTransitionResume(Transition transition) {
+    }
+}
diff --git a/core/java/android/transition/TransitionManager.java b/core/java/android/transition/TransitionManager.java
index 6e4d78d..325ff38 100644
--- a/core/java/android/transition/TransitionManager.java
+++ b/core/java/android/transition/TransitionManager.java
@@ -298,7 +298,7 @@
                 previousRunningTransitions = new ArrayList<Transition>(currentTransitions);
             }
             currentTransitions.add(mTransition);
-            mTransition.addListener(new Transition.TransitionListenerAdapter() {
+            mTransition.addListener(new TransitionListenerAdapter() {
                 @Override
                 public void onTransitionEnd(Transition transition) {
                     ArrayList<Transition> currentTransitions =
diff --git a/core/java/android/view/AccessibilityInteractionController.java b/core/java/android/view/AccessibilityInteractionController.java
index 13ee48e..77e9f0f 100644
--- a/core/java/android/view/AccessibilityInteractionController.java
+++ b/core/java/android/view/AccessibilityInteractionController.java
@@ -17,9 +17,11 @@
 package android.view;
 
 import static android.view.accessibility.AccessibilityNodeInfo.ACTION_ARGUMENT_ACCESSIBLE_CLICKABLE_SPAN;
+import static android.view.accessibility.AccessibilityNodeInfo.EXTRA_DATA_TEXT_CHARACTER_LOCATION_KEY;
 
 import android.graphics.Point;
 import android.graphics.Rect;
+import android.graphics.RectF;
 import android.graphics.Region;
 import android.os.Binder;
 import android.os.Bundle;
@@ -29,7 +31,6 @@
 import android.os.Parcelable;
 import android.os.Process;
 import android.os.RemoteException;
-import android.text.TextUtils;
 import android.text.style.AccessibilityClickableSpan;
 import android.text.style.ClickableSpan;
 import android.util.LongSparseArray;
@@ -41,7 +42,6 @@
 
 import com.android.internal.R;
 import com.android.internal.os.SomeArgs;
-import com.android.internal.util.Predicate;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -50,6 +50,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Queue;
+import java.util.function.Predicate;
 
 /**
  * Class for managing accessibility interactions initiated from the system
@@ -93,6 +94,19 @@
         mPrefetcher = new AccessibilityNodePrefetcher();
     }
 
+    private void scheduleMessage(Message message, int interrogatingPid, long interrogatingTid) {
+        // If the interrogation is performed by the same thread as the main UI
+        // thread in this process, set the message as a static reference so
+        // after this call completes the same thread but in the interrogating
+        // client can handle the message to generate the result.
+        if (interrogatingPid == mMyProcessId && interrogatingTid == mMyLooperThreadId) {
+            AccessibilityInteractionClient.getInstanceForThread(
+                    interrogatingTid).setSameThreadMessage(message);
+        } else {
+            mHandler.sendMessage(message);
+        }
+    }
+
     private boolean isShown(View view) {
         // The first two checks are made also made by isShown() which
         // however traverses the tree up to the parent to catch that.
@@ -106,7 +120,7 @@
     public void findAccessibilityNodeInfoByAccessibilityIdClientThread(
             long accessibilityNodeId, Region interactiveRegion, int interactionId,
             IAccessibilityInteractionConnectionCallback callback, int flags, int interrogatingPid,
-            long interrogatingTid, MagnificationSpec spec) {
+            long interrogatingTid, MagnificationSpec spec, Bundle arguments) {
         Message message = mHandler.obtainMessage();
         message.what = PrivateHandler.MSG_FIND_ACCESSIBILITY_NODE_INFO_BY_ACCESSIBILITY_ID;
         message.arg1 = flags;
@@ -118,18 +132,10 @@
         args.arg1 = callback;
         args.arg2 = spec;
         args.arg3 = interactiveRegion;
+        args.arg4 = arguments;
         message.obj = args;
 
-        // If the interrogation is performed by the same thread as the main UI
-        // thread in this process, set the message as a static reference so
-        // after this call completes the same thread but in the interrogating
-        // client can handle the message to generate the result.
-        if (interrogatingPid == mMyProcessId && interrogatingTid == mMyLooperThreadId) {
-            AccessibilityInteractionClient.getInstanceForThread(
-                    interrogatingTid).setSameThreadMessage(message);
-        } else {
-            mHandler.sendMessage(message);
-        }
+        scheduleMessage(message, interrogatingPid, interrogatingTid);
     }
 
     private void findAccessibilityNodeInfoByAccessibilityIdUiThread(Message message) {
@@ -143,6 +149,7 @@
             (IAccessibilityInteractionConnectionCallback) args.arg1;
         final MagnificationSpec spec = (MagnificationSpec) args.arg2;
         final Region interactiveRegion = (Region) args.arg3;
+        final Bundle arguments = (Bundle) args.arg4;
 
         args.recycle();
 
@@ -160,29 +167,12 @@
                 root = findViewByAccessibilityId(accessibilityViewId);
             }
             if (root != null && isShown(root)) {
-                mPrefetcher.prefetchAccessibilityNodeInfos(root, virtualDescendantId, flags, infos);
+                mPrefetcher.prefetchAccessibilityNodeInfos(
+                        root, virtualDescendantId, flags, infos, arguments);
             }
         } finally {
-            try {
-                mViewRootImpl.mAttachInfo.mAccessibilityFetchFlags = 0;
-                applyAppScaleAndMagnificationSpecIfNeeded(infos, spec);
-                // Recycle if called from another process. Specs are cached in the
-                // system process and obtained from a pool when read from parcel.
-                if (spec != null && android.os.Process.myPid() != Binder.getCallingPid()) {
-                    spec.recycle();
-                }
-                adjustIsVisibleToUserIfNeeded(infos, interactiveRegion);
-                callback.setFindAccessibilityNodeInfosResult(infos, interactionId);
-                infos.clear();
-            } catch (RemoteException re) {
-                /* ignore - the other side will time out */
-            }
-
-            // Recycle if called from the same process. Regions are obtained in
-            // the system process and instantiated  when read from parcel.
-            if (interactiveRegion != null && android.os.Process.myPid() == Binder.getCallingPid()) {
-                interactiveRegion.recycle();
-            }
+            updateInfosForViewportAndReturnFindNodeResult(
+                    infos, callback, interactionId, spec, interactiveRegion);
         }
     }
 
@@ -201,19 +191,9 @@
         args.arg2 = spec;
         args.arg3 = viewId;
         args.arg4 = interactiveRegion;
-
         message.obj = args;
 
-        // If the interrogation is performed by the same thread as the main UI
-        // thread in this process, set the message as a static reference so
-        // after this call completes the same thread but in the interrogating
-        // client can handle the message to generate the result.
-        if (interrogatingPid == mMyProcessId && interrogatingTid == mMyLooperThreadId) {
-            AccessibilityInteractionClient.getInstanceForThread(
-                    interrogatingTid).setSameThreadMessage(message);
-        } else {
-            mHandler.sendMessage(message);
-        }
+        scheduleMessage(message, interrogatingPid, interrogatingTid);
     }
 
     private void findAccessibilityNodeInfosByViewIdUiThread(Message message) {
@@ -227,7 +207,6 @@
         final MagnificationSpec spec = (MagnificationSpec) args.arg2;
         final String viewId = (String) args.arg3;
         final Region interactiveRegion = (Region) args.arg4;
-
         args.recycle();
 
         final List<AccessibilityNodeInfo> infos = mTempAccessibilityNodeInfoList;
@@ -257,25 +236,8 @@
                 mAddNodeInfosForViewId.reset();
             }
         } finally {
-            try {
-                mViewRootImpl.mAttachInfo.mAccessibilityFetchFlags = 0;
-                applyAppScaleAndMagnificationSpecIfNeeded(infos, spec);
-                // Recycle if called from another process. Specs are cached in the
-                // system process and obtained from a pool when read from parcel.
-                if (spec != null && android.os.Process.myPid() != Binder.getCallingPid()) {
-                    spec.recycle();
-                }
-                adjustIsVisibleToUserIfNeeded(infos, interactiveRegion);
-                callback.setFindAccessibilityNodeInfosResult(infos, interactionId);
-            } catch (RemoteException re) {
-                /* ignore - the other side will time out */
-            }
-
-            // Recycle if called from the same process. Regions are obtained in
-            // the system process and instantiated  when read from parcel.
-            if (interactiveRegion != null && android.os.Process.myPid() == Binder.getCallingPid()) {
-                interactiveRegion.recycle();
-            }
+            updateInfosForViewportAndReturnFindNodeResult(
+                    infos, callback, interactionId, spec, interactiveRegion);
         }
     }
 
@@ -297,16 +259,7 @@
         args.arg4 = interactiveRegion;
         message.obj = args;
 
-        // If the interrogation is performed by the same thread as the main UI
-        // thread in this process, set the message as a static reference so
-        // after this call completes the same thread but in the interrogating
-        // client can handle the message to generate the result.
-        if (interrogatingPid == mMyProcessId && interrogatingTid == mMyLooperThreadId) {
-            AccessibilityInteractionClient.getInstanceForThread(
-                    interrogatingTid).setSameThreadMessage(message);
-        } else {
-            mHandler.sendMessage(message);
-        }
+        scheduleMessage(message, interrogatingPid, interrogatingTid);
     }
 
     private void findAccessibilityNodeInfosByTextUiThread(Message message) {
@@ -375,31 +328,14 @@
                 }
             }
         } finally {
-            try {
-                mViewRootImpl.mAttachInfo.mAccessibilityFetchFlags = 0;
-                applyAppScaleAndMagnificationSpecIfNeeded(infos, spec);
-                // Recycle if called from another process. Specs are cached in the
-                // system process and obtained from a pool when read from parcel.
-                if (spec != null && android.os.Process.myPid() != Binder.getCallingPid()) {
-                    spec.recycle();
-                }
-                adjustIsVisibleToUserIfNeeded(infos, interactiveRegion);
-                callback.setFindAccessibilityNodeInfosResult(infos, interactionId);
-            } catch (RemoteException re) {
-                /* ignore - the other side will time out */
-            }
-
-            // Recycle if called from the same process. Regions are obtained in
-            // the system process and instantiated  when read from parcel.
-            if (interactiveRegion != null && android.os.Process.myPid() == Binder.getCallingPid()) {
-                interactiveRegion.recycle();
-            }
+            updateInfosForViewportAndReturnFindNodeResult(
+                    infos, callback, interactionId, spec, interactiveRegion);
         }
     }
 
     public void findFocusClientThread(long accessibilityNodeId, int focusType,
             Region interactiveRegion, int interactionId,
-            IAccessibilityInteractionConnectionCallback callback, int flags, int interogatingPid,
+            IAccessibilityInteractionConnectionCallback callback, int flags, int interrogatingPid,
             long interrogatingTid, MagnificationSpec spec) {
         Message message = mHandler.obtainMessage();
         message.what = PrivateHandler.MSG_FIND_FOCUS;
@@ -416,16 +352,7 @@
 
         message.obj = args;
 
-        // If the interrogation is performed by the same thread as the main UI
-        // thread in this process, set the message as a static reference so
-        // after this call completes the same thread but in the interrogating
-        // client can handle the message to generate the result.
-        if (interogatingPid == mMyProcessId && interrogatingTid == mMyLooperThreadId) {
-            AccessibilityInteractionClient.getInstanceForThread(
-                    interrogatingTid).setSameThreadMessage(message);
-        } else {
-            mHandler.sendMessage(message);
-        }
+        scheduleMessage(message, interrogatingPid, interrogatingTid);
     }
 
     private void findFocusUiThread(Message message) {
@@ -497,31 +424,14 @@
                 }
             }
         } finally {
-            try {
-                mViewRootImpl.mAttachInfo.mAccessibilityFetchFlags = 0;
-                applyAppScaleAndMagnificationSpecIfNeeded(focused, spec);
-                // Recycle if called from another process. Specs are cached in the
-                // system process and obtained from a pool when read from parcel.
-                if (spec != null && android.os.Process.myPid() != Binder.getCallingPid()) {
-                    spec.recycle();
-                }
-                adjustIsVisibleToUserIfNeeded(focused, interactiveRegion);
-                callback.setFindAccessibilityNodeInfoResult(focused, interactionId);
-            } catch (RemoteException re) {
-                /* ignore - the other side will time out */
-            }
-
-            // Recycle if called from the same process. Regions are obtained in
-            // the system process and instantiated  when read from parcel.
-            if (interactiveRegion != null && android.os.Process.myPid() == Binder.getCallingPid()) {
-                interactiveRegion.recycle();
-            }
+            updateInfoForViewportAndReturnFindNodeResult(
+                    focused, callback, interactionId, spec, interactiveRegion);
         }
     }
 
     public void focusSearchClientThread(long accessibilityNodeId, int direction,
             Region interactiveRegion, int interactionId,
-            IAccessibilityInteractionConnectionCallback callback, int flags, int interogatingPid,
+            IAccessibilityInteractionConnectionCallback callback, int flags, int interrogatingPid,
             long interrogatingTid, MagnificationSpec spec) {
         Message message = mHandler.obtainMessage();
         message.what = PrivateHandler.MSG_FOCUS_SEARCH;
@@ -537,16 +447,7 @@
 
         message.obj = args;
 
-        // If the interrogation is performed by the same thread as the main UI
-        // thread in this process, set the message as a static reference so
-        // after this call completes the same thread but in the interrogating
-        // client can handle the message to generate the result.
-        if (interogatingPid == mMyProcessId && interrogatingTid == mMyLooperThreadId) {
-            AccessibilityInteractionClient.getInstanceForThread(
-                    interrogatingTid).setSameThreadMessage(message);
-        } else {
-            mHandler.sendMessage(message);
-        }
+        scheduleMessage(message, interrogatingPid, interrogatingTid);
     }
 
     private void focusSearchUiThread(Message message) {
@@ -582,31 +483,14 @@
                 }
             }
         } finally {
-            try {
-                mViewRootImpl.mAttachInfo.mAccessibilityFetchFlags = 0;
-                applyAppScaleAndMagnificationSpecIfNeeded(next, spec);
-                // Recycle if called from another process. Specs are cached in the
-                // system process and obtained from a pool when read from parcel.
-                if (spec != null && android.os.Process.myPid() != Binder.getCallingPid()) {
-                    spec.recycle();
-                }
-                adjustIsVisibleToUserIfNeeded(next, interactiveRegion);
-                callback.setFindAccessibilityNodeInfoResult(next, interactionId);
-            } catch (RemoteException re) {
-                /* ignore - the other side will time out */
-            }
-
-            // Recycle if called from the same process. Regions are obtained in
-            // the system process and instantiated  when read from parcel.
-            if (interactiveRegion != null && android.os.Process.myPid() == Binder.getCallingPid()) {
-                interactiveRegion.recycle();
-            }
+            updateInfoForViewportAndReturnFindNodeResult(
+                    next, callback, interactionId, spec, interactiveRegion);
         }
     }
 
     public void performAccessibilityActionClientThread(long accessibilityNodeId, int action,
             Bundle arguments, int interactionId,
-            IAccessibilityInteractionConnectionCallback callback, int flags, int interogatingPid,
+            IAccessibilityInteractionConnectionCallback callback, int flags, int interrogatingPid,
             long interrogatingTid) {
         Message message = mHandler.obtainMessage();
         message.what = PrivateHandler.MSG_PERFORM_ACCESSIBILITY_ACTION;
@@ -622,16 +506,7 @@
 
         message.obj = args;
 
-        // If the interrogation is performed by the same thread as the main UI
-        // thread in this process, set the message as a static reference so
-        // after this call completes the same thread but in the interrogating
-        // client can handle the message to generate the result.
-        if (interogatingPid == mMyProcessId && interrogatingTid == mMyLooperThreadId) {
-            AccessibilityInteractionClient.getInstanceForThread(
-                    interrogatingTid).setSameThreadMessage(message);
-        } else {
-            mHandler.sendMessage(message);
-        }
+        scheduleMessage(message, interrogatingPid, interrogatingTid);
     }
 
     private void performAccessibilityActionUiThread(Message message) {
@@ -742,26 +617,6 @@
         }
     }
 
-    private void applyAppScaleAndMagnificationSpecIfNeeded(Point point,
-            MagnificationSpec spec) {
-        final float applicationScale = mViewRootImpl.mAttachInfo.mApplicationScale;
-        if (!shouldApplyAppScaleAndMagnificationSpec(applicationScale, spec)) {
-            return;
-        }
-
-        if (applicationScale != 1.0f) {
-            point.x *= applicationScale;
-            point.y *= applicationScale;
-        }
-
-        if (spec != null) {
-            point.x *= spec.scale;
-            point.y *= spec.scale;
-            point.x += (int) spec.offsetX;
-            point.y += (int) spec.offsetY;
-        }
-    }
-
     private void applyAppScaleAndMagnificationSpecIfNeeded(AccessibilityNodeInfo info,
             MagnificationSpec spec) {
         if (info == null) {
@@ -791,6 +646,25 @@
         info.setBoundsInParent(boundsInParent);
         info.setBoundsInScreen(boundsInScreen);
 
+        // Scale text locations if they are present
+        if (info.hasExtras()) {
+            Bundle extras = info.getExtras();
+            Parcelable[] textLocations =
+                    extras.getParcelableArray(EXTRA_DATA_TEXT_CHARACTER_LOCATION_KEY);
+            if (textLocations != null) {
+                for (int i = 0; i < textLocations.length; i++) {
+                    // Unchecked cast - an app that puts other objects in this bundle with this
+                    // key will crash.
+                    RectF textLocation = ((RectF) textLocations[i]);
+                    textLocation.scale(applicationScale);
+                    if (spec != null) {
+                        textLocation.scale(spec.scale);
+                        textLocation.offset(spec.offsetX, spec.offsetY);
+                    }
+                }
+            }
+        }
+
         if (spec != null) {
             AttachInfo attachInfo = mViewRootImpl.mAttachInfo;
             if (attachInfo.mDisplay == null) {
@@ -829,6 +703,53 @@
         return (appScale != 1.0f || (spec != null && !spec.isNop()));
     }
 
+    private void updateInfosForViewportAndReturnFindNodeResult(List<AccessibilityNodeInfo> infos,
+            IAccessibilityInteractionConnectionCallback callback, int interactionId,
+            MagnificationSpec spec, Region interactiveRegion) {
+        try {
+            mViewRootImpl.mAttachInfo.mAccessibilityFetchFlags = 0;
+            applyAppScaleAndMagnificationSpecIfNeeded(infos, spec);
+            adjustIsVisibleToUserIfNeeded(infos, interactiveRegion);
+            callback.setFindAccessibilityNodeInfosResult(infos, interactionId);
+            infos.clear();
+        } catch (RemoteException re) {
+            /* ignore - the other side will time out */
+        } finally {
+            recycleMagnificationSpecAndRegionIfNeeded(spec, interactiveRegion);
+        }
+    }
+
+    private void updateInfoForViewportAndReturnFindNodeResult(AccessibilityNodeInfo info,
+            IAccessibilityInteractionConnectionCallback callback, int interactionId,
+            MagnificationSpec spec, Region interactiveRegion) {
+        try {
+            mViewRootImpl.mAttachInfo.mAccessibilityFetchFlags = 0;
+            applyAppScaleAndMagnificationSpecIfNeeded(info, spec);
+            adjustIsVisibleToUserIfNeeded(info, interactiveRegion);
+            callback.setFindAccessibilityNodeInfoResult(info, interactionId);
+        } catch (RemoteException re) {
+                /* ignore - the other side will time out */
+        } finally {
+            recycleMagnificationSpecAndRegionIfNeeded(spec, interactiveRegion);
+        }
+    }
+
+    private void recycleMagnificationSpecAndRegionIfNeeded(MagnificationSpec spec, Region region) {
+        if (android.os.Process.myPid() != Binder.getCallingPid()) {
+            // Specs are cached in the system process and obtained from a pool when read from
+            // a parcel, so only recycle the spec if called from another process.
+            if (spec != null) {
+                spec.recycle();
+            }
+        } else {
+            // Regions are obtained in the system process and instantiated when read from
+            // a parcel, so only recycle the region if caled from the same process.
+            if (region != null) {
+                region.recycle();
+            }
+        }
+    }
+
     private boolean handleClickableSpanActionUiThread(
             View view, int virtualDescendantId, Bundle arguments) {
         Parcelable span = arguments.getParcelable(ACTION_ARGUMENT_ACCESSIBLE_CLICKABLE_SPAN);
@@ -872,11 +793,18 @@
         private final ArrayList<View> mTempViewList = new ArrayList<View>();
 
         public void prefetchAccessibilityNodeInfos(View view, int virtualViewId, int fetchFlags,
-                List<AccessibilityNodeInfo> outInfos) {
+                List<AccessibilityNodeInfo> outInfos, Bundle arguments) {
             AccessibilityNodeProvider provider = view.getAccessibilityNodeProvider();
+            // Determine if we'll be populating extra data
+            final String extraDataRequested = (arguments == null) ? null
+                    : arguments.getString(AccessibilityNodeInfo.EXTRA_DATA_REQUESTED_KEY);
             if (provider == null) {
                 AccessibilityNodeInfo root = view.createAccessibilityNodeInfo();
                 if (root != null) {
+                    if (extraDataRequested != null) {
+                        view.addExtraDataToAccessibilityNodeInfo(
+                                root, extraDataRequested, arguments);
+                    }
                     outInfos.add(root);
                     if ((fetchFlags & AccessibilityNodeInfo.FLAG_PREFETCH_PREDECESSORS) != 0) {
                         prefetchPredecessorsOfRealNode(view, outInfos);
@@ -889,14 +817,14 @@
                     }
                 }
             } else {
-                final AccessibilityNodeInfo root;
-                if (virtualViewId != AccessibilityNodeInfo.UNDEFINED_ITEM_ID) {
-                    root = provider.createAccessibilityNodeInfo(virtualViewId);
-                } else {
-                    root = provider.createAccessibilityNodeInfo(
-                            AccessibilityNodeProvider.HOST_VIEW_ID);
-                }
+                final int idForRoot = (virtualViewId == AccessibilityNodeInfo.UNDEFINED_ITEM_ID)
+                        ? AccessibilityNodeProvider.HOST_VIEW_ID : virtualViewId;
+                final AccessibilityNodeInfo root = provider.createAccessibilityNodeInfo(idForRoot);
                 if (root != null) {
+                    if (extraDataRequested != null) {
+                        provider.addExtraDataToAccessibilityNodeInfo(
+                                idForRoot, root, extraDataRequested, arguments);
+                    }
                     outInfos.add(root);
                     if ((fetchFlags & AccessibilityNodeInfo.FLAG_PREFETCH_PREDECESSORS) != 0) {
                         prefetchPredecessorsOfVirtualNode(root, view, provider, outInfos);
@@ -1202,12 +1130,12 @@
     }
 
     private class PrivateHandler extends Handler {
-        private final static int MSG_PERFORM_ACCESSIBILITY_ACTION = 1;
-        private final static int MSG_FIND_ACCESSIBILITY_NODE_INFO_BY_ACCESSIBILITY_ID = 2;
-        private final static int MSG_FIND_ACCESSIBILITY_NODE_INFOS_BY_VIEW_ID = 3;
-        private final static int MSG_FIND_ACCESSIBILITY_NODE_INFO_BY_TEXT = 4;
-        private final static int MSG_FIND_FOCUS = 5;
-        private final static int MSG_FOCUS_SEARCH = 6;
+        private static final int MSG_PERFORM_ACCESSIBILITY_ACTION = 1;
+        private static final int MSG_FIND_ACCESSIBILITY_NODE_INFO_BY_ACCESSIBILITY_ID = 2;
+        private static final int MSG_FIND_ACCESSIBILITY_NODE_INFOS_BY_VIEW_ID = 3;
+        private static final int MSG_FIND_ACCESSIBILITY_NODE_INFO_BY_TEXT = 4;
+        private static final int MSG_FIND_FOCUS = 5;
+        private static final int MSG_FOCUS_SEARCH = 6;
 
         public PrivateHandler(Looper looper) {
             super(looper);
@@ -1277,7 +1205,7 @@
         }
 
         @Override
-        public boolean apply(View view) {
+        public boolean test(View view) {
             if (view.getId() == mViewId && isShown(view)) {
                 mInfos.add(view.createAccessibilityNodeInfo());
             }
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/FocusFinder.java b/core/java/android/view/FocusFinder.java
index 41a13cf..7fde8a6 100644
--- a/core/java/android/view/FocusFinder.java
+++ b/core/java/android/view/FocusFinder.java
@@ -52,7 +52,9 @@
     final Rect mFocusedRect = new Rect();
     final Rect mOtherRect = new Rect();
     final Rect mBestCandidateRect = new Rect();
-    final SequentialFocusComparator mSequentialFocusComparator = new SequentialFocusComparator();
+    private final UserSpecifiedFocusComparator mUserSpecifiedFocusComparator =
+            new UserSpecifiedFocusComparator();
+    private final FocusComparator mFocusComparator = new FocusComparator();
 
     private final ArrayList<View> mTempList = new ArrayList<View>();
 
@@ -225,12 +227,10 @@
             View focused, Rect focusedRect, int direction) {
         try {
             // Note: This sort is stable.
-            mSequentialFocusComparator.setRoot(root);
-            mSequentialFocusComparator.setIsLayoutRtl(root.isLayoutRtl());
-            mSequentialFocusComparator.setFocusables(focusables);
-            Collections.sort(focusables, mSequentialFocusComparator);
+            mUserSpecifiedFocusComparator.setFocusables(focusables);
+            Collections.sort(focusables, mUserSpecifiedFocusComparator);
         } finally {
-            mSequentialFocusComparator.recycle();
+            mUserSpecifiedFocusComparator.recycle();
         }
 
         final int count = focusables.size();
@@ -703,36 +703,80 @@
         return id != 0 && id != View.NO_ID;
     }
 
-    /**
-     * Sorts views according to their visual layout and geometry for default tab order.
-     * If views are part of a focus chain (nextFocusForwardId), then they are all grouped
-     * together. The head of the chain is used to determine the order of the chain and is
-     * first in the order and the tail of the chain is the last in the order. The views
-     * in the middle of the chain can be arbitrary order.
-     * This is used for sequential focus traversal.
-     */
-    private static final class SequentialFocusComparator implements Comparator<View> {
+    static FocusComparator getFocusComparator(ViewGroup root, boolean isRtl) {
+        FocusComparator comparator = getInstance().mFocusComparator;
+        comparator.setRoot(root);
+        comparator.setIsLayoutRtl(isRtl);
+        return comparator;
+    }
+
+    static final class FocusComparator implements Comparator<View> {
         private final Rect mFirstRect = new Rect();
         private final Rect mSecondRect = new Rect();
-        private ViewGroup mRoot;
+        private ViewGroup mRoot = null;
         private boolean mIsLayoutRtl;
-        private final SparseArray<View> mFocusables = new SparseArray<View>();
-        private final SparseBooleanArray mIsConnectedTo = new SparseBooleanArray();
-        private final ArrayMap<View, View> mHeadsOfChains = new ArrayMap<View, View>();
 
-        public void recycle() {
-            mRoot = null;
-            mFocusables.clear();
-            mHeadsOfChains.clear();
-            mIsConnectedTo.clear();
+        public void setIsLayoutRtl(boolean b) {
+            mIsLayoutRtl = b;
         }
 
         public void setRoot(ViewGroup root) {
             mRoot = root;
         }
 
-        public void setIsLayoutRtl(boolean b) {
-            mIsLayoutRtl = b;
+        public int compare(View first, View second) {
+            if (first == second) {
+                return 0;
+            }
+
+            getRect(first, mFirstRect);
+            getRect(second, mSecondRect);
+
+            if (mFirstRect.top < mSecondRect.top) {
+                return -1;
+            } else if (mFirstRect.top > mSecondRect.top) {
+                return 1;
+            } else if (mFirstRect.left < mSecondRect.left) {
+                return mIsLayoutRtl ? 1 : -1;
+            } else if (mFirstRect.left > mSecondRect.left) {
+                return mIsLayoutRtl ? -1 : 1;
+            } else if (mFirstRect.bottom < mSecondRect.bottom) {
+                return -1;
+            } else if (mFirstRect.bottom > mSecondRect.bottom) {
+                return 1;
+            } else if (mFirstRect.right < mSecondRect.right) {
+                return mIsLayoutRtl ? 1 : -1;
+            } else if (mFirstRect.right > mSecondRect.right) {
+                return mIsLayoutRtl ? -1 : 1;
+            } else {
+                // The view are distinct but completely coincident so we consider
+                // them equal for our purposes.  Since the sort is stable, this
+                // means that the views will retain their layout order relative to one another.
+                return 0;
+            }
+        }
+
+        private void getRect(View view, Rect rect) {
+            view.getDrawingRect(rect);
+            mRoot.offsetDescendantRectToMyCoords(view, rect);
+        }
+    }
+
+    /**
+     * Sorts views according to any explicitly-specified focus-chains. If there are no explicitly
+     * specified focus chains (eg. no nextFocusForward attributes defined), this should be a no-op.
+     */
+    private static final class UserSpecifiedFocusComparator implements Comparator<View> {
+        private final SparseArray<View> mFocusables = new SparseArray<View>();
+        private final SparseBooleanArray mIsConnectedTo = new SparseBooleanArray();
+        private final ArrayMap<View, View> mHeadsOfChains = new ArrayMap<View, View>();
+        private final ArrayMap<View, Integer> mOriginalOrdinal = new ArrayMap<>();
+
+        public void recycle() {
+            mFocusables.clear();
+            mHeadsOfChains.clear();
+            mIsConnectedTo.clear();
+            mOriginalOrdinal.clear();
         }
 
         public void setFocusables(ArrayList<View> focusables) {
@@ -755,6 +799,10 @@
                     setHeadOfChain(view);
                 }
             }
+
+            for (int i = 0; i < focusables.size(); ++i) {
+                mOriginalOrdinal.put(focusables.get(i), i);
+            }
         }
 
         private void setHeadOfChain(View head) {
@@ -793,44 +841,22 @@
                     return 1; // first is end of chain
                 }
             }
+            boolean involvesChain = false;
             if (firstHead != null) {
                 first = firstHead;
+                involvesChain = true;
             }
             if (secondHead != null) {
                 second = secondHead;
+                involvesChain = true;
             }
 
-            // First see if they belong to the same focus chain.
-            getRect(first, mFirstRect);
-            getRect(second, mSecondRect);
-
-            if (mFirstRect.top < mSecondRect.top) {
-                return -1;
-            } else if (mFirstRect.top > mSecondRect.top) {
-                return 1;
-            } else if (mFirstRect.left < mSecondRect.left) {
-                return mIsLayoutRtl ? 1 : -1;
-            } else if (mFirstRect.left > mSecondRect.left) {
-                return mIsLayoutRtl ? -1 : 1;
-            } else if (mFirstRect.bottom < mSecondRect.bottom) {
-                return -1;
-            } else if (mFirstRect.bottom > mSecondRect.bottom) {
-                return 1;
-            } else if (mFirstRect.right < mSecondRect.right) {
-                return mIsLayoutRtl ? 1 : -1;
-            } else if (mFirstRect.right > mSecondRect.right) {
-                return mIsLayoutRtl ? -1 : 1;
+            if (involvesChain) {
+                // keep original order between chains
+                return mOriginalOrdinal.get(first) < mOriginalOrdinal.get(second) ? -1 : 1;
             } else {
-                // The view are distinct but completely coincident so we consider
-                // them equal for our purposes.  Since the sort is stable, this
-                // means that the views will retain their layout order relative to one another.
                 return 0;
             }
         }
-
-        private void getRect(View view, Rect rect) {
-            view.getDrawingRect(rect);
-            mRoot.offsetDescendantRectToMyCoords(view, rect);
-        }
     }
 }
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/HardwareLayer.java b/core/java/android/view/HardwareLayer.java
index 41c44f1..7af1020 100644
--- a/core/java/android/view/HardwareLayer.java
+++ b/core/java/android/view/HardwareLayer.java
@@ -132,7 +132,7 @@
     }
 
     public void setSurfaceTexture(SurfaceTexture surface) {
-        nSetSurfaceTexture(mFinalizer.get(), surface, false);
+        nSetSurfaceTexture(mFinalizer.get(), surface);
         mRenderer.pushLayerUpdate(this);
     }
 
@@ -148,7 +148,6 @@
     private static native boolean nPrepare(long layerUpdater, int width, int height, boolean isOpaque);
     private static native void nSetLayerPaint(long layerUpdater, long paint);
     private static native void nSetTransform(long layerUpdater, long matrix);
-    private static native void nSetSurfaceTexture(long layerUpdater,
-            SurfaceTexture surface, boolean isAlreadyAttached);
+    private static native void nSetSurfaceTexture(long layerUpdater, SurfaceTexture surface);
     private static native void nUpdateSurfaceTexture(long layerUpdater);
 }
diff --git a/core/java/android/view/IPinnedStackController.aidl b/core/java/android/view/IPinnedStackController.aidl
index d59be02..2fe98c0 100644
--- a/core/java/android/view/IPinnedStackController.aidl
+++ b/core/java/android/view/IPinnedStackController.aidl
@@ -16,8 +16,6 @@
 
 package android.view;
 
-import android.graphics.Rect;
-
 /**
  * An interface to the PinnedStackController to update it of state changes, and to query
  * information based on the current state.
@@ -27,17 +25,7 @@
 interface IPinnedStackController {
 
     /**
-     * Notifies the controller that the user is currently interacting with the PIP.
-     */
-    oneway void setInInteractiveMode(boolean inInteractiveMode);
-
-    /**
-     * Notifies the controller that the PIP is currently minimized.
+     * Notifies the controller that the PiP is currently minimized.
      */
     oneway void setIsMinimized(boolean isMinimized);
-
-    /**
-     * Notifies the controller that the desired snap mode is to the closest edge.
-     */
-    oneway void setSnapToEdge(boolean snapToEdge);
 }
diff --git a/core/java/android/view/IPinnedStackListener.aidl b/core/java/android/view/IPinnedStackListener.aidl
index 3c348c5..c7340bf 100644
--- a/core/java/android/view/IPinnedStackListener.aidl
+++ b/core/java/android/view/IPinnedStackListener.aidl
@@ -17,6 +17,7 @@
 package android.view;
 
 import android.content.pm.ParceledListSlice;
+import android.graphics.Rect;
 import android.view.IPinnedStackController;
 
 /**
@@ -33,10 +34,22 @@
     void onListenerRegistered(IPinnedStackController controller);
 
     /**
-     * Called when window manager decides to adjust the pinned stack bounds, or when the listener
-     * is first registered to allow the listener to synchronized its state with the controller.
+     * Called when the window manager has detected a change that would cause the movement bounds
+     * to be changed (ie. after configuration change, aspect ratio change, etc). It then provides
+     * the components that allow the listener to calculate the movement bounds itself. The
+     * {@param normalBounds} are also the default bounds that the PiP would be entered in its
+     * current state with the aspect ratio applied.
      */
-    void onBoundsChanged(boolean adjustedForIme);
+    void onMovementBoundsChanged(in Rect insetBounds, in Rect normalBounds,
+            boolean fromImeAdjustement);
+
+    /**
+     * Called when window manager decides to adjust the pinned stack bounds because of the IME, or
+     * when the listener is first registered to allow the listener to synchronized its state with
+     * the controller.  This call will always be followed by a onMovementBoundsChanged() call
+     * with fromImeAdjustement set to true.
+     */
+    void onImeVisibilityChanged(boolean imeVisible, int imeHeight);
 
     /**
      * Called when window manager decides to adjust the minimized state, or when the listener
@@ -45,14 +58,6 @@
     void onMinimizedStateChanged(boolean isMinimized);
 
     /**
-     * Called when window manager decides to adjust the snap-to-edge state, which determines whether
-     * to snap only to the corners of the screen or to the closest edge.  It is called when the
-     * listener is first registered to allow the listener to synchronized its state with the
-     * controller.
-     */
-    void onSnapToEdgeStateChanged(boolean isSnapToEdge);
-
-    /**
      * Called when the set of actions for the current PiP activity changes, or when the listener
      * is first registered to allow the listener to synchronized its state with the controller.
      */
diff --git a/core/java/android/view/IWindowManager.aidl b/core/java/android/view/IWindowManager.aidl
index c789f8c..dd76fcf 100644
--- a/core/java/android/view/IWindowManager.aidl
+++ b/core/java/android/view/IWindowManager.aidl
@@ -337,16 +337,6 @@
     void registerPinnedStackListener(int displayId, IPinnedStackListener listener);
 
     /**
-     * Returns the initial bounds that PIP will be shown when it is first started.
-     */
-    Rect getPictureInPictureDefaultBounds(int displayId);
-
-    /**
-     * Returns the bounds that the PIP can move on the screen in the current PIP state.
-     */
-    Rect getPictureInPictureMovementBounds(int displayId);
-
-    /**
      * Updates the dim layer used while resizing.
      *
      * @param visible Whether the dim layer should be visible.
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..5f55bdc 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.
@@ -1000,7 +1008,6 @@
      * </p>
      *
      * @see #getAxisValue(int, int)
-     * {@hide}
      */
     public static final int AXIS_SCROLL = 26;
 
@@ -1582,9 +1589,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 +1630,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 +1758,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 +2064,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 +2084,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 +2168,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 +2182,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 +2242,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 +2256,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 +2270,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 +2286,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 +2302,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 +2341,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 +2629,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 +2659,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 +2737,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 +2755,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 +2763,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 +2773,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 +2791,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 +2809,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 +2827,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 +2845,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 +2878,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 +2893,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 +2950,7 @@
         float oldY = getY();
         offsetLocation(x - oldX, y - oldY);
     }
-    
+
     /**
      * Applies a transformation matrix to all of the points in the event.
      *
@@ -3427,11 +3434,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 +3478,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 +3496,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 +3509,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 +3519,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 +3529,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 +3541,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 +3553,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/NotificationHeaderView.java b/core/java/android/view/NotificationHeaderView.java
index 0da710a..c3d3f39 100644
--- a/core/java/android/view/NotificationHeaderView.java
+++ b/core/java/android/view/NotificationHeaderView.java
@@ -17,6 +17,7 @@
 package android.view;
 
 import android.annotation.Nullable;
+import android.app.Notification;
 import android.content.Context;
 import android.graphics.Canvas;
 import android.graphics.Outline;
@@ -39,7 +40,7 @@
  */
 @RemoteViews.RemoteView
 public class NotificationHeaderView extends ViewGroup {
-    public static final int NO_COLOR = -1;
+    public static final int NO_COLOR = Notification.COLOR_INVALID;
     private final int mChildMinWidth;
     private final int mContentEndMargin;
     private View mAppName;
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index e2eee95..ef5dc33 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -16,12 +16,6 @@
 
 package android.view;
 
-import static android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH;
-import static android.os.Build.VERSION_CODES.JELLY_BEAN_MR1;
-import static android.os.Build.VERSION_CODES.KITKAT;
-import static android.os.Build.VERSION_CODES.M;
-import static android.os.Build.VERSION_CODES.N;
-
 import static java.lang.Math.max;
 
 import android.animation.AnimatorInflater;
@@ -67,7 +61,7 @@
 import android.graphics.drawable.ColorDrawable;
 import android.graphics.drawable.Drawable;
 import android.hardware.display.DisplayManagerGlobal;
-import android.os.Build.VERSION_CODES;
+import android.os.Build;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.IBinder;
@@ -106,7 +100,6 @@
 import android.view.autofill.AutoFillManager;
 import android.view.autofill.AutoFillType;
 import android.view.autofill.AutoFillValue;
-import android.view.autofill.VirtualViewDelegate;
 import android.view.inputmethod.EditorInfo;
 import android.view.inputmethod.InputConnection;
 import android.view.inputmethod.InputMethodManager;
@@ -115,7 +108,6 @@
 import android.widget.ScrollBarDrawable;
 
 import com.android.internal.R;
-import com.android.internal.util.Predicate;
 import com.android.internal.view.TooltipPopup;
 import com.android.internal.view.menu.MenuBuilder;
 import com.android.internal.widget.ScrollBarUtils;
@@ -140,6 +132,7 @@
 import java.util.Map;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.util.function.Predicate;
 
 /**
  * <p>
@@ -857,6 +850,25 @@
      */
     static boolean sCascadedDragDrop;
 
+    /**
+     * Prior to O, auto-focusable didn't exist and widgets such as ListView use hasFocusable
+     * to determine things like whether or not to permit item click events. We can't break
+     * apps that do this just because more things (clickable things) are now auto-focusable
+     * and they would get different results, so give old behavior to old apps.
+     */
+    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)
@@ -4143,40 +4155,45 @@
             final int targetSdkVersion = context.getApplicationInfo().targetSdkVersion;
 
             // Older apps may need this compatibility hack for measurement.
-            sUseBrokenMakeMeasureSpec = targetSdkVersion <= JELLY_BEAN_MR1;
+            sUseBrokenMakeMeasureSpec = targetSdkVersion <= Build.VERSION_CODES.JELLY_BEAN_MR1;
 
             // Older apps expect onMeasure() to always be called on a layout pass, regardless
             // of whether a layout was requested on that View.
-            sIgnoreMeasureCache = targetSdkVersion < KITKAT;
+            sIgnoreMeasureCache = targetSdkVersion < Build.VERSION_CODES.KITKAT;
 
-            Canvas.sCompatibilityRestore = targetSdkVersion < M;
+            Canvas.sCompatibilityRestore = targetSdkVersion < Build.VERSION_CODES.M;
 
             // In M and newer, our widgets can pass a "hint" value in the size
             // for UNSPECIFIED MeasureSpecs. This lets child views of scrolling containers
             // know what the expected parent size is going to be, so e.g. list items can size
             // themselves at 1/3 the size of their container. It breaks older apps though,
             // specifically apps that use some popular open source libraries.
-            sUseZeroUnspecifiedMeasureSpec = targetSdkVersion < M;
+            sUseZeroUnspecifiedMeasureSpec = targetSdkVersion < Build.VERSION_CODES.M;
 
             // Old versions of the platform would give different results from
             // LinearLayout measurement passes using EXACTLY and non-EXACTLY
             // modes, so we always need to run an additional EXACTLY pass.
-            sAlwaysRemeasureExactly = targetSdkVersion <= M;
+            sAlwaysRemeasureExactly = targetSdkVersion <= Build.VERSION_CODES.M;
 
             // Prior to N, layout params could change without requiring a
             // subsequent call to setLayoutParams() and they would usually
             // work. Partial layout breaks this assumption.
-            sLayoutParamsAlwaysChanged = targetSdkVersion <= M;
+            sLayoutParamsAlwaysChanged = targetSdkVersion <= Build.VERSION_CODES.M;
 
             // Prior to N, TextureView would silently ignore calls to setBackground/setForeground.
             // On N+, we throw, but that breaks compatibility with apps that use these methods.
-            sTextureViewIgnoresDrawableSetters = targetSdkVersion <= M;
+            sTextureViewIgnoresDrawableSetters = targetSdkVersion <= Build.VERSION_CODES.M;
 
             // Prior to N, we would drop margins in LayoutParam conversions. The fix triggers bugs
             // in apps so we target check it to avoid breaking existing apps.
-            sPreserveMarginParamsInLayoutParamConversion = targetSdkVersion >= N;
+            sPreserveMarginParamsInLayoutParamConversion =
+                    targetSdkVersion >= Build.VERSION_CODES.N;
 
-            sCascadedDragDrop = targetSdkVersion < N;
+            sCascadedDragDrop = targetSdkVersion < Build.VERSION_CODES.N;
+
+            sHasFocusableExcludeAutoFocusable = targetSdkVersion < Build.VERSION_CODES.O;
+
+            sAutoFocusableOffUIThreadWontNotifyParents = targetSdkVersion < Build.VERSION_CODES.O;
 
             sCompatibilityDone = true;
         }
@@ -4525,7 +4542,7 @@
                     break;
                 //noinspection deprecation
                 case R.styleable.View_fadingEdge:
-                    if (targetSdkVersion >= ICE_CREAM_SANDWICH) {
+                    if (targetSdkVersion >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
                         // Ignore the attribute starting with ICS
                         break;
                     }
@@ -4663,27 +4680,27 @@
                             PROVIDER_BACKGROUND));
                     break;
                 case R.styleable.View_foreground:
-                    if (targetSdkVersion >= VERSION_CODES.M || this instanceof FrameLayout) {
+                    if (targetSdkVersion >= Build.VERSION_CODES.M || this instanceof FrameLayout) {
                         setForeground(a.getDrawable(attr));
                     }
                     break;
                 case R.styleable.View_foregroundGravity:
-                    if (targetSdkVersion >= VERSION_CODES.M || this instanceof FrameLayout) {
+                    if (targetSdkVersion >= Build.VERSION_CODES.M || this instanceof FrameLayout) {
                         setForegroundGravity(a.getInt(attr, Gravity.NO_GRAVITY));
                     }
                     break;
                 case R.styleable.View_foregroundTintMode:
-                    if (targetSdkVersion >= VERSION_CODES.M || this instanceof FrameLayout) {
+                    if (targetSdkVersion >= Build.VERSION_CODES.M || this instanceof FrameLayout) {
                         setForegroundTintMode(Drawable.parseTintMode(a.getInt(attr, -1), null));
                     }
                     break;
                 case R.styleable.View_foregroundTint:
-                    if (targetSdkVersion >= VERSION_CODES.M || this instanceof FrameLayout) {
+                    if (targetSdkVersion >= Build.VERSION_CODES.M || this instanceof FrameLayout) {
                         setForegroundTintList(a.getColorStateList(attr));
                     }
                     break;
                 case R.styleable.View_foregroundInsidePadding:
-                    if (targetSdkVersion >= VERSION_CODES.M || this instanceof FrameLayout) {
+                    if (targetSdkVersion >= Build.VERSION_CODES.M || this instanceof FrameLayout) {
                         if (mForegroundInfo == null) {
                             mForegroundInfo = new ForegroundInfo();
                         }
@@ -5369,16 +5386,16 @@
         x += getScrollX();
         y += getScrollY();
         if (isVerticalScrollBarEnabled() && !isVerticalScrollBarHidden()) {
-            final Rect bounds = mScrollCache.mScrollBarBounds;
-            getVerticalScrollBarBounds(bounds);
-            if (bounds.contains((int)x, (int)y)) {
+            final Rect touchBounds = mScrollCache.mScrollBarTouchBounds;
+            getVerticalScrollBarBounds(null, touchBounds);
+            if (touchBounds.contains((int) x, (int) y)) {
                 return true;
             }
         }
         if (isHorizontalScrollBarEnabled()) {
-            final Rect bounds = mScrollCache.mScrollBarBounds;
-            getHorizontalScrollBarBounds(bounds);
-            if (bounds.contains((int)x, (int)y)) {
+            final Rect touchBounds = mScrollCache.mScrollBarTouchBounds;
+            getHorizontalScrollBarBounds(null, touchBounds);
+            if (touchBounds.contains((int) x, (int) y)) {
                 return true;
             }
         }
@@ -5397,7 +5414,8 @@
             x += getScrollX();
             y += getScrollY();
             final Rect bounds = mScrollCache.mScrollBarBounds;
-            getVerticalScrollBarBounds(bounds);
+            final Rect touchBounds = mScrollCache.mScrollBarTouchBounds;
+            getVerticalScrollBarBounds(bounds, touchBounds);
             final int range = computeVerticalScrollRange();
             final int offset = computeVerticalScrollOffset();
             final int extent = computeVerticalScrollExtent();
@@ -5406,8 +5424,9 @@
             final int thumbOffset = ScrollBarUtils.getThumbOffset(bounds.height(), thumbLength,
                     extent, range, offset);
             final int thumbTop = bounds.top + thumbOffset;
-            if (x >= bounds.left && x <= bounds.right && y >= thumbTop
-                    && y <= thumbTop + thumbLength) {
+            final int adjust = Math.max(mScrollCache.scrollBarMinTouchTarget - thumbLength, 0) / 2;
+            if (x >= touchBounds.left && x <= touchBounds.right
+                    && y >= thumbTop - adjust && y <= thumbTop + thumbLength + adjust) {
                 return true;
             }
         }
@@ -5422,7 +5441,8 @@
             x += getScrollX();
             y += getScrollY();
             final Rect bounds = mScrollCache.mScrollBarBounds;
-            getHorizontalScrollBarBounds(bounds);
+            final Rect touchBounds = mScrollCache.mScrollBarTouchBounds;
+            getHorizontalScrollBarBounds(bounds, touchBounds);
             final int range = computeHorizontalScrollRange();
             final int offset = computeHorizontalScrollOffset();
             final int extent = computeHorizontalScrollExtent();
@@ -5431,8 +5451,9 @@
             final int thumbOffset = ScrollBarUtils.getThumbOffset(bounds.width(), thumbLength,
                     extent, range, offset);
             final int thumbLeft = bounds.left + thumbOffset;
-            if (x >= thumbLeft && x <= thumbLeft + thumbLength && y >= bounds.top
-                    && y <= bounds.bottom) {
+            final int adjust = Math.max(mScrollCache.scrollBarMinTouchTarget - thumbLength, 0) / 2;
+            if (x >= thumbLeft - adjust && x <= thumbLeft + thumbLength + adjust
+                    && y >= touchBounds.top && y <= touchBounds.bottom) {
                 return true;
             }
         }
@@ -6121,9 +6142,7 @@
 
             if (mParent != null) {
                 mParent.requestChildFocus(this, this);
-                if (mParent instanceof ViewGroup) {
-                    ((ViewGroup) mParent).setDefaultFocus(this);
-                }
+                setFocusedInCluster();
             }
 
             if (mAttachInfo != null) {
@@ -6344,26 +6363,51 @@
 
     /**
      * Returns true if this view is focusable or if it contains a reachable View
-     * for which {@link #hasFocusable()} returns true. A "reachable hasFocusable()"
-     * is a View whose parents do not block descendants focus.
-     *
+     * for which {@link #hasFocusable()} returns {@code true}. A "reachable hasFocusable()"
+     * is a view whose parents do not block descendants focus.
      * Only {@link #VISIBLE} views are considered focusable.
      *
-     * @return True if the view is focusable or if the view contains a focusable
-     *         View, false otherwise.
+     * <p>As of {@link Build.VERSION_CODES#O} views that are determined to be focusable
+     * through {@link #FOCUSABLE_AUTO} will also cause this method to return {@code true}.
+     * Apps that declare a {@link android.content.pm.ApplicationInfo#targetSdkVersion} of
+     * earlier than {@link Build.VERSION_CODES#O} will continue to see this method return
+     * {@code false} for views not explicitly marked as focusable.
+     * Use {@link #hasExplicitFocusable()} if you require the pre-{@link Build.VERSION_CODES#O}
+     * behavior.</p>
+     *
+     * @return {@code true} if the view is focusable or if the view contains a focusable
+     *         view, {@code false} otherwise
      *
      * @see ViewGroup#FOCUS_BLOCK_DESCENDANTS
      * @see ViewGroup#getTouchscreenBlocksFocus()
+     * @see #hasExplicitFocusable()
      */
     public boolean hasFocusable() {
-        return hasFocusable(true);
+        return hasFocusable(!sHasFocusableExcludeAutoFocusable, false);
     }
 
     /**
-     * @hide pending determination of whether this should be public or not.
-     * Currently used for compatibility with old focusability expectations in ListView.
+     * Returns true if this view is focusable or if it contains a reachable View
+     * for which {@link #hasExplicitFocusable()} returns {@code true}.
+     * A "reachable hasExplicitFocusable()" is a view whose parents do not block descendants focus.
+     * Only {@link #VISIBLE} views for which {@link #getFocusable()} would return
+     * {@link #FOCUSABLE} are considered focusable.
+     *
+     * <p>This method preserves the pre-{@link Build.VERSION_CODES#O} behavior of
+     * {@link #hasFocusable()} in that only views explicitly set focusable will cause
+     * this method to return true. A view set to {@link #FOCUSABLE_AUTO} that resolves
+     * to focusable will not.</p>
+     *
+     * @return {@code true} if the view is focusable or if the view contains a focusable
+     *         view, {@code false} otherwise
+     *
+     * @see #hasFocusable()
      */
-    public boolean hasFocusable(boolean allowAutoFocus) {
+    public boolean hasExplicitFocusable() {
+        return hasFocusable(false, true);
+    }
+
+    boolean hasFocusable(boolean allowAutoFocus, boolean dispatchExplicit) {
         if (!isFocusableInTouchMode()) {
             for (ViewParent p = mParent; p instanceof ViewGroup; p = p.getParent()) {
                 final ViewGroup g = (ViewGroup) p;
@@ -6424,9 +6468,7 @@
         if (isAutoFillable()) {
             AutoFillManager afm = getAutoFillManager();
             if (afm != null) {
-                afm.updateAutoFillInput(this, gainFocus
-                        ? AutoFillManager.FLAG_UPDATE_UI_SHOW
-                        : AutoFillManager.FLAG_UPDATE_UI_HIDE);
+                afm.focusChanged(this, gainFocus);
             }
         }
 
@@ -6886,10 +6928,16 @@
     /**
      * Called when assist structure is being retrieved from a view as part of an auto-fill request.
      *
-     * <p>The structure must be filled according to the request type, which is set in the
-     * {@code flags} parameter - see the documentation on each flag for more details.
+     * <p>When implementing this method, subclasses must also:
      *
-     * @param structure Fill in with structured view data.  The default implementation
+     * <ol>
+     * <li>Implement {@link #autoFill(AutoFillValue)}, {@link #getAutoFillType()}
+     * and {@link #getAutoFillValue()}.
+     * <li>Call {@link android.view.autofill.AutoFillManager#virtualValueChanged(View, int,
+     * AutoFillValue)} when its value changed.
+     * </ol>
+     *
+     * @param structure Fill in with structured view data. The default implementation
      * fills in all data that can be inferred from the view itself.
      * @param flags optional flags (currently {@code 0}).
      */
@@ -6916,10 +6964,16 @@
         }
 
         if (forAutoFill) {
-            // The auto-fill id needs to be unique, but its value doesn't matter, so it's better to
-            // reuse the accessibility id to save space.
-            structure.setAutoFillId(getAccessibilityViewId());
-            structure.setAutoFillType(getAutoFillType());
+            final AutoFillType autoFillType = getAutoFillType();
+            // Don't need to fill auto-fill info if view does not support it.
+            // For example, only TextViews that are editable support auto-fill
+            if (autoFillType != null) {
+                // The auto-fill id needs to be unique, but its value doesn't matter, so it's better
+                // to reuse the accessibility id to save space.
+                structure.setAutoFillId(getAccessibilityViewId());
+                structure.setAutoFillType(autoFillType);
+                structure.setAutoFillValue(getAutoFillValue());
+            }
         }
 
         structure.setDimens(mLeft, mTop, mScrollX, mScrollY, mRight - mLeft, mBottom - mTop);
@@ -6979,12 +7033,22 @@
      * Called when assist structure is being retrieved from a view as part of an auto-fill request
      * to generate additional virtual structure under this view.
      *
-     * <p>The defaullt implementation uses {@link #getAccessibilityNodeProvider()} to try to
+     * <p>The default implementation uses {@link #getAccessibilityNodeProvider()} to try to
      * generate this from the view's virtual accessibility nodes, if any. You can override this
      * for a more optimal implementation providing this data.
      *
-     * <p>The structure must be filled according to the request type, which is set in the
-     * {@code flags} parameter - see the documentation on each flag for more details.
+     * <p>When implementing this method, subclasses must follow the rules below:
+     *
+     * <ol>
+     * <li>Also implement {@link #autoFillVirtual(int, AutoFillValue)} to auto-fill the virtual
+     * children.
+     * <li>Call {@link android.view.autofill.AutoFillManager#virtualFocusChanged(View, int, Rect,
+     * boolean)} when the focus inside the view changed.
+     * <li>Call {@link android.view.autofill.AutoFillManager#virtualValueChanged(View, int,
+     * AutoFillValue)} when the value of a child changed.
+     * <li>Call {@link android.view.autofill.AutoFillManager#reset()} when the auto-fill context
+     * of the view structure changed.
+     * </ol>
      *
      * @param structure Fill in with structured view data.
      * @param flags optional flags (currently {@code 0}).
@@ -7008,29 +7072,17 @@
     }
 
     /**
-     * Gets the {@link VirtualViewDelegate} responsible for auto-filling the virtual children of
-     * this view.
-     *
-     * <p>By default returns {@code null} but should be overridden when view provides a virtual
-     * hierachy on {@link #onProvideAutoFillVirtualStructure(ViewStructure, int)}.
-     */
-    @Nullable
-    public VirtualViewDelegate getAutoFillVirtualViewDelegate(
-            @SuppressWarnings("unused") VirtualViewDelegate.Callback callback) {
-        return null;
-    }
-
-    /**
      * Automatically fills the content of this view with the {@code value}.
      *
-     * <p>By default does nothing, but views should override it (and {@link #getAutoFillType()} to
-     * support the AutoFill Framework.
+     * <p>By default does nothing, but views should override it (and {@link #getAutoFillType()},
+     * {@link #getAutoFillValue()}, and {@link #onProvideAutoFillStructure(ViewStructure, int)}
+     * to support the AutoFill Framework.
      *
      * <p>Typically, it is implemented by:
      *
      * <ol>
-     * <li>Call the proper getter method on {@link AutoFillValue} to fetch the actual value.
-     * <li>Pass the actual value to the equivalent setter in the view.
+     * <li>Calling the proper getter method on {@link AutoFillValue} to fetch the actual value.
+     * <li>Passing the actual value to the equivalent setter in the view.
      * <ol>
      *
      * <p>For example, a text-field view would call:
@@ -7041,15 +7093,29 @@
      *     setText(text);
      * }
      * </pre>
+     *
+     * @param value value to be auto-filled.
      */
     public void autoFill(@SuppressWarnings("unused") AutoFillValue value) {
     }
 
     /**
-     * Describes the auto-fill type that should be used on calls to
-     * {@link #autoFill(AutoFillValue)} and
-     * {@link VirtualViewDelegate#autoFill(int, AutoFillValue)}.
+     * Automatically fills the content of a virtual view with the {@code value}
      *
+     * <p>See {@link #autoFill(AutoFillValue)} and
+     * {@link #onProvideAutoFillVirtualStructure(ViewStructure, int)} for more info.
+     *
+     * @param value value to be auto-filled.
+     * @param virtualId id identifying the virtual child inside the custom view.
+     */
+    public void autoFillVirtual(@SuppressWarnings("unused") int virtualId,
+            @SuppressWarnings("unused") AutoFillValue value) {
+    }
+
+    /**
+     * Describes the auto-fill type that should be used on calls to
+     * {@link #autoFill(AutoFillValue)} and {@link #autoFillVirtual(int, AutoFillValue)}.
+
      * <p>By default returns {@code null}, but views should override it (and
      * {@link #autoFill(AutoFillValue)} to support the AutoFill Framework.
      */
@@ -7058,6 +7124,18 @@
         return null;
     }
 
+    /**
+     * Gets the {@link View}'s current auto-fill value.
+     *
+     * <p>By default returns {@code null}, but views should override it,
+     * {@link #autoFill(AutoFillValue)}, and {@link #getAutoFillType()} to support the AutoFill
+     * Framework.
+     */
+    @Nullable
+    public AutoFillValue getAutoFillValue() {
+        return null;
+    }
+
     @Nullable
     private AutoFillManager getAutoFillManager() {
         return mContext.getSystemService(AutoFillManager.class);
@@ -7156,6 +7234,9 @@
         boolean blocked = forAutoFill ? isAutoFillBlocked() : isAssistBlocked();
         if (!blocked) {
             if (forAutoFill) {
+                // The auto-fill id needs to be unique, but its value doesn't matter,
+                // so it's better to reuse the accessibility id to save space.
+                structure.setAutoFillId(getAccessibilityViewId());
                 // NOTE: flags are not currently supported, hence 0
                 onProvideAutoFillStructure(structure, 0);
                 onProvideAutoFillVirtualStructure(structure, 0);
@@ -7318,6 +7399,25 @@
     }
 
     /**
+     * Adds extra data to an {@link AccessibilityNodeInfo} based on an explicit request for the
+     * additional data.
+     * <p>
+     * This method only needs overloading if the node is marked as having extra data available.
+     * </p>
+     *
+     * @param info The info to which to add the extra data
+     * @param extraDataKey A key specifying the type of extra data to add to the info. The
+     *                     extra data should be added to the {@link Bundle} returned by
+     *                     the info's {@link AccessibilityNodeInfo#getExtras} method.
+     * @param arguments A {@link Bundle} holding any arguments relevant for this request.
+     *
+     * @see AccessibilityNodeInfo#setExtraAvailableData
+     */
+    public void addExtraDataToAccessibilityNodeInfo(
+            AccessibilityNodeInfo info, String extraDataKey, Bundle arguments) {
+    }
+
+    /**
      * Determine the order in which this view will be drawn relative to its siblings for a11y
      *
      * @param info The info whose drawing order should be populated
@@ -8645,7 +8745,7 @@
     @ResolvedLayoutDir
     public int getLayoutDirection() {
         final int targetSdkVersion = getContext().getApplicationInfo().targetSdkVersion;
-        if (targetSdkVersion < JELLY_BEAN_MR1) {
+        if (targetSdkVersion < Build.VERSION_CODES.JELLY_BEAN_MR1) {
             mPrivateFlags2 |= PFLAG2_LAYOUT_DIRECTION_RESOLVED;
             return LAYOUT_DIRECTION_RESOLVED_DEFAULT;
         }
@@ -9160,6 +9260,19 @@
     }
 
     /**
+     * Sets this View as the one which receives focus the next time cluster navigation jumps
+     * to the cluster containing this View. This does NOT change focus even if the cluster
+     * containing this view is current.
+     *
+     * @hide
+     */
+    public void setFocusedInCluster() {
+        if (mParent instanceof ViewGroup) {
+            ((ViewGroup) mParent).setFocusInCluster(this);
+        }
+    }
+
+    /**
      * Returns whether this View should receive focus when the focus is restored for the view
      * hierarchy containing this view.
      * <p>
@@ -9205,7 +9318,7 @@
             if (isFocusedByDefault) {
                 ((ViewGroup) mParent).setDefaultFocus(this);
             } else {
-                ((ViewGroup) mParent).cleanDefaultFocus(this);
+                ((ViewGroup) mParent).clearDefaultFocus(this);
             }
         }
     }
@@ -9291,7 +9404,7 @@
                 final int id = mID;
                 return root.findViewByPredicateInsideOut(this, new Predicate<View>() {
                     @Override
-                    public boolean apply(View t) {
+                    public boolean test(View t) {
                         return t.mNextFocusForwardId == id;
                     }
                 });
@@ -9585,15 +9698,27 @@
     }
 
     /**
+     * Public for testing. This will request focus for whichever View was last focused within this
+     * cluster before a focus-jump out of it.
+     *
+     * @hide
+     */
+    public boolean restoreFocusInCluster(@FocusRealDirection int direction) {
+        // Prioritize focusableByDefault over algorithmic focus selection.
+        if (restoreDefaultFocus()) {
+            return true;
+        }
+        return requestFocus(direction);
+    }
+
+    /**
      * Gives focus to the default-focus view in the view hierarchy that has this view as a root.
      * If the default-focus view cannot be found, falls back to calling {@link #requestFocus(int)}.
-     * Nested keyboard navigation clusters are excluded from the hierarchy.
      *
-     * @param direction The direction of the focus
      * @return Whether this view or one of its descendants actually took focus
      */
-    public boolean restoreDefaultFocus(@FocusDirection int direction) {
-        return requestFocus(direction);
+    public boolean restoreDefaultFocus() {
+        return requestFocus(View.FOCUS_DOWN);
     }
 
     /**
@@ -11631,7 +11756,7 @@
                 if (mScrollCache.mScrollBarDraggingState
                         == ScrollabilityCache.DRAGGING_VERTICAL_SCROLL_BAR) {
                     final Rect bounds = mScrollCache.mScrollBarBounds;
-                    getVerticalScrollBarBounds(bounds);
+                    getVerticalScrollBarBounds(bounds, null);
                     final int range = computeVerticalScrollRange();
                     final int offset = computeVerticalScrollOffset();
                     final int extent = computeVerticalScrollExtent();
@@ -11660,7 +11785,7 @@
                 if (mScrollCache.mScrollBarDraggingState
                         == ScrollabilityCache.DRAGGING_HORIZONTAL_SCROLL_BAR) {
                     final Rect bounds = mScrollCache.mScrollBarBounds;
-                    getHorizontalScrollBarBounds(bounds);
+                    getHorizontalScrollBarBounds(bounds, null);
                     final int range = computeHorizontalScrollRange();
                     final int offset = computeHorizontalScrollOffset();
                     final int extent = computeHorizontalScrollExtent();
@@ -12027,6 +12152,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;
@@ -12036,8 +12162,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 */
@@ -12052,7 +12178,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);
+                    }
+                }
             }
         }
 
@@ -15358,7 +15492,12 @@
         }
     }
 
-    private void getHorizontalScrollBarBounds(Rect bounds) {
+    private void getHorizontalScrollBarBounds(@Nullable Rect drawBounds,
+            @Nullable Rect touchBounds) {
+        final Rect bounds = drawBounds != null ? drawBounds : touchBounds;
+        if (bounds == null) {
+            return;
+        }
         final int inside = (mViewFlags & SCROLLBARS_OUTSIDE_MASK) == 0 ? ~0 : 0;
         final boolean drawVerticalScrollBar = isVerticalScrollBarEnabled()
                 && !isVerticalScrollBarHidden();
@@ -15371,13 +15510,31 @@
         bounds.left = mScrollX + (mPaddingLeft & inside);
         bounds.right = mScrollX + width - (mUserPaddingRight & inside) - verticalScrollBarGap;
         bounds.bottom = bounds.top + size;
+
+        if (touchBounds == null) {
+            return;
+        }
+        if (touchBounds != bounds) {
+            touchBounds.set(bounds);
+        }
+        final int minTouchTarget = mScrollCache.scrollBarMinTouchTarget;
+        if (touchBounds.height() < minTouchTarget) {
+            final int adjust = (minTouchTarget - touchBounds.height()) / 2;
+            touchBounds.bottom = Math.min(touchBounds.bottom + adjust, mScrollY + height);
+            touchBounds.top = touchBounds.bottom - minTouchTarget;
+        }
+        if (touchBounds.width() < minTouchTarget) {
+            final int adjust = (minTouchTarget - touchBounds.width()) / 2;
+            touchBounds.left -= adjust;
+            touchBounds.right = touchBounds.left + minTouchTarget;
+        }
     }
 
-    private void getVerticalScrollBarBounds(Rect bounds) {
+    private void getVerticalScrollBarBounds(@Nullable Rect bounds, @Nullable Rect touchBounds) {
         if (mRoundScrollbarRenderer == null) {
-            getStraightVerticalScrollBarBounds(bounds);
+            getStraightVerticalScrollBarBounds(bounds, touchBounds);
         } else {
-            getRoundVerticalScrollBarBounds(bounds);
+            getRoundVerticalScrollBarBounds(bounds != null ? bounds : touchBounds);
         }
     }
 
@@ -15392,7 +15549,12 @@
         bounds.bottom = mScrollY + height;
     }
 
-    private void getStraightVerticalScrollBarBounds(Rect bounds) {
+    private void getStraightVerticalScrollBarBounds(@Nullable Rect drawBounds,
+            @Nullable Rect touchBounds) {
+        final Rect bounds = drawBounds != null ? drawBounds : touchBounds;
+        if (bounds == null) {
+            return;
+        }
         final int inside = (mViewFlags & SCROLLBARS_OUTSIDE_MASK) == 0 ? ~0 : 0;
         final int size = getVerticalScrollbarWidth();
         int verticalScrollbarPosition = mVerticalScrollbarPosition;
@@ -15414,6 +15576,29 @@
         bounds.top = mScrollY + (mPaddingTop & inside);
         bounds.right = bounds.left + size;
         bounds.bottom = mScrollY + height - (mUserPaddingBottom & inside);
+
+        if (touchBounds == null) {
+            return;
+        }
+        if (touchBounds != bounds) {
+            touchBounds.set(bounds);
+        }
+        final int minTouchTarget = mScrollCache.scrollBarMinTouchTarget;
+        if (touchBounds.width() < minTouchTarget) {
+            final int adjust = (minTouchTarget - touchBounds.width()) / 2;
+            if (verticalScrollbarPosition == SCROLLBAR_POSITION_RIGHT) {
+                touchBounds.right = Math.min(touchBounds.right + adjust, mScrollX + width);
+                touchBounds.left = touchBounds.right - minTouchTarget;
+            } else {
+                touchBounds.left = Math.max(touchBounds.left + adjust, mScrollX);
+                touchBounds.right = touchBounds.left + minTouchTarget;
+            }
+        }
+        if (touchBounds.height() < minTouchTarget) {
+            final int adjust = (minTouchTarget - touchBounds.height()) / 2;
+            touchBounds.top -= adjust;
+            touchBounds.bottom = touchBounds.top + minTouchTarget;
+        }
     }
 
     /**
@@ -15472,7 +15657,7 @@
             if (mRoundScrollbarRenderer != null) {
                 if (drawVerticalScrollBar) {
                     final Rect bounds = cache.mScrollBarBounds;
-                    getVerticalScrollBarBounds(bounds);
+                    getVerticalScrollBarBounds(bounds, null);
                     mRoundScrollbarRenderer.drawRoundScrollbars(
                             canvas, (float) cache.scrollBar.getAlpha() / 255f, bounds);
                     if (invalidate) {
@@ -15488,7 +15673,7 @@
                             computeHorizontalScrollOffset(),
                             computeHorizontalScrollExtent(), false);
                     final Rect bounds = cache.mScrollBarBounds;
-                    getHorizontalScrollBarBounds(bounds);
+                    getHorizontalScrollBarBounds(bounds, null);
                     onDrawHorizontalScrollBar(canvas, scrollBar, bounds.left, bounds.top,
                             bounds.right, bounds.bottom);
                     if (invalidate) {
@@ -15501,7 +15686,7 @@
                             computeVerticalScrollOffset(),
                             computeVerticalScrollExtent(), true);
                     final Rect bounds = cache.mScrollBarBounds;
-                    getVerticalScrollBarBounds(bounds);
+                    getVerticalScrollBarBounds(bounds, null);
                     onDrawVerticalScrollBar(canvas, scrollBar, bounds.left, bounds.top,
                             bounds.right, bounds.bottom);
                     if (invalidate) {
@@ -15696,7 +15881,7 @@
      */
     private boolean isRtlCompatibilityMode() {
         final int targetSdkVersion = getContext().getApplicationInfo().targetSdkVersion;
-        return targetSdkVersion < JELLY_BEAN_MR1 || !hasRtlSupport();
+        return targetSdkVersion < Build.VERSION_CODES.JELLY_BEAN_MR1 || !hasRtlSupport();
     }
 
     /**
@@ -19942,9 +20127,9 @@
      * @return the view of the specified id, null if cannot be found
      * @hide
      */
-    protected <T extends View> T findViewTraversal(@IdRes int id) {
+    protected View findViewTraversal(@IdRes int id) {
         if (id == mID) {
-            return (T) this;
+            return this;
         }
         return null;
     }
@@ -19954,9 +20139,9 @@
      * @return the view of specified tag, null if cannot be found
      * @hide
      */
-    protected <T extends View> T findViewWithTagTraversal(Object tag) {
+    protected View findViewWithTagTraversal(Object tag) {
         if (tag != null && tag.equals(mTag)) {
-            return (T) this;
+            return this;
         }
         return null;
     }
@@ -19967,10 +20152,9 @@
      * @return The first view that matches the predicate or null.
      * @hide
      */
-    protected <T extends View> T findViewByPredicateTraversal(Predicate<View> predicate,
-            View childToSkip) {
-        if (predicate.apply(this)) {
-            return (T) this;
+    protected View findViewByPredicateTraversal(Predicate<View> predicate, View childToSkip) {
+        if (predicate.test(this)) {
+            return this;
         }
         return null;
     }
@@ -19983,7 +20167,7 @@
      * @return The view that has the given id in the hierarchy or null
      */
     @Nullable
-    public final <T extends View> T findViewById(@IdRes int id) {
+    public final View findViewById(@IdRes int id) {
         if (id < 0) {
             return null;
         }
@@ -19996,11 +20180,11 @@
      * @param accessibilityId The searched accessibility id.
      * @return The found view.
      */
-    final <T extends View> T  findViewByAccessibilityId(int accessibilityId) {
+    final View findViewByAccessibilityId(int accessibilityId) {
         if (accessibilityId < 0) {
             return null;
         }
-        T view = findViewByAccessibilityIdTraversal(accessibilityId);
+        View view = findViewByAccessibilityIdTraversal(accessibilityId);
         if (view != null) {
             return view.includeForAccessibility() ? view : null;
         }
@@ -20019,11 +20203,12 @@
      *
      * @param accessibilityId The accessibility id.
      * @return The found view.
+     *
      * @hide
      */
-    public <T extends View> T findViewByAccessibilityIdTraversal(int accessibilityId) {
+    public View findViewByAccessibilityIdTraversal(int accessibilityId) {
         if (getAccessibilityViewId() == accessibilityId) {
-            return (T) this;
+            return this;
         }
         return null;
     }
@@ -20035,7 +20220,7 @@
      * @param tag The tag to search for, using "tag.equals(getTag())".
      * @return The View that has the given tag in the hierarchy or null
      */
-    public final <T extends View> T findViewWithTag(Object tag) {
+    public final View findViewWithTag(Object tag) {
         if (tag == null) {
             return null;
         }
@@ -20050,7 +20235,7 @@
      * @return The first view that matches the predicate or null.
      * @hide
      */
-    public final <T extends View> T findViewByPredicate(Predicate<View> predicate) {
+    public final View findViewByPredicate(Predicate<View> predicate) {
         return findViewByPredicateTraversal(predicate, null);
     }
 
@@ -20070,11 +20255,10 @@
      * @return The first view that matches the predicate or null.
      * @hide
      */
-    public final <T extends View> T findViewByPredicateInsideOut(
-            View start, Predicate<View> predicate) {
+    public final View findViewByPredicateInsideOut(View start, Predicate<View> predicate) {
         View childToSkip = null;
         for (;;) {
-            T view = start.findViewByPredicateTraversal(predicate, childToSkip);
+            View view = start.findViewByPredicateTraversal(predicate, childToSkip);
             if (view != null || start == this) {
                 return view;
             }
@@ -23994,6 +24178,7 @@
         public int scrollBarFadeDuration;
 
         public int scrollBarSize;
+        public int scrollBarMinTouchTarget;
         public ScrollBarDrawable scrollBar;
         public float[] interpolatorValues;
         public View host;
@@ -24022,6 +24207,7 @@
         private int mLastColor;
 
         public final Rect mScrollBarBounds = new Rect();
+        public final Rect mScrollBarTouchBounds = new Rect();
 
         public static final int NOT_DRAGGING = 0;
         public static final int DRAGGING_VERTICAL_SCROLL_BAR = 1;
@@ -24033,6 +24219,7 @@
         public ScrollabilityCache(ViewConfiguration configuration, View host) {
             fadingEdgeLength = configuration.getScaledFadingEdgeLength();
             scrollBarSize = configuration.getScaledScrollBarSize();
+            scrollBarMinTouchTarget = configuration.getScaledMinScrollbarTouchTarget();
             scrollBarDefaultDelayBeforeFade = ViewConfiguration.getScrollDefaultDelay();
             scrollBarFadeDuration = ViewConfiguration.getScrollBarFadeDuration();
 
@@ -24320,6 +24507,32 @@
         }
 
         /**
+         * Adds extra data to an {@link AccessibilityNodeInfo} based on an explicit request for the
+         * additional data.
+         * <p>
+         * This method only needs to be implemented if the View offers to provide additional data.
+         * </p>
+         * <p>
+         * The default implementation behaves as
+         * {@link View#addExtraDataToAccessibilityNodeInfo(AccessibilityNodeInfo, int) for
+         * the case where no accessibility delegate is set.
+         * </p>
+         *
+         * @param host The View hosting the delegate.
+         * @param info The info to which to add the extra data
+         * @param extraDataKey A key specifying the type of extra data to add to the info. The
+         *                     extra data should be added to the {@link Bundle} returned by
+         *                     the info's {@link AccessibilityNodeInfo#getExtras} method.
+         * @param arguments A {@link Bundle} holding any arguments relevant for this request.
+         *
+         * @see AccessibilityNodeInfo#setExtraAvailableData
+         */
+        public void addExtraDataToAccessibilityNodeInfo(
+                View host, AccessibilityNodeInfo info, String extraDataKey, Bundle arguments) {
+            host.addExtraDataToAccessibilityNodeInfo(info, extraDataKey, arguments);
+        }
+
+        /**
          * Called when a child of the host View has requested sending an
          * {@link AccessibilityEvent} and gives an opportunity to the parent (the host)
          * to augment the event.
@@ -24389,20 +24602,20 @@
         }
     }
 
-    private class MatchIdPredicate implements Predicate<View> {
+    private static class MatchIdPredicate implements Predicate<View> {
         public int mId;
 
         @Override
-        public boolean apply(View view) {
+        public boolean test(View view) {
             return (view.mID == mId);
         }
     }
 
-    private class MatchLabelForPredicate implements Predicate<View> {
+    private static class MatchLabelForPredicate implements Predicate<View> {
         private int mLabeledId;
 
         @Override
-        public boolean apply(View view) {
+        public boolean test(View view) {
             return (view.mLabelForId == mLabeledId);
         }
     }
@@ -24660,7 +24873,7 @@
      * Determine if this view is rendered on a round wearable device and is the main view
      * on the screen.
      */
-    private boolean shouldDrawRoundScrollbar() {
+    boolean shouldDrawRoundScrollbar() {
         if (!mResources.getConfiguration().isScreenRound() || mAttachInfo == null) {
             return false;
         }
@@ -24677,7 +24890,7 @@
             return false;
         }
 
-        getLocationOnScreen(mAttachInfo.mTmpLocation);
+        getLocationInWindow(mAttachInfo.mTmpLocation);
         return mAttachInfo.mTmpLocation[0] == insets.getStableInsetLeft()
                 && mAttachInfo.mTmpLocation[1] == insets.getStableInsetTop();
     }
@@ -24686,13 +24899,20 @@
      * Sets the tooltip text which will be displayed in a small popup next to the view.
      * <p>
      * The tooltip will be displayed:
+     * <ul>
      * <li>On long click, unless is not handled otherwise (by OnLongClickListener or a context
      * menu). </li>
      * <li>On hover, after a brief delay since the pointer has stopped moving </li>
+     * </ul>
+     * <p>
+     * <strong>Note:</strong> Do not override this method, as it will have no
+     * effect on the text displayed in the tooltip.
      *
      * @param tooltipText the tooltip text, or null if no tooltip is required
+     * @see #getTooltipText()
+     * @attr ref android.R.styleable#View_tooltipText
      */
-    public final void setTooltipText(@Nullable CharSequence tooltipText) {
+    public void setTooltipText(@Nullable CharSequence tooltipText) {
         if (TextUtils.isEmpty(tooltipText)) {
             setFlags(0, TOOLTIP);
             hideTooltip();
@@ -24721,10 +24941,16 @@
     /**
      * Returns the view's tooltip text.
      *
+     * <strong>Note:</strong> Do not override this method, as it will have no
+     * effect on the text displayed in the tooltip. You must call
+     * {@link #setTooltipText(CharSequence)} to modify the tooltip text.
+     *
      * @return the tooltip text
+     * @see #setTooltipText(CharSequence)
+     * @attr ref android.R.styleable#View_tooltipText
      */
     @Nullable
-    public final CharSequence getTooltipText() {
+    public CharSequence getTooltipText() {
         return mTooltipInfo != null ? mTooltipInfo.mTooltipText : null;
     }
 
@@ -24737,21 +24963,20 @@
     }
 
     private boolean showTooltip(int x, int y, boolean fromLongClick) {
-        if (mAttachInfo == null) {
+        if (mAttachInfo == null || mTooltipInfo == null) {
             return false;
         }
         if ((mViewFlags & ENABLED_MASK) != ENABLED) {
             return false;
         }
-        final CharSequence tooltipText = getTooltipText();
-        if (TextUtils.isEmpty(tooltipText)) {
+        if (TextUtils.isEmpty(mTooltipInfo.mTooltipText)) {
             return false;
         }
         hideTooltip();
         mTooltipInfo.mTooltipFromLongClick = fromLongClick;
         mTooltipInfo.mTooltipPopup = new TooltipPopup(getContext());
         final boolean fromTouch = (mPrivateFlags3 & PFLAG3_FINGER_DOWN) == PFLAG3_FINGER_DOWN;
-        mTooltipInfo.mTooltipPopup.show(this, x, y, fromTouch, tooltipText);
+        mTooltipInfo.mTooltipPopup.show(this, x, y, fromTouch, mTooltipInfo.mTooltipText);
         mAttachInfo.mTooltipHost = this;
         return true;
     }
diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java
index 0e753f3..5d01b416 100644
--- a/core/java/android/view/ViewConfiguration.java
+++ b/core/java/android/view/ViewConfiguration.java
@@ -156,6 +156,11 @@
     private static final int TOUCH_SLOP = 8;
 
     /**
+     * Defines the minimum size of the touch target for a scrollbar in dips
+     */
+    private static final int MIN_SCROLLBAR_TOUCH_TARGET = 48;
+
+    /**
      * Distance the first touch can wander before we stop considering this event a double tap
      * (in dips)
      */
@@ -274,6 +279,7 @@
     private final int mMaximumFlingVelocity;
     private final int mScrollbarSize;
     private final int mTouchSlop;
+    private final int mMinScrollbarTouchTarget;
     private final int mDoubleTapTouchSlop;
     private final int mPagingTouchSlop;
     private final int mDoubleTapSlop;
@@ -302,6 +308,7 @@
         mMaximumFlingVelocity = MAXIMUM_FLING_VELOCITY;
         mScrollbarSize = SCROLL_BAR_SIZE;
         mTouchSlop = TOUCH_SLOP;
+        mMinScrollbarTouchTarget = MIN_SCROLLBAR_TOUCH_TARGET;
         mDoubleTapTouchSlop = DOUBLE_TAP_TOUCH_SLOP;
         mPagingTouchSlop = PAGING_TOUCH_SLOP;
         mDoubleTapSlop = DOUBLE_TAP_SLOP;
@@ -386,6 +393,8 @@
                 com.android.internal.R.bool.config_ui_enableFadingMarquee);
         mTouchSlop = res.getDimensionPixelSize(
                 com.android.internal.R.dimen.config_viewConfigurationTouchSlop);
+        mMinScrollbarTouchTarget = res.getDimensionPixelSize(
+                com.android.internal.R.dimen.config_minScrollbarTouchTarget);
         mPagingTouchSlop = mTouchSlop * 2;
 
         mDoubleTapTouchSlop = mTouchSlop;
@@ -440,6 +449,14 @@
     }
 
     /**
+     * @return the minimum size of the scrollbar thumb's touch target in pixels
+     * @hide
+     */
+    public int getScaledMinScrollbarTouchTarget() {
+        return mMinScrollbarTouchTarget;
+    }
+
+    /**
      * @return Duration of the fade when scrollbars fade away in milliseconds
      */
     public static int getScrollBarFadeDuration() {
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index b11b3d7..fd3ff82 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -57,14 +57,15 @@
 import android.view.animation.Transformation;
 
 import com.android.internal.R;
-import com.android.internal.util.Predicate;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.function.Predicate;
 
 /**
  * <p>
@@ -140,6 +141,8 @@
     // The view contained within this ViewGroup (excluding nested keyboard navigation clusters)
     // that is or contains a default-focus view.
     private View mDefaultFocus;
+    // The last child of this ViewGroup which held focus within the current cluster
+    private View mFocusedInCluster;
 
     /**
      * A Transformation used when drawing children, to
@@ -723,7 +726,7 @@
         if (mFocused != null) {
             mFocused.unFocus(this);
             mFocused = null;
-            mDefaultFocus = null;
+            mFocusedInCluster = null;
         }
         super.handleFocusGainInternal(direction, previouslyFocusedRect);
     }
@@ -753,14 +756,9 @@
         }
     }
 
-    /**
-     * Sets the specified child view as the default focus for this view and all its ancestors.
-     * If the view is inside a keyboard navigation cluster, stops at the root of the cluster since
-     * the cluster forms a separate keyboard navigation hierarchy from the default focus point of
-     * view.
-     */
     void setDefaultFocus(View child) {
-        if (child.isKeyboardNavigationCluster()) {
+        // Stop at any higher view which is explicitly focused-by-default
+        if (mDefaultFocus != null && mDefaultFocus.isFocusedByDefault()) {
             return;
         }
 
@@ -772,10 +770,56 @@
     }
 
     /**
-     * Destroys the default focus chain.
+     * Clears the default-focus chain from {@param child} up to the first parent which has another
+     * default-focusable branch below it or until there is no default-focus chain.
+     *
+     * @param child
      */
-    void cleanDefaultFocus(View child) {
-        if (mDefaultFocus != child) {
+    void clearDefaultFocus(View child) {
+        // Stop at any higher view which is explicitly focused-by-default
+        if (mDefaultFocus != child && mDefaultFocus != null
+                && mDefaultFocus.isFocusedByDefault()) {
+            return;
+        }
+
+        mDefaultFocus = null;
+
+        // Search child siblings for default focusables.
+        for (int i = 0; i < mChildrenCount; ++i) {
+            View sibling = mChildren[i];
+            if (sibling.isFocusedByDefault()) {
+                mDefaultFocus = sibling;
+                return;
+            } else if (mDefaultFocus == null && sibling.hasDefaultFocus()) {
+                mDefaultFocus = sibling;
+            }
+        }
+
+        if (mParent instanceof ViewGroup) {
+            ((ViewGroup) mParent).clearDefaultFocus(this);
+        }
+    }
+
+    @Override
+    boolean hasDefaultFocus() {
+        return mDefaultFocus != null || super.hasDefaultFocus();
+    }
+
+    void setFocusInCluster(View child) {
+        // Stop at the root of the cluster
+        if (child.isKeyboardNavigationCluster()) {
+            return;
+        }
+
+        mFocusedInCluster = child;
+
+        if (mParent instanceof ViewGroup) {
+            ((ViewGroup) mParent).setFocusInCluster(this);
+        }
+    }
+
+    void clearFocusInCluster(View child) {
+        if (mFocusedInCluster != child) {
             return;
         }
 
@@ -783,19 +827,14 @@
             return;
         }
 
-        mDefaultFocus = null;
+        mFocusedInCluster = null;
 
         if (mParent instanceof ViewGroup) {
-            ((ViewGroup) mParent).cleanDefaultFocus(this);
+            ((ViewGroup) mParent).clearFocusInCluster(this);
         }
     }
 
     @Override
-    boolean hasDefaultFocus() {
-        return mDefaultFocus != null || super.hasDefaultFocus();
-    }
-
-    @Override
     public void focusableViewAvailable(View v) {
         if (mParent != null
                 // shortcut: don't report a new focusable view if we block our descendants from
@@ -1106,14 +1145,15 @@
         return null;
     }
 
-    /** @hide Overriding hidden method */
     @Override
-    public boolean hasFocusable(boolean allowAutoFocus) {
+    boolean hasFocusable(boolean allowAutoFocus, boolean dispatchExplicit) {
         if ((mViewFlags & VISIBILITY_MASK) != VISIBLE) {
             return false;
         }
 
-        // TODO This should probably be super.hasFocusable, but that would change behavior
+        // TODO This should probably be super.hasFocusable, but that would change behavior.
+        // The below is a much simpler check than we do in the superclass implementation,
+        // but it's been this way for a long time and other code likely relies on it.
         if ((allowAutoFocus ? getFocusable() != NOT_FOCUSABLE : getFocusable() == FOCUSABLE)
                 && isFocusable()) {
             return true;
@@ -1126,7 +1166,11 @@
 
             for (int i = 0; i < count; i++) {
                 final View child = children[i];
-                if (child.hasFocusable(allowAutoFocus)) {
+
+                // In case the subclass has overridden has[Explicit]Focusable, dispatch
+                // to the expected one for each child even though we share logic here.
+                if ((dispatchExplicit && child.hasExplicitFocusable())
+                        || (!dispatchExplicit && child.hasFocusable())) {
                     return true;
                 }
             }
@@ -1140,31 +1184,42 @@
         final int focusableCount = views.size();
 
         final int descendantFocusability = getDescendantFocusability();
+        final boolean focusSelf = (isFocusableInTouchMode() || !shouldBlockFocusForTouchscreen());
 
-        if (descendantFocusability != FOCUS_BLOCK_DESCENDANTS) {
-            if (shouldBlockFocusForTouchscreen()) {
-                focusableMode |= FOCUSABLES_TOUCH_MODE;
+        if (descendantFocusability == FOCUS_BLOCK_DESCENDANTS) {
+            if (focusSelf) {
+                super.addFocusables(views, direction, focusableMode);
             }
-
-            final int count = mChildrenCount;
-            final View[] children = mChildren;
-
-            for (int i = 0; i < count; i++) {
-                final View child = children[i];
-                if ((child.mViewFlags & VISIBILITY_MASK) == VISIBLE) {
-                    child.addFocusables(views, direction, focusableMode);
-                }
-            }
+            return;
         }
 
-        // we add ourselves (if focusable) in all cases except for when we are
-        // FOCUS_AFTER_DESCENDANTS and there are some descendants focusable.  this is
+        if (shouldBlockFocusForTouchscreen()) {
+            focusableMode |= FOCUSABLES_TOUCH_MODE;
+        }
+
+        if ((descendantFocusability == FOCUS_BEFORE_DESCENDANTS) && focusSelf) {
+            super.addFocusables(views, direction, focusableMode);
+        }
+
+        int count = 0;
+        final View[] children = new View[mChildrenCount];
+        for (int i = 0; i < mChildrenCount; ++i) {
+            View child = mChildren[i];
+            if ((child.mViewFlags & VISIBILITY_MASK) == VISIBLE) {
+                children[count++] = child;
+            }
+        }
+        Arrays.sort(children, 0, count, FocusFinder.getFocusComparator(this, false));
+        for (int i = 0; i < count; ++i) {
+            children[i].addFocusables(views, direction, focusableMode);
+        }
+
+        // When set to FOCUS_AFTER_DESCENDANTS, we only add ourselves if
+        // there aren't any focusable descendants.  this is
         // to avoid the focus search finding layouts when a more precise search
         // among the focusable children would be more interesting.
-        if ((descendantFocusability != FOCUS_AFTER_DESCENDANTS
-                // No focusable descendants
-                || (focusableCount == views.size())) &&
-                (isFocusableInTouchMode() || !shouldBlockFocusForTouchscreen())) {
+        if ((descendantFocusability == FOCUS_AFTER_DESCENDANTS) && focusSelf
+                && focusableCount == views.size()) {
             super.addFocusables(views, direction, focusableMode);
         }
     }
@@ -3098,14 +3153,28 @@
     }
 
     @Override
-    public boolean restoreDefaultFocus(@FocusDirection int direction) {
-        if (mDefaultFocus != null && !mDefaultFocus.isKeyboardNavigationCluster()
+    public boolean restoreDefaultFocus() {
+        if (mDefaultFocus != null
                 && getDescendantFocusability() != FOCUS_BLOCK_DESCENDANTS
                 && (mDefaultFocus.mViewFlags & VISIBILITY_MASK) == VISIBLE
-                && mDefaultFocus.restoreDefaultFocus(direction)) {
+                && mDefaultFocus.restoreDefaultFocus()) {
             return true;
         }
-        return super.restoreDefaultFocus(direction);
+        return super.restoreDefaultFocus();
+    }
+
+    /**
+     * @hide
+     */
+    @Override
+    public boolean restoreFocusInCluster(@FocusRealDirection int direction) {
+        if (mFocusedInCluster != null && !mFocusedInCluster.isKeyboardNavigationCluster()
+                && getDescendantFocusability() != FOCUS_BLOCK_DESCENDANTS
+                && (mFocusedInCluster.mViewFlags & VISIBILITY_MASK) == VISIBLE
+                && mFocusedInCluster.restoreFocusInCluster(direction)) {
+            return true;
+        }
+        return super.restoreFocusInCluster(direction);
     }
 
     /**
@@ -4208,9 +4277,9 @@
      * {@hide}
      */
     @Override
-    protected <T extends View> T findViewTraversal(@IdRes int id) {
+    protected View findViewTraversal(@IdRes int id) {
         if (id == mID) {
-            return (T) this;
+            return this;
         }
 
         final View[] where = mChildren;
@@ -4223,7 +4292,7 @@
                 v = v.findViewById(id);
 
                 if (v != null) {
-                    return (T) v;
+                    return v;
                 }
             }
         }
@@ -4235,9 +4304,9 @@
      * {@hide}
      */
     @Override
-    protected <T extends View> T findViewWithTagTraversal(Object tag) {
+    protected View findViewWithTagTraversal(Object tag) {
         if (tag != null && tag.equals(mTag)) {
-            return (T) this;
+            return this;
         }
 
         final View[] where = mChildren;
@@ -4250,7 +4319,7 @@
                 v = v.findViewWithTag(tag);
 
                 if (v != null) {
-                    return (T) v;
+                    return v;
                 }
             }
         }
@@ -4262,10 +4331,9 @@
      * {@hide}
      */
     @Override
-    protected <T extends View> T findViewByPredicateTraversal(Predicate<View> predicate,
-            View childToSkip) {
-        if (predicate.apply(this)) {
-            return (T) this;
+    protected View findViewByPredicateTraversal(Predicate<View> predicate, View childToSkip) {
+        if (predicate.test(this)) {
+            return this;
         }
 
         final View[] where = mChildren;
@@ -4278,7 +4346,7 @@
                 v = v.findViewByPredicate(predicate);
 
                 if (v != null) {
-                    return (T) v;
+                    return v;
                 }
             }
         }
@@ -4988,8 +5056,8 @@
             view.unFocus(null);
             clearChildFocus = true;
         }
-        if (view == mDefaultFocus) {
-            mDefaultFocus = null;
+        if (view == mFocusedInCluster) {
+            clearFocusInCluster(view);
         }
 
         view.clearAccessibilityFocus();
@@ -5012,6 +5080,9 @@
 
         removeFromArray(index);
 
+        if (view == mDefaultFocus) {
+            clearDefaultFocus(view);
+        }
         if (clearChildFocus) {
             clearChildFocus(view);
             if (!rootViewRequestFocus()) {
@@ -5087,6 +5158,7 @@
         final View focused = mFocused;
         final boolean detach = mAttachInfo != null;
         boolean clearChildFocus = false;
+        View clearDefaultFocus = null;
 
         final View[] children = mChildren;
 
@@ -5102,7 +5174,10 @@
                 clearChildFocus = true;
             }
             if (view == mDefaultFocus) {
-                mDefaultFocus = null;
+                clearDefaultFocus = view;
+            }
+            if (view == mFocusedInCluster) {
+                clearFocusInCluster(view);
             }
 
             view.clearAccessibilityFocus();
@@ -5128,6 +5203,9 @@
 
         removeFromArray(start, count);
 
+        if (clearDefaultFocus != null) {
+            clearDefaultFocus(clearDefaultFocus);
+        }
         if (clearChildFocus) {
             clearChildFocus(focused);
             if (!rootViewRequestFocus()) {
@@ -5177,7 +5255,6 @@
         boolean clearChildFocus = false;
 
         needGlobalAttributesUpdate(false);
-        mDefaultFocus = null;
 
         for (int i = count - 1; i >= 0; i--) {
             final View view = children[i];
@@ -5213,6 +5290,9 @@
             children[i] = null;
         }
 
+        if (mDefaultFocus != null) {
+            clearDefaultFocus(mDefaultFocus);
+        }
         if (clearChildFocus) {
             clearChildFocus(focused);
             if (!rootViewRequestFocus()) {
@@ -5250,7 +5330,10 @@
             child.clearFocus();
         }
         if (child == mDefaultFocus) {
-            mDefaultFocus = null;
+            clearDefaultFocus(child);
+        }
+        if (child == mFocusedInCluster) {
+            clearFocusInCluster(child);
         }
 
         child.clearAccessibilityFocus();
@@ -6235,6 +6318,12 @@
             Log.d(VIEW_LOG_TAG, output);
             mDefaultFocus.debug(depth + 1);
         }
+        if (mFocusedInCluster != null) {
+            output = debugIndent(depth);
+            output += "mFocusedInCluster";
+            Log.d(VIEW_LOG_TAG, output);
+            mFocusedInCluster.debug(depth + 1);
+        }
         if (mChildrenCount != 0) {
             output = debugIndent(depth);
             output += "{";
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 9bfc260..20d8a11 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;
@@ -2162,7 +2164,7 @@
                     + mView.hasFocus());
             if (mView != null) {
                 if (!mView.hasFocus()) {
-                    mView.restoreDefaultFocus(View.FOCUS_FORWARD);
+                    mView.restoreDefaultFocus();
                     if (DEBUG_INPUT_RESIZE) Log.v(mTag, "First: requested focused view="
                             + mView.findFocus());
                 } else {
@@ -4279,7 +4281,8 @@
 
             // Enter touch mode on down or scroll.
             final int action = event.getAction();
-            if (action == MotionEvent.ACTION_DOWN || action == MotionEvent.ACTION_SCROLL) {
+            if (event.isFromSource(InputDevice.SOURCE_TOUCHSCREEN)
+                    && (action == MotionEvent.ACTION_DOWN || action == MotionEvent.ACTION_SCROLL)) {
                 ensureTouchMode(true);
             }
 
@@ -4441,7 +4444,14 @@
                     ? focused.keyboardNavigationClusterSearch(null, direction)
                     : keyboardNavigationClusterSearch(null, direction);
 
-            if (cluster != null && cluster.restoreDefaultFocus(View.FOCUS_DOWN)) {
+            // Since requestFocus only takes "real" focus directions (and therefore also
+            // restoreFocusInCluster), convert forward/backward focus into FOCUS_DOWN.
+            int realDirection = direction;
+            if (direction == View.FOCUS_FORWARD || direction == View.FOCUS_BACKWARD) {
+                realDirection = View.FOCUS_DOWN;
+            }
+
+            if (cluster != null && cluster.restoreFocusInCluster(realDirection)) {
                 return true;
             }
 
@@ -4472,9 +4482,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) {
@@ -7492,13 +7502,13 @@
         public void findAccessibilityNodeInfoByAccessibilityId(long accessibilityNodeId,
                 Region interactiveRegion, int interactionId,
                 IAccessibilityInteractionConnectionCallback callback, int flags,
-                int interrogatingPid, long interrogatingTid, MagnificationSpec spec) {
+                int interrogatingPid, long interrogatingTid, MagnificationSpec spec, Bundle args) {
             ViewRootImpl viewRootImpl = mViewRootImpl.get();
             if (viewRootImpl != null && viewRootImpl.mView != null) {
                 viewRootImpl.getAccessibilityInteractionController()
                     .findAccessibilityNodeInfoByAccessibilityIdClientThread(accessibilityNodeId,
                             interactiveRegion, interactionId, callback, flags, interrogatingPid,
-                            interrogatingTid, spec);
+                            interrogatingTid, spec, args);
             } else {
                 // We cannot make the call and notify the caller so it does not wait.
                 try {
diff --git a/core/java/android/view/ViewStructure.java b/core/java/android/view/ViewStructure.java
index 5bae594..9ce23e6 100644
--- a/core/java/android/view/ViewStructure.java
+++ b/core/java/android/view/ViewStructure.java
@@ -22,11 +22,11 @@
 import android.view.autofill.AutoFillId;
 import android.view.autofill.AutoFillType;
 import android.view.autofill.AutoFillValue;
-import android.view.autofill.VirtualViewDelegate;
 
 /**
  * Container for storing additional per-view data generated by {@link View#onProvideStructure
- * View.onProvideStructure}.
+ * View.onProvideStructure} and {@link View#onProvideAutoFillStructure
+ * View.onProvideAutoFillStructure}.
  */
 public abstract class ViewStructure {
 
@@ -34,7 +34,9 @@
      * Flag used when adding virtual views for auto-fill, it indicates the contents of the view
      * (such as * {@link android.app.assist.AssistStructure.ViewNode#getText()} and
      * {@link android.app.assist.AssistStructure.ViewNode#getAutoFillValue()})
-     * can be passed to the {@link android.service.autofill.AutoFillService}.
+     * can be passed to the {@link
+     * android.service.autofill.AutoFillService#onFillRequest(android.app.assist.AssistStructure,
+     * Bundle, android.os.CancellationSignal, android.service.autofill.FillCallback)} call.
      */
     public static final int AUTO_FILL_FLAG_SANITIZED = 0x1;
 
@@ -272,12 +274,11 @@
 
     /**
      * Like {@link #newChild(int)}, but providing a {@code virtualId} to the child so it can be
-     * auto-filled by {@link VirtualViewDelegate#autoFill(int, AutoFillValue)}.
+     * auto-filled by {@link View#autoFillVirtual(int, AutoFillValue)}.
      *
      * @param index child index
-     * @param virtualId child's id as defined by {@link VirtualViewDelegate#autoFill(int,
-     * AutoFillValue)}.
-     * @param flags currently either {@code 0} or {@link #AUTO_FILL_FLAG_SANITIZED}.
+     * @param virtualId id identifying the virtual child inside the custom view.
+     * @param flags currently {@code 0} or {@link #AUTO_FILL_FLAG_SANITIZED}.
      */
     // TODO(b/33197203, b/33802548): add CTS/unit test
     public abstract ViewStructure newChild(int index, int virtualId, int flags);
@@ -294,12 +295,11 @@
 
     /**
      * Like {@link #asyncNewChild(int)}, but providing a {@code virtualId} to the child so it can be
-     * auto-filled by {@link VirtualViewDelegate#autoFill(int, AutoFillValue)}.
+     * auto-filled by {@link View#autoFillVirtual(int, AutoFillValue)}.
      *
      * @param index child index
-     * @param virtualId child's id as defined by {@link VirtualViewDelegate#autoFill(int,
-     * AutoFillValue)}.
-     * @param flags currently either {@code 0} or {@link #AUTO_FILL_FLAG_SANITIZED}.
+     * @param virtualId id identifying the virtual child inside the custom view.
+     * @param flags currently {@code 0} or {@link #AUTO_FILL_FLAG_SANITIZED}.
      */
     // TODO(b/33197203, b/33802548): add CTS/unit test
     public abstract ViewStructure asyncNewChild(int index, int virtualId, int flags);
@@ -338,4 +338,17 @@
 
     /** @hide */
     public abstract AutoFillId getAutoFillId();
+
+    /**
+     * Sets the URL represented by this node.
+     *
+     * <p>Typically used in the following situations:
+     *
+     * <ol>
+     * <li>In a {@link android.app.assist.AssistStructure.WindowNode#getRootViewNode()}, to set up
+     * the main URL of an HTML page.
+     * <li>On child nodes represening hyperlinks.
+     * </ol>
+     */
+    public abstract void setUrl(String url);
 }
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java
index bf840e5..6b8aab6 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;
 
@@ -335,7 +338,9 @@
                 @ViewDebug.IntToString(from = TYPE_QS_DIALOG,
                         to = "TYPE_QS_DIALOG"),
                 @ViewDebug.IntToString(from = TYPE_SCREENSHOT,
-                        to = "TYPE_SCREENSHOT")
+                        to = "TYPE_SCREENSHOT"),
+                @ViewDebug.IntToString(from = TYPE_APPLICATION_OVERLAY,
+                        to = "TYPE_APPLICATION_OVERLAY")
         })
         public int type;
 
@@ -462,14 +467,18 @@
          * These windows are normally placed above all applications, but behind
          * the status bar.
          * In multiuser systems shows on all users' windows.
+         * @deprecated for non-system apps. Use {@link #TYPE_APPLICATION_OVERLAY} instead.
          */
+        @Deprecated
         public static final int TYPE_PHONE              = FIRST_SYSTEM_WINDOW+2;
 
         /**
          * Window type: system window, such as low power alert. These windows
          * are always on top of application windows.
          * In multiuser systems shows only on the owning user's window.
+         * @deprecated for non-system apps. Use {@link #TYPE_APPLICATION_OVERLAY} instead.
          */
+        @Deprecated
         public static final int TYPE_SYSTEM_ALERT       = FIRST_SYSTEM_WINDOW+3;
 
         /**
@@ -482,7 +491,9 @@
         /**
          * Window type: transient notifications.
          * In multiuser systems shows only on the owning user's window.
+         * @deprecated for non-system apps. Use {@link #TYPE_APPLICATION_OVERLAY} instead.
          */
+        @Deprecated
         public static final int TYPE_TOAST              = FIRST_SYSTEM_WINDOW+5;
 
         /**
@@ -490,7 +501,9 @@
          * on top of everything else.  These windows must not take input
          * focus, or they will interfere with the keyguard.
          * In multiuser systems shows only on the owning user's window.
+         * @deprecated for non-system apps. Use {@link #TYPE_APPLICATION_OVERLAY} instead.
          */
+        @Deprecated
         public static final int TYPE_SYSTEM_OVERLAY     = FIRST_SYSTEM_WINDOW+6;
 
         /**
@@ -498,7 +511,9 @@
          * the keyguard is active.  These windows must not take input
          * focus, or they will interfere with the keyguard.
          * In multiuser systems shows on all users' windows.
+         * @deprecated for non-system apps. Use {@link #TYPE_APPLICATION_OVERLAY} instead.
          */
+        @Deprecated
         public static final int TYPE_PRIORITY_PHONE     = FIRST_SYSTEM_WINDOW+7;
 
         /**
@@ -517,7 +532,9 @@
          * Window type: internal system error windows, appear on top of
          * everything they can.
          * In multiuser systems shows only on the owning user's window.
+         * @deprecated for non-system apps. Use {@link #TYPE_APPLICATION_OVERLAY} instead.
          */
+        @Deprecated
         public static final int TYPE_SYSTEM_ERROR       = FIRST_SYSTEM_WINDOW+10;
 
         /**
@@ -703,10 +720,47 @@
         public static final int TYPE_PRESENTATION = FIRST_SYSTEM_WINDOW + 37;
 
         /**
+         * Window type: Application overlay windows are displayed above all activity windows
+         * (types between {@link #FIRST_APPLICATION_WINDOW} and {@link #LAST_APPLICATION_WINDOW})
+         * but below critical system windows like the status bar or IME.
+         * <p>
+         * The system may change the position, size, or visibility of these windows at anytime
+         * to reduce visual clutter to the user and also manage resources.
+         * <p>
+         * Requires {@link android.Manifest.permission#SYSTEM_ALERT_WINDOW} permission.
+         * <p>
+         * The system will adjust the importance of processes with this window type to reduce the
+         * chance of the low-memory-killer killing them.
+         * <p>
+         * In multi-user systems shows only on the owning user's screen.
+         */
+        public static final int TYPE_APPLICATION_OVERLAY = FIRST_SYSTEM_WINDOW + 38;
+
+        /**
          * End of types of system windows.
          */
         public static final int LAST_SYSTEM_WINDOW      = 2999;
 
+        /**
+         * Return true if the window type is an alert window.
+         *
+         * @param type The window type.
+         * @return If the window type is an alert window.
+         * @hide
+         */
+        public static boolean isSystemAlertWindowType(int type) {
+            switch (type) {
+                case TYPE_PHONE:
+                case TYPE_PRIORITY_PHONE:
+                case TYPE_SYSTEM_ALERT:
+                case TYPE_SYSTEM_ERROR:
+                case TYPE_SYSTEM_OVERLAY:
+                case TYPE_APPLICATION_OVERLAY:
+                    return true;
+            }
+            return false;
+        }
+
         /** @deprecated this is ignored, this value is set automatically when needed. */
         @Deprecated
         public static final int MEMORY_TYPE_NORMAL = 0;
@@ -1492,24 +1546,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/WindowManagerGlobal.java b/core/java/android/view/WindowManagerGlobal.java
index fc6448a..c7e8dee 100644
--- a/core/java/android/view/WindowManagerGlobal.java
+++ b/core/java/android/view/WindowManagerGlobal.java
@@ -167,8 +167,10 @@
                 sWindowManagerService = IWindowManager.Stub.asInterface(
                         ServiceManager.getService("window"));
                 try {
-                    sWindowManagerService = getWindowManagerService();
-                    ValueAnimator.setDurationScale(sWindowManagerService.getCurrentAnimatorScale());
+                    if (sWindowManagerService != null) {
+                        ValueAnimator.setDurationScale(
+                                sWindowManagerService.getCurrentAnimatorScale());
+                    }
                 } catch (RemoteException e) {
                     throw e.rethrowFromSystemServer();
                 }
diff --git a/core/java/android/view/WindowManagerInternal.java b/core/java/android/view/WindowManagerInternal.java
index 6e2a92c..a541a4c 100644
--- a/core/java/android/view/WindowManagerInternal.java
+++ b/core/java/android/view/WindowManagerInternal.java
@@ -282,6 +282,28 @@
     public abstract void clearLastInputMethodWindowForTransition();
 
     /**
+     * Notifies WindowManagerService that the current IME window status is being changed.
+     *
+     * <p>Only {@link com.android.server.InputMethodManagerService} is the expected and tested
+     * caller of this method.</p>
+     *
+     * @param imeToken token to track the active input method. Corresponding IME windows can be
+     *                 identified by checking {@link android.view.WindowManager.LayoutParams#token}.
+     *                 Note that there is no guarantee that the corresponding window is already
+     *                 created
+     * @param imeWindowVisible whether the active IME thinks that its window should be visible or
+     *                         hidden, no matter how WindowManagerService will react / has reacted
+     *                         to corresponding API calls.  Note that this state is not guaranteed
+     *                         to be synchronized with state in WindowManagerService.
+     * @param targetWindowToken token to identify the target window that the IME is associated with.
+     *                          {@code null} when application, system, or the IME itself decided to
+     *                          change its window visibility before being associated with any target
+     *                          window.
+     */
+    public abstract void updateInputMethodWindowStatus(@NonNull IBinder imeToken,
+            boolean imeWindowVisible, @Nullable IBinder targetWindowToken);
+
+    /**
       * Returns true when the hardware keyboard is available.
       */
     public abstract boolean isHardKeyboardAvailable();
diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java
index bc4ae6d..2617d45 100644
--- a/core/java/android/view/WindowManagerPolicy.java
+++ b/core/java/android/view/WindowManagerPolicy.java
@@ -16,6 +16,51 @@
 
 package android.view;
 
+import static android.view.WindowManager.LayoutParams.FIRST_APPLICATION_WINDOW;
+import static android.view.WindowManager.LayoutParams.LAST_APPLICATION_WINDOW;
+import static android.view.WindowManager.LayoutParams.TYPE_ACCESSIBILITY_OVERLAY;
+import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_ABOVE_SUB_PANEL;
+import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG;
+import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA;
+import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA_OVERLAY;
+import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
+import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_PANEL;
+import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_SUB_PANEL;
+import static android.view.WindowManager.LayoutParams.TYPE_BOOT_PROGRESS;
+import static android.view.WindowManager.LayoutParams.TYPE_DISPLAY_OVERLAY;
+import static android.view.WindowManager.LayoutParams.TYPE_DOCK_DIVIDER;
+import static android.view.WindowManager.LayoutParams.TYPE_DRAG;
+import static android.view.WindowManager.LayoutParams.TYPE_DREAM;
+import static android.view.WindowManager.LayoutParams.TYPE_INPUT_CONSUMER;
+import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD;
+import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD_DIALOG;
+import static android.view.WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG;
+import static android.view.WindowManager.LayoutParams.TYPE_MAGNIFICATION_OVERLAY;
+import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR;
+import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL;
+import static android.view.WindowManager.LayoutParams.TYPE_PHONE;
+import static android.view.WindowManager.LayoutParams.TYPE_POINTER;
+import static android.view.WindowManager.LayoutParams.TYPE_PRESENTATION;
+import static android.view.WindowManager.LayoutParams.TYPE_PRIORITY_PHONE;
+import static android.view.WindowManager.LayoutParams.TYPE_PRIVATE_PRESENTATION;
+import static android.view.WindowManager.LayoutParams.TYPE_QS_DIALOG;
+import static android.view.WindowManager.LayoutParams.TYPE_SCREENSHOT;
+import static android.view.WindowManager.LayoutParams.TYPE_SEARCH_BAR;
+import static android.view.WindowManager.LayoutParams.TYPE_SECURE_SYSTEM_OVERLAY;
+import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR;
+import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL;
+import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_SUB_PANEL;
+import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
+import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG;
+import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ERROR;
+import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY;
+import static android.view.WindowManager.LayoutParams.TYPE_TOAST;
+import static android.view.WindowManager.LayoutParams.TYPE_VOICE_INTERACTION;
+import static android.view.WindowManager.LayoutParams.TYPE_VOICE_INTERACTION_STARTING;
+import static android.view.WindowManager.LayoutParams.TYPE_VOLUME_OVERLAY;
+import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER;
+import static android.view.WindowManager.LayoutParams.isSystemAlertWindowType;
+
 import android.annotation.IntDef;
 import android.annotation.Nullable;
 import android.annotation.SystemApi;
@@ -30,6 +75,7 @@
 import android.os.IBinder;
 import android.os.Looper;
 import android.os.RemoteException;
+import android.util.Slog;
 import android.view.animation.Animation;
 
 import com.android.internal.policy.IKeyguardDismissCallback;
@@ -423,6 +469,14 @@
         public boolean isInputMethodWindow();
 
         public int getDisplayId();
+
+        /**
+         * Returns true if the window owner can add internal system windows.
+         * That is, they have {@link android.Manifest.permission#INTERNAL_SYSTEM_WINDOW}.
+         */
+        default boolean canAddInternalSystemWindow() {
+            return false;
+        }
     }
 
     /**
@@ -659,27 +713,181 @@
             int navigationPresence);
 
     /**
-     * Assign a window type to a layer.  Allows you to control how different
+     * Returns the layer assignment for the window state. Allows you to control how different
+     * kinds of windows are ordered on-screen.
+     *
+     * @param win The window state
+     * @return int An arbitrary integer used to order windows, with lower numbers below higher ones.
+     */
+    default int getWindowLayerLw(WindowState win) {
+        return getWindowLayerFromTypeLw(win.getBaseType(), win.canAddInternalSystemWindow());
+    }
+
+    /**
+     * Returns the layer assignment for the window type. Allows you to control how different
      * kinds of windows are ordered on-screen.
      *
      * @param type The type of window being assigned.
-     *
-     * @return int An arbitrary integer used to order windows, with lower
-     *         numbers below higher ones.
+     * @return int An arbitrary integer used to order windows, with lower numbers below higher ones.
      */
-    public int windowTypeToLayerLw(int type);
+    default int getWindowLayerFromTypeLw(int type) {
+        if (isSystemAlertWindowType(type)) {
+            throw new IllegalArgumentException("Use getWindowLayerFromTypeLw() or"
+                    + " getWindowLayerLw() for alert window types");
+        }
+        return getWindowLayerFromTypeLw(type, false /* canAddInternalSystemWindow */);
+    }
 
     /**
-     * Return how to Z-order sub-windows in relation to the window they are
-     * attached to.  Return positive to have them ordered in front, negative for
-     * behind.
+     * Returns the layer assignment for the window type. Allows you to control how different
+     * kinds of windows are ordered on-screen.
+     *
+     * @param type The type of window being assigned.
+     * @param canAddInternalSystemWindow If the owner window associated with the type we are
+     *        evaluating can add internal system windows. I.e they have
+     *        {@link android.Manifest.permission#INTERNAL_SYSTEM_WINDOW}. If true, alert window
+     *        types {@link android.view.WindowManager.LayoutParams#isSystemAlertWindowType(int)}
+     *        can be assigned layers greater than the layer for
+     *        {@link android.view.WindowManager.LayoutParams#TYPE_APPLICATION_OVERLAY} Else, their
+     *        layers would be lesser.
+     * @return int An arbitrary integer used to order windows, with lower numbers below higher ones.
+     */
+    default int getWindowLayerFromTypeLw(int type, boolean canAddInternalSystemWindow) {
+        if (type >= FIRST_APPLICATION_WINDOW && type <= LAST_APPLICATION_WINDOW) {
+            return APPLICATION_LAYER;
+        }
+
+        switch (type) {
+            case TYPE_WALLPAPER:
+                // wallpaper is at the bottom, though the window manager may move it.
+                return  1;
+            case TYPE_PRESENTATION:
+            case TYPE_PRIVATE_PRESENTATION:
+                return  APPLICATION_LAYER;
+            case TYPE_DOCK_DIVIDER:
+                return  APPLICATION_LAYER;
+            case TYPE_QS_DIALOG:
+                return  APPLICATION_LAYER;
+            case TYPE_PHONE:
+                return  3;
+            case TYPE_SEARCH_BAR:
+            case TYPE_VOICE_INTERACTION_STARTING:
+                return  4;
+            case TYPE_VOICE_INTERACTION:
+                // voice interaction layer is almost immediately above apps.
+                return  5;
+            case TYPE_INPUT_CONSUMER:
+                return  6;
+            case TYPE_SYSTEM_DIALOG:
+                return  7;
+            case TYPE_TOAST:
+                // toasts and the plugged-in battery thing
+                return  8;
+            case TYPE_PRIORITY_PHONE:
+                // SIM errors and unlock.  Not sure if this really should be in a high layer.
+                return  9;
+            case TYPE_SYSTEM_ALERT:
+                // like the ANR / app crashed dialogs
+                return  canAddInternalSystemWindow ? 11 : 10;
+            case TYPE_APPLICATION_OVERLAY:
+                return  12;
+            case TYPE_DREAM:
+                // used for Dreams (screensavers with TYPE_DREAM windows)
+                return  13;
+            case TYPE_INPUT_METHOD:
+                // on-screen keyboards and other such input method user interfaces go here.
+                return  14;
+            case TYPE_INPUT_METHOD_DIALOG:
+                // on-screen keyboards and other such input method user interfaces go here.
+                return  15;
+            case TYPE_STATUS_BAR_SUB_PANEL:
+                return  17;
+            case TYPE_STATUS_BAR:
+                return  18;
+            case TYPE_STATUS_BAR_PANEL:
+                return  19;
+            case TYPE_KEYGUARD_DIALOG:
+                return  20;
+            case TYPE_VOLUME_OVERLAY:
+                // the on-screen volume indicator and controller shown when the user
+                // changes the device volume
+                return  21;
+            case TYPE_SYSTEM_OVERLAY:
+                // the on-screen volume indicator and controller shown when the user
+                // changes the device volume
+                return  canAddInternalSystemWindow ? 22 : 11;
+            case TYPE_NAVIGATION_BAR:
+                // the navigation bar, if available, shows atop most things
+                return  23;
+            case TYPE_NAVIGATION_BAR_PANEL:
+                // some panels (e.g. search) need to show on top of the navigation bar
+                return  24;
+            case TYPE_SCREENSHOT:
+                // screenshot selection layer shouldn't go above system error, but it should cover
+                // navigation bars at the very least.
+                return  25;
+            case TYPE_SYSTEM_ERROR:
+                // system-level error dialogs
+                return  canAddInternalSystemWindow ? 26 : 10;
+            case TYPE_MAGNIFICATION_OVERLAY:
+                // used to highlight the magnified portion of a display
+                return  27;
+            case TYPE_DISPLAY_OVERLAY:
+                // used to simulate secondary display devices
+                return  28;
+            case TYPE_DRAG:
+                // the drag layer: input for drag-and-drop is associated with this window,
+                // which sits above all other focusable windows
+                return  29;
+            case TYPE_ACCESSIBILITY_OVERLAY:
+                // overlay put by accessibility services to intercept user interaction
+                return  30;
+            case TYPE_SECURE_SYSTEM_OVERLAY:
+                return  31;
+            case TYPE_BOOT_PROGRESS:
+                return  32;
+            case TYPE_POINTER:
+                // the (mouse) pointer layer
+                return  33;
+            default:
+                Slog.e("WindowManager", "Unknown window type: " + type);
+                return APPLICATION_LAYER;
+        }
+    }
+
+    int APPLICATION_LAYER = 2;
+    int APPLICATION_MEDIA_SUBLAYER = -2;
+    int APPLICATION_MEDIA_OVERLAY_SUBLAYER = -1;
+    int APPLICATION_PANEL_SUBLAYER = 1;
+    int APPLICATION_SUB_PANEL_SUBLAYER = 2;
+    int APPLICATION_ABOVE_SUB_PANEL_SUBLAYER = 3;
+
+    /**
+     * Return how to Z-order sub-windows in relation to the window they are attached to.
+     * Return positive to have them ordered in front, negative for behind.
      *
      * @param type The sub-window type code.
      *
      * @return int Layer in relation to the attached window, where positive is
      *         above and negative is below.
      */
-    public int subWindowTypeToLayerLw(int type);
+    default int getSubWindowLayerFromTypeLw(int type) {
+        switch (type) {
+            case TYPE_APPLICATION_PANEL:
+            case TYPE_APPLICATION_ATTACHED_DIALOG:
+                return APPLICATION_PANEL_SUBLAYER;
+            case TYPE_APPLICATION_MEDIA:
+                return APPLICATION_MEDIA_SUBLAYER;
+            case TYPE_APPLICATION_MEDIA_OVERLAY:
+                return APPLICATION_MEDIA_OVERLAY_SUBLAYER;
+            case TYPE_APPLICATION_SUB_PANEL:
+                return APPLICATION_SUB_PANEL_SUBLAYER;
+            case TYPE_APPLICATION_ABOVE_SUB_PANEL:
+                return APPLICATION_ABOVE_SUB_PANEL_SUBLAYER;
+        }
+        Slog.e("WindowManager", "Unknown sub-window type: " + type);
+        return 0;
+    }
 
     /**
      * Get the highest layer (actually one more than) that the wallpaper is
diff --git a/core/java/android/view/accessibility/AccessibilityCache.java b/core/java/android/view/accessibility/AccessibilityCache.java
index db2ea48..143c49a 100644
--- a/core/java/android/view/accessibility/AccessibilityCache.java
+++ b/core/java/android/view/accessibility/AccessibilityCache.java
@@ -554,7 +554,7 @@
     // Layer of indirection included to break dependency chain for testing
     public static class AccessibilityNodeRefresher {
         public boolean refreshNode(AccessibilityNodeInfo info, boolean bypassCache) {
-            return info.refresh(bypassCache);
+            return info.refresh(null, bypassCache);
         }
     }
 }
diff --git a/core/java/android/view/accessibility/AccessibilityInteractionClient.java b/core/java/android/view/accessibility/AccessibilityInteractionClient.java
index 1543597..828583c 100644
--- a/core/java/android/view/accessibility/AccessibilityInteractionClient.java
+++ b/core/java/android/view/accessibility/AccessibilityInteractionClient.java
@@ -159,7 +159,7 @@
     public AccessibilityNodeInfo getRootInActiveWindow(int connectionId) {
         return findAccessibilityNodeInfoByAccessibilityId(connectionId,
                 AccessibilityNodeInfo.ACTIVE_WINDOW_ID, AccessibilityNodeInfo.ROOT_NODE_ID,
-                false, AccessibilityNodeInfo.FLAG_PREFETCH_DESCENDANTS);
+                false, AccessibilityNodeInfo.FLAG_PREFETCH_DESCENDANTS, null);
     }
 
     /**
@@ -259,7 +259,7 @@
      */
     public AccessibilityNodeInfo findAccessibilityNodeInfoByAccessibilityId(int connectionId,
             int accessibilityWindowId, long accessibilityNodeId, boolean bypassCache,
-            int prefetchFlags) {
+            int prefetchFlags, Bundle arguments) {
         if ((prefetchFlags & AccessibilityNodeInfo.FLAG_PREFETCH_SIBLINGS) != 0
                 && (prefetchFlags & AccessibilityNodeInfo.FLAG_PREFETCH_PREDECESSORS) == 0) {
             throw new IllegalArgumentException("FLAG_PREFETCH_SIBLINGS"
@@ -285,9 +285,8 @@
                 final long identityToken = Binder.clearCallingIdentity();
                 final boolean success = connection.findAccessibilityNodeInfoByAccessibilityId(
                         accessibilityWindowId, accessibilityNodeId, interactionId, this,
-                        prefetchFlags, Thread.currentThread().getId());
+                        prefetchFlags, Thread.currentThread().getId(), arguments);
                 Binder.restoreCallingIdentity(identityToken);
-                // If the scale is zero the call has failed.
                 if (success) {
                     List<AccessibilityNodeInfo> infos = getFindAccessibilityNodeInfosResultAndClear(
                             interactionId);
diff --git a/core/java/android/view/accessibility/AccessibilityManager.java b/core/java/android/view/accessibility/AccessibilityManager.java
index 1ef0d17..45302b6 100644
--- a/core/java/android/view/accessibility/AccessibilityManager.java
+++ b/core/java/android/view/accessibility/AccessibilityManager.java
@@ -779,6 +779,49 @@
         }
     }
 
+    /**
+     * Notifies that the accessibility button in the system's navigation area has been clicked
+     *
+     * @hide
+     */
+    public void notifyAccessibilityButtonClicked() {
+        final IAccessibilityManager service;
+        synchronized (mLock) {
+            service = getServiceLocked();
+            if (service == null) {
+                return;
+            }
+        }
+        try {
+            service.notifyAccessibilityButtonClicked();
+        } catch (RemoteException re) {
+            Log.e(LOG_TAG, "Error while dispatching accessibility button click", re);
+        }
+    }
+
+    /**
+     * Notifies that the availability of the accessibility button in the system's navigation area
+     * has changed.
+     *
+     * @param available {@code true} if the accessibility button is available within the system
+     *                  navigation area, {@code false} otherwise
+     * @hide
+     */
+    public void notifyAccessibilityButtonAvailabilityChanged(boolean available) {
+        final IAccessibilityManager service;
+        synchronized (mLock) {
+            service = getServiceLocked();
+            if (service == null) {
+                return;
+            }
+        }
+        try {
+            service.notifyAccessibilityButtonAvailabilityChanged(available);
+        } catch (RemoteException re) {
+            Log.e(LOG_TAG, "Error while dispatching accessibility button availability change", re);
+        }
+    }
+
     private IAccessibilityManager getServiceLocked() {
         if (mService == null) {
             tryConnectToServiceLocked(null);
diff --git a/core/java/android/view/accessibility/AccessibilityNodeInfo.java b/core/java/android/view/accessibility/AccessibilityNodeInfo.java
index 56d45b0..67d7ff8 100644
--- a/core/java/android/view/accessibility/AccessibilityNodeInfo.java
+++ b/core/java/android/view/accessibility/AccessibilityNodeInfo.java
@@ -16,6 +16,8 @@
 
 package android.view.accessibility;
 
+import static java.util.Collections.EMPTY_LIST;
+
 import android.accessibilityservice.AccessibilityService;
 import android.accessibilityservice.AccessibilityServiceInfo;
 import android.annotation.Nullable;
@@ -517,6 +519,46 @@
      */
     public static final int MOVEMENT_GRANULARITY_PAGE = 0x00000010;
 
+    /**
+     * Key used to request and locate extra data for text character location. This key requests that
+     * an array of {@link android.graphics.RectF}s be added to the extras. This request is made with
+     * {@link #refreshWithExtraData(String, Bundle)}. The arguments taken by this request are two
+     * integers: {@link #EXTRA_DATA_TEXT_CHARACTER_LOCATION_ARG_START_INDEX} and
+     * {@link #EXTRA_DATA_TEXT_CHARACTER_LOCATION_ARG_LENGTH}. The starting index must be valid
+     * inside the CharSequence returned by {@link #getText()}, and the length must be positive.
+     * <p>
+     * The data can be retrieved from the {@code Bundle} returned by {@link #getExtras()} using this
+     * string as a key for {@link Bundle#getParcelableArray(String)}. The
+     * {@link android.graphics.RectF} will be null for characters that either do not exist or are
+     * off the screen.
+     *
+     * {@see #refreshWithExtraData(String, Bundle)}
+     */
+    public static final String EXTRA_DATA_TEXT_CHARACTER_LOCATION_KEY =
+            "android.view.accessibility.extra.DATA_TEXT_CHARACTER_LOCATION_KEY";
+
+    /**
+     * Integer argument specifying the start index of the requested text location data. Must be
+     * valid inside the CharSequence returned by {@link #getText()}.
+     *
+     * {@see EXTRA_DATA_TEXT_CHARACTER_LOCATION_KEY}
+     */
+    public static final String EXTRA_DATA_TEXT_CHARACTER_LOCATION_ARG_START_INDEX =
+            "android.view.accessibility.extra.DATA_TEXT_CHARACTER_LOCATION_ARG_START_INDEX";
+
+    /**
+     * Integer argument specifying the end index of the requested text location data. Must be
+     * positive.
+     *
+     * {@see EXTRA_DATA_TEXT_CHARACTER_LOCATION_KEY}
+     */
+    public static final String EXTRA_DATA_TEXT_CHARACTER_LOCATION_ARG_LENGTH =
+            "android.view.accessibility.extra.DATA_TEXT_CHARACTER_LOCATION_ARG_LENGTH";
+
+    /** @hide */
+    public static final String EXTRA_DATA_REQUESTED_KEY =
+            "android.view.accessibility.AccessibilityNodeInfo.extra_data_requested";
+
     // Boolean attributes.
 
     private static final int BOOLEAN_PROPERTY_CHECKABLE = 0x00000001;
@@ -651,6 +693,7 @@
     private CharSequence mError;
     private CharSequence mContentDescription;
     private String mViewIdResourceName;
+    private ArrayList<String> mExtraDataKeys;
 
     private LongArray mChildNodeIds;
     private ArrayList<AccessibilityAction> mActions;
@@ -786,14 +829,14 @@
      *
      * @hide
      */
-    public boolean refresh(boolean bypassCache) {
+    public boolean refresh(Bundle arguments, boolean bypassCache) {
         enforceSealed();
         if (!canPerformRequestOverConnection(mSourceNodeId)) {
             return false;
         }
         AccessibilityInteractionClient client = AccessibilityInteractionClient.getInstance();
         AccessibilityNodeInfo refreshedInfo = client.findAccessibilityNodeInfoByAccessibilityId(
-                mConnectionId, mWindowId, mSourceNodeId, bypassCache, 0);
+                mConnectionId, mWindowId, mSourceNodeId, bypassCache, 0, arguments);
         if (refreshedInfo == null) {
             return false;
         }
@@ -804,15 +847,33 @@
 
     /**
      * Refreshes this info with the latest state of the view it represents.
-     * <p>
-     * <strong>Note:</strong> If this method returns false this info is obsolete
-     * since it represents a view that is no longer in the view tree and should
-     * be recycled.
-     * </p>
-     * @return Whether the refresh succeeded.
+     *
+     * @return {@code true} if the refresh succeeded. {@code false} if the {@link View} represented
+     * by this node is no longer in the view tree (and thus this node is obsolete and should be
+     * recycled).
      */
     public boolean refresh() {
-        return refresh(true);
+        return refresh(null, true);
+    }
+
+    /**
+     * Refreshes this info with the latest state of the view it represents, and request new
+     * data be added by the View.
+     *
+     * @param extraDataKey A bitmask of the extra data requested. Data that must be requested
+     *                     with this mechanism is generally expensive to retrieve, so should only be
+     *                     requested when needed. See
+     *                     {@link #EXTRA_DATA_TEXT_CHARACTER_LOCATION_KEY} and
+     *                     {@link #getAvailableExtraData()}.
+     * @param args A bundle of arguments for the request. These depend on the particular request.
+     *
+     * @return {@code true} if the refresh succeeded. {@code false} if the {@link View} represented
+     * by this node is no longer in the view tree (and thus this node is obsolete and should be
+     * recycled).
+     */
+    public boolean refreshWithExtraData(String extraDataKey, Bundle args) {
+        args.putString(EXTRA_DATA_REQUESTED_KEY, extraDataKey);
+        return refresh(args, true);
     }
 
     /**
@@ -872,7 +933,7 @@
         final long childId = mChildNodeIds.get(index);
         AccessibilityInteractionClient client = AccessibilityInteractionClient.getInstance();
         return client.findAccessibilityNodeInfoByAccessibilityId(mConnectionId, mWindowId,
-                childId, false, FLAG_PREFETCH_DESCENDANTS);
+                childId, false, FLAG_PREFETCH_DESCENDANTS, null);
     }
 
     /**
@@ -1263,6 +1324,45 @@
     }
 
     /**
+     * Get the extra data available for this node.
+     * <p>
+     * Some data that is useful for some accessibility services is expensive to compute, and would
+     * place undue overhead on apps to compute all the time. That data can be requested with
+     * {@link #refreshWithExtraData(String, Bundle)}.
+     *
+     * @return An unmodifiable list of keys corresponding to extra data that can be requested.
+     * @see #EXTRA_DATA_TEXT_CHARACTER_LOCATION_KEY
+     */
+    public List<String> getAvailableExtraData() {
+        if (mExtraDataKeys != null) {
+            return Collections.unmodifiableList(mExtraDataKeys);
+        } else {
+            return EMPTY_LIST;
+        }
+    }
+
+    /**
+     * Set the extra data available for this node.
+     * <p>
+     * <strong>Note:</strong> When a {@code View} passes in a non-empty list, it promises that
+     * it will populate the node's extras with corresponding pieces of information in
+     * {@link View#addExtraDataToAccessibilityNodeInfo(AccessibilityNodeInfo, String, Bundle)}.
+     * <p>
+     * <strong>Note:</strong> Cannot be called from an
+     * {@link android.accessibilityservice.AccessibilityService}.
+     * This class is made immutable before being delivered to an AccessibilityService.
+     *
+     * @param extraDataKeys A list of types of extra data that are available.
+     * @see #getAvailableExtraData()
+     *
+     * @throws IllegalStateException If called from an AccessibilityService.
+     */
+    public void setAvailableExtraData(List<String> extraDataKeys) {
+        enforceNotSealed();
+        mExtraDataKeys = new ArrayList<>(extraDataKeys);
+    }
+
+    /**
      * Sets the maximum text length, or -1 for no limit.
      * <p>
      * Typically used to indicate that an editable text field has a limit on
@@ -2658,6 +2758,14 @@
     }
 
     /**
+     * Check if a node has an extras bundle
+     * @hide
+     */
+    public boolean hasExtras() {
+        return mExtras != null;
+    }
+
+    /**
      * Gets the value of a boolean property.
      *
      * @param property The property.
@@ -2955,6 +3063,12 @@
         parcel.writeInt(mInputType);
         parcel.writeInt(mLiveRegion);
         parcel.writeInt(mDrawingOrderInParent);
+        if (mExtraDataKeys != null) {
+            parcel.writeInt(1);
+            parcel.writeStringList(mExtraDataKeys);
+        } else {
+            parcel.writeInt(0);
+        }
 
         if (mExtras != null) {
             parcel.writeInt(1);
@@ -3054,6 +3168,8 @@
         mInputType = other.mInputType;
         mLiveRegion = other.mLiveRegion;
         mDrawingOrderInParent = other.mDrawingOrderInParent;
+        mExtraDataKeys = other.mExtraDataKeys;
+
         if (other.mExtras != null) {
             mExtras = new Bundle(other.mExtras);
         } else {
@@ -3137,6 +3253,12 @@
         mDrawingOrderInParent = parcel.readInt();
 
         if (parcel.readInt() == 1) {
+            mExtraDataKeys = parcel.createStringArrayList();
+        } else {
+            mExtraDataKeys = null;
+        }
+
+        if (parcel.readInt() == 1) {
             mExtras = parcel.readBundle();
         } else {
             mExtras = null;
@@ -3193,6 +3315,7 @@
         mBoundsInScreen.set(0, 0, 0, 0);
         mBooleanProperties = 0;
         mDrawingOrderInParent = 0;
+        mExtraDataKeys = null;
         mPackageName = null;
         mClassName = null;
         mText = null;
@@ -3455,7 +3578,7 @@
         AccessibilityInteractionClient client = AccessibilityInteractionClient.getInstance();
         return client.findAccessibilityNodeInfoByAccessibilityId(mConnectionId,
                 mWindowId, accessibilityId, false, FLAG_PREFETCH_PREDECESSORS
-                        | FLAG_PREFETCH_DESCENDANTS | FLAG_PREFETCH_SIBLINGS);
+                        | FLAG_PREFETCH_DESCENDANTS | FLAG_PREFETCH_SIBLINGS, null);
     }
 
     /**
diff --git a/core/java/android/view/accessibility/AccessibilityNodeProvider.java b/core/java/android/view/accessibility/AccessibilityNodeProvider.java
index abcbb70..722b659 100644
--- a/core/java/android/view/accessibility/AccessibilityNodeProvider.java
+++ b/core/java/android/view/accessibility/AccessibilityNodeProvider.java
@@ -102,6 +102,27 @@
     }
 
     /**
+     * Adds extra data to an {@link AccessibilityNodeInfo} based on an explicit request for the
+     * additional data.
+     * <p>
+     * This method only needs to be implemented if a virtual view offers to provide additional
+     * data.
+     * </p>
+     *
+     * @param virtualViewId The virtual view id used to create the node
+     * @param info The info to which to add the extra data
+     * @param extraDataKey A key specifying the type of extra data to add to the info. The
+     *                     extra data should be added to the {@link Bundle} returned by
+     *                     the info's {@link AccessibilityNodeInfo#getExtras} method.
+     * @param arguments A {@link Bundle} holding any arguments relevant for this request.
+     *
+     * @see AccessibilityNodeInfo#setExtraAvailableData
+     */
+    public void addExtraDataToAccessibilityNodeInfo(
+            int virtualViewId, AccessibilityNodeInfo info, String extraDataKey, Bundle arguments) {
+    }
+
+    /**
      * Performs an accessibility action on a virtual view, i.e. a descendant of the
      * host View, with the given <code>virtualViewId</code> or the host View itself
      * if <code>virtualViewId</code> equals to {@link #HOST_VIEW_ID}.
diff --git a/core/java/android/view/accessibility/AccessibilityWindowInfo.java b/core/java/android/view/accessibility/AccessibilityWindowInfo.java
index 3287298..c390406 100644
--- a/core/java/android/view/accessibility/AccessibilityWindowInfo.java
+++ b/core/java/android/view/accessibility/AccessibilityWindowInfo.java
@@ -183,7 +183,7 @@
         AccessibilityInteractionClient client = AccessibilityInteractionClient.getInstance();
         return client.findAccessibilityNodeInfoByAccessibilityId(mConnectionId,
                 mId, AccessibilityNodeInfo.ROOT_NODE_ID,
-                true, AccessibilityNodeInfo.FLAG_PREFETCH_DESCENDANTS);
+                true, AccessibilityNodeInfo.FLAG_PREFETCH_DESCENDANTS, null);
     }
 
     /**
@@ -209,7 +209,7 @@
 
         AccessibilityInteractionClient client = AccessibilityInteractionClient.getInstance();
         return client.findAccessibilityNodeInfoByAccessibilityId(mConnectionId,
-                mParentId, mAnchorId, true, 0);
+                mParentId, mAnchorId, true, 0, null);
     }
 
     /**
diff --git a/core/java/android/view/accessibility/IAccessibilityInteractionConnection.aidl b/core/java/android/view/accessibility/IAccessibilityInteractionConnection.aidl
index cecc4af..4c0fdfd 100644
--- a/core/java/android/view/accessibility/IAccessibilityInteractionConnection.aidl
+++ b/core/java/android/view/accessibility/IAccessibilityInteractionConnection.aidl
@@ -33,7 +33,8 @@
 
     void findAccessibilityNodeInfoByAccessibilityId(long accessibilityNodeId, in Region bounds,
         int interactionId, IAccessibilityInteractionConnectionCallback callback, int flags,
-        int interrogatingPid, long interrogatingTid, in MagnificationSpec spec);
+        int interrogatingPid, long interrogatingTid, in MagnificationSpec spec,
+        in Bundle arguments);
 
     void findAccessibilityNodeInfosByViewId(long accessibilityNodeId, String viewId,
         in Region bounds, int interactionId, IAccessibilityInteractionConnectionCallback callback,
diff --git a/core/java/android/view/accessibility/IAccessibilityManager.aidl b/core/java/android/view/accessibility/IAccessibilityManager.aidl
index 136bbbe..8fde47a 100644
--- a/core/java/android/view/accessibility/IAccessibilityManager.aidl
+++ b/core/java/android/view/accessibility/IAccessibilityManager.aidl
@@ -59,6 +59,10 @@
 
     IBinder getWindowToken(int windowId, int userId);
 
+    void notifyAccessibilityButtonClicked();
+
+    void notifyAccessibilityButtonAvailabilityChanged(boolean available);
+
     // Requires WRITE_SECURE_SETTINGS
     void performAccessibilityShortcut();
 
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/AutoFillManager.java b/core/java/android/view/autofill/AutoFillManager.java
index f2f522d..f7a1b61 100644
--- a/core/java/android/view/autofill/AutoFillManager.java
+++ b/core/java/android/view/autofill/AutoFillManager.java
@@ -16,92 +16,249 @@
 
 package android.view.autofill;
 
-import android.annotation.Nullable;
 import android.content.Context;
+import android.content.Intent;
+import android.content.IntentSender;
 import android.graphics.Rect;
+import android.os.Bundle;
+import android.os.IBinder;
+import android.os.Parcelable;
 import android.os.RemoteException;
-import android.service.autofill.IAutoFillManagerService;
+import android.util.ArrayMap;
 import android.util.Log;
 import android.view.View;
 
+import java.lang.ref.WeakReference;
+import java.util.List;
+
 /**
  * App entry point to the AutoFill Framework.
  */
 // TODO(b/33197203): improve this javadoc
+//TODO(b/33197203): restrict manager calls to activity
 public final class AutoFillManager {
+    private static final boolean DEBUG = false;
 
     private static final String TAG = "AutoFillManager";
-    private static final boolean DEBUG = true; // TODO(b/33197203): change to false once stable
 
     /**
-     * Flag used to show the auto-fill UI affordance for a view.
+     * Intent extra: The assist structure which captures the filled screen.
+     * <p>
+     * Type: {@link android.app.assist.AssistStructure}
+     * </p>
      */
-    public static final int FLAG_UPDATE_UI_SHOW = 0x1;
+    public static final String EXTRA_ASSIST_STRUCTURE =
+            "android.view.autofill.extra.ASSIST_STRUCTURE";
 
     /**
-     * Flag used to hide the auto-fill UI affordance for a view.
+     * Intent extra: The result of an authentication operation. It is
+     * either a fully populated {@link android.service.autofill.FillResponse}
+     * or a fully populated {@link android.service.autofill.Dataset} if
+     * a response or a dataset is being authenticated respectively.
+     *
+     * <p>
+     * Type: {@link android.service.autofill.FillResponse} or a
+     * {@link android.service.autofill.Dataset}
+     * </p>
      */
-    public static final int FLAG_UPDATE_UI_HIDE = 0x2;
+    public static final String EXTRA_AUTHENTICATION_RESULT =
+            "android.view.autofill.extra.AUTHENTICATION_RESULT";
 
-    private final IAutoFillManagerService mService;
+    /** @hide */ public static final int FLAG_START_SESSION = 0x1;
+    /** @hide */ public static final int FLAG_FOCUS_GAINED = 0x2;
+    /** @hide */ public static final int FLAG_FOCUS_LOST = 0x4;
+    /** @hide */ public static final int FLAG_VALUE_CHANGED = 0x8;
+
+    // These are activities that may have auto-fill UI which are keyed off their tokens.
+    // This is done instead of the activity setting the client in the auto-fill manager
+    // to avoid unnecessary instantiation of the manager and do this only if there is an
+    // auto-fillable focused. This has only the cost of loading the class vs creating an
+    // auto-fill manager for every activity even one that cannot be filled.
+    private static final ArrayMap<IBinder, AutoFillClient> sPendingClients = new ArrayMap<>();
+
+    private final Rect mTempRect = new Rect();
+
+    private final IAutoFillManager mService;
+    private IAutoFillManagerClient mServiceClient;
+
+    private Context mContext;
+
+    private AutoFillClient mClient;
+
+    private boolean mHasSession;
+    private boolean mEnabled;
+
+    /** @hide */
+    public interface AutoFillClient {
+        /**
+         * Asks the client to perform an auto-fill.
+         *
+         * @param ids The values to auto-fill
+         * @param values The values to auto-fill
+         */
+        void autoFill(List<AutoFillId> ids, List<AutoFillValue> values);
+
+        /**
+         * Asks the client to start an authentication flow.
+         *
+         * @param intent The authentication intent.
+         * @param fillInIntent The authentication fill-in intent.
+         */
+        void authenticate(IntentSender intent, Intent fillInIntent);
+    }
 
     /**
      * @hide
      */
-    public AutoFillManager(@SuppressWarnings("unused") Context context,
-            IAutoFillManagerService service) {
+    public AutoFillManager(Context context, IAutoFillManager service) {
+        mContext = context;
         mService = service;
     }
 
     /**
-     * Updates the auto-fill bar for a given {@link View}.
+     * Called to indicate the focus on an auto-fillable {@link View} changed.
      *
-     * <b>Typically called twice, with different flags ({@link #FLAG_UPDATE_UI_SHOW} and
-     * {@link #FLAG_UPDATE_UI_HIDE} respectively), as the user "entered" and "exited" a view.
-     *
-     * @param view view to be updated.
-     * @param flags either {@link #FLAG_UPDATE_UI_SHOW} or
-     * {@link #FLAG_UPDATE_UI_HIDE}.
+     * @param view view whose focus changed.
+     * @param gainFocus whether focus was gained or lost.
      */
-    public void updateAutoFillInput(View view, int flags) {
-        final Rect bounds = new Rect();
+    public void focusChanged(View view, boolean gainFocus) {
+        ensureServiceClientAddedIfNeeded();
+
+        if (!mEnabled) {
+            return;
+        }
+
+        final Rect bounds = mTempRect;
         view.getBoundsOnScreen(bounds);
-
-        requestAutoFill(getAutoFillId(view), bounds, flags);
-    }
-
-    /**
-     * Updates the auto-fill bar for a virtual child of a given {@link View}.
-     *
-     * <b>Typically called twice, with different flags ({@link #FLAG_UPDATE_UI_SHOW} and
-     * {@link #FLAG_UPDATE_UI_HIDE} respectively), as the user "entered" and "exited" a view.
-     *
-     * @param parent parent view.
-     * @param childId id identifying the virtual child inside the parent view.
-     * @param bounds absolute boundaries of the child in the window (could be {@code null} when
-     * flag is {@link #FLAG_UPDATE_UI_HIDE}.
-     * @param flags either {@link #FLAG_UPDATE_UI_SHOW} or
-     * {@link #FLAG_UPDATE_UI_HIDE}.
-     */
-    public void updateAutoFillInput(View parent, int childId, @Nullable Rect bounds,
-            int flags) {
-        requestAutoFill(new AutoFillId(parent.getAccessibilityViewId(), childId), bounds, flags);
-    }
-
-    /**
-     * Notifies the framework that the value of a view changed.
-     * @param view view whose value was updated
-     * @param value new value.
-     */
-    public void onValueChanged(View view, AutoFillValue value) {
-        // TODO(b/33197203): optimize it by not calling service when the view does not belong to
-        // the session.
         final AutoFillId id = getAutoFillId(view);
-        if (DEBUG) Log.v(TAG, "onValueChanged(): id=" + id + ", value=" + value);
+        final AutoFillValue value = view.getAutoFillValue();
+
+        if (!mHasSession) {
+            if (gainFocus) {
+                // Starts new session.
+                startSession(id, bounds, value);
+            }
+        } else {
+            // Update focus on existing session.
+            updateSession(id, bounds, value, gainFocus ? FLAG_FOCUS_GAINED : FLAG_FOCUS_LOST);
+        }
+    }
+
+    /**
+     * Called to indicate the focus on an auto-fillable virtual {@link View} changed.
+     *
+     * @param parent parent view whose focus changed.
+     * @param childId id identifying the virtual child inside the parent view.
+     * @param bounds child boundaries, relative to the top window.
+     * @param gainFocus whether focus was gained or lost.
+     */
+    public void virtualFocusChanged(View parent, int childId, Rect bounds, boolean gainFocus) {
+        ensureServiceClientAddedIfNeeded();
+
+        if (!mEnabled) {
+            return;
+        }
+
+        final AutoFillId id = getAutoFillId(parent, childId);
+
+        if (!mHasSession) {
+            if (gainFocus) {
+                // Starts new session.
+                startSession(id, bounds, null);
+            }
+        } else {
+            // Update focus on existing session.
+            updateSession(id, bounds, null, gainFocus ? FLAG_FOCUS_GAINED : FLAG_FOCUS_LOST);
+        }
+    }
+
+    /**
+     * Called to indicate the value of an auto-fillable {@link View} changed.
+     *
+     * @param view view whose focus changed.
+     */
+    public void valueChanged(View view) {
+        ensureServiceClientAddedIfNeeded();
+
+        if (!mEnabled || !mHasSession) {
+            return;
+        }
+
+        final AutoFillId id = getAutoFillId(view);
+        final AutoFillValue value = view.getAutoFillValue();
+        updateSession(id, null, value, FLAG_VALUE_CHANGED);
+    }
+
+
+    /**
+     * Called to indicate the value of an auto-fillable virtual {@link View} changed.
+     *
+     * @param parent parent view whose value changed.
+     * @param childId id identifying the virtual child inside the parent view.
+     * @param value new value of the child.
+     */
+    public void virtualValueChanged(View parent, int childId, AutoFillValue value) {
+        ensureServiceClientAddedIfNeeded();
+
+        if (!mEnabled || !mHasSession) {
+            return;
+        }
+
+        final AutoFillId id = getAutoFillId(parent, childId);
+        updateSession(id, null, value, FLAG_VALUE_CHANGED);
+    }
+
+    /**
+     * Called to indicate the current auto-fill context should be reset.
+     *
+     * <p>For example, when a virtual view is rendering an {@code HTML} page with a form, it should
+     * call this method after the form is submitted and another page is rendered.
+     */
+    public void reset() {
+        ensureServiceClientAddedIfNeeded();
+
+        if (!mEnabled && !mHasSession) {
+            return;
+        }
+
+        finishSession();
+    }
+
+    /** @hide */
+    public static void addClient(IBinder token, AutoFillClient client) {
+        sPendingClients.put(token, client);
+    }
+
+    /** @hide */
+    public static boolean isClientActive(IBinder token) {
+        return !sPendingClients.containsKey(token);
+    }
+
+    private void activateClient() {
+        mClient = sPendingClients.remove(mContext.getActivityToken());
+    }
+
+    private AutoFillClient getClient() {
+        if (mClient == null) {
+            return sPendingClients.get(mContext.getActivityToken());
+        }
+        return mClient;
+    }
+
+    /** @hide */
+    public void onAuthenticationResult(Intent data) {
+        if (data == null) {
+            return;
+        }
+        Parcelable result = data.getParcelableExtra(
+                EXTRA_AUTHENTICATION_RESULT);
+        Bundle responseData = new Bundle();
+        responseData.putParcelable(EXTRA_AUTHENTICATION_RESULT, result);
         try {
-            mService.onValueChanged(id, value);
+            mService.setAuthenticationResult(responseData,
+                    mContext.getActivityToken(), mContext.getUserId());
         } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
+            Log.e(TAG, "Error delivering authentication result", e);
         }
     }
 
@@ -109,16 +266,103 @@
         return new AutoFillId(view.getAccessibilityViewId());
     }
 
-    private void requestAutoFill(AutoFillId id, Rect bounds, int flags) {
-        // TODO(b/33197203): optimize it by not calling service when the view does not belong to
-        // the session.
+    private AutoFillId getAutoFillId(View parent, int childId) {
+        return new AutoFillId(parent.getAccessibilityViewId(), childId);
+    }
+
+    private void startSession(AutoFillId id, Rect bounds, AutoFillValue value) {
         if (DEBUG) {
-            Log.v(TAG, "requestAutoFill(): id=" + id + ", bounds=" + bounds + ", flags=" + flags);
+            Log.v(TAG, "startSession(): id=" + id + ", bounds=" + bounds + ", value=" + value);
         }
         try {
-            mService.requestAutoFill(id, bounds, flags);
+            mService.startSession(mContext.getActivityToken(), mServiceClient.asBinder(),
+                    id, bounds, value, mContext.getUserId());
+            mHasSession = true;
+            activateClient();
         } catch (RemoteException e) {
             throw e.rethrowFromSystemServer();
         }
     }
+
+    private void finishSession() {
+        if (DEBUG) {
+            Log.v(TAG, "finishSession()");
+        }
+        mHasSession = false;
+        try {
+            mService.finishSession(mContext.getActivityToken(), mContext.getUserId());
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    private void updateSession(AutoFillId id, Rect bounds, AutoFillValue value, int flags) {
+        if (DEBUG) {
+            Log.v(TAG, "updateSession(): id=" + id + ", bounds=" + bounds + ", value=" + value
+                    + ", flags=" + flags);
+        }
+        try {
+            mService.updateSession(mContext.getActivityToken(), id, bounds, value, flags,
+                    mContext.getUserId());
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    private void ensureServiceClientAddedIfNeeded() {
+        if (getClient() == null) {
+            return;
+        }
+        if (mServiceClient == null) {
+            mServiceClient = new AutoFillManagerClient(this);
+            try {
+                mEnabled = mService.addClient(mServiceClient, mContext.getUserId());
+            } catch (RemoteException e) {
+                throw e.rethrowFromSystemServer();
+            }
+        }
+    }
+
+    private static final class AutoFillManagerClient extends IAutoFillManagerClient.Stub {
+        private final WeakReference<AutoFillManager> mAutoFillManager;
+
+        AutoFillManagerClient(AutoFillManager autoFillManager) {
+            mAutoFillManager = new WeakReference<>(autoFillManager);
+        }
+
+        @Override
+        public void setState(boolean enabled) {
+            final AutoFillManager autoFillManager = mAutoFillManager.get();
+            if (autoFillManager != null) {
+                autoFillManager.mContext.getMainThreadHandler().post(() ->
+                        autoFillManager.mEnabled = enabled);
+            }
+        }
+
+        @Override
+        public void autoFill(List<AutoFillId> ids, List<AutoFillValue> values) {
+            // TODO(b/33197203): must keep the dataset so subsequent calls pass the same
+            // dataset.extras to service
+            final AutoFillManager autoFillManager = mAutoFillManager.get();
+            if (autoFillManager != null) {
+                autoFillManager.mContext.getMainThreadHandler().post(() -> {
+                    if (autoFillManager.getClient() != null) {
+                        autoFillManager.getClient().autoFill(ids, values);
+                    }
+                });
+            }
+        }
+
+        @Override
+        public void authenticate(IntentSender intent, Intent fillInIntent) {
+            final AutoFillManager autoFillManager = mAutoFillManager.get();
+            if (autoFillManager != null) {
+                autoFillManager.mContext.getMainThreadHandler().post(() -> {
+                    if (autoFillManager.getClient() != null) {
+                        autoFillManager.getClient().authenticate(intent, fillInIntent);
+                    }
+                });
+            }
+        }
+    }
 }
diff --git a/core/java/android/view/autofill/AutoFillSession.java b/core/java/android/view/autofill/AutoFillSession.java
deleted file mode 100644
index eec7a82..0000000
--- a/core/java/android/view/autofill/AutoFillSession.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * 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.view.autofill;
-
-import static android.view.autofill.Helper.DEBUG;
-
-import android.app.Activity;
-import android.os.RemoteException;
-import android.service.autofill.IAutoFillAppCallback;
-import android.util.Log;
-import android.view.View;
-
-import com.android.internal.annotations.GuardedBy;
-
-import java.lang.ref.WeakReference;
-
-/**
- * An auto-fill session associated with an activity.
- *
- * @hide
- */
-public final class AutoFillSession {
-
-    private static final String TAG = "AutoFillSession";
-
-    private final IAutoFillAppCallback mCallback = new IAutoFillAppCallback.Stub() {
-        @Override
-        public void autoFill(Dataset dataset) throws RemoteException {
-            final Activity activity = mActivity.get();
-            if (activity == null) {
-                if (DEBUG) Log.d(TAG, "autoFill(): activity already GCed");
-                return;
-            }
-            // TODO(b/33197203): must keep the dataset so subsequent calls pass the same
-            // dataset.extras to service
-            activity.runOnUiThread(() -> {
-                final View root = activity.getWindow().getDecorView().getRootView();
-                for (DatasetField field : dataset.getFields()) {
-                    final AutoFillId id = field.getId();
-                    if (id == null) {
-                        Log.w(TAG, "autoFill(): null id on " + field);
-                        continue;
-                    }
-                    final int viewId = id.getViewId();
-                    final View view = root.findViewByAccessibilityIdTraversal(viewId);
-                    if (view == null) {
-                        Log.w(TAG, "autoFill(): no View with id " + viewId);
-                        continue;
-                    }
-
-                    // TODO(b/33197203): handle protected value (like credit card)
-                    if (id.isVirtual()) {
-                        // Delegate virtual fields.
-                        setAutoFillDelegateCallback();
-                        final VirtualViewDelegate delegate = view
-                                .getAutoFillVirtualViewDelegate(
-                                        mAutoFillDelegateCallback);
-                        if (delegate == null) {
-                            Log.w(TAG, "autoFill(): cannot fill virtual " + id
-                                    + "; no VirtualViewDelegate for view "
-                                    + view.getClass());
-                            continue;
-                        }
-                        if (DEBUG) {
-                            Log.d(TAG, "autoFill(): delegating " + id
-                                    + " to VirtualViewDelegate  " + delegate);
-                        }
-                        delegate.autoFill(id.getVirtualChildId(), field.getValue());
-                    } else {
-                        // Handle non-virtual fields itself.
-                        view.autoFill(field.getValue());
-                    }
-                }
-            });
-        }
-    };
-
-    private final WeakReference<Activity> mActivity;
-
-    @GuardedBy("this")
-    private VirtualViewDelegate.Callback mAutoFillDelegateCallback;
-
-    public AutoFillSession(Activity activity) {
-        mActivity = new WeakReference<>(activity);
-    }
-
-    public IAutoFillAppCallback getCallback() {
-        return mCallback;
-    }
-
-    /**
-     * Lazily sets the {@link #mAutoFillDelegateCallback}.
-     */
-    private void setAutoFillDelegateCallback() {
-        synchronized (this) {
-            if (mAutoFillDelegateCallback == null) {
-                mAutoFillDelegateCallback = new VirtualViewDelegate.Callback() {
-                    // TODO(b/33197203): implement
-                };
-            }
-        }
-    }
-
-}
diff --git a/core/java/android/view/autofill/AutoFillValue.java b/core/java/android/view/autofill/AutoFillValue.java
index 57b23ef..af70361 100644
--- a/core/java/android/view/autofill/AutoFillValue.java
+++ b/core/java/android/view/autofill/AutoFillValue.java
@@ -18,6 +18,7 @@
 
 import static android.view.autofill.Helper.DEBUG;
 
+import android.annotation.Nullable;
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.view.View;
@@ -32,12 +33,12 @@
  */
 public final class AutoFillValue implements Parcelable {
 
-    private final CharSequence mText;
+    private final String mText;
     private final int mListIndex;
     private final boolean mToggle;
 
     private AutoFillValue(CharSequence text, int listIndex, boolean toggle) {
-        mText = text;
+        mText = (text == null) ? null : text.toString();
         mListIndex = listIndex;
         mToggle = toggle;
     }
@@ -74,11 +75,40 @@
     /////////////////////////////////////
 
     @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + mListIndex;
+        result = prime * result + ((mText == null) ? 0 : mText.hashCode());
+        result = prime * result + (mToggle ? 1231 : 1237);
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) return true;
+        if (obj == null) return false;
+        if (getClass() != obj.getClass()) return false;
+        final AutoFillValue other = (AutoFillValue) obj;
+        if (mListIndex != other.mListIndex) return false;
+        if (mText == null) {
+            if (other.mText != null) return false;
+        } else {
+            if (!mText.equals(other.mText)) return false;
+        }
+        if (mToggle != other.mToggle) return false;
+        return true;
+    }
+
+    @Override
     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 + "]";
     }
 
     /////////////////////////////////////
@@ -92,13 +122,13 @@
 
     @Override
     public void writeToParcel(Parcel parcel, int flags) {
-        parcel.writeCharSequence(mText);
+        parcel.writeString(mText);
         parcel.writeInt(mListIndex);
         parcel.writeInt(mToggle ? 1 : 0);
     }
 
     private AutoFillValue(Parcel parcel) {
-        mText = parcel.readCharSequence();
+        mText = parcel.readString();
         mListIndex = parcel.readInt();
         mToggle = parcel.readInt() == 1;
     }
@@ -127,8 +157,9 @@
      * <p>See {@link AutoFillType#isText()} for more info.
      */
     // TODO(b/33197203): use cache
-    public static AutoFillValue forText(CharSequence value) {
-        return new AutoFillValue(value, 0, false);
+    @Nullable
+    public static AutoFillValue forText(@Nullable CharSequence value) {
+        return value == null ? null : new AutoFillValue(value, 0, false);
     }
 
     /**
diff --git a/core/java/android/view/autofill/Dataset.java b/core/java/android/view/autofill/Dataset.java
deleted file mode 100644
index 18a08f9..0000000
--- a/core/java/android/view/autofill/Dataset.java
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.view.autofill;
-
-import static android.view.autofill.Helper.DEBUG;
-import static android.view.autofill.Helper.append;
-
-import android.annotation.Nullable;
-import android.app.Activity;
-import android.app.assist.AssistStructure.ViewNode;
-import android.hardware.fingerprint.FingerprintManager.CryptoObject;
-import android.os.Bundle;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import com.android.internal.util.Preconditions;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
-
-/**
- * A set of data that can be used to auto-fill an {@link Activity}.
- *
- * <p>It contains:
- *
- * <ol>
- *   <li>A name used to identify the dataset in the UI.
- *   <li>A list of id/value pairs for the fields that can be auto-filled.
- *   <li>An optional {@link Bundle} with extras (used only by the service creating it).
- * </ol>
- *
- * See {@link FillResponse} for examples.
- */
-public final class Dataset implements Parcelable {
-
-    private final CharSequence mName;
-    private final ArrayList<DatasetField> mFields;
-    private final Bundle mExtras;
-    private final int mFlags;
-    private final boolean mRequiresAuth;
-    private final boolean mHasCryptoObject;
-    private final long mCryptoOpId;
-
-    private Dataset(Dataset.Builder builder) {
-        mName = builder.mName;
-        // TODO(b/33197203): make an immutable copy of mFields?
-        mFields = builder.mFields;
-        mExtras = builder.mExtras;
-        mFlags = builder.mFlags;
-        mRequiresAuth = builder.mRequiresAuth;
-        mHasCryptoObject = builder.mHasCryptoObject;
-        mCryptoOpId = builder.mCryptoOpId;
-    }
-
-    /** @hide */
-    public CharSequence getName() {
-        return mName;
-    }
-
-    /** @hide */
-    public List<DatasetField> getFields() {
-        return mFields;
-    }
-
-    /** @hide */
-    public Bundle getExtras() {
-        return mExtras;
-    }
-
-    /** @hide */
-    public int getFlags() {
-        return mFlags;
-    }
-
-    /** @hide */
-    public boolean isAuthRequired() {
-        return mRequiresAuth;
-    }
-
-    /** @hide */
-    public boolean isEmpty() {
-        return mFields.isEmpty();
-    }
-
-    /** @hide */
-    public boolean hasCryptoObject() {
-        return mHasCryptoObject;
-    }
-
-    /** @hide */
-    public long getCryptoObjectOpId() {
-        return mCryptoOpId;
-    }
-
-    @Override
-    public String toString() {
-        if (!DEBUG) return super.toString();
-
-        final StringBuilder builder = new StringBuilder("Dataset [name=").append(mName)
-                .append(", fields=").append(mFields).append(", extras=");
-        append(builder, mExtras)
-            .append(", flags=").append(mFlags)
-            .append(", requiresAuth: ").append(mRequiresAuth)
-            .append(", hasCrypto: ").append(mHasCryptoObject);
-        return builder.append(']').toString();
-    }
-
-    /**
-     * A builder for {@link Dataset} objects.
-     */
-    public static final class Builder {
-        private CharSequence mName;
-        private final ArrayList<DatasetField> mFields = new ArrayList<>();
-        private Bundle mExtras;
-        private int mFlags;
-        private boolean mRequiresAuth;
-        private boolean mHasCryptoObject;
-        private long mCryptoOpId;
-
-        /**
-         * Creates a new builder.
-         *
-         * @param name Name used to identify the dataset in the UI. Typically it's the same value as
-         * the first field in the dataset (like username or email address) or an user-provided name
-         * (like "My Work Address").
-         */
-        public Builder(CharSequence name) {
-            mName = Preconditions.checkStringNotEmpty(name, "name cannot be empty or null");
-        }
-
-        /**
-         * Requires dataset authentication through the {@link
-         * android.service.autofill.AutoFillService} before auto-filling the activity with this
-         * dataset.
-         *
-         * <p>This method is typically called when the device (or the service) does not support
-         * fingerprint authentication (and hence it cannot use {@link
-         * #requiresFingerprintAuthentication(CryptoObject, Bundle, int)}) or when the service needs
-         * to use a custom authentication UI for the dataset. For example, when a dataset contains
-         * credit card information (such as number, expiration date, and verification code), the
-         * service displays an authentication dialog asking for the verification code to unlock the
-         * rest of the data).
-         *
-         * <p>Since the dataset is "locked" until the user authenticates it, typically this dataset
-         * name is masked (for example, "VISA....1234").
-         *
-         * <p>When the user selects this dataset, the Android System calls {@link
-         * android.service.autofill.AutoFillService#onDatasetAuthenticationRequest(Bundle, int)}
-         * passing {@link android.service.autofill.AutoFillService#FLAG_AUTHENTICATION_REQUESTED} in
-         * the flags and the same {@code extras} passed to this method. The service can then
-         * displays its custom authentication UI, and then call the proper method on {@link
-         * android.service.autofill.FillCallback} depending on the authentication result and whether
-         * this dataset already contains the fields needed to auto-fill the activity:
-         *
-         * <ul>
-         *   <li>If authentication failed, call
-         *   {@link android.service.autofill.FillCallback#onDatasetAuthentication(Dataset,
-         *       int)} passing {@link
-         *       android.service.autofill.AutoFillService#FLAG_AUTHENTICATION_ERROR} in the flags.
-         *   <li>If authentication succeeded and this datast is empty (no fields), call {@link
-         *       android.service.autofill.FillCallback#onSuccess(FillResponse)} with a new dataset
-         *       (with the proper fields).
-         *   <li>If authentication succeeded and this response is not empty, call {@link
-         *       android.service.autofill.FillCallback#onDatasetAuthentication(Dataset, int)}
-         *       passing
-         *       {@link android.service.autofill.AutoFillService#FLAG_AUTHENTICATION_SUCCESS} in the
-         *       {@code flags} and {@code null} as the {@code dataset}.
-         * </ul>
-         *
-         * @param extras when set, will be passed back in the {@link
-         *     android.service.autofill.AutoFillService#onDatasetAuthenticationRequest(Bundle,
-         *     int)}, call so it could be used by the service to handle state.
-         * @param flags optional parameters, currently ignored.
-         */
-        public Builder requiresCustomAuthentication(@Nullable Bundle extras, int flags) {
-            return requiresAuthentication(null, extras, flags);
-        }
-
-        /**
-         * Requires dataset authentication through the Fingerprint sensor before auto-filling the
-         * activity with this dataset.
-         *
-         * <p>This method is typically called when the dataset contains sensitive information (for
-         * example, credit card information) and the provider requires the user to re-authenticate
-         * before using it.
-         *
-         * <p>Since the dataset is "locked" until the user authenticates it, typically this dataset
-         * name is masked (for example, "VISA....1234").
-         *
-         * <p>When the user selects this dataset, the Android System displays an UI affordance
-         * asking the user to use the fingerprint sensor unlock the dataset, and what happens after
-         * a successful fingerprint authentication depends on whether the dataset is empty (no
-         * fields, only the masked name) or not:
-         *
-         * <ul>
-         *   <li>If it's empty, the Android System will call {@link
-         *       android.service.autofill.AutoFillService#onDatasetAuthenticationRequest(Bundle,
-         *       int)} passing {@link
-         *       android.service.autofill.AutoFillService#FLAG_AUTHENTICATION_SUCCESS}} in the
-         *       flags.
-         *   <li>If it's not empty, the activity will be auto-filled with its data.
-         * </ul>
-         *
-         * <p>If the fingerprint authentication fails, the Android System will call {@link
-         * android.service.autofill.AutoFillService#onDatasetAuthenticationRequest(Bundle, int)}
-         * passing {@link android.service.autofill.AutoFillService#FLAG_AUTHENTICATION_ERROR} in the
-         * flags.
-         *
-         * <p><strong>NOTE: </note> the {@link android.service.autofill.AutoFillService} should use
-         * the {@link android.hardware.fingerprint.FingerprintManager} to check if fingerpint
-         * authentication is available before using this method, and use other alternatives (such as
-         * {@link #requiresCustomAuthentication(Bundle, int)}) if it is not: if this method is
-         * called when fingerprint is not available, Android System will call {@link
-         * android.service.autofill.AutoFillService#onDatasetAuthenticationRequest(Bundle, int)}
-         * passing {@link
-         * android.service.autofill.AutoFillService#FLAG_FINGERPRINT_AUTHENTICATION_NOT_AVAILABLE}
-         * in the flags, but it would be wasting system resources (and worsening the user
-         * experience) in the process.
-         *
-         * @param crypto object that will be authenticated.
-         * @param extras when set, will be passed back in the {@link
-         *     android.service.autofill.AutoFillService#onDatasetAuthenticationRequest(Bundle, int)}
-         *     call so it could be used by the service to handle state.
-         * @param flags optional parameters, currently ignored.
-         */
-        public Builder requiresFingerprintAuthentication(CryptoObject crypto,
-                @Nullable Bundle extras, int flags) {
-            // TODO(b/33197203): should we allow crypto to be null?
-            Preconditions.checkArgument(crypto != null, "must pass a CryptoObject");
-            return requiresAuthentication(crypto, extras, flags);
-        }
-
-        private Builder requiresAuthentication(CryptoObject cryptoObject, Bundle extras,
-                int flags) {
-            // There can be only one!
-            Preconditions.checkState(!mRequiresAuth,
-                    "requires-authentication methods already called");
-            // TODO(b/33197203): make sure that either this method or setExtras() is called, but
-            // not both
-            mExtras = extras;
-            mFlags = flags;
-            mRequiresAuth = true;
-            if (cryptoObject != null) {
-                mHasCryptoObject = true;
-                mCryptoOpId = cryptoObject.getOpId();
-            }
-            return this;
-        }
-
-        /**
-         * Sets the value of a field.
-         *
-         * @param id id returned by {@link ViewNode#getAutoFillId()}.
-         * @param value value to be auto filled.
-         */
-        public Dataset.Builder setValue(AutoFillId id, AutoFillValue value) {
-            putField(new DatasetField(id, value));
-            return this;
-        }
-
-        /**
-         * Creates a new {@link Dataset} instance.
-         */
-        public Dataset build() {
-            return new Dataset(this);
-        }
-
-        /**
-         * Sets a {@link Bundle} that will be passed to subsequent calls to
-         * {@link android.service.autofill.AutoFillService} methods such as
- * {@link android.service.autofill.AutoFillService#onSaveRequest(android.app.assist.AssistStructure,
-         * Bundle, android.service.autofill.SaveCallback)}, using
-         * {@link android.service.autofill.AutoFillService#EXTRA_DATASET_EXTRAS} as the key.
-         *
-         * <p>It can be used to keep service state in between calls.
-         */
-        public Builder setExtras(Bundle extras) {
-            // TODO(b/33197203): make sure that either this method or the requires-Authentication
-            // ones are called, but not both
-            mExtras = Objects.requireNonNull(extras, "extras cannot be null");
-            return this;
-        }
-
-        /**
-         * Emulates {@code Map.put()} by adding a new field to the list if its id is not the yet,
-         * or replacing the existing one.
-         */
-        private void putField(DatasetField field) {
-            // TODO(b/33197203): check if already exists and replaces it if so
-            mFields.add(field);
-        }
-    }
-
-    /////////////////////////////////////
-    //  Parcelable "contract" methods. //
-    /////////////////////////////////////
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel parcel, int flags) {
-        parcel.writeCharSequence(mName);
-        parcel.writeList(mFields);
-        parcel.writeBundle(mExtras);
-        parcel.writeInt(mFlags);
-        parcel.writeInt(mRequiresAuth ? 1 : 0);
-        parcel.writeInt(mHasCryptoObject ? 1 : 0);
-        if (mHasCryptoObject) {
-            parcel.writeLong(mCryptoOpId);
-        }
-    }
-
-    @SuppressWarnings("unchecked")
-    private Dataset(Parcel parcel) {
-        mName = parcel.readCharSequence();
-        mFields = parcel.readArrayList(null);
-        mExtras = parcel.readBundle();
-        mFlags = parcel.readInt();
-        mRequiresAuth = parcel.readInt() == 1;
-        mHasCryptoObject = parcel.readInt() == 1;
-        mCryptoOpId = mHasCryptoObject ? parcel.readLong() : 0;
-    }
-
-    public static final Parcelable.Creator<Dataset> CREATOR = new Parcelable.Creator<Dataset>() {
-        @Override
-        public Dataset createFromParcel(Parcel source) {
-            return new Dataset(source);
-        }
-
-        @Override
-        public Dataset[] newArray(int size) {
-            return new Dataset[size];
-        }
-    };
-}
diff --git a/core/java/android/view/autofill/DatasetField.java b/core/java/android/view/autofill/DatasetField.java
deleted file mode 100644
index c6b92ac..0000000
--- a/core/java/android/view/autofill/DatasetField.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.view.autofill;
-
-import static android.view.autofill.Helper.DEBUG;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-/** @hide */
-public final class DatasetField implements Parcelable {
-
-    private final AutoFillId mId;
-    private final AutoFillValue mValue;
-
-    DatasetField(AutoFillId id, AutoFillValue value) {
-        mId = id;
-        mValue = value;
-    }
-
-    public AutoFillId getId() {
-        return mId;
-    }
-
-    public AutoFillValue getValue() {
-        return mValue;
-    }
-
-    /////////////////////////////////
-    //  Object "contract" methods. //
-    /////////////////////////////////
-
-    @Override
-    public String toString() {
-        if (!DEBUG) return super.toString();
-
-        return "DatasetField [id=" + mId + ", value=" + mValue + "]";
-    }
-
-    /////////////////////////////////////
-    //  Parcelable "contract" methods. //
-    /////////////////////////////////////
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel parcel, int flags) {
-        parcel.writeParcelable(mId, 0);
-        parcel.writeParcelable(mValue, 0);
-    }
-
-    private DatasetField(Parcel parcel) {
-        mId = parcel.readParcelable(null);
-        mValue = parcel.readParcelable(null);
-    }
-
-    public static final Parcelable.Creator<DatasetField> CREATOR =
-            new Parcelable.Creator<DatasetField>() {
-        @Override
-        public DatasetField createFromParcel(Parcel source) {
-            return new DatasetField(source);
-        }
-
-        @Override
-        public DatasetField[] newArray(int size) {
-            return new DatasetField[size];
-        }
-    };
-}
diff --git a/core/java/android/view/autofill/FieldId.aidl b/core/java/android/view/autofill/FieldId.aidl
deleted file mode 100644
index 35af645..0000000
--- a/core/java/android/view/autofill/FieldId.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Copyright (c) 2016, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.view.autofill;
-
-parcelable FieldId;
\ No newline at end of file
diff --git a/core/java/android/view/autofill/FillResponse.java b/core/java/android/view/autofill/FillResponse.java
deleted file mode 100644
index 48dbb84..0000000
--- a/core/java/android/view/autofill/FillResponse.java
+++ /dev/null
@@ -1,471 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package android.view.autofill;
-
-import static android.view.autofill.Helper.DEBUG;
-import static android.view.autofill.Helper.append;
-
-import android.annotation.Nullable;
-import android.app.Activity;
-import android.hardware.fingerprint.FingerprintManager.CryptoObject;
-import android.os.Bundle;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.service.autofill.FillCallback;
-
-import com.android.internal.util.Preconditions;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Objects;
-import java.util.Set;
-
-/**
- * Response for a {@link
- * android.service.autofill.AutoFillService#onFillRequest(android.app.assist.AssistStructure,
- * Bundle, android.os.CancellationSignal, android.service.autofill.FillCallback)} request.
- *
- * <p>The response typically contains one or more {@link Dataset}s, each representing a set of
- * fields that can be auto-filled together, and the Android System displays a dataset picker UI
- * affordance that the user must use before the {@link Activity} is filled with the dataset.
- *
- * <p>For example, for a login page with username/password where the user only has one account in
- * the service, the response could be:
- *
- * <pre class="prettyprint">
- *  new FillResponse.Builder()
- *      .add(new Dataset.Builder("homer")
- *          .setTextFieldValue(id1, "homer")
- *          .setTextFieldValue(id2, "D'OH!")
- *          .build())
- *      .build();
- * </pre>
- *
- * <p>If the user had 2 accounts, each with its own user-provided names, the response could be:
- *
- * <pre class="prettyprint">
- *  new FillResponse.Builder()
- *      .add(new Dataset.Builder("Homer's Account")
- *          .setTextFieldValue(id1, "homer")
- *          .setTextFieldValue(id2, "D'OH!")
- *          .build())
- *      .add(new Dataset.Builder("Bart's Account")
- *          .setTextFieldValue(id1, "elbarto")
- *          .setTextFieldValue(id2, "cowabonga")
- *          .build())
- *      .build();
- * </pre>
- *
- * <p>If the user does not have any data associated with this {@link Activity} but the service wants
- * to offer the user the option to save the data that was entered, then the service could populate
- * the response with {@code savableIds} instead of {@link Dataset}s:
- *
- * <pre class="prettyprint">
- *  new FillResponse.Builder()
- *      .addSavableFields(id1, id2)
- *      .build();
- * </pre>
- *
- * <p>Similarly, there might be cases where the user data on the service is enough to populate some
- * fields but not all, and the service would still be interested on saving the other fields. In this
- * scenario, the service could populate the response with both {@link Dataset}s and {@code
- * savableIds}:
- *
- * <pre class="prettyprint">
- *   new FillResponse.Builder()
- *       .add(new Dataset.Builder("Homer")
- *          .setTextFieldValue(id1, "Homer")                  // first name
- *          .setTextFieldValue(id2, "Simpson")                // last name
- *          .setTextFieldValue(id3, "742 Evergreen Terrace")  // street
- *          .setTextFieldValue(id4, "Springfield")            // city
- *          .build())
- *       .addSavableFields(id5, id6) // state and zipcode
- *       .build();
- *
- * </pre>
- *
- * <p>Notice that the ids that are part of a dataset (ids 1 to 4, in this example) are automatically
- * added to the {@code savableIds} list.
- *
- * <p>If the service has multiple {@link Dataset}s with multiple options for some fields on each
- * dataset (for example, multiple accounts with both a home and work address), then it should
- * "partition" the {@link Activity} in sections and populate the response with just a subset of the
- * data that would fulfill the first section; then once the user fills the first section and taps a
- * field from the next section, the Android system would issue another request for that section, and
- * so on. For example, the first response could be:
- *
- * <pre class="prettyprint">
- *  new FillResponse.Builder()
- *      .add(new Dataset.Builder("Homer")
- *          .setTextFieldValue(id1, "Homer")
- *          .setTextFieldValue(id2, "Simpson")
- *          .build())
- *      .add(new Dataset.Builder("Bart")
- *          .setTextFieldValue(id1, "Bart")
- *          .setTextFieldValue(id2, "Simpson")
- *          .build())
- *      .build();
- * </pre>
- *
- * <p>Then after the user picks the {@code Homer} dataset and taps the {@code Street} field to
- * trigger another auto-fill request, the second response could be:
- *
- * <pre class="prettyprint">
- *  new FillResponse.Builder()
- *      .add(new Dataset.Builder("Home")
- *          .setTextFieldValue(id3, "742 Evergreen Terrace")
- *          .setTextFieldValue(id4, "Springfield")
- *          .build())
- *      .add(new Dataset.Builder("Work")
- *          .setTextFieldValue(id3, "Springfield Nuclear Power Plant")
- *          .setTextFieldValue(id4, "Springfield")
- *          .build())
- *      .build();
- * </pre>
- *
- * <p>The service could require user authentication, either at the {@link FillResponse} or {@link
- * Dataset} levels, prior to auto-filling the activity - see {@link
- * FillResponse.Builder#requiresFingerprintAuthentication(CryptoObject, Bundle, int)}, {@link
- * FillResponse.Builder#requiresCustomAuthentication(Bundle, int)}, {@link
- * Dataset.Builder#requiresFingerprintAuthentication(CryptoObject, Bundle, int)}, and {@link
- * Dataset.Builder#requiresCustomAuthentication(Bundle, int)} for details.
- *
- * <p>Finally, the service can use the {@link FillResponse.Builder#setExtras(Bundle)} and/or {@link
- * Dataset.Builder#setExtras(Bundle)} methods to pass {@link Bundle}s with service-specific data use
- * to identify this response on future calls (like {@link
- * android.service.autofill.AutoFillService#onSaveRequest(android.app.assist.AssistStructure,
- * Bundle, android.service.autofill.SaveCallback)}) - such bundles will be available as the
- * {@link android.service.autofill.AutoFillService#EXTRA_RESPONSE_EXTRAS} and
- * {@link android.service.autofill.AutoFillService#EXTRA_DATASET_EXTRAS} extras in that method's
- * {@code extras} argument.
- */
-public final class FillResponse implements Parcelable {
-
-    private final List<Dataset> mDatasets;
-    private final AutoFillId[] mSavableIds;
-    private final Bundle mExtras;
-    private final int mFlags;
-    private final boolean mRequiresAuth;
-    private final boolean mHasCryptoObject;
-    private final long mCryptoOpId;
-
-    private FillResponse(Builder builder) {
-        // TODO(b/33197203): make it immutable?
-        mDatasets = builder.mDatasets;
-        final int size = builder.mSavableIds.size();
-        mSavableIds = new AutoFillId[size];
-        int i = 0;
-        for (AutoFillId id : builder.mSavableIds) {
-            mSavableIds[i++] = id;
-        }
-        mExtras = builder.mExtras;
-        mFlags = builder.mFlags;
-        mRequiresAuth = builder.mRequiresAuth;
-        mHasCryptoObject = builder.mHasCryptoObject;
-        mCryptoOpId = builder.mCryptoOpId;
-    }
-
-    /** @hide */
-    public List<Dataset> getDatasets() {
-        return mDatasets;
-    }
-
-    /** @hide */
-    public AutoFillId[] getSavableIds() {
-        return mSavableIds;
-    }
-
-    /** @hide */
-    public Bundle getExtras() {
-        return mExtras;
-    }
-
-    /** @hide */
-    public int getFlags() {
-        return mFlags;
-    }
-
-    /** @hide */
-    public boolean isAuthRequired() {
-        return mRequiresAuth;
-    }
-
-    /** @hide */
-    public boolean hasCryptoObject() {
-        return mHasCryptoObject;
-    }
-
-    /** @hide */
-    public long getCryptoObjectOpId() {
-        return mCryptoOpId;
-    }
-
-    /**
-     * Builder for {@link FillResponse} objects.
-     */
-    public static final class Builder {
-        private final List<Dataset> mDatasets = new ArrayList<>();
-        private final Set<AutoFillId> mSavableIds = new HashSet<>();
-        private Bundle mExtras;
-        private int mFlags;
-        private boolean mRequiresAuth;
-        private boolean mHasCryptoObject;
-        private long mCryptoOpId;
-
-        /**
-         * Requires user authentication through the {@link android.service.autofill.AutoFillService}
-         * before handling an auto-fill request.
-         *
-         * <p>This method is typically called when the device (or the service) does not support
-         * fingerprint authentication (and hence it cannot use {@link
-         * #requiresFingerprintAuthentication(CryptoObject, Bundle, int)}) or when the service needs
-         * to use a custom authentication UI and is used in 2 scenarios:
-         *
-         * <ol>
-         *   <li>When the user data is encrypted and the service must authenticate an object that
-         *       will be used to decrypt it.
-         *   <li>When the service already acquired the user data but wants to confirm the user's
-         *       identity before the activity is filled with it.
-         * </ol>
-         *
-         * <p>When this method is called, the Android System displays an UI affordance asking the
-         * user to tap it to auto-fill the activity; if the user taps it, the Android System calls
-         * {@link
-         * android.service.autofill.AutoFillService#onFillResponseAuthenticationRequest(Bundle,
-         * int)} passing {@link
-         * android.service.autofill.AutoFillService#FLAG_AUTHENTICATION_REQUESTED} in the flags and
-         * the same {@code extras} passed to this method. The service can then displays its custom
-         * authentication UI, and then call the proper method on {@link FillCallback} depending on
-         * the authentication result and whether this response already contains the {@link Dataset}s
-         * need to auto-fill the activity:
-         *
-         * <ul>
-         *   <li>If authentication failed, call {@link
-         *       FillCallback#onFillResponseAuthentication(int)} passing {@link
-         *       android.service.autofill.AutoFillService#FLAG_AUTHENTICATION_ERROR} in the flags.
-         *   <li>If authentication succeeded and this response is empty (no datasets), call {@link
-         *       FillCallback#onSuccess(FillResponse)} with a new dataset (that does not require
-         *       authentication).
-         *   <li>If authentication succeeded and this response is not empty, call {@link
-         *       FillCallback#onFillResponseAuthentication(int)} passing {@link
-         *       android.service.autofill.AutoFillService#FLAG_AUTHENTICATION_SUCCESS} in the flags.
-         * </ul>
-         *
-         * @param extras when set, will be passed back in the {@link
-         *     android.service.autofill.AutoFillService#onFillResponseAuthenticationRequest(Bundle,
-         *     int)} call so it could be used by the service to handle state.
-         * @param flags optional parameters, currently ignored.
-         */
-        public Builder requiresCustomAuthentication(@Nullable Bundle extras, int flags) {
-            return requiresAuthentication(null, extras, flags);
-        }
-
-        /**
-         * Requires user authentication through the Fingerprint sensor before handling an auto-fill
-         * request.
-         *
-         * <p>The {@link android.service.autofill.AutoFillService} typically uses this method in 2
-         * situations:
-         *
-         * <ol>
-         *   <li>When the user data is encrypted and the service must authenticate an object that
-         *       will be used to decrypt it.
-         *   <li>When the service already acquired the user data but wants to confirm the user's
-         *       identity before the activity is filled with it.
-         * </ol>
-         *
-         * <p>When this method is called, the Android System displays an UI affordance asking the
-         * user to use the fingerprint sensor to auto-fill the activity, and what happens after a
-         * successful fingerprint authentication depends on the number of {@link Dataset}s included
-         * in this response:
-         *
-         * <ul>
-         *   <li>If it's empty (scenario #1 above), the Android System will call {@link
-         *     android.service.autofill.AutoFillService#onFillResponseAuthenticationRequest(Bundle,
-         *       int)} passing {@link
-         *       android.service.autofill.AutoFillService#FLAG_AUTHENTICATION_SUCCESS}} in the
-         *       flags.
-         *   <li>If it contains one dataset, the activity will be auto-filled right away.
-         *   <li>If it contains many datasets, the Android System will show dataset picker UI, and
-         *       then auto-fill the activity once the user select the proper datased.
-         * </ul>
-         *
-         * <p>If the fingerprint authentication fails, the Android System will call {@link
-         * android.service.autofill.AutoFillService#onFillResponseAuthenticationRequest(Bundle,
-         * int)} passing {@link android.service.autofill.AutoFillService#FLAG_AUTHENTICATION_ERROR}
-         * in the flags.
-         *
-         * <p><strong>NOTE: </note> the {@link android.service.autofill.AutoFillService} should use
-         * the {@link android.hardware.fingerprint.FingerprintManager} to check if fingerpint
-         * authentication is available before using this method, and use other alternatives (such as
-         * {@link #requiresCustomAuthentication(Bundle, int)}) if it is not: if this method is
-         * called when fingerprint is not available, Android System will call {@link
-         * android.service.autofill.AutoFillService#onFillResponseAuthenticationRequest(Bundle,
-         * int)} passing {@link
-         * android.service.autofill.AutoFillService#FLAG_FINGERPRINT_AUTHENTICATION_NOT_AVAILABLE}
-         * in the flags, but it would be wasting system resources (and worsening the user
-         * experience) in the process.
-         *
-         * @param crypto object that will be authenticated.
-         * @param extras when set, will be passed back in the {@link
-         *     android.service.autofill.AutoFillService#onFillResponseAuthenticationRequest(Bundle,
-         *     int)} call so it could be used by the service to handle state.
-         * @param flags optional parameters, currently ignored.
-         */
-        public Builder requiresFingerprintAuthentication(CryptoObject crypto,
-                @Nullable Bundle extras, int flags) {
-            // TODO(b/33197203): should we allow crypto to be null?
-            Preconditions.checkArgument(crypto != null, "must pass a CryptoObject");
-            return requiresAuthentication(crypto, extras, flags);
-        }
-
-        private Builder requiresAuthentication(CryptoObject cryptoObject, Bundle extras,
-                int flags) {
-            // There can be only one!
-            Preconditions.checkState(!mRequiresAuth,
-                    "requires-authentication methods already called");
-            // TODO(b/33197203): make sure that either this method or setExtras() is called, but
-            // not both
-            mExtras = extras;
-            mFlags = flags;
-            mRequiresAuth = true;
-            if (cryptoObject != null) {
-                mHasCryptoObject = true;
-                mCryptoOpId = cryptoObject.getOpId();
-            }
-            return this;
-        }
-
-        /**
-         * Adds a new {@link Dataset} to this response.
-         *
-         * @throws IllegalArgumentException if a dataset with same {@code name} already exists.
-         */
-        public Builder addDataset(Dataset dataset) {
-            Preconditions.checkNotNull(dataset, "dataset cannot be null");
-            // TODO(b/33197203): check if name already exists
-            mDatasets.add(dataset);
-            for (DatasetField field : dataset.getFields()) {
-                mSavableIds.add(field.getId());
-            }
-            return this;
-        }
-
-        /**
-         * Adds ids of additional fields that the service would be interested to save (through
-         * {@link android.service.autofill.AutoFillService#onSaveRequest(
-         * android.app.assist.AssistStructure, Bundle, android.service.autofill.SaveCallback)})
-         * but were not indirectly set through {@link #addDataset(Dataset)}.
-         *
-         * <p>See {@link FillResponse} for examples.
-         */
-        public Builder addSavableFields(AutoFillId... ids) {
-            for (AutoFillId id : ids) {
-                mSavableIds.add(id);
-            }
-            return this;
-        }
-
-        /**
-         * Sets a {@link Bundle} that will be passed to subsequent calls to {@link
-         * android.service.autofill.AutoFillService} methods such as {@link
-         * android.service.autofill.AutoFillService#onSaveRequest(
-         * android.app.assist.AssistStructure, Bundle, android.service.autofill.SaveCallback)},
-         * using {@link
-         * android.service.autofill.AutoFillService#EXTRA_RESPONSE_EXTRAS} as the key.
-         *
-         * <p>It can be used when to keep service state in between calls.
-         */
-        public Builder setExtras(Bundle extras) {
-            // TODO(b/33197203): make sure that either this method or the requires-Authentication
-            // ones are called, but not both
-            mExtras = Objects.requireNonNull(extras, "extras cannot be null");
-            return this;
-        }
-
-        /**
-         * Builds a new {@link FillResponse} instance.
-         */
-        public FillResponse build() {
-            return new FillResponse(this);
-        }
-    }
-
-    /////////////////////////////////////
-    //  Object "contract" methods. //
-    /////////////////////////////////////
-    @Override
-    public String toString() {
-        if (!DEBUG) return super.toString();
-
-        final StringBuilder builder = new StringBuilder("FillResponse: [datasets=")
-                .append(mDatasets).append(", savableIds=").append(Arrays.toString(mSavableIds))
-                .append(", extras=");
-        append(builder, mExtras)
-            .append(", flags=").append(mFlags)
-            .append(", requiresAuth: ").append(mRequiresAuth)
-            .append(", hasCrypto: ").append(mHasCryptoObject);
-        return builder.append(']').toString();
-    }
-
-    /////////////////////////////////////
-    //  Parcelable "contract" methods. //
-    /////////////////////////////////////
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel parcel, int flags) {
-        parcel.writeList(mDatasets);
-        parcel.writeParcelableArray(mSavableIds, 0);
-        parcel.writeBundle(mExtras);
-        parcel.writeInt(mFlags);
-        parcel.writeInt(mRequiresAuth ? 1 : 0);
-        parcel.writeInt(mHasCryptoObject ? 1 : 0);
-        if (mHasCryptoObject) {
-            parcel.writeLong(mCryptoOpId);
-        }
-    }
-
-    private FillResponse(Parcel parcel) {
-        mDatasets = new ArrayList<>();
-        parcel.readList(mDatasets, null);
-        mSavableIds = parcel.readParcelableArray(null, AutoFillId.class);
-        mExtras = parcel.readBundle();
-        mFlags = parcel.readInt();
-        mRequiresAuth = parcel.readInt() == 1;
-        mHasCryptoObject = parcel.readInt() == 1;
-        mCryptoOpId = mHasCryptoObject ? parcel.readLong() : 0;
-    }
-
-    public static final Parcelable.Creator<FillResponse> CREATOR =
-            new Parcelable.Creator<FillResponse>() {
-        @Override
-        public FillResponse createFromParcel(Parcel source) {
-            return new FillResponse(source);
-        }
-
-        @Override
-        public FillResponse[] newArray(int size) {
-            return new FillResponse[size];
-        }
-    };
-}
diff --git a/core/java/android/view/autofill/Helper.java b/core/java/android/view/autofill/Helper.java
index 14cf9e8..b1c9efa 100644
--- a/core/java/android/view/autofill/Helper.java
+++ b/core/java/android/view/autofill/Helper.java
@@ -26,12 +26,13 @@
 public final class Helper {
 
     static final boolean DEBUG = true; // TODO(b/33197203): set to false when stable
+    static final boolean VERBOSE = false;
     static final String REDACTED = "[REDACTED]";
 
     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/autofill/IAutoFillManager.aidl b/core/java/android/view/autofill/IAutoFillManager.aidl
new file mode 100644
index 0000000..0433a8f
--- /dev/null
+++ b/core/java/android/view/autofill/IAutoFillManager.aidl
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.view.autofill;
+
+import android.graphics.Rect;
+import android.os.Bundle;
+import android.os.IBinder;
+import android.view.autofill.AutoFillId;
+import android.view.autofill.AutoFillValue;
+import android.view.autofill.IAutoFillManagerClient;
+
+/**
+ * Mediator between apps being auto-filled and auto-fill service implementations.
+ *
+ * {@hide}
+ */
+interface IAutoFillManager {
+    boolean addClient(in IAutoFillManagerClient client, int userId);
+    oneway void startSession(in IBinder activityToken, in IBinder appCallback,
+            in AutoFillId autoFillId, in Rect bounds, in AutoFillValue value, int userId);
+    oneway void updateSession(in IBinder activityToken, in AutoFillId id, in Rect bounds,
+            in AutoFillValue value, int flags, int userId);
+    oneway void finishSession(in IBinder activityToken, int userId);
+    oneway void setAuthenticationResult(in Bundle data,
+            in IBinder activityToken, int userId);
+}
diff --git a/core/java/android/view/autofill/IAutoFillManagerClient.aidl b/core/java/android/view/autofill/IAutoFillManagerClient.aidl
new file mode 100644
index 0000000..45f363d
--- /dev/null
+++ b/core/java/android/view/autofill/IAutoFillManagerClient.aidl
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.view.autofill;
+
+import java.util.List;
+
+import android.content.Intent;
+import android.content.IntentSender;
+import android.view.autofill.AutoFillId;
+import android.view.autofill.AutoFillValue;
+
+/**
+ * Object running in the application process and responsible for auto-filling it.
+ *
+ * @hide
+ */
+oneway interface IAutoFillManagerClient {
+    /**
+     * Notifies the client when the auto-fill enabled state changed.
+     */
+    void setState(boolean enabled);
+
+    /**
+      * Auto-fills the activity with the contents of a dataset.
+      */
+    void autoFill(in List<AutoFillId> ids, in List<AutoFillValue> values);
+
+    /**
+      * Authenticates a fill response or a data set.
+      */
+    void authenticate(in IntentSender intent, in Intent fillInIntent);
+}
diff --git a/core/java/android/view/autofill/VirtualViewDelegate.java b/core/java/android/view/autofill/VirtualViewDelegate.java
deleted file mode 100644
index e465c67..0000000
--- a/core/java/android/view/autofill/VirtualViewDelegate.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package android.view.autofill;
-
-import android.annotation.Nullable;
-import android.graphics.Rect;
-import android.util.Log;
-import android.view.View;
-import android.view.ViewStructure;
-
-/**
- * This class is the contract a client should implement to enable support of a
- * virtual view hierarchy rooted at a given view for auto-fill purposes.
- *
- * <p>The view hierarchy is typically created through the
- * {@link View#onProvideAutoFillVirtualStructure(android.view.ViewStructure, int)} call and client
- * add virtual children by calling {@link ViewStructure#newChild(int, int, int)} or
- * {@link ViewStructure#asyncNewChild(int, int, int)}, where the client provides the
- * {@code virtualId} of the children - the same {@code virtualId} is used in the methods of this
- * class.
- *
- * <p>Objects of this class are typically created by overriding
- * {@link View#getAutoFillVirtualViewDelegate(Callback)} and saving the passed callback, which must
- * be notified upon changes on the hierarchy.
- *
- * <p>The main use case of these API is to enable custom views that draws its content - such as
- * {@link android.webkit.WebView} providers - to support the AutoFill Framework:
- *
- * <ol>
- *   <li>Client populates the virtual hierarchy on
- * {@link View#onProvideAutoFillVirtualStructure(android.view.ViewStructure, int)}
- *   <li>Android System generates the proper {@link AutoFillId} - encapsulating the view and the
- * virtual node ids - and pass it to the {@link android.service.autofill.AutoFillService}.
- *   <li>The service uses the {@link AutoFillId} to populate the auto-fill {@link Dataset}s and pass
- *   it back to the Android System.
- *   <li>Android System uses the {@link AutoFillId} to find the proper custom view and calls
- *   {@link #autoFill(int, AutoFillValue)} on that view passing the virtual id.
- *   <li>This provider than finds the node in the hierarchy and auto-fills it.
- * </ol>
- *
- */
-public abstract class VirtualViewDelegate {
-
-    // TODO(b/33197203): set to false once stable
-    private static final boolean DEBUG = true;
-
-    private static final String TAG = "VirtualViewDelegate";
-
-    /**
-     * Auto-fills a virtual view with the {@code value}.
-     *
-     * @param virtualId id identifying the virtual node inside the custom view.
-     * @param value value to be auto-filled.
-     */
-    public abstract void autoFill(int virtualId, AutoFillValue value);
-
-    /**
-     * Callback used to notify the AutoFill Framework of changes made on the view hierarchy while
-     * an {@link android.app.Activity} is being auto filled.
-     */
-    public abstract static class Callback {
-
-        /**
-         * Sent when the auto-fill bar for a child must be updated.
-         *
-         * See {@link AutoFillManager#updateAutoFillInput(View, int, android.graphics.Rect, int)}
-         * for more details.
-         */
-        // TODO(b/33197203): do we really need it, or should the parent view just call
-        // AutoFillManager.updateAutoFillInput() directly?
-        public void onAutoFillInputUpdated(int virtualId, @Nullable Rect boundaries, int flags) {
-            if (DEBUG) {
-                Log.v(TAG, "onAutoFillInputUpdated(): virtualId=" + virtualId + ", boundaries="
-                        + boundaries + ", flags=" + flags);
-            }
-        }
-
-        /**
-         * Sent when the value of a node was changed.
-         *
-         * <p>This method should only be called when the change was not caused by the AutoFill
-         * Framework itselft (i.e, through {@link VirtualViewDelegate#autoFill(int, AutoFillValue)},
-         * but by external causes (for example, when the user changed the value through the view's
-         * UI).
-         *
-         * @param virtualId id of the node whose value changed.
-         */
-        public void onValueChanged(int virtualId) {
-            if (DEBUG) Log.d(TAG, "onValueChanged() for" + virtualId);
-        }
-
-        /**
-         * Sent when nodes were removed (or had their ids changed) after the hierarchy has been
-         * committed to
-         * {@link View#onProvideAutoFillVirtualStructure(android.view.ViewStructure, int)}.
-         *
-         * <p>For example, when the view is rendering an {@code HTML} page, it should call this
-         * method when:
-         * <ul>
-         * <li>User navigated to another page and some (or all) nodes are gone.
-         * <li>The page's {@code DOM} was changed by {@code JavaScript} and some nodes moved (and
-         * are now identified by different ids).
-         * </ul>
-         *
-         * @param virtualIds id of the nodes that were removed.
-         */
-        public void onNodeRemoved(int... virtualIds) {
-            if (DEBUG) Log.d(TAG, "onNodeRemoved(): " + virtualIds);
-        }
-    }
-}
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/InputMethod.java b/core/java/android/view/inputmethod/InputMethod.java
index 5ab3d34..0922422 100644
--- a/core/java/android/view/inputmethod/InputMethod.java
+++ b/core/java/android/view/inputmethod/InputMethod.java
@@ -16,6 +16,8 @@
 
 package android.view.inputmethod;
 
+import android.annotation.NonNull;
+import android.annotation.Nullable;
 import android.annotation.SdkConstant;
 import android.annotation.SdkConstant.SdkConstantType;
 import android.inputmethodservice.InputMethodService;
@@ -148,6 +150,44 @@
     public void restartInput(InputConnection inputConnection, EditorInfo attribute);
 
     /**
+     * This method is called when {@code {@link #startInput(InputConnection, EditorInfo)} or
+     * {@code {@link #restartInput(InputConnection, EditorInfo)} needs to be dispatched.
+     *
+     * <p>Note: This method is hidden because the {@code startInputToken} that this method is
+     * dealing with is one of internal details, which should not be exposed to the IME developers.
+     * If you override this method, you are responsible for not breaking existing IMEs that expect
+     * {@link #startInput(InputConnection, EditorInfo)} to be still called back.</p>
+     *
+     * @param inputConnection optional specific input connection for communicating with the text
+     *                        box; if {@code null}, you should use the generic bound input
+     *                        connection
+     * @param editorInfo information about the text box (typically, an EditText) that requests input
+     * @param restarting {@code false} if this corresponds to
+     *                   {@link #startInput(InputConnection, EditorInfo)}. Otherwise this
+     *                   corresponds to {@link #restartInput(InputConnection, EditorInfo)}.
+     * @param startInputToken a token that identifies a logical session that starts with this method
+     *                        call. Some internal IPCs such as {@link
+     *                        InputMethodManager#setImeWindowStatus(IBinder, IBinder, int, int)}
+     *                        require this token to work, and you have to keep the token alive until
+     *                        the next {@link #startInput(InputConnection, EditorInfo, IBinder)} as
+     *                        long as your implementation of {@link InputMethod} relies on such
+     *                        IPCs
+     * @see #startInput(InputConnection, EditorInfo)
+     * @see #restartInput(InputConnection, EditorInfo)
+     * @see EditorInfo
+     * @hide
+     */
+    default void dispatchStartInputWithToken(@Nullable InputConnection inputConnection,
+            @NonNull EditorInfo editorInfo, boolean restarting,
+            @NonNull IBinder startInputToken) {
+        if (restarting) {
+            restartInput(inputConnection, editorInfo);
+        } else {
+            startInput(inputConnection, editorInfo);
+        }
+    }
+
+    /**
      * Create a new {@link InputMethodSession} that can be handed to client
      * applications for interacting with the input method.  You can later
      * use {@link #revokeSession(InputMethodSession)} to destroy the session
diff --git a/core/java/android/view/inputmethod/InputMethodInfo.java b/core/java/android/view/inputmethod/InputMethodInfo.java
index b6da1d8..71809bd 100644
--- a/core/java/android/view/inputmethod/InputMethodInfo.java
+++ b/core/java/android/view/inputmethod/InputMethodInfo.java
@@ -16,6 +16,7 @@
 
 package android.view.inputmethod;
 
+import android.annotation.NonNull;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.pm.ApplicationInfo;
@@ -42,7 +43,6 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Map;
 
 /**
  * This class is used to specify meta information of an input method.
@@ -110,6 +110,19 @@
     private final boolean mSupportsDismissingWindow;
 
     /**
+     * @param service the {@link ResolveInfo} corresponds in which the IME is implemented.
+     * @return a unique ID to be returned by {@link #getId()}. We have used
+     *         {@link ComponentName#flattenToShortString()} for this purpose (and it is already
+     *         unrealistic to switch to a different scheme as it is already implicitly assumed in
+     *         many places).
+     * @hide
+     */
+    public static String computeId(@NonNull ResolveInfo service) {
+        final ServiceInfo si = service.serviceInfo;
+        return new ComponentName(si.packageName, si.name).flattenToShortString();
+    }
+
+    /**
      * Constructor.
      *
      * @param context The Context in which we are parsing the input method.
@@ -127,15 +140,15 @@
      * @param context The Context in which we are parsing the input method.
      * @param service The ResolveInfo returned from the package manager about
      * this input method's component.
-     * @param additionalSubtypesMap additional subtypes being added to this InputMethodInfo
+     * @param additionalSubtypes additional subtypes being added to this InputMethodInfo
      * @hide
      */
     public InputMethodInfo(Context context, ResolveInfo service,
-            Map<String, List<InputMethodSubtype>> additionalSubtypesMap)
+            List<InputMethodSubtype> additionalSubtypes)
             throws XmlPullParserException, IOException {
         mService = service;
         ServiceInfo si = service.serviceInfo;
-        mId = new ComponentName(si.packageName, si.name).flattenToShortString();
+        mId = computeId(service);
         boolean isAuxIme = true;
         boolean supportsSwitchingToNextInputMethod = false; // false as default
         boolean supportsDismissingWindow = false; // false as default
@@ -233,8 +246,7 @@
             isAuxIme = false;
         }
 
-        if (additionalSubtypesMap != null && additionalSubtypesMap.containsKey(mId)) {
-            final List<InputMethodSubtype> additionalSubtypes = additionalSubtypesMap.get(mId);
+        if (additionalSubtypes != null) {
             final int N = additionalSubtypes.size();
             for (int i = 0; i < N; ++i) {
                 final InputMethodSubtype subtype = additionalSubtypes.get(i);
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java
index 2e99092..79b0420 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);
@@ -722,25 +739,16 @@
     }
 
     /** @hide */
-    public void setImeWindowStatus(IBinder imeToken, int vis, int backDisposition) {
+    public void setImeWindowStatus(IBinder imeToken, IBinder startInputToken, int vis,
+            int backDisposition) {
         try {
-            mService.setImeWindowStatus(imeToken, vis, backDisposition);
+            mService.setImeWindowStatus(imeToken, startInputToken, vis, backDisposition);
         } catch (RemoteException e) {
             throw e.rethrowFromSystemServer();
         }
     }
 
     /** @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 +778,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 +1293,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 +1492,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 +2357,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 4673c50..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;
@@ -41,9 +40,13 @@
 
     private static final String LOG_TAG = "TextClassificationManager";
 
+    private final Object mTextClassifierLock = new Object();
+    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;
 
@@ -56,18 +59,20 @@
      * Returns the default text classifier.
      */
     public TextClassifier getDefaultTextClassifier() {
-        if (mDefault == null) {
-            try {
-                mFd = ParcelFileDescriptor.open(
-                        new File("/etc/assistant/smart-selection.model"),
-                        ParcelFileDescriptor.MODE_READ_ONLY);
-                mDefault = new TextClassifierImpl(mContext, mFd);
-            } catch (FileNotFoundException e) {
-                Log.e(LOG_TAG, "Error accessing 'text classifier selection' model file.", e);
-                mDefault = TextClassifier.NO_OP;
+        synchronized (mTextClassifierLock) {
+            if (mDefault == null) {
+                try {
+                    mSmartSelectionFd = ParcelFileDescriptor.open(
+                            new File("/etc/assistant/smart-selection.model"),
+                            ParcelFileDescriptor.MODE_READ_ONLY);
+                    mDefault = new TextClassifierImpl(mContext, mSmartSelectionFd);
+                } catch (FileNotFoundException e) {
+                    Log.e(LOG_TAG, "Error accessing 'text classifier selection' model file.", e);
+                    mDefault = TextClassifier.NO_OP;
+                }
             }
+            return mDefault;
         }
-        return mDefault;
     }
 
     /**
@@ -95,12 +100,15 @@
         return Collections.emptyList();
     }
 
-    private LangId getLanguageDetector() {
-        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);
+    private LangId getLanguageDetector() throws FileNotFoundException {
+        synchronized (mLangIdLock) {
+            if (mLangId == null) {
+                mLangIdFd = ParcelFileDescriptor.open(
+                        new File("/etc/assistant/lang-id.model"),
+                        ParcelFileDescriptor.MODE_READ_ONLY);
+                mLangId = new LangId(mLangIdFd.getFd());
+            }
+            return mLangId;
         }
-        return mLangId;
     }
 }
diff --git a/core/java/android/view/textclassifier/TextClassificationResult.java b/core/java/android/view/textclassifier/TextClassificationResult.java
index 6af0efb..8912ef3 100644
--- a/core/java/android/view/textclassifier/TextClassificationResult.java
+++ b/core/java/android/view/textclassifier/TextClassificationResult.java
@@ -148,7 +148,7 @@
      * @hide
      */
     @NonNull
-    public static OnClickListener createStartActivityOnClick(
+    public static OnClickListener createStartActivityOnClickListener(
             @NonNull final Context context, @NonNull final Intent intent) {
         Preconditions.checkArgument(context != null);
         Preconditions.checkArgument(intent != null);
diff --git a/core/java/android/view/textclassifier/TextClassifier.java b/core/java/android/view/textclassifier/TextClassifier.java
index b84e2ae..791543e 100644
--- a/core/java/android/view/textclassifier/TextClassifier.java
+++ b/core/java/android/view/textclassifier/TextClassifier.java
@@ -35,6 +35,7 @@
     String TYPE_EMAIL = "email";
     String TYPE_PHONE = "phone";
     String TYPE_ADDRESS = "address";
+    String TYPE_URL = "url";
 
     @Retention(RetentionPolicy.SOURCE)
     @StringDef({
diff --git a/core/java/android/view/textclassifier/TextClassifierImpl.java b/core/java/android/view/textclassifier/TextClassifierImpl.java
index 0657067..97a36fd 100644
--- a/core/java/android/view/textclassifier/TextClassifierImpl.java
+++ b/core/java/android/view/textclassifier/TextClassifierImpl.java
@@ -18,6 +18,7 @@
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
+import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
 import android.content.pm.PackageManager;
@@ -26,7 +27,7 @@
 import android.icu.text.BreakIterator;
 import android.net.Uri;
 import android.os.ParcelFileDescriptor;
-import android.text.SmartSelection;
+import android.provider.Browser;
 import android.text.Spannable;
 import android.text.TextUtils;
 import android.text.method.WordIterator;
@@ -44,6 +45,7 @@
 import java.util.LinkedHashMap;
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 
 /**
@@ -59,6 +61,8 @@
 
     private static final String LOG_TAG = "TextClassifierImpl";
 
+    private final Object mSmartSelectionLock = new Object();
+
     private final Context mContext;
     private final ParcelFileDescriptor mFd;
     private SmartSelection mSmartSelection;
@@ -110,7 +114,7 @@
                 String type = getSmartSelection()
                         .classifyText(text.toString(), startIndex, endIndex);
                 if (!TextUtils.isEmpty(type)) {
-                    type = type.toLowerCase().trim();
+                    type = type.toLowerCase(Locale.ENGLISH).trim();
                     // TODO: Added this log for debug only. Remove before release.
                     Log.d(LOG_TAG, String.format("Classification type: %s", type));
                     return createClassificationResult(type, classified);
@@ -124,7 +128,6 @@
         return TextClassifier.NO_OP.getTextClassificationResult(text, startIndex, endIndex);
     }
 
-
     @Override
     public LinksInfo getLinks(CharSequence text, int linkMask) {
         Preconditions.checkArgument(text != null);
@@ -139,36 +142,54 @@
         return TextClassifier.NO_OP.getLinks(text, linkMask);
     }
 
-    private synchronized SmartSelection getSmartSelection() throws FileNotFoundException {
-        if (mSmartSelection == null) {
-            mSmartSelection = new SmartSelection(mFd.getFd());
+    private SmartSelection getSmartSelection() throws FileNotFoundException {
+        synchronized (mSmartSelectionLock) {
+            if (mSmartSelection == null) {
+                mSmartSelection = new SmartSelection(mFd.getFd());
+            }
+            return mSmartSelection;
         }
-        return mSmartSelection;
     }
 
     private TextClassificationResult createClassificationResult(String type, CharSequence text) {
-        final Intent intent = IntentFactory.create(type, text.toString());
-        if (intent == null) {
-            return TextClassificationResult.EMPTY;
-        }
-
         final TextClassificationResult.Builder builder = new TextClassificationResult.Builder()
                 .setText(text.toString())
-                .setEntityType(type, 1.0f /* confidence */)
-                .setIntent(intent)
-                .setOnClickListener(TextClassificationResult.createStartActivityOnClick(
-                        mContext, intent))
-                .setLabel(IntentFactory.getLabel(mContext, type));
-        final PackageManager pm = mContext.getPackageManager();
-        final ResolveInfo resolveInfo = pm.resolveActivity(intent, 0);
-        // TODO: If the resolveInfo is the "chooser", do not set the package name and use a default
-        // icon for this classification type.
-        intent.setPackage(resolveInfo.activityInfo.packageName);
-        Drawable icon = resolveInfo.activityInfo.loadIcon(pm);
-        if (icon == null) {
-            icon = resolveInfo.loadIcon(pm);
+                .setEntityType(type, 1.0f /* confidence */);
+
+        final Intent intent = IntentFactory.create(mContext, type, text.toString());
+        final PackageManager pm;
+        final ResolveInfo resolveInfo;
+        if (intent != null) {
+            pm = mContext.getPackageManager();
+            resolveInfo = pm.resolveActivity(intent, 0);
+        } else {
+            pm = null;
+            resolveInfo = null;
         }
-        builder.setIcon(icon);
+        if (resolveInfo != null && resolveInfo.activityInfo != null) {
+            builder.setIntent(intent)
+                    .setOnClickListener(TextClassificationResult.createStartActivityOnClickListener(
+                            mContext, intent));
+
+            final String packageName = resolveInfo.activityInfo.packageName;
+            if ("android".equals(packageName)) {
+                // Requires the chooser to find an activity to handle the intent.
+                builder.setLabel(IntentFactory.getLabel(mContext, type));
+            } else {
+                // A default activity will handle the intent.
+                intent.setComponent(new ComponentName(packageName, resolveInfo.activityInfo.name));
+                Drawable icon = resolveInfo.activityInfo.loadIcon(pm);
+                if (icon == null) {
+                    icon = resolveInfo.loadIcon(pm);
+                }
+                builder.setIcon(icon);
+                CharSequence label = resolveInfo.activityInfo.loadLabel(pm);
+                if (label == null) {
+                    label = resolveInfo.loadLabel(pm);
+                }
+                builder.setLabel(label != null ? label.toString() : null);
+            }
+        }
         return builder.build();
     }
 
@@ -211,9 +232,12 @@
                     final String type =
                             smartSelection.classifyText(text, selectionStart, selectionEnd);
                     if (matches(type, linkMask)) {
-                        final ClickableSpan span = createSpan(
+                        final Intent intent = IntentFactory.create(
                                 context, type, text.substring(selectionStart, selectionEnd));
-                        spans.add(new SpanSpec(selectionStart, selectionEnd, span));
+                        if (hasActivityHandler(context, intent)) {
+                            final ClickableSpan span = createSpan(context, intent);
+                            spans.add(new SpanSpec(selectionStart, selectionEnd, span));
+                        }
                     }
                 }
                 start = end;
@@ -237,6 +261,10 @@
                     && TextClassifier.TYPE_ADDRESS.equals(type)) {
                 return true;
             }
+            if ((linkMask & Linkify.WEB_URLS) != 0
+                    && TextClassifier.TYPE_URL.equals(type)) {
+                return true;
+            }
             return false;
         }
 
@@ -279,17 +307,24 @@
             return result;
         }
 
-        private static ClickableSpan createSpan(
-                final Context context, final String type, final String text) {
+        private static ClickableSpan createSpan(final Context context, final Intent intent) {
             return new ClickableSpan() {
                 // TODO: Style this span.
                 @Override
                 public void onClick(View widget) {
-                    context.startActivity(IntentFactory.create(type, text));
+                    context.startActivity(intent);
                 }
             };
         }
 
+        private static boolean hasActivityHandler(Context context, @Nullable Intent intent) {
+            if (intent == null) {
+                return false;
+            }
+            final ResolveInfo resolveInfo = context.getPackageManager().resolveActivity(intent, 0);
+            return resolveInfo != null && resolveInfo.activityInfo != null;
+        }
+
         /**
          * Implementation of LinksInfo that adds ClickableSpans to the specified text.
          */
@@ -344,7 +379,7 @@
         private IntentFactory() {}
 
         @Nullable
-        public static Intent create(String type, String text) {
+        public static Intent create(Context context, String type, String text) {
             switch (type) {
                 case TextClassifier.TYPE_EMAIL:
                     return new Intent(Intent.ACTION_SENDTO)
@@ -355,6 +390,9 @@
                 case TextClassifier.TYPE_ADDRESS:
                     return new Intent(Intent.ACTION_VIEW)
                             .setData(Uri.parse(String.format("geo:0,0?q=%s", text)));
+                case TextClassifier.TYPE_URL:
+                    return new Intent(Intent.ACTION_VIEW, Uri.parse(text))
+                            .putExtra(Browser.EXTRA_APPLICATION_ID, context.getPackageName());
                 default:
                     return null;
                 // TODO: Add other classification types.
@@ -370,6 +408,8 @@
                     return context.getString(com.android.internal.R.string.dial);
                 case TextClassifier.TYPE_ADDRESS:
                     return context.getString(com.android.internal.R.string.map);
+                case TextClassifier.TYPE_URL:
+                    return context.getString(com.android.internal.R.string.browse);
                 default:
                     return null;
                 // TODO: Add other classification types.
diff --git a/core/java/android/webkit/UserPackage.java b/core/java/android/webkit/UserPackage.java
index 404bcf4..f53b5d6 100644
--- a/core/java/android/webkit/UserPackage.java
+++ b/core/java/android/webkit/UserPackage.java
@@ -20,6 +20,7 @@
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.pm.UserInfo;
+import android.os.Build;
 import android.os.UserManager;
 
 import java.util.ArrayList;
@@ -77,6 +78,15 @@
                         & ApplicationInfo.PRIVATE_FLAG_HIDDEN) == 0));
     }
 
+    /**
+     * Returns whether the package represented by {@param packageInfo} targets a sdk version
+     * supported by the current framework version.
+     */
+    public static boolean hasCorrectTargetSdkVersion(PackageInfo packageInfo) {
+        // TODO(gsennton) use Build.VERSION_CODES.O when that has been updated.
+        return packageInfo.applicationInfo.targetSdkVersion > Build.VERSION_CODES.N_MR1;
+    }
+
     public UserInfo getUserInfo() {
         return mUserInfo;
     }
diff --git a/core/java/android/webkit/WebViewFactory.java b/core/java/android/webkit/WebViewFactory.java
index d7a49e4..0906d1a 100644
--- a/core/java/android/webkit/WebViewFactory.java
+++ b/core/java/android/webkit/WebViewFactory.java
@@ -145,18 +145,10 @@
     /**
      * @hide
      */
-    public static Class<WebViewFactoryProvider> getWebViewProviderClass(  ClassLoader clazzLoader)
-            throws ClassNotFoundException{
-        try {
-            return (Class<WebViewFactoryProvider>) Class.forName(CHROMIUM_WEBVIEW_FACTORY,
-                    true, clazzLoader);
-        } catch (ClassNotFoundException e) {
-            // TODO: This loads the provider which is not built for O, should be removed
-            // before the release.
-            return (Class<WebViewFactoryProvider>) Class.forName(
-                    "com.android.webview.chromium.WebViewChromiumFactoryProvider",
-                    true, clazzLoader);
-        }
+    public static Class<WebViewFactoryProvider> getWebViewProviderClass(ClassLoader clazzLoader)
+            throws ClassNotFoundException {
+        return (Class<WebViewFactoryProvider>) Class.forName(CHROMIUM_WEBVIEW_FACTORY,
+                true, clazzLoader);
     }
 
     /**
@@ -225,15 +217,10 @@
                     }
                 }
 
-                Trace.traceBegin(Trace.TRACE_TAG_WEBVIEW, "providerClass.newInstance()");
+                Trace.traceBegin(Trace.TRACE_TAG_WEBVIEW, "WebViewFactoryProvider invocation");
                 try {
-                    if (staticFactory != null) {
-                        sProviderInstance = (WebViewFactoryProvider)
-                                staticFactory.invoke(null, new WebViewDelegate());
-                    } else {
-                        sProviderInstance = providerClass.getConstructor(WebViewDelegate.class)
-                                .newInstance(new WebViewDelegate());
-                    }
+                    sProviderInstance = (WebViewFactoryProvider)
+                            staticFactory.invoke(null, new WebViewDelegate());
                     if (DEBUG) Log.v(LOGTAG, "Loaded provider: " + sProviderInstance);
                     return sProviderInstance;
                 } catch (Exception e) {
@@ -384,8 +371,7 @@
                 Trace.traceBegin(Trace.TRACE_TAG_WEBVIEW, "Class.forName()");
                 try {
                     return getWebViewProviderClass(clazzLoader);
-                }
-                finally {
+                } finally {
                     Trace.traceEnd(Trace.TRACE_TAG_WEBVIEW);
                 }
             } catch (ClassNotFoundException e) {
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index 47c4cf38..1937187 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -54,6 +54,7 @@
 import android.view.Menu;
 import android.view.MenuItem;
 import android.view.MotionEvent;
+import android.view.PointerIcon;
 import android.view.VelocityTracker;
 import android.view.View;
 import android.view.ViewConfiguration;
@@ -2548,7 +2549,7 @@
     }
 
     private boolean isItemClickable(View view) {
-        return !view.hasFocusable(false);
+        return !view.hasExplicitFocusable();
     }
 
     /**
@@ -2824,7 +2825,7 @@
             final View v = getChildAt(mSelectedPosition - mFirstPosition);
 
             if (v != null) {
-                if (v.hasFocusable(false)) return;
+                if (v.hasExplicitFocusable()) return;
                 v.setPressed(true);
             }
             setPressed(true);
@@ -3428,7 +3429,7 @@
             if (mTouchMode == TOUCH_MODE_DOWN) {
                 mTouchMode = TOUCH_MODE_TAP;
                 final View child = getChildAt(mMotionPosition - mFirstPosition);
-                if (child != null && !child.hasFocusable(false)) {
+                if (child != null && !child.hasExplicitFocusable()) {
                     mLayoutMode = LAYOUT_NORMAL;
 
                     if (!mDataChanged) {
@@ -4005,7 +4006,7 @@
 
                 final float x = ev.getX();
                 final boolean inList = x > mListPadding.left && x < getWidth() - mListPadding.right;
-                if (inList && !child.hasFocusable(false)) {
+                if (inList && !child.hasExplicitFocusable()) {
                     if (mPerformClick == null) {
                         mPerformClick = new PerformClick();
                     }
@@ -4402,6 +4403,17 @@
     }
 
     @Override
+    public PointerIcon onResolvePointerIcon(MotionEvent event, int pointerIndex) {
+        if (mFastScroll != null) {
+            PointerIcon pointerIcon = mFastScroll.onResolvePointerIcon(event, pointerIndex);
+            if (pointerIcon != null) {
+                return pointerIcon;
+            }
+        }
+        return super.onResolvePointerIcon(event, pointerIndex);
+    }
+
+    @Override
     public boolean onInterceptTouchEvent(MotionEvent ev) {
         final int actionMasked = ev.getActionMasked();
         View v;
diff --git a/core/java/android/widget/ActivityChooserView.java b/core/java/android/widget/ActivityChooserView.java
index 9a39a17..51587a7 100644
--- a/core/java/android/widget/ActivityChooserView.java
+++ b/core/java/android/widget/ActivityChooserView.java
@@ -250,7 +250,7 @@
         mDefaultActivityButton = (FrameLayout) findViewById(R.id.default_activity_button);
         mDefaultActivityButton.setOnClickListener(mCallbacks);
         mDefaultActivityButton.setOnLongClickListener(mCallbacks);
-        mDefaultActivityButtonImage = mDefaultActivityButton.findViewById(R.id.image);
+        mDefaultActivityButtonImage = (ImageView) mDefaultActivityButton.findViewById(R.id.image);
 
         final FrameLayout expandButton = (FrameLayout) findViewById(R.id.expand_activities_button);
         expandButton.setOnClickListener(mCallbacks);
@@ -282,7 +282,7 @@
         mExpandActivityOverflowButton = expandButton;
 
         mExpandActivityOverflowButtonImage =
-            expandButton.findViewById(R.id.image);
+            (ImageView) expandButton.findViewById(R.id.image);
         mExpandActivityOverflowButtonImage.setImageDrawable(expandActivityOverflowButtonDrawable);
 
         mAdapter = new ActivityChooserViewAdapter();
@@ -760,7 +760,7 @@
                         convertView = LayoutInflater.from(getContext()).inflate(
                                 R.layout.activity_chooser_view_list_item, parent, false);
                         convertView.setId(ITEM_VIEW_TYPE_FOOTER);
-                        TextView titleView = convertView.findViewById(R.id.title);
+                        TextView titleView = (TextView) convertView.findViewById(R.id.title);
                         titleView.setText(mContext.getString(
                                 R.string.activity_chooser_view_see_all));
                     }
@@ -772,11 +772,11 @@
                     }
                     PackageManager packageManager = mContext.getPackageManager();
                     // Set the icon
-                    ImageView iconView = convertView.findViewById(R.id.icon);
+                    ImageView iconView = (ImageView) convertView.findViewById(R.id.icon);
                     ResolveInfo activity = (ResolveInfo) getItem(position);
                     iconView.setImageDrawable(activity.loadIcon(packageManager));
                     // Set the title.
-                    TextView titleView = convertView.findViewById(R.id.title);
+                    TextView titleView = (TextView) convertView.findViewById(R.id.title);
                     titleView.setText(activity.loadLabel(packageManager));
                     // Highlight the default.
                     if (mShowDefaultActivity && position == 0 && mHighlightDefaultActivity) {
diff --git a/core/java/android/widget/AppSecurityPermissions.java b/core/java/android/widget/AppSecurityPermissions.java
index 06d4868..68e6809 100644
--- a/core/java/android/widget/AppSecurityPermissions.java
+++ b/core/java/android/widget/AppSecurityPermissions.java
@@ -451,7 +451,7 @@
 
     private View getPermissionsView(int which, boolean showRevokeUI) {
         LinearLayout permsView = (LinearLayout) mInflater.inflate(R.layout.app_perms_summary, null);
-        LinearLayout displayList = permsView.findViewById(R.id.perms_list);
+        LinearLayout displayList = (LinearLayout) permsView.findViewById(R.id.perms_list);
         View noPermsView = permsView.findViewById(R.id.no_permissions);
 
         displayPermissions(mPermGroupsList, displayList, which, showRevokeUI);
@@ -517,8 +517,8 @@
             CharSequence grpName, CharSequence permList, boolean dangerous, Drawable icon) {
         View permView = inflater.inflate(R.layout.app_permission_item_old, null);
 
-        TextView permGrpView = permView.findViewById(R.id.permission_group);
-        TextView permDescView = permView.findViewById(R.id.permission_list);
+        TextView permGrpView = (TextView) permView.findViewById(R.id.permission_group);
+        TextView permDescView = (TextView) permView.findViewById(R.id.permission_list);
 
         ImageView imgView = (ImageView)permView.findViewById(R.id.perm_icon);
         imgView.setImageDrawable(icon);
diff --git a/core/java/android/widget/ArrayAdapter.java b/core/java/android/widget/ArrayAdapter.java
index 81f0d3d..bbc50da 100644
--- a/core/java/android/widget/ArrayAdapter.java
+++ b/core/java/android/widget/ArrayAdapter.java
@@ -388,7 +388,7 @@
                 text = (TextView) view;
             } else {
                 //  Otherwise, find the TextView field within the layout
-                text = view.findViewById(mFieldId);
+                text = (TextView) view.findViewById(mFieldId);
 
                 if (text == null) {
                     throw new RuntimeException("Failed to find view with ID "
diff --git a/core/java/android/widget/CalendarViewLegacyDelegate.java b/core/java/android/widget/CalendarViewLegacyDelegate.java
index 1b899db..557d411 100644
--- a/core/java/android/widget/CalendarViewLegacyDelegate.java
+++ b/core/java/android/widget/CalendarViewLegacyDelegate.java
@@ -316,9 +316,9 @@
         View content = layoutInflater.inflate(R.layout.calendar_view, null, false);
         mDelegator.addView(content);
 
-        mListView = mDelegator.findViewById(R.id.list);
-        mDayNamesHeader = content.findViewById(R.id.day_names);
-        mMonthName = content.findViewById(R.id.month_name);
+        mListView = (ListView) mDelegator.findViewById(R.id.list);
+        mDayNamesHeader = (ViewGroup) content.findViewById(R.id.day_names);
+        mMonthName = (TextView) content.findViewById(R.id.month_name);
 
         setUpHeader();
         setUpListView();
diff --git a/core/java/android/widget/CompoundButton.java b/core/java/android/widget/CompoundButton.java
index 500f381..6f687fe 100644
--- a/core/java/android/widget/CompoundButton.java
+++ b/core/java/android/widget/CompoundButton.java
@@ -32,7 +32,6 @@
 import android.view.SoundEffectConstants;
 import android.view.ViewDebug;
 import android.view.ViewHierarchyEncoder;
-import android.view.ViewStructure;
 import android.view.accessibility.AccessibilityEvent;
 import android.view.accessibility.AccessibilityNodeInfo;
 import android.view.autofill.AutoFillType;
@@ -562,17 +561,14 @@
         stream.addProperty("checked", isChecked());
     }
 
-    // TODO(b/33197203): add unit/CTS tests for auto-fill methods
+    // TODO(b/33197203): add unit/CTS tests for auto-fill methods (and make sure they handle enable)
 
-    @Override
-    public void onProvideAutoFillStructure(ViewStructure structure, int flags) {
-        super.onProvideAutoFillStructure(structure, flags);
-        structure.setAutoFillValue(AutoFillValue.forToggle(isChecked()));
-        // TODO(b/33197203): add unit/CTS tests for auto-fill methods
-    }
+    // TODO(b/33197203): override onProvideAutoFillStructure and add a change listener
 
     @Override
     public void autoFill(AutoFillValue value) {
+        if (!isEnabled()) return;
+
         setChecked(value.getToggleValue());
     }
 
@@ -580,4 +576,9 @@
     public AutoFillType getAutoFillType() {
         return AutoFillType.forToggle();
     }
+
+    @Override
+    public AutoFillValue getAutoFillValue() {
+        return isEnabled() ? null : AutoFillValue.forToggle(isChecked());
+    }
 }
diff --git a/core/java/android/widget/DatePickerCalendarDelegate.java b/core/java/android/widget/DatePickerCalendarDelegate.java
index 907250a..f712685 100755
--- a/core/java/android/widget/DatePickerCalendarDelegate.java
+++ b/core/java/android/widget/DatePickerCalendarDelegate.java
@@ -115,10 +115,10 @@
         mDelegator.addView(mContainer);
 
         // Set up header views.
-        final ViewGroup header = mContainer.findViewById(R.id.date_picker_header);
-        mHeaderYear = header.findViewById(R.id.date_picker_header_year);
+        final ViewGroup header = (ViewGroup) mContainer.findViewById(R.id.date_picker_header);
+        mHeaderYear = (TextView) header.findViewById(R.id.date_picker_header_year);
         mHeaderYear.setOnClickListener(mOnHeaderClickListener);
-        mHeaderMonthDay = header.findViewById(R.id.date_picker_header_date);
+        mHeaderMonthDay = (TextView) header.findViewById(R.id.date_picker_header_date);
         mHeaderMonthDay.setOnClickListener(mOnHeaderClickListener);
 
         // For the sake of backwards compatibility, attempt to extract the text
@@ -154,10 +154,10 @@
         a.recycle();
 
         // Set up picker container.
-        mAnimator = mContainer.findViewById(R.id.animator);
+        mAnimator = (ViewAnimator) mContainer.findViewById(R.id.animator);
 
         // Set up day picker view.
-        mDayPickerView = mAnimator.findViewById(R.id.date_picker_day_picker);
+        mDayPickerView = (DayPickerView) mAnimator.findViewById(R.id.date_picker_day_picker);
         mDayPickerView.setFirstDayOfWeek(mFirstDayOfWeek);
         mDayPickerView.setMinDate(mMinDate.getTimeInMillis());
         mDayPickerView.setMaxDate(mMaxDate.getTimeInMillis());
@@ -165,7 +165,7 @@
         mDayPickerView.setOnDaySelectedListener(mOnDaySelectedListener);
 
         // Set up year picker view.
-        mYearPickerView = mAnimator.findViewById(R.id.date_picker_year_picker);
+        mYearPickerView = (YearPickerView) mAnimator.findViewById(R.id.date_picker_year_picker);
         mYearPickerView.setRange(mMinDate, mMaxDate);
         mYearPickerView.setYear(mCurrentDate.get(Calendar.YEAR));
         mYearPickerView.setOnYearSelectedListener(mOnYearSelectedListener);
diff --git a/core/java/android/widget/DayPickerPagerAdapter.java b/core/java/android/widget/DayPickerPagerAdapter.java
index 63621e1..8d5bf8f 100644
--- a/core/java/android/widget/DayPickerPagerAdapter.java
+++ b/core/java/android/widget/DayPickerPagerAdapter.java
@@ -225,7 +225,7 @@
     public Object instantiateItem(ViewGroup container, int position) {
         final View itemView = mInflater.inflate(mLayoutResId, container, false);
 
-        final SimpleMonthView v = itemView.findViewById(mCalendarViewId);
+        final SimpleMonthView v = (SimpleMonthView) itemView.findViewById(mCalendarViewId);
         v.setOnDayClickListener(mOnDayClickListener);
         v.setMonthTextAppearance(mMonthTextAppearance);
         v.setDayOfWeekTextAppearance(mDayOfWeekTextAppearance);
diff --git a/core/java/android/widget/DayPickerViewPager.java b/core/java/android/widget/DayPickerViewPager.java
index 058baa6..a27e022 100644
--- a/core/java/android/widget/DayPickerViewPager.java
+++ b/core/java/android/widget/DayPickerViewPager.java
@@ -21,10 +21,10 @@
 import android.util.AttributeSet;
 import android.view.View;
 
-import com.android.internal.util.Predicate;
 import com.android.internal.widget.ViewPager;
 
 import java.util.ArrayList;
+import java.util.function.Predicate;
 
 /**
  * This displays a list of months in a calendar format with selectable days.
@@ -137,10 +137,9 @@
     }
 
     @Override
-    protected <T extends View> T findViewByPredicateTraversal(Predicate<View> predicate,
-            View childToSkip) {
-        if (predicate.apply(this)) {
-            return (T) this;
+    protected View findViewByPredicateTraversal(Predicate<View> predicate, View childToSkip) {
+        if (predicate.test(this)) {
+            return this;
         }
 
         // Always try the selected view first.
@@ -149,7 +148,7 @@
         if (current != childToSkip && current != null) {
             final View v = current.findViewByPredicate(predicate);
             if (v != null) {
-                return (T) v;
+                return v;
             }
         }
 
@@ -161,7 +160,7 @@
                 final View v = child.findViewByPredicate(predicate);
 
                 if (v != null) {
-                    return (T) v;
+                    return v;
                 }
             }
         }
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java
index c1834f1..dd3b054 100644
--- a/core/java/android/widget/Editor.java
+++ b/core/java/android/widget/Editor.java
@@ -95,7 +95,6 @@
 import android.view.ViewConfiguration;
 import android.view.ViewGroup;
 import android.view.ViewGroup.LayoutParams;
-import android.view.ViewParent;
 import android.view.ViewTreeObserver;
 import android.view.WindowManager;
 import android.view.accessibility.AccessibilityNodeInfo;
@@ -107,7 +106,6 @@
 import android.view.inputmethod.InputConnection;
 import android.view.inputmethod.InputMethodManager;
 import android.view.textclassifier.TextClassificationResult;
-import android.view.textclassifier.TextSelection;
 import android.widget.AdapterView.OnItemClickListener;
 import android.widget.TextView.Drawables;
 import android.widget.TextView.OnEditorActionListener;
@@ -140,7 +138,6 @@
     private static final boolean DEBUG_UNDO = false;
 
     static final int BLINK = 500;
-    private static final float[] TEMP_POSITION = new float[2];
     private static final int DRAG_SHADOW_MAX_TEXT_LENGTH = 20;
     private static final float LINE_SLOP_MULTIPLIER_FOR_HANDLEVIEWS = 0.5f;
     private static final int UNSET_X_VALUE = -1;
@@ -152,10 +149,10 @@
     private static final int MENU_ITEM_ORDER_ASSIST = 1;
     private static final int MENU_ITEM_ORDER_UNDO = 2;
     private static final int MENU_ITEM_ORDER_REDO = 3;
-    private static final int MENU_ITEM_ORDER_SHARE = 4;
-    private static final int MENU_ITEM_ORDER_CUT = 5;
-    private static final int MENU_ITEM_ORDER_COPY = 6;
-    private static final int MENU_ITEM_ORDER_PASTE = 7;
+    private static final int MENU_ITEM_ORDER_CUT = 4;
+    private static final int MENU_ITEM_ORDER_COPY = 5;
+    private static final int MENU_ITEM_ORDER_PASTE = 6;
+    private static final int MENU_ITEM_ORDER_SHARE = 7;
     private static final int MENU_ITEM_ORDER_PASTE_AS_PLAIN_TEXT = 8;
     private static final int MENU_ITEM_ORDER_SELECT_ALL = 9;
     private static final int MENU_ITEM_ORDER_REPLACE = 10;
@@ -171,7 +168,7 @@
     private InsertionPointCursorController mInsertionPointCursorController;
     SelectionModifierCursorController mSelectionModifierCursorController;
     // Action mode used when text is selected or when actions on an insertion cursor are triggered.
-    ActionMode mTextActionMode;
+    private ActionMode mTextActionMode;
     private boolean mInsertionControllerEnabled;
     private boolean mSelectionControllerEnabled;
 
@@ -238,7 +235,7 @@
     private boolean mPreserveSelection;
     private boolean mRestartActionModeOnNextRefresh;
 
-    private TextClassificationResult mTextClassificationResult;
+    private SelectionActionModeHelper mSelectionActionModeHelper;
 
     boolean mIsBeingLongClicked;
 
@@ -294,7 +291,7 @@
 
     private Rect mTempRect;
 
-    private TextView mTextView;
+    private final TextView mTextView;
 
     final ProcessTextIntentActionsHandler mProcessTextIntentActionsHandler;
 
@@ -1032,46 +1029,6 @@
                 boolean parentPositionChanged, boolean parentScrolled);
     }
 
-    private boolean isPositionVisible(final float positionX, final float positionY) {
-        synchronized (TEMP_POSITION) {
-            final float[] position = TEMP_POSITION;
-            position[0] = positionX;
-            position[1] = positionY;
-            View view = mTextView;
-
-            while (view != null) {
-                if (view != mTextView) {
-                    // Local scroll is already taken into account in positionX/Y
-                    position[0] -= view.getScrollX();
-                    position[1] -= view.getScrollY();
-                }
-
-                if (position[0] < 0 || position[1] < 0 || position[0] > view.getWidth()
-                        || position[1] > view.getHeight()) {
-                    return false;
-                }
-
-                if (!view.getMatrix().isIdentity()) {
-                    view.getMatrix().mapPoints(position);
-                }
-
-                position[0] += view.getLeft();
-                position[1] += view.getTop();
-
-                final ViewParent parent = view.getParent();
-                if (parent instanceof View) {
-                    view = (View) parent;
-                } else {
-                    // We've reached the ViewRoot, stop iterating
-                    view = null;
-                }
-            }
-        }
-
-        // We've been able to walk up the view hierarchy and the position was never clipped
-        return true;
-    }
-
     private boolean isOffsetVisible(int offset) {
         Layout layout = mTextView.getLayout();
         if (layout == null) return false;
@@ -1079,7 +1036,8 @@
         final int line = layout.getLineForOffset(offset);
         final int lineBottom = layout.getLineBottom(line);
         final int primaryHorizontal = (int) layout.getPrimaryHorizontal(offset);
-        return isPositionVisible(primaryHorizontal + mTextView.viewportToContentHorizontalOffset(),
+        return mTextView.isPositionVisible(
+                primaryHorizontal + mTextView.viewportToContentHorizontalOffset(),
                 lineBottom + mTextView.viewportToContentVerticalOffset());
     }
 
@@ -1891,7 +1849,7 @@
             mInsertionPointCursorController.invalidateHandle();
         }
         if (mTextActionMode != null) {
-            invalidateActionMode(getTextClassifierInfo(false));
+            invalidateActionModeAsync();
         }
     }
 
@@ -1984,12 +1942,12 @@
                 if (mRestartActionModeOnNextRefresh) {
                     // To avoid distraction, newly start action mode only when selection action
                     // mode is being restarted.
-                    startSelectionActionMode(null);
+                    startSelectionActionMode();
                 }
             } else if (selectionController == null || !selectionController.isActive()) {
                 // Insertion action mode is active. Avoid dismissing the selection.
                 stopTextActionModeWithPreservingSelection();
-                startSelectionActionMode(null);
+                startSelectionActionMode();
             } else {
                 mTextActionMode.invalidateContentRect();
             }
@@ -2026,55 +1984,46 @@
         }
     }
 
+    @NonNull
+    TextView getTextView() {
+        return mTextView;
+    }
+
+    @Nullable
+    ActionMode getTextActionMode() {
+        return mTextActionMode;
+    }
+
+    void setRestartActionModeOnNextRefresh(boolean value) {
+        mRestartActionModeOnNextRefresh = value;
+    }
+
     /**
-     * Starts a Selection Action Mode with the current selection and ensures the selection handles
-     * are shown if there is a selection. This should be used when the mode is started from a
-     * non-touch event.
-     *
-     * @return true if the selection mode was actually started.
+     * Asynchronously starts a selection action mode using the TextClassifier.
      */
-    boolean startSelectionActionMode(@Nullable TextClassificationResult textClassificationResult) {
-        mTextClassificationResult = textClassificationResult;
-        boolean selectionStarted = startSelectionActionModeInternal();
-        if (selectionStarted) {
-            getSelectionController().show();
+    void startSelectionActionModeAsync() {
+        getSelectionActionModeHelper().startActionModeAsync();
+    }
+
+    /**
+     * Synchronously starts a selection action mode without the TextClassifier.
+     */
+    void startSelectionActionMode() {
+        getSelectionActionModeHelper().startActionMode();
+    }
+
+    /**
+     * Asynchronously invalidates an action mode using the TextClassifier.
+     */
+    private void invalidateActionModeAsync() {
+        getSelectionActionModeHelper().invalidateActionModeAsync();
+    }
+
+    private SelectionActionModeHelper getSelectionActionModeHelper() {
+        if (mSelectionActionModeHelper == null) {
+            mSelectionActionModeHelper = new SelectionActionModeHelper(this);
         }
-        mRestartActionModeOnNextRefresh = false;
-        return selectionStarted;
-    }
-
-    private boolean startSelectionActionModeWithTextAssistant() {
-        return startSelectionActionMode(getTextClassifierInfo(true));
-    }
-
-    private void invalidateActionMode(TextClassificationResult textClassificationResult) {
-        mTextClassificationResult = textClassificationResult;
-        mTextActionMode.invalidate();
-    }
-
-    // TODO: Make this a non-blocking call.
-    private TextClassificationResult getTextClassifierInfo(boolean updateSelection) {
-        // TODO: Trim the text so that only text necessary to provide context of the selected
-        // text is sent to the assistant.
-        final int trimStartIndex = 0;
-        final int trimEndIndex = mTextView.getText().length();
-        CharSequence trimmedText =
-                mTextView.getText().subSequence(trimStartIndex, trimEndIndex);
-        int startIndex = mTextView.getSelectionStart() - trimStartIndex;
-        int endIndex = mTextView.getSelectionEnd() - trimStartIndex;
-
-        if (updateSelection) {
-            TextSelection textSelection = mTextView.getTextClassifier()
-                    .suggestSelection(trimmedText, startIndex, endIndex);
-            startIndex = Math.max(0, textSelection.getSelectionStartIndex() + trimStartIndex);
-            endIndex = Math.min(mTextView.getText().length(),
-                    textSelection.getSelectionEndIndex() + trimStartIndex);
-            Selection.setSelection((Spannable) mTextView.getText(), startIndex, endIndex);
-            return getTextClassifierInfo(false);
-        }
-
-        return mTextView.getTextClassifier()
-                .getTextClassificationResult(trimmedText, startIndex, endIndex);
+        return mSelectionActionModeHelper;
     }
 
     /**
@@ -2117,13 +2066,13 @@
         return true;
     }
 
-    private boolean startSelectionActionModeInternal() {
+    boolean startSelectionActionModeInternal() {
         if (extractedTextModeWillBeStarted()) {
             return false;
         }
         if (mTextActionMode != null) {
             // Text action mode is already started
-            invalidateActionMode(getTextClassifierInfo(false));
+            invalidateActionModeAsync();
             return false;
         }
 
@@ -2314,7 +2263,8 @@
         return mInsertionPointCursorController;
     }
 
-    private SelectionModifierCursorController getSelectionController() {
+    @Nullable
+    SelectionModifierCursorController getSelectionController() {
         if (!mSelectionControllerEnabled) {
             return null;
         }
@@ -3813,7 +3763,7 @@
             mode.setSubtitle(null);
             mode.setTitleOptionalHint(true);
             populateMenuWithItems(menu);
-            updateAssistMenuItem(menu, mTextClassificationResult);
+            updateAssistMenuItem(menu);
 
             Callback customCallback = getCustomCallback();
             if (customCallback != null) {
@@ -3881,7 +3831,7 @@
         public boolean onPrepareActionMode(ActionMode mode, Menu menu) {
             updateSelectAllItem(menu);
             updateReplaceItem(menu);
-            updateAssistMenuItem(menu, mTextClassificationResult);
+            updateAssistMenuItem(menu);
 
             Callback customCallback = getCustomCallback();
             if (customCallback != null) {
@@ -3914,15 +3864,22 @@
             }
         }
 
-        private void updateAssistMenuItem(
-                Menu menu, TextClassificationResult textClassificationResult) {
+        private void updateAssistMenuItem(Menu menu) {
             menu.removeItem(TextView.ID_ASSIST);
-            if (textClassificationResult != null
-                    && textClassificationResult.getIcon() != null
-                    && textClassificationResult.getOnClickListener() != null) {
-                menu.add(Menu.NONE, TextView.ID_ASSIST, MENU_ITEM_ORDER_ASSIST, null)
-                        .setIcon(textClassificationResult.getIcon())
-                        .setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
+            final TextClassificationResult textClassificationResult =
+                    getSelectionActionModeHelper().getTextClassificationResult();
+            if (textClassificationResult != null) {
+                final Drawable icon = textClassificationResult.getIcon();
+                final CharSequence label = textClassificationResult.getLabel();
+                final OnClickListener onClickListener =
+                        textClassificationResult.getOnClickListener();
+                final Intent intent = textClassificationResult.getIntent();
+                if ((icon != null || !TextUtils.isEmpty(label))
+                        && (onClickListener != null || intent != null)) {
+                    menu.add(TextView.ID_ASSIST, TextView.ID_ASSIST, MENU_ITEM_ORDER_ASSIST, label)
+                            .setIcon(icon)
+                            .setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
+                }
             }
         }
 
@@ -3935,9 +3892,23 @@
             if (customCallback != null && customCallback.onActionItemClicked(mode, item)) {
                 return true;
             }
-            if (TextView.ID_ASSIST == item.getItemId() && mTextClassificationResult != null) {
-                mTextClassificationResult.getOnClickListener().onClick(mTextView);
+            final TextClassificationResult textClassificationResult =
+                    getSelectionActionModeHelper().getTextClassificationResult();
+            if (TextView.ID_ASSIST == item.getItemId() && textClassificationResult != null) {
+                final OnClickListener onClickListener =
+                        textClassificationResult.getOnClickListener();
+                if (onClickListener != null) {
+                    onClickListener.onClick(mTextView);
+                } else {
+                    final Intent intent = textClassificationResult.getIntent();
+                    if (intent != null) {
+                        TextClassificationResult.createStartActivityOnClickListener(
+                                mTextView.getContext(), intent)
+                                .onClick(mTextView);
+                    }
+                }
                 stopTextActionMode();
+                return true;
             }
             return mTextView.onTextContextMenuItem(item.getItemId());
         }
@@ -3945,8 +3916,8 @@
         @Override
         public void onDestroyActionMode(ActionMode mode) {
             // Clear mTextActionMode not to recursively destroy action mode by clearing selection.
+            getSelectionActionModeHelper().cancelAsyncTask();
             mTextActionMode = null;
-            mTextClassificationResult = null;
             Callback customCallback = getCustomCallback();
             if (customCallback != null) {
                 customCallback.onDestroyActionMode(mode);
@@ -4080,69 +4051,9 @@
                     final CharSequence composingText = text.subSequence(composingTextStart,
                             composingTextEnd);
                     builder.setComposingText(composingTextStart, composingText);
-
-                    final int minLine = layout.getLineForOffset(composingTextStart);
-                    final int maxLine = layout.getLineForOffset(composingTextEnd - 1);
-                    for (int line = minLine; line <= maxLine; ++line) {
-                        final int lineStart = layout.getLineStart(line);
-                        final int lineEnd = layout.getLineEnd(line);
-                        final int offsetStart = Math.max(lineStart, composingTextStart);
-                        final int offsetEnd = Math.min(lineEnd, composingTextEnd);
-                        final boolean ltrLine =
-                                layout.getParagraphDirection(line) == Layout.DIR_LEFT_TO_RIGHT;
-                        final float[] widths = new float[offsetEnd - offsetStart];
-                        layout.getPaint().getTextWidths(text, offsetStart, offsetEnd, widths);
-                        final float top = layout.getLineTop(line);
-                        final float bottom = layout.getLineBottom(line);
-                        for (int offset = offsetStart; offset < offsetEnd; ++offset) {
-                            final float charWidth = widths[offset - offsetStart];
-                            final boolean isRtl = layout.isRtlCharAt(offset);
-                            final float primary = layout.getPrimaryHorizontal(offset);
-                            final float secondary = layout.getSecondaryHorizontal(offset);
-                            // TODO: This doesn't work perfectly for text with custom styles and
-                            // TAB chars.
-                            final float left;
-                            final float right;
-                            if (ltrLine) {
-                                if (isRtl) {
-                                    left = secondary - charWidth;
-                                    right = secondary;
-                                } else {
-                                    left = primary;
-                                    right = primary + charWidth;
-                                }
-                            } else {
-                                if (!isRtl) {
-                                    left = secondary;
-                                    right = secondary + charWidth;
-                                } else {
-                                    left = primary - charWidth;
-                                    right = primary;
-                                }
-                            }
-                            // TODO: Check top-right and bottom-left as well.
-                            final float localLeft = left + viewportToContentHorizontalOffset;
-                            final float localRight = right + viewportToContentHorizontalOffset;
-                            final float localTop = top + viewportToContentVerticalOffset;
-                            final float localBottom = bottom + viewportToContentVerticalOffset;
-                            final boolean isTopLeftVisible = isPositionVisible(localLeft, localTop);
-                            final boolean isBottomRightVisible =
-                                    isPositionVisible(localRight, localBottom);
-                            int characterBoundsFlags = 0;
-                            if (isTopLeftVisible || isBottomRightVisible) {
-                                characterBoundsFlags |= CursorAnchorInfo.FLAG_HAS_VISIBLE_REGION;
-                            }
-                            if (!isTopLeftVisible || !isBottomRightVisible) {
-                                characterBoundsFlags |= CursorAnchorInfo.FLAG_HAS_INVISIBLE_REGION;
-                            }
-                            if (isRtl) {
-                                characterBoundsFlags |= CursorAnchorInfo.FLAG_IS_RTL;
-                            }
-                            // Here offset is the index in Java chars.
-                            builder.addCharacterBounds(offset, localLeft, localTop, localRight,
-                                    localBottom, characterBoundsFlags);
-                        }
-                    }
+                    mTextView.populateCharacterBounds(builder, composingTextStart,
+                            composingTextEnd, viewportToContentHorizontalOffset,
+                            viewportToContentVerticalOffset);
                 }
             }
 
@@ -4158,10 +4069,10 @@
                         + viewportToContentVerticalOffset;
                 final float insertionMarkerBottom = layout.getLineBottom(line)
                         + viewportToContentVerticalOffset;
-                final boolean isTopVisible =
-                        isPositionVisible(insertionMarkerX, insertionMarkerTop);
-                final boolean isBottomVisible =
-                        isPositionVisible(insertionMarkerX, insertionMarkerBottom);
+                final boolean isTopVisible = mTextView
+                        .isPositionVisible(insertionMarkerX, insertionMarkerTop);
+                final boolean isBottomVisible = mTextView
+                        .isPositionVisible(insertionMarkerX, insertionMarkerBottom);
                 int insertionMarkerFlags = 0;
                 if (isTopVisible || isBottomVisible) {
                     insertionMarkerFlags |= CursorAnchorInfo.FLAG_HAS_VISIBLE_REGION;
@@ -4369,7 +4280,8 @@
                 return false;
             }
 
-            return isPositionVisible(mPositionX + mHotspotX + getHorizontalOffset(), mPositionY);
+            return mTextView.isPositionVisible(
+                    mPositionX + mHotspotX + getHorizontalOffset(), mPositionY);
         }
 
         public abstract int getCurrentCursorOffset();
@@ -4764,7 +4676,7 @@
             }
             positionAtCursorOffset(offset, false);
             if (mTextActionMode != null) {
-                invalidateActionMode(getTextClassifierInfo(false));
+                invalidateActionModeAsync();
             }
         }
 
@@ -4848,7 +4760,7 @@
             }
             updateDrawable();
             if (mTextActionMode != null) {
-                invalidateActionMode(getTextClassifierInfo(false));
+                invalidateActionModeAsync();
             }
         }
 
@@ -5497,8 +5409,12 @@
 
                     if (mTextView.hasSelection()) {
                         // Do not invoke the text assistant if this was a drag selection.
-                        startSelectionActionMode(
-                                mHaventMovedEnoughToStartDrag ? getTextClassifierInfo(true) : null);
+                        if (mHaventMovedEnoughToStartDrag) {
+                            startSelectionActionModeAsync();
+                        } else {
+                            startSelectionActionMode();
+                        }
+
                     }
                     break;
             }
diff --git a/core/java/android/widget/FastScroller.java b/core/java/android/widget/FastScroller.java
index 559181b..198bf27 100644
--- a/core/java/android/widget/FastScroller.java
+++ b/core/java/android/widget/FastScroller.java
@@ -38,6 +38,7 @@
 import android.util.TypedValue;
 import android.view.Gravity;
 import android.view.MotionEvent;
+import android.view.PointerIcon;
 import android.view.View;
 import android.view.View.MeasureSpec;
 import android.view.ViewConfiguration;
@@ -1441,6 +1442,13 @@
         return false;
     }
 
+    public PointerIcon onResolvePointerIcon(MotionEvent event, int pointerIndex) {
+        if (mState == STATE_DRAGGING || isPointInside(event.getX(), event.getY())) {
+            return PointerIcon.getSystemIcon(mList.getContext(), PointerIcon.TYPE_ARROW);
+        }
+        return null;
+    }
+
     public boolean onTouchEvent(MotionEvent me) {
         if (!isEnabled()) {
             return false;
diff --git a/core/java/android/widget/ListView.java b/core/java/android/widget/ListView.java
index b7da04e..46e998a 100644
--- a/core/java/android/widget/ListView.java
+++ b/core/java/android/widget/ListView.java
@@ -49,12 +49,12 @@
 import android.widget.RemoteViews.RemoteView;
 
 import com.android.internal.R;
-import com.android.internal.util.Predicate;
 
 import com.google.android.collect.Lists;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.function.Predicate;
 
 /*
  * Implementation Notes:
@@ -3740,21 +3740,20 @@
      * @removed For internal use only. This should have been hidden.
      */
     @Override
-    protected <T extends View> T findViewTraversal(@IdRes int id) {
-        // First look in our children, then in any header and footer views that
-        // may be scrolled off.
-        View v = super.findViewTraversal(id);
+    protected View findViewTraversal(@IdRes int id) {
+        View v;
+        v = super.findViewTraversal(id);
         if (v == null) {
             v = findViewInHeadersOrFooters(mHeaderViewInfos, id);
             if (v != null) {
-                return (T) v;
+                return v;
             }
             v = findViewInHeadersOrFooters(mFooterViewInfos, id);
             if (v != null) {
-                return (T) v;
+                return v;
             }
         }
-        return (T) v;
+        return v;
     }
 
     View findViewInHeadersOrFooters(ArrayList<FixedViewInfo> where, int id) {
@@ -3783,22 +3782,21 @@
      * @removed For internal use only. This should have been hidden.
      */
     @Override
-    protected <T extends View> T findViewWithTagTraversal(Object tag) {
-        // First look in our children, then in any header and footer views that
-        // may be scrolled off.
-        View v = super.findViewWithTagTraversal(tag);
+    protected View findViewWithTagTraversal(Object tag) {
+        View v;
+        v = super.findViewWithTagTraversal(tag);
         if (v == null) {
             v = findViewWithTagInHeadersOrFooters(mHeaderViewInfos, tag);
             if (v != null) {
-                return (T) v;
+                return v;
             }
 
             v = findViewWithTagInHeadersOrFooters(mFooterViewInfos, tag);
             if (v != null) {
-                return (T) v;
+                return v;
             }
         }
-        return (T) v;
+        return v;
     }
 
     View findViewWithTagInHeadersOrFooters(ArrayList<FixedViewInfo> where, Object tag) {
@@ -3831,21 +3829,21 @@
      * @hide
      */
     @Override
-    protected <T extends View> T findViewByPredicateTraversal(
-            Predicate<View> predicate, View childToSkip) {
-        View v = super.findViewByPredicateTraversal(predicate, childToSkip);
+    protected View findViewByPredicateTraversal(Predicate<View> predicate, View childToSkip) {
+        View v;
+        v = super.findViewByPredicateTraversal(predicate, childToSkip);
         if (v == null) {
             v = findViewByPredicateInHeadersOrFooters(mHeaderViewInfos, predicate, childToSkip);
             if (v != null) {
-                return (T) v;
+                return v;
             }
 
             v = findViewByPredicateInHeadersOrFooters(mFooterViewInfos, predicate, childToSkip);
             if (v != null) {
-                return (T) v;
+                return v;
             }
         }
-        return (T) v;
+        return v;
     }
 
     /**
diff --git a/core/java/android/widget/MediaController.java b/core/java/android/widget/MediaController.java
index 8e04f1c..8008637 100644
--- a/core/java/android/widget/MediaController.java
+++ b/core/java/android/widget/MediaController.java
@@ -257,13 +257,13 @@
                 .getText(com.android.internal.R.string.lockscreen_transport_play_description);
         mPauseDescription = res
                 .getText(com.android.internal.R.string.lockscreen_transport_pause_description);
-        mPauseButton = v.findViewById(com.android.internal.R.id.pause);
+        mPauseButton = (ImageButton) v.findViewById(com.android.internal.R.id.pause);
         if (mPauseButton != null) {
             mPauseButton.requestFocus();
             mPauseButton.setOnClickListener(mPauseListener);
         }
 
-        mFfwdButton = v.findViewById(com.android.internal.R.id.ffwd);
+        mFfwdButton = (ImageButton) v.findViewById(com.android.internal.R.id.ffwd);
         if (mFfwdButton != null) {
             mFfwdButton.setOnClickListener(mFfwdListener);
             if (!mFromXml) {
@@ -271,7 +271,7 @@
             }
         }
 
-        mRewButton = v.findViewById(com.android.internal.R.id.rew);
+        mRewButton = (ImageButton) v.findViewById(com.android.internal.R.id.rew);
         if (mRewButton != null) {
             mRewButton.setOnClickListener(mRewListener);
             if (!mFromXml) {
@@ -280,16 +280,16 @@
         }
 
         // By default these are hidden. They will be enabled when setPrevNextListeners() is called
-        mNextButton = v.findViewById(com.android.internal.R.id.next);
+        mNextButton = (ImageButton) v.findViewById(com.android.internal.R.id.next);
         if (mNextButton != null && !mFromXml && !mListenersSet) {
             mNextButton.setVisibility(View.GONE);
         }
-        mPrevButton = v.findViewById(com.android.internal.R.id.prev);
+        mPrevButton = (ImageButton) v.findViewById(com.android.internal.R.id.prev);
         if (mPrevButton != null && !mFromXml && !mListenersSet) {
             mPrevButton.setVisibility(View.GONE);
         }
 
-        mProgress = v.findViewById(com.android.internal.R.id.mediacontroller_progress);
+        mProgress = (ProgressBar) v.findViewById(com.android.internal.R.id.mediacontroller_progress);
         if (mProgress != null) {
             if (mProgress instanceof SeekBar) {
                 SeekBar seeker = (SeekBar) mProgress;
@@ -298,8 +298,8 @@
             mProgress.setMax(1000);
         }
 
-        mEndTime = v.findViewById(com.android.internal.R.id.time);
-        mCurrentTime = v.findViewById(com.android.internal.R.id.time_current);
+        mEndTime = (TextView) v.findViewById(com.android.internal.R.id.time);
+        mCurrentTime = (TextView) v.findViewById(com.android.internal.R.id.time_current);
         mFormatBuilder = new StringBuilder();
         mFormatter = new Formatter(mFormatBuilder, Locale.getDefault());
 
diff --git a/core/java/android/widget/PopupWindow.java b/core/java/android/widget/PopupWindow.java
index 5199b26..d096baf 100644
--- a/core/java/android/widget/PopupWindow.java
+++ b/core/java/android/widget/PopupWindow.java
@@ -35,8 +35,8 @@
 import android.transition.Transition;
 import android.transition.Transition.EpicenterCallback;
 import android.transition.Transition.TransitionListener;
-import android.transition.Transition.TransitionListenerAdapter;
 import android.transition.TransitionInflater;
+import android.transition.TransitionListenerAdapter;
 import android.transition.TransitionManager;
 import android.transition.TransitionSet;
 import android.util.AttributeSet;
@@ -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;
@@ -208,6 +210,21 @@
         com.android.internal.R.attr.state_above_anchor
     };
 
+    private final OnAttachStateChangeListener mOnAnchorDetachedListener =
+            new OnAttachStateChangeListener() {
+                @Override
+                public void onViewAttachedToWindow(View v) {
+                    // Anchor might have been reattached in a different position.
+                    alignToAnchor();
+                }
+
+                @Override
+                public void onViewDetachedFromWindow(View v) {
+                    // Leave the popup in its current position.
+                    // The anchor might become attached again.
+                }
+            };
+
     private final OnAttachStateChangeListener mOnAnchorRootDetachedListener =
             new OnAttachStateChangeListener() {
                 @Override
@@ -223,20 +240,7 @@
     private WeakReference<View> mAnchorRoot;
     private boolean mIsAnchorRootAttached;
 
-    private final OnScrollChangedListener mOnScrollChangedListener = new OnScrollChangedListener() {
-        @Override
-        public void onScrollChanged() {
-            final View anchor = mAnchor != null ? mAnchor.get() : null;
-            if (anchor != null && mDecorView != null) {
-                final WindowManager.LayoutParams p = (WindowManager.LayoutParams)
-                        mDecorView.getLayoutParams();
-
-                updateAboveAnchor(findDropDownPosition(anchor, p, mAnchorXoff, mAnchorYoff,
-                        p.width, p.height, mAnchoredGravity, false));
-                update(p.x, p.y, -1, -1, true);
-            }
-        }
-    };
+    private final OnScrollChangedListener mOnScrollChangedListener = this::alignToAnchor;
 
     private int mAnchorXoff;
     private int mAnchorYoff;
@@ -724,7 +728,7 @@
      * @see android.view.WindowManager.LayoutParams#softInputMode
      * @see #getSoftInputMode()
      */
-    public void setSoftInputMode(int mode) {
+    public void setSoftInputMode(@SoftInputModeFlags int mode) {
         mSoftInputMode = mode;
     }
 
@@ -734,6 +738,7 @@
      * @see #setSoftInputMode(int)
      * @see android.view.WindowManager.LayoutParams#softInputMode
      */
+    @SoftInputModeFlags
     public int getSoftInputMode() {
         return mSoftInputMode;
     }
@@ -2214,6 +2219,7 @@
         if (anchor != null) {
             final ViewTreeObserver vto = anchor.getViewTreeObserver();
             vto.removeOnScrollChangedListener(mOnScrollChangedListener);
+            anchor.removeOnAttachStateChangeListener(mOnAnchorDetachedListener);
         }
 
         final View anchorRoot = mAnchorRoot != null ? mAnchorRoot.get() : null;
@@ -2233,6 +2239,7 @@
         if (vto != null) {
             vto.addOnScrollChangedListener(mOnScrollChangedListener);
         }
+        anchor.addOnAttachStateChangeListener(mOnAnchorDetachedListener);
 
         final View anchorRoot = anchor.getRootView();
         anchorRoot.addOnAttachStateChangeListener(mOnAnchorRootDetachedListener);
@@ -2247,6 +2254,18 @@
         mAnchoredGravity = gravity;
     }
 
+    private void alignToAnchor() {
+        final View anchor = mAnchor != null ? mAnchor.get() : null;
+        if (anchor != null && anchor.isAttachedToWindow() && mDecorView != null) {
+            final WindowManager.LayoutParams p = (WindowManager.LayoutParams)
+                    mDecorView.getLayoutParams();
+
+            updateAboveAnchor(findDropDownPosition(anchor, p, mAnchorXoff, mAnchorYoff,
+                    p.width, p.height, mAnchoredGravity, false));
+            update(p.x, p.y, -1, -1, true);
+        }
+    }
+
     private class PopupDecorView extends FrameLayout {
         private TransitionListenerAdapter mPendingExitListener;
 
diff --git a/core/java/android/widget/RadioGroup.java b/core/java/android/widget/RadioGroup.java
index 72dc1cc..8ba4694 100644
--- a/core/java/android/widget/RadioGroup.java
+++ b/core/java/android/widget/RadioGroup.java
@@ -24,7 +24,6 @@
 import android.util.Log;
 import android.view.View;
 import android.view.ViewGroup;
-import android.view.ViewStructure;
 import android.view.autofill.AutoFillType;
 import android.view.autofill.AutoFillValue;
 
@@ -404,16 +403,14 @@
         }
     }
 
-    // TODO(b/33197203): add unit/CTS tests for auto-fill methods
+    // TODO(b/33197203): add unit/CTS tests for auto-fill methods (and make sure they handle enable)
 
-    @Override
-    public void onProvideAutoFillStructure(ViewStructure structure, int flags) {
-        super.onProvideAutoFillStructure(structure, flags);
-        structure.setAutoFillValue(AutoFillValue.forList(getCheckedRadioButtonId()));
-    }
+    // TODO(b/33197203): override onProvideAutoFillStructure and add a change listener
 
     @Override
     public void autoFill(AutoFillValue value) {
+        if (!isEnabled()) return;
+
         final int index = value.getListValue();
         final View child = getChildAt(index);
         if (child == null) {
@@ -427,4 +424,9 @@
     public AutoFillType getAutoFillType() {
         return AutoFillType.forList();
     }
+
+    @Override
+    public AutoFillValue getAutoFillValue() {
+        return isEnabled() ? AutoFillValue.forList(getCheckedRadioButtonId()) : null;
+    }
 }
diff --git a/core/java/android/widget/RemoteViews.java b/core/java/android/widget/RemoteViews.java
index 5505f2f..359d04e 100644
--- a/core/java/android/widget/RemoteViews.java
+++ b/core/java/android/widget/RemoteViews.java
@@ -1578,7 +1578,7 @@
         @Override
         public void apply(View root, ViewGroup rootParent, OnClickHandler handler) {
             final Context context = root.getContext();
-            final ViewGroup target = root.findViewById(viewId);
+            final ViewGroup target = (ViewGroup) root.findViewById(viewId);
             if (target == null) return;
             if (nestedViews != null) {
                 // Inflate nested views and add as children
@@ -1757,7 +1757,7 @@
 
         @Override
         public void apply(View root, ViewGroup rootParent, OnClickHandler handler) {
-            final TextView target = root.findViewById(viewId);
+            final TextView target = (TextView) root.findViewById(viewId);
             if (target == null) return;
             if (drawablesLoaded) {
                 if (isRelative) {
@@ -1857,7 +1857,7 @@
 
         @Override
         public void apply(View root, ViewGroup rootParent, OnClickHandler handler) {
-            final TextView target = root.findViewById(viewId);
+            final TextView target = (TextView) root.findViewById(viewId);
             if (target == null) return;
             target.setTextSize(units, size);
         }
@@ -2045,7 +2045,7 @@
 
         @Override
         public void apply(View root, ViewGroup rootParent, OnClickHandler handler) {
-            final TextView target = root.findViewById(viewId);
+            final TextView target = (TextView) root.findViewById(viewId);
             if (target == null) return;
             Drawable[] drawables = isRelative
                     ? target.getCompoundDrawablesRelative()
diff --git a/core/java/android/widget/SelectionActionModeHelper.java b/core/java/android/widget/SelectionActionModeHelper.java
new file mode 100644
index 0000000..770d9ee
--- /dev/null
+++ b/core/java/android/widget/SelectionActionModeHelper.java
@@ -0,0 +1,288 @@
+/*
+ * 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.widget;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.annotation.UiThread;
+import android.annotation.WorkerThread;
+import android.os.AsyncTask;
+import android.text.Selection;
+import android.text.Spannable;
+import android.text.TextUtils;
+import android.view.ActionMode;
+import android.view.textclassifier.TextClassificationResult;
+import android.view.textclassifier.TextClassifier;
+import android.view.textclassifier.TextSelection;
+import android.widget.Editor.SelectionModifierCursorController;
+
+import com.android.internal.util.Preconditions;
+
+import java.util.function.Consumer;
+import java.util.function.Supplier;
+
+/**
+ * Helper class for starting selection action mode
+ * (synchronously without the TextClassifier, asynchronously with the TextClassifier).
+ */
+@UiThread
+final class SelectionActionModeHelper {
+
+    /**
+     * Maximum time (in milliseconds) to wait for a result before timing out.
+     */
+    // TODO: Consider making this a ViewConfiguration.
+    private static final int TIMEOUT_DURATION = 200;
+
+    private final Editor mEditor;
+    private final TextClassificationHelper mTextClassificationHelper;
+
+    private TextClassificationResult mTextClassificationResult;
+    private AsyncTask mTextClassificationAsyncTask;
+
+    SelectionActionModeHelper(@NonNull Editor editor) {
+        mEditor = Preconditions.checkNotNull(editor);
+        final TextView textView = mEditor.getTextView();
+        mTextClassificationHelper = new TextClassificationHelper(
+                textView.getTextClassifier(), textView.getText(),
+                textView.getSelectionStart(), textView.getSelectionEnd());
+    }
+
+    public void startActionModeAsync() {
+        cancelAsyncTask();
+        if (isNoOpTextClassifier()) {
+            // No need to make an async call for a no-op TextClassifier.
+            startActionMode(null);
+        } else {
+            resetTextClassificationHelper();
+            mTextClassificationAsyncTask = new TextClassificationAsyncTask(
+                    mEditor.getTextView(), TIMEOUT_DURATION,
+                    mTextClassificationHelper::suggestSelection, this::startActionMode)
+                    .execute();
+        }
+    }
+
+    public void startActionMode() {
+        startActionMode(null);
+    }
+
+    public void invalidateActionModeAsync() {
+        cancelAsyncTask();
+        if (isNoOpTextClassifier()) {
+            // No need to make an async call for a no-op TextClassifier.
+            invalidateActionMode(null);
+        } else {
+            resetTextClassificationHelper();
+            mTextClassificationAsyncTask = new TextClassificationAsyncTask(
+                    mEditor.getTextView(), TIMEOUT_DURATION,
+                    mTextClassificationHelper::classifyText, this::invalidateActionMode)
+                    .execute();
+        }
+    }
+
+    public void cancelAsyncTask() {
+        if (mTextClassificationAsyncTask != null) {
+            mTextClassificationAsyncTask.cancel(true);
+            mTextClassificationAsyncTask = null;
+        }
+        mTextClassificationResult = null;
+    }
+
+    @Nullable
+    public TextClassificationResult getTextClassificationResult() {
+        return mTextClassificationResult;
+    }
+
+    private boolean isNoOpTextClassifier() {
+        return mEditor.getTextView().getTextClassifier() == TextClassifier.NO_OP;
+    }
+
+    private void startActionMode(@Nullable SelectionResult result) {
+        final CharSequence text = mEditor.getTextView().getText();
+        if (result != null && text instanceof Spannable) {
+            Selection.setSelection((Spannable) text, result.mStart, result.mEnd);
+            mTextClassificationResult = result.mResult;
+        } else {
+            mTextClassificationResult = null;
+        }
+        if (mEditor.startSelectionActionModeInternal()) {
+            final SelectionModifierCursorController controller = mEditor.getSelectionController();
+            if (controller != null) {
+                controller.show();
+            }
+        }
+        mEditor.setRestartActionModeOnNextRefresh(false);
+        mTextClassificationAsyncTask = null;
+    }
+
+    private void invalidateActionMode(@Nullable SelectionResult result) {
+        mTextClassificationResult = result != null ? result.mResult : null;
+        final ActionMode actionMode = mEditor.getTextActionMode();
+        if (actionMode != null) {
+            actionMode.invalidate();
+        }
+        mTextClassificationAsyncTask = null;
+    }
+
+    private void resetTextClassificationHelper() {
+        final TextView textView = mEditor.getTextView();
+        mTextClassificationHelper.reset(textView.getTextClassifier(), textView.getText(),
+                textView.getSelectionStart(), textView.getSelectionEnd());
+    }
+
+    /**
+     * AsyncTask for running a query on a background thread and returning the result on the
+     * UiThread. The AsyncTask times out after a specified time, returning a null result if the
+     * query has not yet returned.
+     */
+    private static final class TextClassificationAsyncTask
+            extends AsyncTask<Void, Void, SelectionResult> {
+
+        private final int mTimeOutDuration;
+        private final Supplier<SelectionResult> mSelectionResultSupplier;
+        private final Consumer<SelectionResult> mSelectionResultCallback;
+        private final TextView mTextView;
+        private final String mOriginalText;
+
+        /**
+         * @param textView the TextView
+         * @param timeOut time in milliseconds to timeout the query if it has not completed
+         * @param selectionResultSupplier fetches the selection results. Runs on a background thread
+         * @param selectionResultCallback receives the selection results. Runs on the UiThread
+         */
+        TextClassificationAsyncTask(
+                @NonNull TextView textView, int timeOut,
+                @NonNull Supplier<SelectionResult> selectionResultSupplier,
+                @NonNull Consumer<SelectionResult> selectionResultCallback) {
+            mTextView = Preconditions.checkNotNull(textView);
+            mTimeOutDuration = timeOut;
+            mSelectionResultSupplier = Preconditions.checkNotNull(selectionResultSupplier);
+            mSelectionResultCallback = Preconditions.checkNotNull(selectionResultCallback);
+            // Make a copy of the original text.
+            mOriginalText = mTextView.getText().toString();
+        }
+
+        @Override
+        @WorkerThread
+        protected SelectionResult doInBackground(Void... params) {
+            final Runnable onTimeOut = this::onTimeOut;
+            mTextView.postDelayed(onTimeOut, mTimeOutDuration);
+            final SelectionResult result = mSelectionResultSupplier.get();
+            mTextView.removeCallbacks(onTimeOut);
+            return result;
+        }
+
+        @Override
+        @UiThread
+        protected void onPostExecute(SelectionResult result) {
+            result = TextUtils.equals(mOriginalText, mTextView.getText()) ? result : null;
+            mSelectionResultCallback.accept(result);
+        }
+
+        private void onTimeOut() {
+            if (getStatus() == Status.RUNNING) {
+                onPostExecute(null);
+            }
+            cancel(true);
+        }
+    }
+
+    /**
+     * Helper class for querying the TextClassifier.
+     * It trims text so that only text necessary to provide context of the selected text is
+     * sent to the TextClassifier.
+     */
+    private static final class TextClassificationHelper {
+
+        private static final int TRIM_DELTA = 50;  // characters
+
+        private TextClassifier mTextClassifier;
+
+        /** The original TextView text. **/
+        private String mText;
+        /** Start index relative to mText. */
+        private int mSelectionStart;
+        /** End index relative to mText. */
+        private int mSelectionEnd;
+
+        /** Trimmed text starting from mTrimStart in mText. */
+        private CharSequence mTrimmedText;
+        /** Index indicating the start of mTrimmedText in mText. */
+        private int mTrimStart;
+        /** Start index relative to mTrimmedText */
+        private int mRelativeStart;
+        /** End index relative to mTrimmedText */
+        private int mRelativeEnd;
+
+        TextClassificationHelper(TextClassifier textClassifier,
+                CharSequence text, int selectionStart, int selectionEnd) {
+            reset(textClassifier, text, selectionStart, selectionEnd);
+        }
+
+        @UiThread
+        public void reset(TextClassifier textClassifier,
+                CharSequence text, int selectionStart, int selectionEnd) {
+            mTextClassifier = Preconditions.checkNotNull(textClassifier);
+            mText = Preconditions.checkNotNull(text).toString();
+            mSelectionStart = selectionStart;
+            mSelectionEnd = selectionEnd;
+        }
+
+        @WorkerThread
+        public SelectionResult classifyText() {
+            trimText();
+            return new SelectionResult(
+                    mSelectionStart,
+                    mSelectionEnd,
+                    mTextClassifier.getTextClassificationResult(
+                            mTrimmedText, mRelativeStart, mRelativeEnd));
+        }
+
+        @WorkerThread
+        public SelectionResult suggestSelection() {
+            trimText();
+            final TextSelection sel = mTextClassifier.suggestSelection(
+                    mTrimmedText, mRelativeStart, mRelativeEnd);
+            mSelectionStart = Math.max(0, sel.getSelectionStartIndex() + mTrimStart);
+            mSelectionEnd = Math.min(mText.length(), sel.getSelectionEndIndex() + mTrimStart);
+            return classifyText();
+        }
+
+        private void trimText() {
+            mTrimStart = Math.max(0, mSelectionStart - TRIM_DELTA);
+            final int referenceEnd = Math.min(mText.length(), mSelectionEnd + TRIM_DELTA);
+            mTrimmedText = mText.subSequence(mTrimStart, referenceEnd);
+            mRelativeStart = mSelectionStart - mTrimStart;
+            mRelativeEnd = mSelectionEnd - mTrimStart;
+        }
+    }
+
+    /**
+     * Selection result.
+     */
+    private static final class SelectionResult {
+        private final int mStart;
+        private final int mEnd;
+        private final TextClassificationResult mResult;
+
+        SelectionResult(int start, int end, TextClassificationResult result) {
+            mStart = start;
+            mEnd = end;
+            mResult = Preconditions.checkNotNull(result);
+        }
+    }
+}
diff --git a/core/java/android/widget/SuggestionsAdapter.java b/core/java/android/widget/SuggestionsAdapter.java
index fbb8993..f833d1b 100644
--- a/core/java/android/widget/SuggestionsAdapter.java
+++ b/core/java/android/widget/SuggestionsAdapter.java
@@ -286,7 +286,7 @@
         v.setTag(new ChildViewCache(v));
 
         // Set up icon.
-        final ImageView iconRefine = v.findViewById(R.id.edit_query);
+        final ImageView iconRefine = (ImageView) v.findViewById(R.id.edit_query);
         iconRefine.setImageResource(mCommitIconResId);
 
         return v;
@@ -304,11 +304,11 @@
         public final ImageView mIconRefine;
 
         public ChildViewCache(View v) {
-            mText1 = v.findViewById(com.android.internal.R.id.text1);
-            mText2 = v.findViewById(com.android.internal.R.id.text2);
-            mIcon1 = v.findViewById(com.android.internal.R.id.icon1);
-            mIcon2 = v.findViewById(com.android.internal.R.id.icon2);
-            mIconRefine = v.findViewById(com.android.internal.R.id.edit_query);
+            mText1 = (TextView) v.findViewById(com.android.internal.R.id.text1);
+            mText2 = (TextView) v.findViewById(com.android.internal.R.id.text2);
+            mIcon1 = (ImageView) v.findViewById(com.android.internal.R.id.icon1);
+            mIcon2 = (ImageView) v.findViewById(com.android.internal.R.id.icon2);
+            mIconRefine = (ImageView) v.findViewById(com.android.internal.R.id.edit_query);
         }
     }
 
diff --git a/core/java/android/widget/TabHost.java b/core/java/android/widget/TabHost.java
index 7e2cadf..32418cd 100644
--- a/core/java/android/widget/TabHost.java
+++ b/core/java/android/widget/TabHost.java
@@ -619,7 +619,7 @@
                     mTabWidget, // tab widget is the parent
                     false); // no inflate params
 
-            final TextView tv = tabIndicator.findViewById(R.id.title);
+            final TextView tv = (TextView) tabIndicator.findViewById(R.id.title);
             tv.setText(mLabel);
 
             if (context.getApplicationInfo().targetSdkVersion <= Build.VERSION_CODES.DONUT) {
@@ -653,8 +653,8 @@
                     mTabWidget, // tab widget is the parent
                     false); // no inflate params
 
-            final TextView tv = tabIndicator.findViewById(R.id.title);
-            final ImageView iconView = tabIndicator.findViewById(R.id.icon);
+            final TextView tv = (TextView) tabIndicator.findViewById(R.id.title);
+            final ImageView iconView = (ImageView) tabIndicator.findViewById(R.id.icon);
 
             // when icon is gone by default, we're in exclusive mode
             final boolean exclusive = iconView.getVisibility() == View.GONE;
diff --git a/core/java/android/widget/TextInputTimePickerView.java b/core/java/android/widget/TextInputTimePickerView.java
new file mode 100644
index 0000000..ef91576
--- /dev/null
+++ b/core/java/android/widget/TextInputTimePickerView.java
@@ -0,0 +1,249 @@
+/*
+ * 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.widget;
+
+import android.content.Context;
+import android.text.Editable;
+import android.text.InputFilter;
+import android.text.TextWatcher;
+import android.util.AttributeSet;
+import android.util.MathUtils;
+import android.view.View;
+
+import com.android.internal.R;
+
+/**
+ * View to show text input based time picker with hour and minute fields and an optional AM/PM
+ * spinner.
+ *
+ * @hide
+ */
+public class TextInputTimePickerView extends RelativeLayout {
+    public static final int HOURS = 0;
+    public static final int MINUTES = 1;
+    public static final int AMPM = 2;
+
+    private static final int AM = 0;
+    private static final int PM = 1;
+
+    private final EditText mHourEditText;
+    private final EditText mMinuteEditText;
+    private final TextView mInputSeparatorView;
+    private final Spinner mAmPmSpinner;
+    private final TextView mErrorLabel;
+    private final TextView mHourLabel;
+    private final TextView mMinuteLabel;
+
+    private boolean mIs24Hour;
+    private boolean mHourFormatStartsAtZero;
+    private OnValueTypedListener mListener;
+
+    private boolean mErrorShowing;
+
+    interface OnValueTypedListener {
+        void onValueChanged(int inputType, int newValue);
+    }
+
+    public TextInputTimePickerView(Context context) {
+        this(context, null);
+    }
+
+    public TextInputTimePickerView(Context context, AttributeSet attrs) {
+        this(context, attrs, 0);
+    }
+
+    public TextInputTimePickerView(Context context, AttributeSet attrs, int defStyle) {
+        this(context, attrs, defStyle, 0);
+    }
+
+    public TextInputTimePickerView(Context context, AttributeSet attrs, int defStyle,
+            int defStyleRes) {
+        super(context, attrs, defStyle, defStyleRes);
+
+        inflate(context, R.layout.time_picker_text_input_material, this);
+
+        mHourEditText = (EditText) findViewById(R.id.input_hour);
+        mMinuteEditText = (EditText) findViewById(R.id.input_minute);
+        mInputSeparatorView = (TextView) findViewById(R.id.input_separator);
+        mErrorLabel = (TextView) findViewById(R.id.label_error);
+        mHourLabel = (TextView) findViewById(R.id.label_hour);
+        mMinuteLabel = (TextView) findViewById(R.id.label_minute);
+
+        mHourEditText.addTextChangedListener(new TextWatcher() {
+            @Override
+            public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {}
+
+            @Override
+            public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {}
+
+            @Override
+            public void afterTextChanged(Editable editable) {
+                parseAndSetHourInternal(editable.toString());
+            }
+        });
+
+        mMinuteEditText.addTextChangedListener(new TextWatcher() {
+            @Override
+            public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {}
+
+            @Override
+            public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {}
+
+            @Override
+            public void afterTextChanged(Editable editable) {
+                parseAndSetMinuteInternal(editable.toString());
+            }
+        });
+
+        mAmPmSpinner = (Spinner) findViewById(R.id.am_pm_spinner);
+        final String[] amPmStrings = TimePicker.getAmPmStrings(context);
+        ArrayAdapter<CharSequence> adapter =
+                new ArrayAdapter<CharSequence>(context, R.layout.simple_spinner_dropdown_item);
+        adapter.add(TimePickerClockDelegate.obtainVerbatim(amPmStrings[0]));
+        adapter.add(TimePickerClockDelegate.obtainVerbatim(amPmStrings[1]));
+        mAmPmSpinner.setAdapter(adapter);
+        mAmPmSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+            @Override
+            public void onItemSelected(AdapterView<?> adapterView, View view, int position,
+                    long id) {
+                if (position == 0) {
+                    mListener.onValueChanged(AMPM, AM);
+                } else {
+                    mListener.onValueChanged(AMPM, PM);
+                }
+            }
+
+            @Override
+            public void onNothingSelected(AdapterView<?> adapterView) {}
+        });
+    }
+
+    void setListener(OnValueTypedListener listener) {
+        mListener = listener;
+    }
+
+    void setHourFormat(int maxCharLength) {
+        mHourEditText.setFilters(new InputFilter[] {
+                new InputFilter.LengthFilter(maxCharLength)});
+        mMinuteEditText.setFilters(new InputFilter[] {
+                new InputFilter.LengthFilter(maxCharLength)});
+    }
+
+    boolean validateInput() {
+        final boolean inputValid = parseAndSetHourInternal(mHourEditText.getText().toString())
+                && parseAndSetMinuteInternal(mMinuteEditText.getText().toString());
+        setError(!inputValid);
+        return inputValid;
+    }
+
+    void updateSeparator(String separatorText) {
+        mInputSeparatorView.setText(separatorText);
+    }
+
+    private void setError(boolean enabled) {
+        mErrorShowing = enabled;
+
+        mErrorLabel.setVisibility(enabled ? View.VISIBLE : View.INVISIBLE);
+        mHourLabel.setVisibility(enabled ? View.INVISIBLE : View.VISIBLE);
+        mMinuteLabel.setVisibility(enabled ? View.INVISIBLE : View.VISIBLE);
+    }
+
+    /**
+     * Computes the display value and updates the text of the view.
+     * <p>
+     * This method should be called whenever the current value or display
+     * properties (leading zeroes, max digits) change.
+     */
+    void updateTextInputValues(int localizedHour, int minute, int amOrPm, boolean is24Hour,
+            boolean hourFormatStartsAtZero) {
+        final String format = "%d";
+
+        mIs24Hour = is24Hour;
+        mHourFormatStartsAtZero = hourFormatStartsAtZero;
+
+        mAmPmSpinner.setVisibility(is24Hour ? View.INVISIBLE : View.VISIBLE);
+
+        mHourEditText.setText(String.format(format, localizedHour));
+        mMinuteEditText.setText(String.format(format, minute));
+
+        if (amOrPm == AM) {
+            mAmPmSpinner.setSelection(0);
+        } else {
+            mAmPmSpinner.setSelection(1);
+        }
+
+        if (mErrorShowing) {
+            validateInput();
+        }
+    }
+
+    private boolean parseAndSetHourInternal(String input) {
+        try {
+            final int hour = Integer.parseInt(input);
+            if (!isValidLocalizedHour(hour)) {
+                final int minHour = mHourFormatStartsAtZero ? 0 : 1;
+                final int maxHour = mIs24Hour ? 23 : 11 + minHour;
+                mListener.onValueChanged(HOURS, getHourOfDayFromLocalizedHour(
+                        MathUtils.constrain(hour, minHour, maxHour)));
+                return false;
+            }
+            mListener.onValueChanged(HOURS, getHourOfDayFromLocalizedHour(hour));
+            return true;
+        } catch (NumberFormatException e) {
+            // Do nothing since we cannot parse the input.
+            return false;
+        }
+    }
+
+    private boolean parseAndSetMinuteInternal(String input) {
+        try {
+            final int minutes = Integer.parseInt(input);
+            if (minutes < 0 || minutes > 59) {
+                mListener.onValueChanged(MINUTES, MathUtils.constrain(minutes, 0, 59));
+                return false;
+            }
+            mListener.onValueChanged(MINUTES, minutes);
+            return true;
+        } catch (NumberFormatException e) {
+            // Do nothing since we cannot parse the input.
+            return false;
+        }
+    }
+
+    private boolean isValidLocalizedHour(int localizedHour) {
+        final int minHour = mHourFormatStartsAtZero ? 0 : 1;
+        final int maxHour = (mIs24Hour ? 23 : 11) + minHour;
+        return localizedHour >= minHour && localizedHour <= maxHour;
+    }
+
+    private int getHourOfDayFromLocalizedHour(int localizedHour) {
+        int hourOfDay = localizedHour;
+        if (mIs24Hour) {
+            if (!mHourFormatStartsAtZero && localizedHour == 24) {
+                hourOfDay = 0;
+            }
+        } else {
+            if (!mHourFormatStartsAtZero && localizedHour == 12) {
+                hourOfDay = 0;
+            }
+            if (mAmPmSpinner.getSelectedItemPosition() == 1) {
+                hourOfDay += 12;
+            }
+        }
+        return hourOfDay;
+    }
+}
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 4a8ec94..5572cbb 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -17,6 +17,10 @@
 package android.widget;
 
 import static android.os.Build.VERSION_CODES.JELLY_BEAN_MR1;
+import static android.view.accessibility.AccessibilityNodeInfo.EXTRA_DATA_TEXT_CHARACTER_LOCATION_ARG_LENGTH;
+import static android.view.accessibility.AccessibilityNodeInfo.EXTRA_DATA_TEXT_CHARACTER_LOCATION_ARG_START_INDEX;
+import static android.view.accessibility.AccessibilityNodeInfo.EXTRA_DATA_TEXT_CHARACTER_LOCATION_KEY;
+import static android.view.inputmethod.CursorAnchorInfo.FLAG_HAS_VISIBLE_REGION;
 
 import android.R;
 import android.annotation.ColorInt;
@@ -109,6 +113,7 @@
 import android.text.style.UpdateAppearance;
 import android.text.util.Linkify;
 import android.util.AttributeSet;
+import android.util.IntArray;
 import android.util.Log;
 import android.util.TypedValue;
 import android.view.AccessibilityIterators.TextSegmentIterator;
@@ -116,7 +121,6 @@
 import android.view.Choreographer;
 import android.view.ContextMenu;
 import android.view.DragEvent;
-import android.view.GestureDetector;
 import android.view.Gravity;
 import android.view.HapticFeedbackConstants;
 import android.view.KeyCharacterMap;
@@ -142,6 +146,7 @@
 import android.view.inputmethod.BaseInputConnection;
 import android.view.inputmethod.CompletionInfo;
 import android.view.inputmethod.CorrectionInfo;
+import android.view.inputmethod.CursorAnchorInfo;
 import android.view.inputmethod.EditorInfo;
 import android.view.inputmethod.ExtractedText;
 import android.view.inputmethod.ExtractedTextRequest;
@@ -159,6 +164,8 @@
 import com.android.internal.util.FastMath;
 import com.android.internal.widget.EditableInputConnection;
 
+import libcore.util.EmptyArray;
+
 import org.xmlpull.v1.XmlPullParserException;
 
 import java.io.IOException;
@@ -166,6 +173,7 @@
 import java.lang.annotation.RetentionPolicy;
 import java.lang.ref.WeakReference;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Locale;
 
 /**
@@ -262,12 +270,14 @@
  * @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_autoSizePresetSizes
  */
 @RemoteView
 public class TextView extends View implements ViewTreeObserver.OnPreDrawListener {
     static final String LOG_TAG = "TextView";
     static final boolean DEBUG_EXTRACT = false;
     static final boolean DEBUG_AUTOFILL = false;
+    private static final float[] TEMP_POSITION = new float[2];
 
     // Enum for the "typeface" XML parameter.
     // TODO: How can we get this from the XML instead of hardcoding it here?
@@ -671,8 +681,6 @@
      */
     private Editor mEditor;
 
-    private GestureDetector mClickableSpanOnClickGestureDetector;
-
     private static final int DEVICE_PROVISIONED_UNKNOWN = 0;
     private static final int DEVICE_PROVISIONED_NO = 1;
     private static final int DEVICE_PROVISIONED_YES = 2;
@@ -687,9 +695,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}.
@@ -708,8 +716,13 @@
     private int mAutoSizeMinTextSizeInPx = 0;
     // Maximum text size for auto-sizing in pixels.
     private int mAutoSizeMaxTextSizeInPx = 0;
-    // Contains the sorted set of desired text sizes in pixels to pick from when auto-sizing text.
-    private int[] mAutoSizeTextSizesInPx;
+    // Contains a (specified or computed) distinct sorted set of text sizes in pixels to pick from
+    // when auto-sizing text.
+    private int[] mAutoSizeTextSizesInPx = EmptyArray.INT;
+    // 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 mHasPresetAutoSizeValues = false;
 
     // Watcher used to notify changes to auto-fill manager.
     private AutoFillChangeWatcher mAutoFillChangeWatcher;
@@ -1301,8 +1314,19 @@
                 case com.android.internal.R.styleable.TextView_autoSizeMaxTextSize:
                     mAutoSizeMaxTextSizeInPx = a.getDimensionPixelSize(attr, 0);
                     break;
+
+                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);
+                        setupAutoSizePresetSizes(autoSizePreDefTextSizes);
+                        autoSizePreDefTextSizes.recycle();
+                    }
+                    break;
             }
         }
+
         a.recycle();
 
         BufferType bufferType = BufferType.EDITABLE;
@@ -1574,7 +1598,7 @@
             setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_YES);
         }
 
-        setupAutoSizeTextXY();
+        setupAutoSizeText();
     }
 
     /**
@@ -1583,7 +1607,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
      *
@@ -1599,14 +1623,14 @@
                         mAutoSizeMinTextSizeInPx = 0;
                         mAutoSizeMaxTextSizeInPx = 0;
                         mAutoSizeStepGranularityInPx = 0;
-                        mAutoSizeTextSizesInPx = null;
+                        mAutoSizeTextSizesInPx = EmptyArray.INT;
                         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:
@@ -1621,7 +1645,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
      *
@@ -1651,7 +1675,8 @@
         if (supportsAutoSizeText()) {
             mAutoSizeStepGranularityInPx = (int) TypedValue.applyDimension(
                     unit, size, getResources().getDisplayMetrics());
-            setupAutoSizeTextXY();
+            mHasPresetAutoSizeValues = false;
+            setupAutoSizeText();
         }
     }
 
@@ -1683,7 +1708,8 @@
         if (supportsAutoSizeText()) {
             mAutoSizeMinTextSizeInPx = (int) TypedValue.applyDimension(
                     unit, size, getResources().getDisplayMetrics());
-            setupAutoSizeTextXY();
+            mHasPresetAutoSizeValues = false;
+            setupAutoSizeText();
         }
     }
 
@@ -1716,7 +1742,8 @@
         if (supportsAutoSizeText()) {
             mAutoSizeMaxTextSizeInPx = (int) TypedValue.applyDimension(
                     unit, size, getResources().getDisplayMetrics());
-            setupAutoSizeTextXY();
+            mHasPresetAutoSizeValues = false;
+            setupAutoSizeText();
         }
     }
 
@@ -1730,44 +1757,137 @@
         return mAutoSizeMaxTextSizeInPx;
     }
 
-    private void setupAutoSizeTextXY() {
-        if (supportsAutoSizeText() && mAutoSizeTextType == AUTO_SIZE_TEXT_TYPE_XY) {
-            // Set valid defaults.
-            if (mAutoSizeMinTextSizeInPx <= 0) {
-                mAutoSizeMinTextSizeInPx = (int) TypedValue.applyDimension(
-                        TypedValue.COMPLEX_UNIT_SP,
-                        DEFAULT_AUTO_SIZE_MIN_TEXT_SIZE_IN_SP,
-                        getResources().getDisplayMetrics());
+    /**
+     * Sets a predefined array of sizes to be used when auto-sizing.
+     *
+     * <ul>Note:
+     * <li>when <code>presetSizes</code> is not empty then the auto-size algorithm will use the
+     * values provided here instead of calculating the values based on min, max and step size. Also
+     * the values will be de-duplicated, sorted and negative or zero values will be removed.
+     * <li>when <code>presetSizes</code> is empty then the auto-size algorithm will use the min, max
+     * and step size to build the set of available sizes to choose from. Note that if no values have
+     * been provided for any of min, max or step size then defaults will be used.
+     * </ul>
+     *
+     * @param presetSizes an {@code int} array of sizes in pixels
+     *
+     * @attr ref android.R.styleable#TextView_autoSizePresetSizes
+     *
+     * @see #getAutoSizeTextAvailableSizes()
+     */
+    public void setAutoSizeTextPresetSizes(@NonNull int[] presetSizes) {
+        if (supportsAutoSizeText()) {
+            if (presetSizes.length > 0) {
+                mAutoSizeTextSizesInPx = cleanupAutoSizePresetSizes(presetSizes);
+                final int sizesLength = mAutoSizeTextSizesInPx.length;
+                mHasPresetAutoSizeValues = sizesLength > 0;
+                if (mHasPresetAutoSizeValues) {
+                    mAutoSizeMinTextSizeInPx = mAutoSizeTextSizesInPx[0];
+                    mAutoSizeMaxTextSizeInPx = mAutoSizeTextSizesInPx[sizesLength - 1];
+                    mAutoSizeStepGranularityInPx = 0;
+                }
+            } else {
+                mHasPresetAutoSizeValues = false;
             }
+            setupAutoSizeText();
+        }
+    }
 
-            if (mAutoSizeMaxTextSizeInPx <= 0) {
-                mAutoSizeMaxTextSizeInPx = (int) TypedValue.applyDimension(
-                        TypedValue.COMPLEX_UNIT_SP,
-                        DEFAULT_AUTO_SIZE_MAX_TEXT_SIZE_IN_SP,
-                        getResources().getDisplayMetrics());
+    /**
+     * @return the current auto-size {@code int} sizes array (in pixels).
+     *
+     * @see #setAutoSizeTextPresetSizes(int[])
+     * @see #setAutoSizeMinTextSize(int, float)
+     * @see #setAutoSizeMaxTextSize(int, float)
+     * @see #setAutoSizeStepGranularity(int, float)
+     */
+    public int[] getAutoSizeTextAvailableSizes() {
+        return mAutoSizeTextSizesInPx;
+    }
+
+    private void setupAutoSizePresetSizes(TypedArray textSizes) {
+        final int textSizesLength = textSizes.length();
+        final int[] parsedSizes = new int[textSizesLength];
+
+        if (textSizesLength > 0) {
+            for (int i = 0; i < textSizesLength; i++) {
+                parsedSizes[i] = textSizes.getDimensionPixelSize(i, -1);
             }
+            mAutoSizeTextSizesInPx = cleanupAutoSizePresetSizes(parsedSizes);
+            mHasPresetAutoSizeValues = mAutoSizeTextSizesInPx.length > 0;
+        }
+    }
 
-            if (mAutoSizeStepGranularityInPx <= 0) {
-                mAutoSizeStepGranularityInPx = DEFAULT_AUTO_SIZE_GRANULARITY_IN_PX;
+    // Returns distinct sorted positive values.
+    private int[] cleanupAutoSizePresetSizes(int[] presetValues) {
+        final int presetValuesLength = presetValues.length;
+        if (presetValuesLength == 0) {
+            return presetValues;
+        }
+        Arrays.sort(presetValues);
+
+        final IntArray uniqueValidSizes = new IntArray();
+        for (int i = 0; i < presetValuesLength; i++) {
+            final int currentPresetValue = presetValues[i];
+
+            if (currentPresetValue > 0
+                    && uniqueValidSizes.binarySearch(currentPresetValue) < 0) {
+                uniqueValidSizes.add(currentPresetValue);
             }
+        }
 
-            // Validate.
-            if (mAutoSizeMaxTextSizeInPx <= mAutoSizeMinTextSizeInPx) {
-                throw new IllegalStateException("Maximum auto-size text size ("
-                        + mAutoSizeMaxTextSizeInPx + "px) is less or equal to minimum auto-size "
-                        + "text size (" + mAutoSizeMinTextSizeInPx + "px)");
-            }
+        return presetValuesLength == uniqueValidSizes.size()
+            ? presetValues
+            : uniqueValidSizes.toArray();
+    }
 
-            // Calculate sizes to choose from based on the current auto-size configuration.
-            final int autoSizeValuesLength = (int) Math.ceil(
-                    (mAutoSizeMaxTextSizeInPx - mAutoSizeMinTextSizeInPx)
-                            / mAutoSizeStepGranularityInPx);
+    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 (!mHasPresetAutoSizeValues || mAutoSizeTextSizesInPx.length == 0) {
+                // Set valid defaults.
+                if (mAutoSizeMinTextSizeInPx <= 0) {
+                    mAutoSizeMinTextSizeInPx = (int) TypedValue.applyDimension(
+                            TypedValue.COMPLEX_UNIT_SP,
+                            DEFAULT_AUTO_SIZE_MIN_TEXT_SIZE_IN_SP,
+                            getResources().getDisplayMetrics());
+                }
 
-            mAutoSizeTextSizesInPx = new int[autoSizeValuesLength];
-            int sizeToAdd = mAutoSizeMinTextSizeInPx;
-            for (int i = 0; i < autoSizeValuesLength; i++) {
-                mAutoSizeTextSizesInPx[i] = sizeToAdd;
-                sizeToAdd += mAutoSizeStepGranularityInPx;
+                if (mAutoSizeMaxTextSizeInPx <= 0) {
+                    mAutoSizeMaxTextSizeInPx = (int) TypedValue.applyDimension(
+                            TypedValue.COMPLEX_UNIT_SP,
+                            DEFAULT_AUTO_SIZE_MAX_TEXT_SIZE_IN_SP,
+                            getResources().getDisplayMetrics());
+                }
+
+                if (mAutoSizeStepGranularityInPx <= 0) {
+                    mAutoSizeStepGranularityInPx = DEFAULT_AUTO_SIZE_GRANULARITY_IN_PX;
+                }
+
+                // Validate.
+                if (mAutoSizeMaxTextSizeInPx <= mAutoSizeMinTextSizeInPx) {
+                    throw new IllegalStateException("Maximum auto-size text size ("
+                            + mAutoSizeMaxTextSizeInPx
+                            + "px) is less or equal to minimum auto-size "
+                            + "text size (" + mAutoSizeMinTextSizeInPx + "px)");
+                }
+
+                // Calculate sizes to choose from based on the current auto-size configuration.
+                int autoSizeValuesLength = (int) Math.ceil(
+                        (mAutoSizeMaxTextSizeInPx - mAutoSizeMinTextSizeInPx)
+                                / (float) mAutoSizeStepGranularityInPx);
+                // Also reserve a slot for the max size if it fits.
+                if ((mAutoSizeMaxTextSizeInPx - mAutoSizeMinTextSizeInPx)
+                        % mAutoSizeStepGranularityInPx == 0) {
+                    autoSizeValuesLength++;
+                }
+                mAutoSizeTextSizesInPx = new int[autoSizeValuesLength];
+                int sizeToAdd = mAutoSizeMinTextSizeInPx;
+                for (int i = 0; i < autoSizeValuesLength; i++) {
+                    mAutoSizeTextSizesInPx[i] = sizeToAdd;
+                    sizeToAdd += mAutoSizeStepGranularityInPx;
+                }
             }
 
             mNeedsAutoSizeText = true;
@@ -6635,7 +6755,7 @@
      */
     public boolean handleBackInTextActionModeIfNeeded(KeyEvent event) {
         // Do nothing unless mEditor is in text action mode.
-        if (mEditor == null || mEditor.mTextActionMode == null) {
+        if (mEditor == null || mEditor.getTextActionMode() == null) {
             return false;
         }
 
@@ -6819,7 +6939,7 @@
 
                 // Has to be done on key down (and not on key up) to correctly be intercepted.
             case KeyEvent.KEYCODE_BACK:
-                if (mEditor != null && mEditor.mTextActionMode != null) {
+                if (mEditor != null && mEditor.getTextActionMode() != null) {
                     stopTextActionMode();
                     return KEY_EVENT_HANDLED;
                 }
@@ -7815,16 +7935,6 @@
             scrollTo(0, 0);
         }
 
-        if (isAutoSizeEnabled()) {
-            if (mNeedsAutoSizeText) {
-                // Call auto-size after the width and height have been calculated.
-                autoSizeText();
-            }
-            // Always try to auto-size if enabled. Functions that do not want to trigger auto-sizing
-            // after the next measuring round should set this to false.
-            mNeedsAutoSizeText = true;
-        }
-
         setMeasuredDimension(width, height);
     }
 
@@ -7832,8 +7942,8 @@
      * Automatically computes and sets the text size.
      */
     private void autoSizeText() {
-        final int maxWidth = getMeasuredWidth() - getTotalPaddingLeft() - getTotalPaddingRight();
-        final int maxHeight = getMeasuredHeight() - getTotalPaddingBottom() - getTotalPaddingTop();
+        final int maxWidth = getWidth() - getTotalPaddingLeft() - getTotalPaddingRight();
+        final int maxHeight = getHeight() - getExtendedPaddingBottom() - getExtendedPaddingTop();
 
         if (maxWidth <= 0 || maxHeight <= 0) {
             return;
@@ -7907,11 +8017,6 @@
                 return false;
             }
 
-            // Width overflow.
-            if (layout.getWidth() > availableSpace.right) {
-                return false;
-            }
-
             // Height overflow.
             if (layout.getHeight() > availableSpace.bottom) {
                 return false;
@@ -8079,6 +8184,16 @@
             mDeferScroll = -1;
             bringPointIntoView(Math.min(curs, mText.length()));
         }
+
+        if (isAutoSizeEnabled()) {
+            if (mNeedsAutoSizeText) {
+                // Call auto-size after the width and height have been calculated.
+                autoSizeText();
+            }
+            // Always try to auto-size if enabled. Functions that do not want to trigger auto-sizing
+            // after the next layout round should set this to false.
+            mNeedsAutoSizeText = true;
+        }
     }
 
     private boolean isShowingHint() {
@@ -9012,7 +9127,8 @@
 
                 if (mEditor != null) {
                     mEditor.refreshTextActionMode();
-                    if (!hasSelection() && mEditor.mTextActionMode == null && hasTransientState()) {
+                    if (!hasSelection()
+                            && mEditor.getTextActionMode() == null && hasTransientState()) {
                         // User generated selection has been removed.
                         setHasTransientState(false);
                     }
@@ -9200,24 +9316,21 @@
                 handled |= mMovement.onTouchEvent(this, (Spannable) mText, event);
             }
 
-            // Lazily create the clickable span gesture detector only if it looks like it
-            // might be useful.
-            if (action == MotionEvent.ACTION_DOWN && mClickableSpanOnClickGestureDetector == null
-                    && shouldUseClickableSpanOnClickGestureDetector()) {
-                ClickableSpan[] links = ((Spannable) mText).getSpans(
-                        getSelectionStart(), getSelectionEnd(),
-                        ClickableSpan.class);
+            final boolean textIsSelectable = isTextSelectable();
+            if (touchIsFinished && mLinksClickable && mAutoLinkMask != 0 && textIsSelectable) {
+                // The LinkMovementMethod which should handle taps on links has not been installed
+                // on non editable text that support text selection.
+                // We reproduce its behavior here to open links for these.
+                ClickableSpan[] links = ((Spannable) mText).getSpans(getSelectionStart(),
+                    getSelectionEnd(), ClickableSpan.class);
+
                 if (links.length > 0) {
-                    mClickableSpanOnClickGestureDetector =
-                            createClickableSpanOnClickGestureDetector();
+                    links[0].onClick(this);
+                    handled = true;
                 }
             }
 
-            if (mClickableSpanOnClickGestureDetector != null) {
-                handled |= mClickableSpanOnClickGestureDetector.onTouchEvent(event);
-            }
-
-            if (touchIsFinished && (isTextEditable() || isTextSelectable())) {
+            if (touchIsFinished && (isTextEditable() || textIsSelectable)) {
                 // Show the IME, except when selecting in read-only text.
                 final InputMethodManager imm = InputMethodManager.peekInstance();
                 viewClicked(imm);
@@ -9635,31 +9748,6 @@
         mEditor.onLocaleChanged();
     }
 
-    private GestureDetector createClickableSpanOnClickGestureDetector() {
-        return new GestureDetector(mContext,
-                new GestureDetector.SimpleOnGestureListener() {
-                    @Override
-                    public boolean onSingleTapConfirmed(MotionEvent e) {
-                        if (shouldUseClickableSpanOnClickGestureDetector()) {
-                            ClickableSpan[] links = ((Spannable) mText).getSpans(
-                                    getSelectionStart(), getSelectionEnd(),
-                                    ClickableSpan.class);
-                            if (links.length > 0) {
-                                links[0].onClick(TextView.this);
-                                return true;
-                            }
-                        }
-                        return false;
-                    }
-                });
-    }
-
-    private boolean shouldUseClickableSpanOnClickGestureDetector() {
-        return mLinksClickable && (mMovement != null) &&
-                (mMovement instanceof LinkMovementMethod
-                        || (mAutoLinkMask != 0 && isTextSelectable()));
-    }
-
     /**
      * This method is used by the ArrowKeyMovementMethod to jump from one word to the other.
      * Made available to achieve a consistent behavior.
@@ -9736,9 +9824,6 @@
                 // Simple case: this is a single line.
                 final CharSequence text = getText();
                 structure.setText(text, getSelectionStart(), getSelectionEnd());
-                if (forAutoFill && isTextEditable()) {
-                    structure.setAutoFillValue(AutoFillValue.forText(text));
-                }
             } else {
                 // Complex case: multi-line, could be scrolled or within a scroll container
                 // so some lines are not visible.
@@ -9795,9 +9880,6 @@
                     text = text.subSequence(expandedTopChar, expandedBottomChar);
                 }
                 structure.setText(text, selStart - expandedTopChar, selEnd - expandedTopChar);
-                if (forAutoFill && isTextEditable()) {
-                    structure.setAutoFillValue(AutoFillValue.forText(text));
-                }
                 final int[] lineOffsets = new int[bottomLine - topLine + 1];
                 final int[] lineBaselines = new int[bottomLine - topLine + 1];
                 final int baselineOffset = getBaselineOffset();
@@ -9845,17 +9927,7 @@
         final CharSequence text = value.getTextValue();
 
         if (text != null && isTextEditable()) {
-            if (mAutoFillChangeWatcher == null || mAutoFillChangeWatcher.mOnAutoFill) {
-                setText(text, mBufferType, true, 0);
-            } else {
-                // Must disable listener first so it's not triggered.
-                mAutoFillChangeWatcher.mOnAutoFill = true;
-                try {
-                    setText(text, mBufferType, true, 0);
-                } finally {
-                    mAutoFillChangeWatcher.mOnAutoFill = false;
-                }
-            }
+            setText(text, mBufferType, true, 0);
         }
     }
 
@@ -9865,6 +9937,12 @@
         return isTextEditable() ? AutoFillType.forText(getInputType()) : null;
     }
 
+    @Override
+    @Nullable
+    public AutoFillValue getAutoFillValue() {
+        return isTextEditable() ? AutoFillValue.forText(getText()) : null;
+    }
+
     /** @hide */
     @Override
     public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) {
@@ -9916,6 +9994,8 @@
                     | AccessibilityNodeInfo.MOVEMENT_GRANULARITY_PARAGRAPH
                     | AccessibilityNodeInfo.MOVEMENT_GRANULARITY_PAGE);
             info.addAction(AccessibilityNodeInfo.ACTION_SET_SELECTION);
+            info.setAvailableExtraData(
+                    Arrays.asList(EXTRA_DATA_TEXT_CHARACTER_LOCATION_KEY));
         }
 
         if (isFocused()) {
@@ -9952,6 +10032,164 @@
         }
     }
 
+    @Override
+    public void addExtraDataToAccessibilityNodeInfo(
+            AccessibilityNodeInfo info, String extraDataKey, Bundle arguments) {
+        if (extraDataKey.equals(EXTRA_DATA_TEXT_CHARACTER_LOCATION_KEY)) {
+            int positionInfoStartIndex = arguments.getInt(
+                    EXTRA_DATA_TEXT_CHARACTER_LOCATION_ARG_START_INDEX, -1);
+            int positionInfoLength = arguments.getInt(
+                    EXTRA_DATA_TEXT_CHARACTER_LOCATION_ARG_LENGTH, -1);
+            if ((positionInfoLength <= 0) || (positionInfoStartIndex < 0)
+                    || (positionInfoStartIndex >= mText.length())) {
+                Log.e(LOG_TAG, "Invalid arguments for accessibility character locations");
+                return;
+            }
+            RectF[] boundingRects = new RectF[positionInfoLength];
+            final CursorAnchorInfo.Builder builder = new CursorAnchorInfo.Builder();
+            populateCharacterBounds(builder, positionInfoStartIndex,
+                    positionInfoStartIndex + positionInfoLength,
+                    viewportToContentHorizontalOffset(), viewportToContentVerticalOffset());
+            CursorAnchorInfo cursorAnchorInfo = builder.setMatrix(null).build();
+            if (mTempRect == null) mTempRect = new Rect();
+            Rect viewBoundsInScreen = mTempRect;
+            info.getBoundsInScreen(viewBoundsInScreen);
+            for (int i = 0; i < positionInfoLength; i++) {
+                int flags = cursorAnchorInfo.getCharacterBoundsFlags(positionInfoStartIndex + i);
+                if ((flags & FLAG_HAS_VISIBLE_REGION) == FLAG_HAS_VISIBLE_REGION) {
+                    RectF bounds = cursorAnchorInfo
+                            .getCharacterBounds(positionInfoStartIndex + i);
+                    if (bounds != null) {
+                        bounds.offset(viewBoundsInScreen.left, viewBoundsInScreen.top);
+                        boundingRects[i] = bounds;
+                    }
+                }
+            }
+            info.getExtras().putParcelableArray(extraDataKey, boundingRects);
+        }
+    }
+
+    /**
+     * Populate requested character bounds in a {@link CursorAnchorInfo.Builder}
+     *
+     * @param builder The builder to populate
+     * @param startIndex The starting character index to populate
+     * @param endIndex The ending character index to populate
+     * @param viewportToContentHorizontalOffset The horizontal offset from the viewport to the
+     * content
+     * @param viewportToContentVerticalOffset The vertical offset from the viewport to the content
+     * @hide
+     */
+    public void populateCharacterBounds(CursorAnchorInfo.Builder builder,
+            int startIndex, int endIndex, float viewportToContentHorizontalOffset,
+            float viewportToContentVerticalOffset) {
+        final int minLine = mLayout.getLineForOffset(startIndex);
+        final int maxLine = mLayout.getLineForOffset(endIndex - 1);
+        for (int line = minLine; line <= maxLine; ++line) {
+            final int lineStart = mLayout.getLineStart(line);
+            final int lineEnd = mLayout.getLineEnd(line);
+            final int offsetStart = Math.max(lineStart, startIndex);
+            final int offsetEnd = Math.min(lineEnd, endIndex);
+            final boolean ltrLine =
+                    mLayout.getParagraphDirection(line) == Layout.DIR_LEFT_TO_RIGHT;
+            final float[] widths = new float[offsetEnd - offsetStart];
+            mLayout.getPaint().getTextWidths(mText, offsetStart, offsetEnd, widths);
+            final float top = mLayout.getLineTop(line);
+            final float bottom = mLayout.getLineBottom(line);
+            for (int offset = offsetStart; offset < offsetEnd; ++offset) {
+                final float charWidth = widths[offset - offsetStart];
+                final boolean isRtl = mLayout.isRtlCharAt(offset);
+                final float primary = mLayout.getPrimaryHorizontal(offset);
+                final float secondary = mLayout.getSecondaryHorizontal(offset);
+                // TODO: This doesn't work perfectly for text with custom styles and
+                // TAB chars.
+                final float left;
+                final float right;
+                if (ltrLine) {
+                    if (isRtl) {
+                        left = secondary - charWidth;
+                        right = secondary;
+                    } else {
+                        left = primary;
+                        right = primary + charWidth;
+                    }
+                } else {
+                    if (!isRtl) {
+                        left = secondary;
+                        right = secondary + charWidth;
+                    } else {
+                        left = primary - charWidth;
+                        right = primary;
+                    }
+                }
+                // TODO: Check top-right and bottom-left as well.
+                final float localLeft = left + viewportToContentHorizontalOffset;
+                final float localRight = right + viewportToContentHorizontalOffset;
+                final float localTop = top + viewportToContentVerticalOffset;
+                final float localBottom = bottom + viewportToContentVerticalOffset;
+                final boolean isTopLeftVisible = isPositionVisible(localLeft, localTop);
+                final boolean isBottomRightVisible =
+                        isPositionVisible(localRight, localBottom);
+                int characterBoundsFlags = 0;
+                if (isTopLeftVisible || isBottomRightVisible) {
+                    characterBoundsFlags |= FLAG_HAS_VISIBLE_REGION;
+                }
+                if (!isTopLeftVisible || !isBottomRightVisible) {
+                    characterBoundsFlags |= CursorAnchorInfo.FLAG_HAS_INVISIBLE_REGION;
+                }
+                if (isRtl) {
+                    characterBoundsFlags |= CursorAnchorInfo.FLAG_IS_RTL;
+                }
+                // Here offset is the index in Java chars.
+                builder.addCharacterBounds(offset, localLeft, localTop, localRight,
+                        localBottom, characterBoundsFlags);
+            }
+        }
+    }
+
+    /**
+     * @hide
+     */
+    public boolean isPositionVisible(final float positionX, final float positionY) {
+        synchronized (TEMP_POSITION) {
+            final float[] position = TEMP_POSITION;
+            position[0] = positionX;
+            position[1] = positionY;
+            View view = this;
+
+            while (view != null) {
+                if (view != this) {
+                    // Local scroll is already taken into account in positionX/Y
+                    position[0] -= view.getScrollX();
+                    position[1] -= view.getScrollY();
+                }
+
+                if (position[0] < 0 || position[1] < 0 || position[0] > view.getWidth()
+                        || position[1] > view.getHeight()) {
+                    return false;
+                }
+
+                if (!view.getMatrix().isIdentity()) {
+                    view.getMatrix().mapPoints(position);
+                }
+
+                position[0] += view.getLeft();
+                position[1] += view.getTop();
+
+                final ViewParent parent = view.getParent();
+                if (parent instanceof View) {
+                    view = (View) parent;
+                } else {
+                    // We've reached the ViewRoot, stop iterating
+                    view = null;
+                }
+            }
+        }
+
+        // We've been able to walk up the view hierarchy and the position was never clipped
+        return true;
+    }
+
     /**
      * Performs an accessibility action after it has been offered to the
      * delegate.
@@ -10009,7 +10247,7 @@
                         Selection.setSelection((Spannable) text, start, end);
                         // Make sure selection mode is engaged.
                         if (mEditor != null) {
-                            mEditor.startSelectionActionMode(null);
+                            mEditor.startSelectionActionModeAsync();
                         }
                         return true;
                     }
@@ -10724,14 +10962,6 @@
      * @hide
      */
     protected void viewClicked(InputMethodManager imm) {
-        final AutoFillManager afm = mContext.getSystemService(AutoFillManager.class);
-        if (afm != null) {
-            if (DEBUG_AUTOFILL) Log.v(LOG_TAG, "viewClicked(): id=" + getAccessibilityViewId());
-
-            // TODO(b/33197203): integrate with onFocus and/or move to view?
-            afm.updateAutoFillInput(this, AutoFillManager.FLAG_UPDATE_UI_SHOW);
-        }
-
         if (imm != null) {
             imm.viewClicked(this);
         }
@@ -11213,7 +11443,6 @@
     // TODO(b/33197203): implements SpanWatcher too?
     private final class AutoFillChangeWatcher implements TextWatcher {
 
-        private boolean mOnAutoFill;
         private final AutoFillManager mAfm = mContext.getSystemService(AutoFillManager.class);
 
         @Override
@@ -11226,18 +11455,11 @@
 
         @Override
         public void afterTextChanged(Editable s) {
-            if (mOnAutoFill) {
-                if (DEBUG_AUTOFILL) {
-                    Log.v(LOG_TAG, "AutoFillChangeWatcher.afterTextChanged() skipped during "
-                            + "autoFill(): s=" + s);
-                }
-                return;
-            }
             if (mAfm != null) {
                 if (DEBUG_AUTOFILL) {
                     Log.v(LOG_TAG, "AutoFillChangeWatcher.afterTextChanged(): s=" + s);
                 }
-                mAfm.onValueChanged(TextView.this, AutoFillValue.forText(s));
+                mAfm.valueChanged(TextView.this);
             }
         }
     }
diff --git a/core/java/android/widget/TimePicker.java b/core/java/android/widget/TimePicker.java
index e6cd798..9f38b04 100644
--- a/core/java/android/widget/TimePicker.java
+++ b/core/java/android/widget/TimePicker.java
@@ -278,6 +278,16 @@
         return mDelegate.getBaseline();
     }
 
+    /**
+     * Validates whether current input by the user is a valid time based on the locale. TimePicker
+     * will show an error message to the user if the time is not valid.
+     *
+     * @return {@code true} if the input is valid, {@code false} otherwise
+     */
+    public boolean validateInput() {
+        return mDelegate.validateInput();
+    }
+
     @Override
     protected Parcelable onSaveInstanceState() {
         Parcelable superState = super.onSaveInstanceState();
@@ -341,6 +351,8 @@
         void setIs24Hour(boolean is24Hour);
         boolean is24Hour();
 
+        boolean validateInput();
+
         void setOnTimeChangedListener(OnTimeChangedListener onTimeChangedListener);
 
         void setEnabled(boolean enabled);
diff --git a/core/java/android/widget/TimePickerClockDelegate.java b/core/java/android/widget/TimePickerClockDelegate.java
index 1d37a21..3a09063 100644
--- a/core/java/android/widget/TimePickerClockDelegate.java
+++ b/core/java/android/widget/TimePickerClockDelegate.java
@@ -16,12 +16,14 @@
 
 package android.widget;
 
+import android.annotation.IntDef;
 import android.annotation.Nullable;
 import android.annotation.TestApi;
 import android.content.Context;
 import android.content.res.ColorStateList;
 import android.content.res.Resources;
 import android.content.res.TypedArray;
+import android.icu.text.DecimalFormatSymbols;
 import android.os.Parcelable;
 import android.text.SpannableStringBuilder;
 import android.text.format.DateFormat;
@@ -40,11 +42,14 @@
 import android.view.accessibility.AccessibilityNodeInfo;
 import android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction;
 import android.widget.RadialTimePickerView.OnValueSelectedListener;
+import android.widget.TextInputTimePickerView.OnValueTypedListener;
 
 import com.android.internal.R;
 import com.android.internal.widget.NumericTextView;
 import com.android.internal.widget.NumericTextView.OnValueChangedListener;
 
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
 import java.util.Calendar;
 
 /**
@@ -58,6 +63,13 @@
      */
     private static final long DELAY_COMMIT_MILLIS = 2000;
 
+    @IntDef({FROM_EXTERNAL_API, FROM_RADIAL_PICKER, FROM_INPUT_PICKER})
+    @Retention(RetentionPolicy.SOURCE)
+    private @interface ChangeSource {}
+    private static final int FROM_EXTERNAL_API = 0;
+    private static final int FROM_RADIAL_PICKER = 1;
+    private static final int FROM_INPUT_PICKER = 2;
+
     // Index used by RadialPickerLayout
     private static final int HOUR_INDEX = RadialTimePickerView.HOURS;
     private static final int MINUTE_INDEX = RadialTimePickerView.MINUTES;
@@ -78,6 +90,15 @@
     private final RadialTimePickerView mRadialTimePickerView;
     private final TextView mSeparatorView;
 
+    private boolean mRadialPickerModeEnabled = true;
+    private final ImageButton mRadialTimePickerModeButton;
+    private final String mRadialTimePickerModeEnabledDescription;
+    private final String mTextInputPickerModeEnabledDescription;
+    private final View mRadialTimePickerHeader;
+    private final View mTextInputPickerHeader;
+
+    private final TextInputTimePickerView mTextInputPickerView;
+
     private final Calendar mTempCalendar;
 
     // Accessibility strings.
@@ -116,8 +137,8 @@
         final int layoutResourceId = a.getResourceId(R.styleable.TimePicker_internalLayout,
                 R.layout.time_picker_material);
         final View mainView = inflater.inflate(layoutResourceId, delegator);
-        final View headerView = mainView.findViewById(R.id.time_header);
-        headerView.setOnTouchListener(new NearestTouchDelegate());
+        mRadialTimePickerHeader = mainView.findViewById(R.id.time_header);
+        mRadialTimePickerHeader.setOnTouchListener(new NearestTouchDelegate());
 
         // Set up hour/minute labels.
         mHourView = (NumericTextView) mainView.findViewById(R.id.hours);
@@ -170,6 +191,8 @@
             headerTextColor = a.getColorStateList(R.styleable.TimePicker_headerTextColor);
         }
 
+        mTextInputPickerHeader = mainView.findViewById(R.id.input_header);
+
         if (headerTextColor != null) {
             mHourView.setTextColor(headerTextColor);
             mSeparatorView.setTextColor(headerTextColor);
@@ -180,7 +203,10 @@
 
         // Set up header background, if available.
         if (a.hasValueOrEmpty(R.styleable.TimePicker_headerBackground)) {
-            headerView.setBackground(a.getDrawable(R.styleable.TimePicker_headerBackground));
+            mRadialTimePickerHeader.setBackground(a.getDrawable(
+                    R.styleable.TimePicker_headerBackground));
+            mTextInputPickerHeader.setBackground(a.getDrawable(
+                    R.styleable.TimePicker_headerBackground));
         }
 
         a.recycle();
@@ -189,6 +215,22 @@
         mRadialTimePickerView.applyAttributes(attrs, defStyleAttr, defStyleRes);
         mRadialTimePickerView.setOnValueSelectedListener(mOnValueSelectedListener);
 
+        mTextInputPickerView = (TextInputTimePickerView) mainView.findViewById(R.id.input_mode);
+        mTextInputPickerView.setListener(mOnValueTypedListener);
+
+        mRadialTimePickerModeButton =
+                (ImageButton) mainView.findViewById(R.id.toggle_mode);
+        mRadialTimePickerModeButton.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                toggleRadialPickerMode();
+            }
+        });
+        mRadialTimePickerModeEnabledDescription = context.getResources().getString(
+                R.string.time_picker_radial_mode_description);
+        mTextInputPickerModeEnabledDescription = context.getResources().getString(
+                R.string.time_picker_text_input_mode_description);
+
         mAllowAutoAdvance = true;
 
         updateHourFormat();
@@ -200,6 +242,34 @@
         initialize(currentHour, currentMinute, mIs24Hour, HOUR_INDEX);
     }
 
+    private void toggleRadialPickerMode() {
+        if (mRadialPickerModeEnabled) {
+            mRadialTimePickerView.setVisibility(View.GONE);
+            mRadialTimePickerHeader.setVisibility(View.GONE);
+            mTextInputPickerHeader.setVisibility(View.VISIBLE);
+            mTextInputPickerView.setVisibility(View.VISIBLE);
+            mRadialTimePickerModeButton.setImageResource(R.drawable.btn_event_material);
+            mRadialTimePickerModeButton.setContentDescription(
+                    mRadialTimePickerModeEnabledDescription);
+            mRadialPickerModeEnabled = false;
+        } else {
+            mRadialTimePickerView.setVisibility(View.VISIBLE);
+            mRadialTimePickerHeader.setVisibility(View.VISIBLE);
+            mTextInputPickerHeader.setVisibility(View.GONE);
+            mTextInputPickerView.setVisibility(View.GONE);
+            mRadialTimePickerModeButton.setImageResource(R.drawable.btn_keyboard_key_material);
+            mRadialTimePickerModeButton.setContentDescription(
+                    mTextInputPickerModeEnabledDescription);
+            updateTextInputPicker();
+            mRadialPickerModeEnabled = true;
+        }
+    }
+
+    @Override
+    public boolean validateInput() {
+        return mTextInputPickerView.validateInput();
+    }
+
     /**
      * Ensures that a TextView is wide enough to contain its text without
      * wrapping or clipping. Measures the specified view and sets the minimum
@@ -249,9 +319,16 @@
         final int maxHour = (mIs24Hour ? 23 : 11) + minHour;
         mHourView.setRange(minHour, maxHour);
         mHourView.setShowLeadingZeroes(mHourFormatShowLeadingZero);
+
+        final String[] digits = DecimalFormatSymbols.getInstance(mLocale).getDigitStrings();
+        int maxCharLength = 0;
+        for (int i = 0; i < 10; i++) {
+            maxCharLength = Math.max(maxCharLength, digits[i].length());
+        }
+        mTextInputPickerView.setHourFormat(maxCharLength * 2);
     }
 
-    private static final CharSequence obtainVerbatim(String text) {
+    static final CharSequence obtainVerbatim(String text) {
         return new SpannableStringBuilder().append(text,
                 new TtsSpan.VerbatimBuilder(text).build(), 0);
     }
@@ -333,10 +410,16 @@
         updateHeaderSeparator();
         updateHeaderMinute(mCurrentMinute, false);
         updateRadialPicker(index);
+        updateTextInputPicker();
 
         mDelegator.invalidate();
     }
 
+    private void updateTextInputPicker() {
+        mTextInputPickerView.updateTextInputValues(getLocalizedHour(mCurrentHour), mCurrentMinute,
+                mCurrentHour < 12 ? AM : PM, mIs24Hour, mHourFormatStartsAtZero);
+    }
+
     private void updateRadialPicker(int index) {
         mRadialTimePickerView.initialize(mCurrentHour, mCurrentMinute, mIs24Hour);
         setCurrentItemShowing(index, false, true);
@@ -381,10 +464,10 @@
      */
     @Override
     public void setHour(int hour) {
-        setHourInternal(hour, false, true);
+        setHourInternal(hour, FROM_EXTERNAL_API, true);
     }
 
-    private void setHourInternal(int hour, boolean isFromPicker, boolean announce) {
+    private void setHourInternal(int hour, @ChangeSource int source, boolean announce) {
         if (mCurrentHour == hour) {
             return;
         }
@@ -393,10 +476,13 @@
         updateHeaderHour(hour, announce);
         updateHeaderAmPm();
 
-        if (!isFromPicker) {
+        if (source != FROM_RADIAL_PICKER) {
             mRadialTimePickerView.setCurrentHour(hour);
             mRadialTimePickerView.setAmOrPm(hour < 12 ? AM : PM);
         }
+        if (source != FROM_INPUT_PICKER) {
+            updateTextInputPicker();
+        }
 
         mDelegator.invalidate();
         onTimeChanged();
@@ -424,10 +510,10 @@
      */
     @Override
     public void setMinute(int minute) {
-        setMinuteInternal(minute, false);
+        setMinuteInternal(minute, FROM_EXTERNAL_API);
     }
 
-    private void setMinuteInternal(int minute, boolean isFromPicker) {
+    private void setMinuteInternal(int minute, @ChangeSource int source) {
         if (mCurrentMinute == minute) {
             return;
         }
@@ -435,9 +521,12 @@
         mCurrentMinute = minute;
         updateHeaderMinute(minute, true);
 
-        if (!isFromPicker) {
+        if (source != FROM_RADIAL_PICKER) {
             mRadialTimePickerView.setCurrentMinute(minute);
         }
+        if (source != FROM_INPUT_PICKER) {
+            updateTextInputPicker();
+        }
 
         mDelegator.invalidate();
         onTimeChanged();
@@ -661,6 +750,7 @@
             separatorText = Character.toString(bestDateTimePattern.charAt(hIndex + 1));
         }
         mSeparatorView.setText(separatorText);
+        mTextInputPickerView.updateSeparator(separatorText);
     }
 
     static private int lastIndexOfAny(String str, char[] any) {
@@ -712,7 +802,7 @@
 
         if (mRadialTimePickerView.setAmOrPm(amOrPm)) {
             mCurrentHour = getHour();
-
+            updateTextInputPicker();
             if (mOnTimeChangedListener != null) {
                 mOnTimeChangedListener.onTimeChanged(mDelegator, getHour(), getMinute());
             }
@@ -726,7 +816,7 @@
             switch (pickerType) {
                 case RadialTimePickerView.HOURS:
                     final boolean isTransition = mAllowAutoAdvance && autoAdvance;
-                    setHourInternal(newValue, true, !isTransition);
+                    setHourInternal(newValue, FROM_RADIAL_PICKER, !isTransition);
                     if (isTransition) {
                         setCurrentItemShowing(MINUTE_INDEX, true, false);
 
@@ -735,7 +825,7 @@
                     }
                     break;
                 case RadialTimePickerView.MINUTES:
-                    setMinuteInternal(newValue, true);
+                    setMinuteInternal(newValue, FROM_RADIAL_PICKER);
                     break;
             }
 
@@ -745,6 +835,23 @@
         }
     };
 
+    private final OnValueTypedListener mOnValueTypedListener = new OnValueTypedListener() {
+        @Override
+        public void onValueChanged(int pickerType, int newValue) {
+            switch (pickerType) {
+                case TextInputTimePickerView.HOURS:
+                    setHourInternal(newValue, FROM_INPUT_PICKER, false);
+                    break;
+                case TextInputTimePickerView.MINUTES:
+                    setMinuteInternal(newValue, FROM_INPUT_PICKER);
+                    break;
+                case TextInputTimePickerView.AMPM:
+                    setAmOrPm(newValue);
+                    break;
+            }
+        }
+    };
+
     /** Listener for keyboard interaction. */
     private final OnValueChangedListener mDigitEnteredListener = new OnValueChangedListener() {
         @Override
diff --git a/core/java/android/widget/TimePickerSpinnerDelegate.java b/core/java/android/widget/TimePickerSpinnerDelegate.java
index 4634631..7ef54a5 100644
--- a/core/java/android/widget/TimePickerSpinnerDelegate.java
+++ b/core/java/android/widget/TimePickerSpinnerDelegate.java
@@ -86,7 +86,7 @@
         inflater.inflate(layoutResourceId, mDelegator, true);
 
         // hour
-        mHourSpinner = delegator.findViewById(R.id.hour);
+        mHourSpinner = (NumberPicker) delegator.findViewById(R.id.hour);
         mHourSpinner.setOnValueChangedListener(new NumberPicker.OnValueChangeListener() {
             public void onValueChange(NumberPicker spinner, int oldVal, int newVal) {
                 updateInputState();
@@ -100,17 +100,17 @@
                 onTimeChanged();
             }
         });
-        mHourSpinnerInput = mHourSpinner.findViewById(R.id.numberpicker_input);
+        mHourSpinnerInput = (EditText) mHourSpinner.findViewById(R.id.numberpicker_input);
         mHourSpinnerInput.setImeOptions(EditorInfo.IME_ACTION_NEXT);
 
         // divider (only for the new widget style)
-        mDivider = mDelegator.findViewById(R.id.divider);
+        mDivider = (TextView) mDelegator.findViewById(R.id.divider);
         if (mDivider != null) {
             setDividerText();
         }
 
         // minute
-        mMinuteSpinner = mDelegator.findViewById(R.id.minute);
+        mMinuteSpinner = (NumberPicker) mDelegator.findViewById(R.id.minute);
         mMinuteSpinner.setMinValue(0);
         mMinuteSpinner.setMaxValue(59);
         mMinuteSpinner.setOnLongPressUpdateInterval(100);
@@ -138,7 +138,7 @@
                 onTimeChanged();
             }
         });
-        mMinuteSpinnerInput = mMinuteSpinner.findViewById(R.id.numberpicker_input);
+        mMinuteSpinnerInput = (EditText) mMinuteSpinner.findViewById(R.id.numberpicker_input);
         mMinuteSpinnerInput.setImeOptions(EditorInfo.IME_ACTION_NEXT);
 
         // Get the localized am/pm strings and use them in the spinner.
@@ -173,13 +173,13 @@
                     onTimeChanged();
                 }
             });
-            mAmPmSpinnerInput = mAmPmSpinner.findViewById(R.id.numberpicker_input);
+            mAmPmSpinnerInput = (EditText) mAmPmSpinner.findViewById(R.id.numberpicker_input);
             mAmPmSpinnerInput.setImeOptions(EditorInfo.IME_ACTION_DONE);
         }
 
         if (isAmPmAtStart()) {
             // Move the am/pm view to the beginning
-            ViewGroup amPmParent = delegator.findViewById(R.id.timePickerLayout);
+            ViewGroup amPmParent = (ViewGroup) delegator.findViewById(R.id.timePickerLayout);
             amPmParent.removeView(amPmView);
             amPmParent.addView(amPmView, 0);
             // Swap layout margins if needed. They may be not symmetrical (Old Standard Theme
@@ -219,6 +219,11 @@
         }
     }
 
+    @Override
+    public boolean validateInput() {
+        return true;
+    }
+
     private void getHourFormatData() {
         final String bestDateTimePattern = DateFormat.getBestDateTimePattern(mLocale,
                 (mIs24HourView) ? "Hm" : "hm");
diff --git a/core/java/android/widget/Toast.java b/core/java/android/widget/Toast.java
index bf0601d..789e60b 100644
--- a/core/java/android/widget/Toast.java
+++ b/core/java/android/widget/Toast.java
@@ -299,7 +299,7 @@
         if (mNextView == null) {
             throw new RuntimeException("This Toast was not created with Toast.makeText()");
         }
-        TextView tv = mNextView.findViewById(com.android.internal.R.id.message);
+        TextView tv = (TextView) mNextView.findViewById(com.android.internal.R.id.message);
         if (tv == null) {
             throw new RuntimeException("This Toast was not created with Toast.makeText()");
         }
diff --git a/core/java/android/widget/ZoomButtonsController.java b/core/java/android/widget/ZoomButtonsController.java
index 1a3ca86..69b79971 100644
--- a/core/java/android/widget/ZoomButtonsController.java
+++ b/core/java/android/widget/ZoomButtonsController.java
@@ -264,7 +264,7 @@
                 .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
         inflater.inflate(com.android.internal.R.layout.zoom_container, container);
 
-        mControls = container.findViewById(com.android.internal.R.id.zoomControls);
+        mControls = (ZoomControls) container.findViewById(com.android.internal.R.id.zoomControls);
         mControls.setOnZoomInClickListener(new OnClickListener() {
             public void onClick(View v) {
                 dismissControlsDelayed(ZOOM_CONTROLS_TIMEOUT);
diff --git a/core/java/com/android/internal/app/ChooserActivity.java b/core/java/com/android/internal/app/ChooserActivity.java
index d4baa18..84c8f7a 100644
--- a/core/java/com/android/internal/app/ChooserActivity.java
+++ b/core/java/com/android/internal/app/ChooserActivity.java
@@ -340,8 +340,7 @@
     }
 
     @Override
-    public void onPrepareAdapterView(AbsListView adapterView, ResolveListAdapter adapter,
-            boolean alwaysUseOption) {
+    public void onPrepareAdapterView(AbsListView adapterView, ResolveListAdapter adapter) {
         final ListView listView = adapterView instanceof ListView ? (ListView) adapterView : null;
         mChooserListAdapter = (ChooserListAdapter) adapter;
         if (mCallerChooserTargets != null && mCallerChooserTargets.length > 0) {
@@ -367,6 +366,9 @@
 
     @Override
     public boolean shouldAutoLaunchSingleChoice(TargetInfo target) {
+        // Note that this is only safe because the Intent handled by the ChooserActivity is
+        // guaranteed to contain no extras unknown to the local ClassLoader. That is why this
+        // method can not be replaced in the ResolverActivity whole hog.
         return getIntent().getBooleanExtra(Intent.EXTRA_AUTO_LAUNCH_SINGLE_CHOICE,
                 super.shouldAutoLaunchSingleChoice(target));
     }
diff --git a/core/java/com/android/internal/app/IVoiceInteractionManagerService.aidl b/core/java/com/android/internal/app/IVoiceInteractionManagerService.aidl
index 033dd13..ff75a8b 100644
--- a/core/java/com/android/internal/app/IVoiceInteractionManagerService.aidl
+++ b/core/java/com/android/internal/app/IVoiceInteractionManagerService.aidl
@@ -35,6 +35,7 @@
     boolean showSessionFromSession(IBinder token, in Bundle sessionArgs, int flags);
     boolean hideSessionFromSession(IBinder token);
     int startVoiceActivity(IBinder token, in Intent intent, String resolvedType);
+    int startAssistantActivity(IBinder token, in Intent intent, String resolvedType);
     void setKeepAwake(IBinder token, boolean keepAwake);
     void closeSystemDialogs(IBinder token);
     void finish(IBinder token);
diff --git a/core/java/com/android/internal/app/ResolverActivity.java b/core/java/com/android/internal/app/ResolverActivity.java
index ab1d9b9..2d0ddef 100644
--- a/core/java/com/android/internal/app/ResolverActivity.java
+++ b/core/java/com/android/internal/app/ResolverActivity.java
@@ -20,23 +20,11 @@
 import android.annotation.StringRes;
 import android.annotation.UiThread;
 import android.app.Activity;
+import android.app.ActivityManager;
 import android.app.ActivityThread;
 import android.app.VoiceInteractor.PickOptionRequest;
 import android.app.VoiceInteractor.PickOptionRequest.Option;
 import android.app.VoiceInteractor.Prompt;
-import android.os.AsyncTask;
-import android.os.RemoteException;
-import android.provider.MediaStore;
-import android.provider.Settings;
-import android.text.TextUtils;
-import android.util.Slog;
-import android.widget.AbsListView;
-import com.android.internal.R;
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.internal.content.PackageMonitor;
-
-import android.app.ActivityManager;
-import android.app.AppGlobals;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
@@ -51,16 +39,23 @@
 import android.content.res.Resources;
 import android.graphics.drawable.Drawable;
 import android.net.Uri;
+import android.os.AsyncTask;
 import android.os.Build;
 import android.os.Bundle;
 import android.os.PatternMatcher;
+import android.os.RemoteException;
 import android.os.StrictMode;
 import android.os.UserHandle;
 import android.os.UserManager;
+import android.provider.MediaStore;
+import android.provider.Settings;
+import android.text.TextUtils;
 import android.util.Log;
+import android.util.Slog;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.AbsListView;
 import android.widget.AdapterView;
 import android.widget.BaseAdapter;
 import android.widget.Button;
@@ -68,7 +63,9 @@
 import android.widget.ListView;
 import android.widget.TextView;
 import android.widget.Toast;
-
+import com.android.internal.R;
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.content.PackageMonitor;
 import com.android.internal.logging.MetricsLogger;
 import com.android.internal.logging.nano.MetricsProto;
 import com.android.internal.widget.ResolverDrawerLayout;
@@ -93,7 +90,6 @@
 
     protected ResolveListAdapter mAdapter;
     private boolean mSafeForwardingMode;
-    private boolean mAlwaysUseOption;
     private AbsListView mAdapterView;
     private Button mAlwaysButton;
     private Button mOnceButton;
@@ -109,12 +105,15 @@
     private CharSequence mTitle;
     private int mDefaultTitleResId;
 
+    // Whether or not this activity supports choosing a default handler for the intent.
+    private boolean mSupportsAlwaysUseOption;
     protected ResolverDrawerLayout mResolverDrawerLayout;
     protected PackageManager mPm;
     protected int mLaunchedFromUid;
 
     private static final String TAG = "ResolverActivity";
     private static final boolean DEBUG = false;
+    private Runnable mPostListReadyRunnable;
 
     private boolean mRegistered;
     private final PackageMonitor mPackageMonitor = new PackageMonitor() {
@@ -124,6 +123,13 @@
                 bindProfileView();
             }
         }
+
+        @Override
+        public boolean onPackageChanged(String packageName, int uid, String[] components) {
+            // We care about all package changes, not just the whole package itself which is
+            // default behavior.
+            return true;
+        }
     };
 
     /**
@@ -230,13 +236,14 @@
      */
     protected void onCreate(Bundle savedInstanceState, Intent intent,
             CharSequence title, Intent[] initialIntents,
-            List<ResolveInfo> rList, boolean alwaysUseOption) {
-        onCreate(savedInstanceState, intent, title, 0, initialIntents, rList, alwaysUseOption);
+            List<ResolveInfo> rList, boolean supportsAlwaysUseOption) {
+        onCreate(savedInstanceState, intent, title, 0, initialIntents, rList,
+                supportsAlwaysUseOption);
     }
 
     protected void onCreate(Bundle savedInstanceState, Intent intent,
             CharSequence title, int defaultTitleRes, Intent[] initialIntents,
-            List<ResolveInfo> rList, boolean alwaysUseOption) {
+            List<ResolveInfo> rList, boolean supportsAlwaysUseOption) {
         setTheme(R.style.Theme_DeviceDefault_Resolver);
         super.onCreate(savedInstanceState);
 
@@ -262,7 +269,7 @@
         mPackageMonitor.register(this, getMainLooper(), false);
         mRegistered = true;
         mReferrerPackage = getReferrerPackageName();
-        mAlwaysUseOption = alwaysUseOption;
+        mSupportsAlwaysUseOption = supportsAlwaysUseOption;
 
         final ActivityManager am = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
         mIconDpi = am.getLauncherLargeIconDensity();
@@ -378,8 +385,11 @@
         final DisplayResolveInfo dri = mAdapter.getOtherProfile();
         if (dri != null) {
             mProfileView.setVisibility(View.VISIBLE);
-            final TextView text = (TextView) mProfileView.findViewById(R.id.profile_button);
-            text.setText(dri.getDisplayLabel());
+            View text = mProfileView.findViewById(R.id.profile_button);
+            if (!(text instanceof TextView)) {
+                text = mProfileView.findViewById(R.id.text1);
+            }
+            ((TextView) text).setText(dri.getDisplayLabel());
         } else {
             mProfileView.setVisibility(View.GONE);
         }
@@ -419,7 +429,9 @@
 
     protected CharSequence getTitleForAction(String action, int defaultTitleRes) {
         final ActionTitle title = mResolvingHome ? ActionTitle.HOME : ActionTitle.forAction(action);
-        final boolean named = mAdapter.hasFilteredItem();
+        // While there may already be a filtered item, we can only use it in the title if the list
+        // is already sorted and all information relevant to it is already in the list.
+        final boolean named = mAdapter.getFilteredPosition() >= 0;
         if (title == ActionTitle.DEFAULT && defaultTitleRes != 0) {
             return getString(defaultTitleRes);
         } else {
@@ -510,12 +522,16 @@
         if (!isChangingConfigurations() && mPickOptionRequest != null) {
             mPickOptionRequest.cancel();
         }
+        if (mPostListReadyRunnable != null) {
+            getMainThreadHandler().removeCallbacks(mPostListReadyRunnable);
+            mPostListReadyRunnable = null;
+        }
     }
 
     @Override
     protected void onRestoreInstanceState(Bundle savedInstanceState) {
         super.onRestoreInstanceState(savedInstanceState);
-        if (mAlwaysUseOption) {
+        if (mSupportsAlwaysUseOption) {
             final int checkedPos = mAdapterView.getCheckedItemPosition();
             final boolean hasValidSelection = checkedPos != ListView.INVALID_POSITION;
             mLastSelected = checkedPos;
@@ -570,17 +586,18 @@
 
     public void onButtonClick(View v) {
         final int id = v.getId();
-        startSelected(mAlwaysUseOption ?
-                        mAdapterView.getCheckedItemPosition() : mAdapter.getFilteredPosition(),
+        startSelected(mAdapter.hasFilteredItem() ?
+                        mAdapter.getFilteredPosition():
+                        mAdapterView.getCheckedItemPosition(),
                 id == R.id.button_always,
-                mAlwaysUseOption);
+                !mAdapter.hasFilteredItem());
     }
 
-    public void startSelected(int which, boolean always, boolean filtered) {
+    public void startSelected(int which, boolean always, boolean hasIndexBeenFiltered) {
         if (isFinishing()) {
             return;
         }
-        ResolveInfo ri = mAdapter.resolveInfoForPosition(which, filtered);
+        ResolveInfo ri = mAdapter.resolveInfoForPosition(which, hasIndexBeenFiltered);
         if (mResolvingHome && hasManagedProfile() && !supportsManagedProfiles(ri)) {
             Toast.makeText(this, String.format(getResources().getString(
                     com.android.internal.R.string.activity_resolver_work_profiles_support),
@@ -589,12 +606,15 @@
             return;
         }
 
-        TargetInfo target = mAdapter.targetInfoForPosition(which, filtered);
+        TargetInfo target = mAdapter.targetInfoForPosition(which, hasIndexBeenFiltered);
+        if (target == null) {
+            return;
+        }
         if (onTargetSelected(target, always)) {
-            if (always && filtered) {
+            if (always && mSupportsAlwaysUseOption) {
                 MetricsLogger.action(
                         this, MetricsProto.MetricsEvent.ACTION_APP_DISAMBIG_ALWAYS);
-            } else if (filtered) {
+            } else if (mSupportsAlwaysUseOption) {
                 MetricsLogger.action(
                         this, MetricsProto.MetricsEvent.ACTION_APP_DISAMBIG_JUST_ONCE);
             } else {
@@ -619,7 +639,7 @@
         final ResolveInfo ri = target.getResolveInfo();
         final Intent intent = target != null ? target.getResolvedIntent() : null;
 
-        if (intent != null && (mAlwaysUseOption || mAdapter.hasFilteredItem())
+        if (intent != null && (mSupportsAlwaysUseOption || mAdapter.hasFilteredItem())
                 && mAdapter.mUnfilteredResolveList != null) {
             // Build a reasonable intent filter, based on what matched.
             IntentFilter filter = new IntentFilter();
@@ -706,7 +726,18 @@
 
             if (filter != null) {
                 final int N = mAdapter.mUnfilteredResolveList.size();
-                ComponentName[] set = new ComponentName[N];
+                ComponentName[] set;
+                // If we don't add back in the component for forwarding the intent to a managed
+                // profile, the preferred activity may not be updated correctly (as the set of
+                // components we tell it we knew about will have changed).
+                final boolean needToAddBackProfileForwardingComponent
+                        = mAdapter.mOtherProfile != null;
+                if (!needToAddBackProfileForwardingComponent) {
+                    set = new ComponentName[N];
+                } else {
+                    set = new ComponentName[N + 1];
+                }
+
                 int bestMatch = 0;
                 for (int i=0; i<N; i++) {
                     ResolveInfo r = mAdapter.mUnfilteredResolveList.get(i).getResolveInfoAt(0);
@@ -714,6 +745,13 @@
                             r.activityInfo.name);
                     if (r.match > bestMatch) bestMatch = r.match;
                 }
+
+                if (needToAddBackProfileForwardingComponent) {
+                    set[N] = mAdapter.mOtherProfile.getResolvedComponentName();
+                    final int otherProfileMatch = mAdapter.mOtherProfile.getResolveInfo().match;
+                    if (otherProfileMatch > bestMatch) bestMatch = otherProfileMatch;
+                }
+
                 if (alwaysCheck) {
                     final int userId = getUserId();
                     final PackageManager pm = getPackageManager();
@@ -851,15 +889,15 @@
         // a more complicated UI that the current voice interaction flow is not able
         // to handle.
         mAdapter = createAdapter(this, payloadIntents, initialIntents, rList,
-                mLaunchedFromUid, mAlwaysUseOption && !isVoiceInteraction());
+                mLaunchedFromUid, mSupportsAlwaysUseOption && !isVoiceInteraction());
         boolean rebuildCompleted = mAdapter.rebuildList();
 
-        if (mAdapter.hasFilteredItem()) {
+        if (useLayoutWithDefault()) {
             mLayoutId = R.layout.resolver_list_with_default;
-            mAlwaysUseOption = false;
         } else {
             mLayoutId = getLayoutResource();
         }
+        setContentView(mLayoutId);
 
         int count = mAdapter.getUnfilteredCount();
 
@@ -879,22 +917,21 @@
             }
         }
 
-        setContentView(mLayoutId);
-        if (count > 0 || !rebuildCompleted) {
-            mAdapterView = (AbsListView) findViewById(R.id.resolver_list);
-            onPrepareAdapterView(mAdapterView, mAdapter, mAlwaysUseOption);
-        } else {
-            final TextView empty = (TextView) findViewById(R.id.empty);
-            empty.setVisibility(View.VISIBLE);
 
-            mAdapterView = (AbsListView) findViewById(R.id.resolver_list);
+        mAdapterView = (AbsListView) findViewById(R.id.resolver_list);
+
+        if (count == 0 && mAdapter.mPlaceholderCount == 0) {
+            final TextView emptyView = (TextView) findViewById(R.id.empty);
+            emptyView.setVisibility(View.VISIBLE);
             mAdapterView.setVisibility(View.GONE);
+        } else {
+            mAdapterView.setVisibility(View.VISIBLE);
+            onPrepareAdapterView(mAdapterView, mAdapter);
         }
         return false;
     }
 
-    public void onPrepareAdapterView(AbsListView adapterView, ResolveListAdapter adapter,
-            boolean alwaysUseOption) {
+    public void onPrepareAdapterView(AbsListView adapterView, ResolveListAdapter adapter) {
         final boolean useHeader = adapter.hasFilteredItem();
         final ListView listView = adapterView instanceof ListView ? (ListView) adapterView : null;
 
@@ -904,7 +941,7 @@
         adapterView.setOnItemClickListener(listener);
         adapterView.setOnItemLongClickListener(listener);
 
-        if (alwaysUseOption) {
+        if (mSupportsAlwaysUseOption) {
             listView.setChoiceMode(AbsListView.CHOICE_MODE_SINGLE);
         }
 
@@ -917,16 +954,23 @@
     }
 
     public void setTitleAndIcon() {
-        if (mTitle == null) {
-            mTitle = getTitleForAction(getTargetIntent().getAction(), mDefaultTitleResId);
-        }
-
-        if (!TextUtils.isEmpty(mTitle)) {
+        if (mAdapter.getCount() == 0 && mAdapter.mPlaceholderCount == 0) {
             final TextView titleView = (TextView) findViewById(R.id.title);
             if (titleView != null) {
-                titleView.setText(mTitle);
+                titleView.setVisibility(View.GONE);
             }
-            setTitle(mTitle);
+        }
+
+        CharSequence title = mTitle != null
+                ? mTitle
+                : getTitleForAction(getTargetIntent().getAction(), mDefaultTitleResId);
+
+        if (!TextUtils.isEmpty(title)) {
+            final TextView titleView = (TextView) findViewById(R.id.title);
+            if (titleView != null) {
+                titleView.setText(title);
+            }
+            setTitle(title);
 
             // Try to initialize the title icon if we have a view for it and a title to match
             final ImageView titleIcon = (ImageView) findViewById(R.id.title_icon);
@@ -954,19 +998,34 @@
     }
 
     public void resetAlwaysOrOnceButtonBar() {
-        if (mAlwaysUseOption || mAdapter.mLastChosen != null) {
+        if (mSupportsAlwaysUseOption) {
             final ViewGroup buttonLayout = (ViewGroup) findViewById(R.id.button_bar);
             if (buttonLayout != null) {
                 buttonLayout.setVisibility(View.VISIBLE);
                 mAlwaysButton = (Button) buttonLayout.findViewById(R.id.button_always);
                 mOnceButton = (Button) buttonLayout.findViewById(R.id.button_once);
+            } else {
+                Log.e(TAG, "Layout unexpectedly does not have a button bar");
             }
         }
 
-        if (mAdapter.hasFilteredItem()) {
+        if (useLayoutWithDefault()
+                && mAdapter.getFilteredPosition() != ListView.INVALID_POSITION) {
             setAlwaysButtonEnabled(true, mAdapter.getFilteredPosition(), false);
             mOnceButton.setEnabled(true);
+            return;
         }
+
+        // When the items load in, if an item was already selected, enable the buttons
+        if (mAdapterView != null
+                && mAdapterView.getCheckedItemPosition() != ListView.INVALID_POSITION) {
+            setAlwaysButtonEnabled(true, mAdapterView.getCheckedItemPosition(), true);
+            mOnceButton.setEnabled(true);
+        }
+    }
+
+    private boolean useLayoutWithDefault() {
+        return mSupportsAlwaysUseOption && mAdapter.hasFilteredItem();
     }
 
     /**
@@ -1234,6 +1293,7 @@
         private DisplayResolveInfo mOtherProfile;
         private boolean mHasExtendedInfo;
         private ResolverListController mResolverListController;
+        private int mPlaceholderCount;
 
         protected final LayoutInflater mInflater;
 
@@ -1265,6 +1325,11 @@
             }
         }
 
+        public void setPlaceholderCount(int count) {
+            mPlaceholderCount = count;
+        }
+
+        @Nullable
         public DisplayResolveInfo getFilteredItem() {
             if (mFilterLastUsed && mLastChosenPosition >= 0) {
                 // Not using getItem since it offsets to dodge this position for the list
@@ -1308,14 +1373,10 @@
          */
         protected boolean rebuildList() {
             List<ResolvedComponentInfo> currentResolveList = null;
-            try {
-                mLastChosen = mResolverListController.getLastChosen();
-            } catch (RemoteException re) {
-                Log.d(TAG, "Error calling getLastChosenActivity\n" + re);
-            }
-
             // Clear the value of mOtherProfile from previous call.
             mOtherProfile = null;
+            mLastChosen = null;
+            mLastChosenPosition = -1;
             mDisplayList.clear();
             if (mBaseResolveList != null) {
                 currentResolveList = mUnfilteredResolveList = new ArrayList<>();
@@ -1338,6 +1399,30 @@
                     mUnfilteredResolveList = originalList;
                 }
             }
+
+            // So far we only support a single other profile at a time.
+            // The first one we see gets special treatment.
+            for (ResolvedComponentInfo info : currentResolveList) {
+                if (info.getResolveInfoAt(0).targetUserId != UserHandle.USER_CURRENT) {
+                    mOtherProfile = new DisplayResolveInfo(info.getIntentAt(0),
+                            info.getResolveInfoAt(0),
+                            info.getResolveInfoAt(0).loadLabel(mPm),
+                            info.getResolveInfoAt(0).loadLabel(mPm),
+                            getReplacementIntent(info.getResolveInfoAt(0).activityInfo,
+                                    info.getIntentAt(0)));
+                    currentResolveList.remove(info);
+                    break;
+                }
+            }
+
+            if (mOtherProfile == null) {
+                try {
+                    mLastChosen = mResolverListController.getLastChosen();
+                } catch (RemoteException re) {
+                    Log.d(TAG, "Error calling getLastChosenActivity\n" + re);
+                }
+            }
+
             int N;
             if ((currentResolveList != null) && ((N = currentResolveList.size()) > 0)) {
                 // We only care about fixing the unfilteredList if the current resolve list and
@@ -1350,6 +1435,7 @@
                 }
 
                 if (N > 1) {
+                    setPlaceholderCount(currentResolveList.size());
                     AsyncTask<List<ResolvedComponentInfo>,
                             Void,
                             List<ResolvedComponentInfo>> sortingTask =
@@ -1366,13 +1452,14 @@
                         @Override
                         protected void onPostExecute(List<ResolvedComponentInfo> sortedComponents) {
                             processSortedList(sortedComponents);
-                            onPrepareAdapterView(mAdapterView, mAdapter, mAlwaysUseOption);
                             if (mProfileView != null) {
                                 bindProfileView();
                             }
+                            notifyDataSetChanged();
                         }
                     };
                     sortingTask.execute(currentResolveList);
+                    postListReadyRunnable();
                     return false;
                 } else {
                     processSortedList(currentResolveList);
@@ -1384,16 +1471,6 @@
             }
         }
 
-        private void disableLastChosenIfNeeded() {
-            // Layout doesn't handle both profile button and last chosen
-            // so disable last chosen if profile button is present.
-            if (mOtherProfile != null && mLastChosenPosition >= 0) {
-                mLastChosenPosition = -1;
-                mFilterLastUsed = false;
-            }
-        }
-
-
         private void processSortedList(List<ResolvedComponentInfo> sortedComponents) {
             int N;
             if (sortedComponents != null && (N = sortedComponents.size()) != 0) {
@@ -1461,14 +1538,39 @@
                 processGroup(sortedComponents, start, (N - 1), rci0, r0Label);
             }
 
-            setTitleAndIcon();
-            resetAlwaysOrOnceButtonBar();
-            disableLastChosenIfNeeded();
-            onListRebuilt();
+            postListReadyRunnable();
+        }
+
+        /**
+         * Some necessary methods for creating the list are initiated in onCreate and will also
+         * determine the layout known. We therefore can't update the UI inline and post to the
+         * handler thread to update after the current task is finished.
+         */
+        private void postListReadyRunnable() {
+            if (mPostListReadyRunnable == null) {
+                mPostListReadyRunnable = new Runnable() {
+                    @Override
+                    public void run() {
+                        setTitleAndIcon();
+                        resetAlwaysOrOnceButtonBar();
+                        onListRebuilt();
+                        mPostListReadyRunnable = null;
+                    }
+                };
+                getMainThreadHandler().post(mPostListReadyRunnable);
+            }
         }
 
         public void onListRebuilt() {
-            // This space for rent
+            int count = getUnfilteredCount();
+            if (count == 1 && getOtherProfile() == null) {
+                // Only one target, so we're a candidate to auto-launch!
+                final TargetInfo target = targetInfoForPosition(0, false);
+                if (shouldAutoLaunchSingleChoice(target)) {
+                    safelyStartActivity(target);
+                    finish();
+                }
+            }
         }
 
         public boolean shouldGetResolvedFilter() {
@@ -1546,6 +1648,11 @@
         }
 
         private void updateLastChosenPosition(ResolveInfo info) {
+            // If another profile is present, ignore the last chosen entry.
+            if (mOtherProfile != null) {
+                mLastChosenPosition = -1;
+                return;
+            }
             if (mLastChosen != null
                     && mLastChosen.activityInfo.packageName.equals(info.activityInfo.packageName)
                     && mLastChosen.activityInfo.name.equals(info.activityInfo.name)) {
@@ -1553,31 +1660,41 @@
             }
         }
 
+        // We assume that at this point we've already filtered out the only intent for a different
+        // targetUserId which we're going to use.
         private void addResolveInfo(DisplayResolveInfo dri) {
-            if (dri.mResolveInfo.targetUserId != UserHandle.USER_CURRENT && mOtherProfile == null) {
-                // So far we only support a single other profile at a time.
-                // The first one we see gets special treatment.
-                mOtherProfile = dri;
-            } else {
+            if (dri.mResolveInfo.targetUserId == UserHandle.USER_CURRENT) {
                 mDisplayList.add(dri);
             }
         }
 
+        @Nullable
         public ResolveInfo resolveInfoForPosition(int position, boolean filtered) {
-            return (filtered ? getItem(position) : mDisplayList.get(position))
-                    .getResolveInfo();
+            TargetInfo target = targetInfoForPosition(position, filtered);
+            if (target != null) {
+                return target.getResolveInfo();
+             }
+             return null;
         }
 
+        @Nullable
         public TargetInfo targetInfoForPosition(int position, boolean filtered) {
-            return filtered ? getItem(position) : mDisplayList.get(position);
+            if (filtered) {
+                return getItem(position);
+            }
+            if (mDisplayList.size() > position) {
+                return mDisplayList.get(position);
+            }
+            return null;
         }
 
         public int getCount() {
-            int result = mDisplayList.size();
+            int totalSize = mDisplayList == null || mDisplayList.isEmpty() ? mPlaceholderCount :
+                    mDisplayList.size();
             if (mFilterLastUsed && mLastChosenPosition >= 0) {
-                result--;
+                totalSize--;
             }
-            return result;
+            return totalSize;
         }
 
         public int getUnfilteredCount() {
@@ -1592,11 +1709,16 @@
             return mDisplayList.get(index);
         }
 
+        @Nullable
         public TargetInfo getItem(int position) {
             if (mFilterLastUsed && mLastChosenPosition >= 0 && position >= mLastChosenPosition) {
                 position++;
             }
-            return mDisplayList.get(position);
+            if (mDisplayList.size() > position) {
+                return mDisplayList.get(position);
+            } else {
+                return null;
+            }
         }
 
         public long getItemId(int position) {
@@ -1660,6 +1782,11 @@
 
         private void onBindView(View view, TargetInfo info) {
             final ViewHolder holder = (ViewHolder) view.getTag();
+            if (info == null) {
+                holder.icon.setImageDrawable(
+                        getDrawable(R.drawable.resolver_icon_placeholder));
+                return;
+            }
             final CharSequence label = info.getDisplayLabel();
             if (!TextUtils.equals(holder.text.getText(), label)) {
                 holder.text.setText(info.getDisplayLabel());
@@ -1770,9 +1897,15 @@
                 // Header views don't count.
                 return;
             }
+            // If we're still loading, we can't yet enable the buttons.
+            if (mAdapter.resolveInfoForPosition(position, true) == null) {
+                return;
+            }
+
             final int checkedPos = mAdapterView.getCheckedItemPosition();
             final boolean hasValidSelection = checkedPos != ListView.INVALID_POSITION;
-            if (mAlwaysUseOption && (!hasValidSelection || mLastSelected != checkedPos)) {
+            if (!useLayoutWithDefault()
+                    && (!hasValidSelection || mLastSelected != checkedPos)) {
                 setAlwaysButtonEnabled(hasValidSelection, checkedPos, true);
                 mOnceButton.setEnabled(hasValidSelection);
                 if (hasValidSelection) {
diff --git a/core/java/com/android/internal/app/procstats/PssTable.java b/core/java/com/android/internal/app/procstats/PssTable.java
index b6df983..de5f673 100644
--- a/core/java/com/android/internal/app/procstats/PssTable.java
+++ b/core/java/com/android/internal/app/procstats/PssTable.java
@@ -96,7 +96,7 @@
             }
 
             val = getValue(key, PSS_USS_AVERAGE);
-            setValue(key, PSS_AVERAGE,
+            setValue(key, PSS_USS_AVERAGE,
                     (long)(((val*(double)count)+(avgUss*(double)inCount)) / (count+inCount)));
 
             val = getValue(key, PSS_USS_MAXIMUM);
diff --git a/core/java/com/android/internal/backup/LocalTransport.java b/core/java/com/android/internal/backup/LocalTransport.java
index 5e8f4a2..f76b702 100644
--- a/core/java/com/android/internal/backup/LocalTransport.java
+++ b/core/java/com/android/internal/backup/LocalTransport.java
@@ -73,6 +73,8 @@
     // Full backup size quota is set to reasonable value.
     private static final long FULL_BACKUP_SIZE_QUOTA = 25 * 1024 * 1024;
 
+    private static final long KEY_VALUE_BACKUP_SIZE_QUOTA = 5 * 1024 * 1024;
+
     private Context mContext;
     private File mDataDir = new File(Environment.getDownloadCacheDirectory(), "backup");
     private File mCurrentSetDir = new File(mDataDir, Long.toString(CURRENT_SET_TOKEN));
@@ -712,6 +714,6 @@
 
     @Override
     public long getBackupQuota(String packageName, boolean isFullBackup) {
-        return isFullBackup ? FULL_BACKUP_SIZE_QUOTA : Long.MAX_VALUE;
+        return isFullBackup ? FULL_BACKUP_SIZE_QUOTA : KEY_VALUE_BACKUP_SIZE_QUOTA;
     }
 }
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/logging/legacy/EventLogCollector.java b/core/java/com/android/internal/logging/legacy/EventLogCollector.java
index 46e70ea..598f0d5 100644
--- a/core/java/com/android/internal/logging/legacy/EventLogCollector.java
+++ b/core/java/com/android/internal/logging/legacy/EventLogCollector.java
@@ -45,8 +45,6 @@
 
     private EventLogCollector() {
         mTagParsers = new ArrayMap<>();
-        addParser(new LockscreenGestureParser());
-        addParser(new StatusBarStateParser());
         addParser(new PowerScreenStateParser());
         addParser(new SysuiMultiActionParser());
 
diff --git a/core/java/com/android/internal/logging/legacy/LegacyConversionLogger.java b/core/java/com/android/internal/logging/legacy/LegacyConversionLogger.java
index 91e968b..1209e4d 100644
--- a/core/java/com/android/internal/logging/legacy/LegacyConversionLogger.java
+++ b/core/java/com/android/internal/logging/legacy/LegacyConversionLogger.java
@@ -24,14 +24,6 @@
 
 /** @hide */
 public class LegacyConversionLogger implements TronLogger {
-    public static final String VIEW_KEY = "view";
-    public static final String TYPE_KEY = "type";
-    public static final String EVENT_KEY = "data";
-
-    public static final int TYPE_COUNTER = 1;
-    public static final int TYPE_HISTOGRAM = 2;
-    public static final int TYPE_EVENT = 3;
-
     private final Queue<LogMaker> mQueue;
     private HashMap<String, Boolean> mConfig;
 
diff --git a/core/java/com/android/internal/logging/legacy/LockscreenGestureParser.java b/core/java/com/android/internal/logging/legacy/LockscreenGestureParser.java
deleted file mode 100644
index df08ee0..0000000
--- a/core/java/com/android/internal/logging/legacy/LockscreenGestureParser.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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.internal.logging.legacy;
-
-import android.util.Log;
-
-import android.metrics.LogMaker;
-import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
-
-/**
- * Parse the Android lockscreen gesture logs.
- * @hide
- */
-public class LockscreenGestureParser extends TagParser {
-    private static final String TAG = "LockscreenGestureParser";
-    private static final int EVENTLOG_TAG = 36021;
-
-    // source of truth is com.android.systemui.EventLogConstants
-    public static final int[] GESTURE_TYPE_MAP = {
-            MetricsEvent.VIEW_UNKNOWN,  // there is no type 0
-            MetricsEvent.ACTION_LS_UNLOCK,  // SYSUI_LOCKSCREEN_GESTURE_SWIPE_UP_UNLOCK = 1
-            MetricsEvent.ACTION_LS_SHADE,  // SYSUI_LOCKSCREEN_GESTURE_SWIPE_DOWN_FULL_SHADE = 2
-            MetricsEvent.ACTION_LS_HINT,  // SYSUI_LOCKSCREEN_GESTURE_TAP_UNLOCK_HINT = 3
-            MetricsEvent.ACTION_LS_CAMERA,  // SYSUI_LOCKSCREEN_GESTURE_SWIPE_CAMERA = 4
-            MetricsEvent.ACTION_LS_DIALER,  // SYSUI_LOCKSCREEN_GESTURE_SWIPE_DIALER = 5
-            MetricsEvent.ACTION_LS_LOCK,  // SYSUI_LOCKSCREEN_GESTURE_TAP_LOCK = 6
-            MetricsEvent.ACTION_LS_NOTE,  // SYSUI_LOCKSCREEN_GESTURE_TAP_NOTIFICATION_ACTIVATE = 7
-            MetricsEvent.ACTION_LS_QS,  // SYSUI_LOCKSCREEN_GESTURE_SWIPE_DOWN_QS = 8
-            MetricsEvent.ACTION_SHADE_QS_PULL,  // SYSUI_SHADE_GESTURE_SWIPE_DOWN_QS = 9
-            MetricsEvent.ACTION_SHADE_QS_TAP  // SYSUI_TAP_TO_OPEN_QS = 10
-    };
-
-    @Override
-    public int getTag() {
-        return EVENTLOG_TAG;
-    }
-
-    @Override
-    public void parseEvent(TronLogger logger, long eventTimeMs, Object[] operands) {
-        final boolean debug = Util.debug();
-        if (operands.length >= 1) {
-            try {
-                int type = ((Integer) operands[0]).intValue();
-                // ignore gesture length in operands[1]
-                // ignore gesture velocity in operands[2]
-
-                int category = MetricsEvent.VIEW_UNKNOWN;
-                if (type < GESTURE_TYPE_MAP.length) {
-                    category = GESTURE_TYPE_MAP[type];
-                }
-                if (category != MetricsEvent.VIEW_UNKNOWN) {
-                    LogMaker proto = logger.obtain();
-                    proto.setCategory(category);
-                    proto.setType(MetricsEvent.TYPE_ACTION);
-                    proto.setTimestamp(eventTimeMs);
-                    logger.addEvent(proto);
-                }
-            } catch (ClassCastException e) {
-                if (debug) {
-                    Log.e(TAG, "unexpected operand type: ", e);
-                }
-            }
-        } else if (debug) {
-            Log.w(TAG, "wrong number of operands: " + operands.length);
-        }
-    }
-}
diff --git a/core/java/com/android/internal/logging/legacy/StatusBarStateParser.java b/core/java/com/android/internal/logging/legacy/StatusBarStateParser.java
deleted file mode 100644
index 226253f..0000000
--- a/core/java/com/android/internal/logging/legacy/StatusBarStateParser.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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.internal.logging.legacy;
-
-import android.util.Log;
-
-import android.metrics.LogMaker;
-import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
-
-/**
- * Parse the Android lockscreen gesture logs.
- * @hide
- */
-public class StatusBarStateParser extends TagParser {
-    private static final String TAG = "StatusBarStateParser";
-    private static final int EVENTLOG_TAG = 36004;
-
-    // source of truth is com.android.systemui.statusbar.StatusBarState
-    public static final int SHADE = 0;
-    public static final int KEYGUARD = 1;
-    public static final int SHADE_LOCKED = 2;
-
-    @Override
-    public int getTag() {
-        return EVENTLOG_TAG;
-    }
-
-    @Override
-    public void parseEvent(TronLogger logger, long eventTimeMs, Object[] operands) {
-        final boolean debug = Util.debug();
-        if (operands.length >= 6) {
-            try {
-                // [state, isShowing, isOccluded, isBouncerShowing, isSecure, isCurrentlyInsecure]
-                int state = ((Integer) operands[0]).intValue();
-                boolean isBouncerShowing = (((Integer) operands[3]).intValue()) == 1;
-                int isSecure = ((Integer) operands[4]).intValue();
-
-                int view = MetricsEvent.LOCKSCREEN;
-                int type = MetricsEvent.TYPE_OPEN;
-                if (state == SHADE) {
-                    type = MetricsEvent.TYPE_CLOSE;
-                } else if (isBouncerShowing) {
-                    view = MetricsEvent.BOUNCER;
-                }
-
-                LogMaker proto = logger.obtain();
-                proto.setCategory(view);
-                proto.setType(type);
-                proto.setTimestamp(eventTimeMs);
-                proto.setSubtype(isSecure);
-                logger.addEvent(proto);
-            } catch (ClassCastException e) {
-                if (debug) {
-                    Log.e(TAG, "unexpected operand type: ", e);
-                }
-            }
-        } else if (debug) {
-            Log.w(TAG, "wrong number of operands: " + operands.length);
-        }
-    }
-}
diff --git a/core/java/com/android/internal/os/BatteryStatsImpl.java b/core/java/com/android/internal/os/BatteryStatsImpl.java
index c34c379..9dca5ea 100644
--- a/core/java/com/android/internal/os/BatteryStatsImpl.java
+++ b/core/java/com/android/internal/os/BatteryStatsImpl.java
@@ -377,6 +377,8 @@
     int mScreenBrightnessBin = -1;
     final StopwatchTimer[] mScreenBrightnessTimer = new StopwatchTimer[NUM_SCREEN_BRIGHTNESS_BINS];
 
+    boolean mPretendScreenOff;
+
     boolean mInteractive;
     StopwatchTimer mInteractiveTimer;
 
@@ -3395,6 +3397,11 @@
         mNoAutoReset = enabled;
     }
 
+    public void setPretendScreenOff(boolean pretendScreenOff) {
+        mPretendScreenOff = pretendScreenOff;
+        noteScreenStateLocked(pretendScreenOff ? Display.STATE_OFF : Display.STATE_ON);
+    }
+
     private String mInitialAcquireWakeName;
     private int mInitialAcquireWakeUid = -1;
 
@@ -3698,6 +3705,7 @@
     }
 
     public void noteScreenStateLocked(int state) {
+        state = mPretendScreenOff ? Display.STATE_OFF : state;
         if (mScreenState != state) {
             recordDailyStatsIfNeededLocked(true);
             final int oldState = mScreenState;
@@ -9554,7 +9562,8 @@
                     }
                 });
 
-        if (DEBUG_ENERGY_CPU) {
+        // TODO: STOPSHIP, remove the "true" below after b/34961340 is fixed
+        if (DEBUG_ENERGY_CPU || true) {
             Slog.d(TAG, "Reading cpu stats took " + (mClocks.elapsedRealtime() - startTimeMs) +
                     " ms");
         }
@@ -9711,7 +9720,7 @@
                 }
                 doWrite = true;
                 resetAllStatsLocked();
-                if (chargeUAh > 0) {
+                if (chargeUAh > 0 && level > 0) {
                     // Only use the reported coulomb charge value if it is supported and reported.
                     mEstimatedBatteryCapacity = (int) ((chargeUAh / 1000) / (level / 100.0));
                 }
@@ -10382,10 +10391,9 @@
             if (next == null) {
                 return;
             }
-
-            mWriteLock.lock();
         }
 
+        mWriteLock.lock();
         try {
             FileOutputStream stream = new FileOutputStream(mFile.chooseForWrite());
             stream.write(next.marshall());
diff --git a/core/java/com/android/internal/os/HandlerCaller.java b/core/java/com/android/internal/os/HandlerCaller.java
index c26fc3a..ae7c5f2 100644
--- a/core/java/com/android/internal/os/HandlerCaller.java
+++ b/core/java/com/android/internal/os/HandlerCaller.java
@@ -173,6 +173,16 @@
         return mH.obtainMessage(what, arg1, arg2, args);
     }
 
+    public Message obtainMessageIIOOOO(int what, int arg1, int arg2, Object arg3, Object arg4,
+            Object arg5, Object arg6) {
+        SomeArgs args = SomeArgs.obtain();
+        args.arg1 = arg3;
+        args.arg2 = arg4;
+        args.arg3 = arg5;
+        args.arg4 = arg6;
+        return mH.obtainMessage(what, arg1, arg2, args);
+    }
+
     public Message obtainMessageOO(int what, Object arg1, Object arg2) {
         SomeArgs args = SomeArgs.obtain();
         args.arg1 = arg1;
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/WebViewZygoteInit.java b/core/java/com/android/internal/os/WebViewZygoteInit.java
index d82a211..f27c0d4 100644
--- a/core/java/com/android/internal/os/WebViewZygoteInit.java
+++ b/core/java/com/android/internal/os/WebViewZygoteInit.java
@@ -55,8 +55,15 @@
         }
 
         @Override
-        protected void maybePreload() {
-            // Do nothing, we don't need to call ZygoteInit.maybePreload() for the WebView zygote.
+        protected void preload() {
+            // Nothing to preload by default.
+        }
+
+        @Override
+        protected boolean isPreloadComplete() {
+            // Webview zygotes don't preload any classes or resources or defaults, all of their
+            // preloading is package specific.
+            return true;
         }
 
         @Override
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/Zygote.java b/core/java/com/android/internal/os/Zygote.java
index 59416dd..fa71a62 100644
--- a/core/java/com/android/internal/os/Zygote.java
+++ b/core/java/com/android/internal/os/Zygote.java
@@ -173,6 +173,10 @@
         VM_HOOKS.postForkChild(debugFlags, isSystemServer, instructionSet);
     }
 
+    /**
+     * Resets this process' priority to the default value (0).
+     */
+    native static void nativeResetNicePriority();
 
     /**
      * Executes "/system/bin/sh -c &lt;command&gt;" using the exec() system call.
diff --git a/core/java/com/android/internal/os/ZygoteConnection.java b/core/java/com/android/internal/os/ZygoteConnection.java
index 8fe374c..e2485e9 100644
--- a/core/java/com/android/internal/os/ZygoteConnection.java
+++ b/core/java/com/android/internal/os/ZygoteConnection.java
@@ -171,7 +171,9 @@
                 return handleAbiListQuery();
             }
 
-            maybePreload();
+            if (parsedArgs.preloadDefault) {
+                return handlePreload();
+            }
 
             if (parsedArgs.preloadPackage != null) {
                 return handlePreloadPackage(parsedArgs.preloadPackage,
@@ -282,8 +284,34 @@
         }
     }
 
-    protected void maybePreload() {
-        ZygoteInit.maybePreload();
+    /**
+     * Preloads resources if the zygote is in lazily preload mode. Writes the result of the
+     * preload operation; {@code 0} when a preload was initiated due to this request and {@code 1}
+     * if no preload was initiated. The latter implies that the zygote is not configured to load
+     * resources lazy or that the zygote has already handled a previous request to handlePreload.
+     */
+    private boolean handlePreload() {
+        try {
+            if (isPreloadComplete()) {
+                mSocketOutStream.writeInt(1);
+            } else {
+                preload();
+                mSocketOutStream.writeInt(0);
+            }
+
+            return false;
+        } catch (IOException ioe) {
+            Log.e(TAG, "Error writing to command socket", ioe);
+            return true;
+        }
+    }
+
+    protected void preload() {
+        ZygoteInit.lazyPreload();
+    }
+
+    protected boolean isPreloadComplete() {
+        return ZygoteInit.isPreloadComplete();
     }
 
     protected boolean handlePreloadPackage(String packagePath, String libsPath) {
@@ -402,6 +430,13 @@
         String preloadPackageLibs;
 
         /**
+         * Whether this is a request to start preloading the default resources and classes.
+         * This argument only makes sense when the zygote is in lazy preload mode (i.e, when
+         * it's started with --enable-lazy-preload).
+         */
+        boolean preloadDefault;
+
+        /**
          * Constructs instance and parses args
          * @param args zygote command-line args
          * @throws IllegalArgumentException
@@ -564,6 +599,8 @@
                 } else if (arg.equals("--preload-package")) {
                     preloadPackage = args[++curArg];
                     preloadPackageLibs = args[++curArg];
+                } else if (arg.equals("--preload-default")) {
+                    preloadDefault = true;
                 } else {
                     break;
                 }
@@ -578,7 +615,7 @@
                     throw new IllegalArgumentException(
                             "Unexpected arguments after --preload-package.");
                 }
-            } else {
+            } else if (!preloadDefault) {
                 if (!seenRuntimeArgs) {
                     throw new IllegalArgumentException("Unexpected argument : " + args[curArg]);
                 }
@@ -789,7 +826,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 a3b066a..310cbc7 100644
--- a/core/java/com/android/internal/os/ZygoteInit.java
+++ b/core/java/com/android/internal/os/ZygoteInit.java
@@ -25,9 +25,11 @@
 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;
+import android.os.Seccomp;
 import android.os.ServiceManager;
 import android.os.ServiceSpecificException;
 import android.os.SystemClock;
@@ -43,11 +45,13 @@
 import android.util.BootTimingsTraceLog;
 import android.util.EventLog;
 import android.util.Log;
+import android.util.Slog;
 import android.webkit.WebViewFactory;
 import android.widget.TextView;
 
 import com.android.internal.logging.MetricsLogger;
 
+import com.android.internal.util.Preconditions;
 import dalvik.system.DexFile;
 import dalvik.system.PathClassLoader;
 import dalvik.system.VMRuntime;
@@ -80,6 +84,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;
@@ -124,6 +129,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,
@@ -136,11 +147,11 @@
         sPreloadComplete = true;
     }
 
-    public static void maybePreload() {
-        if (!sPreloadComplete) {
-            Log.i(TAG, "Lazily preloading resources.");
-            preload(new BootTimingsTraceLog("ZygoteInitTiming_lazy", Trace.TRACE_TAG_DALVIK));
-        }
+    public static void lazyPreload() {
+        Preconditions.checkState(!sPreloadComplete);
+        Log.i(TAG, "Lazily preloading resources.");
+
+        preload(new BootTimingsTraceLog("ZygoteInitTiming_lazy", Trace.TRACE_TAG_DALVIK));
     }
 
     private static void beginIcuCachePinning() {
@@ -173,6 +184,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();
@@ -470,7 +489,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 */
@@ -565,6 +584,7 @@
             OsConstants.CAP_NET_RAW,
             OsConstants.CAP_SYS_MODULE,
             OsConstants.CAP_SYS_NICE,
+            OsConstants.CAP_SYS_PTRACE,
             OsConstants.CAP_SYS_RESOURCE,
             OsConstants.CAP_SYS_TIME,
             OsConstants.CAP_SYS_TTY_CONFIG,
@@ -694,6 +714,8 @@
                 EventLog.writeEvent(LOG_BOOT_PROGRESS_PRELOAD_END,
                     SystemClock.uptimeMillis());
                 bootTimingsTraceLog.traceEnd(); // ZygotePreload
+            } else {
+                Zygote.nativeResetNicePriority();
             }
 
             // Finish profiling the zygote initialization.
@@ -712,6 +734,9 @@
             // Zygote process unmounts root storage spaces.
             Zygote.nativeUnmountStorageOnInit();
 
+            // Set seccomp policy
+            Seccomp.setPolicy();
+
             ZygoteHooks.stopZygoteNoThreadCreation();
 
             if (startSystemServer) {
@@ -762,9 +787,42 @@
         }
     }
 
+    static boolean isPreloadComplete() {
+        return sPreloadComplete;
+    }
+
     /**
      * Class not instantiable.
      */
     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/policy/PhoneWindow.java b/core/java/com/android/internal/policy/PhoneWindow.java
index 84195b2..804bd29 100644
--- a/core/java/com/android/internal/policy/PhoneWindow.java
+++ b/core/java/com/android/internal/policy/PhoneWindow.java
@@ -3022,10 +3022,14 @@
                     @Override
                     public void onSwipeCancelled(SwipeDismissLayout layout) {
                         WindowManager.LayoutParams newParams = getAttributes();
-                        newParams.x = 0;
-                        newParams.alpha = 1;
-                        setAttributes(newParams);
-                        setFlags(FLAG_FULLSCREEN, FLAG_FULLSCREEN | FLAG_LAYOUT_NO_LIMITS);
+                        // Swipe changes only affect the x-translation and alpha, check to see if
+                        // those values have changed first before resetting them.
+                        if (newParams.x != 0 || newParams.alpha != 1) {
+                            newParams.x = 0;
+                            newParams.alpha = 1;
+                            setAttributes(newParams);
+                            setFlags(FLAG_FULLSCREEN, FLAG_FULLSCREEN | FLAG_LAYOUT_NO_LIMITS);
+                        }
                     }
                 });
     }
diff --git a/core/java/com/android/internal/policy/PipMotionHelper.java b/core/java/com/android/internal/policy/PipMotionHelper.java
deleted file mode 100644
index 944cd32..0000000
--- a/core/java/com/android/internal/policy/PipMotionHelper.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (C) 2016 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.internal.policy;
-
-import android.animation.RectEvaluator;
-import android.animation.ValueAnimator;
-import android.app.ActivityManager;
-import android.app.IActivityManager;
-import android.graphics.Rect;
-import android.os.Handler;
-import android.os.RemoteException;
-import android.util.Log;
-import android.view.animation.Interpolator;
-import android.view.animation.PathInterpolator;
-
-/**
- * A helper to animate the PIP.
- */
-public class PipMotionHelper {
-
-    private static final String TAG = "PipMotionHelper";
-
-    private static final RectEvaluator RECT_EVALUATOR = new RectEvaluator(new Rect());
-    private static final Interpolator FAST_OUT_SLOW_IN = new PathInterpolator(0.4f, 0f, 0.2f, 1f);
-    private static final int DEFAULT_DURATION = 225;
-
-    private IActivityManager mActivityManager;
-    private Handler mHandler;
-
-    public PipMotionHelper(Handler handler) {
-        mHandler = handler;
-    }
-
-    /**
-     * Moves the PIP to give given {@param bounds}.
-     */
-    public void resizeToBounds(Rect toBounds) {
-        mHandler.post(() -> {
-            if (mActivityManager == null) {
-                mActivityManager = ActivityManager.getService();
-            }
-            try {
-                mActivityManager.resizePinnedStack(toBounds, null /* tempPinnedTaskBounds */);
-            } catch (RemoteException e) {
-                Log.e(TAG, "Could not move pinned stack to bounds: " + toBounds, e);
-            }
-        });
-    }
-
-    /**
-     * Creates an animation to move the PIP to give given {@param toBounds} with the default
-     * animation properties.
-     */
-    public ValueAnimator createAnimationToBounds(Rect fromBounds, Rect toBounds) {
-        return createAnimationToBounds(fromBounds, toBounds, DEFAULT_DURATION, FAST_OUT_SLOW_IN,
-                null);
-    }
-
-    /**
-     * Creates an animation to move the PIP to give given {@param toBounds}.
-     */
-    public ValueAnimator createAnimationToBounds(Rect fromBounds, Rect toBounds, int duration,
-            Interpolator interpolator, ValueAnimator.AnimatorUpdateListener updateListener) {
-        ValueAnimator anim = ValueAnimator.ofObject(RECT_EVALUATOR, fromBounds, toBounds);
-        anim.setDuration(duration);
-        anim.setInterpolator(interpolator);
-        anim.addUpdateListener((ValueAnimator animation) -> {
-            resizeToBounds((Rect) animation.getAnimatedValue());
-        });
-        if (updateListener != null) {
-            anim.addUpdateListener(updateListener);
-        }
-        return anim;
-    }
-
-
-}
diff --git a/core/java/com/android/internal/policy/PipSnapAlgorithm.java b/core/java/com/android/internal/policy/PipSnapAlgorithm.java
index ec92aa9..040f150 100644
--- a/core/java/com/android/internal/policy/PipSnapAlgorithm.java
+++ b/core/java/com/android/internal/policy/PipSnapAlgorithm.java
@@ -25,6 +25,7 @@
 import android.view.ViewConfiguration;
 import android.widget.Scroller;
 
+import java.io.PrintWriter;
 import java.util.ArrayList;
 
 /**
@@ -84,13 +85,6 @@
     }
 
     /**
-     * Enables snapping to the closest edge.
-     */
-    public void setSnapToEdge(boolean snapToEdge) {
-        mSnapMode = snapToEdge ? SNAP_MODE_EDGE : mDefaultSnapMode;
-    }
-
-    /**
      * @return the closest absolute snap stack bounds for the given {@param stackBounds} moving at
      * the given {@param velocityX} and {@param velocityY}.  The {@param movementBounds} should be
      * those for the given {@param stackBounds}.
@@ -233,6 +227,21 @@
     }
 
     /**
+     * Adjusts {@param movementBoundsOut} so that it is the movement bounds for the given
+     * {@param stackBounds}.
+     */
+    public void getMovementBounds(Rect stackBounds, Rect insetBounds, Rect movementBoundsOut,
+            int imeHeight) {
+        // Adjust the right/bottom to ensure the stack bounds never goes offscreen
+        movementBoundsOut.set(insetBounds);
+        movementBoundsOut.right = Math.max(insetBounds.left, insetBounds.right -
+                stackBounds.width());
+        movementBoundsOut.bottom = Math.max(insetBounds.top, insetBounds.bottom -
+                stackBounds.height());
+        movementBoundsOut.bottom -= imeHeight;
+    }
+
+    /**
      * @return the closest point in {@param points} to the given {@param x} and {@param y}.
      */
     private Point findClosestPoint(int x, int y, Point[] points) {
@@ -314,4 +323,13 @@
                 break;
         }
     }
+
+    public void dump(PrintWriter pw, String prefix) {
+        final String innerPrefix = prefix + "  ";
+        pw.println(prefix + PipSnapAlgorithm.class.getSimpleName());
+        pw.println(innerPrefix + "mSnapMode=" + mSnapMode);
+        pw.println(innerPrefix + "mOrientation=" + mOrientation);
+        pw.println(innerPrefix + "mMinimizedVisibleSize=" + mMinimizedVisibleSize);
+        pw.println(innerPrefix + "mIsMinimized=" + mIsMinimized);
+    }
 }
diff --git a/core/java/com/android/internal/statusbar/IStatusBar.aidl b/core/java/com/android/internal/statusbar/IStatusBar.aidl
index 20f10b3..9cbbc5a 100644
--- a/core/java/com/android/internal/statusbar/IStatusBar.aidl
+++ b/core/java/com/android/internal/statusbar/IStatusBar.aidl
@@ -53,9 +53,6 @@
     void setImeWindowStatus(in IBinder token, int vis, int backDisposition,
             boolean showImeSwitcher);
     void setWindowState(int window, int state);
-    void buzzBeepBlinked();
-    void notificationLightOff();
-    void notificationLightPulse(int argb, int millisOn, int millisOff);
 
     void showRecentApps(boolean triggeredFromAltTab, boolean fromHome);
     void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey);
diff --git a/core/java/com/android/internal/textservice/ISpellCheckerService.aidl b/core/java/com/android/internal/textservice/ISpellCheckerService.aidl
index 67d7b3e..6a25964 100644
--- a/core/java/com/android/internal/textservice/ISpellCheckerService.aidl
+++ b/core/java/com/android/internal/textservice/ISpellCheckerService.aidl
@@ -16,16 +16,32 @@
 
 package com.android.internal.textservice;
 
+import com.android.internal.textservice.ISpellCheckerServiceCallback;
 import com.android.internal.textservice.ISpellCheckerSession;
 import com.android.internal.textservice.ISpellCheckerSessionListener;
 
 import android.os.Bundle;
 
 /**
- * Public interface to the global spell checker.
+ * IPC channels from TextServicesManagerService to SpellCheckerService.
  * @hide
  */
-interface ISpellCheckerService {
-    ISpellCheckerSession getISpellCheckerSession(
-            String locale, ISpellCheckerSessionListener listener, in Bundle bundle);
+oneway interface ISpellCheckerService {
+    /**
+     * Called from the system when an application is requesting a new spell checker session.
+     *
+     * <p>Note: This is an internal protocol used by the system to establish spell checker sessions,
+     * which is not guaranteed to be stable and is subject to change.</p>
+     *
+     * @param locale locale to be returned from
+     *               {@link android.service.textservice.SpellCheckerService.Session#getLocale()}
+     * @param listener IPC channel object to be used to implement
+     *                 {@link android.service.textservice.SpellCheckerService.Session#onGetSuggestionsMultiple(TextInfo[], int, boolean)} and
+     *                 {@link android.service.textservice.SpellCheckerService.Session#onGetSuggestions(TextInfo, int)}
+     * @param bundle bundle to be returned from {@link android.service.textservice.SpellCheckerService.Session#getBundle()}
+     * @param callback IPC channel to return the result to the caller in an asynchronous manner
+     */
+    void getISpellCheckerSession(
+            String locale, ISpellCheckerSessionListener listener, in Bundle bundle,
+            ISpellCheckerServiceCallback callback);
 }
diff --git a/core/java/com/android/internal/textservice/ISpellCheckerServiceCallback.aidl b/core/java/com/android/internal/textservice/ISpellCheckerServiceCallback.aidl
new file mode 100644
index 0000000..e716cc1
--- /dev/null
+++ b/core/java/com/android/internal/textservice/ISpellCheckerServiceCallback.aidl
@@ -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.
+ */
+
+package com.android.internal.textservice;
+
+import com.android.internal.textservice.ISpellCheckerSession;
+import com.android.internal.textservice.ISpellCheckerSessionListener;
+
+import android.os.Bundle;
+
+/**
+ * IPC channels from SpellCheckerService to TextServicesManagerService.
+ * @hide
+ */
+oneway interface ISpellCheckerServiceCallback {
+    // TODO: Currently SpellCheckerSession just ignores null newSession and continues waiting for
+    // the next onSessionCreated with non-null newSession, which is supposed to never happen if
+    // the system is working normally. We should at least free up resources in SpellCheckerSession.
+    // Note: This method is called from non-system processes, in theory we cannot assume that
+    // this method is always be called only once with non-null value.
+    void onSessionCreated(ISpellCheckerSession newSession);
+}
diff --git a/core/java/com/android/internal/textservice/ITextServicesSessionListener.aidl b/core/java/com/android/internal/textservice/ITextServicesSessionListener.aidl
index ecb6cd0..08d2a5d 100644
--- a/core/java/com/android/internal/textservice/ITextServicesSessionListener.aidl
+++ b/core/java/com/android/internal/textservice/ITextServicesSessionListener.aidl
@@ -21,7 +21,7 @@
 import android.view.textservice.SpellCheckerInfo;
 
 /**
- * Interface to the text service session.
+ * (Per-session) IPC channels from TextServicesManagerService to spell checker client applications.
  * @hide
  */
 interface ITextServicesSessionListener {
diff --git a/core/java/com/android/internal/util/ArrayUtils.java b/core/java/com/android/internal/util/ArrayUtils.java
index a9a6364..cb3a250 100644
--- a/core/java/com/android/internal/util/ArrayUtils.java
+++ b/core/java/com/android/internal/util/ArrayUtils.java
@@ -435,10 +435,6 @@
         }
     }
 
-    public static <T> boolean contains(@Nullable ArraySet<T> cur, T val) {
-        return (cur != null) ? cur.contains(val) : false;
-    }
-
     public static @NonNull <T> ArrayList<T> add(@Nullable ArrayList<T> cur, T val) {
         if (cur == null) {
             cur = new ArrayList<>();
@@ -459,6 +455,16 @@
         }
     }
 
+    /**
+     * Returns the given list, or an immutable empty list if the provided list is null
+     *
+     * @see Collections#emptyList
+     */
+
+    public static @NonNull <T> List<T> emptyIfNull(@Nullable List<T> cur) {
+        return cur == null ? Collections.emptyList() : cur;
+    }
+
     public static <T> boolean contains(@Nullable Collection<T> cur, T val) {
         return (cur != null) ? cur.contains(val) : false;
     }
diff --git a/core/java/com/android/internal/util/MessageUtils.java b/core/java/com/android/internal/util/MessageUtils.java
index 184245e..e733c30 100644
--- a/core/java/com/android/internal/util/MessageUtils.java
+++ b/core/java/com/android/internal/util/MessageUtils.java
@@ -42,10 +42,11 @@
 
     /**
      * Finds the names of integer constants. Searches the specified {@code classes}, looking for
-     * accessible static integer fields whose names begin with one of the specified {@prefixes}.
+     * accessible static integer fields whose names begin with one of the specified
+     * {@code prefixes}.
      *
      * @param classes the classes to examine.
-     * @prefixes only consider fields names starting with one of these prefixes.
+     * @param prefixes only consider fields names starting with one of these prefixes.
      * @return a {@link SparseArray} mapping integer constants to their names.
      */
     public static SparseArray<String> findMessageNames(Class[] classes, String[] prefixes) {
@@ -122,7 +123,6 @@
      * accessible static integer values whose names begin with {@link #DEFAULT_PREFIXES}.
      *
      * @param classNames the classes to examine.
-     * @prefixes only consider fields names starting with one of these prefixes.
      * @return a {@link SparseArray} mapping integer constants to their names.
      */
     public static SparseArray<String> findMessageNames(Class[] classNames) {
diff --git a/core/java/com/android/internal/util/NotificationColorUtil.java b/core/java/com/android/internal/util/NotificationColorUtil.java
index 0fe580a..44b21b4 100644
--- a/core/java/com/android/internal/util/NotificationColorUtil.java
+++ b/core/java/com/android/internal/util/NotificationColorUtil.java
@@ -303,17 +303,17 @@
             return color;
         }
 
-        double[] lab = new double[3];
-        ColorUtilsFromCompat.colorToLAB(findFg ? fg : bg, lab);
+        float[] hsl = new float[3];
+        ColorUtilsFromCompat.colorToHSL(findFg ? fg : bg, hsl);
 
-        double low = lab[0], high = 100;
-        final double a = lab[1], b = lab[2];
+        float low = hsl[2], high = 1;
         for (int i = 0; i < 15 && high - low > 0.00001; i++) {
-            final double l = (low + high) / 2;
+            final float l = (low + high) / 2;
+            hsl[2] = l;
             if (findFg) {
-                fg = ColorUtilsFromCompat.LABToColor(l, a, b);
+                fg = ColorUtilsFromCompat.HSLToColor(hsl);
             } else {
-                bg = ColorUtilsFromCompat.LABToColor(l, a, b);
+                bg = ColorUtilsFromCompat.HSLToColor(hsl);
             }
             if (ColorUtilsFromCompat.calculateContrast(fg, bg) > minRatio) {
                 high = l;
@@ -321,7 +321,7 @@
                 low = l;
             }
         }
-        return ColorUtilsFromCompat.LABToColor(high, a, b);
+        return findFg ? fg : bg;
     }
 
     public static int ensureTextContrastOnBlack(int color) {
@@ -456,7 +456,10 @@
         }
     }
 
-    public static int resolveActionBarColor(int backgroundColor) {
+    public static int resolveActionBarColor(Context context, int backgroundColor) {
+        if (backgroundColor == Notification.COLOR_DEFAULT) {
+            return context.getColor(com.android.internal.R.color.notification_action_list);
+        }
         boolean useDark = shouldUseDark(backgroundColor);
         final double[] result = ColorUtilsFromCompat.getTempDouble3Array();
         ColorUtilsFromCompat.colorToLAB(backgroundColor, result);
@@ -764,6 +767,10 @@
             return amount < low ? low : (amount > high ? high : amount);
         }
 
+        private static float constrain(float amount, float low, float high) {
+            return amount < low ? low : (amount > high ? high : amount);
+        }
+
         private static double pivotXyzComponent(double component) {
             return component > XYZ_EPSILON
                     ? Math.pow(component, 1 / 3.0)
@@ -779,5 +786,139 @@
             return result;
         }
 
+        /**
+         * Convert HSL (hue-saturation-lightness) components to a RGB color.
+         * <ul>
+         * <li>hsl[0] is Hue [0 .. 360)</li>
+         * <li>hsl[1] is Saturation [0...1]</li>
+         * <li>hsl[2] is Lightness [0...1]</li>
+         * </ul>
+         * If hsv values are out of range, they are pinned.
+         *
+         * @param hsl 3-element array which holds the input HSL components
+         * @return the resulting RGB color
+         */
+        @ColorInt
+        public static int HSLToColor(@NonNull float[] hsl) {
+            final float h = hsl[0];
+            final float s = hsl[1];
+            final float l = hsl[2];
+
+            final float c = (1f - Math.abs(2 * l - 1f)) * s;
+            final float m = l - 0.5f * c;
+            final float x = c * (1f - Math.abs((h / 60f % 2f) - 1f));
+
+            final int hueSegment = (int) h / 60;
+
+            int r = 0, g = 0, b = 0;
+
+            switch (hueSegment) {
+                case 0:
+                    r = Math.round(255 * (c + m));
+                    g = Math.round(255 * (x + m));
+                    b = Math.round(255 * m);
+                    break;
+                case 1:
+                    r = Math.round(255 * (x + m));
+                    g = Math.round(255 * (c + m));
+                    b = Math.round(255 * m);
+                    break;
+                case 2:
+                    r = Math.round(255 * m);
+                    g = Math.round(255 * (c + m));
+                    b = Math.round(255 * (x + m));
+                    break;
+                case 3:
+                    r = Math.round(255 * m);
+                    g = Math.round(255 * (x + m));
+                    b = Math.round(255 * (c + m));
+                    break;
+                case 4:
+                    r = Math.round(255 * (x + m));
+                    g = Math.round(255 * m);
+                    b = Math.round(255 * (c + m));
+                    break;
+                case 5:
+                case 6:
+                    r = Math.round(255 * (c + m));
+                    g = Math.round(255 * m);
+                    b = Math.round(255 * (x + m));
+                    break;
+            }
+
+            r = constrain(r, 0, 255);
+            g = constrain(g, 0, 255);
+            b = constrain(b, 0, 255);
+
+            return Color.rgb(r, g, b);
+        }
+
+        /**
+         * Convert the ARGB color to its HSL (hue-saturation-lightness) components.
+         * <ul>
+         * <li>outHsl[0] is Hue [0 .. 360)</li>
+         * <li>outHsl[1] is Saturation [0...1]</li>
+         * <li>outHsl[2] is Lightness [0...1]</li>
+         * </ul>
+         *
+         * @param color  the ARGB color to convert. The alpha component is ignored
+         * @param outHsl 3-element array which holds the resulting HSL components
+         */
+        public static void colorToHSL(@ColorInt int color, @NonNull float[] outHsl) {
+            RGBToHSL(Color.red(color), Color.green(color), Color.blue(color), outHsl);
+        }
+
+        /**
+         * Convert RGB components to HSL (hue-saturation-lightness).
+         * <ul>
+         * <li>outHsl[0] is Hue [0 .. 360)</li>
+         * <li>outHsl[1] is Saturation [0...1]</li>
+         * <li>outHsl[2] is Lightness [0...1]</li>
+         * </ul>
+         *
+         * @param r      red component value [0..255]
+         * @param g      green component value [0..255]
+         * @param b      blue component value [0..255]
+         * @param outHsl 3-element array which holds the resulting HSL components
+         */
+        public static void RGBToHSL(@IntRange(from = 0x0, to = 0xFF) int r,
+                @IntRange(from = 0x0, to = 0xFF) int g, @IntRange(from = 0x0, to = 0xFF) int b,
+                @NonNull float[] outHsl) {
+            final float rf = r / 255f;
+            final float gf = g / 255f;
+            final float bf = b / 255f;
+
+            final float max = Math.max(rf, Math.max(gf, bf));
+            final float min = Math.min(rf, Math.min(gf, bf));
+            final float deltaMaxMin = max - min;
+
+            float h, s;
+            float l = (max + min) / 2f;
+
+            if (max == min) {
+                // Monochromatic
+                h = s = 0f;
+            } else {
+                if (max == rf) {
+                    h = ((gf - bf) / deltaMaxMin) % 6f;
+                } else if (max == gf) {
+                    h = ((bf - rf) / deltaMaxMin) + 2f;
+                } else {
+                    h = ((rf - gf) / deltaMaxMin) + 4f;
+                }
+
+                s = deltaMaxMin / (1f - Math.abs(2f * l - 1f));
+            }
+
+            h = (h * 60f) % 360f;
+            if (h < 0) {
+                h += 360f;
+            }
+
+            outHsl[0] = constrain(h, 0f, 360f);
+            outHsl[1] = constrain(s, 0f, 1f);
+            outHsl[2] = constrain(l, 0f, 1f);
+        }
+
     }
 }
diff --git a/core/java/com/android/internal/util/NotificationMessagingUtil.java b/core/java/com/android/internal/util/NotificationMessagingUtil.java
new file mode 100644
index 0000000..518cf41
--- /dev/null
+++ b/core/java/com/android/internal/util/NotificationMessagingUtil.java
@@ -0,0 +1,93 @@
+/*
+ * 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.internal.util;
+
+import android.app.Notification;
+import android.app.NotificationManager;
+import android.content.Context;
+import android.database.ContentObserver;
+import android.net.Uri;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.UserHandle;
+import android.provider.Settings;
+import android.service.notification.StatusBarNotification;
+import android.text.TextUtils;
+import android.util.ArrayMap;
+
+import java.util.Objects;
+
+/**
+ * A util to look up messaging related functions for notifications. This is used for both the
+ * ranking and the actual layout.
+ */
+public class NotificationMessagingUtil {
+
+    private static final String DEFAULT_SMS_APP_SETTING = Settings.Secure.SMS_DEFAULT_APPLICATION;
+    private final Context mContext;
+    private ArrayMap<Integer, String> mDefaultSmsApp = new ArrayMap<>();
+
+    public NotificationMessagingUtil(Context context) {
+        mContext = context;
+        mContext.getContentResolver().registerContentObserver(
+                Settings.Secure.getUriFor(DEFAULT_SMS_APP_SETTING), false, mSmsContentObserver);
+    }
+
+    @SuppressWarnings("deprecation")
+    private boolean isDefaultMessagingApp(StatusBarNotification sbn) {
+        final int userId = sbn.getUserId();
+        if (userId == UserHandle.USER_NULL || userId == UserHandle.USER_ALL) return false;
+        if (mDefaultSmsApp.get(userId) == null) {
+            cacheDefaultSmsApp(userId);
+        }
+        return Objects.equals(mDefaultSmsApp.get(userId), sbn.getPackageName());
+    }
+
+    private void cacheDefaultSmsApp(int userId) {
+        mDefaultSmsApp.put(userId, Settings.Secure.getStringForUser(
+                mContext.getContentResolver(),
+                Settings.Secure.SMS_DEFAULT_APPLICATION, userId));
+    }
+
+    private final ContentObserver mSmsContentObserver = new ContentObserver(
+            new Handler(Looper.getMainLooper())) {
+        @Override
+        public void onChange(boolean selfChange, Uri uri, int userId) {
+            if (Settings.Secure.getUriFor(DEFAULT_SMS_APP_SETTING).equals(uri)) {
+                cacheDefaultSmsApp(userId);
+            }
+        }
+    };
+
+    public boolean isImportantMessaging(StatusBarNotification sbn, int importance) {
+        if (importance < NotificationManager.IMPORTANCE_LOW) {
+            return false;
+        }
+
+        Class<? extends Notification.Style> style = sbn.getNotification().getNotificationStyle();
+        if (Notification.MessagingStyle.class.equals(style)) {
+            return true;
+        }
+
+        if (Notification.CATEGORY_MESSAGE.equals(sbn.getNotification().category)
+                && isDefaultMessagingApp(sbn)) {
+            return true;
+        }
+
+        return false;
+    }
+}
diff --git a/core/java/android/service/autofill/CallbackHelper.java b/core/java/com/android/internal/util/ObjectUtils.java
similarity index 65%
copy from core/java/android/service/autofill/CallbackHelper.java
copy to core/java/com/android/internal/util/ObjectUtils.java
index ded8f97..d109a5a 100644
--- a/core/java/android/service/autofill/CallbackHelper.java
+++ b/core/java/com/android/internal/util/ObjectUtils.java
@@ -13,18 +13,19 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package android.service.autofill;
 
-import java.io.PrintWriter;
 
-final class CallbackHelper {
+package com.android.internal.util;
 
-    static interface Dumpable {
-        void dump(String prefix, PrintWriter pw);
-        void setFinalizer(Finalizer f);
-    }
+import android.annotation.NonNull;
+import android.annotation.Nullable;
 
-    static interface Finalizer {
-        void gone();
+/** @hide */
+public class ObjectUtils {
+    private ObjectUtils() {}
+
+    @NonNull
+    public static <T> T firstNotNull(@Nullable T a, @NonNull T b) {
+        return a != null ? a : Preconditions.checkNotNull(b);
     }
 }
diff --git a/core/java/com/android/internal/view/IInputConnectionWrapper.java b/core/java/com/android/internal/view/IInputConnectionWrapper.java
index 0185e30..555263d 100644
--- a/core/java/com/android/internal/view/IInputConnectionWrapper.java
+++ b/core/java/com/android/internal/view/IInputConnectionWrapper.java
@@ -17,6 +17,7 @@
 package com.android.internal.view;
 
 import com.android.internal.annotations.GuardedBy;
+import com.android.internal.os.SomeArgs;
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
@@ -36,7 +37,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 +59,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,16 +74,7 @@
     private Object mLock = new Object();
     @GuardedBy("mLock")
     private boolean mFinished = false;
-    @GuardedBy("mLock")
-    private String mInputMethodId;
 
-    static class SomeArgs {
-        Object arg1;
-        Object arg2;
-        IInputContextCallback callback;
-        int seq;
-    }
-    
     class MyHandler extends Handler {
         MyHandler(Looper looper) {
             super(looper);
@@ -113,18 +105,6 @@
         }
     }
 
-    public String getInputMethodId() {
-        synchronized (mLock) {
-            return mInputMethodId;
-        }
-    }
-
-    public void setInputMethodId(final String inputMethodId) {
-        synchronized (mLock) {
-            mInputMethodId = inputMethodId;
-        }
-    }
-
     abstract protected boolean isActive();
 
     /**
@@ -133,14 +113,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 +197,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));
     }
@@ -267,80 +235,100 @@
             case DO_GET_TEXT_AFTER_CURSOR: {
                 SomeArgs args = (SomeArgs)msg.obj;
                 try {
+                    final IInputContextCallback callback = (IInputContextCallback) args.arg6;
+                    final int callbackSeq = args.argi6;
                     InputConnection ic = getInputConnection();
                     if (ic == null || !isActive()) {
                         Log.w(TAG, "getTextAfterCursor on inactive InputConnection");
-                        args.callback.setTextAfterCursor(null, args.seq);
+                        callback.setTextAfterCursor(null, callbackSeq);
                         return;
                     }
-                    args.callback.setTextAfterCursor(ic.getTextAfterCursor(
-                            msg.arg1, msg.arg2), args.seq);
+                    callback.setTextAfterCursor(ic.getTextAfterCursor(
+                            msg.arg1, msg.arg2), callbackSeq);
                 } catch (RemoteException e) {
                     Log.w(TAG, "Got RemoteException calling setTextAfterCursor", e);
+                } finally {
+                    args.recycle();
                 }
                 return;
             }
             case DO_GET_TEXT_BEFORE_CURSOR: {
                 SomeArgs args = (SomeArgs)msg.obj;
                 try {
+                    final IInputContextCallback callback = (IInputContextCallback) args.arg6;
+                    final int callbackSeq = args.argi6;
                     InputConnection ic = getInputConnection();
                     if (ic == null || !isActive()) {
                         Log.w(TAG, "getTextBeforeCursor on inactive InputConnection");
-                        args.callback.setTextBeforeCursor(null, args.seq);
+                        callback.setTextBeforeCursor(null, callbackSeq);
                         return;
                     }
-                    args.callback.setTextBeforeCursor(ic.getTextBeforeCursor(
-                            msg.arg1, msg.arg2), args.seq);
+                    callback.setTextBeforeCursor(ic.getTextBeforeCursor(
+                            msg.arg1, msg.arg2), callbackSeq);
                 } catch (RemoteException e) {
                     Log.w(TAG, "Got RemoteException calling setTextBeforeCursor", e);
+                } finally {
+                    args.recycle();
                 }
                 return;
             }
             case DO_GET_SELECTED_TEXT: {
                 SomeArgs args = (SomeArgs)msg.obj;
                 try {
+                    final IInputContextCallback callback = (IInputContextCallback) args.arg6;
+                    final int callbackSeq = args.argi6;
                     InputConnection ic = getInputConnection();
                     if (ic == null || !isActive()) {
                         Log.w(TAG, "getSelectedText on inactive InputConnection");
-                        args.callback.setSelectedText(null, args.seq);
+                        callback.setSelectedText(null, callbackSeq);
                         return;
                     }
-                    args.callback.setSelectedText(ic.getSelectedText(
-                            msg.arg1), args.seq);
+                    callback.setSelectedText(ic.getSelectedText(
+                            msg.arg1), callbackSeq);
                 } catch (RemoteException e) {
                     Log.w(TAG, "Got RemoteException calling setSelectedText", e);
+                } finally {
+                    args.recycle();
                 }
                 return;
             }
             case DO_GET_CURSOR_CAPS_MODE: {
                 SomeArgs args = (SomeArgs)msg.obj;
                 try {
+                    final IInputContextCallback callback = (IInputContextCallback) args.arg6;
+                    final int callbackSeq = args.argi6;
                     InputConnection ic = getInputConnection();
                     if (ic == null || !isActive()) {
                         Log.w(TAG, "getCursorCapsMode on inactive InputConnection");
-                        args.callback.setCursorCapsMode(0, args.seq);
+                        callback.setCursorCapsMode(0, callbackSeq);
                         return;
                     }
-                    args.callback.setCursorCapsMode(ic.getCursorCapsMode(msg.arg1),
-                            args.seq);
+                    callback.setCursorCapsMode(ic.getCursorCapsMode(msg.arg1),
+                            callbackSeq);
                 } catch (RemoteException e) {
                     Log.w(TAG, "Got RemoteException calling setCursorCapsMode", e);
+                } finally {
+                    args.recycle();
                 }
                 return;
             }
             case DO_GET_EXTRACTED_TEXT: {
                 SomeArgs args = (SomeArgs)msg.obj;
                 try {
+                    final IInputContextCallback callback = (IInputContextCallback) args.arg6;
+                    final int callbackSeq = args.argi6;
                     InputConnection ic = getInputConnection();
                     if (ic == null || !isActive()) {
                         Log.w(TAG, "getExtractedText on inactive InputConnection");
-                        args.callback.setExtractedText(null, args.seq);
+                        callback.setExtractedText(null, callbackSeq);
                         return;
                     }
-                    args.callback.setExtractedText(ic.getExtractedText(
-                            (ExtractedTextRequest)args.arg1, msg.arg1), args.seq);
+                    callback.setExtractedText(ic.getExtractedText(
+                            (ExtractedTextRequest)args.arg1, msg.arg1), callbackSeq);
                 } catch (RemoteException e) {
                     Log.w(TAG, "Got RemoteException calling setExtractedText", e);
+                } finally {
+                    args.recycle();
                 }
                 return;
             }
@@ -419,6 +407,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,47 +482,38 @@
                 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()) {
-                    Log.w(TAG, "performPrivateCommand on inactive InputConnection");
-                    return;
+                final SomeArgs args = (SomeArgs) msg.obj;
+                try {
+                    final String action = (String) args.arg1;
+                    final Bundle data = (Bundle) args.arg2;
+                    InputConnection ic = getInputConnection();
+                    if (ic == null || !isActive()) {
+                        Log.w(TAG, "performPrivateCommand on inactive InputConnection");
+                        return;
+                    }
+                    ic.performPrivateCommand(action, data);
+                } finally {
+                    args.recycle();
                 }
-                SomeArgs args = (SomeArgs)msg.obj;
-                ic.performPrivateCommand((String)args.arg1,
-                        (Bundle)args.arg2);
-                return;
             }
             case DO_REQUEST_UPDATE_CURSOR_ANCHOR_INFO: {
                 SomeArgs args = (SomeArgs)msg.obj;
                 try {
+                    final IInputContextCallback callback = (IInputContextCallback) args.arg6;
+                    final int callbackSeq = args.argi6;
                     InputConnection ic = getInputConnection();
                     if (ic == null || !isActive()) {
                         Log.w(TAG, "requestCursorAnchorInfo on inactive InputConnection");
-                        args.callback.setRequestUpdateCursorAnchorInfoResult(false, args.seq);
+                        callback.setRequestUpdateCursorAnchorInfoResult(false, callbackSeq);
                         return;
                     }
-                    args.callback.setRequestUpdateCursorAnchorInfoResult(
-                            ic.requestCursorUpdates(msg.arg1), args.seq);
+                    callback.setRequestUpdateCursorAnchorInfoResult(
+                            ic.requestCursorUpdates(msg.arg1), callbackSeq);
                 } catch (RemoteException e) {
                     Log.w(TAG, "Got RemoteException calling requestCursorAnchorInfo", e);
+                } finally {
+                    args.recycle();
                 }
                 return;
             }
@@ -564,35 +551,39 @@
                 final int flags = msg.arg1;
                 SomeArgs args = (SomeArgs) msg.obj;
                 try {
+                    final IInputContextCallback callback = (IInputContextCallback) args.arg6;
+                    final int callbackSeq = args.argi6;
                     InputConnection ic = getInputConnection();
                     if (ic == null || !isActive()) {
                         Log.w(TAG, "commitContent on inactive InputConnection");
-                        args.callback.setCommitContentResult(false, args.seq);
+                        callback.setCommitContentResult(false, callbackSeq);
                         return;
                     }
                     final InputContentInfo inputContentInfo = (InputContentInfo) args.arg1;
                     if (inputContentInfo == null || !inputContentInfo.validate()) {
                         Log.w(TAG, "commitContent with invalid inputContentInfo="
                                 + inputContentInfo);
-                        args.callback.setCommitContentResult(false, args.seq);
+                        callback.setCommitContentResult(false, callbackSeq);
                         return;
                     }
                     final boolean result =
                             ic.commitContent(inputContentInfo, flags, (Bundle) args.arg2);
-                    args.callback.setCommitContentResult(result, args.seq);
+                    callback.setCommitContentResult(result, callbackSeq);
                 } catch (RemoteException e) {
                     Log.w(TAG, "Got RemoteException calling commitContent", e);
+                } finally {
+                    args.recycle();
                 }
                 return;
             }
         }
         Log.w(TAG, "Unhandled message code: " + msg.what);
     }
-    
+
     Message obtainMessage(int what) {
         return mH.obtainMessage(what);
     }
-    
+
     Message obtainMessageII(int what, int arg1, int arg2) {
         return mH.obtainMessage(what, arg1, arg2);
     }
@@ -600,46 +591,47 @@
     Message obtainMessageO(int what, Object arg1) {
         return mH.obtainMessage(what, 0, 0, arg1);
     }
-    
-    Message obtainMessageISC(int what, int arg1, int seq, IInputContextCallback callback) {
-        SomeArgs args = new SomeArgs();
-        args.callback = callback;
-        args.seq = seq;
+
+    Message obtainMessageISC(int what, int arg1, int callbackSeq, IInputContextCallback callback) {
+        final SomeArgs args = SomeArgs.obtain();
+        args.arg6 = callback;
+        args.argi6 = callbackSeq;
         return mH.obtainMessage(what, arg1, 0, args);
     }
-    
-    Message obtainMessageIISC(int what, int arg1, int arg2, int seq, IInputContextCallback callback) {
-        SomeArgs args = new SomeArgs();
-        args.callback = callback;
-        args.seq = seq;
+
+    Message obtainMessageIISC(int what, int arg1, int arg2, int callbackSeq,
+            IInputContextCallback callback) {
+        final SomeArgs args = SomeArgs.obtain();
+        args.arg6 = callback;
+        args.argi6 = callbackSeq;
         return mH.obtainMessage(what, arg1, arg2, args);
     }
 
-    Message obtainMessageIOOSC(int what, int arg1, Object objArg1, Object objArg2, int seq,
+    Message obtainMessageIOOSC(int what, int arg1, Object objArg1, Object objArg2, int callbackSeq,
             IInputContextCallback callback) {
-        SomeArgs args = new SomeArgs();
+        final SomeArgs args = SomeArgs.obtain();
         args.arg1 = objArg1;
         args.arg2 = objArg2;
-        args.callback = callback;
-        args.seq = seq;
+        args.arg6 = callback;
+        args.argi6 = callbackSeq;
         return mH.obtainMessage(what, arg1, 0, args);
     }
 
-    Message obtainMessageIOSC(int what, int arg1, Object arg2, int seq,
+    Message obtainMessageIOSC(int what, int arg1, Object arg2, int callbackSeq,
             IInputContextCallback callback) {
-        SomeArgs args = new SomeArgs();
+        final SomeArgs args = SomeArgs.obtain();
         args.arg1 = arg2;
-        args.callback = callback;
-        args.seq = seq;
+        args.arg6 = callback;
+        args.argi6 = callbackSeq;
         return mH.obtainMessage(what, arg1, 0, args);
     }
-    
+
     Message obtainMessageIO(int what, int arg1, Object arg2) {
         return mH.obtainMessage(what, arg1, 0, arg2);
     }
-    
+
     Message obtainMessageOO(int what, Object arg1, Object arg2) {
-        SomeArgs args = new SomeArgs();
+        final SomeArgs args = SomeArgs.obtain();
         args.arg1 = arg1;
         args.arg2 = arg2;
         return mH.obtainMessage(what, 0, 0, args);
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..5b29f4c 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 IBinder startInputToken, 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..b979807 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,
@@ -70,7 +70,8 @@
     void hideMySoftInput(in IBinder token, int flags);
     void showMySoftInput(in IBinder token, int flags);
     void updateStatusIcon(in IBinder token, String packageName, int iconId);
-    void setImeWindowStatus(in IBinder token, int vis, int backDisposition);
+    void setImeWindowStatus(in IBinder token, in IBinder startInputToken, int vis,
+            int backDisposition);
     void registerSuggestionSpansForNotification(in SuggestionSpan[] spans);
     boolean notifySuggestionPicked(in SuggestionSpan span, String originalString, int index);
     InputMethodSubtype getCurrentInputMethodSubtype();
@@ -86,5 +87,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 c27e9aa..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;
 
@@ -32,13 +34,14 @@
     public static final int START_INPUT_REASON_UNBOUND_FROM_IMMS = 6;
     public static final int START_INPUT_REASON_ACTIVATED_BY_IMMS = 7;
     public static final int START_INPUT_REASON_DEACTIVATED_BY_IMMS = 8;
+    public static final int START_INPUT_REASON_SESSION_CREATED_BY_IME = 9;
 
     @Retention(SOURCE)
     @IntDef({START_INPUT_REASON_UNSPECIFIED, START_INPUT_REASON_WINDOW_FOCUS_GAIN,
             START_INPUT_REASON_WINDOW_FOCUS_GAIN_REPORT_ONLY,
             START_INPUT_REASON_APP_CALLED_RESTART_INPUT_API, START_INPUT_REASON_CHECK_FOCUS,
             START_INPUT_REASON_BOUND_TO_IMMS, START_INPUT_REASON_ACTIVATED_BY_IMMS,
-            START_INPUT_REASON_DEACTIVATED_BY_IMMS})
+            START_INPUT_REASON_DEACTIVATED_BY_IMMS, START_INPUT_REASON_SESSION_CREATED_BY_IME})
     public @interface StartInputReason {}
 
     public static String getStartInputReason(@StartInputReason final int reason) {
@@ -61,6 +64,8 @@
                 return "ACTIVATED_BY_IMMS";
             case START_INPUT_REASON_DEACTIVATED_BY_IMMS:
                 return "DEACTIVATED_BY_IMMS";
+            case START_INPUT_REASON_SESSION_CREATED_BY_IME:
+                return "SESSION_CREATED_BY_IME";
             default:
                 return "Unknown=" + reason;
         }
@@ -72,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) {
@@ -94,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/DrawingSpace.java b/core/java/com/android/internal/widget/DrawingSpace.java
deleted file mode 100644
index b8222db..0000000
--- a/core/java/com/android/internal/widget/DrawingSpace.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2015 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.internal.widget;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.view.View;
-
-/**
- * Implementation of {@link android.widget.Space} that uses normal View drawing
- * rather than a no-op. Useful for dialogs and other places where the base View
- * class is too greedy when measured with AT_MOST.
- */
-public final class DrawingSpace extends View {
-    public DrawingSpace(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
-        super(context, attrs, defStyleAttr, defStyleRes);
-    }
-
-    public DrawingSpace(Context context, AttributeSet attrs, int defStyleAttr) {
-        this(context, attrs, defStyleAttr, 0);
-    }
-
-    public DrawingSpace(Context context, AttributeSet attrs) {
-        this(context, attrs, 0);
-    }
-
-    public DrawingSpace(Context context) {
-        this(context, null);
-    }
-
-    /**
-     * Compare to: {@link View#getDefaultSize(int, int)}
-     * <p>
-     * If mode is AT_MOST, return the child size instead of the parent size
-     * (unless it is too big).
-     */
-    private static int getDefaultSizeNonGreedy(int size, int measureSpec) {
-        int result = size;
-        int specMode = MeasureSpec.getMode(measureSpec);
-        int specSize = MeasureSpec.getSize(measureSpec);
-
-        switch (specMode) {
-            case MeasureSpec.UNSPECIFIED:
-                result = size;
-                break;
-            case MeasureSpec.AT_MOST:
-                result = Math.min(size, specSize);
-                break;
-            case MeasureSpec.EXACTLY:
-                result = specSize;
-                break;
-        }
-        return result;
-    }
-
-    @Override
-    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
-        setMeasuredDimension(
-                getDefaultSizeNonGreedy(getSuggestedMinimumWidth(), widthMeasureSpec),
-                getDefaultSizeNonGreedy(getSuggestedMinimumHeight(), heightMeasureSpec));
-    }
-}
diff --git a/core/java/com/android/internal/widget/FloatingToolbar.java b/core/java/com/android/internal/widget/FloatingToolbar.java
index 58e694a..854d013 100644
--- a/core/java/com/android/internal/widget/FloatingToolbar.java
+++ b/core/java/com/android/internal/widget/FloatingToolbar.java
@@ -32,6 +32,7 @@
 import android.graphics.drawable.Drawable;
 import android.text.TextUtils;
 import android.util.Size;
+import android.util.TypedValue;
 import android.view.ContextThemeWrapper;
 import android.view.Gravity;
 import android.view.LayoutInflater;
@@ -1113,6 +1114,7 @@
             mMainPanel.removeAllViews();
             mMainPanel.setPaddingRelative(0, 0, 0, 0);
 
+            int lastGroupId = -1;
             boolean isFirstItem = true;
             while (!remainingMenuItems.isEmpty()) {
                 final MenuItem menuItem = remainingMenuItems.peek();
@@ -1125,11 +1127,11 @@
                             menuItemButton.getPaddingTop(),
                             menuItemButton.getPaddingEnd(),
                             menuItemButton.getPaddingBottom());
-                    isFirstItem = false;
                 }
 
                 // Adding additional end padding for the last button to even out button spacing.
-                if (remainingMenuItems.size() == 1) {
+                boolean isLastItem = remainingMenuItems.size() == 1;
+                if (isLastItem) {
                     menuItemButton.setPaddingRelative(
                             menuItemButton.getPaddingStart(),
                             menuItemButton.getPaddingTop(),
@@ -1138,25 +1140,64 @@
                 }
 
                 menuItemButton.measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED);
-                int menuItemButtonWidth = Math.min(menuItemButton.getMeasuredWidth(), toolbarWidth);
+                final int menuItemButtonWidth = Math.min(menuItemButton.getMeasuredWidth(), toolbarWidth);
+
+                final boolean isNewGroup = !isFirstItem && lastGroupId != menuItem.getGroupId();
+                final int extraPadding = isNewGroup ? menuItemButton.getPaddingEnd() * 2 : 0;
+
                 // Check if we can fit an item while reserving space for the overflowButton.
                 boolean canFitWithOverflow =
-                        menuItemButtonWidth <= availableWidth - mOverflowButtonSize.getWidth();
+                        menuItemButtonWidth <=
+                                availableWidth - mOverflowButtonSize.getWidth() - extraPadding;
                 boolean canFitNoOverflow =
-                        remainingMenuItems.size() == 1 && menuItemButtonWidth <= availableWidth;
+                        isLastItem && menuItemButtonWidth <= availableWidth - extraPadding;
                 if (canFitWithOverflow || canFitNoOverflow) {
+                    if (isNewGroup) {
+                        final View border = createBorder(mContext);
+                        final int borderWidth = border.getLayoutParams().width;
+
+                        // Add extra padding to the end of the previous button.
+                        // Half of the extra padding (less borderWidth) goes to the previous button.
+                        View previousButton = mMainPanel.getChildAt(mMainPanel.getChildCount() - 1);
+                        final int prevPaddingEnd = previousButton.getPaddingEnd()
+                                + extraPadding / 2 - borderWidth;
+                        previousButton.setPaddingRelative(
+                                previousButton.getPaddingStart(),
+                                previousButton.getPaddingTop(),
+                                prevPaddingEnd,
+                                previousButton.getPaddingBottom());
+                        final ViewGroup.LayoutParams prevParams = previousButton.getLayoutParams();
+                        prevParams.width += extraPadding / 2 - borderWidth;
+                        previousButton.setLayoutParams(prevParams);
+
+                        // Add extra padding to the start of this button.
+                        // Other half of the extra padding goes to this button.
+                        final int paddingStart = menuItemButton.getPaddingStart()
+                                + extraPadding / 2;
+                        menuItemButton.setPaddingRelative(
+                                paddingStart,
+                                menuItemButton.getPaddingTop(),
+                                menuItemButton.getPaddingEnd(),
+                                menuItemButton.getPaddingBottom());
+
+                        // Include a border.
+                        mMainPanel.addView(border);
+                    }
+
                     setButtonTagAndClickListener(menuItemButton, menuItem);
                     mMainPanel.addView(menuItemButton);
-                    ViewGroup.LayoutParams params = menuItemButton.getLayoutParams();
-                    params.width = menuItemButtonWidth;
+                    final ViewGroup.LayoutParams params = menuItemButton.getLayoutParams();
+                    params.width = menuItemButtonWidth + extraPadding / 2;
                     menuItemButton.setLayoutParams(params);
-                    availableWidth -= menuItemButtonWidth;
+                    availableWidth -= menuItemButtonWidth + extraPadding;
                     remainingMenuItems.pop();
                 } else {
                     // Reserve space for overflowButton.
                     mMainPanel.setPaddingRelative(0, 0, mOverflowButtonSize.getWidth(), 0);
                     break;
                 }
+                lastGroupId = menuItem.getGroupId();
+                isFirstItem = false;
             }
             mMainPanelSize = measure(mMainPanel);
             return remainingMenuItems;
@@ -1688,6 +1729,23 @@
         return popupWindow;
     }
 
+    private static View createBorder(Context context) {
+        // TODO: Inflate this instead.
+        View border = new View(context);
+        int _1dp = (int) TypedValue.applyDimension(
+                TypedValue.COMPLEX_UNIT_DIP, 1, context.getResources().getDisplayMetrics());
+        LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
+                _1dp, ViewGroup.LayoutParams.MATCH_PARENT);
+        params.setMarginsRelative(0, _1dp * 10, 0, _1dp * 10);
+        border.setLayoutParams(params);
+        border.setBackgroundColor(Color.parseColor("#9E9E9E"));
+        border.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
+        border.setEnabled(false);
+        border.setFocusable(false);
+        border.setContentDescription(null);
+        return border;
+    }
+
     /**
      * Creates an "appear" animation for the specified view.
      *
diff --git a/core/java/com/android/internal/widget/ILockSettings.aidl b/core/java/com/android/internal/widget/ILockSettings.aidl
index b380b13..b8c062e 100644
--- a/core/java/com/android/internal/widget/ILockSettings.aidl
+++ b/core/java/com/android/internal/widget/ILockSettings.aidl
@@ -45,4 +45,10 @@
     void systemReady();
     void userPresent(int userId);
     int getStrongAuthForUser(int userId);
+
+    long addEscrowToken(in byte[] token, int userId);
+    boolean removeEscrowToken(long handle, int userId);
+    boolean isEscrowTokenActive(long handle, int userId);
+    boolean setLockCredentialWithToken(String credential, int type, long tokenHandle, in byte[] token, int userId);
+    void unlockUserWithToken(long tokenHandle, in byte[] token, int userId);
 }
diff --git a/core/java/com/android/internal/widget/ImageFloatingTextView.java b/core/java/com/android/internal/widget/ImageFloatingTextView.java
index a5d2bf3..80207ee 100644
--- a/core/java/com/android/internal/widget/ImageFloatingTextView.java
+++ b/core/java/com/android/internal/widget/ImageFloatingTextView.java
@@ -42,6 +42,10 @@
 
     /** Resolved layout direction */
     private int mResolvedDirection = LAYOUT_DIRECTION_UNDEFINED;
+    private int mMaxLinesForHeight = -1;
+    private boolean mFirstMeasure = true;
+    private int mLayoutMaxLines = -1;
+    private boolean mBlockLayouts;
 
     public ImageFloatingTextView(Context context) {
         this(context, null);
@@ -72,8 +76,15 @@
                 .setLineSpacing(getLineSpacingExtra(), getLineSpacingMultiplier())
                 .setIncludePad(getIncludeFontPadding())
                 .setBreakStrategy(Layout.BREAK_STRATEGY_HIGH_QUALITY)
-                .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_FULL)
-                .setMaxLines(getMaxLines() >= 0 ? getMaxLines() : Integer.MAX_VALUE);
+                .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_FULL);
+        int maxLines;
+        if (mMaxLinesForHeight > 0) {
+            maxLines = mMaxLinesForHeight;
+        } else {
+            maxLines = getMaxLines() >= 0 ? getMaxLines() : Integer.MAX_VALUE;
+        }
+        builder.setMaxLines(maxLines);
+        mLayoutMaxLines = maxLines;
         if (shouldEllipsize) {
             builder.setEllipsize(effectiveEllipsize)
                     .setEllipsizedWidth(ellipsisWidth);
@@ -99,6 +110,34 @@
     }
 
     @Override
+    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+        int height = MeasureSpec.getSize(heightMeasureSpec);
+        // Lets calculate how many lines the given measurement allows us.
+        int availableHeight = height - mPaddingTop - mPaddingBottom;
+        int maxLines = availableHeight / getLineHeight();
+        if (getMaxLines() > 0) {
+            maxLines = Math.min(getMaxLines(), maxLines);
+        }
+        if (maxLines != mMaxLinesForHeight) {
+            mMaxLinesForHeight = maxLines;
+            if (getLayout() != null && mMaxLinesForHeight != mLayoutMaxLines) {
+                // Invalidate layout.
+                mBlockLayouts = true;
+                setHint(getHint());
+                mBlockLayouts = false;
+            }
+        }
+        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+    }
+
+    @Override
+    public void requestLayout() {
+        if (!mBlockLayouts) {
+            super.requestLayout();
+        }
+    }
+
+    @Override
     public void onRtlPropertiesChanged(int layoutDirection) {
         super.onRtlPropertiesChanged(layoutDirection);
 
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
index 58fb145..0aba9c2 100644
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
@@ -147,6 +147,10 @@
 
     public static final String PROFILE_KEY_NAME_ENCRYPT = "profile_key_name_encrypt_";
     public static final String PROFILE_KEY_NAME_DECRYPT = "profile_key_name_decrypt_";
+    public static final String SYNTHETIC_PASSWORD_KEY_PREFIX = "synthetic_password_";
+
+    public static final String SYNTHETIC_PASSWORD_HANDLE_KEY = "sp-handle";
+    public static final String SYNTHETIC_PASSWORD_ENABLED_KEY = "enable-sp";
 
     private final Context mContext;
     private final ContentResolver mContentResolver;
@@ -569,11 +573,12 @@
     /**
      * Clear any lock pattern or password.
      */
-    public void clearLock(int userHandle) {
+    public void clearLock(String savedCredential, int userHandle) {
         setLong(PASSWORD_TYPE_KEY, DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED, userHandle);
 
-        try {
-            getLockSettings().setLockCredential(null, CREDENTIAL_TYPE_NONE, null, userHandle);
+        try{
+            getLockSettings().setLockCredential(null, CREDENTIAL_TYPE_NONE, savedCredential,
+                    userHandle);
         } catch (RemoteException e) {
             // well, we tried...
         }
@@ -758,7 +763,6 @@
     public void saveLockPassword(String password, String savedPassword, int quality,
             int userHandle) {
         try {
-            DevicePolicyManager dpm = getDevicePolicyManager();
             if (password == null || password.length() < MIN_LOCK_PASSWORD_SIZE) {
                 throw new IllegalArgumentException("password must not be null and at least "
                         + "of length " + MIN_LOCK_PASSWORD_SIZE);
@@ -769,42 +773,8 @@
             getLockSettings().setLockCredential(password, CREDENTIAL_TYPE_PASSWORD, savedPassword,
                     userHandle);
 
-            // Update the device encryption password.
-            if (userHandle == UserHandle.USER_SYSTEM
-                    && LockPatternUtils.isDeviceEncryptionEnabled()) {
-                if (!shouldEncryptWithCredentials(true)) {
-                    clearEncryptionPassword();
-                } else {
-                    boolean numeric = computedQuality
-                            == DevicePolicyManager.PASSWORD_QUALITY_NUMERIC;
-                    boolean numericComplex = computedQuality
-                            == DevicePolicyManager.PASSWORD_QUALITY_NUMERIC_COMPLEX;
-                    int type = numeric || numericComplex ? StorageManager.CRYPT_TYPE_PIN
-                            : StorageManager.CRYPT_TYPE_PASSWORD;
-                    updateEncryptionPassword(type, password);
-                }
-            }
-
-            // Add the password to the password history. We assume all
-            // password hashes have the same length for simplicity of implementation.
-            String passwordHistory = getString(PASSWORD_HISTORY_KEY, userHandle);
-            if (passwordHistory == null) {
-                passwordHistory = "";
-            }
-            int passwordHistoryLength = getRequestedPasswordHistoryLength(userHandle);
-            if (passwordHistoryLength == 0) {
-                passwordHistory = "";
-            } else {
-                byte[] hash = passwordToHash(password, userHandle);
-                passwordHistory = new String(hash, StandardCharsets.UTF_8) + "," + passwordHistory;
-                // Cut it to contain passwordHistoryLength hashes
-                // and passwordHistoryLength -1 commas.
-                passwordHistory = passwordHistory.substring(0, Math.min(hash.length
-                        * passwordHistoryLength + passwordHistoryLength - 1, passwordHistory
-                        .length()));
-            }
-            setString(PASSWORD_HISTORY_KEY, passwordHistory, userHandle);
-            onAfterChangingPassword(userHandle);
+            updateEncryptionPasswordIfNeeded(password, computedQuality, userHandle);
+            updatePasswordHistory(password, userHandle);
         } catch (RemoteException re) {
             // Cant do much
             Log.e(TAG, "Unable to save lock password " + re);
@@ -812,6 +782,51 @@
     }
 
     /**
+     * Update device encryption password if calling user is USER_SYSTEM and device supports
+     * encryption.
+     */
+    private void updateEncryptionPasswordIfNeeded(String password, int quality, int userHandle) {
+        // Update the device encryption password.
+        if (userHandle == UserHandle.USER_SYSTEM
+                && LockPatternUtils.isDeviceEncryptionEnabled()) {
+            if (!shouldEncryptWithCredentials(true)) {
+                clearEncryptionPassword();
+            } else {
+                boolean numeric = quality == DevicePolicyManager.PASSWORD_QUALITY_NUMERIC;
+                boolean numericComplex = quality
+                        == DevicePolicyManager.PASSWORD_QUALITY_NUMERIC_COMPLEX;
+                int type = numeric || numericComplex ? StorageManager.CRYPT_TYPE_PIN
+                        : StorageManager.CRYPT_TYPE_PASSWORD;
+                updateEncryptionPassword(type, password);
+            }
+        }
+    }
+
+    private void updatePasswordHistory(String password, int userHandle) {
+
+        // Add the password to the password history. We assume all
+        // password hashes have the same length for simplicity of implementation.
+        String passwordHistory = getString(PASSWORD_HISTORY_KEY, userHandle);
+        if (passwordHistory == null) {
+            passwordHistory = "";
+        }
+        int passwordHistoryLength = getRequestedPasswordHistoryLength(userHandle);
+        if (passwordHistoryLength == 0) {
+            passwordHistory = "";
+        } else {
+            byte[] hash = passwordToHash(password, userHandle);
+            passwordHistory = new String(hash, StandardCharsets.UTF_8) + "," + passwordHistory;
+            // Cut it to contain passwordHistoryLength hashes
+            // and passwordHistoryLength -1 commas.
+            passwordHistory = passwordHistory.substring(0, Math.min(hash.length
+                    * passwordHistoryLength + passwordHistoryLength - 1, passwordHistory
+                    .length()));
+        }
+        setString(PASSWORD_HISTORY_KEY, passwordHistory, userHandle);
+        onAfterChangingPassword(userHandle);
+    }
+
+    /**
      * Determine if the device supports encryption, even if it's set to default. This
      * differs from isDeviceEncrypted() in that it returns true even if the device is
      * encrypted with the default password.
@@ -1391,6 +1406,104 @@
     }
 
     /**
+     * Create an escrow token for the current user, which can later be used to unlock FBE
+     * or change user password.
+     *
+     * After adding, if the user currently has lockscreen password, he will need to perform a
+     * confirm credential operation in order to activate the token for future use. If the user
+     * has no secure lockscreen, then the token is activated immediately.
+     *
+     * @return a unique 64-bit token handle which is needed to refer to this token later.
+     */
+    public long addEscrowToken(byte[] token, int userId) {
+        try {
+            return getLockSettings().addEscrowToken(token, userId);
+        } catch (RemoteException re) {
+            return 0L;
+        }
+    }
+
+    /**
+     * Remove an escrow token.
+     * @return true if the given handle refers to a valid token previously returned from
+     * {@link #addEscrowToken}, whether it's active or not. return false otherwise.
+     */
+    public boolean removeEscrowToken(long handle, int userId) {
+        try {
+            return getLockSettings().removeEscrowToken(handle, userId);
+        } catch (RemoteException re) {
+            return false;
+        }
+    }
+
+    /**
+     * Check if the given escrow token is active or not. Only active token can be used to call
+     * {@link #setLockCredentialWithToken} and {@link #unlockUserWithToken}
+     */
+    public boolean isEscrowTokenActive(long handle, int userId) {
+        try {
+            return getLockSettings().isEscrowTokenActive(handle, userId);
+        } catch (RemoteException re) {
+            return false;
+        }
+    }
+
+    public boolean setLockCredentialWithToken(String credential, int type, long tokenHandle,
+            byte[] token, int userId) {
+        try {
+            if (type != CREDENTIAL_TYPE_NONE) {
+                if (TextUtils.isEmpty(credential) || credential.length() < MIN_LOCK_PASSWORD_SIZE) {
+                    throw new IllegalArgumentException("password must not be null and at least "
+                            + "of length " + MIN_LOCK_PASSWORD_SIZE);
+                }
+
+                final int computedQuality = PasswordMetrics.computeForPassword(credential).quality;
+                if (!getLockSettings().setLockCredentialWithToken(credential, type, tokenHandle,
+                        token, userId)) {
+                    return false;
+                }
+                setLong(PASSWORD_TYPE_KEY, Math.max(DevicePolicyManager.PASSWORD_QUALITY_NUMERIC,
+                        computedQuality), userId);
+
+                updateEncryptionPasswordIfNeeded(credential, computedQuality, userId);
+                updatePasswordHistory(credential, userId);
+            } else {
+                if (!TextUtils.isEmpty(credential)) {
+                    throw new IllegalArgumentException("password must be emtpy for NONE type");
+                }
+                if (!getLockSettings().setLockCredentialWithToken(null, CREDENTIAL_TYPE_NONE,
+                        tokenHandle, token, userId)) {
+                    return false;
+                }
+                setLong(PASSWORD_TYPE_KEY, DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED,
+                        userId);
+
+                if (userId == UserHandle.USER_SYSTEM) {
+                    // Set the encryption password to default.
+                    updateEncryptionPassword(StorageManager.CRYPT_TYPE_DEFAULT, null);
+                    setCredentialRequiredToDecrypt(false);
+                }
+            }
+            onAfterChangingPassword(userId);
+            return true;
+        } catch (RemoteException re) {
+            Log.e(TAG, "Unable to save lock password ", re);
+            re.rethrowFromSystemServer();
+        }
+        return false;
+    }
+
+    public void unlockUserWithToken(long tokenHandle, byte[] token, int userId) {
+        try {
+            getLockSettings().unlockUserWithToken(tokenHandle, token, userId);
+        } catch (RemoteException re) {
+            Log.e(TAG, "Unable to unlock user with token", re);
+            re.rethrowFromSystemServer();
+        }
+    }
+
+
+    /**
      * Callback to be notified about progress when checking credentials.
      */
     public interface CheckCredentialProgressCallback {
@@ -1552,6 +1665,14 @@
                         break;
                 }
             }
-        };
+        }
+    }
+
+    public void enableSyntheticPassword() {
+        setLong(SYNTHETIC_PASSWORD_ENABLED_KEY, 1L, UserHandle.USER_SYSTEM);
+    }
+
+    public boolean isSyntheticPasswordEnabled() {
+        return getLong(SYNTHETIC_PASSWORD_ENABLED_KEY, 0, UserHandle.USER_SYSTEM) != 0;
     }
 }
diff --git a/core/java/com/android/internal/widget/MessagingLinearLayout.java b/core/java/com/android/internal/widget/MessagingLinearLayout.java
index cb123a1..b259ad1 100644
--- a/core/java/com/android/internal/widget/MessagingLinearLayout.java
+++ b/core/java/com/android/internal/widget/MessagingLinearLayout.java
@@ -36,6 +36,7 @@
 @RemoteViews.RemoteView
 public class MessagingLinearLayout extends ViewGroup {
 
+    private static final int NOT_MEASURED_BEFORE = -1;
     /**
      * Spacing to be applied between views.
      */
@@ -52,6 +53,11 @@
      * Id of the child that's also visible in the contracted layout.
      */
     private int mContractedChildId;
+    /**
+     * The last measured with in a layout pass if it was measured before or
+     * {@link #NOT_MEASURED_BEFORE} if this is the first layout pass.
+     */
+    private int mLastMeasuredWidth = NOT_MEASURED_BEFORE;
 
     public MessagingLinearLayout(Context context, @Nullable AttributeSet attrs) {
         super(context, attrs);
@@ -64,20 +70,12 @@
         for (int i = 0; i < N; i++) {
             int attr = a.getIndex(i);
             switch (attr) {
-                case R.styleable.MessagingLinearLayout_maxHeight:
-                    mMaxHeight = a.getDimensionPixelSize(i, 0);
-                    break;
                 case R.styleable.MessagingLinearLayout_spacing:
                     mSpacing = a.getDimensionPixelSize(i, 0);
                     break;
             }
         }
 
-        if (mMaxHeight <= 0) {
-            throw new IllegalStateException(
-                    "MessagingLinearLayout: Must specify positive maxHeight");
-        }
-
         a.recycle();
     }
 
@@ -86,62 +84,63 @@
     protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
         // This is essentially a bottom-up linear layout that only adds children that fit entirely
         // up to a maximum height.
-
+        int targetHeight = MeasureSpec.getSize(heightMeasureSpec);
         switch (MeasureSpec.getMode(heightMeasureSpec)) {
-            case MeasureSpec.AT_MOST:
-                heightMeasureSpec = MeasureSpec.makeMeasureSpec(
-                        Math.min(mMaxHeight, MeasureSpec.getSize(heightMeasureSpec)),
-                        MeasureSpec.AT_MOST);
-                break;
             case MeasureSpec.UNSPECIFIED:
-                heightMeasureSpec = MeasureSpec.makeMeasureSpec(
-                        mMaxHeight,
-                        MeasureSpec.AT_MOST);
-                break;
-            case MeasureSpec.EXACTLY:
+                targetHeight = Integer.MAX_VALUE;
                 break;
         }
-        final int targetHeight = MeasureSpec.getSize(heightMeasureSpec);
+        int widthSize = MeasureSpec.getSize(widthMeasureSpec);
+        boolean recalculateVisibility = mLastMeasuredWidth == NOT_MEASURED_BEFORE
+                || getMeasuredHeight() != targetHeight
+                || mLastMeasuredWidth != widthSize;
+
         final int count = getChildCount();
-
-        for (int i = 0; i < count; ++i) {
-            final View child = getChildAt(i);
-            final LayoutParams lp = (LayoutParams) child.getLayoutParams();
-            lp.hide = true;
-        }
-
-        int totalHeight = mPaddingTop + mPaddingBottom;
-        boolean first = true;
-
-        // Starting from the bottom: we measure every view as if it were the only one. If it still
-        // fits, we take it, otherwise we stop there.
-        for (int i = count - 1; i >= 0 && totalHeight < targetHeight; i--) {
-            if (getChildAt(i).getVisibility() == GONE) {
-                continue;
-            }
-            final View child = getChildAt(i);
-            LayoutParams lp = (LayoutParams) getChildAt(i).getLayoutParams();
-
-            if (child instanceof ImageFloatingTextView) {
-                // Pretend we need the image padding for all views, we don't know which
-                // one will end up needing to do this (might end up not using all the space,
-                // but calculating this exactly would be more expensive).
-                ((ImageFloatingTextView) child).setNumIndentLines(
-                        mIndentLines == 2 ? 3 : mIndentLines);
+        if (recalculateVisibility) {
+            // We only need to recalculate the view visibilities if the view wasn't measured already
+            // in this pass, otherwise we may drop messages here already since we are measured
+            // exactly with what we returned before, which was optimized already with the
+            // line-indents.
+            for (int i = 0; i < count; ++i) {
+                final View child = getChildAt(i);
+                final LayoutParams lp = (LayoutParams) child.getLayoutParams();
+                lp.hide = true;
             }
 
-            measureChildWithMargins(child, widthMeasureSpec, 0, heightMeasureSpec, 0);
+            int totalHeight = mPaddingTop + mPaddingBottom;
+            boolean first = true;
 
-            final int childHeight = child.getMeasuredHeight();
-            int newHeight = Math.max(totalHeight, totalHeight + childHeight + lp.topMargin +
-                    lp.bottomMargin + (first ? 0 : mSpacing));
-            first = false;
+            // Starting from the bottom: we measure every view as if it were the only one. If it still
 
-            if (newHeight <= targetHeight) {
-                totalHeight = newHeight;
-                lp.hide = false;
-            } else {
-                break;
+            // fits, we take it, otherwise we stop there.
+            for (int i = count - 1; i >= 0 && totalHeight < targetHeight; i--) {
+                if (getChildAt(i).getVisibility() == GONE) {
+                    continue;
+                }
+                final View child = getChildAt(i);
+                LayoutParams lp = (LayoutParams) getChildAt(i).getLayoutParams();
+
+                if (child instanceof ImageFloatingTextView) {
+                    // Pretend we need the image padding for all views, we don't know which
+                    // one will end up needing to do this (might end up not using all the space,
+                    // but calculating this exactly would be more expensive).
+                    ((ImageFloatingTextView) child).setNumIndentLines(
+                            mIndentLines == 2 ? 3 : mIndentLines);
+                }
+
+                measureChildWithMargins(child, widthMeasureSpec, 0, heightMeasureSpec, 0);
+
+                final int childHeight = child.getMeasuredHeight();
+                int newHeight = Math.max(totalHeight, totalHeight + childHeight + lp.topMargin +
+                        lp.bottomMargin + (first ? 0 : mSpacing));
+                first = false;
+
+                if (newHeight <= targetHeight) {
+                    totalHeight = newHeight;
+                    lp.hide = false;
+                } else {
+                    break;
+                }
             }
         }
 
@@ -149,8 +148,8 @@
         int measuredWidth = mPaddingLeft + mPaddingRight;
         int imageLines = mIndentLines;
         // Need to redo the height because it may change due to changing indents.
-        totalHeight = mPaddingTop + mPaddingBottom;
-        first = true;
+        int totalHeight = mPaddingTop + mPaddingBottom;
+        boolean first = true;
         for (int i = 0; i < count; i++) {
             final View child = getChildAt(i);
             final LayoutParams lp = (LayoutParams) child.getLayoutParams();
@@ -168,7 +167,7 @@
                     imageLines = 3;
                 }
                 boolean changed = textChild.setNumIndentLines(Math.max(0, imageLines));
-                if (changed) {
+                if (changed || !recalculateVisibility) {
                     measureChildWithMargins(child, widthMeasureSpec, 0, heightMeasureSpec, 0);
                 }
                 imageLines -= textChild.getLineCount();
@@ -188,6 +187,7 @@
                         widthMeasureSpec),
                 resolveSize(Math.max(getSuggestedMinimumHeight(), totalHeight),
                         heightMeasureSpec));
+        mLastMeasuredWidth = widthSize;
     }
 
     @Override
@@ -236,6 +236,7 @@
 
             first = false;
         }
+        mLastMeasuredWidth = NOT_MEASURED_BEFORE;
     }
 
     @Override
diff --git a/core/java/com/android/internal/widget/SwipeDismissLayout.java b/core/java/com/android/internal/widget/SwipeDismissLayout.java
index 2a5957c..6d814bf 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,11 +74,11 @@
     private int mActiveTouchId;
     private float mDownX;
     private float mDownY;
+    private float mLastX;
     private boolean mSwiping;
     private boolean mDismissed;
     private boolean mDiscardIntercept;
     private VelocityTracker mVelocityTracker;
-    private float mTranslationX;
     private boolean mBlockGesture = false;
     private boolean mActivityTranslucencyConverted = false;
 
@@ -105,7 +106,6 @@
     };
     private IntentFilter mScreenOffFilter = new IntentFilter(Intent.ACTION_SCREEN_OFF);
 
-    private float mLastX;
 
     private boolean mDismissable = true;
 
@@ -165,8 +165,10 @@
             return super.onInterceptTouchEvent(ev);
         }
 
-        // offset because the view is translated during swipe
-        ev.offsetLocation(mTranslationX, 0);
+        // Offset because the view is translated during swipe, match X with raw X. Active touch
+        // coordinates are mostly used by the velocity tracker, so offset it to match the raw
+        // coordinates which is what is primarily used elsewhere.
+        ev.offsetLocation(ev.getRawX() - ev.getX(), 0);
 
         switch (ev.getActionMasked()) {
             case MotionEvent.ACTION_DOWN:
@@ -174,7 +176,7 @@
                 mDownX = ev.getRawX();
                 mDownY = ev.getRawY();
                 mActiveTouchId = ev.getPointerId(0);
-                mVelocityTracker = VelocityTracker.obtain();
+                mVelocityTracker = VelocityTracker.obtain("int1");
                 mVelocityTracker.addMovement(ev);
                 break;
 
@@ -231,14 +233,21 @@
         if (mVelocityTracker == null || !mDismissable) {
             return super.onTouchEvent(ev);
         }
-        // offset because the view is translated during swipe
-        ev.offsetLocation(mTranslationX, 0);
+
+        // Offset because the view is translated during swipe, match X with raw X. Active touch
+        // coordinates are mostly used by the velocity tracker, so offset it to match the raw
+        // coordinates which is what is primarily used elsewhere.
+        ev.offsetLocation(ev.getRawX() - ev.getX(), 0);
+
         switch (ev.getActionMasked()) {
             case MotionEvent.ACTION_UP:
                 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();
@@ -262,7 +271,6 @@
     }
 
     private void setProgress(float deltaX) {
-        mTranslationX = deltaX;
         if (mProgressListener != null && deltaX >= 0)  {
             mProgressListener.onSwipeProgressChanged(
                     this, progressToAlpha(deltaX / getWidth()), deltaX);
@@ -296,8 +304,8 @@
             mVelocityTracker.recycle();
         }
         mVelocityTracker = null;
-        mTranslationX = 0;
         mDownX = 0;
+        mLastX = Integer.MIN_VALUE;
         mDownY = 0;
         mSwiping = false;
         mDismissed = false;
@@ -329,19 +337,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/java/com/android/internal/widget/WatchHeaderListView.java b/core/java/com/android/internal/widget/WatchHeaderListView.java
index 53fa7ab..7e91537 100644
--- a/core/java/com/android/internal/widget/WatchHeaderListView.java
+++ b/core/java/com/android/internal/widget/WatchHeaderListView.java
@@ -26,8 +26,7 @@
 import android.widget.HeaderViewListAdapter;
 
 import java.util.ArrayList;
-
-import com.android.internal.util.Predicate;
+import java.util.function.Predicate;
 
 public class WatchHeaderListView extends ListView {
     private View mTopPanel;
@@ -92,14 +91,13 @@
     }
 
     @Override
-    protected <T extends View> T findViewByPredicateTraversal(
-            Predicate<View> predicate, View childToSkip) {
+    protected View findViewByPredicateTraversal(Predicate<View> predicate, View childToSkip) {
         View v = super.findViewByPredicateTraversal(predicate, childToSkip);
         if (v == null && mTopPanel != null && mTopPanel != childToSkip
                 && !mTopPanel.isRootNamespace()) {
-            return (T) mTopPanel.findViewByPredicate(predicate);
+            return mTopPanel.findViewByPredicate(predicate);
         }
-        return (T) v;
+        return v;
     }
 
     @Override
diff --git a/core/java/com/android/server/SystemConfig.java b/core/java/com/android/server/SystemConfig.java
index fcb4c7b..3d012bf 100644
--- a/core/java/com/android/server/SystemConfig.java
+++ b/core/java/com/android/server/SystemConfig.java
@@ -109,6 +109,10 @@
     // background while in data-usage save mode, as read from the configuration files.
     final ArraySet<String> mAllowInDataUsageSave = new ArraySet<>();
 
+    // These are the packages that are white-listed to be able to run background location
+    // without throttling, as read from the configuration files.
+    final ArraySet<String> mAllowUnthrottledLocation = new ArraySet<>();
+
     // These are the action strings of broadcasts which are whitelisted to
     // be delivered anonymously even to apps which target O+.
     final ArraySet<String> mAllowImplicitBroadcasts = new ArraySet<>();
@@ -182,6 +186,10 @@
         return mAllowInDataUsageSave;
     }
 
+    public ArraySet<String> getAllowUnthrottledLocation() {
+        return mAllowUnthrottledLocation;
+    }
+
     public ArraySet<String> getLinkedApps() {
         return mLinkedApps;
     }
@@ -446,6 +454,17 @@
                     XmlUtils.skipCurrentTag(parser);
                     continue;
 
+                } else if ("allow-unthrottled-location".equals(name) && allowAll) {
+                    String pkgname = parser.getAttributeValue(null, "package");
+                    if (pkgname == null) {
+                        Slog.w(TAG, "<allow-unthrottled-location> without package in "
+                            + permFile + " at " + parser.getPositionDescription());
+                    } else {
+                        mAllowUnthrottledLocation.add(pkgname);
+                    }
+                    XmlUtils.skipCurrentTag(parser);
+                    continue;
+
                 } else if ("allow-implicit-broadcast".equals(name) && allowAll) {
                     String action = parser.getAttributeValue(null, "action");
                     if (action == null) {
diff --git a/core/jni/Android.mk b/core/jni/Android.mk
index cf9441b..0c07192 100644
--- a/core/jni/Android.mk
+++ b/core/jni/Android.mk
@@ -91,6 +91,7 @@
     android_os_MessageQueue.cpp \
     android_os_Parcel.cpp \
     android_os_SELinux.cpp \
+    android_os_seccomp.cpp \
     android_os_SystemClock.cpp \
     android_os_SystemProperties.cpp \
     android_os_Trace.cpp \
@@ -202,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 \
@@ -230,6 +233,7 @@
 
 LOCAL_STATIC_LIBRARIES := \
     libgif \
+    libseccomp_policy \
 
 LOCAL_SHARED_LIBRARIES := \
     libmemtrack \
@@ -279,6 +283,7 @@
     libhidlbase \
     libhidltransport \
     libhwbinder \
+    libvintf \
 
 LOCAL_SHARED_LIBRARIES += \
     libhwui \
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index 340f2ee..e237ce9 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -159,6 +159,7 @@
 extern int register_android_os_MessageQueue(JNIEnv* env);
 extern int register_android_os_Parcel(JNIEnv* env);
 extern int register_android_os_SELinux(JNIEnv* env);
+extern int register_android_os_seccomp(JNIEnv* env);
 extern int register_android_os_SystemProperties(JNIEnv *env);
 extern int register_android_os_SystemClock(JNIEnv* env);
 extern int register_android_os_Trace(JNIEnv* env);
@@ -215,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();
 }
@@ -229,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));
 }
 
 // ----------------------------------------------------------------------
@@ -1270,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),
@@ -1360,6 +1370,7 @@
     REG_JNI(register_android_os_GraphicsEnvironment),
     REG_JNI(register_android_os_MessageQueue),
     REG_JNI(register_android_os_SELinux),
+    REG_JNI(register_android_os_seccomp),
     REG_JNI(register_android_os_Trace),
     REG_JNI(register_android_os_UEventObserver),
     REG_JNI(register_android_net_LocalSocketImpl),
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_graphics_Canvas.cpp b/core/jni/android_graphics_Canvas.cpp
index c49287c..c261e41 100644
--- a/core/jni/android_graphics_Canvas.cpp
+++ b/core/jni/android_graphics_Canvas.cpp
@@ -27,6 +27,7 @@
 #include "Bitmap.h"
 #include "SkDrawFilter.h"
 #include "SkGraphics.h"
+#include "SkRegion.h"
 
 namespace android {
 
diff --git a/core/jni/android_hardware_HardwareBuffer.cpp b/core/jni/android_hardware_HardwareBuffer.cpp
index fadf8a4..6cf5ccf 100644
--- a/core/jni/android_hardware_HardwareBuffer.cpp
+++ b/core/jni/android_hardware_HardwareBuffer.cpp
@@ -30,6 +30,7 @@
 #include <binder/Parcel.h>
 #include <gui/IGraphicBufferAlloc.h>
 #include <gui/ISurfaceComposer.h>
+#include <hardware/gralloc1.h>
 #include <ui/GraphicBuffer.h>
 
 #include <private/gui/ComposerService.h>
@@ -96,10 +97,15 @@
         }
         return NULL;
     }
-    uint32_t grallocUsage = android_hardware_HardwareBuffer_convertToGrallocUsageBits(usage, 0);
+    uint64_t producerUsage = 0;
+    uint64_t consumerUsage = 0;
+    android_hardware_HardwareBuffer_convertToGrallocUsageBits(usage, 0, &producerUsage,
+            &consumerUsage);
     status_t error;
     sp<GraphicBuffer> buffer(alloc->createGraphicBuffer(width, height, pixelFormat,
-            layers, grallocUsage, &error));
+            layers, producerUsage, consumerUsage,
+            std::string("HardwareBuffer pid [") + std::to_string(getpid()) +"]",
+            &error));
     if (buffer == NULL) {
         if (kDebugGraphicBuffer) {
             ALOGW("createGraphicBuffer() failed in HardwareBuffer.create()");
@@ -158,7 +164,7 @@
     jobject clazz, jlong nativeObject) {
     GraphicBuffer* buffer = GraphicBufferWrapper_to_GraphicBuffer(nativeObject);
     return android_hardware_HardwareBuffer_convertFromGrallocUsageBits(
-            buffer->getUsage());
+            buffer->getUsage(), buffer->getUsage());
 }
 
 // ----------------------------------------------------------------------------
@@ -261,52 +267,58 @@
     }
 }
 
-uint32_t android_hardware_HardwareBuffer_convertToGrallocUsageBits(uint64_t usage0,
-        uint64_t usage1) {
-    uint32_t bits = 0;
+void android_hardware_HardwareBuffer_convertToGrallocUsageBits(uint64_t usage0,
+        uint64_t usage1, uint64_t* outProducerUsage,
+        uint64_t* outConsumerUsage) {
+    *outProducerUsage = 0;
+    *outConsumerUsage = 0;
     if (containsBits(usage0, AHARDWAREBUFFER_USAGE0_CPU_READ))
-        bits |= GRALLOC_USAGE_SW_READ_RARELY;
+        *outConsumerUsage |= GRALLOC1_CONSUMER_USAGE_CPU_READ;
     if (containsBits(usage0, AHARDWAREBUFFER_USAGE0_CPU_READ_OFTEN))
-        bits |= GRALLOC_USAGE_SW_READ_OFTEN;
+        *outConsumerUsage |= GRALLOC1_CONSUMER_USAGE_CPU_READ_OFTEN;
     if (containsBits(usage0, AHARDWAREBUFFER_USAGE0_CPU_WRITE))
-        bits |= GRALLOC_USAGE_SW_WRITE_RARELY;
+        *outProducerUsage |= GRALLOC1_PRODUCER_USAGE_CPU_WRITE;
     if (containsBits(usage0, AHARDWAREBUFFER_USAGE0_CPU_WRITE_OFTEN))
-        bits |= GRALLOC_USAGE_SW_WRITE_OFTEN;
+        *outProducerUsage |= GRALLOC1_PRODUCER_USAGE_CPU_WRITE_OFTEN;
     if (containsBits(usage0, AHARDWAREBUFFER_USAGE0_GPU_SAMPLED_IMAGE))
-        bits |= GRALLOC_USAGE_HW_TEXTURE;
+        *outConsumerUsage |= GRALLOC1_CONSUMER_USAGE_GPU_TEXTURE;
     if (containsBits(usage0, AHARDWAREBUFFER_USAGE0_GPU_COLOR_OUTPUT))
-        bits |= GRALLOC_USAGE_HW_RENDER;
+        *outProducerUsage |= GRALLOC1_PRODUCER_USAGE_GPU_RENDER_TARGET;
     // Not sure what this should be.
-    if (containsBits(usage0, AHARDWAREBUFFER_USAGE0_GPU_CUBEMAP)) bits |= 0;
-    //if (containsBits(usage0, AHARDWAREBUFFER_USAGE0_GPU_DATA_BUFFER) bits |= 0;
+    //if (containsBits(usage0, AHARDWAREBUFFER_USAGE0_GPU_CUBEMAP)) bits |= 0;
+    if (containsBits(usage0, AHARDWAREBUFFER_USAGE0_GPU_DATA_BUFFER))
+        *outConsumerUsage |= GRALLOC1_CONSUMER_USAGE_GPU_DATA_BUFFER;
     if (containsBits(usage0, AHARDWAREBUFFER_USAGE0_VIDEO_ENCODE))
-        bits |= GRALLOC_USAGE_HW_VIDEO_ENCODER;
+        *outConsumerUsage |= GRALLOC1_CONSUMER_USAGE_VIDEO_ENCODER;
     if (containsBits(usage0, AHARDWAREBUFFER_USAGE0_PROTECTED_CONTENT))
-        bits |= GRALLOC_USAGE_PROTECTED;
-
-    (void)usage1;
-
-    return bits;
+        *outProducerUsage |= GRALLOC1_PRODUCER_USAGE_PROTECTED;
+    if (containsBits(usage0, AHARDWAREBUFFER_USAGE0_SENSOR_DIRECT_DATA))
+        *outProducerUsage |= GRALLOC1_PRODUCER_USAGE_SENSOR_DIRECT_DATA;
 }
 
-uint64_t android_hardware_HardwareBuffer_convertFromGrallocUsageBits(uint64_t usage0) {
+uint64_t android_hardware_HardwareBuffer_convertFromGrallocUsageBits(
+        uint64_t producerUsage, uint64_t consumerUsage) {
     uint64_t bits = 0;
-    if (containsBits(usage0, GRALLOC_USAGE_SW_READ_RARELY))
+    if (containsBits(consumerUsage, GRALLOC1_CONSUMER_USAGE_CPU_READ))
         bits |= AHARDWAREBUFFER_USAGE0_CPU_READ;
-    if (containsBits(usage0, GRALLOC_USAGE_SW_READ_OFTEN))
+    if (containsBits(consumerUsage, GRALLOC1_CONSUMER_USAGE_CPU_READ_OFTEN))
         bits |= AHARDWAREBUFFER_USAGE0_CPU_READ_OFTEN;
-    if (containsBits(usage0, GRALLOC_USAGE_SW_WRITE_RARELY))
+    if (containsBits(producerUsage, GRALLOC1_PRODUCER_USAGE_CPU_WRITE))
         bits |= AHARDWAREBUFFER_USAGE0_CPU_WRITE;
-    if (containsBits(usage0, GRALLOC_USAGE_SW_WRITE_OFTEN))
+    if (containsBits(producerUsage, GRALLOC1_PRODUCER_USAGE_CPU_WRITE_OFTEN))
         bits |= AHARDWAREBUFFER_USAGE0_CPU_WRITE_OFTEN;
-    if (containsBits(usage0, GRALLOC_USAGE_HW_TEXTURE))
+    if (containsBits(consumerUsage, GRALLOC1_CONSUMER_USAGE_GPU_TEXTURE))
         bits |= AHARDWAREBUFFER_USAGE0_GPU_SAMPLED_IMAGE;
-    if (containsBits(usage0, GRALLOC_USAGE_HW_RENDER))
+    if (containsBits(producerUsage, GRALLOC1_PRODUCER_USAGE_GPU_RENDER_TARGET))
         bits |= AHARDWAREBUFFER_USAGE0_GPU_COLOR_OUTPUT;
-    if (containsBits(usage0, GRALLOC_USAGE_HW_VIDEO_ENCODER))
+    if (containsBits(consumerUsage, GRALLOC1_CONSUMER_USAGE_GPU_DATA_BUFFER))
+        bits |= AHARDWAREBUFFER_USAGE0_GPU_DATA_BUFFER;
+    if (containsBits(consumerUsage, GRALLOC1_CONSUMER_USAGE_VIDEO_ENCODER))
         bits |= AHARDWAREBUFFER_USAGE0_VIDEO_ENCODE;
-    if (containsBits(usage0, GRALLOC_USAGE_PROTECTED))
+    if (containsBits(producerUsage, GRALLOC1_PRODUCER_USAGE_PROTECTED))
         bits |= AHARDWAREBUFFER_USAGE0_PROTECTED_CONTENT;
+    if (containsBits(producerUsage, GRALLOC1_PRODUCER_USAGE_SENSOR_DIRECT_DATA))
+        bits |= AHARDWAREBUFFER_USAGE0_SENSOR_DIRECT_DATA;
 
     return bits;
 }
diff --git a/core/jni/android_media_AudioTrack.cpp b/core/jni/android_media_AudioTrack.cpp
index b2c8168..2cfaeeb 100644
--- a/core/jni/android_media_AudioTrack.cpp
+++ b/core/jni/android_media_AudioTrack.cpp
@@ -37,6 +37,7 @@
 #include "android_media_AudioErrors.h"
 #include "android_media_PlaybackParams.h"
 #include "android_media_DeviceCallback.h"
+#include "android_media_VolumeShaper.h"
 
 #include <cinttypes>
 
@@ -64,6 +65,7 @@
 static audio_track_fields_t      javaAudioTrackFields;
 static audio_attributes_fields_t javaAudioAttrFields;
 static PlaybackParams::fields_t gPlaybackParamsFields;
+static VolumeShaperHelper::fields_t gVolumeShaperFields;
 
 struct audiotrack_callback_cookie {
     jclass      audioTrack_class;
@@ -1178,6 +1180,50 @@
     return FCC_8;
 }
 
+// Pass through the arguments to the AudioFlinger track implementation.
+static jint android_media_AudioTrack_apply_volume_shaper(JNIEnv *env, jobject thiz,
+        jobject jconfig, jobject joperation) {
+    // NOTE: hard code here to prevent platform issues. Must match VolumeShaper.java
+    const int VOLUME_SHAPER_INVALID_OPERATION = -38;
+
+    sp<AudioTrack> lpTrack = getAudioTrack(env, thiz);
+    if (lpTrack == nullptr) {
+        return (jint)VOLUME_SHAPER_INVALID_OPERATION;
+    }
+
+    sp<VolumeShaper::Configuration> configuration;
+    sp<VolumeShaper::Operation> operation;
+    if (jconfig != nullptr) {
+        configuration = VolumeShaperHelper::convertJobjectToConfiguration(
+                env, gVolumeShaperFields, jconfig);
+        ALOGV("applyVolumeShaper configuration: %s", configuration->toString().c_str());
+    }
+    if (joperation != nullptr) {
+        operation = VolumeShaperHelper::convertJobjectToOperation(
+                env, gVolumeShaperFields, joperation);
+        ALOGV("applyVolumeShaper operation: %s", operation->toString().c_str());
+    }
+    VolumeShaper::Status status = lpTrack->applyVolumeShaper(configuration, operation);
+    if (status == INVALID_OPERATION) {
+        status = VOLUME_SHAPER_INVALID_OPERATION;
+    }
+    return (jint)status; // if status < 0 an error, else a VolumeShaper id
+}
+
+// Pass through the arguments to the AudioFlinger track implementation.
+static jobject android_media_AudioTrack_get_volume_shaper_state(JNIEnv *env, jobject thiz,
+        jint id) {
+    sp<AudioTrack> lpTrack = getAudioTrack(env, thiz);
+    if (lpTrack == nullptr) {
+        return (jobject)nullptr;
+    }
+
+    sp<VolumeShaper::State> state = lpTrack->getVolumeShaperState((int)id);
+    if (state.get() == nullptr) {
+        return (jobject)nullptr;
+    }
+    return VolumeShaperHelper::convertStateToJobject(env, gVolumeShaperFields, state);
+}
 
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
@@ -1242,6 +1288,12 @@
     {"native_enableDeviceCallback", "()V", (void *)android_media_AudioTrack_enableDeviceCallback},
     {"native_disableDeviceCallback", "()V", (void *)android_media_AudioTrack_disableDeviceCallback},
     {"native_get_FCC_8",     "()I",      (void *)android_media_AudioTrack_get_FCC_8},
+    {"native_applyVolumeShaper",
+            "(Landroid/media/VolumeShaper$Configuration;Landroid/media/VolumeShaper$Operation;)I",
+                                         (void *)android_media_AudioTrack_apply_volume_shaper},
+    {"native_getVolumeShaperState",
+            "(I)Landroid/media/VolumeShaper$State;",
+                                        (void *)android_media_AudioTrack_get_volume_shaper_state},
 };
 
 
@@ -1312,6 +1364,7 @@
     // initialize PlaybackParams field info
     gPlaybackParamsFields.init(env);
 
+    gVolumeShaperFields.init(env);
     return res;
 }
 
diff --git a/core/jni/android_os_Debug.cpp b/core/jni/android_os_Debug.cpp
index be3a87b..eaf9e91 100644
--- a/core/jni/android_os_Debug.cpp
+++ b/core/jni/android_os_Debug.cpp
@@ -1006,9 +1006,8 @@
     ALOGD("Native heap dump complete.\n");
 }
 
-
-static void android_os_Debug_dumpNativeBacktraceToFile(JNIEnv* env, jobject clazz,
-    jint pid, jstring fileName)
+static void android_os_Debug_dumpNativeBacktraceToFileTimeout(JNIEnv* env, jobject clazz,
+    jint pid, jstring fileName, jint timeoutSecs)
 {
     if (fileName == NULL) {
         jniThrowNullPointerException(env, "file == null");
@@ -1031,7 +1030,7 @@
     if (lseek(fd, 0, SEEK_END) < 0) {
         fprintf(stderr, "lseek: %s\n", strerror(errno));
     } else {
-        dump_backtrace_to_file(pid, fd);
+        dump_backtrace_to_file_timeout(pid, fd, timeoutSecs);
     }
 
     close(fd);
@@ -1077,8 +1076,8 @@
             (void*)android_os_Debug_getProxyObjectCount },
     { "getBinderDeathObjectCount", "()I",
             (void*)android_os_Debug_getDeathObjectCount },
-    { "dumpNativeBacktraceToFile", "(ILjava/lang/String;)V",
-            (void*)android_os_Debug_dumpNativeBacktraceToFile },
+    { "dumpNativeBacktraceToFileTimeout", "(ILjava/lang/String;I)V",
+            (void*)android_os_Debug_dumpNativeBacktraceToFileTimeout },
     { "getUnreachableMemory", "(IZ)Ljava/lang/String;",
             (void*)android_os_Debug_getUnreachableMemory },
 };
diff --git a/core/jni/android_os_GraphicsEnvironment.cpp b/core/jni/android_os_GraphicsEnvironment.cpp
index 905a85a..399dec8 100644
--- a/core/jni/android_os_GraphicsEnvironment.cpp
+++ b/core/jni/android_os_GraphicsEnvironment.cpp
@@ -16,7 +16,7 @@
 
 #define LOG_TAG "GraphicsEnvironment"
 
-#include <gui/GraphicsEnv.h>
+#include <ui/GraphicsEnv.h>
 #include <nativehelper/ScopedUtfChars.h>
 #include "core_jni_helpers.h"
 
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_HwBlob.cpp b/core/jni/android_os_HwBlob.cpp
index b2dee06..8590ecf 100644
--- a/core/jni/android_os_HwBlob.cpp
+++ b/core/jni/android_os_HwBlob.cpp
@@ -382,7 +382,7 @@
     s = nullptr;
 
     hidl_string tmp;
-    tmp.setToExternal(static_cast<const char *>(subBlob->data()), size);
+    tmp.setToExternal(static_cast<const char *>(subBlob->data()), size - 1);
 
     sp<JHwBlob> blob = JHwBlob::GetNativeContext(env, thiz);
     blob->write(offset, &tmp, sizeof(tmp));
diff --git a/core/jni/android_os_seccomp.cpp b/core/jni/android_os_seccomp.cpp
new file mode 100644
index 0000000..45d5061
--- /dev/null
+++ b/core/jni/android_os_seccomp.cpp
@@ -0,0 +1,255 @@
+/*
+ * 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.
+ */
+
+#include "JNIHelp.h"
+#include "core_jni_helpers.h"
+#include "JniConstants.h"
+#include "utils/Log.h"
+#include "utils/misc.h"
+
+#if defined __arm__ || defined __aarch64__
+
+#include <vector>
+
+#include <sys/prctl.h>
+
+#include <linux/unistd.h>
+#include <linux/audit.h>
+#include <linux/filter.h>
+#include <linux/seccomp.h>
+
+#include "seccomp_policy.h"
+
+#define syscall_nr (offsetof(struct seccomp_data, nr))
+#define arch_nr (offsetof(struct seccomp_data, arch))
+
+typedef std::vector<sock_filter> filter;
+
+// We want to keep the below inline functions for debugging and future
+// development even though they are not all sed currently.
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-function"
+
+static inline void Kill(filter& f) {
+    f.push_back(BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL));
+}
+
+static inline void Trap(filter& f) {
+    f.push_back(BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_TRAP));
+}
+
+static inline void Error(filter& f, __u16 retcode) {
+    f.push_back(BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO + retcode));
+}
+
+inline static void Trace(filter& f) {
+    f.push_back(BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_TRACE));
+}
+
+inline static void Allow(filter& f) {
+    f.push_back(BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW));
+}
+
+#pragma clang diagnostic pop
+
+inline static void AllowSyscall(filter& f, __u32 num) {
+    f.push_back(BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, num, 0, 1));
+    Allow(f);
+}
+
+inline static void ExamineSyscall(filter& f) {
+    f.push_back(BPF_STMT(BPF_LD|BPF_W|BPF_ABS, syscall_nr));
+}
+
+inline static int SetValidateArchitectureJumpTarget(size_t offset, filter& f) {
+    size_t jump_length = f.size() - offset - 1;
+    auto u8_jump_length = (__u8) jump_length;
+    if (u8_jump_length != jump_length) {
+        ALOGE("Can't set jump greater than 255 - actual jump is %zu",
+              jump_length);
+        return -1;
+    }
+    f[offset] = BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, AUDIT_ARCH_ARM, u8_jump_length, 0);
+    return 0;
+}
+
+inline static size_t ValidateArchitectureAndJumpIfNeeded(filter& f) {
+    f.push_back(BPF_STMT(BPF_LD|BPF_W|BPF_ABS, arch_nr));
+
+    f.push_back(BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, AUDIT_ARCH_AARCH64, 2, 0));
+    f.push_back(BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, AUDIT_ARCH_ARM, 1, 0));
+    Trap(f);
+    return f.size() - 2;
+}
+
+static bool install_filter(filter const& f) {
+    struct sock_fprog prog = {
+        (unsigned short) f.size(),
+        (struct sock_filter*) &f[0],
+    };
+
+    if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog) < 0) {
+        ALOGE("SECCOMP: Could not set seccomp filter of size %zu: %s", f.size(), strerror(errno));
+        return false;
+    }
+
+    ALOGI("SECCOMP: Global filter of size %zu installed", f.size());
+    return true;
+}
+
+bool set_seccomp_filter() {
+    filter f;
+
+    // Note that for mixed 64/32 bit architectures, ValidateArchitecture inserts a
+    // jump that must be changed to point to the start of the 32-bit policy
+    // 32 bit syscalls will not hit the policy between here and the call to SetJump
+    auto offset_to_32bit_filter =
+        ValidateArchitectureAndJumpIfNeeded(f);
+
+    // 64-bit filter
+    ExamineSyscall(f);
+
+    // arm64-only filter - autogenerated from bionic syscall usage
+    for (size_t i = 0; i < arm64_filter_size; ++i)
+        f.push_back(arm64_filter[i]);
+
+    // Syscalls needed to boot Android
+    AllowSyscall(f, 41);  // __NR_pivot_root
+    AllowSyscall(f, 31);  // __NR_ioprio_get
+    AllowSyscall(f, 30);  // __NR_ioprio_set
+    AllowSyscall(f, 178); // __NR_gettid
+    AllowSyscall(f, 98);  // __NR_futex
+    AllowSyscall(f, 220); // __NR_clone
+    AllowSyscall(f, 139); // __NR_rt_sigreturn
+    AllowSyscall(f, 240); // __NR_rt_tgsigqueueinfo
+    AllowSyscall(f, 128); // __NR_restart_syscall
+    AllowSyscall(f, 278); // __NR_getrandom
+
+    // Needed for performance tools
+    AllowSyscall(f, 241); // __NR_perf_event_open
+
+    // Needed for strace
+    AllowSyscall(f, 130); // __NR_tkill
+
+    // Needed for kernel to restart syscalls
+    AllowSyscall(f, 128); // __NR_restart_syscall
+
+    // b/35034743
+    AllowSyscall(f, 267); // __NR_syncfs
+
+    // b/34763393
+    AllowSyscall(f, 277); // __NR_seccomp
+
+    Trap(f);
+
+    if (SetValidateArchitectureJumpTarget(offset_to_32bit_filter, f) != 0)
+        return -1;
+
+    // 32-bit filter
+    ExamineSyscall(f);
+
+    // arm32 filter - autogenerated from bionic syscall usage
+    for (size_t i = 0; i < arm_filter_size; ++i)
+        f.push_back(arm_filter[i]);
+
+    // Syscalls needed to boot android
+    AllowSyscall(f, 120); // __NR_clone
+    AllowSyscall(f, 240); // __NR_futex
+    AllowSyscall(f, 119); // __NR_sigreturn
+    AllowSyscall(f, 173); // __NR_rt_sigreturn
+    AllowSyscall(f, 363); // __NR_rt_tgsigqueueinfo
+    AllowSyscall(f, 224); // __NR_gettid
+
+    // Syscalls needed to run Chrome
+    AllowSyscall(f, 383); // __NR_seccomp - needed to start Chrome
+    AllowSyscall(f, 384); // __NR_getrandom - needed to start Chrome
+
+    // Syscalls needed to run GFXBenchmark
+    AllowSyscall(f, 190); // __NR_vfork
+
+    // Needed for strace
+    AllowSyscall(f, 238); // __NR_tkill
+
+    // Needed for kernel to restart syscalls
+    AllowSyscall(f, 0);   // __NR_restart_syscall
+
+    // Needed for debugging 32-bit Chrome
+    AllowSyscall(f, 42);  // __NR_pipe
+
+    // b/34732712
+    AllowSyscall(f, 364); // __NR_perf_event_open
+
+    // b/34651972
+    AllowSyscall(f, 33);  // __NR_access
+    AllowSyscall(f, 195); // __NR_stat64
+
+    // b/34813887
+    AllowSyscall(f, 5);   // __NR_open
+    AllowSyscall(f, 141); // __NR_getdents
+    AllowSyscall(f, 217); // __NR_getdents64
+
+    // b/34719286
+    AllowSyscall(f, 351); // __NR_eventfd
+
+    // b/34817266
+    AllowSyscall(f, 252); // __NR_epoll_wait
+
+    // Needed by sanitizers (b/34606909)
+    // 5 (__NR_open) and 195 (__NR_stat64) are also required, but they are
+    // already allowed.
+    AllowSyscall(f, 85);  // __NR_readlink
+
+    // b/34908783
+    AllowSyscall(f, 250); // __NR_epoll_create
+
+    // b/34979910
+    AllowSyscall(f, 8);   // __NR_creat
+    AllowSyscall(f, 10);  // __NR_unlink
+
+    // b/35059702
+    AllowSyscall(f, 196); // __NR_lstat64
+
+    Trap(f);
+
+    return install_filter(f);
+}
+
+static void Seccomp_setPolicy(JNIEnv* /*env*/) {
+    if (!set_seccomp_filter()) {
+        ALOGE("Failed to set seccomp policy - killing");
+        exit(1);
+    }
+}
+
+#else // #if defined __arm__ || defined __aarch64__
+
+static void Seccomp_setPolicy(JNIEnv* /*env*/) {
+}
+
+#endif
+
+static const JNINativeMethod method_table[] = {
+    NATIVE_METHOD(Seccomp, setPolicy, "()V"),
+};
+
+namespace android {
+
+int register_android_os_seccomp(JNIEnv* env) {
+    return android::RegisterMethodsOrDie(env, "android/os/Seccomp",
+                                         method_table, NELEM(method_table));
+}
+
+}
diff --git a/core/jni/android_view_HardwareLayer.cpp b/core/jni/android_view_HardwareLayer.cpp
index 65c1590..d934870 100644
--- a/core/jni/android_view_HardwareLayer.cpp
+++ b/core/jni/android_view_HardwareLayer.cpp
@@ -66,10 +66,10 @@
 }
 
 static void android_view_HardwareLayer_setSurfaceTexture(JNIEnv* env, jobject clazz,
-        jlong layerUpdaterPtr, jobject surface, jboolean isAlreadyAttached) {
+        jlong layerUpdaterPtr, jobject surface) {
     DeferredLayerUpdater* layer = reinterpret_cast<DeferredLayerUpdater*>(layerUpdaterPtr);
     sp<GLConsumer> surfaceTexture(SurfaceTexture_getSurfaceTexture(env, surface));
-    layer->setSurfaceTexture(surfaceTexture, !isAlreadyAttached);
+    layer->setSurfaceTexture(surfaceTexture);
 }
 
 static void android_view_HardwareLayer_updateSurfaceTexture(JNIEnv* env, jobject clazz,
@@ -88,7 +88,7 @@
     { "nPrepare",                "(JIIZ)Z",    (void*) android_view_HardwareLayer_prepare },
     { "nSetLayerPaint",          "(JJ)V",      (void*) android_view_HardwareLayer_setLayerPaint },
     { "nSetTransform",           "(JJ)V",      (void*) android_view_HardwareLayer_setTransform },
-    { "nSetSurfaceTexture",      "(JLandroid/graphics/SurfaceTexture;Z)V",
+    { "nSetSurfaceTexture",      "(JLandroid/graphics/SurfaceTexture;)V",
             (void*) android_view_HardwareLayer_setSurfaceTexture },
     { "nUpdateSurfaceTexture",   "(J)V",       (void*) android_view_HardwareLayer_updateSurfaceTexture },
 };
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/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp
index 5c65241..c3f0e9d 100644
--- a/core/jni/com_android_internal_os_Zygote.cpp
+++ b/core/jni/com_android_internal_os_Zygote.cpp
@@ -247,24 +247,42 @@
 
 static void DropCapabilitiesBoundingSet(JNIEnv* env) {
   for (int i = 0; prctl(PR_CAPBSET_READ, i, 0, 0, 0) >= 0; i++) {
-    // Keep CAP_SYS_PTRACE in our bounding set so crash_dump can gain it.
-    if (i == CAP_SYS_PTRACE) {
-      continue;
-    }
-
     int rc = prctl(PR_CAPBSET_DROP, i, 0, 0, 0);
     if (rc == -1) {
       if (errno == EINVAL) {
         ALOGE("prctl(PR_CAPBSET_DROP) failed with EINVAL. Please verify "
               "your kernel is compiled with file capabilities support");
       } else {
+        ALOGE("prctl(PR_CAPBSET_DROP, %d) failed: %s", i, strerror(errno));
         RuntimeAbort(env, __LINE__, "prctl(PR_CAPBSET_DROP) failed");
       }
     }
   }
 }
 
-static void SetCapabilities(JNIEnv* env, int64_t permitted, int64_t effective) {
+static void SetInheritable(JNIEnv* env, uint64_t inheritable) {
+  __user_cap_header_struct capheader;
+  memset(&capheader, 0, sizeof(capheader));
+  capheader.version = _LINUX_CAPABILITY_VERSION_3;
+  capheader.pid = 0;
+
+  __user_cap_data_struct capdata[2];
+  if (capget(&capheader, &capdata[0]) == -1) {
+    ALOGE("capget failed: %s", strerror(errno));
+    RuntimeAbort(env, __LINE__, "capget failed");
+  }
+
+  capdata[0].inheritable = inheritable;
+  capdata[1].inheritable = inheritable >> 32;
+
+  if (capset(&capheader, &capdata[0]) == -1) {
+    ALOGE("capset(inh=%" PRIx64 ") failed: %s", inheritable, strerror(errno));
+    RuntimeAbort(env, __LINE__, "capset failed");
+  }
+}
+
+static void SetCapabilities(JNIEnv* env, uint64_t permitted, uint64_t effective,
+                            uint64_t inheritable) {
   __user_cap_header_struct capheader;
   memset(&capheader, 0, sizeof(capheader));
   capheader.version = _LINUX_CAPABILITY_VERSION_3;
@@ -276,9 +294,12 @@
   capdata[1].effective = effective >> 32;
   capdata[0].permitted = permitted;
   capdata[1].permitted = permitted >> 32;
+  capdata[0].inheritable = inheritable;
+  capdata[1].inheritable = inheritable >> 32;
 
   if (capset(&capheader, &capdata[0]) == -1) {
-    ALOGE("capset(%" PRId64 ", %" PRId64 ") failed", permitted, effective);
+    ALOGE("capset(perm=%" PRIx64 ", eff=%" PRIx64 ", inh=%" PRIx64 ") failed: %s", permitted,
+          effective, inheritable, strerror(errno));
     RuntimeAbort(env, __LINE__, "capset failed");
   }
 }
@@ -532,6 +553,7 @@
       EnableKeepCapabilities(env);
     }
 
+    SetInheritable(env, permittedCapabilities);
     DropCapabilitiesBoundingSet(env);
 
     bool use_native_bridge = !is_system_server && (instructionSet != NULL)
@@ -604,7 +626,7 @@
         }
     }
 
-    SetCapabilities(env, permittedCapabilities, effectiveCapabilities);
+    SetCapabilities(env, permittedCapabilities, effectiveCapabilities, permittedCapabilities);
 
     SetSchedulerPolicy(env);
 
@@ -784,6 +806,10 @@
     UnmountTree("/storage");
 }
 
+static void com_android_internal_os_Zygote_nativeResetNicePriority(JNIEnv* env, jclass) {
+    ResetNicePriority(env);
+}
+
 static const JNINativeMethod gMethods[] = {
     { "nativeForkAndSpecialize",
       "(II[II[[IILjava/lang/String;Ljava/lang/String;[I[ILjava/lang/String;Ljava/lang/String;)I",
@@ -793,7 +819,9 @@
     { "nativeAllowFileAcrossFork", "(Ljava/lang/String;)V",
       (void *) com_android_internal_os_Zygote_nativeAllowFileAcrossFork },
     { "nativeUnmountStorageOnInit", "()V",
-      (void *) com_android_internal_os_Zygote_nativeUnmountStorageOnInit }
+      (void *) com_android_internal_os_Zygote_nativeUnmountStorageOnInit },
+    { "nativeResetNicePriority", "()V",
+      (void *) com_android_internal_os_Zygote_nativeResetNicePriority }
 };
 
 int register_com_android_internal_os_Zygote(JNIEnv* env) {
diff --git a/core/jni/include/android_runtime/android_hardware_HardwareBuffer.h b/core/jni/include/android_runtime/android_hardware_HardwareBuffer.h
index 60e065c..a5d0596 100644
--- a/core/jni/include/android_runtime/android_hardware_HardwareBuffer.h
+++ b/core/jni/include/android_runtime/android_hardware_HardwareBuffer.h
@@ -40,12 +40,13 @@
       uint32_t format);
 
 /* Convert from AHARDWAREBUFFER_USAGE* flags to to gralloc usage flags. */
-extern uint32_t android_hardware_HardwareBuffer_convertToGrallocUsageBits(
-      uint64_t usage0, uint64_t usage1);
+extern void android_hardware_HardwareBuffer_convertToGrallocUsageBits(
+      uint64_t usage0, uint64_t usage1, uint64_t* outProducerUsage,
+      uint64_t* outConsumerUsage);
 
 /* Convert from gralloc usage flags to to AHARDWAREBUFFER_USAGE0* flags. */
 extern uint64_t android_hardware_HardwareBuffer_convertFromGrallocUsageBits(
-      uint64_t usage0);
+      uint64_t producerUsage, uint64_t consumerUsage);
 
 } // namespace android
 
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/os/incident.proto b/core/proto/android/os/incident.proto
index 9beae08..ba1d664 100644
--- a/core/proto/android/os/incident.proto
+++ b/core/proto/android/os/incident.proto
@@ -23,6 +23,7 @@
 import "frameworks/base/core/proto/android/service/appwidget.proto";
 import "frameworks/base/core/proto/android/service/fingerprint.proto";
 import "frameworks/base/core/proto/android/service/netstats.proto";
+import "frameworks/base/core/proto/android/service/notification.proto";
 import "frameworks/base/core/proto/android/providers/settings.proto";
 
 package android.os;
@@ -55,4 +56,5 @@
     android.service.NetworkStatsServiceDumpProto netstats = 3001;
     android.providers.settings.SettingsServiceDumpProto settings = 3002;
     android.service.appwidget.AppWidgetServiceDumpProto appwidget = 3003;
+    android.service.notification.NotificationServiceDumpProto notification = 3004;
 }
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/proto/android/service/battery.proto b/core/proto/android/service/battery.proto
new file mode 100644
index 0000000..33ad682b
--- /dev/null
+++ b/core/proto/android/service/battery.proto
@@ -0,0 +1,76 @@
+/*
+ * 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.
+ */
+
+syntax = "proto3";
+
+package android.service.battery;
+
+option java_multiple_files = true;
+option java_outer_classname = "BatteryServiceProto";
+
+message BatteryServiceDumpProto {
+    enum BatteryPlugged {
+        BATTERY_PLUGGED_NONE = 0;
+        BATTERY_PLUGGED_AC = 1;
+        BATTERY_PLUGGED_USB = 2;
+        BATTERY_PLUGGED_WIRELESS = 4;
+    }
+    enum BatteryStatus {
+        BATTERY_STATUS_INVALID = 0;
+        BATTERY_STATUS_UNKNOWN = 1;
+        BATTERY_STATUS_CHARGING = 2;
+        BATTERY_STATUS_DISCHARGING = 3;
+        BATTERY_STATUS_NOT_CHARGING = 4;
+        BATTERY_STATUS_FULL = 5;
+    }
+    enum BatteryHealth {
+        BATTERY_HEALTH_INVALID = 0;
+        BATTERY_HEALTH_UNKNOWN = 1;
+        BATTERY_HEALTH_GOOD = 2;
+        BATTERY_HEALTH_OVERHEAT = 3;
+        BATTERY_HEALTH_DEAD = 4;
+        BATTERY_HEALTH_OVER_VOLTAGE = 5;
+        BATTERY_HEALTH_UNSPECIFIED_FAILURE = 6;
+        BATTERY_HEALTH_COLD = 7;
+    }
+
+    // If true: UPDATES STOPPED -- use 'reset' to restart
+    bool are_updates_stopped = 1;
+    // Plugged status of power sources
+    BatteryPlugged plugged = 2;
+    // Max current in microamperes
+    int32 max_charging_current = 3;
+    // Max voltage
+    int32 max_charging_voltage = 4;
+    // Battery capacity in microampere-hours
+    int32 charge_counter = 5;
+    // Charging status
+    BatteryStatus status = 6;
+    // Battery health
+    BatteryHealth health = 7;
+    // True if the battery is present
+    bool is_present = 8;
+    // Charge level, from 0 through "scale" inclusive
+    int32 level = 9;
+    // The maximum value for the charge level
+    int32 scale = 10;
+    // Battery voltage in millivolts
+    int32 voltage = 11;
+    // Battery temperature in tenths of a degree Centigrade
+    int32 temperature = 12;
+    // The type of battery installed, e.g. "Li-ion"
+    string technology = 13;
+}
diff --git a/core/proto/android/service/netstats.proto b/core/proto/android/service/netstats.proto
index 5cca6ab..5a577b1 100644
--- a/core/proto/android/service/netstats.proto
+++ b/core/proto/android/service/netstats.proto
@@ -27,12 +27,16 @@
 
     repeated NetworkInterfaceProto active_uid_interfaces = 2;
 
+    // Device level network stats, which may include non-IP layer traffic.
     NetworkStatsRecorderProto dev_stats = 3;
 
+    // IP-layer traffic stats.
     NetworkStatsRecorderProto xt_stats = 4;
 
+    // Per-UID network stats.
     NetworkStatsRecorderProto uid_stats = 5;
 
+    // Per-UID, per-tag network stats, excluding the default tag (i.e. tag=0).
     NetworkStatsRecorderProto uid_tag_stats = 6;
 }
 
diff --git a/core/proto/android/service/notification.proto b/core/proto/android/service/notification.proto
new file mode 100644
index 0000000..819460e
--- /dev/null
+++ b/core/proto/android/service/notification.proto
@@ -0,0 +1,64 @@
+/*
+ * 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.
+ */
+
+syntax = "proto3";
+
+package android.service.notification;
+
+option java_multiple_files = true;
+option java_outer_classname = "NotificationServiceProto";
+
+message NotificationServiceDumpProto {
+    repeated NotificationRecordProto records = 1;
+
+    ZenModeProto zen = 2;
+}
+
+message NotificationRecordProto {
+    string key = 1;
+    State state = 2;
+    int32 flags = 3;
+    string channelId = 4;
+    string sound = 5;
+    int32 sound_usage = 6;
+    bool can_vibrate = 7;
+    bool can_show_light = 8;
+    string group_key = 9;
+    int32 importance = 10;
+}
+
+enum State {
+    ENQUEUED = 0;
+
+    POSTED = 1;
+
+    SNOOZED = 2;
+}
+
+message ZenModeProto {
+    ZenMode zen_mode = 1;
+    repeated string enabled_active_conditions = 2;
+    int32 suppressed_effects = 3;
+    repeated string suppressors = 4;
+    string policy = 5;
+}
+
+enum ZenMode {
+    ZEN_MODE_OFF = 0;
+    ZEN_MODE_IMPORTANT_INTERRUPTIONS = 1;
+    ZEN_MODE_NO_INTERRUPTIONS = 2;
+    ZEN_MODE_ALARMS = 3;
+}
\ No newline at end of file
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 11eb47b..97fbfa5 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         -->
     <!-- ================================== -->
@@ -1807,6 +1813,22 @@
         android:description="@string/permdesc_systemAlertWindow"
         android:protectionLevel="signature|preinstalled|appop|pre23|development" />
 
+    <!-- Allows an app to run in the background.
+         <p>Protection level: signature
+    -->
+    <permission android:name="android.permission.RUN_IN_BACKGROUND"
+        android:label="@string/permlab_runInBackground"
+        android:description="@string/permdesc_runInBackground"
+        android:protectionLevel="signature" />
+
+    <!-- Allows an app to use data in the background.
+         <p>Protection level: signature
+    -->
+    <permission android:name="android.permission.USE_DATA_IN_BACKGROUND"
+        android:label="@string/permlab_useDataInBackground"
+        android:description="@string/permdesc_useDataInBackground"
+        android:protectionLevel="signature" />
+
     <!-- ================================== -->
     <!-- Permissions affecting the system wallpaper -->
     <!-- ================================== -->
@@ -2365,6 +2387,11 @@
     <permission android:name="android.permission.BIND_PRINT_SPOOLER_SERVICE"
         android:protectionLevel="signature" />
 
+    <!-- Must be required by the CompanionDeviceManager to ensure that only the system can bind to it.
+         @hide -->
+    <permission android:name="android.permission.BIND_COMPANION_DEVICE_MANAGER_SERVICE"
+        android:protectionLevel="signature" />
+
     <!-- @SystemApi Must be required by the RuntimePermissionPresenterService to ensure
          that only the system can bind to it.
          @hide -->
@@ -2985,7 +3012,7 @@
          any metadata and intents attached.
          @hide -->
     <permission android:name="android.permission.ACCESS_NOTIFICATIONS"
-        android:protectionLevel="signature|privileged" />
+        android:protectionLevel="signature|privileged|appop" />
 
     <!-- Marker permission for applications that wish to access notification policy.
          <p>Protection level: normal
@@ -3215,6 +3242,11 @@
     <permission android:name="android.permission.BIND_VR_LISTENER_SERVICE"
         android:protectionLevel="signature" />
 
+    <!-- Must be required by system apps when accessing restricted VR APIs.
+         <p>Protection level: signature -->
+    <permission android:name="android.permission.RESTRICTED_VR_ACCESS"
+        android:protectionLevel="signature|preinstalled" />
+
     <!-- Required to make calls to {@link android.service.vr.IVrManager}.
          @hide -->
     <permission android:name="android.permission.ACCESS_VR_MANAGER"
@@ -3242,6 +3274,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/drawable/btn_event_material.xml b/core/res/res/drawable/btn_event_material.xml
new file mode 100644
index 0000000..47c49cf
--- /dev/null
+++ b/core/res/res/drawable/btn_event_material.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     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.
+-->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24dp"
+        android:height="24dp"
+        android:viewportWidth="24"
+        android:viewportHeight="24">
+
+    <path
+        android:fillColor="#90ffffff"
+        android:pathData="M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99 .9 -1.99 2L3 19c0 1.1 .89 2 2
+2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z" />
+    <path android:pathData="M0 0h24v24H0z" />
+</vector>
\ No newline at end of file
diff --git a/core/res/res/drawable/btn_keyboard_key_material.xml b/core/res/res/drawable/btn_keyboard_key_material.xml
new file mode 100644
index 0000000..14a9492f
--- /dev/null
+++ b/core/res/res/drawable/btn_keyboard_key_material.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     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.
+-->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24dp"
+        android:height="24dp"
+        android:viewportWidth="24"
+        android:viewportHeight="24">
+
+    <path
+        android:fillColor="#90ffffff"
+        android:pathData="M20 5H4c-1.1 0-1.99 .9 -1.99 2L2 17c0 1.1 .9 2 2 2h16c1.1 0 2-.9
+2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0
+3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9
+7H8v-2h8v2zm0-4h-2v-2h2v2zm0-3h-2V8h2v2zm3 3h-2v-2h2v2zm0-3h-2V8h2v2z" />
+    <path
+        android:pathData="M0 0h24v24H0zm0 0h24v24H0z" />
+</vector>
\ No newline at end of file
diff --git a/core/res/res/values-ldrtl/dimens.xml b/core/res/res/drawable/resolver_icon_placeholder.xml
similarity index 69%
copy from core/res/res/values-ldrtl/dimens.xml
copy to core/res/res/drawable/resolver_icon_placeholder.xml
index 807c042..049cfee 100644
--- a/core/res/res/values-ldrtl/dimens.xml
+++ b/core/res/res/drawable/resolver_icon_placeholder.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!-- 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.
@@ -13,8 +13,7 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-
-<resources>
-    <item type="dimen" format="integer" name="time_picker_column_start_material">1</item>
-    <item type="dimen" format="integer" name="time_picker_column_end_material">0</item>
-</resources>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
+    <solid android:color="#10000000"/>
+    <size android:width="36dp" android:height="36dp"/>
+</shape>
\ No newline at end of file
diff --git a/core/res/res/layout-land/time_picker_material.xml b/core/res/res/layout-land/time_picker_material.xml
index 70833d6..8b95f9f 100644
--- a/core/res/res/layout-land/time_picker_material.xml
+++ b/core/res/res/layout-land/time_picker_material.xml
@@ -15,28 +15,17 @@
      limitations under the License.
 -->
 
-<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:layoutDirection="ltr">
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content">
 
-    <!-- Provides a background for the time layout that extends into the button bar area. -->
-    <com.android.internal.widget.DrawingSpace
+    <LinearLayout
         android:id="@+id/time_header"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_column="@dimen/time_picker_column_start_material"
-        android:layout_row="0"
-        android:layout_rowSpan="3"
-        android:layout_gravity="center|fill"
-        android:layoutDirection="locale" />
-
-    <RelativeLayout
         android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_column="@dimen/time_picker_column_start_material"
-        android:layout_row="1"
-        android:layout_gravity="center|fill"
+        android:layout_height="match_parent"
+        android:orientation="vertical"
+        android:gravity="center"
         android:paddingStart="?attr/dialogPreferredPadding"
         android:paddingEnd="?attr/dialogPreferredPadding">
 
@@ -44,10 +33,8 @@
             android:id="@+id/time_layout"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:orientation="horizontal"
-            android:layout_centerInParent="true"
             android:paddingTop="@dimen/timepicker_radial_picker_top_margin"
-            android:layout_marginBottom="-12dp">
+            android:orientation="horizontal">
 
             <!-- The hour should always be to the left of the separator,
                  regardless of the current locale's layout direction. -->
@@ -125,38 +112,71 @@
                 android:includeFontPadding="false"
                 android:button="@null" />
         </RadioGroup>
-    </RelativeLayout>
+    </LinearLayout>
 
-    <ViewStub
-        android:id="@id/topPanel"
-        android:layout="@layout/alert_dialog_title_material"
+    <TextView
+        android:visibility="gone"
+        android:id="@+id/input_header"
+        android:layout_width="wrap_content"
+        android:layout_height="match_parent"
+        android:gravity="center"
+        android:paddingStart="@dimen/dialog_padding_material"
+        android:paddingEnd="@dimen/dialog_padding_material"
+        android:paddingTop="20dp"
+        android:paddingBottom="20dp"
+        android:includeFontPadding="false"
+        android:textAppearance="@style/TextAppearance.Material.TimePicker.InputHeader"
+        android:text="@string/time_picker_header_text"/>
+
+    <LinearLayout
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_column="@dimen/time_picker_column_end_material"
-        android:layout_row="0"
-        android:layout_gravity="top|fill_horizontal"
-        android:layoutDirection="locale" />
+        android:orientation="vertical">
 
-    <android.widget.RadialTimePickerView
-        android:id="@+id/radial_picker"
-        android:layout_width="@dimen/timepicker_radial_picker_dimen"
-        android:layout_height="@dimen/timepicker_radial_picker_dimen"
-        android:layout_column="@dimen/time_picker_column_end_material"
-        android:layout_row="1"
-        android:layout_rowWeight="1"
-        android:layout_gravity="center|fill"
-        android:layout_marginTop="@dimen/timepicker_radial_picker_top_margin"
-        android:layout_marginStart="@dimen/timepicker_radial_picker_horizontal_margin"
-        android:layout_marginEnd="@dimen/timepicker_radial_picker_horizontal_margin"
-        android:layoutDirection="locale" />
+        <android.widget.RadialTimePickerView
+            android:id="@+id/radial_picker"
+            android:layout_width="@dimen/timepicker_radial_picker_dimen"
+            android:layout_height="@dimen/timepicker_radial_picker_dimen"
+            android:layout_gravity="center|fill"
+            android:layout_marginTop="@dimen/timepicker_radial_picker_top_margin"
+            android:layout_marginStart="@dimen/timepicker_radial_picker_horizontal_margin"
+            android:layout_marginEnd="@dimen/timepicker_radial_picker_horizontal_margin"
+            android:layoutDirection="locale" />
 
-    <ViewStub
-        android:id="@id/buttonPanel"
-        android:layout="@layout/alert_dialog_button_bar_material"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_column="@dimen/time_picker_column_end_material"
-        android:layout_row="2"
-        android:layout_gravity="bottom|fill_horizontal"
-        android:layoutDirection="locale" />
-</GridLayout>
+        <android.widget.TextInputTimePickerView
+            android:id="@+id/input_mode"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:paddingStart="?attr/dialogPreferredPadding"
+            android:paddingEnd="?attr/dialogPreferredPadding"
+            android:visibility="gone" />
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+            <ImageButton
+                android:id="@+id/toggle_mode"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:layout_marginStart="12dp"
+                android:layout_marginEnd="12dp"
+                android:padding="12dp"
+                android:background="?attr/selectableItemBackgroundBorderless"
+                android:tint="?attr/colorControlNormal"
+                android:src="@drawable/btn_keyboard_key_material"
+                android:contentDescription="@string/time_picker_text_input_mode_description" />
+            <Space
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_weight="1" />
+            <ViewStub
+                android:id="@id/buttonPanel"
+                android:layout="@layout/alert_dialog_button_bar_material"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layoutDirection="locale" />
+        </LinearLayout>
+    </LinearLayout>
+
+</LinearLayout>
\ No newline at end of file
diff --git a/core/res/res/layout/chooser_grid.xml b/core/res/res/layout/chooser_grid.xml
index d8dd447..7dee2af 100644
--- a/core/res/res/layout/chooser_grid.xml
+++ b/core/res/res/layout/chooser_grid.xml
@@ -53,8 +53,7 @@
                    android:visibility="gone"
                    android:scaleType="fitCenter"
                    android:layout_below="@id/profile_button"
-                   android:layout_alignParentLeft="true"
-                   />
+                   android:layout_alignParentLeft="true"/>
         <TextView android:id="@+id/title"
                   android:layout_height="wrap_content"
                   android:layout_width="wrap_content"
diff --git a/core/res/res/layout/notification_template_material_big_text.xml b/core/res/res/layout/notification_template_material_big_text.xml
index f4f783e..1aca99f 100644
--- a/core/res/res/layout/notification_template_material_big_text.xml
+++ b/core/res/res/layout/notification_template_material_big_text.xml
@@ -48,12 +48,11 @@
             <include layout="@layout/notification_template_progress" />
             <com.android.internal.widget.ImageFloatingTextView android:id="@+id/big_text"
                 android:layout_width="match_parent"
-                android:layout_height="0dp"
+                android:layout_height="wrap_content"
                 android:layout_marginTop="@dimen/notification_text_margin_top"
                 android:paddingBottom="@dimen/notification_content_margin_bottom"
                 android:textAppearance="@style/TextAppearance.Material.Notification"
                 android:singleLine="false"
-                android:layout_weight="1"
                 android:gravity="top"
                 android:visibility="gone"
                 />
diff --git a/core/res/res/layout/notification_template_material_messaging.xml b/core/res/res/layout/notification_template_material_messaging.xml
index 07b1100..b910211 100644
--- a/core/res/res/layout/notification_template_material_messaging.xml
+++ b/core/res/res/layout/notification_template_material_messaging.xml
@@ -50,8 +50,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:paddingBottom="@dimen/notification_content_margin_bottom"
-                android:spacing="@dimen/notification_messaging_spacing"
-                android:maxHeight="165dp">
+                android:spacing="@dimen/notification_messaging_spacing" >
                 <com.android.internal.widget.ImageFloatingTextView android:id="@+id/inbox_text0"
                     style="@style/Widget.Material.Notification.MessagingText"
                     />
diff --git a/core/res/res/layout/preference_list_content.xml b/core/res/res/layout/preference_list_content.xml
index 02cd8cd..bed80ed 100644
--- a/core/res/res/layout/preference_list_content.xml
+++ b/core/res/res/layout/preference_list_content.xml
@@ -24,6 +24,7 @@
     android:layout_width="match_parent">
 
     <LinearLayout
+        android:id="@+id/prefs_container"
         android:orientation="horizontal"
         android:layout_width="match_parent"
         android:layout_height="0px"
@@ -61,8 +62,7 @@
                 android:layout_width="0px"
                 android:layout_height="match_parent"
                 android:layout_weight="@integer/preferences_right_pane_weight"
-                android:orientation="vertical"
-                android:visibility="gone" >
+                android:orientation="vertical">
 
             <!-- Breadcrumb inserted here, in certain screen sizes. In others, it will be an
                 empty layout or just padding, and PreferenceActivity will put the breadcrumbs in
diff --git a/core/res/res/layout/preference_list_content_material.xml b/core/res/res/layout/preference_list_content_material.xml
index 1bc527e..37b4119 100644
--- a/core/res/res/layout/preference_list_content_material.xml
+++ b/core/res/res/layout/preference_list_content_material.xml
@@ -24,6 +24,7 @@
     android:layout_width="match_parent">
 
     <LinearLayout
+        android:id="@+id/prefs_container"
         android:orientation="horizontal"
         android:layout_width="match_parent"
         android:layout_height="0px"
@@ -64,8 +65,7 @@
                 android:layout_width="0px"
                 android:layout_height="match_parent"
                 android:layout_weight="@integer/preferences_right_pane_weight"
-                android:orientation="vertical"
-                android:visibility="gone" >
+                android:orientation="vertical">
 
             <!-- Breadcrumb inserted here, in certain screen sizes. In others, it will be an
                 empty layout or just padding, and PreferenceActivity will put the breadcrumbs in
diff --git a/core/res/res/layout/resolver_list_with_default.xml b/core/res/res/layout/resolver_list_with_default.xml
index 02dc2ed..8101183 100644
--- a/core/res/res/layout/resolver_list_with_default.xml
+++ b/core/res/res/layout/resolver_list_with_default.xml
@@ -45,6 +45,7 @@
                 android:layout_marginStart="16dp"
                 android:layout_marginEnd="16dp"
                 android:layout_marginTop="20dp"
+                android:src="@drawable/resolver_icon_placeholder"
                 android:scaleType="fitCenter" />
 
             <TextView
diff --git a/core/res/res/layout/time_picker_material.xml b/core/res/res/layout/time_picker_material.xml
index 37a7384..7597379 100644
--- a/core/res/res/layout/time_picker_material.xml
+++ b/core/res/res/layout/time_picker_material.xml
@@ -34,4 +34,53 @@
         android:layout_marginTop="@dimen/timepicker_radial_picker_top_margin"
         android:layout_marginStart="@dimen/timepicker_radial_picker_horizontal_margin"
         android:layout_marginEnd="@dimen/timepicker_radial_picker_horizontal_margin" />
+    <TextView
+        android:visibility="gone"
+        android:id="@+id/input_header"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:paddingStart="@dimen/dialog_padding_material"
+        android:paddingEnd="@dimen/dialog_padding_material"
+        android:paddingTop="20dp"
+        android:paddingBottom="20dp"
+        android:includeFontPadding="false"
+        android:fontFamily="sans-serif-medium"
+        android:textSize="34sp"
+        android:textColor="@color/white"
+        android:text="@string/time_picker_header_text"/>
+    <android.widget.TextInputTimePickerView
+        android:id="@+id/input_mode"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:paddingStart="?attr/dialogPreferredPadding"
+        android:paddingEnd="?attr/dialogPreferredPadding"
+        android:visibility="gone" />
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+        <ImageButton
+            android:id="@+id/toggle_mode"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_vertical"
+            android:layout_marginStart="12dp"
+            android:layout_marginEnd="12dp"
+            android:padding="12dp"
+            android:background="?attr/selectableItemBackgroundBorderless"
+            android:tint="?attr/colorControlNormal"
+            android:src="@drawable/btn_keyboard_key_material"
+            android:contentDescription="@string/time_picker_text_input_mode_description" />
+        <Space
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_weight="1" />
+        <ViewStub
+            android:id="@id/buttonPanel"
+            android:layout="@layout/alert_dialog_button_bar_material"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layoutDirection="locale" />
+    </LinearLayout>
+
 </LinearLayout>
diff --git a/core/res/res/layout/time_picker_text_input_material.xml b/core/res/res/layout/time_picker_text_input_material.xml
new file mode 100644
index 0000000..f17b80e
--- /dev/null
+++ b/core/res/res/layout/time_picker_text_input_material.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     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.
+-->
+
+<merge xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <TextView
+        android:id="@+id/top_label"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="26dp"
+        android:layout_marginBottom="8dp"
+        android:text="@string/time_picker_prompt_label"
+        android:textAppearance="@style/TextAppearance.Material.TimePicker.PromptLabel" />
+
+    <RelativeLayout
+        android:id="@+id/input_block"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_below="@id/top_label"
+        android:layoutDirection="ltr">
+        <EditText
+            android:id="@+id/input_hour"
+            android:layout_width="50dp"
+            android:layout_height="wrap_content"
+            android:inputType="number"
+            android:textAppearance="@style/TextAppearance.Material.TimePicker.InputField" />
+        <TextView
+            android:id="@+id/label_hour"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@id/input_hour"
+            android:layout_alignStart="@id/input_hour"
+            android:text="@string/time_picker_hour_label"/>
+
+        <TextView
+            android:id="@+id/input_separator"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignEnd="@id/input_hour"
+            android:layout_alignBaseline="@id/input_hour"
+            android:textAppearance="@style/TextAppearance.Material.TimePicker.InputField" />
+
+        <EditText
+            android:id="@+id/input_minute"
+            android:layout_width="50dp"
+            android:layout_height="wrap_content"
+            android:layout_alignBaseline="@id/input_hour"
+            android:layout_toEndOf="@id/input_separator"
+            android:inputType="number"
+            android:textAppearance="@style/TextAppearance.Material.TimePicker.InputField" />
+        <TextView
+            android:id="@+id/label_minute"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@id/input_minute"
+            android:layout_alignStart="@id/input_minute"
+            android:text="@string/time_picker_minute_label"/>
+
+        <TextView
+            android:visibility="invisible"
+            android:id="@+id/label_error"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@id/input_hour"
+            android:layout_alignStart="@id/input_hour"
+            android:textColor="?attr/textColorError"
+            android:text="@string/time_picker_input_error" />
+    </RelativeLayout>
+    <Spinner
+        android:id="@+id/am_pm_spinner"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignBaseline="@id/input_block"
+        android:layout_alignParentEnd="true"/>
+
+</merge>
\ No newline at end of file
diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml
index 9be3635..1022b13 100644
--- a/core/res/res/values-af/strings.xml
+++ b/core/res/res/values-af/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Beheer die vertoonskerm se zoemvlak en posisionering."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Voer gebare uit"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Kan tik, swiep, knyp en ander gebare uitvoer."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Vingerafdrukgebare"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Kan gebare wat op die toestel se vingerafdruksensor uitgevoer word, vasvang"</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"deaktiveer of verander statusbalk"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Laat die program toe om die statusbalk te deaktiveer en stelselikone by te voeg of te verwyder."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"wees die statusbalk"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Tik vir meer opsies."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB-ontfouter gekoppel"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Tik om USB-ontfouting te deaktiveer."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Kies om USB-ontfouting te deaktiveer."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Neem tans foutverslag …"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Deel foutverslag?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Deel tans foutverslag …"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Nuus en tydskrifte"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB-ontfouting"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"uur"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minuut"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Stel tyd"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Voer \'n geldige tyd in"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Tik tyd in"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Skakel oor na teksmodus vir die tydinvoer."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Skakel oor na horlosiemodus vir die tydinvoer."</string>
 </resources>
diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml
index 41dff04..fd75b35 100644
--- a/core/res/res/values-am/strings.xml
+++ b/core/res/res/values-am/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"የሁኔቴ አሞሌ አቦዝን ወይም ቀይር"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"የስርዓት አዶዎችን ወደ ሁኔታ አሞሌ ላለማስቻል ወይም ለማከል እና ለማስወገድ ለመተግበሪያው ይፈቅዳሉ፡፡"</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"የሁኔታ አሞሌ መሆን"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"ለተጨማሪ አማራጮች መታ ያድርጉ።"</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB አድስ ተያይዟል"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"የዩኤስቢ ማረሚያን ለማሰናከል መታ ያድርጉ።"</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"USB ማረሚያ ላለማንቃት ምረጥ።"</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"የሳንካ ሪፖርትን በመውሰድ ላይ…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"የሳንካ ሪፖርት ይጋራ?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"የሳንካ ሪፖርትን በማጋራት ላይ…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"ዜና እና መጽሔቶች"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"የዩኤስቢ ማረሚያ"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"ሰዓት"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"ደቂቃ"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"ጊዜ አቀናብር"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"የሚሰራ ሰዓት ያስገቡ"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"ሰዓት ይተይቡ"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"ለጊዜ ግቤቱ ወደ የጽሑፍ ግቤት ሁነታ ቀይር።"</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"ለጊዜ ግቤቱ ወደ የሰዓት ሁነታ ቀይር።"</string>
 </resources>
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index 07e1699..1f81714 100644
--- a/core/res/res/values-ar/strings.xml
+++ b/core/res/res/values-ar/strings.xml
@@ -290,6 +290,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="permlab_statusBar" msgid="7417192629601890791">"تعطيل شريط الحالة أو تعديله"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"للسماح للتطبيق بتعطيل شريط الحالة أو إضافة رموز نظام وإزالتها."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"العمل كشريط للحالة"</string>
@@ -1226,6 +1228,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"انقر للحصول على المزيد من الخيارات."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"‏تم توصيل تصحيح أخطاء USB"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"‏انقر لتعطيل تصحيح أخطاء USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"‏اختيار تعطيل تصحيح أخطاء USB."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"جارٍ الحصول على تقرير الخطأ…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"هل تريد مشاركة تقرير الخطأ؟"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"جارٍ مشاركة تقرير الخطأ…"</string>
@@ -1813,4 +1816,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"الأخبار والمجلات"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"‏تصحيح أخطاء USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"ساعة"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"دقيقة"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"تعيين الوقت"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"يُرجى إدخال وقت صالح"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"يُرجى تحديد الوقت"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"يُرجى التبديل إلى وضع إدخال النص لإدخال الوقت."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"يُرجى التبديل إلى وضع الساعة لإدخال الوقت."</string>
 </resources>
diff --git a/core/res/res/values-az/strings.xml b/core/res/res/values-az/strings.xml
index ebc4eed..60c1ce5 100644
--- a/core/res/res/values-az/strings.xml
+++ b/core/res/res/values-az/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Ekran yaxınlaşdırma səviyyəsi və yerləşdirməsinə nəzarət edin."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Jestlər ilə əməliyyat aparın"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Digər jestlərə tıklaya, sürüşdürə və əməliyyat apara bilərsiniz."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Barmaq izi işarələri"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Cihazların barmaq izi sensorunda olan işarələri əldə edə bilər"</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"status panelini deaktivləşdir və ya dəyişdir"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Tətbiqə status panelini deaktiv etməyə və ya sistem ikonalarını əlavə etmək və ya silmək imkanı verir."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"status paneli edin"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Əlavə seçimlər üçün tıklayın."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB sazlama qoşuludur"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"USB debaqı deaktivasiya etmək üçün tıklayın."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"USb debaqı deaktivasiya etməyi seçin."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Baq hesabatı verilir..."</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Baq hesabatı paylaşılsın?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Baq hesabatı paylaşılır..."</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Xəbər və Jurnallar"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB sazlama"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"saat"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"dəqiqə"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Vaxtı ayarlayın"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Düzgün vaxt daxil edin"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Zamanı daxil edin"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Zamanı daxil etmək üçün mətnlə daxiletmə rejiminə keçin"</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Zamanı daxil etmək üçün saat rejiminə keçin"</string>
 </resources>
diff --git a/core/res/res/values-b+sr+Latn/strings.xml b/core/res/res/values-b+sr+Latn/strings.xml
index 810ed0f..4d88979 100644
--- a/core/res/res/values-b+sr+Latn/strings.xml
+++ b/core/res/res/values-b+sr+Latn/strings.xml
@@ -281,6 +281,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Upravlja nivoom zumiranja prikaza i određivanjem položaja."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Obavljanje pokreta"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Može da dodiruje, lista, skuplja prikaz i obavlja druge pokrete."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Pokreti za otisak prsta"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Može da registruje pokrete na senzoru za otisak prsta na uređaju."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"onemogućavanje ili izmena statusne trake"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Dozvoljava aplikaciji da onemogući statusnu traku ili da dodaje i uklanja sistemske ikone."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"funkcionisanje kao statusna traka"</string>
@@ -1166,6 +1168,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Dodirnite za još opcija."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Otklanjanje grešaka sa USB-a je uspostavljeno"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Dodirnite da biste onemogućili otklanjanje grešaka sa USB-a."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Izaberite da biste onemogućili otklanjanja grešaka sa USB-a."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Izveštaj o grešci se generiše…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Želite li da podelite izveštaj o grešci?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Deli se izveštaj o grešci…"</string>
@@ -1720,4 +1723,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Novosti i časopisi"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Otklanjanje grešaka sa USB-a"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"sat"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minut"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Podešavanje vremena"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Unesite važeće vreme"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Unesite vreme"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Pređite u režim unosa teksta radi unosa vremena."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Pređite u režim sata radi unosa vremena."</string>
 </resources>
diff --git a/core/res/res/values-be/strings.xml b/core/res/res/values-be/strings.xml
index 7ad40c4..e6c18ae 100644
--- a/core/res/res/values-be/strings.xml
+++ b/core/res/res/values-be/strings.xml
@@ -284,6 +284,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="permlab_statusBar" msgid="7417192629601890791">"адключаць ці змяняць радок стану"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Дазваляе прыкладанням адключаць радок стану або дадаваць і выдаляць сістэмныя значкі."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"быць панэллю стану"</string>
@@ -1186,6 +1188,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Дакраніцеся, каб атрымаць іншыя параметры."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Адладка па USB падключана"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Дакраніцеся, каб адключыць адладку па USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Выберыце, каб адключыць адладку USB."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Стварэнне справаздачы пра памылку…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Падзяліцца справаздачай пра памылку?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Перадача справаздачы пра памылку..."</string>
@@ -1751,4 +1754,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Навіны і часопісы"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Адладка USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"гадзіна"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"хвіліна"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Задаць час"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Увядзіце дапушчальны час"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Увядзіце час"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Пераключыцца на рэжым тэксту пры ўводзе часу."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Пераключыцца на рэжым гадзінніка пры ўводзе часу."</string>
 </resources>
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index 9afed47..dd91b18 100644
--- a/core/res/res/values-bg/strings.xml
+++ b/core/res/res/values-bg/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"деактивиране или промяна на лентата на състоянието"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Разрешава на приложението да деактивира лентата на състоянието или да добавя и премахва системни икони."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"изпълняване на ролята на лента на състоянието"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Докоснете за още опции."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Отстраняване на грешки през USB"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Докоснете, за да деактивирате отстраняването на грешки през USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Изберете, за да деактивирате отстраняването на грешки през USB."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Сигналът за програмна грешка се извлича…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Да се сподели ли сигналът за програмна грешка?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Сигналът за програмна грешка се споделя…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Новини и списания"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Отстраняване на грешки през USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"час"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"минута"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Задаване на час"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Въведете валиден час"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Въведете часа"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Превключете към режима за въвеждане на текст, за да въведете часа."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Превключете към режима за часовник, за да въведете часа."</string>
 </resources>
diff --git a/core/res/res/values-bn/strings.xml b/core/res/res/values-bn/strings.xml
index 6522537..c137334 100644
--- a/core/res/res/values-bn/strings.xml
+++ b/core/res/res/values-bn/strings.xml
@@ -63,8 +63,8 @@
     <string name="needPuk2" msgid="4526033371987193070">"সিম কার্ড অবরোধ মুক্ত করতে PUK2 লিখুন৷"</string>
     <string name="enablePin" msgid="209412020907207950">"অসফল, সিম/RUIM লক সক্ষম করুন৷"</string>
     <plurals name="pinpuk_attempts" formatted="false" msgid="1251012001539225582">
-      <item quantity="one">আপনার কাছে আর <xliff:g id="NUMBER_1">%d</xliff:g>টি প্রচেষ্টা বাকি রয়েছে এটির পরেই আপনার SIM লক হয়ে যাবে৷</item>
-      <item quantity="other">আপনার কাছে আর <xliff:g id="NUMBER_1">%d</xliff:g>টি প্রচেষ্টা বাকি রয়েছে এটির পরেই আপনার SIM লক হয়ে যাবে৷</item>
+      <item quantity="one">আপনার কাছে আর <xliff:g id="NUMBER_1">%d</xliff:g>টি প্রচেষ্টা বাকি রয়েছে এটির পরেই আপনার সিম লক হয়ে যাবে৷</item>
+      <item quantity="other">আপনার কাছে আর <xliff:g id="NUMBER_1">%d</xliff:g>টি প্রচেষ্টা বাকি রয়েছে এটির পরেই আপনার সিম লক হয়ে যাবে৷</item>
     </plurals>
     <string name="imei" msgid="2625429890869005782">"IMEI"</string>
     <string name="meid" msgid="4841221237681254195">"MEID"</string>
@@ -255,7 +255,7 @@
     <string name="permgrouplab_calendar" msgid="5863508437783683902">"ক্যালেন্ডার"</string>
     <string name="permgroupdesc_calendar" msgid="3889615280211184106">"আপনার ক্যালেন্ডারে অ্যাক্সেস"</string>
     <string name="permgrouplab_sms" msgid="228308803364967808">"SMS"</string>
-    <string name="permgroupdesc_sms" msgid="4656988620100940350">"SMS বার্তাগুলি পাঠাতে এবং দেখতে"</string>
+    <string name="permgroupdesc_sms" msgid="4656988620100940350">"এসএমএসগুলি পাঠাতে এবং দেখতে"</string>
     <string name="permgrouplab_storage" msgid="1971118770546336966">"সঞ্চয়স্থান"</string>
     <string name="permgroupdesc_storage" msgid="637758554581589203">"আপনার ডিভাইসে ফটো, মিডিয়া এবং ফাইলগুলিতে অ্যাক্সেস"</string>
     <string name="permgrouplab_microphone" msgid="171539900250043464">"মাইক্রোফোন"</string>
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"স্থিতি দন্ড নিষ্ক্রিয় অথবা সংশোধন করে"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"অ্যাপ্লিকেশানকে স্থিতি দন্ড অক্ষম করতে এবং সিস্টেম আইকনগুলি সরাতে দেয়৷"</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"স্থিতি দন্ডে থাকুন"</string>
@@ -291,7 +293,7 @@
     <string name="permlab_processOutgoingCalls" msgid="3906007831192990946">"আউটগোয়িং কলগুলি পুনঃচালিত করুন"</string>
     <string name="permdesc_processOutgoingCalls" msgid="5156385005547315876">"অ্যাপ্লিকেশানকে কল চলাকালীন অন্য একটি নম্বরে কল পুনঃনির্দেশ বা কলটি একসথে বন্ধ করার সাথে ডায়াল করা নম্বরটি দেখতে দেয়৷"</string>
     <string name="permlab_receiveSms" msgid="8673471768947895082">"পাঠ্য বার্তা পান (SMS)"</string>
-    <string name="permdesc_receiveSms" msgid="6424387754228766939">"অ্যাপ্লিকেশানটিকে SMS বার্তা প্রাপ্ত করার এবং প্রক্রিয়া করার অনুমতি দেয়৷ এর মানে হল অ্যাপ্লিকেশানটি আপনার ডিভাইস থেকে পাঠানো বার্তাগুলিকে পর্যবেক্ষণ করতে পারে এবং মুছতে পারে সেগুলিকে আপনাকে না দেখিয়ে৷"</string>
+    <string name="permdesc_receiveSms" msgid="6424387754228766939">"অ্যাপ্লিকেশানটিকে এসএমএস প্রাপ্ত করার এবং প্রক্রিয়া করার অনুমতি দেয়৷ এর মানে হল অ্যাপ্লিকেশানটি আপনার ডিভাইস থেকে পাঠানো বার্তাগুলিকে পর্যবেক্ষণ করতে পারে এবং মুছতে পারে সেগুলিকে আপনাকে না দেখিয়ে৷"</string>
     <string name="permlab_receiveMms" msgid="1821317344668257098">"পাঠ্য বার্তা পান (MMS)"</string>
     <string name="permdesc_receiveMms" msgid="533019437263212260">"অ্যাপ্লিকেশানটিকে MMS বার্তা প্রাপ্ত করার এবং প্রক্রিয়া করার অনুমতি দেয়৷ এর মানে হল অ্যাপ্লিকেশানটি আপনার ডিভাইস থেকে পাঠানো বার্তাগুলিকে পর্যবেক্ষণ করতে পারে এবং মুছতে পারে সেগুলিকে আপনাকে না দেখিয়ে৷"</string>
     <string name="permlab_readCellBroadcasts" msgid="1598328843619646166">"সেল সম্প্রচার বার্তা পড়ুন"</string>
@@ -299,7 +301,7 @@
     <string name="permlab_subscribedFeedsRead" msgid="4756609637053353318">"গ্রাহক হিসাবে নেওয়া ফিডগুলি পড়ে"</string>
     <string name="permdesc_subscribedFeedsRead" msgid="5557058907906144505">"অ্যাপ্লিকেশানকে বর্তমানে সিঙ্ক করা ফিডগুলির সম্পর্কে বিবরণ পেতে দেয়৷"</string>
     <string name="permlab_sendSms" msgid="7544599214260982981">"SMS পাঠানো ও দেখা,আপনি কি পরিচিতি কে এগুলি করার অনুমতি দেবেন?"</string>
-    <string name="permdesc_sendSms" msgid="7094729298204937667">"অ্যাপ্লিকেশানটিকে SMS বার্তাগুলি পাঠাতে অনুমতি দেয়৷ এর জন্য অপ্রত্যাশিত চার্জ কাটা হতে পারে৷ ক্ষতিকারক অ্যাপ্লিকেশানগুলি আপনার নিশ্চিতকরণ ছাড়া বার্তা পাঠানোর মাধ্যমে আপনাকে অর্থ চার্জ করতে পারে৷"</string>
+    <string name="permdesc_sendSms" msgid="7094729298204937667">"অ্যাপ্লিকেশানটিকে এসএমএসগুলি পাঠাতে অনুমতি দেয়৷ এর জন্য অপ্রত্যাশিত চার্জ কাটা হতে পারে৷ ক্ষতিকারক অ্যাপ্লিকেশানগুলি আপনার নিশ্চিতকরণ ছাড়া বার্তা পাঠানোর মাধ্যমে আপনাকে অর্থ চার্জ করতে পারে৷"</string>
     <string name="permlab_readSms" msgid="8745086572213270480">"আপনার পাঠ্য বার্তা পড়ুন (SMS বা MMS)"</string>
     <string name="permdesc_readSms" product="tablet" msgid="4741697454888074891">"এই অ্যাপটি আপনার ট্যাবলেটে সংরক্ষিত সমস্ত SMS (পাঠ্য) বার্তা পড়তে পারে৷"</string>
     <string name="permdesc_readSms" product="tv" msgid="5796670395641116592">"এই অ্যাপটি আপনার টিভিতে সংরক্ষিত সমস্ত SMS (পাঠ্য) বার্তা পড়তে পারে৷"</string>
@@ -370,7 +372,7 @@
     <string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"ভলিউম এবং যেখানে স্পিকার আউটপুট সামগ্রী হিসাবে ব্যবহৃত হয় সেই সব ক্ষেত্রে গ্লোবাল অডিও সেটিংসের সংশোধন করতে অ্যাপ্লিকেশানটিকে মঞ্জুর করে৷"</string>
     <string name="permlab_recordAudio" msgid="3876049771427466323">"অডিও রেকর্ড"</string>
     <string name="permdesc_recordAudio" msgid="4245930455135321433">"এই অ্যাপটি মাইক্রোফোন ব্যবহার করে যে কোনো সময় অডিও রেকর্ড করতে পারে৷"</string>
-    <string name="permlab_sim_communication" msgid="2935852302216852065">"SIM এ আদেশগুলি পাঠান"</string>
+    <string name="permlab_sim_communication" msgid="2935852302216852065">"সিম এ আদেশগুলি পাঠান"</string>
     <string name="permdesc_sim_communication" msgid="5725159654279639498">"অ্যাপ্লিকেশানটিকে সিম কার্ডে কমান্ডগুলি পাঠানোর অনুমতি দেয়৷ এটি খুবই বিপজ্জনক৷"</string>
     <string name="permlab_camera" msgid="3616391919559751192">"ছবি এবং ভিডিও তোলে"</string>
     <string name="permdesc_camera" msgid="5392231870049240670">"এই অ্যাপটি যে কোনো সময় ক্যামেরা ব্যবহার করে ছবি তুলতে বা ভিডিও রেকর্ড করতে পারে৷"</string>
@@ -479,8 +481,8 @@
     <string name="permdesc_sdcardWrite" product="default" msgid="4337417790936632090">"অ্যাপ্লিকেশানকে SD কার্ডে লেখার অনুমতি দেয়৷"</string>
     <string name="permlab_use_sip" msgid="2052499390128979920">"SIP কল করুন/গ্রহণ করুন"</string>
     <string name="permdesc_use_sip" msgid="2297804849860225257">"অ্যাপ্লিকেশানকে SIP কল করতে ও গ্রহণ করতে অনুমতি দেয়।"</string>
-    <string name="permlab_register_sim_subscription" msgid="3166535485877549177">"নতুন টেলিকম SIM সংযোগগুলির নিবন্ধন"</string>
-    <string name="permdesc_register_sim_subscription" msgid="2138909035926222911">"অ্যাপ্লিকেশানটিকে নতুন টেলিকম SIM সংযোগগুলি নিবন্ধিত করতে অনুমোদিত করে৷"</string>
+    <string name="permlab_register_sim_subscription" msgid="3166535485877549177">"নতুন টেলিকম সিম সংযোগগুলির নিবন্ধন"</string>
+    <string name="permdesc_register_sim_subscription" msgid="2138909035926222911">"অ্যাপ্লিকেশানটিকে নতুন টেলিকম সিম সংযোগগুলি নিবন্ধিত করতে অনুমোদিত করে৷"</string>
     <string name="permlab_register_call_provider" msgid="108102120289029841">"নতুন টেলিকম সংযোগগুলির নিবন্ধন"</string>
     <string name="permdesc_register_call_provider" msgid="7034310263521081388">"নতুন টেলিকম সংযোগ নিবন্ধিত করতে অ্যাপ্লিকেশানটিকে অনুমোদিত করে৷"</string>
     <string name="permlab_connection_manager" msgid="1116193254522105375">"টেলিকম সংযোগগুলি পরিচালনা করুন"</string>
@@ -692,7 +694,7 @@
     <string name="faceunlock_multiple_failures" msgid="754137583022792429">"মুখের সাহায্যে আনলক করার প্রচেষ্টা যতবার করা যায় তার সীমা পেরিয়ে গেছে"</string>
     <string name="lockscreen_missing_sim_message_short" msgid="5099439277819215399">"কোনো সিম কার্ড নেই"</string>
     <string name="lockscreen_missing_sim_message" product="tablet" msgid="151659196095791474">"ট্যাবলেটের মধ্যে কোনো সিম কার্ড নেই৷"</string>
-    <string name="lockscreen_missing_sim_message" product="tv" msgid="1943633865476989599">"টিভির মধ্যে কোনো SIM কার্ড নেই৷"</string>
+    <string name="lockscreen_missing_sim_message" product="tv" msgid="1943633865476989599">"টিভির মধ্যে কোনো সিম কার্ড নেই৷"</string>
     <string name="lockscreen_missing_sim_message" product="default" msgid="2186920585695169078">"ফোনের মধ্যে কোনো সিম কার্ড নেই৷"</string>
     <string name="lockscreen_missing_sim_instructions" msgid="5372787138023272615">"একটি সিম কার্ড ঢোকান৷"</string>
     <string name="lockscreen_missing_sim_instructions_long" msgid="3526573099019319472">"সিম কার্ডটি অনুপস্থিত বা পাঠযোগ্য নয়৷ একটি সিম কার্ড ঢোকান৷"</string>
@@ -1104,8 +1106,8 @@
     <string name="wifi_p2p_frequency_conflict_message" product="tv" msgid="3087858235069421128">"আপনার টিভি <xliff:g id="DEVICE_NAME">%1$s</xliff:g> এ সংযুক্ত থাকার সময় ওয়াই-ফাই থেকে সাময়িকভাবে সংযোগ বিচ্ছিন্ন হবে৷"</string>
     <string name="wifi_p2p_frequency_conflict_message" product="default" msgid="7363907213787469151">"ফোনটি যখন <xliff:g id="DEVICE_NAME">%1$s</xliff:g> এ সংযুক্ত হবে তখন এটি ওয়াই-ফাই থেকে সাময়িকভাবে সংযোগ বিচ্ছিন্ন হবে"</string>
     <string name="select_character" msgid="3365550120617701745">"অক্ষর ঢোকান"</string>
-    <string name="sms_control_title" msgid="7296612781128917719">"SMS বার্তা পাঠানো হচ্ছে"</string>
-    <string name="sms_control_message" msgid="3867899169651496433">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; অনেকগুলি SMS বার্তা পাঠাচ্ছে৷ আপনি কি এই অ্যাপ্লিকেশানটিকে বার্তা পাঠানো চালিয়ে যাওয়ার অনুমতি দিতে চান?"</string>
+    <string name="sms_control_title" msgid="7296612781128917719">"এসএমএস পাঠানো হচ্ছে"</string>
+    <string name="sms_control_message" msgid="3867899169651496433">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; অনেকগুলি এসএমএস পাঠাচ্ছে৷ আপনি কি এই অ্যাপ্লিকেশানটিকে বার্তা পাঠানো চালিয়ে যাওয়ার অনুমতি দিতে চান?"</string>
     <string name="sms_control_yes" msgid="3663725993855816807">"অনুমতি দিন"</string>
     <string name="sms_control_no" msgid="625438561395534982">"আস্বীকার করুন"</string>
     <string name="sms_short_code_confirm_message" msgid="1645436466285310855">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt; এ একটি বার্তা পাঠাতে চায়৷"</string>
@@ -1123,10 +1125,10 @@
     <string name="sim_added_title" msgid="3719670512889674693">"সিম কার্ড যোগ করা হয়েছে"</string>
     <string name="sim_added_message" msgid="7797975656153714319">"সেলুলার নেটওয়ার্ক অ্যাক্সেস করতে আপনার ডিভাইস পুনর্সূচনা করুন"</string>
     <string name="sim_restart_button" msgid="4722407842815232347">"পুনর্সূচনা"</string>
-    <string name="carrier_app_dialog_message" msgid="7066156088266319533">"যাতে আপনার নতুন SIM সঠিকভাবে কাজ করে, তার জন্য আপনাকে আপনার পরিষেবা প্রদানকারীর থেকে একটি অ্যাপ্লিকেশান ইনস্টল করতে এবং খুলতে হবে৷"</string>
+    <string name="carrier_app_dialog_message" msgid="7066156088266319533">"যাতে আপনার নতুন সিম সঠিকভাবে কাজ করে, তার জন্য আপনাকে আপনার পরিষেবা প্রদানকারীর থেকে একটি অ্যাপ্লিকেশান ইনস্টল করতে এবং খুলতে হবে৷"</string>
     <string name="carrier_app_dialog_button" msgid="7900235513678617329">"অ্যাপ্লিকেশানটি পান"</string>
     <string name="carrier_app_dialog_not_now" msgid="6361378684292268027">"এখনই নয়"</string>
-    <string name="carrier_app_notification_title" msgid="8921767385872554621">"নতুন SIM ঢোকানো হয়েছে"</string>
+    <string name="carrier_app_notification_title" msgid="8921767385872554621">"নতুন সিম ঢোকানো হয়েছে"</string>
     <string name="carrier_app_notification_text" msgid="1132487343346050225">"এটিকে সেট আপ করতে আলতো চাপুন"</string>
     <string name="time_picker_dialog_title" msgid="8349362623068819295">"সময় সেট করুন"</string>
     <string name="date_picker_dialog_title" msgid="5879450659453782278">"তারিখ সেট করুন"</string>
@@ -1146,6 +1148,8 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"আরো বিকল্পের জন্য আলতো চাপুন৷"</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB ডিবাগিং সংযুক্ত হয়েছে"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"USB ডিবাগিং অক্ষম করতে আলতো চাপুন৷"</string>
+    <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
+    <skip />
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"ত্রুটির প্রতিবেদন নেওয়া হচ্ছে..."</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"ত্রুটির প্রতিবেদন শেয়ার করবেন?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"ত্রুটির প্রতিবেদন শেয়ার করা হচ্ছে..."</string>
@@ -1689,4 +1693,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"খবর ও পত্রিকাগুলি"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB ডিবাগিং"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"ঘন্টা"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"মিনিট"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"সময় সেট করুন"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"সঠিক সময় দিন"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"সময় টাইপ করুন"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"সময় ইনপুট দেওয়ার জন্য পাঠ্য ইনপুট মোডে যান।"</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"সময় ইনপুট দেওয়ার জন্য ঘড়ি মোডে যান।"</string>
 </resources>
diff --git a/core/res/res/values-bs/strings.xml b/core/res/res/values-bs/strings.xml
index c6d70f3..3f2e45e 100644
--- a/core/res/res/values-bs/strings.xml
+++ b/core/res/res/values-bs/strings.xml
@@ -281,6 +281,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Kontrolira stepen uvećanja prikaza na ekranu i podešavanje položaja."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Praviti pokrete"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Može dodirivati, prevlačiti, hvatati prstima i praviti druge pokrete."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Pokreti otiska prsta"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Moguće je zabilježiti pokrete na senzoru za otisak prsta uređaja."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"onemogućavanje ili mijenjanje statusne trake"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Dozvoljava aplikaciji onemogućavanje statusne trake ili dodavanje i uklanjanje sistemskih ikona."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"funkcioniranje u vidu statusne trake"</string>
@@ -1168,6 +1170,8 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Dodirnite za više opcija."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Otklanjanje grešaka putem uređaja spojenog na USB je uspostavljeno"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Dodirnite da onemogućite otklanjanje grešaka putem uređaja spojenog na USB."</string>
+    <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
+    <skip />
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Prijem izvještaja o grešci..."</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Podijeliti izvještaj o grešci?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Dijeljenje izvještaja o grešci..."</string>
@@ -1722,4 +1726,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Vijesti i časopisi"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Otklanjanje grešaka putem uređaja spojenog na USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"sat"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minuta"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Postavite vrijeme"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Unesite ispravno vrijeme"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Upišite vrijeme"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Prebacite u način unosa teksta za unos vremena."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Prebacite u način rada kao sat za unos vremena."</string>
 </resources>
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index eebe75f..56a6252 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -278,6 +278,8 @@
     <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 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>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"aparèixer a la barra d\'estat"</string>
@@ -950,7 +952,7 @@
     <string name="inputMethod" msgid="1653630062304567879">"Mètode d\'introducció de text"</string>
     <string name="editTextMenuTitle" msgid="4909135564941815494">"Accions de text"</string>
     <string name="email" msgid="4560673117055050403">"Correu electrònic"</string>
-    <string name="dial" msgid="2275093056198652749">"Marcatge"</string>
+    <string name="dial" msgid="2275093056198652749">"Telèfon"</string>
     <string name="map" msgid="5441053548030107189">"Mapa"</string>
     <string name="low_internal_storage_view_title" msgid="5576272496365684834">"L\'espai d\'emmagatzematge s\'està esgotant"</string>
     <string name="low_internal_storage_view_text" msgid="6640505817617414371">"És possible que algunes funcions del sistema no funcionin"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Toca per veure més opcions."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Depuració USB activada"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Toca per desactivar la depuració USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Selecciona per desactivar la depuració USB"</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"S\'està creant l\'informe d\'errors…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Vols compartir l\'informe d\'errors?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"S\'està compartint l\'informe d\'errors…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Notícies i revistes"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Depuració USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"hora"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minut"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Defineix l\'hora"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Introdueix una hora vàlida"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Escriu l\'hora"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Canvia al mode d\'introducció de text per introduir l\'hora."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Canvia al mode de rellotge per introduir l\'hora."</string>
 </resources>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index 68cc583..5cb7122 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -284,6 +284,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Určuje umístění a úroveň přiblížení displeje."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Provádění gest"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Může provádět gesta klepnutí, přejetí, stažení prstů a další."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Gesta otiskem prstu"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Dokáže rozpoznat gesta zadaná na snímači otisků prstů."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"zakázání či změny stavového řádku"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Umožňuje aplikaci zakázat stavový řádek nebo přidat či odebrat systémové ikony."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"vydávání se za stavový řádek"</string>
@@ -1186,6 +1188,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Klepnutím zobrazíte další možnosti."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Ladění přes USB připojeno"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Klepnutím zakážete ladění USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Vyberte, chcete-li zakázat ladění USB."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Vytváření zprávy o chybě…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Sdílet zprávu o chybě?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Sdílení zprávy o chybě…"</string>
@@ -1751,4 +1754,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Zprávy a časopisy"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Ladění USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"hodina"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minuta"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Nastavení času"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Zadejte platný čas"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Zadejte čas"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Chcete-li zadat čas, přepněte na režim textu."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Chcete-li zadat čas, přepněte na režim hodin."</string>
 </resources>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index f2b6be9..9bff925 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Kontrollér skærmens zoomniveau og position."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Udfør bevægelser"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Kan trykke, stryge, knibe sammen og udføre andre bevægelser."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Fingeraftryksbevægelser"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Kan registrere bevægelser, der foretages på enhedernes fingeraftrykslæser."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"deaktiver eller rediger statuslinje"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Tillader, at appen kan deaktivere statusbjælken eller tilføje og fjerne systemikoner."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"vær statusbjælken"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Tryk for at se flere muligheder."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB-fejlretning er tilsluttet"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Tryk for at deaktivere fejlretning via USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Vælg for at deaktivere USB-fejlretning."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Opretter fejlrapport…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Vil du dele fejlrapporten?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Deler fejlrapport…"</string>
@@ -1395,7 +1398,7 @@
     <string name="kg_wrong_pin" msgid="1131306510833563801">"Forkert pinkode"</string>
     <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Prøv igen om <xliff:g id="NUMBER">%1$d</xliff:g> sekunder."</string>
     <string name="kg_pattern_instructions" msgid="398978611683075868">"Tegn dit mønster"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Indtast pinkode til SIM"</string>
+    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Indtast pinkode til SIM-kort"</string>
     <string name="kg_pin_instructions" msgid="2377242233495111557">"Indtast pinkode"</string>
     <string name="kg_password_instructions" msgid="5753646556186936819">"Angiv adgangskode"</string>
     <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM-kortet er nu deaktiveret. Indtast PUK-koden for at fortsætte. Kontakt mobiloperatøren for at få flere oplysninger."</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Aviser og blade"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB-fejlretning"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"time"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minut"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Indstil klokkeslæt"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Angiv et gyldigt klokkeslæt"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Angiv klokkeslæt"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Skift til teksttilstand for at angive klokkeslæt."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Skift til urtilstand for at angive klokkeslæt."</string>
 </resources>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index 5ba5464..67d2d40f 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Legt die Zoom-Stufe des Displays und die Zoom-Position auf dem Display fest."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Bewegungen möglich"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Tippen, Wischen, Zusammenziehen und andere Bewegungen möglich."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Bewegungen auf dem Fingerabdrucksensor"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Erfasst Bewegungen auf dem Fingerabdrucksensor des Geräts."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"Statusleiste deaktivieren oder ändern"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Ermöglicht der App, die Statusleiste zu deaktivieren oder Systemsymbole hinzuzufügen oder zu entfernen"</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"Statusleiste darstellen"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Für weitere Optionen tippen."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB-Debugging aktiviert"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Zum Deaktivieren von USB-Debugging tippen."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"USB-Debugging deaktivieren: auswählen"</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Fehlerbericht wird abgerufen…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Fehlerbericht teilen?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Fehlerbericht wird geteilt…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Nachrichten &amp; Zeitschriften"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB-Fehlerbehebung"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"Stunde"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"Minute"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Uhrzeit einstellen"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Gib eine gültige Uhrzeit ein"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Uhrzeit eingeben"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"In den Texteingabemodus wechseln, um die Uhrzeit einzugeben."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"In den Uhrzeitmodus wechseln, um die Uhrzeit einzugeben."</string>
 </resources>
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index 409b573..c8032e5 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"απενεργοποιεί ή να τροποποιεί την γραμμή κατάστασης"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Επιτρέπει στην εφαρμογή να απενεργοποιεί τη γραμμή κατάστασης ή να προσθέτει και να αφαιρεί εικονίδια συστήματος."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"ορίζεται ως γραμμή κατάστασης"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Πατήστε για περισσότερες επιλογές."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Συνδέθηκε ο εντοπισμός σφαλμάτων USB"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Πατήστε για απενεργοποίηση του εντοπισμού σφαλμάτων USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Επιλογή για απενεργοποίηση του εντοπισμού σφαλμάτων USB."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Λήψη αναφοράς σφάλματος…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Κοινή χρήση αναφοράς σφάλματος;"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Κοινή χρήση αναφοράς σφάλματος…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Ειδήσεις και περιοδικά"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Εντοπισμός σφαλμάτων USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"ώρα"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"λεπτό"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Ορισμός ώρας"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Εισαγάγετε μια έγκυρη ώρα"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Πληκτρολογήστε την ώρα"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Κάντε εναλλαγή στη λειτουργία εισαγωγής κειμένου, για την εισαγωγή της ώρας."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Κάντε εναλλαγή στη λειτουργία ρολογιού, για την εισαγωγή της ώρας."</string>
 </resources>
diff --git a/core/res/res/values-en-rAU/strings.xml b/core/res/res/values-en-rAU/strings.xml
index 02860cf..0ae92b5 100644
--- a/core/res/res/values-en-rAU/strings.xml
+++ b/core/res/res/values-en-rAU/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Control the display\'s zoom level and positioning."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Perform gestures"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Can tap, swipe, pinch and perform other gestures."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Fingerprint gestures"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Can capture gestures performed on the devices fingerprint sensor."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"disable or modify status bar"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Allows the app to disable the status bar or add and remove system icons."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"be the status bar"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Tap for more options."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB debugging connected"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Tap to disable USB debugging."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Select to disable USB debugging."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Taking bug report…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Share bug report?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Sharing bug report…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"News &amp; Magazines"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB debugging"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"hour"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minute"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Set time"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Enter a valid time"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Type in time"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Switch to text input mode for the time input."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Switch to clock mode for the time input."</string>
 </resources>
diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml
index 02860cf..0ae92b5 100644
--- a/core/res/res/values-en-rGB/strings.xml
+++ b/core/res/res/values-en-rGB/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Control the display\'s zoom level and positioning."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Perform gestures"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Can tap, swipe, pinch and perform other gestures."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Fingerprint gestures"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Can capture gestures performed on the devices fingerprint sensor."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"disable or modify status bar"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Allows the app to disable the status bar or add and remove system icons."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"be the status bar"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Tap for more options."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB debugging connected"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Tap to disable USB debugging."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Select to disable USB debugging."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Taking bug report…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Share bug report?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Sharing bug report…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"News &amp; Magazines"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB debugging"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"hour"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minute"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Set time"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Enter a valid time"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Type in time"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Switch to text input mode for the time input."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Switch to clock mode for the time input."</string>
 </resources>
diff --git a/core/res/res/values-en-rIN/strings.xml b/core/res/res/values-en-rIN/strings.xml
index 02860cf..0ae92b5 100644
--- a/core/res/res/values-en-rIN/strings.xml
+++ b/core/res/res/values-en-rIN/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Control the display\'s zoom level and positioning."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Perform gestures"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Can tap, swipe, pinch and perform other gestures."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Fingerprint gestures"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Can capture gestures performed on the devices fingerprint sensor."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"disable or modify status bar"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Allows the app to disable the status bar or add and remove system icons."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"be the status bar"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Tap for more options."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB debugging connected"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Tap to disable USB debugging."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Select to disable USB debugging."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Taking bug report…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Share bug report?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Sharing bug report…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"News &amp; Magazines"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB debugging"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"hour"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minute"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Set time"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Enter a valid time"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Type in time"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Switch to text input mode for the time input."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Switch to clock mode for the time input."</string>
 </resources>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index bd3ac31..b9b6fc9 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Controla el posicionamiento y el nivel de zoom de la pantalla."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Usar gestos"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Permite presionar, deslizar, pellizcar y usar otros gestos."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Gestos del sensor de huellas digitales"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Captura los gestos que se hacen en el sensor de huellas digitales de los dispositivos."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"desactivar o modificar la barra de estado"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Permite que la aplicación inhabilite la barra de estado o que agregue y elimine íconos del sistema."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"aparecer en la barra de estado"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Presiona para ver más opciones."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Depuración por USB conectada"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Presiona para inhabilitar la depuración por USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Seleccionar para desactivar la depuración por USB"</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Realizando un informe de errores…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"¿Compartir informe de errores?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Compartiendo informe de errores…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Noticias y revistas"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Depuración por USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"hora"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minuto"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Establecer hora"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Ingresa una hora válida"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Ingresa la hora"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Cambia al modo de entrada de texto para ingresar la hora."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Cambia al modo de reloj para ingresar la hora."</string>
 </resources>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index 26f6005..9cb770c 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Controla el posicionamiento y el nivel de zoom de la pantalla."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Realizar gestos"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Puedes tocar y pellizcar la pantalla, deslizar el dedo y hacer otros gestos."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Gestos de huellas digitales"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Puede capturar los gestos realizados en el sensor de huellas digitales del dispositivo."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"inhabilitar o modificar la barra de estado"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Permite que la aplicación inhabilite la barra de estado o añada y elimine iconos del sistema."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"aparecer en la barra de estado"</string>
@@ -949,12 +951,9 @@
     <string name="deleteText" msgid="6979668428458199034">"Eliminar"</string>
     <string name="inputMethod" msgid="1653630062304567879">"Método de introducción de texto"</string>
     <string name="editTextMenuTitle" msgid="4909135564941815494">"Acciones de texto"</string>
-    <!-- no translation found for email (4560673117055050403) -->
-    <skip />
-    <!-- no translation found for dial (2275093056198652749) -->
-    <skip />
-    <!-- no translation found for map (5441053548030107189) -->
-    <skip />
+    <string name="email" msgid="4560673117055050403">"Correo electrónico"</string>
+    <string name="dial" msgid="2275093056198652749">"Marcar"</string>
+    <string name="map" msgid="5441053548030107189">"Mapa"</string>
     <string name="low_internal_storage_view_title" msgid="5576272496365684834">"Queda poco espacio"</string>
     <string name="low_internal_storage_view_text" msgid="6640505817617414371">"Es posible que algunas funciones del sistema no funcionen."</string>
     <string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"No hay espacio suficiente para el sistema. Comprueba que haya 250 MB libres y reinicia el dispositivo."</string>
@@ -1149,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Toca para ver más opciones."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Depuración USB habilitada"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Toca para inhabilitar la depuración USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Seleccionar para inhabilitar la depuración USB"</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Creando informe de errores…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"¿Compartir informe de errores?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Compartiendo informe de errores…"</string>
@@ -1205,10 +1205,8 @@
     <string name="permdesc_readInstallSessions" msgid="2049771699626019849">"Permite que una aplicación consulte sesiones de instalación para ver detalles sobre instalaciones de paquetes activos."</string>
     <string name="permlab_requestInstallPackages" msgid="5782013576218172577">"solicitar instalación de paquetes"</string>
     <string name="permdesc_requestInstallPackages" msgid="5740101072486783082">"Permite a una aplicación solicitar la instalación de paquetes."</string>
-    <!-- no translation found for permlab_requestDeletePackages (1703686454657781242) -->
-    <skip />
-    <!-- no translation found for permdesc_requestDeletePackages (3406172963097595270) -->
-    <skip />
+    <string name="permlab_requestDeletePackages" msgid="1703686454657781242">"solicitar eliminación de paquetes"</string>
+    <string name="permdesc_requestDeletePackages" msgid="3406172963097595270">"Permite a una aplicación solicitar la eliminación de paquetes."</string>
     <string name="permlab_requestIgnoreBatteryOptimizations" msgid="8021256345643918264">"solicitar permiso para ignorar las optimizaciones de la batería"</string>
     <string name="permdesc_requestIgnoreBatteryOptimizations" msgid="8359147856007447638">"Permite que una aplicación solicite permiso para ignorar las optimizaciones de la batería."</string>
     <string name="tutorial_double_tap_to_zoom_message_short" msgid="1311810005957319690">"Da dos toques para acceder al control de zoom."</string>
@@ -1694,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Noticias y revistas"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Depuración por USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"hora"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minuto"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Establecer hora"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Introduce una hora válida"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Escribe la hora"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Cambia al modo de introducción de texto para escribir la hora."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Cambia al modo de reloj para escribir la hora."</string>
 </resources>
diff --git a/core/res/res/values-et/strings.xml b/core/res/res/values-et/strings.xml
index 30e73d8..f77fdcf 100644
--- a/core/res/res/values-et/strings.xml
+++ b/core/res/res/values-et/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Saate juhtida ekraani suumitaset ja asendit."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Liigutuste tegemine"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Saate puudutada, pühkida, sõrmi kokku-lahku liigutada ja teisi liigutusi teha."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Sõrmejälje liigutused"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Teil on võimalik jäädvustada liigutused, mis on tehtud seadmete sõrmejäljeanduri abil."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"keela või muuda olekuriba"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Võimaldab rakendusel keelata olekuriba või lisada ja eemaldada süsteemiikoone."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"olekuribana kuvamine"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Puudutage lisavalikute nägemiseks."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB-silumine ühendatud"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Puudutage USB-silumise keelamiseks."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Valige USB silumise keelamiseks"</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Veaaruande võtmine …"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Kas jagada veaaruannet?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Veaaruande jagamine …"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Uudised ja ajakirjad"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB silumine"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"tund"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minut"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Kellaaja määramine"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Sisestage sobiv kellaaeg"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Sisestage kellaaeg"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Aktiveerige kellaaja sisestamiseks tekstisisestusrežiim."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Aktiveerige kellaaja sisestamiseks kellarežiim."</string>
 </resources>
diff --git a/core/res/res/values-eu/strings.xml b/core/res/res/values-eu/strings.xml
index a49f94f..99fafec 100644
--- a/core/res/res/values-eu/strings.xml
+++ b/core/res/res/values-eu/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Kontrolatu pantailaren zoom-maila eta kokapena."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Keinuak egin"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Sakatu, lerratu, atximurkatu eta beste hainbat keinu egin ditzake."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Hatz-marken keinuak"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Gailuaren hatz-marken sentsorean egindako keinuak antzeman ditzake."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"Desgaitu edo aldatu egoera-barra"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Egoera-barra desgaitzea edo sistema-ikonoak gehitzea edo kentzea baimentzen die aplikazioei."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"Bihurtu egoera-barra"</string>
@@ -1146,6 +1148,8 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Sakatu aukera gehiago ikusteko."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB arazketa konektatuta"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Sakatu USB arazketa desgaitzeko."</string>
+    <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
+    <skip />
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Akatsen txostena sortzen…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Akatsen txostena partekatu nahi duzu?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Akatsen txostena partekatzen…"</string>
@@ -1232,7 +1236,7 @@
     <string name="wallpaper_binding_label" msgid="1240087844304687662">"Horma-papera"</string>
     <string name="chooser_wallpaper" msgid="7873476199295190279">"Aldatu horma-papera"</string>
     <string name="notification_listener_binding_label" msgid="2014162835481906429">"Jakinarazpenak hautemateko zerbitzua"</string>
-    <string name="vr_listener_binding_label" msgid="4316591939343607306">"Errealitate birtualeko hautemailea"</string>
+    <string name="vr_listener_binding_label" msgid="4316591939343607306">"EB hautemailea"</string>
     <string name="condition_provider_service_binding_label" msgid="1321343352906524564">"Baldintza-hornitzailea"</string>
     <string name="notification_ranker_binding_label" msgid="774540592299064747">"Jakinarazpenen sailkapen-zerbitzua"</string>
     <string name="vpn_title" msgid="19615213552042827">"VPN eginbidea aktibatuta"</string>
@@ -1689,4 +1693,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Albisteak eta aldizkariak"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB arazketa"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"orduak"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minutuak"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Zehaztu ordua"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Idatzi balio duen ordu bat"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Idatzi ordua"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Aldatu testu modura ordua zehazteko."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Aldatu erloju modura ordua zehazteko."</string>
 </resources>
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index 3880caa..3ca8051 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"غیرفعال کردن یا تغییر نوار وضعیت"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"‏به برنامه اجازه می‎دهد تا نوار وضعیت را غیرفعال کند یا نمادهای سیستم را اضافه یا حذف کند."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"نوار وضعیت باشد"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"برای گزینه‌های بیشتر ضربه بزنید."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"‏اشکال‌زدایی USB متصل شد"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"‏برای غیرفعال کردن اشکال‌زدایی USB ضربه بزنید."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"‏انتخاب کنید تا رفع عیب USB غیرفعال شود."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"درحال گرفتن گزارش اشکال…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"گزارش اشکال به اشتراک گذاشته شود؟"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"درحال اشتراک‌گذاری گزارش اشکال…‏"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"اخبار و مجله"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"‏اشکال‌زدایی USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"ساعت"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"دقیقه"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"تنظیم زمان"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"زمان معتبری وارد کنید"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"زمان را تایپ کنید"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"برای وارد کردن زمان، به حالت وارد کردن نوشتار تغییر وضعیت دهید."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"برای وارد کردن زمان، به حالت ساعت تغییر وضعیت دهید."</string>
 </resources>
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index f0afbc8..dafb9c9 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Hallinnoi näytön zoomaustasoa ja asettelua."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Eleiden käyttäminen"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Lupa napauttaa, pyyhkäistä, nipistää ja käyttää muita eleitä."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Sormenjälkieleet"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Voi tallentaa laitteen sormenjälkitunnistimella tehtyjä eleitä."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"poista tilapalkki käytöstä tai muokkaa tilapalkkia"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Antaa sovelluksen poistaa tilapalkin käytöstä ja lisätä tai poistaa järjestelmäkuvakkeita."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"sijaita tilapalkissa"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Näet lisää vaihtoehtoja napauttamalla."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB-vianetsintä yhdistetty"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Poista USB-vianetsintä käytöstä napauttamalla."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Poista USB-vianetsintä käytöstä valitsemalla tämä."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Luodaan virheraporttia…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Jaetaanko virheraportti?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Jaetaan virheraporttia…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Uutiset ja lehdet"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB-vianetsintä"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"tunti"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minuutti"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Aseta aika"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Anna kelvollinen aika."</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Kirjoita aika"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Vaihda ajan syöttämiseen tekstitilassa."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Vaihda ajan syöttämiseen kellotilassa."</string>
 </resources>
diff --git a/core/res/res/values-fr-rCA/strings.xml b/core/res/res/values-fr-rCA/strings.xml
index 65609f4..473fc85 100644
--- a/core/res/res/values-fr-rCA/strings.xml
+++ b/core/res/res/values-fr-rCA/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Contrôler le niveau de zoom et le positionnement de l\'écran."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Effectuer des gestes"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Peut toucher, balayer, pincer et effectuer d\'autres gestes."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Gestes sur le capteur d\'empreintes digitales"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Peut capturer des gestes effectués sur le capteur d\'empreintes digitales des appareils."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"désactiver ou modifier la barre d\'état"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Permet à l\'application de désactiver la barre d\'état, ou d\'ajouter et de supprimer des icônes système."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"servir de barre d\'état"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Touchez pour afficher plus d\'options."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Débogage USB connecté"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Touchez pour désactiver le débogage USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Sélectionnez cette option pour désactiver le débogage USB."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Création d\'un rapport de bogue en cours..."</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Partager le rapport de bogue?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Partage du rapport de bogue en cours..."</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Actualités et magazines"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Débogage USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"heure"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minute"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Définir l\'heure"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Entrez une heure valide"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Entrez l\'heure"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Passer au mode Entrée de texte pour entrer l\'heure."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Passer au mode Horloge pour entrer l\'heure."</string>
 </resources>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index 66fb5b4..2ad6096 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Contrôler le niveau de zoom et le positionnement de l\'écran"</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Effectuer des gestes"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Permet d\'appuyer sur l\'écran, de le balayer, de le pincer et d\'effectuer d\'autres gestes."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Gestes avec l\'empreinte digitale"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Peut enregistrer des gestes effectués sur le lecteur d\'empreinte digitale de l\'appareil."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"Désactivation ou modification de la barre d\'état"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Permet à l\'application de désactiver la barre d\'état, ou d\'ajouter et de supprimer des icônes système."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"remplacer la barre d\'état"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Appuyez ici pour plus d\'options."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Débogage USB activé"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Appuyez ici pour désactiver le débogage USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Sélectionnez cette option pour désactiver le débogage USB."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Création du rapport de bug…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Partager le rapport de bug ?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Partage du rapport de bug…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Actualités et magazines"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Débogage USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"heure"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minute"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Définir l\'heure"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Veuillez indiquer une heure valide"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Indiquez l\'heure"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Passer en mode saisie de texte pour la saisie de l\'heure."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Passer en mode horloge pour la saisie de l\'heure."</string>
 </resources>
diff --git a/core/res/res/values-gl/strings.xml b/core/res/res/values-gl/strings.xml
index 9b335a1..1f95bc5 100644
--- a/core/res/res/values-gl/strings.xml
+++ b/core/res/res/values-gl/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Controlar o nivel do zoom e o posicionamento da pantalla"</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Realizar xestos"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Podes tocar, pasar o dedo, beliscar e realizar outros xestos."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Xestos de impresión dixital"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Pode rexistrar os xestos realizados no sensor de impresión dixital dos dispositivos."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"desactivar ou modificar a barra de estado"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Permite á aplicación desactivar a barra de estado ou engadir e eliminar as iconas do sistema."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"actuar como a barra de estado"</string>
@@ -1146,6 +1148,8 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Toca para ver máis opcións."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Depuración USB conectada"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Toca para desactivar a depuración de erros de USB."</string>
+    <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
+    <skip />
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Creando informe de erros…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Queres compartir o informe de erros?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Compartindo informe de erros..."</string>
@@ -1689,4 +1693,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Noticias e revistas"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Depuración de USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"hora"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minuto"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Definir hora"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Introduce unha hora válida"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Escribe a hora"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Cambia ao modo de entrada de texto para introducir a hora."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Cambiar ao modo de reloxo para introducir a hora."</string>
 </resources>
diff --git a/core/res/res/values-gu/strings.xml b/core/res/res/values-gu/strings.xml
index 2bd3e41..9c394cf 100644
--- a/core/res/res/values-gu/strings.xml
+++ b/core/res/res/values-gu/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"સ્થિતિ બાર અક્ષમ કરો અથવા સંશોધિત કરો"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"એપ્લિકેશનને સ્થિતિ બાર અક્ષમ કરવાની અથવા સિસ્ટમ આયકન્સ ઉમેરવા અને દૂર કરવાની મંજૂરી આપે છે."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"સ્થિતિ બાર થાઓ"</string>
@@ -1146,6 +1148,8 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"વધુ વિકલ્પો માટે ટૅપ કરો."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB ડીબગિંગ કનેક્ટ થયું."</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"USB ડીબગિંગ અક્ષમ કરવા માટે ટૅપ કરો."</string>
+    <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
+    <skip />
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"બગ રિપોર્ટ લઈ રહ્યાં છે…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"બગ રિપોર્ટ શેર કરીએ?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"બગ રિપોર્ટ શેર કરી રહ્યાં છે…"</string>
@@ -1689,4 +1693,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"સમાચાર અને સામાયિકો"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB ડિબગિંગ"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"કલાક"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"મિનિટ"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"સમય સેટ કરો"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"એક માન્ય સમય દાખલ કરો"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"સમય લખો"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"સમય દાખલ કરવા માટે ટેક્સ્ટ ઇનપુટ મોડમાં સ્વિચ કરો."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"સમય દાખલ કરવા માટે ઘડિયાળ મોડમાં સ્વિચ કરો."</string>
 </resources>
diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml
index 6300703..4ac25e2 100644
--- a/core/res/res/values-hi/strings.xml
+++ b/core/res/res/values-hi/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"स्‍थिति बार अक्षम या बदलें"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"ऐप्स  को स्थिति बार अक्षम करने या सिस्‍टम आइकन को जोड़ने या निकालने देता है."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"स्‍थिति बार होने दें"</string>
@@ -951,7 +953,7 @@
     <string name="editTextMenuTitle" msgid="4909135564941815494">"लेख क्रियाएं"</string>
     <string name="email" msgid="4560673117055050403">"ईमेल करें"</string>
     <string name="dial" msgid="2275093056198652749">"डायल करें"</string>
-    <string name="map" msgid="5441053548030107189">"नक्शा"</string>
+    <string name="map" msgid="5441053548030107189">"मानचित्र"</string>
     <string name="low_internal_storage_view_title" msgid="5576272496365684834">"मेमोरी स्‍थान समाप्‍त हो रहा है"</string>
     <string name="low_internal_storage_view_text" msgid="6640505817617414371">"हो सकता है कुछ सिस्टम फ़ंक्शन कार्य न करें"</string>
     <string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"सिस्टम के लिए पर्याप्त मेमोरी नहीं है. सुनिश्चित करें कि आपके पास 250MB का खाली स्थान है और फिर से प्रारंभ करें."</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"अधिक विकल्पों के लिए टैप करें."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB डीबग कनेक्ट किया गया"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"USB डीबग करना अक्षम करने के लिए टैप करें."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"USB डीबग करना अक्षम करने के लिए चुनें."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"बग रिपोर्ट प्राप्त की जा रही है…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"बग रिपोर्ट साझा करें?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"बग रिपोर्ट साझा की जा रही है…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"समाचार और पत्रिकाएं"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB डीबग करना"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"घंटा"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"मिनट"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"समय सेट अप करें"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"मान्य समय डालें"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"समय लिखें"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"समय इनपुट के लिए लेख इनपुट मोड पर जाएं."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"समय इनपुट के लिए घड़ी मोड पर जाएं."</string>
 </resources>
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index ee3ab30..d4bc343 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -281,6 +281,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Kontrolira razinu zumiranja i položaj zaslona."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Izvođenje pokreta"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Može dodirnuti, prijeći prstom, spojiti prste i izvoditi druge pokrete."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Pokreti za otisak prsta"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Može snimati pokrete izvršene na senzoru otiska prsta na uređaju."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"onemogućavanje ili izmjena trake statusa"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Aplikaciji omogućuje onemogućavanje trake statusa ili dodavanje i uklanjanje sistemskih ikona."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"biti traka statusa"</string>
@@ -1166,6 +1168,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Dodirnite za više opcija."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Priključen je alat za otklanjanje pogrešaka USB-om"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Dodirnite da biste onemogućili otklanjanje pogrešaka putem USB-a."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Odaberite da biste onemogućili rješavanje programske pogreške na USB-u."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Izrada izvješća o programskoj pogrešci…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Želite li podijeliti izvješće o programskoj pogrešci?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Dijeljenje izvješća o programskoj pogrešci…"</string>
@@ -1720,4 +1723,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Vijesti i časopisi"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Otklanjanje pogrešaka putem USB-a"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"sat"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minuta"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Postavljanje vremena"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Unesite važeće vrijeme"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Unesite vrijeme"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Prijeđite na način unosa teksta da biste unijeli vrijeme."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Prijeđite na način rada sata da biste unijeli vrijeme."</string>
 </resources>
diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml
index 943dbc0..9fd17e5 100644
--- a/core/res/res/values-hu/strings.xml
+++ b/core/res/res/values-hu/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"A kijelző nagyítási/kicsinyítési szintjének és pozíciójának vezérlése"</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Kézmozdulatok végrehajtása"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Koppintás, ujjak gyors csúsztatása és összehúzása, illetve egyéb kézmozdulatok végrehajtása."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Kézmozdulatok az ujjlenyomat-érzékelőn"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Érzékeli az ujjlenyomat-érzékelőn végzett kézmozdulatokat."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"állapotsor kikapcsolása vagy módosítása"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Lehetővé teszi az alkalmazás számára az állapotsor kikapcsolását, illetve rendszerikonok hozzáadását és eltávolítását."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"az állapotsor szerepének átvétele"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Koppintson a további beállítások megjelenítéséhez."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB hibakereső csatlakoztatva"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Koppintson az USB fejlesztő mód kikapcsolásához."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Válassza ezt az USB hibakeresés kikapcsolásához."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Hibajelentés készítése…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Megosztja a hibajelentést?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Hibajelentés megosztása…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Hírlapok és folyóiratok"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB-hibakeresés"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"óra"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"perc"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Idő beállítása"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Érvényes formátumban adja meg az időt"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Adja meg az időt"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Időbevitelhez váltson szövegbeviteli módba."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Időbevitelhez váltson óramódba."</string>
 </resources>
diff --git a/core/res/res/values-hy/strings.xml b/core/res/res/values-hy/strings.xml
index 7c579d1..51f6fe2 100644
--- a/core/res/res/values-hy/strings.xml
+++ b/core/res/res/values-hy/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"անջատել կամ փոփոխել կարգավիճակի գոտին"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Թույլ է տալիս հավելվածին անջատել կարգավիճակի գոտին կամ ավելացնել ու հեռացնել համակարգի պատկերակները:"</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"լինել կարգավիճակի գոտի"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Հպեք՝ լրացուցիչ ընտրանքների համար:"</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB վրիպազերծումը միացված է"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Հպեք՝ USB վրիպազերծումն անջատելու համար:"</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Ընտրել` USB կարգաբերումը կասեցնելու համար:"</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Վրիպակի զեկույցի ստեղծում…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Տրամադրե՞լ վրիպակի զեկույցը:"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Վրիպակի զեկույցի տրամադրում…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Նորություններ և ամսագրեր"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB վրիպազերծում"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"ժամ"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"րոպե"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Կարգավորել ժամը"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Մուտքագրեք վավեր ժամ"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Մուտքագրեք ժամը"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Ժամը մուտքագրելու համար միացրեք տեքստի մուտքագրման ռեժիմը:"</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Ժամը մուտքագրելու համար միացրեք ժամացույցի ռեժիմը:"</string>
 </resources>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index b9771d6..6363c6b 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Mengontrol tingkat zoom dan pemosisian layar."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Melakukan isyarat"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Dapat mengetuk, menggesek, mencubit, dan melakukan isyarat lainnya."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Gestur sidik jari"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Dapat merekam gestur yang dilakukan di sensor sidik jari perangkat."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"nonaktifkan atau ubah bilah status"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Mengizinkan apl menonaktifkan bilah status atau menambah dan menghapus ikon sistem."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"jadikan bilah status"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Ketuk untuk opsi lainnya."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Debugging USB terhubung"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Ketuk untuk menonaktifkan debug USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Pilih untuk menonaktifkan debugging USB."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Mengambil laporan bug…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Bagikan laporan bug?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Membagikan laporan bug..."</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Berita &amp; Majalah"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Proses debug USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"jam"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"menit"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Setel waktu"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Masukkan waktu yang valid"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Ketik waktu"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Beralih ke mode masukan teks untuk masukan waktu."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Beralih ke mode jam untuk masukan waktu."</string>
 </resources>
diff --git a/core/res/res/values-is/strings.xml b/core/res/res/values-is/strings.xml
index 775c50e..2085854 100644
--- a/core/res/res/values-is/strings.xml
+++ b/core/res/res/values-is/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Stjórnaðu aðdrætti og afstöðu skjásins."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Nota bendingar"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Getur ýtt, strokið, fært fingur saman og gert ýmsar aðrar bendingar."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Fingrafarabendingar"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Getur fangað bendingar sem eru gerðar á fingrafaraskynjara tækisins."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"slökkva á eða breyta stöðustiku"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Leyfir forriti að slökkva á stöðustikunni eða bæta við og fjarlægja kerfistákn."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"vera stöðustikan"</string>
@@ -1146,6 +1148,8 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Ýttu til að sjá fleiri valkosti."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB-villuleit tengd"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Ýttu til að slökkva á USB-villuleit."</string>
+    <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
+    <skip />
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Tekur við villutilkynningu…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Deila villutilkynningu?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Deilir villutilkynningu..."</string>
@@ -1689,4 +1693,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Fréttir og tímarit"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB-villuleit"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"klukkustund"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"mínúta"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Stilla tíma"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Færðu inn gildan tíma"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Færðu inn tíma"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Skipta yfir í textastillingu til að færa inn tíma."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Skipta yfir í klukkustillingu til að færa inn tíma."</string>
 </resources>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index cb4769c..8d0ee79b 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Controlla il livello di zoom e la posizione del display."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Esegui gesti"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Consente di toccare, far scorrere, pizzicare ed eseguire altri gesti."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Gesti con sensore di impronte digitali"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"È in grado di rilevare i gesti compiuti con il sensore di impronte digitali dei dispositivi."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"disattivare o modificare la barra di stato"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Consente all\'applicazione di disattivare la barra di stato o di aggiungere e rimuovere icone di sistema."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"ruolo di barra di stato"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Tocca per altre opzioni."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Debug USB collegato"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Tocca per disattivare il debug USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Seleziona per disattivare il debug USB."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Recupero della segnalazione di bug…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Condividere la segnalazione di bug?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Condivisione della segnalazione di bug…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Notizie e riviste"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Debug USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"ora"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minuto"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Imposta ora"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Inserisci un orario valido"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Digita l\'ora"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Passa alla modalità di immissione testo per inserire l\'ora."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Passa alla modalità orologio per inserire l\'ora."</string>
 </resources>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index d33cd08..64f76d04 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -284,6 +284,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="permlab_statusBar" msgid="7417192629601890791">"השבת או שנה את שורת המצב"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"מאפשר לאפליקציה להשבית את שורת המצב או להוסיף ולהסיר סמלי מערכת."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"להיות שורת הסטטוס"</string>
@@ -329,7 +331,7 @@
     <string name="permdesc_persistentActivity" product="tv" msgid="5086862529499103587">"מאפשרת לאפליקציה ליצור חלקים ממנה השמורים בזיכרון באופן עקבי. הדבר עלול להגביל את הזיכרון הזמין לאפליקציות אחרות וכתוצאה מכך להאט את פעולת הטלוויזיה."</string>
     <string name="permdesc_persistentActivity" product="default" msgid="4384760047508278272">"מאפשר לאפליקציה להפוך חלקים ממנו לקבועים בזיכרון. פעולה זו עשויה להגביל את הזיכרון הזמין לאפליקציות אחרים ולהאט את פעולת הטלפון."</string>
     <string name="permlab_getPackageSize" msgid="7472921768357981986">"מדידת נפח האחסון של אפליקציות"</string>
-    <string name="permdesc_getPackageSize" msgid="3921068154420738296">"מאפשר לאפליקציה לאחזר את הקוד, הנתונים, וגודלי הקבצים השמורים שלו"</string>
+    <string name="permdesc_getPackageSize" msgid="3921068154420738296">"מאפשר לאפליקציה לאחזר את הקוד, הנתונים, וגודלי קובצי המטמון שלו"</string>
     <string name="permlab_writeSettings" msgid="2226195290955224730">"שינוי הגדרות מערכת"</string>
     <string name="permdesc_writeSettings" msgid="7775723441558907181">"מאפשר לאפליקציה לשנות את נתוני הגדרות המערכת. אפליקציות זדוניות עלולות לשבש את תצורת המערכת שלך."</string>
     <string name="permlab_receiveBootCompleted" msgid="5312965565987800025">"הפעלה בעת אתחול"</string>
@@ -1186,6 +1188,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"הקש לקבלת אפשרויות נוספות."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"‏ניפוי באגים של USB מחובר"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"‏הקש כדי להשבית ניפוי באגים של USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"‏בחר להשבית ניפוי באגים ב-USB."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"עיבוד דוח על באג..."</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"האם לשתף דוח על באג?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"שיתוף דוח על באג…"</string>
@@ -1751,4 +1754,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"חדשות וכתבי עת"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"‏ניקוי באגים ב-USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"שעה"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"דקה"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"הגדר שעה"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"הזן שעה חוקית"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"הקלד את השעה"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"העבר למצב קלט טקסט לצורך הזנת השעה"</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"העבר למצב שעון לצורך הזנת השעה"</string>
 </resources>
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index 3992e6e..dbb4048 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"ステータスバーの無効化や変更"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"ステータスバーの無効化、システムアイコンの追加や削除をアプリに許可します。"</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"ステータスバーへの表示"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"タップしてその他のオプションを表示します。"</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USBデバッグが接続されました"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"タップして USB デバッグを無効にします。"</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"USBデバッグを無効にする場合に選択します。"</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"バグレポートを取得しています…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"バグレポートを共有しますか?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"バグレポートの共有中…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"ニュース&雑誌"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB デバッグ"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"時"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"分"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"時刻の設定"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"有効な時刻を入力してください"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"時刻を入力"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"時刻をテキストで入力するモードに切り替えます。"</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"時刻を時計で入力するモードに切り替えます。"</string>
 </resources>
diff --git a/core/res/res/values-ka/strings.xml b/core/res/res/values-ka/strings.xml
index 1fb7d13..5bb36b1 100644
--- a/core/res/res/values-ka/strings.xml
+++ b/core/res/res/values-ka/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"სტატუსის ზოლის გათიშვა ან ცვლილება"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"აპს შეეძლება სტატუსების ზოლის გათიშვა და სისტემის ხატულების დამატება/წაშლა."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"სტატუსის ზოლის ჩანაცვლება"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"შეეხეთ დამატებითი ვარიანტების სანახავად."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB გამართვა შეერთებულია"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"შეეხეთ USB-გამართვის გასათიშად."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"მონიშნეთ რათა შეწყვიტოთ USB-ის გამართვა"</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"მიმდინარეობს ხარვეზის შესახებ ანგარიშის შექმნა…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"გსურთ ხარვეზის შესახებ ანგარიშის გაზიარება?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"მიმდინარეობს ხარვეზის შესახებ ანგარიშის გაზიარება…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"ახალი ამბები და ჟურნალები"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB გამართვა"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"საათი"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"წუთი"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"დროის დაყენება"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"შეიყვანეთ სწორი დრო"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"აკრიფეთ დრო"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"დროის შეყვანისთვის ტექსტის შეყვანის რეჟიმზე გადართვა."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"დროის შეყვანისთვის საათის რეჟიმზე გადართვა."</string>
 </resources>
diff --git a/core/res/res/values-kk/strings.xml b/core/res/res/values-kk/strings.xml
index 87958c7..b2fbaef 100644
--- a/core/res/res/values-kk/strings.xml
+++ b/core/res/res/values-kk/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"күйін көрсету тақтасын өшіру немесе өзгерту"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Қолданбаға күй жолағын өшіруге немесе жүйелік белгішелерді қосуға және жоюға рұқсат береді."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"күй жолағы болу"</string>
@@ -1146,6 +1148,8 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Қосымша опциялар үшін түртіңіз."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB жөндеу қосылған"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"USB түзетуін өшіру үшін түртіңіз."</string>
+    <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
+    <skip />
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Қате туралы есеп алынуда…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Қате туралы есепті бөлісу керек пе?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Қате туралы есеп бөлісілуде…"</string>
@@ -1689,4 +1693,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Газеттер және журналдар"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB арқылы жөндеу"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"сағат"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"минут"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Уақытты реттеу"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Жарамды уақыт мәліметін енгізіңіз"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Уақытты енгізіңіз"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Уақытты енгізу үшін мәтін енгізу режиміне өтіңіз."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Уақытты енгізу үшін сағат режиміне өтіңіз."</string>
 </resources>
diff --git a/core/res/res/values-km/strings.xml b/core/res/res/values-km/strings.xml
index f92eff5..ffa6867 100644
--- a/core/res/res/values-km/strings.xml
+++ b/core/res/res/values-km/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"បិទ ឬ​កែ​របារ​ស្ថានភាព"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"ឲ្យ​កម្មវិធី​បិទ​របារ​ស្ថានភាព ឬ​បន្ថែម និង​លុប​រូប​តំណាង​ប្រព័ន្ធ។"</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"ធ្វើជារបារស្ថានភាព"</string>
@@ -1148,6 +1150,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"ប៉ះសម្រាប់ជម្រើសជាច្រើនទៀត"</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"បាន​ភ្ជាប់​ការ​កែ​កំហុស​យូអេសប៊ី"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"ប៉ះដើម្បីបិទដំណើរការកែកំហុសយូអេសប៊ី"</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"ជ្រើស​ ដើម្បី​បិទ​ការ​កែ​កំហុស​យូអេសប៊ី។"</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"កំពុងទទួលយករបាយការណ៍កំហុស…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"ចែករំលែករបាយការណ៍កំហុសឬ?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"កំពុងចែករំលែករបាយកំហុស…"</string>
@@ -1691,4 +1694,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"ព័ត៌មាន និង​ទស្សនាវដ្ដី"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"ការ​កែកំហុស USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"ម៉ោង"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"នាទី"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"កំណត់​ម៉ោង"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"បញ្ចូលម៉ោង​ដែល​ត្រឹមត្រូវ"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"វាយ​បញ្ចូល​ម៉ោង"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"ប្តូរ​ទៅ​មុខងារ​បញ្ចូល​អក្សរ​សម្រាប់​ការ​បញ្ចូល​ម៉ោង។"</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"ប្តូរ​ទៅ​មុខងារ​នាឡិកា​សម្រាប់​ការ​បញ្ចូល​ម៉ោង។"</string>
 </resources>
diff --git a/core/res/res/values-kn/strings.xml b/core/res/res/values-kn/strings.xml
index 5c53b1c..1dc8a32 100644
--- a/core/res/res/values-kn/strings.xml
+++ b/core/res/res/values-kn/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"ಸ್ಥಿತಿ ಪಟ್ಟಿಯನ್ನು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಿ ಇಲ್ಲವೇ ಮಾರ್ಪಡಿಸಿ"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"ಸ್ಥಿತಿ ಪಟ್ಟಿಯನ್ನು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲು ಅಥವಾ ಸೇರಿಸಲು ಮತ್ತು ಸಿಸ್ಟಂ ಐಕಾನ್‌ಗಳನ್ನು ತೆಗೆದುಹಾಕಲು ಅಪ್ಲಿಕೇಶನ್‌ಗೆ ಅವಕಾಶ ನೀಡುತ್ತದೆ."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"ಸ್ಥಿತಿ ಪಟ್ಟಿಯಾಗಿರಲು"</string>
@@ -1146,6 +1148,8 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"ಹೆಚ್ಚಿನ ಆಯ್ಕೆಗಳಿಗೆ ಟ್ಯಾಪ್ ಮಾಡಿ."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB ಡೀಬಗಿಂಗ್‌‌ ಸಂಪರ್ಕ"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"USB ಡೀಬಗ್‌ ಮಾಡುವಿಕೆಯನ್ನು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲು ಟ್ಯಾಪ್ ಮಾಡಿ."</string>
+    <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
+    <skip />
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"ದೋಷದ ವರದಿಯನ್ನು ತೆಗೆದುಕೊಳ್ಳಲಾಗುತ್ತಿದೆ…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"ಬಗ್ ವರದಿಯನ್ನು ಹಂಚುವುದೇ?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"ಬಗ್ ವರದಿಯನ್ನು ಹಂಚಿಕೊಳ್ಳಲಾಗುತ್ತಿದೆ…"</string>
@@ -1689,4 +1693,20 @@
     <string name="app_category_news" msgid="7496506240743986873">"ಸುದ್ದಿ ಮತ್ತು ನಿಯತಕಾಲಿಕೆಗಳು"</string>
     <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>
+    <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 ca70e45..20e99bc 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"상태 표시줄 사용 중지 또는 수정"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"앱이 상태 표시줄을 사용중지하거나 시스템 아이콘을 추가 및 제거할 수 있도록 허용합니다."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"상태 표시줄에 위치"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"옵션을 더 보려면 탭하세요."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB 디버깅 연결됨"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"USB 디버깅을 사용하지 않으려면 탭하세요."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"USB 디버깅을 사용하지 않으려면 선택합니다."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"버그 보고서 가져오는 중..."</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"버그 보고서를 공유하시겠습니까?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"버그 신고서 공유 중..."</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"뉴스/잡지"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB 디버깅"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"시간"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"분"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"시간 설정"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"올바른 시간을 입력하세요."</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"시간 입력"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"시간 입력을 위해 텍스트 입력 모드로 전환합니다."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"시간 입력을 위해 시계 모드로 전환합니다."</string>
 </resources>
diff --git a/core/res/res/values-ky/strings.xml b/core/res/res/values-ky/strings.xml
index 94b84f2..4285bd6 100644
--- a/core/res/res/values-ky/strings.xml
+++ b/core/res/res/values-ky/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"абал тилкесин өчүрүү же өзгөртүү"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Колдонмого абал тилкесин өчүрүү же тутум сүрөтчөлөрүн кошуу же алып салуу мүмкүнчүлүгүн берет."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"абал тилкесинин милдетин аткаруу"</string>
@@ -1146,6 +1148,8 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Кошумча параметрлерди ачуу үчүн таптап коюңуз."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB аркылуу мүчүлүштүктөрдү оңдоо туташтырылган"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"USB арклуу мүчүлштктрдү жоюну өчр үчн тийп коюңуз."</string>
+    <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
+    <skip />
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Мүчүлүштүк тууралуу кабар алынууда…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Мүчүлүштүк тууралуу баяндама бөлүшүлсүнбү?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Мүчүлүштүк тууралуу баяндама бөлүшүлүүдө…"</string>
@@ -1689,4 +1693,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Жаңылыктар жана журналдар"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB аркылуу мүчүлүштүктөрдү оңдоо"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"саат"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"мүнөт"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Убакытты коюу"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Убакытты туура көрсөтүңүз"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Убакытты жазыңыз"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Убакытты текст киргизүү режиминде киргизиңиз."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Убакытты дубал саатынын режиминде киргизиңиз."</string>
 </resources>
diff --git a/core/res/res/values-lo/strings.xml b/core/res/res/values-lo/strings.xml
index 816eea2..0facaaa 100644
--- a/core/res/res/values-lo/strings.xml
+++ b/core/res/res/values-lo/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"ປິດການນນຳໃຊ້ ຫຼື ແກ້ໄຂແຖບສະຖານະ"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"ອະນຸຍາດໃຫ້ແອັບຯປິດການເຮັດວຽກຂອງແຖບສະຖານະ ຫຼືເພີ່ມ ແລະລຶບໄອຄອນລະບົບອອກໄດ້."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"ເປັນ​ແຖບ​ສະ​ຖາ​ນະ"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"ແຕະເພື່ອເບິ່ງຕົວເລືອກເພີ່ມເຕີມ."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"ເຊື່ອມຕໍ່ການດີບັ໊ກຜ່ານ USB ແລ້ວ"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"ແຕະເພື່ອປິດການດີບັກຜ່ານ USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"ເລືອກເພື່ອປິດການດີບັ໊ກຜ່ານ USB."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"ກຳລັງຂໍລາຍງານຂໍ້ຜິດພາດ…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"ແບ່ງປັນລາຍງານບັນຫາບໍ?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"ກຳລັງແບ່ງປັນລາຍງານບັນຫາ…"</string>
@@ -1202,8 +1205,8 @@
     <string name="permdesc_readInstallSessions" msgid="2049771699626019849">"​ອະ​ນຸ​ຍາດ​ໃຫ້​ແອັບ​ພລິ​ເຄ​ຊັນ​ອ່ານ​ເຊດ​ຊັນ​ການ​ຕິດ​ຕັ້ງ​ໄດ້. ນີ້​ຈະ​ອະ​ນຸ​ຍາດ​ໃຫ້​ມັນ​ເບິ່ງ​ເຫັນ​ລາຍ​ລະ​ອຽດ​ກ່ຽວ​ກັບ​ການ​ຕິດ​ຕັ້ງ​ແພັກ​ເກດ​ທີ່​ເຮັດ​​ວຽກ​ຢູ່​ໄດ້."</string>
     <string name="permlab_requestInstallPackages" msgid="5782013576218172577">"ຂໍ​ຕິດ​ຕັ້ງ​ແພັກ​ເກດ"</string>
     <string name="permdesc_requestInstallPackages" msgid="5740101072486783082">"ອະ​ນຸ​ຍາດ​ໃຫ້​ແອັບ​ພ​ລິ​ເຄ​ຊັນ​ຂອງ​ການ​ຕິດ​ຕັ້ງ​ແພັກ​ເກດ."</string>
-    <string name="permlab_requestDeletePackages" msgid="1703686454657781242">"request delete packages"</string>
-    <string name="permdesc_requestDeletePackages" msgid="3406172963097595270">"ອະ​ນຸ​ຍາດ​ໃຫ້​ແອັບ​ພ​ລິ​ເຄ​ຊັນ​ຂອງ​ການ​ຕິດ​ຕັ້ງ​ແພັກ​ເກດ."</string>
+    <string name="permlab_requestDeletePackages" msgid="1703686454657781242">"ຮ້ອງຂໍການລຶບແພັກເກດ"</string>
+    <string name="permdesc_requestDeletePackages" msgid="3406172963097595270">"ອະນຸຍາດໃຫ້ແອັບພລິເຄຊັນຮ້ອງຂໍການລຶບແພັກເກດ."</string>
     <string name="permlab_requestIgnoreBatteryOptimizations" msgid="8021256345643918264">"ຖາມເພື່ອໃຫ້ເພີກເສີຍການປັບແຕ່ງແບັດເຕີຣີ"</string>
     <string name="permdesc_requestIgnoreBatteryOptimizations" msgid="8359147856007447638">"ອະນຸຍາດໃຫ້ແອັບຖາມສິດອະນຸຍາດເພື່ອເພີກເສີຍຕໍ່ການປັບແຕ່ງແບັດເຕີຣີສຳລັບແອັບນັ້ນ."</string>
     <string name="tutorial_double_tap_to_zoom_message_short" msgid="1311810005957319690">"ແຕະສອງເທື່ອເພື່ອຄວບຄຸມການຊູມ"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"News &amp; Magazines"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"ການດີບັ໊ກຜ່ານ USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"ຊົ່ວໂມງ"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"ນາທີ"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"ຕັ້ງເວລາ"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"ລະບຸເວລາທີ່ຖືກຕ້ອງ"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"ພິມເວລາໃສ່"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"ສະຫຼັບໄປໃຊ້ໂໝດປ້ອນຂໍ້ຄວາມສຳລັບການປ້ອນເວລາ."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"ສະຫຼັບໄປໃຊ້ໂໝດໂມງສຳລັບການປ້ອນເວລາ."</string>
 </resources>
diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml
index 837134c..5691706 100644
--- a/core/res/res/values-lt/strings.xml
+++ b/core/res/res/values-lt/strings.xml
@@ -284,6 +284,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Valdykite ekrano mastelio keitimo lygį ir pozicijos nustatymą."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Veiksmai gestais"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Galima paliesti, perbraukti, suimti ir atlikti kitus veiksmus gestais."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Kontrolinio kodo gestai"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Gali užfiksuoti gestus, atliktus naudojant įrenginio kontrolinio kodo jutiklį."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"išjungti ar keisti būsenos juostą"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Leidžiama programai neleisti būsenos juostos arba pridėti ir pašalinti sistemos piktogramas."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"būti būsenos juosta"</string>
@@ -1186,6 +1188,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Palieskite, kad būtų rodoma daugiau parinkčių."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB derinimas prijungtas"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Palieskite, kad išjungtumėte USB derinimą."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Pasirinkite, kas išjungtumėte USB derinimą."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Pateikiamas pranešimas apie riktą…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Bendrinti pranešimą apie riktą?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Bendrinamas pranešimas apie riktą..."</string>
@@ -1751,4 +1754,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Naujienos ir žurnalai"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB derinimas"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"valanda"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minutė"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Laiko nustatymas"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Įveskite tinkamą laiką"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Įveskite laiką"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Laiko įvestį pateikti perjungus į teksto įvesties režimą."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Laiko įvestį pateikti perjungus į laikrodžio režimą."</string>
 </resources>
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index 7510e77..07595c1 100644
--- a/core/res/res/values-lv/strings.xml
+++ b/core/res/res/values-lv/strings.xml
@@ -281,6 +281,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Kontrolējiet displeja tālummaiņas līmeni un pozicionēšanu."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Žestu izpilde"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Atbalsta pieskaršanos, vilkšanu, savilkšanu un citus žestus."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Pirksta nospieduma žesti"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Var uztvert žestus ierīces pirksta nospieduma sensorā."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"atspējot vai pārveidot statusa joslu"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Ļauj lietotnei atspējot statusa joslu vai pievienot un noņemt sistēmas ikonas."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"Būt par statusa joslu"</string>
@@ -1166,6 +1168,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Pieskarieties, lai skatītu citas iespējas."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB atkļūdošana ir pievienota."</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Pieskarieties, lai atspējotu USB atkļūdošanu."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Atlasiet, lai atspējotu USB atkļūdošanu."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Notiek kļūdas pārskata izveide…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Vai kopīgot kļūdas pārskatu?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Notiek kļūdas pārskata kopīgošana…"</string>
@@ -1720,4 +1723,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Ziņas un žurnāli"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB atkļūdošana"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"stunda"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minūte"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Laika iestatīšana"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Ievadiet derīgu laiku."</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Ierakstiet laiku"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Lai ievadītu laiku, ieslēdziet teksta ievades režīmu."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Lai ievadītu laiku, ieslēdziet pulksteņa režīmu."</string>
 </resources>
diff --git a/core/res/res/values-mk/strings.xml b/core/res/res/values-mk/strings.xml
index 0e3862f..afe0fb8 100644
--- a/core/res/res/values-mk/strings.xml
+++ b/core/res/res/values-mk/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"оневозможи или измени статусна лента"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Дозволува апликацијата да ја оневозможи статусната лента или да додава или отстранува системски икони."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"да стане статусна лента"</string>
@@ -1146,6 +1148,8 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Допрете за повеќе опции."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Поврзано е отстранување грешки преку УСБ"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Допрете за да се оневозможи отстранувањето грешки преку USB."</string>
+    <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
+    <skip />
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Се зема извештајот за грешки…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Да се сподели извештајот за грешки?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Се споделува извештај за грешки…"</string>
@@ -1691,4 +1695,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Вести и списанија"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Отстранување грешки на USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"час"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"минута"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Постави време"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Внесете важечко време"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Внесете време"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Префрлете се на режимот за внесување текст за да внесете време."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Префрлете се на режимот за часовник за да внесете време."</string>
 </resources>
diff --git a/core/res/res/values-ml/strings.xml b/core/res/res/values-ml/strings.xml
index da97cf5..57a4a2d 100644
--- a/core/res/res/values-ml/strings.xml
+++ b/core/res/res/values-ml/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"സ്റ്റാറ്റസ് ബാർ പ്രവർത്തനരഹിതമാക്കുക അല്ലെങ്കിൽ പരിഷ്‌ക്കരിക്കുക"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"നില ബാർ പ്രവർത്തരഹിതമാക്കുന്നതിന് അല്ലെങ്കിൽ സിസ്‌റ്റം ഐക്കണുകൾ ചേർക്കുന്നതിനും നീക്കംചെയ്യുന്നതിനും അപ്ലിക്കേഷനെ അനുവദിക്കുന്നു."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"സ്റ്റാറ്റസ് ബാർ ആയിരിക്കുക"</string>
@@ -1146,6 +1148,8 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"കൂടുതൽ ഓപ്ഷനുകൾക്ക് ടാപ്പുചെയ്യുക."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB ഡീബഗ്ഗിംഗ് കണക്‌റ്റുചെയ്‌തു"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"USB ഡീബഗ്ഗിംഗ് പ്രവർത്തനരഹിതമാക്കാൻ ടാപ്പുചെയ്യുക."</string>
+    <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
+    <skip />
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"ബഗ് റിപ്പോർട്ട് എടുക്കുന്നു…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"ബഗ് റിപ്പോർട്ട് പങ്കിടണോ?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"ബഗ് റിപ്പോർട്ട് പങ്കിടുന്നു…"</string>
@@ -1689,4 +1693,20 @@
     <string name="app_category_news" msgid="7496506240743986873">"വാർത്തകളും മാസികകളും"</string>
     <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>
+    <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 2af81c4..5631f1c 100644
--- a/core/res/res/values-mn/strings.xml
+++ b/core/res/res/values-mn/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"статус самбарыг идэвхгүй болгох болон өөрчлөх"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Апп нь статус самбарыг идэвхгүй болгох эсвэл систем дүрсийг нэмэх, хасах боломжтой."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"статусын хэсэг болох"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Бусад сонголтыг харахын тулд товшино уу."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB дебаг холбогдсон"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"USB-н алдаа засварлахыг идэвхгүй болгохын тулд товшино уу."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"USB дебаг хийхийг идэвхгүй болгох бол сонгоно уу."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Алдааны тайланг авч байна..."</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Алдааны тайланг хуваалцах уу?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Алдааны тайланг хуваалцаж байна..."</string>
@@ -1687,4 +1690,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Мэдээ &amp; сэтгүүл"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB дебаг хийлт"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"Цаг"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"минут"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Цаг тохируулах"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Цагийг зөв оруулна уу"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Хугацааг бичнэ үү"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Цагийг оруулахын тулд текст оруулах горимд шилжүүлнэ үү."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Цагийг оруулахын тулд цагийн горимд шилжүүлнэ үү."</string>
 </resources>
diff --git a/core/res/res/values-mr/strings.xml b/core/res/res/values-mr/strings.xml
index 1be89c2..73f3975 100644
--- a/core/res/res/values-mr/strings.xml
+++ b/core/res/res/values-mr/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"स्टेटस बार अक्षम करा किंवा सुधारित करा"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"स्टेटस बार अक्षम करण्यासाठी किंवा सिस्टीम चिन्हे जोडण्यासाठी आणि काढण्यासाठी अॅप ला अनुमती देते."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"स्टेटस बार होऊ द्या"</string>
@@ -1146,6 +1148,8 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"अधिक पर्यायांसाठी टॅप करा."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB डीबग करणे कनेक्‍ट केले"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"USB डीबग करणे अक्षम करण्यासाठी टॅप करा."</string>
+    <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
+    <skip />
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"दोष अहवाल घेत आहे..."</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"बग अहवाल सामायिक करायचा?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"दोष अहवाल सामायिक करीत आहे..."</string>
@@ -1689,4 +1693,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"बातम्‍या आणि मासिके"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB डीबगिंग"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"तास"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"मिनिट"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"वेळ सेट करा"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"वैध वेळ प्रविष्‍ट करा"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"वेळ टाइप करा"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"वेळ इनपुटसाठी मजकूर इनपुट मोडवर स्विच करा."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"वेळ इनपुटसाठी घड्याळ मोडवर स्विच करा."</string>
 </resources>
diff --git a/core/res/res/values-ms/strings.xml b/core/res/res/values-ms/strings.xml
index ad1f4cb..d7d8ca4 100644
--- a/core/res/res/values-ms/strings.xml
+++ b/core/res/res/values-ms/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Kawal tahap zum dan kedudukan paparan."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Lakukan gerak isyarat"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Boleh ketik, leret, cubit dan laksanakan gerak isyarat lain."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Gerak isyarat cap jari"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Boleh menangkap gerak isyarat yang dilakukan pada penderia cap jari peranti."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"lumpuhkan atau ubah suai bar status"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Membenarkan apl melumpuhkan bar status atau menambah dan mengalih keluar ikon sistem."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"jadi bar status"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Ketik untuk mendapatkan lagi pilihan."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Penyahpepijatan USB disambungkan"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Ketik untuk melumpuhkan penyahpepijatan USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Pilih untuk melumpuhkan penyahpepijatan USB."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Mengambil laporan pepijat…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Kongsi laporan pepijat?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Berkongsi laporan pepijat…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Berita &amp; Majalah"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Penyahpepijatan USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"jam"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minit"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Tetapkan masa"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Masukkan masa yang sah"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Taipkan masa"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Beralih ke mod input teks untuk input masa."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Beralih ke mod jam untuk input masa."</string>
 </resources>
diff --git a/core/res/res/values-my/strings.xml b/core/res/res/values-my/strings.xml
index 129eefd..4fcddfd 100644
--- a/core/res/res/values-my/strings.xml
+++ b/core/res/res/values-my/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"အခြေအနေပြဘားအား အလုပ်မလုပ်ခိုင်းရန်သို့မဟုတ် မွမ်းမံရန်"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"အက်ပ်အား အခြေအနေပြ ဘားကို ပိတ်ခွင့် သို့မဟတ် စနစ် အိုင်ကွန်များကို ထည့်ခြင်း ဖယ်ရှားခြင်း ပြုလုပ်ခွင့် ပြုသည်။"</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"အခြေအနေပြ ဘားဖြစ်ပါစေ"</string>
@@ -1146,6 +1148,8 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"နောက်ထပ်ရွေးချယ်စရာများအတွက် တို့ပါ။"</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB အမှားစစ်ခြင်းအား ချိတ်ဆက်ထားသည်"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"USB ဆက်သွယ်ရေးစနစ်ကို ပိတ်ရန် တို့ပါ။"</string>
+    <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
+    <skip />
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"ချွတ်ယွင်းချက် အစီရင်ခံစာပြုစုနေသည်..."</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"ချွတ်ယွင်းချက် အစီရင်ခံစာကို မျှဝေမလား။"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"ချွတ်ယွင်းမှုအစီရင်ခံစာ မျှဝေနေသည်…"</string>
@@ -1689,4 +1693,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"သတင်းနှင့် မဂ္ဂဇင်းများ"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB အမှားရှာပြင်ခြင်း"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"နာရီ"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"မိ​နစ်​"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"အချိန်သတ်မှတ်ရန်"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"မှန်ကန်သည့် အမည်တစ်ခု ထည့်ရန်"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"အချိန်ကို ရိုက်ရန်"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"အချိန်ထည့်သွင်းရန် စာသားထည့်သွင်းမှုမုဒ်သို့ ပြောင်းပါ။"</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"အချိန်ထည့်သွင်းမှုအတွက် နာရီမုဒ်သို့ ပြောင်းပါ။"</string>
 </resources>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index 9ef1bb3..66c4cc3 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Kontrollér zoomenivået og plasseringen for skjermen."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Gjøre bevegelser"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Kan trykke, sveipe, klype og gjøre andre bevegelser."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Bevegelser på fingeravtrykkssensor"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Kan fange inn bevegelser som utføres på enhetens fingeravtrykkssensor."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"deaktivere eller endre statusfeltet"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Lar appen deaktivere statusfeltet eller legge til og fjerne systemikoner."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"vise appen i statusfeltet"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Trykk for å få flere alternativ."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB-feilsøking tilkoblet"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Trykk for å slå av feilsøking via USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Velg for å deaktivere USB-debugging."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Kjører feilrapport …"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Vil du dele feilrapporten?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Deler feilrapporten …"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Nyheter og tidsskrifter"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB-feilsøking"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"time"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minutt"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Still inn klokkeslett"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Angi et gyldig klokkeslett"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Skriv inn klokkeslett"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Bytt til tekstinndatamodus for tidsinndata."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Bytt til klokkemodus for tidsinndata."</string>
 </resources>
diff --git a/core/res/res/values-ne/strings.xml b/core/res/res/values-ne/strings.xml
index 6ebbc93..92190ef 100644
--- a/core/res/res/values-ne/strings.xml
+++ b/core/res/res/values-ne/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"स्थिति पट्टिलाई अक्षम वा संशोधित गर्नुहोस्"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"स्थिति पट्टि असक्षम पार्न वा प्रणाली आइकनहरू थप्न र हटाउन अनुप्रयोगलाई अनुमति दिन्छ।"</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"वस्तुस्थिति पट्टी हुन दिनुहोस्"</string>
@@ -1152,6 +1154,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"थप विकल्पहरूका लागि ट्याप गर्नुहोस्।"</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB डिबग गर्ने जडित छ"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"USB डिबगिङलाई असक्षम गर्न ट्याप गर्नुहोस्।"</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"USB डिबगिङ असक्षम पार्न चयन गर्नुहोस्।"</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"बग रिपोर्ट लिँदै..."</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"बग रिपोर्टलाई साझेदारी गर्ने हो?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"बग रिपोर्टलाई साझेदारी गर्दै ..."</string>
@@ -1695,4 +1698,20 @@
     <string name="app_category_news" msgid="7496506240743986873">"समाचार तथा पत्रिकाहरू"</string>
     <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>
+    <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 8ece49e..41d77b3 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Bedien het zoomniveau en de positionering van het scherm."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Gebaren uitvoeren"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Kan tikken, vegen, samenknijpen en andere gebaren uitvoeren."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Vingerafdrukgebaren"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Kan gebaren registreren die op de vingerafdruksensor van het apparaat worden getekend."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"statusbalk uitschakelen of wijzigen"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Hiermee kan de app de statusbalk uitschakelen of systeempictogrammen toevoegen en verwijderen."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"de statusbalk zijn"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Tik voor meer opties."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB-foutopsporing verbonden"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Tik om USB-foutopsporing uit te schakelen."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Selecteer deze optie om USB-foutopsporing uit te schakelen."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Bugrapport genereren…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Bugrapport delen?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Bugrapport delen…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Nieuws en tijdschriften"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB-foutopsporing"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"uur"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minuut"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Tijd instellen"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Geef een geldige tijd op"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Typ een tijd"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Schakel naar de tekstinvoermodus om de tijd in te voeren."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Schakel naar de klokmodus om de tijd in te voeren."</string>
 </resources>
diff --git a/core/res/res/values-pa/strings.xml b/core/res/res/values-pa/strings.xml
index 8438fb9..9d723af 100644
--- a/core/res/res/values-pa/strings.xml
+++ b/core/res/res/values-pa/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"ਸਥਿਤੀ ਬਾਰ ਅਸਮਰੱਥ ਬਣਾਓ ਜਾਂ ਸੰਸ਼ੋਧਿਤ ਕਰੋ"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"ਐਪ ਨੂੰ ਸਥਿਤੀ ਬਾਰ ਨੂੰ ਅਸਮਰੱਥ ਬਣਾਉਣ ਜਾਂ ਸਿਸਟਮ ਆਈਕਨਾਂ ਨੂੰ ਜੋੜਨ ਅਤੇ ਹਟਾਉਣ ਦੀ ਆਗਿਆ ਦਿੰਦਾ ਹੈ।"</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"ਸਥਿਤੀ ਪੱਟੀ ਬਣਨ ਦਿਓ"</string>
@@ -1146,6 +1148,8 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"ਹੋਰ ਵਿਕਲਪਾਂ ਲਈ ਟੈਪ ਕਰੋ।"</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB ਡੀਬਗਿੰਗ ਕਨੈਕਟ ਕੀਤੀ"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"USB ਡੀਬੱਗਿੰਗ ਨੂੰ ਅਯੋਗ ਬਣਾਉਣ ਲਈ ਟੈਪ ਕਰੋ।"</string>
+    <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
+    <skip />
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"ਬੱਗ ਰਿਪਰੋਟ ਪ੍ਰਾਪਤ ਕੀਤੀ ਜਾ ਰਹੀ ਹੈ..."</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"ਕੀ ਬੱਗ ਰਿਪੋਰਟ ਸਾਂਝੀ ਕਰਨੀ ਹੈ?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"ਬੱਗ ਰਿਪੋਰਟ ਸਾਂਝੀ ਕੀਤੀ ਜਾ ਰਹੀ ਹੈ…"</string>
@@ -1689,4 +1693,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"ਖਬਰਾਂ ਅਤੇ ਰਸਾਲੇ"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB ਡੀਬੱਗਿੰਗ"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"ਘੰਟਾ"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"ਮਿੰਟ"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"ਸਮਾਂ ਸੈੱਟ ਕਰੋ"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"ਇੱਕ ਵੈਧ ਸਮਾਂ ਦਾਖਲ ਕਰੋ"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"ਸਮਾਂ ਟਾਈਪ ਕਰੋ"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"ਸਮਾਂ ਇਨਪੁੱਟ ਕਰਨ ਲਈ ਲਿਖਤ ਇਨਪੁੱਟ ਮੋਡ \'ਤੇ ਬਦਲੀ ਕਰੋ।"</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"ਸਮਾਂ ਇਨਪੁੱਟ ਕਰਨ ਲਈ ਘੜੀ ਮੋਡ \'ਤੇ ਬਦਲੀ ਕਰੋ।"</string>
 </resources>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index 125f3f2..a3cfb49 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -284,6 +284,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Regulowanie poziomu i obszaru powiększenia ekranu."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Obsługa gestów"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Obsługuje kliknięcia, przesunięcia, ściągnięcia palców i inne gesty."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Gesty związane z odciskiem palca"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Może przechwytywać gesty wykonywane na czytniku linii papilarnych w urządzeniu."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"wyłączanie lub zmienianie paska stanu"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Pozwala aplikacji na wyłączanie paska stanu oraz dodawanie i usuwanie ikon systemowych."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"działanie jako pasek stanu"</string>
@@ -1186,6 +1188,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Kliknij, by wyświetlić więcej opcji."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Podłączono moduł debugowania USB"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Kliknij, by wyłączyć debugowanie USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Wybierz, aby wyłączyć debugowanie USB."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Zgłaszam błąd…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Udostępnić raport o błędzie?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Udostępniam raport o błędzie…"</string>
@@ -1751,4 +1754,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Wiadomości i czasopisma"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Debugowanie USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"godzina"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minuta"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Ustawianie godziny"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Wpisz prawidłowy czas"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Podaj czas"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Aby wprowadzić czas, włącz tryb wprowadzania tekstu."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Aby wprowadzić czas, włącz tryb zegara."</string>
 </resources>
diff --git a/core/res/res/values-pt-rBR/strings.xml b/core/res/res/values-pt-rBR/strings.xml
index c6d217a..6ef918c 100644
--- a/core/res/res/values-pt-rBR/strings.xml
+++ b/core/res/res/values-pt-rBR/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Controlar o posicionamento e nível de zoom da tela."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Fazer gestos"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Toque, deslize, faça gestos de pinça e faça outros gestos."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Gestos de impressão digital"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Pode captar gestos realizados no sensor de impressão digital do dispositivo."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"desativar ou modificar a barra de status"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Permite que o app desative a barra de status ou adicione e remova ícones do sistema."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"ser a barra de status"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Toque para ver mais opções."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Depuração USB conectada"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Toque para desativar a depuração do USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Selecione para desativar a depuração USB."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Gerando relatório do bug..."</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Compartilhar relatório do bug?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Compartilhando relatório do bug…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Notícias e revistas"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Depuração USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"hora"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minuto"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Definir horário"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Informe um horário válido"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Digite o horário"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Alterne para o modo de entrada de texto para informar o horário."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Alterne para o modo de relógio para informar o horário."</string>
 </resources>
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index eabc2f4..ac59f18 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Controlar o nível de zoom e o posicionamento do ecrã."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Realizar gestos"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"É possível tocar, deslizar rapidamente, juntar os dedos e realizar outros gestos"</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Gestos de impressão digital"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Pode capturar gestos realizados no sensor de impressões digitais do dispositivo."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"desativar ou modificar barra de estado"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Permite à aplicação desativar a barra de estado ou adicionar e remover ícones do sistema."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"ser apresentada na barra de estado"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Toque para obter mais opções."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Depuração USB ligada"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Toque para desativar a depuração USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Seleccione para desativar depuração USB."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"A criar relatório de erro…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Pretende partilhar o relatório de erro?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"A partilhar relatório de erro…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Notícias e revistas"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Depuração USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"hora"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minuto"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Definir hora"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Introduza uma hora válida"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Introduza a hora"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Mude para o modo de introdução de texto para a introdução da hora."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Mude para o modo de relógio para a introdução da hora."</string>
 </resources>
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index c6d217a..6ef918c 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Controlar o posicionamento e nível de zoom da tela."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Fazer gestos"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Toque, deslize, faça gestos de pinça e faça outros gestos."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Gestos de impressão digital"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Pode captar gestos realizados no sensor de impressão digital do dispositivo."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"desativar ou modificar a barra de status"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Permite que o app desative a barra de status ou adicione e remova ícones do sistema."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"ser a barra de status"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Toque para ver mais opções."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Depuração USB conectada"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Toque para desativar a depuração do USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Selecione para desativar a depuração USB."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Gerando relatório do bug..."</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Compartilhar relatório do bug?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Compartilhando relatório do bug…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Notícias e revistas"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Depuração USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"hora"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minuto"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Definir horário"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Informe um horário válido"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Digite o horário"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Alterne para o modo de entrada de texto para informar o horário."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Alterne para o modo de relógio para informar o horário."</string>
 </resources>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index 5e7df4b..42d2775 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -281,6 +281,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Controlați nivelul de zoom și poziționarea afișajului."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Folosiți gesturi"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Se poate atinge, glisa, ciupi și se pot folosi alte gesturi."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Gesturi ce implică amprente"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Poate reda gesturile făcute pe senzorul de amprentă al dispozitivelor."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"dezactivare sau modificare bare de stare"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Permite aplicației să dezactiveze bara de stare sau să adauge și să elimine pictograme de sistem."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"să fie bara de stare"</string>
@@ -1166,6 +1168,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Atingeți pentru mai multe opțiuni."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Depanarea USB este conectată"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Atingeți ca să dezactivați remedierea erorilor prin USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Selectați pentru a dezactiva depanarea USB."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Se creează un raport de eroare…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Trimiteți raportul de eroare?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Se trimite raportul de eroare…"</string>
@@ -1720,4 +1723,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Știri și reviste"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Remedierea erorilor prin USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"oră"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minut"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Setați ora"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Introduceți o oră validă"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Introduceți ora"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Pentru a introduce ora, comutați la modul de introducere a textului."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Pentru a introduce ora, comutați la modul ceas."</string>
 </resources>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index 5aabe4d..9a82c38 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -284,6 +284,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="permlab_statusBar" msgid="7417192629601890791">"Отключение/изменение строки состояния"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Приложение сможет отключать строку состояния, а также добавлять и удалять системные значки."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"Замена строки состояния"</string>
@@ -1186,6 +1188,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Нажмите, чтобы показать дополнительные параметры."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Отладка по USB разрешена"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Нажмите, чтобы отключить отладку по USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Нажмите, чтобы отключить отладку USB."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Подготовка отчета об ошибке"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Разрешить доступ к информации об ошибке?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Отправка отчета об ошибке"</string>
@@ -1751,4 +1754,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Новости и журналы"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Отладка по USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"ч."</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"мин."</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Время"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Указано недопустимое время."</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Введите время"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Чтобы ввести время, перейдите в режим ввода текста."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Чтобы ввести время, перейдите в режим часов."</string>
 </resources>
diff --git a/core/res/res/values-si/strings.xml b/core/res/res/values-si/strings.xml
index d776aaa..e5fac69 100644
--- a/core/res/res/values-si/strings.xml
+++ b/core/res/res/values-si/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"තත්ව තීරුව අබල කරන්න හෝ වෙනස් කරන්න"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"තත්ව තීරුව අක්‍රිය කිරීමට හෝ පද්ධති නිරූපක එකතු හෝ ඉවත් කිරීමට යෙදුමට අවසර දේ."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"තත්ත්ව තීරුව බවට පත්වීම"</string>
@@ -1089,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>
@@ -1148,6 +1150,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"තවත් විකල්ප සඳහා තට්ටු කරන්න."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB නිදොස්කරණය සම්බන්ධිතයි"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"USB නිදොස්කරණය අබල කිරීමට තට්ටු කරන්න."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"USB නිදොස්කරණය අබල කිරීමට තෝරන්න."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"දෝෂ වාර්තාවක් ගනිමින්…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"දෝෂ වාර්තාව බෙදා ගන්නද?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"දෝෂ වාර්තාවක් බෙදා ගනිමින්..."</string>
@@ -1691,4 +1694,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"පුවත් සහ සඟරා"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB නිදොස්කරණය"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"පැය"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"විනාඩිය"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"වේලාව සකසන්න"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"වලංගු වේලාවක් ඇතුළු කරන්න"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"වේලාව ටයිප් කරන්න"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"වේලා ආදානය සඳහා ආදාන ප්‍රකාරය වෙත මාරු වෙන්න."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"වේලා ආදානය සඳහා ඔරලෝසු ප්‍රකාරය වෙත මාරු වෙන්න."</string>
 </resources>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index c7b094a..03bb2d4 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -284,6 +284,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Ovládajte úroveň priblíženia/oddialenia obrazovky a umiestnenie"</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Gestá"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Je možné použiť klepnutie, prejdenie, stiahnutie prstami a ďalšie gestá."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Gestá odtlačkov prstov"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Dokáže zaznamenať gestá vykonané na senzore odtlačkov prstov."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"zakázanie alebo zmeny stavového riadka"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Umožňuje aplikácii vypnúť stavový riadok alebo pridať a odstrániť systémové ikony."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"vydávanie sa za stavový riadok"</string>
@@ -1186,6 +1188,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Klepnutím zobrazíte ďalšie možnosti."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Ladenie cez USB pripojené"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Klepnutím zakážete ladenie cez USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Výberom zakážete ladenie USB."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Preberá sa hlásenie chyby…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Chcete zdieľať hlásenie chyby?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Zdieľa sa hlásenie chyby…"</string>
@@ -1751,4 +1754,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Noviny a časopisy"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Ladenie cez USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"hodina"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minúta"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Nastavenie času"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Zadajte platný čas"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Zadajte čas"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Ak chcete zadať čas, prepnite na textový režim vstupu"</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Ak chcete zadať čas, prepnite na režim hodín."</string>
 </resources>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index ab8264c..718ab5c 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -284,6 +284,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Nadziranje stopnje povečave in položaja prikaza."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Izvajanje potez"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Mogoče je izvajanje dotikov, vlečenja, primikanja in razmikanja prstov ter drugih potez."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Poteze po tipalu prstnih odtisov"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Prepoznava poteze, narejene po tipalu prstnih odtisov naprave."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"onemogočanje ali spreminjanje vrstice stanja"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Aplikacijam omogoča onemogočenje vrstice stanja ali dodajanje in odstranjevanje ikon sistema."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"postane vrstica stanja"</string>
@@ -1186,6 +1188,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Dotaknite se za več možnosti."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Iskanje napak prek USB je povezano"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Dotaknite se za izklop odpravljanja napak prek USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Izberite, če želite onemogočiti iskanje in odpravljanje napak prek vrat USB."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Zajemanje poročila o napakah …"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Želite poslati poročilo o napakah?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Pošiljanje poročila o napakah …"</string>
@@ -1751,4 +1754,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Novice in revije"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Odpravljanje težav prek povezave USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"ura"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minute"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Nastavitev ure"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Vnesite veljaven čas"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Vnesite uro"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Preklopite na način za vnašanje besedila, da vnesete čas."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Preklopite na način ure, da vnesete čas."</string>
 </resources>
diff --git a/core/res/res/values-sq/strings.xml b/core/res/res/values-sq/strings.xml
index fc9384c..15f0e1e 100644
--- a/core/res/res/values-sq/strings.xml
+++ b/core/res/res/values-sq/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Kontrollo nivelin dhe pozicionimin e zmadhimit të ekranit."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Kryen gjeste"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Mund të trokasë, rrëshqasë, bashkojë gishtat dhe kryejë gjeste të tjera."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Gjestet e gjurmës së gishtit"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Mund të kapë gjestet e kryera në sensorin e gjurmës së gishtit të pajisjeve."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"çaktivizo ose modifiko shiritin e statusit"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Lejon aplikacionin të çaktivizojë shiritin e statusit dhe të heqë ikonat e sistemit."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"të bëhet shiriti i statusit"</string>
@@ -1146,6 +1148,8 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Trokit për më shumë opsione."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Korrigjuesi i USB-së i lidhur"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Trokit për të çaktivizuar korrigjimin e gabimeve të USB-së."</string>
+    <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
+    <skip />
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Po merret raporti i defekteve në kod…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Të ndahet raporti i defektit në kod?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Po ndan raportin e defekteve në kod..."</string>
@@ -1689,4 +1693,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Lajme dhe revista"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Korrigjimi i USB-së"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"orë"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minutë"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Vendos orën"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Fut një kohë të vlefshme"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Shkruaj kohën"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Kalo te modaliteti i hyrjes së tekstit për hyrjen e kohës."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Kalo te modaliteti i orës për hyrjen e kohës."</string>
 </resources>
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index 93253c2..3edae1b 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -281,6 +281,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="permlab_statusBar" msgid="7417192629601890791">"онемогућавање или измена статусне траке"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Дозвољава апликацији да онемогући статусну траку или да додаје и уклања системске иконе."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"функционисање као статусна трака"</string>
@@ -1166,6 +1168,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Додирните за још опција."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Отклањање грешака са USB-а је успостављено"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Додирните да бисте онемогућили отклањање грешака са USB-а."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Изаберите да бисте онемогућили отклањања грешака са USB-а."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Извештај о грешци се генерише…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Желите ли да поделите извештај о грешци?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Дели се извештај о грешци…"</string>
@@ -1720,4 +1723,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Новости и часописи"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Отклањање грешака са USB-а"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"сат"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"минут"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Подешавање времена"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Унесите важеће време"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Унесите време"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Пређите у режим уноса текста ради уноса времена."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Пређите у режим сата ради уноса времена."</string>
 </resources>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index 88089b9..4c673d0 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Styr skärmens zoomnivå och positionering."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Göra rörelser"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Kan trycka, svepa, nypa och göra andra rörelser."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Fingeravtrycksrörelser"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Kan registrera rörelser som utförs med hjälp av enhetens fingeravtryckssensor."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"inaktivera eller ändra statusfält"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Tillåter att appen inaktiverar statusfältet eller lägger till och tar bort systemikoner."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"visas i statusfältet"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Tryck för fler alternativ."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB-felsökning ansluten"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Tryck om du vill inaktivera USB-felsökning."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Välj att inaktivera USB-felsökning."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Felrapporten överförs …"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Vill du dela felrapporten?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Felrapporten delas …"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Nyheter och tidskrifter"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB-felsökning"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"timme"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minut"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Ange tid"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Ange en giltig tid"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Ange tid"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Byt till textinmatningsläget och ange tid."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Byt till klockläget och ange tid."</string>
 </resources>
diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml
index db6f8cf..98fcc6b 100644
--- a/core/res/res/values-sw/strings.xml
+++ b/core/res/res/values-sw/strings.xml
@@ -276,6 +276,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Dhibiti kiwango cha kukuza na nafasi cha onyesho."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Tekeleza ishara"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Unaweza kugonga, kutelezesha kidole, kubana na kutekeleza ishara zingine."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Ishara za alama ya kidole"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Inaweza kurekodi ishara zinazotekelezwa kwenye kitambua alama ya kidole."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"zima au rekebisha mwambaa hali"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Inaruhusu programu kulemaza upau wa hali au kuongeza na kutoa ikoni za mfumo."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"kuwa sehemu ya arifa"</string>
@@ -1144,6 +1146,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Gonga ili upate chaguo zaidi."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Utatuaji wa USB umeunganishwa"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Gonga ili uzime utatuaji wa USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Chagua ili kulemaza utatuaji USB."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Inatayarisha ripoti ya hitilafu…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Ungependa kushiriki ripoti ya hitilafu?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Inashiriki ripoti ya hitilafu…"</string>
@@ -1687,4 +1690,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Habari na Magazeti"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Utatuzi wa USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"saa"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"dakika"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Weka muda"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Weka muda sahihi"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Andika wakati"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Badilisha data ya wakati iwe katika hali ya maandishi."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Badilisha data ya wakati iwe katika hali ya saa ya mviringo."</string>
 </resources>
diff --git a/core/res/res/values-ta/strings.xml b/core/res/res/values-ta/strings.xml
index e259a39..ee3a41d 100644
--- a/core/res/res/values-ta/strings.xml
+++ b/core/res/res/values-ta/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"நிலைப் பட்டியை முடக்குதல் அல்லது மாற்றுதல்"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"நிலைப் பட்டியை முடக்க அல்லது முறைமையில் ஐகான்களைச் சேர்க்க மற்றும் அகற்ற பயன்பாட்டை அனுமதிக்கிறது."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"நிலைப் பட்டியில் இருக்கும்"</string>
@@ -1146,6 +1148,8 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"மேலும் விருப்பங்களுக்கு, தட்டவும்."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB பிழைதிருத்தம் இணைக்கப்பட்டது"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"USB பிழை திருத்தத்தை முடக்க, தட்டவும்."</string>
+    <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
+    <skip />
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"பிழை அறிக்கையை எடுக்கிறது…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"பிழை அறிக்கையைப் பகிரவா?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"பிழை அறிக்கையைப் பகிர்கிறது…"</string>
@@ -1689,4 +1693,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"செய்திகளும் பத்திரிகைகளும்"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB பிழைத்திருத்தம்"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"மணிநேரம்"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"நிமிடம்"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"நேரத்தை அமை"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"சரியான நேரத்தை உள்ளிடவும்"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"நேரத்தை உள்ளிடவும்"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"உரை உள்ளீட்டிற்காக, கடிகாரப் பயன்முறைக்கு மாற்றும்."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"நேர உள்ளீட்டிற்காக, கடிகாரப் பயன்முறைக்கு மாற்றும்."</string>
 </resources>
diff --git a/core/res/res/values-te/strings.xml b/core/res/res/values-te/strings.xml
index dc5653c..46c5bce 100644
--- a/core/res/res/values-te/strings.xml
+++ b/core/res/res/values-te/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"స్థితి బార్‌ను నిలిపివేయడం లేదా సవరించడం"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"స్థితి బార్‌ను నిలిపివేయడానికి లేదా సిస్టమ్ చిహ్నాలను జోడించడానికి మరియు తీసివేయడానికి అనువర్తనాన్ని అనుమతిస్తుంది."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"స్థితి పట్టీగా ఉండటం"</string>
@@ -1146,6 +1148,8 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"మరిన్ని ఎంపికల కోసం నొక్కండి."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB డీబగ్గింగ్ కనెక్ట్ చేయబడింది"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"USB డీబగ్గింగ్‌ను నిలిపివేయడానికి నొక్కండి."</string>
+    <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
+    <skip />
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"బగ్ నివేదికను తీస్తోంది…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"బగ్ నివేదికను భాగస్వామ్యం చేయాలా?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"బగ్ నివేదికను భాగస్వామ్యం చేస్తోంది..."</string>
@@ -1689,4 +1693,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"వార్తలు &amp; వార్తాపత్రికలు"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB డీబగ్గింగ్"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"గంట"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"నిమిషం"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"సమయాన్ని సెట్ చేయండి"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"చెల్లుబాటు అయ్యే సమయాన్ని నమోదు చేయండి"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"సమయంలో టైప్ చేయండి"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"సమయాన్ని నమోదు చేయడం కోసం వచన నమోదు మోడ్‌కి మారండి."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"సమయాన్ని నమోదు చేయడం కోసం గడియారం మోడ్‌కు మారండి."</string>
 </resources>
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index ae84073..230d42a 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"ปิดการใช้งานหรือแก้ไขแถบสถานะ"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"อนุญาตให้แอปพลิเคชันปิดใช้งานแถบสถานะหรือเพิ่มและนำไอคอนระบบออก"</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"เป็นแถบสถานะ"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"แตะเพื่อดูตัวเลือกเพิ่มเติม"</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"เชื่อมต่อการแก้ไขข้อบกพร่อง USB แล้ว"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"แตะเพื่อปิดใช้การแก้ไขข้อบกพร่องของ USB"</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"เลือกเพื่อปิดใช้งานการแก้ไขข้อบกพร่อง USB"</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"กำลังสร้างรายงานข้อบกพร่อง…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"แชร์รายงานข้อบกพร่องไหม"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"กำลังแชร์รายงานข้อบกพร่อง…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"ข่าวสารและนิตยสาร"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"การแก้ไขข้อบกพร่อง USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"ชั่วโมง"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"นาที"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"ตั้งเวลา"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"ป้อนเวลาที่ถูกต้อง"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"พิมพ์เวลา"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"สลับไปโหมดป้อนข้อความเพื่อป้อนเวลา"</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"สลับไปโหมดนาฬิกาเพื่อป้อนเวลา"</string>
 </resources>
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index 3ca68da..e59ed9d 100644
--- a/core/res/res/values-tl/strings.xml
+++ b/core/res/res/values-tl/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Kontrolin ang antas ng pag-zoom at pagpoposisyon ng display."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Magsagawa ng mga galaw"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"May kakayahang mag-tap, mag-swipe, mag-pinch at magsagawa ng iba pang mga galaw."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Mga galaw gamit ang fingerprint"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Makukunan ang mga galaw na ginawa sa sensor para sa fingerprint ng mga device."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"i-disable o baguhin ang status bar"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Pinapayagan ang app na i-disable ang status bar o magdagdag at mag-alis ng mga icon ng system."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"maging status bar"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"I-tap para sa higit pang mga opsyon."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Konektado ang debugging ng USB"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"I-tap upang i-disable ang pag-debug ng USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Piliin upang i-disable ang debugging ng USB."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Kinukuha ang ulat ng bug…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Gusto mo bang ibahagi ang ulat ng bug?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Ibinabahagi ang ulat ng bug…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Balita at Mga Magazine"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Pag-debug ng USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"oras"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minuto"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Itakda ang oras"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Maglagay ng wastong oras"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"I-type ang oras"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Lumipat sa pamamaraan ng pag-input ng text para sa input na oras."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Lumipat sa mode ng orasan para sa input na oras."</string>
 </resources>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index 70183a1..1a2bf72 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Ekranın yakınlaştırma seviyesini ve konumunu kontrol edin."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Haraketleri yapma"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Hafifçe dokunabilir, hızlıca kaydırabilir, sıkıştırabilir ve diğer hareketleri yapabilirsiniz."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Parmak izi hareketleri"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Cihazların parmak izi sensörlerinde gerçekleştirilen hareketleri yakalayabilir."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"durum çubuğunu devre dışı bırak veya değiştir"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Uygulamaya, durum çubuğunu devre dışı bırakma ve sistem simgelerini ekleyip kaldırma izni verir."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"durum çubuğunda olma"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Diğer seçenekler için dokunun."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB hata ayıklaması bağlandı"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"USB hata ayıklama özelliğini devre dışı bırakmak için dokunun."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"USB hata ayıklamasını devre dışı bırakmak için tıklayın."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Hata raporu alınıyor…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Hata raporu paylaşılsın mı?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Hata raporu paylaşılıyor..."</string>
@@ -1232,7 +1235,7 @@
     <string name="wallpaper_binding_label" msgid="1240087844304687662">"Duvar Kağıdı"</string>
     <string name="chooser_wallpaper" msgid="7873476199295190279">"Duvar kağıdını değiştir"</string>
     <string name="notification_listener_binding_label" msgid="2014162835481906429">"Bildirim dinleyici"</string>
-    <string name="vr_listener_binding_label" msgid="4316591939343607306">"Sanal Gerçeklik dinleyici"</string>
+    <string name="vr_listener_binding_label" msgid="4316591939343607306">"VR dinleyici"</string>
     <string name="condition_provider_service_binding_label" msgid="1321343352906524564">"Durum sağlayıcı"</string>
     <string name="notification_ranker_binding_label" msgid="774540592299064747">"Bildirim sıralama hizmeti"</string>
     <string name="vpn_title" msgid="19615213552042827">"VPN etkinleştirildi"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Haberler ve Dergiler"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB üzerinden hata ayıklama"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"saat"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"dakika"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Saati ayarlayın"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Geçerli bir saat girin"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Zamanı yazın"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Zaman girişi için metin girişi moduna geçin."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Zaman girişi için saat moduna geçin."</string>
 </resources>
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index 3fd1f23..913a13b 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -284,6 +284,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="permlab_statusBar" msgid="7417192629601890791">"вимикати чи змін. рядок стану"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Дозволяє програмі вимикати рядок стану чи додавати та видаляти піктограми системи."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"відображатися як рядок стану"</string>
@@ -1186,6 +1188,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Торкніться, щоб переглянути більше опцій."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Налагодження USB завершено"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Торкніться, щоб вимкнути налагодження USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Вибер., щоб вимкн. налагодж. USB."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Створюється повідомлення про помилку…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Надіслати звіт про помилку?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Надсилається звіт про помилку…"</string>
@@ -1359,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>
@@ -1751,4 +1754,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Новини та журнали"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Налагодження USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"години"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"хвилини"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Налаштувати час"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Введіть дійсний час"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Введіть час"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Перейти в текстовий режим, щоб ввести час."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Перейти в режим годинника, щоб ввести час."</string>
 </resources>
diff --git a/core/res/res/values-ur/strings.xml b/core/res/res/values-ur/strings.xml
index 86515b3..82366e8 100644
--- a/core/res/res/values-ur/strings.xml
+++ b/core/res/res/values-ur/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"اسٹیٹس بار کو غیر فعال یا اس میں ترمیم کریں"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"ایپ کو اسٹیٹس بار غیر فعال کرنے یا سسٹم آئیکنز شامل کرنے اور ہٹانے کی اجازت دیتا ہے۔"</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"بطور اسٹیٹس بار کام لیں"</string>
@@ -1146,6 +1148,8 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"مزید اختیارات کیلئے تھپتھپائیں۔"</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"‏USB ڈیبگ کرنا مربوط ہو گیا"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"‏USB ڈیبگنگ کو غیر فعال کرنے کیلئے تھپتھپائیں۔"</string>
+    <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
+    <skip />
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"بگ رپورٹ لی جا رہی ہے…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"بگ رپورٹ کا اشتراک کریں؟"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"بگ رپورٹ کا اشتراک ہو رہا ہے…"</string>
@@ -1689,4 +1693,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"خبریں اور میگزین"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"‏USB ڈیبگ کرنا"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"گھنٹہ"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"منٹ"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"وقت سیٹ کریں"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"درست وقت درج کریں"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"وقت ٹائپ کریں"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"وقت ان پٹ کے لیے ٹیکسٹ ان پٹ وضع پر سوئچ کریں۔"</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"وقت ان پٹ کے لیے گھڑی و‏ضع پر سوئچ کریں۔"</string>
 </resources>
diff --git a/core/res/res/values-uz/strings.xml b/core/res/res/values-uz/strings.xml
index 5f978c6..114584c 100644
--- a/core/res/res/values-uz/strings.xml
+++ b/core/res/res/values-uz/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Ekranni kattalashtirish darajasi va joylashuvini boshqaradi."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Imo-ishoralar bilan boshqarish"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Bosish, surish; jipslashtirish va boshqa imo-ishoralarni amalga oshirish mumkin."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Barmoq izi ishoralari"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Barmoq izi skanerlarida kiritilgan ishoralarni taniy oladi."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"holat panelini o‘zgartirish yoki o‘chirish"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Ilova holat panelini o‘chirib qo‘yishi hamda tizim ikonkalarini qo‘shishi yoki olib tashlashi mumkin."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"holat qatorida ko‘rinishi"</string>
@@ -1146,6 +1148,8 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Boshqa parametrlarini ko‘rish uchun bosing."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"USB orqali nosozliklarni tuzatish"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"O‘chirib qo‘yish uchun bu yerga bosing."</string>
+    <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
+    <skip />
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Xatoliklar hisoboti olinmoqda…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Xatoliklar hisoboti yuborilsinmi?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Xatoliklar hisoboti yuborilmoqda…"</string>
@@ -1689,4 +1693,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Yangiliklar va jurnallar"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB orqali nosozliklarni tuzatish"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"soat"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"daqiqa"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Vaqtni sozlash"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Vaqt xato ko‘rsatilgan"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Vaqtni kiriting"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Vaqtni kiritish uchun matn kiritish rejimiga o‘ting."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Vaqtni kiritish uchun soat rejimiga o‘ting."</string>
 </resources>
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index e2c6e32..4f8e020 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Kiểm soát vị trí và mức thu phóng của màn hình."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Thực hiện cử chỉ"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Có thể nhấn, vuốt, chụm và thực hiện các cử chỉ khác."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Cử chỉ vân tay"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Có thể ghi lại các cử chỉ được thực hiện trên cảm biến vân tay của thiết bị."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"vô hiệu hóa hoặc sửa đổi thanh trạng thái"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Cho phép ứng dụng vô hiệu hóa thanh trạng thái hoặc thêm và xóa biểu tượng hệ thống."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"trở thành thanh trạng thái"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Nhấn để biết thêm tùy chọn."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Gỡ lỗi USB đã được kết nối"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Nhấn để vô hiệu hóa gỡ lỗi USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Chọn để vô hiệu hóa gỡ lỗi USB."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Đang thu thập báo cáo lỗi…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Chia sẻ báo cáo lỗi?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Đang chia sẻ báo cáo lỗi…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Tin tức và tạp chí"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Gỡ lỗi USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"giờ"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"phút"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Đặt giờ"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Nhập thời gian hợp lệ"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Nhập thời gian"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Chuyển sang chế độ nhập văn bản để nhập thời gian."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Chuyển sang chế độ đồng hồ để nhập thời gian."</string>
 </resources>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index 12f419b..af155e2 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"停用或修改状态栏"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"允许应用停用状态栏或者增删系统图标。"</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"用作状态栏"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"点按即可查看更多选项。"</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"已连接到USB调试"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"点按即可停用 USB 调试功能。"</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"选择停用USB调试。"</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"正在生成错误报告…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"要分享错误报告吗?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"正在分享错误报告…"</string>
@@ -1689,4 +1692,20 @@
     <string name="app_category_news" msgid="7496506240743986873">"新闻和杂志"</string>
     <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>
+    <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 9996617..988a322 100644
--- a/core/res/res/values-zh-rHK/strings.xml
+++ b/core/res/res/values-zh-rHK/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"停用或修改狀態列"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"允許應用程式停用狀態列,並可新增或移除系統圖示。"</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"成為狀態列"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"輕按即可查看更多選項。"</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"已連接 USB 偵錯工具"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"輕按即可停用 USB 偵錯功能。"</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"選取即可停用 USB 偵錯。"</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"正在取得錯誤報告…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"要分享錯誤報告嗎?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"正在分享錯誤報告…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"新聞和雜誌"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB 偵錯"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"小時"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"分鐘"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"設定時間"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"請輸入有效的時間"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"輸入時間"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"切換至文字輸入模式即可輸入時間。"</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"切換至時鐘模式即可輸入時間。"</string>
 </resources>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index 04c5a8e..31fc918 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -278,6 +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="permlab_statusBar" msgid="7417192629601890791">"停用或變更狀態列"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"允許應用程式停用狀態列,並可新增或移除系統圖示。"</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"以狀態列顯示"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"輕觸即可查看更多選項。"</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"已連接 USB 偵錯工具"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"輕觸即可停用 USB 偵錯。"</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"選取以停用 USB 偵錯。"</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"正在接收錯誤報告…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"要分享錯誤報告嗎?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"正在分享錯誤報告…"</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"新聞和雜誌"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB 偵錯"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"小時"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"分鐘"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"設定時間"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"請輸入有效的時間"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"輸入時間"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"切換至文字輸入模式來輸入時間。"</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"切換至時鐘模式來輸入時間。"</string>
 </resources>
diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml
index 095341a..1ca690c 100644
--- a/core/res/res/values-zu/strings.xml
+++ b/core/res/res/values-zu/strings.xml
@@ -278,6 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Lawula ileveli yokusondeza yesibonisi nendawo."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Yenza ukuthinta"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Ingathepha, iswayiphe, incinze, futhi yenze okunye ukuthintwa."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Ukuthinta kwezigxivizo zeminwe"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Ingathatha ukuthinta okwenziwe kunzwa yezigxivizo zeminwe zamadivayisi."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"khubaza noma guqula ibha yomumo"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Ivumela uhlelo lokusebenza ukuthi yenze umudwa ochaza ngesimo ukuthi ungasebenzi noma ukufaka noma ukukhipha izithonjana zohlelo."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"yiba yibha yesimo"</string>
@@ -1146,6 +1148,7 @@
     <string name="usb_notification_message" msgid="3370903770828407960">"Thepha ngezinketho eziningi."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Ukulungisa iphutha le-USB kuxhunyiwe"</string>
     <string name="adb_active_notification_message" msgid="4948470599328424059">"Thepha ukuze ukhubaze ukususa isiphazamisi se-USB."</string>
+    <string name="adb_active_notification_message" product="tv" msgid="8470296818270110396">"Khetha ukuvimbela ukulungisa iphutha le-USB."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Ithatha umbiko wesiphazamisi..."</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Yabelana ngombiko wesiphazamisi?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Yabelana ngombiko wesiphazamisi..."</string>
@@ -1689,4 +1692,13 @@
     <string name="app_category_news" msgid="7496506240743986873">"Izindaba nomagazini"</string>
     <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>
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Ukulungisa iphutha le-USB"</string>
+    <string name="time_picker_hour_label" msgid="2979075098868106450">"ihora"</string>
+    <string name="time_picker_minute_label" msgid="5168864173796598399">"minithi"</string>
+    <string name="time_picker_header_text" msgid="143536825321922567">"Setha isikhathi"</string>
+    <string name="time_picker_input_error" msgid="7574999942502513765">"Faka igama elivumelekile"</string>
+    <string name="time_picker_prompt_label" msgid="7588093983899966783">"Thayipha isikhathi"</string>
+    <string name="time_picker_text_input_mode_description" msgid="4148166758173708199">"Shintshela kumodi yokufaka umbhalo ngokufaka isikhathi."</string>
+    <string name="time_picker_radial_mode_description" msgid="4953403779779557198">"Shintshela kumodi yewashi ngokufakwa kwesikhathi."</string>
 </resources>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index c548219..4d5e45b 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -3392,6 +3392,8 @@
             <flag name="flagRetrieveInteractiveWindows" value="0x00000040" />
             <!-- Has flag {@link android.accessibilityservice.AccessibilityServiceInfo#FLAG_ENABLE_ACCESSIBILITY_VOLUME} -->
             <flag name="flagEnableAccessibilityVolume" value="0x00000080" />
+            <!-- Has flag {@link android.accessibilityservice.AccessibilityServiceInfo#FLAG_REQUEST_ACCESSIBILITY_BUTTON} -->
+            <flag name="flagRequestAccessibilityButton" value="0x00000100" />
             <!-- Has flag {@link android.accessibilityservice.AccessibilityServiceInfo#FLAG_CAPTURE_FINGERPRINT_GESTURES} -->
             <flag name="flagCaptureFingerprintGestures" value="0x00000200" />
         </attr>
@@ -3429,18 +3431,9 @@
         <attr name="canRequestFilterKeyEvents" format="boolean" />
         <!-- Attribute whether the accessibility service wants to be able to control
              display magnification.
-             <p>
-             Required to allow setting the {@link android.accessibilityservice
-             #AccessibilityServiceInfo#FLAG_CAN_CONTROL_MAGNIFICATION} flag.
-             </p>
          -->
         <attr name="canControlMagnification" format="boolean" />
-        <!-- Attribute whether the accessibility service wants to be able to perform gestures.
-             <p>
-             Required to allow setting the {@link android.accessibilityservice
-             #AccessibilityServiceInfo#FLAG_CAN_PERFORM_GESTURES} flag.
-             </p>
-         -->
+        <!-- Attribute whether the accessibility service wants to be able to perform gestures. -->
         <attr name="canPerformGestures" format="boolean" />
         <!-- Attribute whether the accessibility service wants to be able to capture gestures from
              the fingerprint sensor.
@@ -4721,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 -->
@@ -5853,8 +5846,6 @@
 
     <!-- Drawable used to draw masked icons with foreground and background layers. -->
     <declare-styleable name="MaskableIconDrawableLayer">
-        <!-- The color to use for the layer, only if drawable is not defined. -->
-        <attr name="color" />
         <!-- The drawable to use for the layer. -->
         <attr name="drawable" />
      </declare-styleable>
@@ -6982,10 +6973,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" />
 
@@ -8365,7 +8378,6 @@
     </declare-styleable>
 
     <declare-styleable name="MessagingLinearLayout">
-        <attr name="maxHeight" />
         <attr name="spacing" />
     </declare-styleable>
 
@@ -8493,6 +8505,12 @@
         <attr name="fontWeight" format="integer" />
     </declare-styleable>
 
+    <!-- Attributes that are read when parsing a <fontfamily> tag, -->
+    <declare-styleable name="FontFamily">
+        <attr name="fontProviderAuthority" format="string" />
+        <attr name="fontProviderQuery" format="string" />
+    </declare-styleable>
+
     <!-- @hide -->
     <declare-styleable name="RecyclerView">
         <attr name="layoutManager" format="string" />
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index 6d0fdb6..76f4a76 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -885,6 +885,12 @@
          will run against. -->
     <attr name="targetPackage" format="string" />
 
+    <!-- The name of an application's processes that an Instrumentation object
+         will run against.  If not specified, only runs in the main process of the targetPackage.
+         Can either be a comma-separated list of process names or '*' for any process that
+         launches to run targetPackage code. -->
+    <attr name="targetProcess" format="string" />
+
     <!-- Flag indicating that an Instrumentation class wants to take care
          of starting/stopping profiling itself, rather than relying on
          the default behavior of profiling the complete time it is running.
@@ -2050,9 +2056,6 @@
              in a task/stack that isn't focusable. This flag allows them to be focusable.-->
         <attr name="alwaysFocusable" format="boolean" />
         <attr name="enableVrMode" />
-        <!-- @hide This activity is a launcher which should always show up on the top of others.
-             This attribute is ignored if the activity isn't a launcher. -->
-        <attr name="onTopLauncher" format="boolean" />
         <attr name="rotationAnimation" />
         <attr name="visibleToInstantApps" />
         <!-- The code for this component is located in the given split. -->
@@ -2297,6 +2300,7 @@
             is a period then it is appended to your package name. -->
         <attr name="name" />
         <attr name="targetPackage" />
+        <attr name="targetProcess" />
         <attr name="label" />
         <attr name="icon" />
         <attr name="roundIcon" />
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 581537d..fcb0e08 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1286,6 +1286,16 @@
         <item>com.android.networkrecommendation</item>
     </string-array>
 
+    <!-- The package name of the default network recommendation app.
+         A network recommendation provider must:
+             * Be granted the SCORE_NETWORKS permission.
+             * Include a Service for the android.net.scoring.RECOMMEND_NETWORKS action
+               protected by the BIND_NETWORK_RECOMMENDATION_SERVICE permission.
+
+         This must be set to a valid network recommendation app.
+     -->
+    <string name="config_defaultNetworkRecommendationProviderPackage" translatable="false">com.android.networkrecommendation</string>
+
     <!-- Whether to enable Hardware FLP overlay which allows Hardware FLP to be
          replaced by an app at run-time. When disabled, only the
          config_hardwareFlpPackageName package will be searched for Hardware Flp,
@@ -1847,6 +1857,9 @@
     -->
     <fraction name="config_maximumScreenDimRatio">20%</fraction>
 
+    <!-- Minimum size of the scrollbar thumb's touch target. -->
+    <dimen name="config_minScrollbarTouchTarget">48dp</dimen>
+
     <!-- Base "touch slop" value used by ViewConfiguration as a
          movement threshold where scrolling should begin. -->
     <dimen name="config_viewConfigurationTouchSlop">8dp</dimen>
@@ -2538,7 +2551,7 @@
 
     <!-- Default insets [LEFT/RIGHTxTOP/BOTTOM] from the screen edge for picture-in-picture windows.
          These values are in DPs and will be converted to pixel sizes internally. -->
-    <string translatable="false" name="config_defaultPictureInPictureScreenEdgeInsets">8x8</string>
+    <string translatable="false" name="config_defaultPictureInPictureScreenEdgeInsets">16x16</string>
 
     <!-- Max default size [WIDTHxHEIGHT] on screen for picture-in-picture windows to fit inside.
          These values are in DPs and will be converted to pixel sizes internally. -->
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index 927988f..640e74d 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -461,12 +461,12 @@
     <dimen name="floating_toolbar_height">48dp</dimen>
     <dimen name="floating_toolbar_menu_image_button_width">56dp</dimen>
     <dimen name="floating_toolbar_menu_image_button_vertical_padding">12dp</dimen>
-    <dimen name="floating_toolbar_menu_button_side_padding">16dp</dimen>
+    <dimen name="floating_toolbar_menu_button_side_padding">11dp</dimen>
     <dimen name="floating_toolbar_overflow_image_button_width">60dp</dimen>
     <dimen name="floating_toolbar_overflow_side_padding">18dp</dimen>
     <dimen name="floating_toolbar_text_size">14sp</dimen>
     <dimen name="floating_toolbar_menu_button_minimum_width">48dp</dimen>
-    <dimen name="floating_toolbar_preferred_width">328dp</dimen>
+    <dimen name="floating_toolbar_preferred_width">400dp</dimen>
     <dimen name="floating_toolbar_minimum_overflow_height">96dp</dimen>
     <dimen name="floating_toolbar_maximum_overflow_height">192dp</dimen>
     <dimen name="floating_toolbar_horizontal_margin">16dp</dimen>
@@ -475,9 +475,6 @@
 
     <dimen name="chooser_grid_padding">0dp</dimen>
 
-    <item type="dimen" format="integer" name="time_picker_column_start_material">0</item>
-    <item type="dimen" format="integer" name="time_picker_column_end_material">1</item>
-
     <item type="dimen" name="aerr_padding_list_top">15dp</item>
     <item type="dimen" name="aerr_padding_list_bottom">8dp</item>
 
@@ -520,6 +517,7 @@
     <dimen name="item_touch_helper_swipe_escape_max_velocity">800dp</dimen>
 
     <!-- The elevation of AutoFill fill window-->
-    <dimen name="autofill_fill_elevation">2dp</dimen>
+    <dimen name="autofill_fill_elevation">4dp</dimen>
     <dimen name="autofill_fill_item_height">64dp</dimen>
+    <dimen name="autofill_fill_min_margin">16dp</dimen>
 </resources>
diff --git a/core/res/res/values/dimens_material.xml b/core/res/res/values/dimens_material.xml
index ebe577c..e3fdcec 100644
--- a/core/res/res/values/dimens_material.xml
+++ b/core/res/res/values/dimens_material.xml
@@ -149,6 +149,7 @@
     <dimen name="timepicker_radial_picker_dimen">296dp</dimen>
     <dimen name="timepicker_radial_picker_top_margin">16dp</dimen>
     <dimen name="timepicker_radial_picker_horizontal_margin">16dp</dimen>
+    <dimen name="timepicker_edit_text_size">24sp</dimen>
 
     <!-- Used by RadialTimePicker in clock-style TimePicker. -->
     <dimen name="timepicker_selector_radius">20dp</dimen>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index d795d80..78489eb 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" />
@@ -2777,7 +2777,7 @@
         <public name="paddingVertical" />
         <public name="visibleToInstantApps" />
         <public name="keyboardNavigationCluster" />
-        <public name="__removed0" />
+        <public name="targetProcess" />
         <public name="nextClusterForward" />
         <public name="__removed1" />
         <public name="textColorError" />
@@ -2792,6 +2792,10 @@
         <public name="isolatedSplits" />
         <public name="targetSandboxVersion" />
         <public name="canCaptureFingerprintGestures" />
+        <public name="alphabeticModifiers" />
+        <public name="numericModifiers" />
+        <public name="fontProviderAuthority" />
+        <public name="fontProviderQuery" />
     </public-group>
 
     <public-group type="style" first-id="0x010302e0">
@@ -2804,6 +2808,7 @@
     <public type="attr" name="primaryContentAlpha" />
     <public type="attr" name="secondaryContentAlpha" />
 
+
   <!-- ===============================================================
        DO NOT ADD UN-GROUPED ITEMS HERE
 
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 8b9b3b2..8faa76c 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -816,6 +816,16 @@
     <string name="permdesc_systemAlertWindow">This app can appear on top of other apps or other parts of the screen. This may interfere with normal app usage and change the way that other apps appear.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+    <string name="permlab_runInBackground">run in the background</string>
+    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+    <string name="permdesc_runInBackground">This app can run in the background. This may drain battery faster.</string>
+
+    <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+    <string name="permlab_useDataInBackground">use data in the background</string>
+    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+    <string name="permdesc_useDataInBackground">This app can use data in the background. This may increase data usage.</string>
+
+    <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_persistentActivity">make app always run</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permdesc_persistentActivity" product="tablet">Allows the app to make parts of itself persistent in memory.  This can limit memory available to other apps slowing down the tablet.</string>
@@ -2602,11 +2612,14 @@
     <string name="email">Email</string>
 
     <!-- Label for item in the text selection menu to trigger a Dialer app [CHAR LIMIT=20] -->
-    <string name="dial">Dial</string>
+    <string name="dial">Phone</string>
 
     <!-- Label for item in the text selection menu to trigger a Map app [CHAR LIMIT=20] -->
     <string name="map">Map</string>
 
+    <!-- Label for item in the text selection menu to trigger a Browser app [CHAR LIMIT=20] -->
+    <string name="browse">Browse</string>
+
     <!-- If the device is getting low on internal storage, a notification is shown to the user.  This is the title of that notification. -->
     <string name="low_internal_storage_view_title">Storage space running out</string>
     <!-- If the device is getting low on internal storage, a notification is shown to the user.  This is the message of that notification. -->
@@ -3064,6 +3077,7 @@
     <string name="adb_active_notification_title">USB debugging connected</string>
     <!-- Message of notification shown when ADB is actively connected to the phone. -->
     <string name="adb_active_notification_message">Tap to disable USB debugging.</string>
+    <string name="adb_active_notification_message" product="tv">Select to disable USB debugging.</string>
 
     <!-- Title of notification shown to indicate that bug report is being collected. -->
     <string name="taking_remote_bugreport_notification_title">Taking bug report\u2026</string>
@@ -4468,4 +4482,22 @@
 
     <!-- Channel name for DeviceStorageMonitor notifications -->
     <string name="device_storage_monitor_notification_channel">Device storage</string>
+    <!-- Channel name for UsbDeviceManager adb debugging notifications -->
+    <string name="adb_debugging_notification_channel_tv">USB debugging</string>
+
+    <!-- Label for the time picker hour input field. [CHAR LIMIT=20] -->
+    <string name="time_picker_hour_label">hour</string>
+    <!-- Label for the time picker minute input field. [CHAR LIMIT=20] -->
+    <string name="time_picker_minute_label">minute</string>
+    <!-- The title for the time picker dialog. [CHAR LIMIT=NONE] -->
+    <string name="time_picker_header_text">Set time</string>
+    <!-- Error shown to the user if they type in invalid hour or minute in the time picker. [CHAR LIMIT=NONE] -->
+    <string name="time_picker_input_error">Enter a valid time</string>
+    <!-- Label shown to the user in time picker to let them know that should type in time. [CHAR LIMIT=NONE] -->
+    <string name="time_picker_prompt_label">Type in time</string>
+    <!-- Accessibility string used for describing the button in time picker that changes the dialog to text input mode. [CHAR LIMIT=NONE] -->
+    <string name="time_picker_text_input_mode_description">Switch to text input mode for the time input.</string>
+    <!-- Accessibility string used for describing the button in time picker that changes the dialog to circular clock mode. [CHAR LIMIT=NONE] -->
+    <string name="time_picker_radial_mode_description">Switch to clock mode for the time input.</string>
+
 </resources>
diff --git a/core/res/res/values/styles_material.xml b/core/res/res/values/styles_material.xml
index 1e15348..8f061a3 100644
--- a/core/res/res/values/styles_material.xml
+++ b/core/res/res/values/styles_material.xml
@@ -426,6 +426,21 @@
         <item name="textColor">@color/primary_text_secondary_when_activated_material_inverse</item>
     </style>
 
+    <style name="TextAppearance.Material.TimePicker.InputHeader" parent="TextAppearance.Material">
+        <item name="textSize">@dimen/text_size_display_1_material</item>
+        <item name="textColor">@color/white</item>
+        <item name="fontFamily">sans-serif-medium</item>
+    </style>
+
+    <style name="TextAppearance.Material.TimePicker.InputField" parent="TextAppearance.Material">
+        <item name="textSize">@dimen/timepicker_edit_text_size</item>
+    </style>
+
+    <style name="TextAppearance.Material.TimePicker.PromptLabel" parent="TextAppearance.Material">
+        <item name="textSize">@dimen/timepicker_text_size_normal</item>
+        <item name="fontFamily">sans-serif-medium</item>
+    </style>
+
     <style name="TextAppearance.Material.DatePicker.YearLabel" parent="TextAppearance.Material">
         <item name="textColor">@color/primary_text_secondary_when_activated_material_inverse</item>
         <item name="textSize">@dimen/date_picker_year_label_size</item>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 571aa17..0d63a1e 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -120,6 +120,7 @@
   <java-symbol type="id" name="permission_list" />
   <java-symbol type="id" name="pickers" />
   <java-symbol type="id" name="prefs" />
+  <java-symbol type="id" name="prefs_container" />
   <java-symbol type="id" name="prefs_frame" />
   <java-symbol type="id" name="prev" />
   <java-symbol type="id" name="progress" />
@@ -422,6 +423,7 @@
 
   <java-symbol type="dimen" name="accessibility_touch_slop" />
   <java-symbol type="dimen" name="alert_dialog_round_padding"/>
+  <java-symbol type="dimen" name="config_minScrollbarTouchTarget" />
   <java-symbol type="dimen" name="config_prefDialogWidth" />
   <java-symbol type="dimen" name="config_viewConfigurationTouchSlop" />
   <java-symbol type="dimen" name="config_viewMinFlingVelocity" />
@@ -481,6 +483,7 @@
   <java-symbol type="string" name="email" />
   <java-symbol type="string" name="dial" />
   <java-symbol type="string" name="map" />
+  <java-symbol type="string" name="browse" />
   <java-symbol type="string" name="textSelectionCABTitle" />
   <java-symbol type="string" name="BaMmi" />
   <java-symbol type="string" name="CLIRDefaultOffNextCallOff" />
@@ -1914,6 +1917,7 @@
   <java-symbol type="string" name="smv_process" />
   <java-symbol type="string" name="tethered_notification_message" />
   <java-symbol type="string" name="tethered_notification_title" />
+  <java-symbol type="string" name="adb_debugging_notification_channel_tv" />
   <java-symbol type="string" name="usb_accessory_notification_title" />
   <java-symbol type="string" name="usb_mtp_notification_title" />
   <java-symbol type="string" name="usb_charging_notification_title" />
@@ -2786,6 +2790,7 @@
 
   <!-- Network Recommendation -->
   <java-symbol type="array" name="config_networkRecommendationPackageNames" />
+  <java-symbol type="string" name="config_defaultNetworkRecommendationProviderPackage" />
 
   <!-- Whether allow 3rd party apps on internal storage. -->
   <java-symbol type="bool" name="config_allow3rdPartyAppOnInternal" />
@@ -2833,6 +2838,7 @@
   <!-- com.android.server.autofill -->
   <java-symbol type="dimen" name="autofill_fill_elevation" />
   <java-symbol type="dimen" name="autofill_fill_item_height" />
+  <java-symbol type="dimen" name="autofill_fill_min_margin" />
   <java-symbol type="layout" name="autofill_save"/>
   <java-symbol type="id" name="autofill_save_title" />
   <java-symbol type="id" name="autofill_save_no" />
@@ -2841,4 +2847,24 @@
   <!-- Accessibility fingerprint gestures -->
   <java-symbol type="string" name="capability_title_canCaptureFingerprintGestures" />
   <java-symbol type="string" name="capability_desc_canCaptureFingerprintGestures" />
+
+  <!-- Time picker -->
+  <java-symbol type="id" name="toggle_mode"/>
+  <java-symbol type="id" name="input_mode"/>
+  <java-symbol type="id" name="input_header"/>
+  <java-symbol type="id" name="input_separator"/>
+  <java-symbol type="id" name="input_hour"/>
+  <java-symbol type="id" name="input_minute"/>
+  <java-symbol type="id" name="am_pm_spinner"/>
+  <java-symbol type="id" name="label_hour"/>
+  <java-symbol type="id" name="label_minute"/>
+  <java-symbol type="id" name="label_error"/>
+  <java-symbol type="layout" name="time_picker_text_input_material"/>
+  <java-symbol type="drawable" name="btn_keyboard_key_material"/>
+  <java-symbol type="drawable" name="btn_event_material"/>
+  <java-symbol type="string" name="time_picker_text_input_mode_description"/>
+  <java-symbol type="string" name="time_picker_radial_mode_description"/>
+
+  <!-- resolver activity -->
+  <java-symbol type="drawable" name="resolver_icon_placeholder" />
 </resources>
diff --git a/core/tests/coretests/Android.mk b/core/tests/coretests/Android.mk
index a0a9e01..48b78d4 100644
--- a/core/tests/coretests/Android.mk
+++ b/core/tests/coretests/Android.mk
@@ -34,7 +34,8 @@
     espresso-core \
     ub-uiautomator \
     platform-test-annotations \
-    compatibility-device-util
+    compatibility-device-util \
+    truth-prebuilt
 
 LOCAL_JAVA_LIBRARIES := android.test.runner conscrypt telephony-common org.apache.http.legacy
 LOCAL_PACKAGE_NAME := FrameworksCoreTests
diff --git a/core/tests/coretests/res/font/samplefont.ttf b/core/tests/coretests/res/font/samplefont.ttf
new file mode 100644
index 0000000..2852302
--- /dev/null
+++ b/core/tests/coretests/res/font/samplefont.ttf
Binary files differ
diff --git a/core/tests/coretests/res/font/samplefont2.ttf b/core/tests/coretests/res/font/samplefont2.ttf
new file mode 100644
index 0000000..2852302
--- /dev/null
+++ b/core/tests/coretests/res/font/samplefont2.ttf
Binary files differ
diff --git a/core/tests/coretests/res/font/samplefont3.ttf b/core/tests/coretests/res/font/samplefont3.ttf
new file mode 100644
index 0000000..2852302
--- /dev/null
+++ b/core/tests/coretests/res/font/samplefont3.ttf
Binary files differ
diff --git a/core/tests/coretests/res/font/samplefont4.ttf b/core/tests/coretests/res/font/samplefont4.ttf
new file mode 100644
index 0000000..2852302
--- /dev/null
+++ b/core/tests/coretests/res/font/samplefont4.ttf
Binary files differ
diff --git a/core/tests/coretests/res/font/samplexmldownloadedfont.xml b/core/tests/coretests/res/font/samplexmldownloadedfont.xml
new file mode 100644
index 0000000..35391bd
--- /dev/null
+++ b/core/tests/coretests/res/font/samplexmldownloadedfont.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<font-family xmlns:android="http://schemas.android.com/apk/res/android"
+        android:fontProviderAuthority="com.example.test.fontprovider"
+        android:fontProviderQuery="MyRequestedFont">
+</font-family>
\ No newline at end of file
diff --git a/core/tests/coretests/res/font/samplexmlfont.xml b/core/tests/coretests/res/font/samplexmlfont.xml
new file mode 100644
index 0000000..bb813e1
--- /dev/null
+++ b/core/tests/coretests/res/font/samplexmlfont.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<font-family xmlns:android="http://schemas.android.com/apk/res/android">
+    <font android:fontStyle="normal" android:fontWeight="400" android:font="@font/samplefont" />
+    <font android:fontStyle="italic" android:fontWeight="400" android:font="@font/samplefont2" />
+    <font android:fontStyle="normal" android:fontWeight="800" android:font="@font/samplefont3" />
+    <font android:fontStyle="italic" android:fontWeight="800" android:font="@font/samplefont4" />
+</font-family>
\ No newline at end of file
diff --git a/core/tests/coretests/src/android/app/usage/UsageStatsTest.java b/core/tests/coretests/src/android/app/usage/UsageStatsTest.java
new file mode 100644
index 0000000..c6d077d
--- /dev/null
+++ b/core/tests/coretests/src/android/app/usage/UsageStatsTest.java
@@ -0,0 +1,105 @@
+/*
+ * 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.usage;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+public class UsageStatsTest {
+    private UsageStats left;
+    private UsageStats right;
+
+    @Before
+    public void setUp() throws Exception {
+        left = new UsageStats();
+        right = new UsageStats();
+    }
+
+    @Test
+    public void testEarlierBeginTimeTakesPriorityOnAdd() {
+        left.mPackageName = "com.test";
+        left.mBeginTimeStamp = 100000;
+        right.mPackageName = "com.test";
+        right.mBeginTimeStamp = 99999;
+
+        left.add(right);
+
+        assertThat(left.getFirstTimeStamp()).isEqualTo(99999);
+    }
+
+    @Test
+    public void testLaterEndTimeTakesPriorityOnAdd() {
+        left.mPackageName = "com.test";
+        left.mEndTimeStamp = 100000;
+        right.mPackageName = "com.test";
+        right.mEndTimeStamp = 100001;
+
+        left.add(right);
+
+        assertThat(left.getLastTimeStamp()).isEqualTo(100001);
+    }
+
+    @Test
+    public void testLastUsedTimeIsOverriddenByLaterStats() {
+        left.mPackageName = "com.test";
+        left.mBeginTimeStamp = 100000;
+        left.mLastTimeUsed = 200000;
+        right.mPackageName = "com.test";
+        right.mBeginTimeStamp = 100001;
+        right.mLastTimeUsed = 200001;
+
+        left.add(right);
+
+        assertThat(left.getLastTimeUsed()).isEqualTo(200001);
+    }
+
+    @Test
+    public void testLastUsedTimeIsNotOverriddenByLaterStatsIfUseIsEarlier() {
+        left.mPackageName = "com.test";
+        left.mBeginTimeStamp = 100000;
+        left.mLastTimeUsed = 200000;
+        right.mPackageName = "com.test";
+        right.mBeginTimeStamp = 100001;
+        right.mLastTimeUsed = 150000;
+
+        left.add(right);
+
+        assertThat(left.getLastTimeUsed()).isEqualTo(200000);
+    }
+
+    @Test
+    public void testForegroundTimeIsSummed() {
+        left.mPackageName = "com.test";
+        left.mBeginTimeStamp = 100000;
+        left.mTotalTimeInForeground = 10;
+        right.mPackageName = "com.test";
+        right.mBeginTimeStamp = 100001;
+        right.mTotalTimeInForeground = 1;
+
+        left.add(right);
+
+        assertThat(left.getTotalTimeInForeground()).isEqualTo(11);
+    }
+}
diff --git a/core/tests/coretests/src/android/content/res/FontResourcesParserTest.java b/core/tests/coretests/src/android/content/res/FontResourcesParserTest.java
new file mode 100644
index 0000000..8b536a7
--- /dev/null
+++ b/core/tests/coretests/src/android/content/res/FontResourcesParserTest.java
@@ -0,0 +1,98 @@
+/*
+ * 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.content.res;
+
+import static junit.framework.Assert.assertNull;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import android.app.Instrumentation;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
+import android.text.FontConfig;
+
+import com.android.frameworks.coretests.R;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.xmlpull.v1.XmlPullParserException;
+
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Tests for {@link FontResourcesParser}.
+ */
+@SmallTest
+@RunWith(AndroidJUnit4.class)
+public class FontResourcesParserTest {
+
+    private Instrumentation mInstrumentation;
+    private Resources mResources;
+
+    @Before
+    public void setup() {
+        mInstrumentation = InstrumentationRegistry.getInstrumentation();
+        mResources = mInstrumentation.getContext().getResources();
+    }
+
+    @Test
+    public void testParse() throws XmlPullParserException, IOException {
+        XmlResourceParser parser = mResources.getXml(R.font.samplexmlfont);
+
+        FontConfig result = FontResourcesParser.parse(parser, mResources);
+
+        assertNotNull(result);
+        List<FontConfig.Family> families = result.getFamilies();
+        assertEquals(1, families.size());
+        List<FontConfig.Font> fonts = families.get(0).getFonts();
+        assertEquals(4, fonts.size());
+        FontConfig.Font font1 = fonts.get(0);
+        assertEquals(400, font1.getWeight());
+        assertEquals(false, font1.isItalic());
+        assertEquals("res/font/samplefont.ttf", font1.getFontName());
+        FontConfig.Font font2 = fonts.get(1);
+        assertEquals(400, font2.getWeight());
+        assertEquals(true, font2.isItalic());
+        assertEquals("res/font/samplefont2.ttf", font2.getFontName());
+        FontConfig.Font font3 = fonts.get(2);
+        assertEquals(800, font3.getWeight());
+        assertEquals(false, font3.isItalic());
+        assertEquals("res/font/samplefont3.ttf", font3.getFontName());
+        FontConfig.Font font4 = fonts.get(3);
+        assertEquals(800, font4.getWeight());
+        assertEquals(true, font4.isItalic());
+        assertEquals("res/font/samplefont4.ttf", font4.getFontName());
+    }
+
+    @Test
+    public void testParseDownloadableFont() throws IOException, XmlPullParserException {
+        XmlResourceParser parser = mResources.getXml(R.font.samplexmldownloadedfont);
+
+        FontConfig result = FontResourcesParser.parse(parser, mResources);
+
+        assertNotNull(result);
+        List<FontConfig.Family> families = result.getFamilies();
+        assertEquals(1, families.size());
+        FontConfig.Family family = families.get(0);
+        assertEquals("com.example.test.fontprovider", family.getProviderAuthority());
+        assertEquals("MyRequestedFont", family.getQuery());
+        assertNull(family.getFonts());
+    }
+}
diff --git a/core/tests/coretests/src/android/net/NetworkKeyTest.java b/core/tests/coretests/src/android/net/NetworkKeyTest.java
index 1afe9da..fff23a0 100644
--- a/core/tests/coretests/src/android/net/NetworkKeyTest.java
+++ b/core/tests/coretests/src/android/net/NetworkKeyTest.java
@@ -4,6 +4,7 @@
 import static org.junit.Assert.assertNull;
 import static org.mockito.Mockito.when;
 
+import android.net.wifi.ScanResult;
 import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiSsid;
 import android.support.test.runner.AndroidJUnit4;
@@ -17,7 +18,9 @@
 @RunWith(AndroidJUnit4.class)
 public class NetworkKeyTest {
     private static final String VALID_SSID = "\"ssid1\"";
+    private static final String VALID_UNQUOTED_SSID = "ssid1";
     private static final String VALID_BSSID = "00:00:00:00:00:00";
+    private static final String INVALID_BSSID = "invalid_bssid";
     @Mock private WifiInfo mWifiInfo;
 
     @Before
@@ -64,6 +67,13 @@
     }
 
     @Test
+    public void createFromWifi_invalidBssid() throws Exception {
+        when(mWifiInfo.getSSID()).thenReturn(VALID_SSID);
+        when(mWifiInfo.getBSSID()).thenReturn(INVALID_BSSID);
+        assertNull(NetworkKey.createFromWifiInfo(mWifiInfo));
+    }
+
+    @Test
     public void createFromWifi_validWifiInfo() throws Exception {
         when(mWifiInfo.getSSID()).thenReturn(VALID_SSID);
         when(mWifiInfo.getBSSID()).thenReturn(VALID_BSSID);
@@ -72,4 +82,72 @@
         final NetworkKey actual = NetworkKey.createFromWifiInfo(mWifiInfo);
         assertEquals(expected, actual);
     }
+
+    @Test
+    public void createFromScanResult_nullInput() {
+        assertNull(NetworkKey.createFromScanResult(null));
+    }
+
+    @Test
+    public void createFromScanResult_nullWifiSsid() {
+        ScanResult scanResult = new ScanResult();
+        scanResult.BSSID = VALID_BSSID;
+
+        assertNull(NetworkKey.createFromScanResult(scanResult));
+    }
+
+    @Test
+    public void createFromScanResult_emptyWifiSsid() {
+        ScanResult scanResult = new ScanResult();
+        scanResult.wifiSsid = WifiSsid.createFromAsciiEncoded("");
+        scanResult.BSSID = VALID_BSSID;
+
+        assertNull(NetworkKey.createFromScanResult(scanResult));
+    }
+
+    @Test
+    public void createFromScanResult_noneWifiSsid() {
+        ScanResult scanResult = new ScanResult();
+        scanResult.wifiSsid = WifiSsid.createFromAsciiEncoded(WifiSsid.NONE);
+        scanResult.BSSID = VALID_BSSID;
+
+        assertNull(NetworkKey.createFromScanResult(scanResult));
+    }
+
+    @Test
+    public void createFromScanResult_nullBssid() {
+        ScanResult scanResult = new ScanResult();
+        scanResult.wifiSsid = WifiSsid.createFromAsciiEncoded(VALID_UNQUOTED_SSID);
+
+        assertNull(NetworkKey.createFromScanResult(scanResult));
+    }
+
+    @Test
+    public void createFromScanResult_emptyBssid() {
+        ScanResult scanResult = new ScanResult();
+        scanResult.wifiSsid = WifiSsid.createFromAsciiEncoded(VALID_UNQUOTED_SSID);
+        scanResult.BSSID = "";
+
+        assertNull(NetworkKey.createFromScanResult(scanResult));
+    }
+
+    @Test
+    public void createFromScanResult_invalidBssid() {
+        ScanResult scanResult = new ScanResult();
+        scanResult.wifiSsid = WifiSsid.createFromAsciiEncoded(VALID_UNQUOTED_SSID);
+        scanResult.BSSID = INVALID_BSSID;
+
+        assertNull(NetworkKey.createFromScanResult(scanResult));
+    }
+
+    @Test
+    public void createFromScanResult_validWifiSsid() {
+        ScanResult scanResult = new ScanResult();
+        scanResult.wifiSsid = WifiSsid.createFromAsciiEncoded(VALID_UNQUOTED_SSID);
+        scanResult.BSSID = VALID_BSSID;
+
+        NetworkKey expected = new NetworkKey(new WifiKey(VALID_SSID, VALID_BSSID));
+        NetworkKey actual = NetworkKey.createFromScanResult(scanResult);
+        assertEquals(expected, actual);
+    }
 }
diff --git a/core/tests/coretests/src/android/net/NetworkScorerAppManagerTest.java b/core/tests/coretests/src/android/net/NetworkScorerAppManagerTest.java
index 5bfff26..ce5d3ef 100644
--- a/core/tests/coretests/src/android/net/NetworkScorerAppManagerTest.java
+++ b/core/tests/coretests/src/android/net/NetworkScorerAppManagerTest.java
@@ -19,6 +19,7 @@
 import static org.mockito.Mockito.when;
 
 import android.Manifest.permission;
+import android.content.ComponentName;
 import android.content.ContentResolver;
 import android.content.Context;
 import android.content.Intent;
@@ -30,13 +31,16 @@
 import android.net.NetworkScorerAppManager.NetworkScorerAppData;
 import android.provider.Settings;
 import android.test.InstrumentationTestCase;
+
 import com.android.internal.R;
-import java.util.List;
+
 import org.mockito.ArgumentMatcher;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.MockitoAnnotations;
 
+import java.util.List;
+
 public class NetworkScorerAppManagerTest extends InstrumentationTestCase {
     @Mock private Context mMockContext;
     @Mock private PackageManager mMockPm;
@@ -114,39 +118,40 @@
 
     public void testGetNetworkRecommendationProviderData_scoreNetworksNotGranted()
             throws Exception {
-        setNetworkRecommendationPackageNames("package1");
-        mockScoreNetworksDenied("package1");
-        mockRecommendationServiceAvailable("package1", 924 /* packageUid */);
+        final ComponentName recoComponent = new ComponentName("package1", "class1");
+        setNetworkRecommendationPackageNames(recoComponent.getPackageName());
+        mockScoreNetworksDenied(recoComponent.getPackageName());
+        mockRecommendationServiceAvailable(recoComponent, 924 /* packageUid */);
 
         assertNull(mNetworkScorerAppManager.getNetworkRecommendationProviderData());
     }
 
     public void testGetNetworkRecommendationProviderData_available() throws Exception {
-        setNetworkRecommendationPackageNames("package1");
-        mockScoreNetworksGranted("package1");
-        mockRecommendationServiceAvailable("package1", 924 /* packageUid */);
+        final ComponentName recoComponent = new ComponentName("package1", "class1");
+        setNetworkRecommendationPackageNames(recoComponent.getPackageName());
+        mockScoreNetworksGranted(recoComponent.getPackageName());
+        mockRecommendationServiceAvailable(recoComponent, 924 /* packageUid */);
 
         NetworkScorerAppData appData =
                 mNetworkScorerAppManager.getNetworkRecommendationProviderData();
         assertNotNull(appData);
-        assertEquals("package1", appData.packageName);
+        assertEquals(recoComponent, appData.getRecommendationServiceComponent());
         assertEquals(924, appData.packageUid);
-        assertEquals(".RecommendationService", appData.recommendationServiceClassName);
     }
 
     public void testGetActiveScorer_providerAvailable() throws Exception {
-        setNetworkRecommendationPackageNames("package1");
-        mockScoreNetworksGranted("package1");
-        mockRecommendationServiceAvailable("package1", 924 /* packageUid */);
+        final ComponentName recoComponent = new ComponentName("package1", "class1");
+        setNetworkRecommendationPackageNames(recoComponent.getPackageName());
+        mockScoreNetworksGranted(recoComponent.getPackageName());
+        mockRecommendationServiceAvailable(recoComponent, 924 /* packageUid */);
 
         ContentResolver cr = mTargetContext.getContentResolver();
         Settings.Global.putInt(cr, Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED, 1);
 
         final NetworkScorerAppData activeScorer = mNetworkScorerAppManager.getActiveScorer();
         assertNotNull(activeScorer);
-        assertEquals("package1", activeScorer.packageName);
+        assertEquals(recoComponent, activeScorer.getRecommendationServiceComponent());
         assertEquals(924, activeScorer.packageUid);
-        assertEquals(".RecommendationService", activeScorer.recommendationServiceClassName);
     }
 
     public void testGetActiveScorer_providerNotAvailable()
@@ -159,9 +164,10 @@
     }
 
     public void testGetActiveScorer_recommendationsDisabled() throws Exception {
-        setNetworkRecommendationPackageNames("package1");
-        mockScoreNetworksGranted("package1");
-        mockRecommendationServiceAvailable("package1", 924 /* packageUid */);
+        final ComponentName recoComponent = new ComponentName("package1", "class1");
+        setNetworkRecommendationPackageNames(recoComponent.getPackageName());
+        mockScoreNetworksGranted(recoComponent.getPackageName());
+        mockRecommendationServiceAvailable(recoComponent, 924 /* packageUid */);
         ContentResolver cr = mTargetContext.getContentResolver();
         Settings.Global.putInt(cr, Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED, 0);
 
@@ -187,11 +193,11 @@
                 .thenReturn(PackageManager.PERMISSION_DENIED);
     }
 
-    private void mockRecommendationServiceAvailable(final String packageName, int packageUid) {
+    private void mockRecommendationServiceAvailable(final ComponentName compName, int packageUid) {
         final ResolveInfo serviceInfo = new ResolveInfo();
         serviceInfo.serviceInfo = new ServiceInfo();
-        serviceInfo.serviceInfo.name = ".RecommendationService";
-        serviceInfo.serviceInfo.packageName = packageName;
+        serviceInfo.serviceInfo.name = compName.getClassName();
+        serviceInfo.serviceInfo.packageName = compName.getPackageName();
         serviceInfo.serviceInfo.applicationInfo = new ApplicationInfo();
         serviceInfo.serviceInfo.applicationInfo.uid = packageUid;
 
@@ -203,7 +209,7 @@
                         Intent intent = (Intent) object;
                         return NetworkScoreManager.ACTION_RECOMMEND_NETWORKS
                                 .equals(intent.getAction())
-                                && packageName.equals(intent.getPackage());
+                                && compName.getPackageName().equals(intent.getPackage());
                     }
                 }), Mockito.eq(flags))).thenReturn(serviceInfo);
     }
diff --git a/core/tests/coretests/src/android/net/RecommendationRequestTest.java b/core/tests/coretests/src/android/net/RecommendationRequestTest.java
index bd25500..e2e6883 100644
--- a/core/tests/coretests/src/android/net/RecommendationRequestTest.java
+++ b/core/tests/coretests/src/android/net/RecommendationRequestTest.java
@@ -96,7 +96,7 @@
 
         RecommendationRequest parceled = passThroughParcel(request);
 
-        assertEquals(0, parceled.getLastSelectedNetworkId());
+        assertEquals(-1, parceled.getLastSelectedNetworkId());
         assertEquals(0, parceled.getLastSelectedNetworkTimestamp());
     }
 
diff --git a/core/tests/coretests/src/android/provider/SettingsTest.java b/core/tests/coretests/src/android/provider/SettingsTest.java
index d76980a..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,
@@ -392,7 +391,6 @@
                  Settings.Secure.BACKUP_PROVISIONED,
                  Settings.Secure.BACKUP_TRANSPORT,
                  Settings.Secure.BLUETOOTH_HCI_LOG,
-                 Settings.Secure.BRIGHTNESS_USE_TWILIGHT,  // Candidate for backup?
                  Settings.Secure.CARRIER_APPS_HANDLED,
                  Settings.Secure.COMPLETED_CATEGORY_PREFIX,
                  Settings.Secure.CONNECTIVITY_RELEASE_PENDING_INTENT_DELAY_MS,
@@ -403,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/android/text/method/BackspaceTest.java b/core/tests/coretests/src/android/text/method/BackspaceTest.java
index a260e94..864b48a 100644
--- a/core/tests/coretests/src/android/text/method/BackspaceTest.java
+++ b/core/tests/coretests/src/android/text/method/BackspaceTest.java
@@ -37,23 +37,12 @@
     // Sync the state to the TextView and call onKeyDown with KEYCODE_DEL key event.
     // Then update the state to the result of TextView.
     private void backspace(final EditorState state, int modifiers) {
-        mActivity.runOnUiThread(new Runnable() {
-            public void run() {
-                mTextView.setText(state.mText, BufferType.EDITABLE);
-                mTextView.setKeyListener(mKeyListener);
-                mTextView.setSelection(state.mSelectionStart, state.mSelectionEnd);
-            }
-        });
-        mInstrumentation.waitForIdleSync();
-        assertTrue(mTextView.hasWindowFocus());
+        mTextView.setText(state.mText, BufferType.EDITABLE);
+        mTextView.setKeyListener(mKeyListener);
+        mTextView.setSelection(state.mSelectionStart, state.mSelectionEnd);
 
         final KeyEvent keyEvent = getKey(KeyEvent.KEYCODE_DEL, modifiers);
-        mActivity.runOnUiThread(new Runnable() {
-            public void run() {
-                mTextView.onKeyDown(keyEvent.getKeyCode(), keyEvent);
-            }
-        });
-        mInstrumentation.waitForIdleSync();
+        mTextView.onKeyDown(keyEvent.getKeyCode(), keyEvent);
 
         state.mText = mTextView.getText();
         state.mSelectionStart = mTextView.getSelectionStart();
@@ -247,6 +236,51 @@
         state.assertEquals("U+1F1FA U+1F1F8 |");
         backspace(state, 0);
         state.assertEquals("|");
+
+        // Incomplete sequence. (no tag_term: U+E007E)
+        state.setByString("'a' U+1F3F4 U+E0067 'b' |");
+        backspace(state, 0);
+        state.assertEquals("'a' U+1F3F4 U+E0067 |");
+        backspace(state, 0);
+        state.assertEquals("'a' U+1F3F4 |");
+        backspace(state, 0);
+        state.assertEquals("'a' |");
+
+        // No tag_base
+        state.setByString("'a' U+E0067 U+E007F 'b' |");
+        backspace(state, 0);
+        state.assertEquals("'a' U+E0067 U+E007F |");
+        backspace(state, 0);
+        state.assertEquals("'a' U+E0067 |");
+        backspace(state, 0);
+        state.assertEquals("'a' |");
+
+        // Isolated tag chars
+        state.setByString("'a' U+E0067 U+E0067 'b' |");
+        backspace(state, 0);
+        state.assertEquals("'a' U+E0067 U+E0067 |");
+        backspace(state, 0);
+        state.assertEquals("'a' U+E0067 |");
+        backspace(state, 0);
+        state.assertEquals("'a' |");
+
+        // Isolated tab term.
+        state.setByString("'a' U+E007F U+E007F 'b' |");
+        backspace(state, 0);
+        state.assertEquals("'a' U+E007F U+E007F |");
+        backspace(state, 0);
+        state.assertEquals("'a' U+E007F |");
+        backspace(state, 0);
+        state.assertEquals("'a' |");
+
+        // Immediate tag_term after tag_base
+        state.setByString("'a' U+1F3F4 U+E007F U+1F3F4 U+E007F 'b' |");
+        backspace(state, 0);
+        state.assertEquals("'a' U+1F3F4 U+E007F U+1F3F4 U+E007F |");
+        backspace(state, 0);
+        state.assertEquals("'a' U+1F3F4 U+E007F |");
+        backspace(state, 0);
+        state.assertEquals("'a' |");
     }
 
     @SmallTest
diff --git a/core/tests/coretests/src/android/text/method/ForwardDeleteTest.java b/core/tests/coretests/src/android/text/method/ForwardDeleteTest.java
index 1990fd0..839d380 100644
--- a/core/tests/coretests/src/android/text/method/ForwardDeleteTest.java
+++ b/core/tests/coretests/src/android/text/method/ForwardDeleteTest.java
@@ -37,23 +37,12 @@
     // Sync the state to the TextView and call onKeyDown with KEYCODE_FORWARD_DEL key event.
     // Then update the state to the result of TextView.
     private void forwardDelete(final EditorState state, int modifiers) {
-        mActivity.runOnUiThread(new Runnable() {
-            public void run() {
-                mTextView.setText(state.mText, BufferType.EDITABLE);
-                mTextView.setKeyListener(mKeyListener);
-                mTextView.setSelection(state.mSelectionStart, state.mSelectionEnd);
-            }
-        });
-        mInstrumentation.waitForIdleSync();
-        assertTrue(mTextView.hasWindowFocus());
+        mTextView.setText(state.mText, BufferType.EDITABLE);
+        mTextView.setKeyListener(mKeyListener);
+        mTextView.setSelection(state.mSelectionStart, state.mSelectionEnd);
 
         final KeyEvent keyEvent = getKey(KeyEvent.KEYCODE_FORWARD_DEL, modifiers);
-        mActivity.runOnUiThread(new Runnable() {
-            public void run() {
-                mTextView.onKeyDown(keyEvent.getKeyCode(), keyEvent);
-            }
-        });
-        mInstrumentation.waitForIdleSync();
+        mTextView.onKeyDown(keyEvent.getKeyCode(), keyEvent);
 
         state.mText = mTextView.getText();
         state.mSelectionStart = mTextView.getSelectionStart();
@@ -186,6 +175,46 @@
         state.assertEquals("| U+1F1FA");
         forwardDelete(state, 0);
         state.assertEquals("|");
+
+        // Incomplete sequence. (no tag_term:U+E007E)
+        state.setByString("| 'a' U+1F3F4 U+E0067 'b'");
+        forwardDelete(state, 0);
+        state.assertEquals("| U+1F3F4 U+E0067 'b'");
+        forwardDelete(state, 0);
+        state.assertEquals("| 'b'");
+
+        // No tag_base
+        state.setByString("| 'a' U+E0067 U+E007F 'b'");
+        forwardDelete(state, 0);
+        state.assertEquals("| 'b'");
+
+        // Isolated tag chars
+        state.setByString("| 'a' U+E0067 U+E0067 'b'");
+        forwardDelete(state, 0);
+        state.assertEquals("| 'b'");
+
+        // Isolated tag base.
+        state.setByString("| 'a' U+1F3F4 U+1F3F4 'b'");
+        forwardDelete(state, 0);
+        state.assertEquals("| U+1F3F4 U+1F3F4 'b'");
+        forwardDelete(state, 0);
+        state.assertEquals("| U+1F3F4 'b'");
+        forwardDelete(state, 0);
+        state.assertEquals("| 'b'");
+
+        // Isolated tab term.
+        state.setByString("| 'a' U+E007F U+E007F 'b'");
+        forwardDelete(state, 0);
+        state.assertEquals("| 'b'");
+
+        // Immediate tag_term after tag_base
+        state.setByString("| 'a' U+1F3F4 U+E007F U+1F3F4 U+E007F 'b'");
+        forwardDelete(state, 0);
+        state.assertEquals("| U+1F3F4 U+E007F U+1F3F4 U+E007F 'b'");
+        forwardDelete(state, 0);
+        state.assertEquals("| U+1F3F4 U+E007F 'b'");
+        forwardDelete(state, 0);
+        state.assertEquals("| 'b'");
     }
 
     @SmallTest
diff --git a/core/tests/coretests/src/android/text/method/KeyListenerTestCase.java b/core/tests/coretests/src/android/text/method/KeyListenerTestCase.java
index 4b4e7af..f005d7b 100644
--- a/core/tests/coretests/src/android/text/method/KeyListenerTestCase.java
+++ b/core/tests/coretests/src/android/text/method/KeyListenerTestCase.java
@@ -17,41 +17,26 @@
 package android.text.method;
 
 import android.app.Instrumentation;
-import android.test.ActivityInstrumentationTestCase2;
-import android.text.format.DateUtils;
+import android.test.InstrumentationTestCase;
 import android.view.KeyEvent;
 import android.widget.EditText;
-import android.widget.TextViewActivity;
 
 import com.android.frameworks.coretests.R;
 
-public abstract class KeyListenerTestCase extends
-        ActivityInstrumentationTestCase2<TextViewActivity> {
+public abstract class KeyListenerTestCase extends InstrumentationTestCase {
 
-    protected TextViewActivity mActivity;
     protected Instrumentation mInstrumentation;
     protected EditText mTextView;
 
     public KeyListenerTestCase() {
-        super(TextViewActivity.class);
     }
 
     @Override
     protected void setUp() throws Exception {
         super.setUp();
 
-        mActivity = getActivity();
         mInstrumentation = getInstrumentation();
-        mTextView = (EditText) mActivity.findViewById(R.id.textview);
-
-        mActivity.runOnUiThread(new Runnable() {
-            public void run() {
-                // Ensure that the screen is on for this test.
-                mTextView.setKeepScreenOn(true);
-            }
-        });
-
-        assertTrue(mActivity.waitForWindowFocus(5 * DateUtils.SECOND_IN_MILLIS));
+        mTextView = new EditText(mInstrumentation.getContext());
     }
 
     protected static KeyEvent getKey(int keycode, int metaState) {
diff --git a/core/tests/coretests/src/android/transition/FadeTransitionTest.java b/core/tests/coretests/src/android/transition/FadeTransitionTest.java
index dc60423..7e7e815 100644
--- a/core/tests/coretests/src/android/transition/FadeTransitionTest.java
+++ b/core/tests/coretests/src/android/transition/FadeTransitionTest.java
@@ -21,7 +21,7 @@
 import android.test.ActivityInstrumentationTestCase2;
 import android.test.suitebuilder.annotation.SmallTest;
 import android.transition.Transition.TransitionListener;
-import android.transition.Transition.TransitionListenerAdapter;
+import android.transition.TransitionListenerAdapter;
 import android.view.View;
 import android.view.ViewGroup;
 
diff --git a/core/tests/coretests/src/android/view/ViewAttachTest.java b/core/tests/coretests/src/android/view/ViewAttachTest.java
index a73f5a6..44fcd13 100644
--- a/core/tests/coretests/src/android/view/ViewAttachTest.java
+++ b/core/tests/coretests/src/android/view/ViewAttachTest.java
@@ -16,9 +16,17 @@
 
 package android.view;
 
+import android.content.Context;
 import android.content.pm.ActivityInfo;
+import android.graphics.PixelFormat;
 import android.os.SystemClock;
 import android.test.ActivityInstrumentationTestCase2;
+import android.test.UiThreadTest;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.WindowManager;
+
+import com.android.frameworks.coretests.R;
 
 public class ViewAttachTest extends
         ActivityInstrumentationTestCase2<ViewAttachTestActivity> {
@@ -51,4 +59,38 @@
             SystemClock.sleep(250);
         }
     }
+
+    /**
+     * Make sure that on any attached view, if the view is full-screen and hosted
+     * on a round device, the round scrollbars will be displayed even if the activity
+     * window is offset.
+     *
+     * @throws Throwable
+     */
+    @UiThreadTest
+    public void testRoundScrollbars() throws Throwable {
+        final ViewAttachTestActivity activity = getActivity();
+        final View rootView = activity.getWindow().getDecorView();
+        final WindowManager.LayoutParams params =
+            new WindowManager.LayoutParams(
+                rootView.getWidth(),
+                rootView.getHeight(),
+                50, /* xPosition */
+                0, /* yPosition */
+                WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY,
+                WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN,
+                PixelFormat.TRANSLUCENT);
+
+        rootView.setLayoutParams(params);
+
+        View contentView = activity.findViewById(R.id.view_attach_view);
+        boolean shouldDrawRoundScrollbars = contentView.shouldDrawRoundScrollbar();
+
+        if (activity.getResources().getConfiguration().isScreenRound()) {
+            assertTrue(shouldDrawRoundScrollbars);
+        } else {
+            // Never draw round scrollbars on non-round devices.
+            assertFalse(shouldDrawRoundScrollbars);
+        }
+    }
 }
diff --git a/core/tests/coretests/src/com/android/internal/app/ChooserActivityTest.java b/core/tests/coretests/src/com/android/internal/app/ChooserActivityTest.java
index daebf88..1080a9f 100644
--- a/core/tests/coretests/src/com/android/internal/app/ChooserActivityTest.java
+++ b/core/tests/coretests/src/com/android/internal/app/ChooserActivityTest.java
@@ -211,6 +211,119 @@
         assertThat(activity.isFinishing(), is(true));
     }
 
+    @Test
+    public void hasOtherProfileOneOption() throws Exception {
+        Intent sendIntent = createSendImageIntent();
+        List<ResolvedComponentInfo> resolvedComponentInfos =
+                createResolvedComponentsForTestWithOtherProfile(2);
+        ResolveInfo toChoose = resolvedComponentInfos.get(1).getResolveInfoAt(0);
+
+        when(ChooserWrapperActivity.sOverrides.resolverListController.getResolversForIntent(
+                Mockito.anyBoolean(),
+                Mockito.anyBoolean(),
+                Mockito.isA(List.class))).thenReturn(resolvedComponentInfos);
+
+        final ChooserWrapperActivity activity = mActivityRule
+                .launchActivity(Intent.createChooser(sendIntent, null));
+        waitForIdle();
+
+        // The other entry is filtered to the other profile slot
+        assertThat(activity.getAdapter().getCount(), is(1));
+
+        ResolveInfo[] chosen = new ResolveInfo[1];
+        ChooserWrapperActivity.sOverrides.onSafelyStartCallback = targetInfo -> {
+            chosen[0] = targetInfo.getResolveInfo();
+            return true;
+        };
+
+        // Make a stable copy of the components as the original list may be modified
+        List<ResolvedComponentInfo> stableCopy =
+                createResolvedComponentsForTestWithOtherProfile(2);
+        // Check that the "Other Profile" activity is put in the right spot
+        onView(withId(R.id.profile_button)).check(matches(
+                withText(stableCopy.get(0).getResolveInfoAt(0).activityInfo.name)));
+        onView(withText(stableCopy.get(1).getResolveInfoAt(0).activityInfo.name))
+                .perform(click());
+        waitForIdle();
+        assertThat(chosen[0], is(toChoose));
+    }
+
+    @Test
+    public void hasOtherProfileTwoOptionsAndUserSelectsOne() throws Exception {
+        Intent sendIntent = createSendImageIntent();
+        List<ResolvedComponentInfo> resolvedComponentInfos =
+                createResolvedComponentsForTestWithOtherProfile(3);
+        ResolveInfo toChoose = resolvedComponentInfos.get(1).getResolveInfoAt(0);
+
+        when(ChooserWrapperActivity.sOverrides.resolverListController.getResolversForIntent(
+                Mockito.anyBoolean(),
+                Mockito.anyBoolean(),
+                Mockito.isA(List.class))).thenReturn(resolvedComponentInfos);
+        when(ChooserWrapperActivity.sOverrides.resolverListController.getLastChosen())
+                .thenReturn(resolvedComponentInfos.get(0).getResolveInfoAt(0));
+
+        final ChooserWrapperActivity activity = mActivityRule
+                .launchActivity(Intent.createChooser(sendIntent, null));
+        waitForIdle();
+
+        // The other entry is filtered to the other profile slot
+        assertThat(activity.getAdapter().getCount(), is(2));
+
+        ResolveInfo[] chosen = new ResolveInfo[1];
+        ChooserWrapperActivity.sOverrides.onSafelyStartCallback = targetInfo -> {
+            chosen[0] = targetInfo.getResolveInfo();
+            return true;
+        };
+
+        // Make a stable copy of the components as the original list may be modified
+        List<ResolvedComponentInfo> stableCopy =
+                createResolvedComponentsForTestWithOtherProfile(3);
+        // Check that the "Other Profile" activity is put in the right spot
+        onView(withId(R.id.profile_button)).check(matches(
+                withText(stableCopy.get(0).getResolveInfoAt(0).activityInfo.name)));
+        onView(withText(stableCopy.get(1).getResolveInfoAt(0).activityInfo.name))
+                .perform(click());
+        waitForIdle();
+        assertThat(chosen[0], is(toChoose));
+    }
+
+    @Test
+    public void hasLastChosenActivityAndOtherProfile() throws Exception {
+        Intent sendIntent = createSendImageIntent();
+        List<ResolvedComponentInfo> resolvedComponentInfos =
+                createResolvedComponentsForTestWithOtherProfile(3);
+        ResolveInfo toChoose = resolvedComponentInfos.get(1).getResolveInfoAt(0);
+
+        when(ChooserWrapperActivity.sOverrides.resolverListController.getResolversForIntent(
+                Mockito.anyBoolean(),
+                Mockito.anyBoolean(),
+                Mockito.isA(List.class))).thenReturn(resolvedComponentInfos);
+
+        final ChooserWrapperActivity activity = mActivityRule
+                .launchActivity(Intent.createChooser(sendIntent, null));
+        waitForIdle();
+
+        // The other entry is filtered to the last used slot
+        assertThat(activity.getAdapter().getCount(), is(2));
+
+        ResolveInfo[] chosen = new ResolveInfo[1];
+        ChooserWrapperActivity.sOverrides.onSafelyStartCallback = targetInfo -> {
+            chosen[0] = targetInfo.getResolveInfo();
+            return true;
+        };
+
+        // Make a stable copy of the components as the original list may be modified
+        List<ResolvedComponentInfo> stableCopy =
+                createResolvedComponentsForTestWithOtherProfile(3);
+        // Check that the "Other Profile" activity is put in the right spot
+        onView(withId(R.id.profile_button)).check(matches(
+                withText(stableCopy.get(0).getResolveInfoAt(0).activityInfo.name)));
+        onView(withText(stableCopy.get(1).getResolveInfoAt(0).activityInfo.name))
+                .perform(click());
+        waitForIdle();
+        assertThat(chosen[0], is(toChoose));
+    }
+
     private Intent createSendImageIntent() {
         Intent sendIntent = new Intent();
         sendIntent.setAction(Intent.ACTION_SEND);
@@ -227,6 +340,19 @@
         return infoList;
     }
 
+    private List<ResolvedComponentInfo> createResolvedComponentsForTestWithOtherProfile(
+            int numberOfResults) {
+        List<ResolvedComponentInfo> infoList = new ArrayList<>(numberOfResults);
+        for (int i = 0; i < numberOfResults; i++) {
+            if (i == 0) {
+                infoList.add(ResolverDataProvider.createResolvedComponentInfoWithOtherId(i));
+            } else {
+                infoList.add(ResolverDataProvider.createResolvedComponentInfo(i));
+            }
+        }
+        return infoList;
+    }
+
     private void waitForIdle() {
         InstrumentationRegistry.getInstrumentation().waitForIdleSync();
     }
diff --git a/core/tests/coretests/src/com/android/internal/app/ResolverActivityTest.java b/core/tests/coretests/src/com/android/internal/app/ResolverActivityTest.java
index 84b844a..2c23018 100644
--- a/core/tests/coretests/src/com/android/internal/app/ResolverActivityTest.java
+++ b/core/tests/coretests/src/com/android/internal/app/ResolverActivityTest.java
@@ -43,6 +43,7 @@
 import static android.support.test.espresso.action.ViewActions.click;
 import static android.support.test.espresso.assertion.ViewAssertions.matches;
 import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
+import static android.support.test.espresso.matcher.ViewMatchers.isEnabled;
 import static android.support.test.espresso.matcher.ViewMatchers.withId;
 import static android.support.test.espresso.matcher.ViewMatchers.withText;
 import static com.android.internal.app.ResolverWrapperActivity.sOverrides;
@@ -102,6 +103,7 @@
     public void hasLastChosenActivity() throws Exception {
         Intent sendIntent = createSendImageIntent();
         List<ResolvedComponentInfo> resolvedComponentInfos = createResolvedComponentsForTest(2);
+        ResolveInfo toChoose = resolvedComponentInfos.get(0).getResolveInfoAt(0);
 
         when(sOverrides.resolverListController.getResolversForIntent(Mockito.anyBoolean(),
                 Mockito.anyBoolean(),
@@ -121,14 +123,133 @@
             return true;
         };
 
-        ResolveInfo toChoose = resolvedComponentInfos.get(0).getResolveInfoAt(0);
-        onView(withId(R.id.title)).perform(click());
+        onView(withId(R.id.button_once)).perform(click());
+        waitForIdle();
+        assertThat(chosen[0], is(toChoose));
+    }
+
+    @Test
+    public void hasOtherProfileOneOption() throws Exception {
+        Intent sendIntent = createSendImageIntent();
+        List<ResolvedComponentInfo> resolvedComponentInfos =
+                createResolvedComponentsForTestWithOtherProfile(2);
+        ResolveInfo toChoose = resolvedComponentInfos.get(1).getResolveInfoAt(0);
+
+        when(sOverrides.resolverListController.getResolversForIntent(Mockito.anyBoolean(),
+                Mockito.anyBoolean(),
+                Mockito.isA(List.class))).thenReturn(resolvedComponentInfos);
+
+        final ResolverWrapperActivity activity = mActivityRule.launchActivity(sendIntent);
+        waitForIdle();
+
+        // The other entry is filtered to the last used slot
+        assertThat(activity.getAdapter().getCount(), is(1));
+
+        ResolveInfo[] chosen = new ResolveInfo[1];
+        sOverrides.onSafelyStartCallback = targetInfo -> {
+            chosen[0] = targetInfo.getResolveInfo();
+            return true;
+        };
+
+        // Make a stable copy of the components as the original list may be modified
+        List<ResolvedComponentInfo> stableCopy =
+                createResolvedComponentsForTestWithOtherProfile(2);
+        // Check that the "Other Profile" activity is put in the right spot
+        onView(withId(R.id.profile_button)).check(matches(
+                withText(stableCopy.get(0).getResolveInfoAt(0).activityInfo.name)));
+        onView(withText(stableCopy.get(1).getResolveInfoAt(0).activityInfo.name))
+                .perform(click());
         onView(withId(R.id.button_once))
                 .perform(click());
         waitForIdle();
         assertThat(chosen[0], is(toChoose));
     }
 
+    @Test
+    public void hasOtherProfileTwoOptionsAndUserSelectsOne() throws Exception {
+        Intent sendIntent = createSendImageIntent();
+        List<ResolvedComponentInfo> resolvedComponentInfos =
+                createResolvedComponentsForTestWithOtherProfile(3);
+        ResolveInfo toChoose = resolvedComponentInfos.get(1).getResolveInfoAt(0);
+
+        when(sOverrides.resolverListController.getResolversForIntent(Mockito.anyBoolean(),
+                Mockito.anyBoolean(),
+                Mockito.isA(List.class))).thenReturn(resolvedComponentInfos);
+
+        final ResolverWrapperActivity activity = mActivityRule.launchActivity(sendIntent);
+        waitForIdle();
+
+        // The other entry is filtered to the other profile slot
+        assertThat(activity.getAdapter().getCount(), is(2));
+
+        ResolveInfo[] chosen = new ResolveInfo[1];
+        sOverrides.onSafelyStartCallback = targetInfo -> {
+            chosen[0] = targetInfo.getResolveInfo();
+            return true;
+        };
+
+        // Confirm that the button bar is disabled by default
+        onView(withId(R.id.button_once)).check(matches(not(isEnabled())));
+
+        // Make a stable copy of the components as the original list may be modified
+        List<ResolvedComponentInfo> stableCopy =
+                createResolvedComponentsForTestWithOtherProfile(2);
+
+        // Check that the "Other Profile" activity is put in the right spot
+        onView(withId(R.id.profile_button)).check(matches(
+                withText(stableCopy.get(0).getResolveInfoAt(0).activityInfo.name)));
+        onView(withText(stableCopy.get(1).getResolveInfoAt(0).activityInfo.name))
+                .perform(click());
+        onView(withId(R.id.button_once)).perform(click());
+        waitForIdle();
+        assertThat(chosen[0], is(toChoose));
+    }
+
+
+    @Test
+    public void hasLastChosenActivityAndOtherProfile() throws Exception {
+        // In this case we prefer the other profile and don't display anything about the last
+        // chosen activity.
+        Intent sendIntent = createSendImageIntent();
+        List<ResolvedComponentInfo> resolvedComponentInfos =
+                createResolvedComponentsForTestWithOtherProfile(3);
+        ResolveInfo toChoose = resolvedComponentInfos.get(1).getResolveInfoAt(0);
+
+        when(sOverrides.resolverListController.getResolversForIntent(Mockito.anyBoolean(),
+                Mockito.anyBoolean(),
+                Mockito.isA(List.class))).thenReturn(resolvedComponentInfos);
+        when(sOverrides.resolverListController.getLastChosen())
+                .thenReturn(resolvedComponentInfos.get(1).getResolveInfoAt(0));
+
+        final ResolverWrapperActivity activity = mActivityRule.launchActivity(sendIntent);
+        waitForIdle();
+
+        // The other entry is filtered to the other profile slot
+        assertThat(activity.getAdapter().getCount(), is(2));
+
+        ResolveInfo[] chosen = new ResolveInfo[1];
+        sOverrides.onSafelyStartCallback = targetInfo -> {
+            chosen[0] = targetInfo.getResolveInfo();
+            return true;
+        };
+
+        // Confirm that the button bar is disabled by default
+        onView(withId(R.id.button_once)).check(matches(not(isEnabled())));
+
+        // Make a stable copy of the components as the original list may be modified
+        List<ResolvedComponentInfo> stableCopy =
+                createResolvedComponentsForTestWithOtherProfile(2);
+
+        // Check that the "Other Profile" activity is put in the right spot
+        onView(withId(R.id.profile_button)).check(matches(
+                withText(stableCopy.get(0).getResolveInfoAt(0).activityInfo.name)));
+        onView(withText(stableCopy.get(1).getResolveInfoAt(0).activityInfo.name))
+                .perform(click());
+        onView(withId(R.id.button_once)).perform(click());
+        waitForIdle();
+        assertThat(chosen[0], is(toChoose));
+    }
+
     private Intent createSendImageIntent() {
         Intent sendIntent = new Intent();
         sendIntent.setAction(Intent.ACTION_SEND);
@@ -145,6 +266,19 @@
         return infoList;
     }
 
+    private List<ResolvedComponentInfo> createResolvedComponentsForTestWithOtherProfile(
+            int numberOfResults) {
+        List<ResolvedComponentInfo> infoList = new ArrayList<>(numberOfResults);
+        for (int i = 0; i < numberOfResults; i++) {
+            if (i == 0) {
+                infoList.add(ResolverDataProvider.createResolvedComponentInfoWithOtherId(i));
+            } else {
+                infoList.add(ResolverDataProvider.createResolvedComponentInfo(i));
+            }
+        }
+        return infoList;
+    }
+
     private void waitForIdle() {
         InstrumentationRegistry.getInstrumentation().waitForIdleSync();
     }
diff --git a/core/tests/coretests/src/com/android/internal/app/ResolverDataProvider.java b/core/tests/coretests/src/com/android/internal/app/ResolverDataProvider.java
index ae06306..c710b9a 100644
--- a/core/tests/coretests/src/com/android/internal/app/ResolverDataProvider.java
+++ b/core/tests/coretests/src/com/android/internal/app/ResolverDataProvider.java
@@ -32,9 +32,16 @@
  */
 class ResolverDataProvider {
 
+    static private int USER_SOMEONE_ELSE = 10;
+
     static ResolverActivity.ResolvedComponentInfo createResolvedComponentInfo(int i) {
         return new ResolverActivity.ResolvedComponentInfo(createComponentName(i),
-                createResolverIntent(i), createResolveInfo(i));
+                createResolverIntent(i), createResolveInfo(i, UserHandle.USER_CURRENT));
+    }
+
+    static ResolverActivity.ResolvedComponentInfo createResolvedComponentInfoWithOtherId(int i) {
+        return new ResolverActivity.ResolvedComponentInfo(createComponentName(i),
+                createResolverIntent(i), createResolveInfo(i, USER_SOMEONE_ELSE));
     }
 
     static ComponentName createComponentName(int i) {
@@ -42,10 +49,10 @@
         return new ComponentName("foo.bar." + name, name);
     }
 
-    static ResolveInfo createResolveInfo(int i) {
+    static ResolveInfo createResolveInfo(int i, int userId) {
         final ResolveInfo resolveInfo = new ResolveInfo();
         resolveInfo.activityInfo = createActivityInfo(i);
-        resolveInfo.targetUserId = UserHandle.USER_CURRENT;
+        resolveInfo.targetUserId = userId;
         return resolveInfo;
     }
 
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/core/tests/coretests/src/com/android/internal/logging/legacy/LockscreenGestureParserTest.java b/core/tests/coretests/src/com/android/internal/logging/legacy/LockscreenGestureParserTest.java
deleted file mode 100644
index c023b57..0000000
--- a/core/tests/coretests/src/com/android/internal/logging/legacy/LockscreenGestureParserTest.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * 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.internal.logging.legacy;
-
-import static org.mockito.Matchers.anyObject;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-
-import android.metrics.LogMaker;
-import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
-
-public class LockscreenGestureParserTest extends ParserTest {
-
-    public LockscreenGestureParserTest() {
-        mParser = new LockscreenGestureParser();
-    }
-
-    public void testSwipeUpUnlock() throws Throwable {
-        validate(MetricsEvent.ACTION_LS_UNLOCK, 1, 359, 6382);
-    }
-
-    public void testSwipeToShade() throws Throwable {
-        validate(MetricsEvent.ACTION_LS_SHADE, 2, 324, 0);
-    }
-
-    public void testTapLockHint() throws Throwable {
-        validate(MetricsEvent.ACTION_LS_HINT, 3, 0, 0);
-    }
-
-    public void testCamera() throws Throwable {
-        validate(MetricsEvent.ACTION_LS_CAMERA, 4, 223, 1756);
-    }
-
-    public void testDialer() throws Throwable {
-        validate(MetricsEvent.ACTION_LS_DIALER, 5, 163, 861);
-    }
-
-    public void testTapToLock() throws Throwable {
-        validate(MetricsEvent.ACTION_LS_LOCK, 6, 0, 0);
-    }
-
-    public void testTapOnNotification() throws Throwable {
-        validate(MetricsEvent.ACTION_LS_NOTE, 7, 0, 0);
-    }
-
-    public void testLockscreenQuickSettings() throws Throwable {
-        validate(MetricsEvent.ACTION_LS_QS, 8, 284, 3824);
-    }
-
-    public void testShadePullQuickSettings() throws Throwable {
-        validate(MetricsEvent.ACTION_SHADE_QS_PULL, 9, 175, 3444);
-    }
-
-    public void testShadeTapQuickSettings() throws Throwable {
-        validate(MetricsEvent.ACTION_SHADE_QS_TAP, 10, 0, 0);
-    }
-
-    private void validate(int view, int type, int len, int vel) {
-        int t = 1000;
-        Object[] objects = new Object[3];
-        objects[0] = type;
-        objects[1] = len;
-        objects[2] = vel;
-
-        mParser.parseEvent(mLogger, t, objects);
-
-        verify(mLogger, times(1)).addEvent(mProtoCaptor.capture());
-
-        LogMaker proto = mProtoCaptor.getValue();
-        assertEquals(t, proto.getTimestamp());
-        assertEquals(view, proto.getCategory());
-        assertEquals(MetricsEvent.TYPE_ACTION, proto.getType());
-    }
-
-    public void testIgnoreUnexpectedData() throws Throwable {
-        int t = 1000;
-        Object[] objects = new Object[4];
-        objects[0] = 1;
-        objects[1] = 0;
-        objects[2] = 0;
-        objects[3] = "foo";
-
-        mParser.parseEvent(mLogger, t, objects);
-
-        verify(mLogger, times(1)).addEvent((LogMaker) anyObject());
-    }
-}
diff --git a/core/tests/coretests/src/com/android/internal/logging/legacy/StatusBarStateParserTest.java b/core/tests/coretests/src/com/android/internal/logging/legacy/StatusBarStateParserTest.java
deleted file mode 100644
index def9628..0000000
--- a/core/tests/coretests/src/com/android/internal/logging/legacy/StatusBarStateParserTest.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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.internal.logging.legacy;
-
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-
-
-import android.metrics.LogMaker;
-import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
-
-public class StatusBarStateParserTest extends ParserTest {
-
-    public StatusBarStateParserTest() {
-        mParser = new StatusBarStateParser();
-    }
-
-    public void testLockScreen() throws Throwable {
-        validate(MetricsEvent.LOCKSCREEN, MetricsEvent.TYPE_OPEN, 1, "1,1,0,0,1,0");
-    }
-
-    public void testBounce() throws Throwable {
-        validate(MetricsEvent.BOUNCER, MetricsEvent.TYPE_OPEN, 1, "1,1,0,1,1,0");
-    }
-
-    public void testUnlock() throws Throwable {
-        validate(MetricsEvent.LOCKSCREEN, MetricsEvent.TYPE_CLOSE, 1, "0,0,0,0,1,0");
-    }
-
-    public void testSecure() throws Throwable {
-        validate(MetricsEvent.BOUNCER, MetricsEvent.TYPE_OPEN, 1, "2,1,0,1,1,0");
-    }
-
-    public void testInsecure() throws Throwable {
-        validate(MetricsEvent.LOCKSCREEN, MetricsEvent.TYPE_OPEN, 0, "1,1,0,0,0,0");
-    }
-
-    public void testIgnoreUnexpectedData() throws Throwable {
-        validate(MetricsEvent.LOCKSCREEN, MetricsEvent.TYPE_OPEN, 0, "1,1,0,0,0,0,5");
-    }
-
-    private void validate(int view, int type, int subType, String log) {
-        String[] parts = log.split(",");
-        int t = 1000;
-        Object[] objects = new Object[parts.length];
-        for (int i = 0; i < parts.length; i++) {
-            objects[i] = Integer.valueOf(parts[i]);
-        }
-
-        mParser.parseEvent(mLogger, t, objects);
-
-        verify(mLogger, times(1)).addEvent(mProtoCaptor.capture());
-
-        LogMaker proto = mProtoCaptor.getValue();
-        assertEquals(t, proto.getTimestamp());
-        assertEquals(view, proto.getCategory());
-        assertEquals(type, proto.getType());
-        assertEquals(subType, proto.getSubtype());
-    }
-}
diff --git a/core/tests/packagemanagertests/Android.mk b/core/tests/packagemanagertests/Android.mk
new file mode 100644
index 0000000..c1e8c98
--- /dev/null
+++ b/core/tests/packagemanagertests/Android.mk
@@ -0,0 +1,20 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+# We only want this apk build for tests.
+LOCAL_MODULE_TAGS := tests
+
+# Include all test java files.
+LOCAL_SRC_FILES := \
+    $(call all-java-files-under, src)
+
+LOCAL_STATIC_JAVA_LIBRARIES := \
+    android-support-test \
+    frameworks-base-testutils
+
+LOCAL_JAVA_LIBRARIES := android.test.runner
+LOCAL_PACKAGE_NAME := FrameworksCorePackageManagerTests
+
+LOCAL_CERTIFICATE := platform
+
+include $(BUILD_PACKAGE)
diff --git a/core/tests/packagemanagertests/AndroidManifest.xml b/core/tests/packagemanagertests/AndroidManifest.xml
new file mode 100644
index 0000000..8f49008
--- /dev/null
+++ b/core/tests/packagemanagertests/AndroidManifest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          android:installLocation="internalOnly"
+          package="com.android.frameworks.coretests.packagemanager"
+          android:sharedUserId="android.uid.system">
+
+    <application>
+        <uses-library android:name="android.test.runner" />
+    </application>
+
+    <instrumentation
+            android:name="android.support.test.runner.AndroidJUnitRunner"
+            android:targetPackage="com.android.frameworks.coretests.packagemanager"
+            android:label="Frameworks PackageManager Core Tests" />
+
+</manifest>
diff --git a/core/tests/packagemanagertests/src/android/content/pm/KernelPackageMappingTests.java b/core/tests/packagemanagertests/src/android/content/pm/KernelPackageMappingTests.java
new file mode 100644
index 0000000..1097bc7
--- /dev/null
+++ b/core/tests/packagemanagertests/src/android/content/pm/KernelPackageMappingTests.java
@@ -0,0 +1,109 @@
+/*
+ * 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.content.pm;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import android.content.Context;
+import android.os.FileUtils;
+import android.os.Process;
+import android.os.ServiceManager;
+import android.os.UserManager;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.runner.AndroidJUnit4;
+import android.util.Log;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.io.File;
+import java.io.IOException;
+
+/**
+ * This test needs to be run without any secondary users on the device,
+ * and selinux needs to be disabled with "adb shell setenforce 0".
+ */
+@RunWith(AndroidJUnit4.class)
+public class KernelPackageMappingTests {
+
+    private static final String TAG = "KernelPackageMapping";
+    private static final String SDCARDFS_PATH = "/config/sdcardfs";
+
+    private UserInfo mSecondaryUser;
+
+    private static File getKernelPackageDir(String packageName) {
+        return new File(new File(SDCARDFS_PATH), packageName);
+    }
+
+    private static File getKernelPackageFile(String packageName, String filename) {
+        return new File(getKernelPackageDir(packageName), filename);
+    }
+
+    private UserManager getUserManager() {
+        UserManager um = (UserManager) InstrumentationRegistry.getContext().getSystemService(
+                Context.USER_SERVICE);
+        return um;
+    }
+
+    private IPackageManager getIPackageManager() {
+        IPackageManager ipm = IPackageManager.Stub.asInterface(
+                ServiceManager.getService("package"));
+        return ipm;
+    }
+
+    private static String getContent(File file) {
+        try {
+            return FileUtils.readTextFile(file, 0, null).trim();
+        } catch (IOException ioe) {
+            Log.w(TAG, "Couldn't read file " + file.getAbsolutePath() + "\n" + ioe);
+            return "<error>";
+        }
+    }
+
+    @Test
+    public void testInstalledPrimary() throws Exception {
+        assertEquals("1000", getContent(getKernelPackageFile("com.android.settings", "appid")));
+    }
+
+    @Test
+    public void testInstalledAll() throws Exception {
+        assertEquals("", getContent(getKernelPackageFile("com.android.settings",
+                "excluded_userids")));
+    }
+
+    @Test
+    public void testNotInstalledSecondary() throws Exception {
+        mSecondaryUser = getUserManager().createUser("Secondary", 0);
+        assertEquals(Integer.toString(mSecondaryUser.id),
+                getContent(
+                        getKernelPackageFile("com.android.frameworks.coretests.packagemanager",
+                                "excluded_userids")));
+    }
+
+    @After
+    public void shutDown() throws Exception {
+        if (mSecondaryUser != null) {
+            getUserManager().removeUser(mSecondaryUser.id);
+        }
+    }
+}
diff --git a/data/etc/framework-sysconfig.xml b/data/etc/framework-sysconfig.xml
index 62ef25b..7fafef7 100644
--- a/data/etc/framework-sysconfig.xml
+++ b/data/etc/framework-sysconfig.xml
@@ -23,4 +23,9 @@
     <allow-implicit-broadcast action="android.intent.action.PACKAGE_CHANGED" />
     <allow-implicit-broadcast action="android.intent.action.MEDIA_SCANNER_SCAN_FILE" />
 
+    <!-- Whitelist of what components are permitted as backup data transports.  The
+         'service' attribute here is a flattened ComponentName string. -->
+    <backup-transport-whitelisted-service
+        service="android/com.android.internal.backup.LocalTransportService" />
+
 </config>
diff --git a/data/etc/platform.xml b/data/etc/platform.xml
index e46f166..344f3c8 100644
--- a/data/etc/platform.xml
+++ b/data/etc/platform.xml
@@ -155,6 +155,7 @@
     <assign-permission name="android.permission.WAKE_LOCK" uid="cameraserver" />
     <assign-permission name="android.permission.UPDATE_DEVICE_STATS" uid="cameraserver" />
     <assign-permission name="android.permission.UPDATE_APP_OPS_STATS" uid="cameraserver" />
+    <assign-permission name="android.permission.GET_PROCESS_STATE_AND_OOM_SCORE" uid="cameraserver" />
 
     <assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="graphics" />
 
@@ -176,6 +177,10 @@
          access while in data mode, even if they aren't in the foreground. -->
     <allow-in-data-usage-save package="com.android.providers.downloads" />
 
+    <!-- This is a core platform component that needs to freely run in the background -->
+    <allow-in-power-save package="com.android.cellbroadcastreceiver" />
+    <allow-in-power-save package="com.android.shell" />
+
     <!-- These are the packages that are white-listed to be able to run as system user -->
     <system-user-whitelisted-app package="com.android.settings" />
 
diff --git a/data/etc/privapp-permissions-platform.xml b/data/etc/privapp-permissions-platform.xml
index c5961ab..039ab1f 100644
--- a/data/etc/privapp-permissions-platform.xml
+++ b/data/etc/privapp-permissions-platform.xml
@@ -132,6 +132,7 @@
         <permission name="android.permission.ACCESS_IMS_CALL_SERVICE"/>
         <permission name="android.permission.BIND_CARRIER_MESSAGING_SERVICE"/>
         <permission name="android.permission.BIND_CARRIER_SERVICES"/>
+        <permission name="android.permission.BIND_IMS_SERVICE"/>
         <permission name="android.permission.BIND_VISUAL_VOICEMAIL_SERVICE"/>
         <permission name="android.permission.CALL_PRIVILEGED"/>
         <permission name="android.permission.CHANGE_COMPONENT_ENABLED_STATE"/>
@@ -339,4 +340,4 @@
         <permission name="android.permission.CONTROL_VPN"/>
     </privapp-permissions>
 
-</permissions>
\ No newline at end of file
+</permissions>
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/graphics/java/android/graphics/Canvas.java b/graphics/java/android/graphics/Canvas.java
index 8572345..7289429 100644
--- a/graphics/java/android/graphics/Canvas.java
+++ b/graphics/java/android/graphics/Canvas.java
@@ -21,6 +21,7 @@
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.annotation.Size;
+import android.os.Build;
 
 import dalvik.annotation.optimization.CriticalNative;
 import dalvik.annotation.optimization.FastNative;
@@ -290,11 +291,6 @@
     /** @hide */
     @IntDef(flag = true,
             value = {
-                MATRIX_SAVE_FLAG,
-                CLIP_SAVE_FLAG,
-                HAS_ALPHA_LAYER_SAVE_FLAG,
-                FULL_COLOR_LAYER_SAVE_FLAG,
-                CLIP_TO_LAYER_SAVE_FLAG,
                 ALL_SAVE_FLAG
             })
     @Retention(RetentionPolicy.SOURCE)
@@ -302,21 +298,39 @@
 
     /**
      * Restore the current matrix when restore() is called.
+     *
+     * @deprecated Use the flagless version of {@link #save()}, {@link #saveLayer(RectF, Paint)} or
+     *             {@link #saveLayerAlpha(RectF, int)}. For saveLayer() calls the matrix
+     *             was always restored for {@link #isHardwareAccelerated() Hardware accelerated}
+     *             canvases and as of API level {@value Build.VERSION_CODES#O} that is the default
+     *             behavior for all canvas types.
      */
     public static final int MATRIX_SAVE_FLAG = 0x01;
 
     /**
      * Restore the current clip when restore() is called.
+     *
+     * @deprecated Use the flagless version of {@link #save()}, {@link #saveLayer(RectF, Paint)} or
+     *             {@link #saveLayerAlpha(RectF, int)}. For saveLayer() calls the clip
+     *             was always restored for {@link #isHardwareAccelerated() Hardware accelerated}
+     *             canvases and as of API level {@value Build.VERSION_CODES#O} that is the default
+     *             behavior for all canvas types.
      */
     public static final int CLIP_SAVE_FLAG = 0x02;
 
     /**
      * The layer requires a per-pixel alpha channel.
+     *
+     * @deprecated This flag is ignored. Use the flagless version of {@link #saveLayer(RectF, Paint)}
+     *             {@link #saveLayerAlpha(RectF, int)}.
      */
     public static final int HAS_ALPHA_LAYER_SAVE_FLAG = 0x04;
 
     /**
      * The layer requires full 8-bit precision for each color channel.
+     *
+     * @deprecated This flag is ignored. Use the flagless version of {@link #saveLayer(RectF, Paint)}
+     *             {@link #saveLayerAlpha(RectF, int)}.
      */
     public static final int FULL_COLOR_LAYER_SAVE_FLAG = 0x08;
 
@@ -326,6 +340,10 @@
      * omit this flag for any call to <code>saveLayer()</code> and
      * <code>saveLayerAlpha()</code> variants. Not passing this flag generally
      * triggers extremely poor performance with hardware accelerated rendering.
+     *
+     * @deprecated This flag results in poor performance and the same effect can be achieved with
+     *             a single layer or multiple draw commands with different clips.
+     *
      */
     public static final int CLIP_TO_LAYER_SAVE_FLAG = 0x10;
 
@@ -335,6 +353,9 @@
      * strongly recommended to pass this - the complete set of flags - to any
      * call to <code>saveLayer()</code> and <code>saveLayerAlpha()</code>
      * variants.
+     *
+     * <p class="note"><strong>Note:</strong> all methods that accept this flag
+     * have flagless versions that are equivalent to passing this flag.
      */
     public static final int ALL_SAVE_FLAG = 0x1F;
 
@@ -364,6 +385,7 @@
      * restore() is made, those calls will be forgotten, and the settings that
      * existed before the save() will be reinstated.
      *
+     * @deprecated Use {@link #save()} instead.
      * @param saveFlags flag bits that specify which parts of the Canvas state
      *                  to save/restore
      * @return The value to pass to restoreToCount() to balance this save()
@@ -394,6 +416,7 @@
      * {@link Paint#getColorFilter() ColorFilter} are applied when the
      * offscreen bitmap is drawn back when restore() is called.
      *
+     * @deprecated Use {@link #saveLayer(RectF, Paint)} instead.
      * @param bounds May be null. The maximum size the offscreen bitmap
      *               needs to be (in local coordinates)
      * @param paint  This is copied, and is applied to the offscreen when
@@ -410,7 +433,30 @@
     }
 
     /**
-     * Convenience for saveLayer(bounds, paint, {@link #ALL_SAVE_FLAG})
+     * This behaves the same as save(), but in addition it allocates and
+     * redirects drawing to an offscreen rendering target.
+     * <p class="note"><strong>Note:</strong> this method is very expensive,
+     * incurring more than double rendering cost for contained content. Avoid
+     * using this method when possible and instead use a
+     * {@link android.view.View#LAYER_TYPE_HARDWARE hardware layer} on a View
+     * to apply an xfermode, color filter, or alpha, as it will perform much
+     * better than this method.
+     * <p>
+     * All drawing calls are directed to a newly allocated offscreen rendering target.
+     * Only when the balancing call to restore() is made, is that offscreen
+     * buffer drawn back to the current target of the Canvas (which can potentially be a previous
+     * layer if these calls are nested).
+     * <p>
+     * Attributes of the Paint - {@link Paint#getAlpha() alpha},
+     * {@link Paint#getXfermode() Xfermode}, and
+     * {@link Paint#getColorFilter() ColorFilter} are applied when the
+     * offscreen rendering target is drawn back when restore() is called.
+     *
+     * @param bounds May be null. The maximum size the offscreen render target
+     *               needs to be (in local coordinates)
+     * @param paint  This is copied, and is applied to the offscreen when
+     *               restore() is called.
+     * @return       value to pass to restoreToCount() to balance this save()
      */
     public int saveLayer(@Nullable RectF bounds, @Nullable Paint paint) {
         return saveLayer(bounds, paint, ALL_SAVE_FLAG);
@@ -418,6 +464,8 @@
 
     /**
      * Helper version of saveLayer() that takes 4 values rather than a RectF.
+     *
+     * @deprecated Use {@link #saveLayer(float, float, float, float, Paint)} instead.
      */
     public int saveLayer(float left, float top, float right, float bottom, @Nullable Paint paint,
             @Saveflags int saveFlags) {
@@ -427,7 +475,8 @@
     }
 
     /**
-     * Convenience for saveLayer(left, top, right, bottom, paint, {@link #ALL_SAVE_FLAG})
+     * Convenience for {@link #saveLayer(RectF, Paint)} that takes the four float coordinates of the
+     * bounds rectangle.
      */
     public int saveLayer(float left, float top, float right, float bottom, @Nullable Paint paint) {
         return saveLayer(left, top, right, bottom, paint, ALL_SAVE_FLAG);
@@ -453,6 +502,7 @@
      * The {@code alpha} parameter is applied when the offscreen bitmap is
      * drawn back when restore() is called.
      *
+     * @deprecated Use {@link #saveLayerAlpha(RectF, int)} instead.
      * @param bounds    The maximum size the offscreen bitmap needs to be
      *                  (in local coordinates)
      * @param alpha     The alpha to apply to the offscreen when it is
@@ -469,7 +519,13 @@
     }
 
     /**
-     * Convenience for saveLayerAlpha(bounds, alpha, {@link #ALL_SAVE_FLAG})
+     * Convenience for {@link #saveLayer(RectF, Paint)} but instead of taking a entire Paint object
+     * it takes only the {@code alpha} parameter.
+     *
+     * @param bounds    The maximum size the offscreen bitmap needs to be
+     *                  (in local coordinates)
+     * @param alpha     The alpha to apply to the offscreen when it is
+                        drawn during restore()
      */
     public int saveLayerAlpha(@Nullable RectF bounds, int alpha) {
         return saveLayerAlpha(bounds, alpha, ALL_SAVE_FLAG);
@@ -477,6 +533,8 @@
 
     /**
      * Helper for saveLayerAlpha() that takes 4 values instead of a RectF.
+     *
+     * @deprecated Use {@link #saveLayerAlpha(float, float, float, float, int)} instead.
      */
     public int saveLayerAlpha(float left, float top, float right, float bottom, int alpha,
             @Saveflags int saveFlags) {
@@ -486,7 +544,8 @@
     }
 
     /**
-     * Helper for saveLayerAlpha(left, top, right, bottom, alpha, {@link #ALL_SAVE_FLAG})
+     * Convenience for {@link #saveLayerAlpha(RectF, int)} that takes the four float coordinates of
+     * the bounds rectangle.
      */
     public int saveLayerAlpha(float left, float top, float right, float bottom, int alpha) {
         return saveLayerAlpha(left, top, right, bottom, alpha, ALL_SAVE_FLAG);
@@ -677,7 +736,14 @@
      * @param rect The rect to intersect with the current clip
      * @param op How the clip is modified
      * @return true if the resulting clip is non-empty
+     *
+     * @deprecated Region.Op values other than {@link Region.Op#INTERSECT} and
+     * {@link Region.Op#DIFFERENCE} have the ability to expand the clip. The canvas clipping APIs
+     * are intended to only expand the clip as a result of a restore operation. This enables a view
+     * parent to clip a canvas to clearly define the maximal drawing area of its children. The
+     * recommended alternative calls are {@link #clipRect(RectF)} and {@link #clipOutRect(RectF)};
      */
+    @Deprecated
     public boolean clipRect(@NonNull RectF rect, @NonNull Region.Op op) {
         return nClipRect(mNativeCanvasWrapper, rect.left, rect.top, rect.right, rect.bottom,
                 op.nativeInt);
@@ -690,7 +756,14 @@
      * @param rect The rectangle to intersect with the current clip.
      * @param op How the clip is modified
      * @return true if the resulting clip is non-empty
+     *
+     * @deprecated Region.Op values other than {@link Region.Op#INTERSECT} and
+     * {@link Region.Op#DIFFERENCE} have the ability to expand the clip. The canvas clipping APIs
+     * are intended to only expand the clip as a result of a restore operation. This enables a view
+     * parent to clip a canvas to clearly define the maximal drawing area of its children. The
+     * recommended alternative calls are {@link #clipRect(Rect)} and {@link #clipOutRect(Rect)};
      */
+    @Deprecated
     public boolean clipRect(@NonNull Rect rect, @NonNull Region.Op op) {
         return nClipRect(mNativeCanvasWrapper, rect.left, rect.top, rect.right, rect.bottom,
                 op.nativeInt);
@@ -709,6 +782,18 @@
     }
 
     /**
+     * Set the clip to the difference of the current clip and the specified rectangle, which is
+     * expressed in local coordinates.
+     *
+     * @param rect The rectangle to perform a difference op with the current clip.
+     * @return true if the resulting clip is non-empty
+     */
+    public boolean clipOutRect(@NonNull RectF rect) {
+        return nClipRect(mNativeCanvasWrapper, rect.left, rect.top, rect.right, rect.bottom,
+                Region.Op.DIFFERENCE.nativeInt);
+    }
+
+    /**
      * Intersect the current clip with the specified rectangle, which is
      * expressed in local coordinates.
      *
@@ -721,6 +806,18 @@
     }
 
     /**
+     * Set the clip to the difference of the current clip and the specified rectangle, which is
+     * expressed in local coordinates.
+     *
+     * @param rect The rectangle to perform a difference op with the current clip.
+     * @return true if the resulting clip is non-empty
+     */
+    public boolean clipOutRect(@NonNull Rect rect) {
+        return nClipRect(mNativeCanvasWrapper, rect.left, rect.top, rect.right, rect.bottom,
+                Region.Op.DIFFERENCE.nativeInt);
+    }
+
+    /**
      * Modify the current clip with the specified rectangle, which is
      * expressed in local coordinates.
      *
@@ -734,7 +831,15 @@
      *               clip
      * @param op     How the clip is modified
      * @return       true if the resulting clip is non-empty
+     *
+     * @deprecated Region.Op values other than {@link Region.Op#INTERSECT} and
+     * {@link Region.Op#DIFFERENCE} have the ability to expand the clip. The canvas clipping APIs
+     * are intended to only expand the clip as a result of a restore operation. This enables a view
+     * parent to clip a canvas to clearly define the maximal drawing area of its children. The
+     * recommended alternative calls are {@link #clipRect(float,float,float,float)} and
+     * {@link #clipOutRect(float,float,float,float)};
      */
+    @Deprecated
     public boolean clipRect(float left, float top, float right, float bottom,
             @NonNull Region.Op op) {
         return nClipRect(mNativeCanvasWrapper, left, top, right, bottom, op.nativeInt);
@@ -759,6 +864,21 @@
     }
 
     /**
+     * Set the clip to the difference of the current clip and the specified rectangle, which is
+     * expressed in local coordinates.
+     *
+     * @param left   The left side of the rectangle used in the difference operation
+     * @param top    The top of the rectangle used in the difference operation
+     * @param right  The right side of the rectangle used in the difference operation
+     * @param bottom The bottom of the rectangle used in the difference operation
+     * @return       true if the resulting clip is non-empty
+     */
+    public boolean clipOutRect(float left, float top, float right, float bottom) {
+        return nClipRect(mNativeCanvasWrapper, left, top, right, bottom,
+                Region.Op.DIFFERENCE.nativeInt);
+    }
+
+    /**
      * Intersect the current clip with the specified rectangle, which is
      * expressed in local coordinates.
      *
@@ -777,12 +897,35 @@
     }
 
     /**
+     * Set the clip to the difference of the current clip and the specified rectangle, which is
+     * expressed in local coordinates.
+     *
+     * @param left   The left side of the rectangle used in the difference operation
+     * @param top    The top of the rectangle used in the difference operation
+     * @param right  The right side of the rectangle used in the difference operation
+     * @param bottom The bottom of the rectangle used in the difference operation
+     * @return       true if the resulting clip is non-empty
+     */
+    public boolean clipOutRect(int left, int top, int right, int bottom) {
+        return nClipRect(mNativeCanvasWrapper, left, top, right, bottom,
+                Region.Op.DIFFERENCE.nativeInt);
+    }
+
+    /**
         * Modify the current clip with the specified path.
      *
      * @param path The path to operate on the current clip
      * @param op   How the clip is modified
      * @return     true if the resulting is non-empty
+     *
+     * @deprecated Region.Op values other than {@link Region.Op#INTERSECT} and
+     * {@link Region.Op#DIFFERENCE} have the ability to expand the clip. The canvas clipping APIs
+     * are intended to only expand the clip as a result of a restore operation. This enables a view
+     * parent to clip a canvas to clearly define the maximal drawing area of its children. The
+     * recommended alternative calls are {@link #clipPath(Path)} and
+     * {@link #clipOutPath(Path)};
      */
+    @Deprecated
     public boolean clipPath(@NonNull Path path, @NonNull Region.Op op) {
         return nClipPath(mNativeCanvasWrapper, path.readOnlyNI(), op.nativeInt);
     }
@@ -791,13 +934,23 @@
      * Intersect the current clip with the specified path.
      *
      * @param path The path to intersect with the current clip
-     * @return     true if the resulting is non-empty
+     * @return     true if the resulting clip is non-empty
      */
     public boolean clipPath(@NonNull Path path) {
         return clipPath(path, Region.Op.INTERSECT);
     }
 
     /**
+     * Set the clip to the difference of the current clip and the specified path.
+     *
+     * @param path The path used in the difference operation
+     * @return     true if the resulting clip is non-empty
+     */
+    public boolean clipOutPath(@NonNull Path path) {
+        return clipPath(path, Region.Op.DIFFERENCE);
+    }
+
+    /**
      * Modify the current clip with the specified region. Note that unlike
      * clipRect() and clipPath() which transform their arguments by the
      * current matrix, clipRegion() assumes its argument is already in the
diff --git a/graphics/java/android/graphics/RectF.java b/graphics/java/android/graphics/RectF.java
index f5cedfa..b490545 100644
--- a/graphics/java/android/graphics/RectF.java
+++ b/graphics/java/android/graphics/RectF.java
@@ -583,4 +583,17 @@
         right = in.readFloat();
         bottom = in.readFloat();
     }
+
+    /**
+     * Scales up the rect by the given scale.
+     * @hide
+     */
+    public void scale(float scale) {
+        if (scale != 1.0f) {
+            left = left * scale;
+            top = top * scale ;
+            right = right * scale;
+            bottom = bottom * scale;
+        }
+    }
 }
diff --git a/graphics/java/android/graphics/Typeface.java b/graphics/java/android/graphics/Typeface.java
index 5531871..7eb8099 100644
--- a/graphics/java/android/graphics/Typeface.java
+++ b/graphics/java/android/graphics/Typeface.java
@@ -163,44 +163,63 @@
     @Nullable
     public static Typeface createFromResources(FontConfig config, AssetManager mgr, String path) {
         if (sFallbackFonts != null) {
+            Typeface typeface = findFromCache(mgr, path);
+            if (typeface != null) return typeface;
+
+            List<FontConfig.Family> families = config.getFamilies();
+            if (families == null || families.isEmpty()) {
+                throw new RuntimeException(
+                        "Font resource " + path + " contained no font families.");
+            }
+            if (families.size() > 1) {
+                throw new RuntimeException(
+                        "Font resource " + path + " contained more than one family.");
+            }
+            FontConfig.Family family = families.get(0);
+            if (family.getProviderAuthority() != null && family.getQuery() != null) {
+                // Downloadable font
+                typeface = findFromCache(
+                        family.getProviderAuthority(), family.getQuery());
+                if (typeface != null) {
+                    return typeface;
+                }
+                // Downloaded font and it wasn't cached, request it again and return a
+                // default font instead (nothing we can do now).
+                create(new FontRequest(family.getProviderAuthority(), family.getQuery()),
+                        NO_OP_REQUEST_CALLBACK);
+                return DEFAULT;
+            }
+
+            FontFamily fontFamily = new FontFamily();
+            List<FontConfig.Font> fonts = family.getFonts();
+            if (fonts == null || fonts.isEmpty()) {
+                throw new RuntimeException("Font resource " + path + " contained no fonts.");
+            }
+            for (int i = 0; i < fonts.size(); i++) {
+                FontConfig.Font font = fonts.get(i);
+                // TODO: Use style and weight info
+                if (!fontFamily.addFontFromAssetManager(mgr, font.getFontName(),
+                        0 /* resourceCookie */, false /* isAsset */)) {
+                    return null;
+                }
+            }
+            fontFamily.freeze();
+            FontFamily[] familyChain = { fontFamily };
+            typeface = createFromFamiliesWithDefault(familyChain);
             synchronized (sDynamicTypefaceCache) {
                 final String key = createAssetUid(mgr, path);
-                Typeface typeface = sDynamicTypefaceCache.get(key);
-                if (typeface != null) return typeface;
-
-                List<FontConfig.Family> families = config.getFamilies();
-                if (families == null || families.isEmpty()) {
-                    throw new RuntimeException("Font resource contained no fonts.");
-                }
-                if (families.size() > 1) {
-                    throw new RuntimeException("Font resource contained more than one family.");
-                }
-                FontConfig.Family family = families.get(0);
-
-                FontFamily fontFamily = new FontFamily();
-                List<FontConfig.Font> fonts = family.getFonts();
-                for (int i = 0; i < fonts.size(); i++) {
-                    FontConfig.Font font = fonts.get(i);
-                    // TODO: Use style and weight info
-                    if (!fontFamily.addFontFromAssetManager(mgr, font.getFontName(),
-                            0 /* resourceCookie */, false /* isAsset */)) {
-                        return null;
-                    }
-                }
-                fontFamily.freeze();
-                FontFamily[] familyChain = { fontFamily };
-                typeface = createFromFamiliesWithDefault(familyChain);
                 sDynamicTypefaceCache.put(key, typeface);
-                return typeface;
             }
+            return typeface;
         }
         return null;
     }
 
     /**
+     * Used by resources for cached loading if the font is available.
      * @hide
      */
-    public static Typeface createFromCache(AssetManager mgr, String path) {
+    public static Typeface findFromCache(AssetManager mgr, String path) {
         synchronized (sDynamicTypefaceCache) {
             final String key = createAssetUid(mgr, path);
             Typeface typeface = sDynamicTypefaceCache.get(key);
@@ -221,6 +240,15 @@
      * @param callback A callback that will be triggered when results are obtained. May not be null.
      */
     public static void create(@NonNull FontRequest request, @NonNull FontRequestCallback callback) {
+        // Check the cache first
+        // TODO: would the developer want to avoid a cache hit and always ask for the freshest
+        // result?
+        Typeface cachedTypeface = findFromCache(
+                request.getProviderAuthority(), request.getQuery());
+        if (cachedTypeface != null) {
+            mHandler.post(() -> callback.onTypefaceRetrieved(cachedTypeface));
+            return;
+        }
         synchronized (sLock) {
             if (sFontsContract == null) {
                 sFontsContract = new FontsContract();
@@ -229,20 +257,34 @@
             final ResultReceiver receiver = new ResultReceiver(null) {
                 @Override
                 public void onReceiveResult(int resultCode, Bundle resultData) {
-                    mHandler.post(new Runnable() {
-                        @Override
-                        public void run() {
-                            receiveResult(request, callback, resultCode, resultData);
-                        }
-                    });
+                    mHandler.post(() -> receiveResult(request, callback, resultCode, resultData));
                 }
             };
             sFontsContract.getFont(request, receiver);
         }
     }
 
+    private static Typeface findFromCache(String providerAuthority, String query) {
+        synchronized (sDynamicTypefaceCache) {
+            final String key = createProviderUid(providerAuthority, query);
+            Typeface typeface = sDynamicTypefaceCache.get(key);
+            if (typeface != null) {
+                return typeface;
+            }
+        }
+        return null;
+    }
+
     private static void receiveResult(FontRequest request, FontRequestCallback callback,
             int resultCode, Bundle resultData) {
+        Typeface cachedTypeface = findFromCache(
+                request.getProviderAuthority(), request.getQuery());
+        if (cachedTypeface != null) {
+            // We already know the result.
+            // Probably the requester requests the same font again in a short interval.
+            callback.onTypefaceRetrieved(cachedTypeface);
+            return;
+        }
         if (resultCode == FontsContract.RESULT_CODE_PROVIDER_NOT_FOUND) {
             callback.onTypefaceRequestFailed(
                     FontRequestCallback.FAIL_REASON_PROVIDER_NOT_FOUND);
@@ -296,8 +338,12 @@
             }
         }
         fontFamily.freeze();
-        callback.onTypefaceRetrieved(Typeface.createFromFamiliesWithDefault(
-                new FontFamily[] {fontFamily}));
+        Typeface typeface = Typeface.createFromFamiliesWithDefault(new FontFamily[] { fontFamily });
+        synchronized (sDynamicTypefaceCache) {
+            String key = createProviderUid(request.getProviderAuthority(), request.getQuery());
+            sDynamicTypefaceCache.put(key, typeface);
+        }
+        callback.onTypefaceRetrieved(typeface);
     }
 
     /**
@@ -344,6 +390,18 @@
         void onTypefaceRequestFailed(@FontRequestFailReason int reason);
     }
 
+    private static final FontRequestCallback NO_OP_REQUEST_CALLBACK = new FontRequestCallback() {
+        @Override
+        public void onTypefaceRetrieved(Typeface typeface) {
+            // Do nothing.
+        }
+
+        @Override
+        public void onTypefaceRequestFailed(@FontRequestFailReason int reason) {
+            // Do nothing.
+        }
+    };
+
     /**
      * Create a typeface object given a family name, and option style information.
      * If null is passed for the name, then the "default" font will be chosen.
@@ -464,6 +522,7 @@
     private static String createAssetUid(final AssetManager mgr, String path) {
         final SparseArray<String> pkgs = mgr.getAssignedPackageIdentifiers();
         final StringBuilder builder = new StringBuilder();
+        builder.append("asset:");
         final int size = pkgs.size();
         for (int i = 0; i < size; i++) {
             builder.append(pkgs.valueAt(i));
@@ -474,6 +533,18 @@
     }
 
     /**
+     * Creates a unique id for a given font provider and query.
+     */
+    private static String createProviderUid(String authority, String query) {
+        final StringBuilder builder = new StringBuilder();
+        builder.append("provider:");
+        builder.append(authority);
+        builder.append("-");
+        builder.append(query);
+        return builder.toString();
+    }
+
+    /**
      * Create a new typeface from the specified font file.
      *
      * @param path The path to the font data.
diff --git a/graphics/java/android/graphics/drawable/Icon.java b/graphics/java/android/graphics/drawable/Icon.java
index 9772009..60c3b1c 100644
--- a/graphics/java/android/graphics/drawable/Icon.java
+++ b/graphics/java/android/graphics/drawable/Icon.java
@@ -67,6 +67,8 @@
     public static final int TYPE_DATA     = 3;
     /** @hide */
     public static final int TYPE_URI      = 4;
+    /** @hide */
+    public static final int TYPE_BITMAP_MASKABLE      = 5;
 
     private static final int VERSION_STREAM_SERIALIZER = 1;
 
@@ -101,6 +103,7 @@
      * {@link #TYPE_RESOURCE},
      * {@link #TYPE_DATA}, or
      * {@link #TYPE_URI}.
+     * {@link #TYPE_BITMAP_MASKABLE}
      * @hide
      */
     public int getType() {
@@ -112,7 +115,7 @@
      * @hide
      */
     public Bitmap getBitmap() {
-        if (mType != TYPE_BITMAP) {
+        if (mType != TYPE_BITMAP && mType != TYPE_BITMAP_MASKABLE) {
             throw new IllegalStateException("called getBitmap() on " + this);
         }
         return (Bitmap) mObj1;
@@ -218,6 +221,7 @@
     private static final String typeToString(int x) {
         switch (x) {
             case TYPE_BITMAP: return "BITMAP";
+            case TYPE_BITMAP_MASKABLE: return "BITMAP_MASKABLE";
             case TYPE_DATA: return "DATA";
             case TYPE_RESOURCE: return "RESOURCE";
             case TYPE_URI: return "URI";
@@ -285,6 +289,9 @@
         switch (mType) {
             case TYPE_BITMAP:
                 return new BitmapDrawable(context.getResources(), getBitmap());
+            case TYPE_BITMAP_MASKABLE:
+                return new MaskableIconDrawable(null,
+                    new BitmapDrawable(context.getResources(), getBitmap()));
             case TYPE_RESOURCE:
                 if (getResources() == null) {
                     // figure out where to load resources from
@@ -388,7 +395,7 @@
      * @hide
      */
     public void convertToAshmem() {
-        if (mType == TYPE_BITMAP &&
+        if ((mType == TYPE_BITMAP || mType == TYPE_BITMAP_MASKABLE) &&
             getBitmap().isMutable() &&
             getBitmap().getAllocationByteCount() >= MIN_ASHMEM_ICON_SIZE) {
             setBitmap(getBitmap().createAshmemBitmap());
@@ -409,6 +416,7 @@
 
         switch (mType) {
             case TYPE_BITMAP:
+            case TYPE_BITMAP_MASKABLE:
                 getBitmap().compress(Bitmap.CompressFormat.PNG, 100, dataStream);
                 break;
             case TYPE_DATA:
@@ -444,6 +452,8 @@
             switch (type) {
                 case TYPE_BITMAP:
                     return createWithBitmap(BitmapFactory.decodeStream(inputStream));
+                case TYPE_BITMAP_MASKABLE:
+                    return createWithMaskableBitmap(BitmapFactory.decodeStream(inputStream));
                 case TYPE_DATA:
                     final int length = inputStream.readInt();
                     final byte[] data = new byte[length];
@@ -478,6 +488,7 @@
         }
         switch (mType) {
             case TYPE_BITMAP:
+            case TYPE_BITMAP_MASKABLE:
                 return getBitmap() == otherIcon.getBitmap();
             case TYPE_DATA:
                 return getDataLength() == otherIcon.getDataLength()
@@ -551,6 +562,20 @@
     }
 
     /**
+     * Create an Icon pointing to a bitmap in memory that follows the icon design guideline defined
+     * by {@link MaskableIconDrawable}.
+     * @param bits A valid {@link android.graphics.Bitmap} object
+     */
+    public static Icon createWithMaskableBitmap(Bitmap bits) {
+        if (bits == null) {
+            throw new IllegalArgumentException("Bitmap must not be null.");
+        }
+        final Icon rep = new Icon(TYPE_BITMAP_MASKABLE);
+        rep.setBitmap(bits);
+        return rep;
+    }
+
+    /**
      * Create an Icon pointing to a compressed bitmap stored in a byte array.
      * @param data Byte array storing compressed bitmap data of a type that
      *             {@link android.graphics.BitmapFactory}
@@ -654,6 +679,7 @@
         final StringBuilder sb = new StringBuilder("Icon(typ=").append(typeToString(mType));
         switch (mType) {
             case TYPE_BITMAP:
+            case TYPE_BITMAP_MASKABLE:
                 sb.append(" size=")
                         .append(getBitmap().getWidth())
                         .append("x")
@@ -692,7 +718,7 @@
      * Parcelable interface
      */
     public int describeContents() {
-        return (mType == TYPE_BITMAP || mType == TYPE_DATA)
+        return (mType == TYPE_BITMAP || mType == TYPE_BITMAP_MASKABLE || mType == TYPE_DATA)
                 ? Parcelable.CONTENTS_FILE_DESCRIPTOR : 0;
     }
 
@@ -702,6 +728,7 @@
         this(in.readInt());
         switch (mType) {
             case TYPE_BITMAP:
+            case TYPE_BITMAP_MASKABLE:
                 final Bitmap bits = Bitmap.CREATOR.createFromParcel(in);
                 mObj1 = bits;
                 break;
@@ -740,6 +767,7 @@
         dest.writeInt(mType);
         switch (mType) {
             case TYPE_BITMAP:
+            case TYPE_BITMAP_MASKABLE:
                 final Bitmap bits = getBitmap();
                 getBitmap().writeToParcel(dest, flags);
                 break;
diff --git a/graphics/java/android/graphics/drawable/MaskableIconDrawable.java b/graphics/java/android/graphics/drawable/MaskableIconDrawable.java
index 3467b1a..472b229 100644
--- a/graphics/java/android/graphics/drawable/MaskableIconDrawable.java
+++ b/graphics/java/android/graphics/drawable/MaskableIconDrawable.java
@@ -20,6 +20,7 @@
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
+import android.annotation.TestApi;
 import android.content.pm.ActivityInfo.Config;
 import android.content.res.ColorStateList;
 import android.content.res.Resources;
@@ -62,17 +63,22 @@
 
     /**
      * Mask path is defined inside device configuration in following dimension: [100 x 100]
+     * @hide
      */
     public static final float MASK_SIZE = 100f;
+    private static final float SAFEZONE_SCALE = .9f;
 
     /**
-     * The view port of the layers is smaller than their intrinsic width and height by this factor.
-     *
-     * It is part of the API contract that all four sides of the layers are padded so as to provide
+     * All four sides of the layers are padded with extra inset so as to provide
      * extra content to reveal within the clip path when performing affine transformations on the
      * layers.
+     *
+     * Each layers will reserve 25% of it's width and height.
+     *
+     * As a result, the view port of the layers is smaller than their intrinsic width and height.
      */
-    public static final float DEFAULT_VIEW_PORT_SCALE = 2f / 3f;
+    private static final float EXTRA_INSET_PERCENTAGE = 1 / 4f;
+    private static final float DEFAULT_VIEW_PORT_SCALE = 1f / (1 + 2 * EXTRA_INSET_PERCENTAGE);
 
     /**
      * Clip path defined in {@link com.android.internal.R.string.config_icon_mask}.
@@ -155,12 +161,17 @@
      *
      * @param backgroundDrawable drawable that should be rendered in the background
      * @param foregroundDrawable drawable that should be rendered in the foreground
+     * @hide
      */
     public MaskableIconDrawable(Drawable backgroundDrawable,
             Drawable foregroundDrawable) {
         this((LayerState)null, null);
-        addLayer(BACKGROUND_ID, createChildDrawable(backgroundDrawable));
-        addLayer(FOREGROUND_ID, createChildDrawable(foregroundDrawable));
+        if (backgroundDrawable != null) {
+            addLayer(BACKGROUND_ID, createChildDrawable(backgroundDrawable));
+        }
+        if (foregroundDrawable != null) {
+            addLayer(FOREGROUND_ID, createChildDrawable(foregroundDrawable));
+        }
     }
 
     /**
@@ -199,6 +210,15 @@
     }
 
     /**
+     * All four sides of the layers are padded with extra inset so as to provide
+     * extra content to reveal within the clip path when performing affine transformations on the
+     * layers.
+     */
+    public static float getExtraInsetPercentage() {
+        return EXTRA_INSET_PERCENTAGE;
+    }
+
+    /**
      * @return the mask path object used to clip the drawable
      */
     public Path getIconMask() {
@@ -242,13 +262,20 @@
         int cY = bounds.centerY();
 
         for (int i = 0, count = mLayerState.N_CHILDREN; i < count; i++) {
+            final ChildDrawable r = mLayerState.mChildren[i];
+            if (r == null) {
+                continue;
+            }
+            final Drawable d = r.mDrawable;
+            if (d == null) {
+                continue;
+            }
+
             int insetWidth = (int) (bounds.width() / (DEFAULT_VIEW_PORT_SCALE * 2));
             int insetHeight = (int) (bounds.height() / (DEFAULT_VIEW_PORT_SCALE * 2));
             final Rect outRect = mTmpOutRect;
             outRect.set(cX - insetWidth, cY - insetHeight, cX + insetWidth, cY + insetHeight);
 
-            final ChildDrawable r = mLayerState.mChildren[i];
-            final Drawable d = r.mDrawable;
             d.setBounds(outRect);
         }
     }
@@ -273,6 +300,9 @@
         if (mLayersShader == null) {
             mCanvas.setBitmap(mLayersBitmap);
             for (int i = 0; i < mLayerState.N_CHILDREN; i++) {
+                if (mLayerState.mChildren[i] == null) {
+                    continue;
+                }
                 final Drawable dr = mLayerState.mChildren[i].mDrawable;
                 if (dr != null) {
                     dr.draw(mCanvas);
@@ -295,6 +325,18 @@
         outline.setConvexPath(mMask);
     }
 
+    /** @hide */
+    @TestApi
+    public Region getSafeZone() {
+        mMaskMatrix.reset();
+        mMaskMatrix.setScale(SAFEZONE_SCALE, SAFEZONE_SCALE, getBounds().centerX(), getBounds().centerY());
+        Path p = new Path();
+        mMask.transform(mMaskMatrix, p);
+        Region safezoneRegion = new Region(getBounds());
+        safezoneRegion.setPath(p, safezoneRegion);
+        return safezoneRegion;
+    }
+
     @Override
     public @Nullable Region getTransparentRegion() {
         if (mTransparentRegion.isEmpty()) {
@@ -385,7 +427,7 @@
                 }
                 if (type != XmlPullParser.START_TAG) {
                     throw new XmlPullParserException(parser.getPositionDescription()
-                            + ": <foreground> or <background> tag requires a 'color' or 'drawable'"
+                            + ": <foreground> or <background> tag requires a 'drawable'"
                             + "attribute or child tag defining a drawable");
                 }
 
@@ -409,12 +451,6 @@
         layer.mThemeAttrs = a.extractThemeAttrs();
 
         Drawable dr = a.getDrawable(R.styleable.MaskableIconDrawableLayer_drawable);
-        if (dr == null) {
-             int color = a.getColor(R.styleable.MaskableIconDrawableLayer_color, Color.TRANSPARENT);
-             if (color != Color.TRANSPARENT) {
-                 dr = new ColorDrawable(color);
-             }
-        }
         if (dr != null) {
             if (layer.mDrawable != null) {
                 // It's possible that a drawable was already set, in which case
@@ -726,6 +762,9 @@
         int width = -1;
         for (int i = 0; i < mLayerState.N_CHILDREN; i++) {
             final ChildDrawable r = mLayerState.mChildren[i];
+            if (r.mDrawable == null) {
+                continue;
+            }
             final int w = r.mDrawable.getIntrinsicWidth();
             if (w > width) {
                 width = w;
@@ -743,6 +782,9 @@
         int height = -1;
         for (int i = 0; i < mLayerState.N_CHILDREN; i++) {
             final ChildDrawable r = mLayerState.mChildren[i];
+            if (r.mDrawable == null) {
+                continue;
+            }
             final int h = r.mDrawable.getIntrinsicHeight();
             if (h > height) {
                 height = h;
diff --git a/graphics/tests/graphicstests/src/android/graphics/drawable/IconTest.java b/graphics/tests/graphicstests/src/android/graphics/drawable/IconTest.java
index a214b9e..50c498b 100644
--- a/graphics/tests/graphicstests/src/android/graphics/drawable/IconTest.java
+++ b/graphics/tests/graphicstests/src/android/graphics/drawable/IconTest.java
@@ -18,6 +18,7 @@
 
 import android.graphics.Bitmap;
 import android.graphics.Canvas;
+import android.graphics.Region;
 import android.os.Handler;
 import android.os.HandlerThread;
 import android.os.Parcel;
@@ -108,6 +109,40 @@
     }
 
     @SmallTest
+    public void testWithMaskableBitmap() throws Exception {
+        final Bitmap bm1 = Bitmap.createBitmap(150, 150, Bitmap.Config.ARGB_8888);
+
+        final Canvas can1 = new Canvas(bm1);
+        can1.drawColor(0xFFFF0000);
+
+        final Icon im1 = Icon.createWithMaskableBitmap(bm1);
+
+        final MaskableIconDrawable draw1 = (MaskableIconDrawable) im1.loadDrawable(mContext);
+
+        final Bitmap test1 = Bitmap.createBitmap(
+            (int)(draw1.getIntrinsicWidth() * (1 + 2 * MaskableIconDrawable.getExtraInsetPercentage())),
+            (int)(draw1.getIntrinsicHeight() * (1 + 2 * MaskableIconDrawable.getExtraInsetPercentage())),
+            Bitmap.Config.ARGB_8888);
+
+        draw1.setBounds(0, 0,
+            (int) (draw1.getIntrinsicWidth() * (1 + 2 * MaskableIconDrawable.getExtraInsetPercentage())),
+            (int) (draw1.getIntrinsicHeight() * (1 + 2 * MaskableIconDrawable.getExtraInsetPercentage())));
+        draw1.draw(new Canvas(test1));
+
+        final File dir = getContext().getExternalFilesDir(null);
+        L("writing temp bitmaps to %s...", dir);
+
+        bm1.compress(Bitmap.CompressFormat.PNG, 100,
+            new FileOutputStream(new File(dir, "maskable-bitmap1-original.png")));
+        test1.compress(Bitmap.CompressFormat.PNG, 100,
+            new FileOutputStream(new File(dir, "maskable-bitmap1-test.png")));
+        if (!equalBitmaps(bm1, test1, draw1.getSafeZone())) {
+            findBitmapDifferences(bm1, test1);
+            fail("maskable bitmap1 differs, check " + dir);
+        }
+    }
+
+    @SmallTest
     public void testWithBitmapResource() throws Exception {
         final Bitmap res1 = ((BitmapDrawable) getContext().getDrawable(R.drawable.landscape))
                 .getBitmap();
@@ -294,17 +329,31 @@
         printBits(aPix, w, h);
     }
     boolean equalBitmaps(Bitmap a, Bitmap b) {
+        return equalBitmaps(a, b, null);
+    }
+
+    boolean equalBitmaps(Bitmap a, Bitmap b, Region region) {
         if (a.getWidth() != b.getWidth() || a.getHeight() != b.getHeight()) return false;
-        
+
         final int w = a.getWidth();
         final int h = a.getHeight();
         int[] aPix = new int[w * h];
         int[] bPix = new int[w * h];
 
-        a.getPixels(aPix, 0, w, 0, 0, w, h);
-        b.getPixels(bPix, 0, w, 0, 0, w, h);
-
-        return Arrays.equals(aPix, bPix);
+        if (region != null) {
+            for (int i = 0; i < w; i++) {
+                for (int j = 0; j < h; j++) {
+                    if (region.contains(i, j) && a.getPixel(i, j) != b.getPixel(i, j)) {
+                        return false;
+                    }
+                }
+            }
+            return true;
+        } else {
+            a.getPixels(aPix, 0, w, 0, 0, w, h);
+            b.getPixels(bPix, 0, w, 0, 0, w, h);
+            return Arrays.equals(aPix, bPix);
+        }
     }
 
     void findBitmapDifferences(Bitmap a, Bitmap b) {
diff --git a/keystore/java/android/security/GateKeeper.java b/keystore/java/android/security/GateKeeper.java
index 7a2cbd0..03df5de 100644
--- a/keystore/java/android/security/GateKeeper.java
+++ b/keystore/java/android/security/GateKeeper.java
@@ -29,6 +29,8 @@
  */
 public abstract class GateKeeper {
 
+    public static final long INVALID_SECURE_USER_ID = 0;
+
     private GateKeeper() {}
 
     public static IGateKeeperService getService() {
diff --git a/keystore/java/android/security/KeyChain.java b/keystore/java/android/security/KeyChain.java
index e566b9d..9981668 100644
--- a/keystore/java/android/security/KeyChain.java
+++ b/keystore/java/android/security/KeyChain.java
@@ -588,7 +588,7 @@
      * @hide for reuse by CertInstaller and Settings.
      * @see KeyChain#bind
      */
-    public final static class KeyChainConnection implements Closeable {
+    public static class KeyChainConnection implements Closeable {
         private final Context context;
         private final ServiceConnection serviceConnection;
         private final IKeyChainService service;
diff --git a/keystore/java/android/security/keystore/AndroidKeyStoreKeyGeneratorSpi.java b/keystore/java/android/security/keystore/AndroidKeyStoreKeyGeneratorSpi.java
index b234d0f..988e32c 100644
--- a/keystore/java/android/security/keystore/AndroidKeyStoreKeyGeneratorSpi.java
+++ b/keystore/java/android/security/keystore/AndroidKeyStoreKeyGeneratorSpi.java
@@ -17,6 +17,7 @@
 package android.security.keystore;
 
 import android.security.Credentials;
+import android.security.GateKeeper;
 import android.security.KeyStore;
 import android.security.keymaster.KeyCharacteristics;
 import android.security.keymaster.KeymasterArguments;
@@ -199,6 +200,11 @@
                 }
 
                 if (mKeymasterAlgorithm == KeymasterDefs.KM_ALGORITHM_HMAC) {
+                    if (mKeySizeBits < 64) {
+                        throw new InvalidAlgorithmParameterException(
+                            "HMAC key size must be at least 64 bits.");
+                    }
+
                     // JCA HMAC key algorithm implies a digest (e.g., HmacSHA256 key algorithm
                     // implies SHA-256 digest). Because keymaster HMAC key is authorized only for
                     // one digest, we don't let algorithm parameter spec override the digest implied
@@ -235,7 +241,8 @@
                         spec.isUserAuthenticationRequired(),
                         spec.getUserAuthenticationValidityDurationSeconds(),
                         spec.isUserAuthenticationValidWhileOnBody(),
-                        spec.isInvalidatedByBiometricEnrollment());
+                        spec.isInvalidatedByBiometricEnrollment(),
+                        GateKeeper.INVALID_SECURE_USER_ID /* boundToSpecificSecureUserId */);
             } catch (IllegalStateException | IllegalArgumentException e) {
                 throw new InvalidAlgorithmParameterException(e);
             }
@@ -275,7 +282,8 @@
                 spec.isUserAuthenticationRequired(),
                 spec.getUserAuthenticationValidityDurationSeconds(),
                 spec.isUserAuthenticationValidWhileOnBody(),
-                spec.isInvalidatedByBiometricEnrollment());
+                spec.isInvalidatedByBiometricEnrollment(),
+                GateKeeper.INVALID_SECURE_USER_ID /* boundToSpecificSecureUserId */);
         KeymasterUtils.addMinMacLengthAuthorizationIfNecessary(
                 args,
                 mKeymasterAlgorithm,
diff --git a/keystore/java/android/security/keystore/AndroidKeyStoreKeyPairGeneratorSpi.java b/keystore/java/android/security/keystore/AndroidKeyStoreKeyPairGeneratorSpi.java
index 1818f52..dba3949 100644
--- a/keystore/java/android/security/keystore/AndroidKeyStoreKeyPairGeneratorSpi.java
+++ b/keystore/java/android/security/keystore/AndroidKeyStoreKeyPairGeneratorSpi.java
@@ -18,6 +18,7 @@
 
 import android.annotation.Nullable;
 import android.security.Credentials;
+import android.security.GateKeeper;
 import android.security.KeyPairGeneratorSpec;
 import android.security.KeyStore;
 import android.security.keymaster.KeyCharacteristics;
@@ -346,7 +347,8 @@
                         mSpec.isUserAuthenticationRequired(),
                         mSpec.getUserAuthenticationValidityDurationSeconds(),
                         mSpec.isUserAuthenticationValidWhileOnBody(),
-                        mSpec.isInvalidatedByBiometricEnrollment());
+                        mSpec.isInvalidatedByBiometricEnrollment(),
+                        GateKeeper.INVALID_SECURE_USER_ID /* boundToSpecificSecureUserId */);
             } catch (IllegalArgumentException | IllegalStateException e) {
                 throw new InvalidAlgorithmParameterException(e);
             }
@@ -533,7 +535,8 @@
                 mSpec.isUserAuthenticationRequired(),
                 mSpec.getUserAuthenticationValidityDurationSeconds(),
                 mSpec.isUserAuthenticationValidWhileOnBody(),
-                mSpec.isInvalidatedByBiometricEnrollment());
+                mSpec.isInvalidatedByBiometricEnrollment(),
+                GateKeeper.INVALID_SECURE_USER_ID /* boundToSpecificSecureUserId */);
         args.addDateIfNotNull(KeymasterDefs.KM_TAG_ACTIVE_DATETIME, mSpec.getKeyValidityStart());
         args.addDateIfNotNull(KeymasterDefs.KM_TAG_ORIGINATION_EXPIRE_DATETIME,
                 mSpec.getKeyValidityForOriginationEnd());
diff --git a/keystore/java/android/security/keystore/AndroidKeyStoreSpi.java b/keystore/java/android/security/keystore/AndroidKeyStoreSpi.java
index fcbb553..64b10ab 100644
--- a/keystore/java/android/security/keystore/AndroidKeyStoreSpi.java
+++ b/keystore/java/android/security/keystore/AndroidKeyStoreSpi.java
@@ -500,7 +500,8 @@
                         spec.isUserAuthenticationRequired(),
                         spec.getUserAuthenticationValidityDurationSeconds(),
                         spec.isUserAuthenticationValidWhileOnBody(),
-                        spec.isInvalidatedByBiometricEnrollment());
+                        spec.isInvalidatedByBiometricEnrollment(),
+                        spec.getBoundToSpecificSecureUserId());
                 importArgs.addDateIfNotNull(KeymasterDefs.KM_TAG_ACTIVE_DATETIME,
                         spec.getKeyValidityStart());
                 importArgs.addDateIfNotNull(KeymasterDefs.KM_TAG_ORIGINATION_EXPIRE_DATETIME,
@@ -696,7 +697,8 @@
                     params.isUserAuthenticationRequired(),
                     params.getUserAuthenticationValidityDurationSeconds(),
                     params.isUserAuthenticationValidWhileOnBody(),
-                    params.isInvalidatedByBiometricEnrollment());
+                    params.isInvalidatedByBiometricEnrollment(),
+                    params.getBoundToSpecificSecureUserId());
             KeymasterUtils.addMinMacLengthAuthorizationIfNecessary(
                     args,
                     keymasterAlgorithm,
diff --git a/keystore/java/android/security/keystore/KeyProtection.java b/keystore/java/android/security/keystore/KeyProtection.java
index e70d33a..2592a97 100644
--- a/keystore/java/android/security/keystore/KeyProtection.java
+++ b/keystore/java/android/security/keystore/KeyProtection.java
@@ -21,6 +21,7 @@
 import android.annotation.Nullable;
 import android.app.KeyguardManager;
 import android.hardware.fingerprint.FingerprintManager;
+import android.security.GateKeeper;
 
 import java.security.Key;
 import java.security.Signature;
@@ -225,6 +226,7 @@
     private final int mUserAuthenticationValidityDurationSeconds;
     private final boolean mUserAuthenticationValidWhileOnBody;
     private final boolean mInvalidatedByBiometricEnrollment;
+    private final long mBoundToSecureUserId;
 
     private KeyProtection(
             Date keyValidityStart,
@@ -239,7 +241,8 @@
             boolean userAuthenticationRequired,
             int userAuthenticationValidityDurationSeconds,
             boolean userAuthenticationValidWhileOnBody,
-            boolean invalidatedByBiometricEnrollment) {
+            boolean invalidatedByBiometricEnrollment,
+            long boundToSecureUserId) {
         mKeyValidityStart = Utils.cloneIfNotNull(keyValidityStart);
         mKeyValidityForOriginationEnd = Utils.cloneIfNotNull(keyValidityForOriginationEnd);
         mKeyValidityForConsumptionEnd = Utils.cloneIfNotNull(keyValidityForConsumptionEnd);
@@ -255,6 +258,7 @@
         mUserAuthenticationValidityDurationSeconds = userAuthenticationValidityDurationSeconds;
         mUserAuthenticationValidWhileOnBody = userAuthenticationValidWhileOnBody;
         mInvalidatedByBiometricEnrollment = invalidatedByBiometricEnrollment;
+        mBoundToSecureUserId = boundToSecureUserId;
     }
 
     /**
@@ -436,6 +440,24 @@
     }
 
     /**
+     * Return the secure user id that this key should be bound to.
+     *
+     * Normally an authentication-bound key is tied to the secure user id of the current user
+     * (either the root SID from GateKeeper for auth-bound keys with a timeout, or the authenticator
+     * id of the current fingerprint set for keys requiring explicit fingerprint authorization).
+     * If this parameter is set (this method returning non-zero value), the key should be tied to
+     * the specified secure user id, overriding the logic above.
+     *
+     * This is only applicable when {@link #isUserAuthenticationRequired} is {@code true}
+     *
+     * @see KeymasterUtils#addUserAuthArgs
+     * @hide
+     */
+    public long getBoundToSpecificSecureUserId() {
+        return mBoundToSecureUserId;
+    }
+
+    /**
      * Builder of {@link KeyProtection} instances.
      */
     public final static class Builder {
@@ -454,6 +476,7 @@
         private boolean mUserAuthenticationValidWhileOnBody;
         private boolean mInvalidatedByBiometricEnrollment = true;
 
+        private long mBoundToSecureUserId = GateKeeper.INVALID_SECURE_USER_ID;
         /**
          * Creates a new instance of the {@code Builder}.
          *
@@ -774,6 +797,26 @@
         }
 
         /**
+         * Set the secure user id that this key should be bound to.
+         *
+         * Normally an authentication-bound key is tied to the secure user id of the current user
+         * (either the root SID from GateKeeper for auth-bound keys with a timeout, or the
+         * authenticator id of the current fingerprint set for keys requiring explicit fingerprint
+         * authorization). If this parameter is set (this method returning non-zero value), the key
+         * should be tied to the specified secure user id, overriding the logic above.
+         *
+         * This is only applicable when {@link #setUserAuthenticationRequired} is set to
+         * {@code true}
+         *
+         * @see KeyProtection#getBoundToSpecificSecureUserId()
+         * @hide
+         */
+        public Builder setBoundToSpecificSecureUserId(long secureUserId) {
+            mBoundToSecureUserId = secureUserId;
+            return this;
+        }
+
+        /**
          * Builds an instance of {@link KeyProtection}.
          *
          * @throws IllegalArgumentException if a required field is missing
@@ -793,7 +836,8 @@
                     mUserAuthenticationRequired,
                     mUserAuthenticationValidityDurationSeconds,
                     mUserAuthenticationValidWhileOnBody,
-                    mInvalidatedByBiometricEnrollment);
+                    mInvalidatedByBiometricEnrollment,
+                    mBoundToSecureUserId);
         }
     }
 }
diff --git a/keystore/java/android/security/keystore/KeymasterUtils.java b/keystore/java/android/security/keystore/KeymasterUtils.java
index f5272aa..34c8d1f 100644
--- a/keystore/java/android/security/keystore/KeymasterUtils.java
+++ b/keystore/java/android/security/keystore/KeymasterUtils.java
@@ -89,7 +89,10 @@
      * @param userAuthenticationValidityDurationSeconds duration of time (seconds) for which user
      *        authentication is valid as authorization for using the key or {@code -1} if every
      *        use of the key needs authorization.
-     *
+     * @param boundToSpecificSecureUserId if non-zero, specify which SID the key will be bound to,
+     *        overriding the default logic in this method where the key is bound to either the root
+     *        SID of the current user, or the fingerprint SID if explicit fingerprint authorization
+     *        is requested.
      * @throws IllegalStateException if user authentication is required but the system is in a wrong
      *         state (e.g., secure lock screen not set up) for generating or importing keys that
      *         require user authentication.
@@ -98,7 +101,8 @@
             boolean userAuthenticationRequired,
             int userAuthenticationValidityDurationSeconds,
             boolean userAuthenticationValidWhileOnBody,
-            boolean invalidatedByBiometricEnrollment) {
+            boolean invalidatedByBiometricEnrollment,
+            long boundToSpecificSecureUserId) {
         if (!userAuthenticationRequired) {
             args.addBoolean(KeymasterDefs.KM_TAG_NO_AUTH_REQUIRED);
             return;
@@ -120,7 +124,9 @@
             }
 
             long sid;
-            if (invalidatedByBiometricEnrollment) {
+            if (boundToSpecificSecureUserId != GateKeeper.INVALID_SECURE_USER_ID) {
+                sid = boundToSpecificSecureUserId;
+            } else if (invalidatedByBiometricEnrollment) {
                 // The fingerprint-only SID will change on fingerprint enrollment or removal of all,
                 // enrolled fingerprints, invalidating the key.
                 sid = fingerprintOnlySid;
@@ -138,11 +144,16 @@
                         + "supported for keys requiring fingerprint authentication");
             }
         } else {
-            // The key is authorized for use for the specified amount of time after the user has
-            // authenticated. Whatever unlocks the secure lock screen should authorize this key.
-            long rootSid = getRootSid();
+            long sid;
+            if (boundToSpecificSecureUserId != GateKeeper.INVALID_SECURE_USER_ID) {
+                sid = boundToSpecificSecureUserId;
+            } else {
+                // The key is authorized for use for the specified amount of time after the user has
+                // authenticated. Whatever unlocks the secure lock screen should authorize this key.
+                sid = getRootSid();
+            }
             args.addUnsignedLong(KeymasterDefs.KM_TAG_USER_SECURE_ID,
-                    KeymasterArguments.toUint64(rootSid));
+                    KeymasterArguments.toUint64(sid));
             args.addEnum(KeymasterDefs.KM_TAG_USER_AUTH_TYPE,
                     KeymasterDefs.HW_AUTH_PASSWORD | KeymasterDefs.HW_AUTH_FINGERPRINT);
             args.addUnsignedInt(KeymasterDefs.KM_TAG_AUTH_TIMEOUT,
diff --git a/libs/androidfw/Android.bp b/libs/androidfw/Android.bp
index ecf6bd4..e764034 100644
--- a/libs/androidfw/Android.bp
+++ b/libs/androidfw/Android.bp
@@ -36,6 +36,7 @@
         "misc.cpp",
         "ObbFile.cpp",
         "ResourceTypes.cpp",
+        "ResourceUtils.cpp",
         "StreamingZipInflater.cpp",
         "TypeWrappers.cpp",
         "Util.cpp",
diff --git a/libs/androidfw/ApkAssets.cpp b/libs/androidfw/ApkAssets.cpp
index 9a08f63..fe68ec0 100644
--- a/libs/androidfw/ApkAssets.cpp
+++ b/libs/androidfw/ApkAssets.cpp
@@ -27,16 +27,17 @@
 
 namespace android {
 
-std::unique_ptr<ApkAssets> ApkAssets::Load(const std::string& path) {
-  return ApkAssets::LoadImpl(path, false /*load_as_shared_library*/);
+std::unique_ptr<const ApkAssets> ApkAssets::Load(const std::string& path, bool system) {
+  return ApkAssets::LoadImpl(path, system, false /*load_as_shared_library*/);
 }
 
-std::unique_ptr<ApkAssets> ApkAssets::LoadAsSharedLibrary(const std::string& path) {
-  return ApkAssets::LoadImpl(path, true /*load_as_shared_library*/);
+std::unique_ptr<const ApkAssets> ApkAssets::LoadAsSharedLibrary(const std::string& path,
+                                                                bool system) {
+  return ApkAssets::LoadImpl(path, system, true /*load_as_shared_library*/);
 }
 
-std::unique_ptr<ApkAssets> ApkAssets::LoadImpl(const std::string& path,
-                                               bool load_as_shared_library) {
+std::unique_ptr<const ApkAssets> ApkAssets::LoadImpl(const std::string& path, bool system,
+                                                     bool load_as_shared_library) {
   ATRACE_CALL();
   ::ZipArchiveHandle unmanaged_handle;
   int32_t result = ::OpenArchive(path.c_str(), &unmanaged_handle);
@@ -70,11 +71,13 @@
   loaded_apk->path_ = path;
   loaded_apk->loaded_arsc_ =
       LoadedArsc::Load(loaded_apk->resources_asset_->getBuffer(true /*wordAligned*/),
-                       loaded_apk->resources_asset_->getLength(), load_as_shared_library);
+                       loaded_apk->resources_asset_->getLength(), system, load_as_shared_library);
   if (loaded_apk->loaded_arsc_ == nullptr) {
     return {};
   }
-  return loaded_apk;
+
+  // Need to force a move for mingw32.
+  return std::move(loaded_apk);
 }
 
 std::unique_ptr<Asset> ApkAssets::Open(const std::string& path, Asset::AccessMode /*mode*/) const {
diff --git a/libs/androidfw/AssetManager2.cpp b/libs/androidfw/AssetManager2.cpp
index d2eff65..ef0c967 100644
--- a/libs/androidfw/AssetManager2.cpp
+++ b/libs/androidfw/AssetManager2.cpp
@@ -18,6 +18,8 @@
 
 #include "androidfw/AssetManager2.h"
 
+#include <set>
+
 #include "android-base/logging.h"
 #include "android-base/stringprintf.h"
 #include "utils/ByteOrder.h"
@@ -29,6 +31,8 @@
 #endif
 #endif
 
+#include "androidfw/ResourceUtils.h"
+
 namespace android {
 
 AssetManager2::AssetManager2() { memset(&configuration_, 0, sizeof(configuration_)); }
@@ -143,6 +147,36 @@
   }
 }
 
+std::set<ResTable_config> AssetManager2::GetResourceConfigurations(bool exclude_system,
+                                                                   bool exclude_mipmap) {
+  ATRACE_CALL();
+  std::set<ResTable_config> configurations;
+  for (const PackageGroup& package_group : package_groups_) {
+    for (const LoadedPackage* package : package_group.packages_) {
+      if (exclude_system && package->IsSystem()) {
+        continue;
+      }
+      package->CollectConfigurations(exclude_mipmap, &configurations);
+    }
+  }
+  return configurations;
+}
+
+std::set<std::string> AssetManager2::GetResourceLocales(bool exclude_system,
+                                                        bool merge_equivalent_languages) {
+  ATRACE_CALL();
+  std::set<std::string> locales;
+  for (const PackageGroup& package_group : package_groups_) {
+    for (const LoadedPackage* package : package_group.packages_) {
+      if (exclude_system && package->IsSystem()) {
+        continue;
+      }
+      package->CollectLocales(merge_equivalent_languages, &locales);
+    }
+  }
+  return locales;
+}
+
 std::unique_ptr<Asset> AssetManager2::Open(const std::string& filename, Asset::AccessMode mode) {
   const std::string new_path = "assets/" + filename;
   return OpenNonAsset(new_path, mode);
@@ -203,9 +237,9 @@
     desired_config = &density_override_config;
   }
 
-  const uint32_t package_id = util::get_package_id(resid);
-  const uint8_t type_id = util::get_type_id(resid);
-  const uint16_t entry_id = util::get_entry_id(resid);
+  const uint32_t package_id = get_package_id(resid);
+  const uint8_t type_id = get_type_id(resid);
+  const uint16_t entry_id = get_entry_id(resid);
 
   if (type_id == 0) {
     LOG(ERROR) << base::StringPrintf("Invalid ID 0x%08x.", resid);
@@ -325,8 +359,15 @@
   if (dtohl(entry.entry->flags) & ResTable_entry::FLAG_COMPLEX) {
     if (!may_be_bag) {
       LOG(ERROR) << base::StringPrintf("Resource %08x is a complex map type.", resid);
+      return kInvalidCookie;
     }
-    return kInvalidCookie;
+
+    // Create a reference since we can't represent this complex type as a Res_value.
+    out_value->dataType = Res_value::TYPE_REFERENCE;
+    out_value->data = resid;
+    *out_selected_config = config;
+    *out_flags = flags;
+    return cookie;
   }
 
   const Res_value* device_value = reinterpret_cast<const Res_value*>(
@@ -341,6 +382,37 @@
   return cookie;
 }
 
+ApkAssetsCookie AssetManager2::ResolveReference(ApkAssetsCookie cookie, Res_value* in_out_value,
+                                                ResTable_config* in_out_selected_config,
+                                                uint32_t* in_out_flags,
+                                                ResTable_ref* out_last_reference) {
+  ATRACE_CALL();
+  constexpr const int kMaxIterations = 20;
+
+  out_last_reference->ident = 0u;
+  for (size_t iteration = 0u; in_out_value->dataType == Res_value::TYPE_REFERENCE &&
+                              in_out_value->data != 0u && iteration < kMaxIterations;
+       iteration++) {
+    if (out_last_reference != nullptr) {
+      out_last_reference->ident = in_out_value->data;
+    }
+    uint32_t new_flags = 0u;
+    cookie = GetResource(in_out_value->data, true /*may_be_bag*/, 0u /*density_override*/,
+                         in_out_value, in_out_selected_config, &new_flags);
+    if (cookie == kInvalidCookie) {
+      return kInvalidCookie;
+    }
+    if (in_out_flags != nullptr) {
+      *in_out_flags |= new_flags;
+    }
+    if (out_last_reference->ident == in_out_value->data) {
+      // This reference can't be resolved, so exit now and let the caller deal with it.
+      return cookie;
+    }
+  }
+  return cookie;
+}
+
 const ResolvedBag* AssetManager2::GetBag(uint32_t resid) {
   ATRACE_CALL();
 
@@ -382,7 +454,7 @@
     ResolvedBag::Entry* new_entry = new_bag->entries;
     for (; map_entry != map_entry_end; ++map_entry) {
       uint32_t new_key = dtohl(map_entry->name.ident);
-      if (!util::is_internal_resid(new_key)) {
+      if (!is_internal_resid(new_key)) {
         // Attributes, arrays, etc don't have a resource id as the name. They specify
         // other data, which would be wrong to change via a lookup.
         if (entry.dynamic_ref_table->lookupResourceId(&new_key) != NO_ERROR) {
@@ -431,7 +503,7 @@
   // The keys are expected to be in sorted order. Merge the two bags.
   while (map_entry != map_entry_end && parent_entry != parent_entry_end) {
     uint32_t child_key = dtohl(map_entry->name.ident);
-    if (!util::is_internal_resid(child_key)) {
+    if (!is_internal_resid(child_key)) {
       if (entry.dynamic_ref_table->lookupResourceId(&child_key) != NO_ERROR) {
         LOG(ERROR) << base::StringPrintf("Failed to resolve key 0x%08x in bag 0x%08x.", child_key, resid);
         return nullptr;
@@ -463,7 +535,7 @@
   // Finish the child entries if they exist.
   while (map_entry != map_entry_end) {
     uint32_t new_key = dtohl(map_entry->name.ident);
-    if (!util::is_internal_resid(new_key)) {
+    if (!is_internal_resid(new_key)) {
       if (entry.dynamic_ref_table->lookupResourceId(&new_key) != NO_ERROR) {
         LOG(ERROR) << base::StringPrintf("Failed to resolve key 0x%08x in bag 0x%08x.", new_key, resid);
         return nullptr;
@@ -501,6 +573,74 @@
   return result;
 }
 
+static bool Utf8ToUtf16(const StringPiece& str, std::u16string* out) {
+  ssize_t len =
+      utf8_to_utf16_length(reinterpret_cast<const uint8_t*>(str.data()), str.size(), false);
+  if (len < 0) {
+    return false;
+  }
+  out->resize(static_cast<size_t>(len));
+  utf8_to_utf16(reinterpret_cast<const uint8_t*>(str.data()), str.size(), &*out->begin(),
+                static_cast<size_t>(len + 1));
+  return true;
+}
+
+uint32_t AssetManager2::GetResourceId(const std::string& resource_name,
+                                      const std::string& fallback_type,
+                                      const std::string& fallback_package) {
+  StringPiece package_name, type, entry;
+  if (!ExtractResourceName(resource_name, &package_name, &type, &entry)) {
+    return 0u;
+  }
+
+  if (entry.empty()) {
+    return 0u;
+  }
+
+  if (package_name.empty()) {
+    package_name = fallback_package;
+  }
+
+  if (type.empty()) {
+    type = fallback_type;
+  }
+
+  std::u16string type16;
+  if (!Utf8ToUtf16(type, &type16)) {
+    return 0u;
+  }
+
+  std::u16string entry16;
+  if (!Utf8ToUtf16(entry, &entry16)) {
+    return 0u;
+  }
+
+  const StringPiece16 kAttr16 = u"attr";
+  const static std::u16string kAttrPrivate16 = u"^attr-private";
+
+  for (const PackageGroup& package_group : package_groups_) {
+    for (const LoadedPackage* package : package_group.packages_) {
+      if (package_name != package->GetPackageName()) {
+        // All packages in the same group are expected to have the same package name.
+        break;
+      }
+
+      uint32_t resid = package->FindEntryByName(type16, entry16);
+      if (resid == 0u && kAttr16 == type16) {
+        // Private attributes in libraries (such as the framework) are sometimes encoded
+        // under the type '^attr-private' in order to leave the ID space of public 'attr'
+        // free for future additions. Check '^attr-private' for the same name.
+        resid = package->FindEntryByName(kAttrPrivate16, entry16);
+      }
+
+      if (resid != 0u) {
+        return fix_package_id(resid, package_group.dynamic_ref_table.mAssignedPackageId);
+      }
+    }
+  }
+  return 0u;
+}
+
 void AssetManager2::InvalidateCaches(uint32_t diff) {
   if (diff == 0xffffffffu) {
     // Everything must go.
@@ -540,15 +680,15 @@
 
     // If the resource ID passed in is not a style, the key can be
     // some other identifier that is not a resource ID.
-    if (!util::is_valid_resid(attr_resid)) {
+    if (!is_valid_resid(attr_resid)) {
       return false;
     }
 
-    const uint32_t package_idx = util::get_package_id(attr_resid);
+    const uint32_t package_idx = get_package_id(attr_resid);
 
     // The type ID is 1-based, so subtract 1 to get an index.
-    const uint32_t type_idx = util::get_type_id(attr_resid) - 1;
-    const uint32_t entry_idx = util::get_entry_id(attr_resid);
+    const uint32_t type_idx = get_type_id(attr_resid) - 1;
+    const uint32_t entry_idx = get_entry_id(attr_resid);
 
     std::unique_ptr<Package>& package = packages_[package_idx];
     if (package == nullptr) {
@@ -577,9 +717,9 @@
   // and populate the structures.
   for (auto bag_iter = begin(bag); bag_iter != bag_iter_end; ++bag_iter) {
     const uint32_t attr_resid = bag_iter->key;
-    const uint32_t package_idx = util::get_package_id(attr_resid);
-    const uint32_t type_idx = util::get_type_id(attr_resid) - 1;
-    const uint32_t entry_idx = util::get_entry_id(attr_resid);
+    const uint32_t package_idx = get_package_id(attr_resid);
+    const uint32_t type_idx = get_type_id(attr_resid) - 1;
+    const uint32_t entry_idx = get_entry_id(attr_resid);
     Package* package = packages_[package_idx].get();
     util::unique_cptr<Type>& type = package->types[type_idx];
     if (type->entry_count != type->entry_capacity) {
@@ -612,15 +752,15 @@
   uint32_t type_spec_flags = 0u;
 
   for (int iterations_left = kMaxIterations; iterations_left > 0; iterations_left--) {
-    if (!util::is_valid_resid(resid)) {
+    if (!is_valid_resid(resid)) {
       return kInvalidCookie;
     }
 
-    const uint32_t package_idx = util::get_package_id(resid);
+    const uint32_t package_idx = get_package_id(resid);
 
     // Type ID is 1-based, subtract 1 to get the index.
-    const uint32_t type_idx = util::get_type_id(resid) - 1;
-    const uint32_t entry_idx = util::get_entry_id(resid);
+    const uint32_t type_idx = get_type_id(resid) - 1;
+    const uint32_t entry_idx = get_entry_id(resid);
 
     const Package* package = packages_[package_idx].get();
     if (package == nullptr) {
diff --git a/libs/androidfw/LoadedArsc.cpp b/libs/androidfw/LoadedArsc.cpp
index c7d0fa5..db72f48 100644
--- a/libs/androidfw/LoadedArsc.cpp
+++ b/libs/androidfw/LoadedArsc.cpp
@@ -34,6 +34,7 @@
 
 #include "androidfw/ByteBucketArray.h"
 #include "androidfw/Chunk.h"
+#include "androidfw/ResourceUtils.h"
 #include "androidfw/Util.h"
 
 using android::base::StringPrintf;
@@ -181,9 +182,9 @@
                            LoadedArscEntry* out_entry, ResTable_config* out_selected_config,
                            uint32_t* out_flags) const {
   ATRACE_CALL();
-  const uint8_t package_id = util::get_package_id(resid);
-  const uint8_t type_id = util::get_type_id(resid);
-  const uint16_t entry_id = util::get_entry_id(resid);
+  const uint8_t package_id = get_package_id(resid);
+  const uint8_t type_id = get_type_id(resid);
+  const uint16_t entry_id = get_entry_id(resid);
 
   if (type_id == 0) {
     LOG(ERROR) << "Invalid ID 0x" << std::hex << resid << std::dec << ".";
@@ -200,7 +201,7 @@
 }
 
 const LoadedPackage* LoadedArsc::GetPackageForId(uint32_t resid) const {
-  const uint8_t package_id = util::get_package_id(resid);
+  const uint8_t package_id = get_package_id(resid);
   for (const auto& loaded_package : packages_) {
     if (loaded_package->package_id_ == package_id) {
       return loaded_package.get();
@@ -321,6 +322,96 @@
   return true;
 }
 
+void LoadedPackage::CollectConfigurations(bool exclude_mipmap,
+                                          std::set<ResTable_config>* out_configs) const {
+  const static std::u16string kMipMap = u"mipmap";
+  const size_t type_count = type_specs_.size();
+  for (size_t i = 0; i < type_count; i++) {
+    const util::unique_cptr<TypeSpec>& type_spec = type_specs_[i];
+    if (type_spec != nullptr) {
+      if (exclude_mipmap) {
+        const int type_idx = type_spec->type_spec->id - 1;
+        size_t type_name_len;
+        const char16_t* type_name16 = type_string_pool_.stringAt(type_idx, &type_name_len);
+        if (type_name16 != nullptr) {
+          if (kMipMap.compare(0, std::u16string::npos, type_name16, type_name_len) == 0) {
+            // This is a mipmap type, skip collection.
+            continue;
+          }
+        }
+        const char* type_name = type_string_pool_.string8At(type_idx, &type_name_len);
+        if (type_name != nullptr) {
+          if (strncmp(type_name, "mipmap", type_name_len) == 0) {
+            // This is a mipmap type, skip collection.
+            continue;
+          }
+        }
+      }
+
+      for (size_t j = 0; j < type_spec->type_count; j++) {
+        out_configs->insert(type_spec->types[j].configuration);
+      }
+    }
+  }
+}
+
+void LoadedPackage::CollectLocales(bool canonicalize, std::set<std::string>* out_locales) const {
+  char temp_locale[RESTABLE_MAX_LOCALE_LEN];
+  const size_t type_count = type_specs_.size();
+  for (size_t i = 0; i < type_count; i++) {
+    const util::unique_cptr<TypeSpec>& type_spec = type_specs_[i];
+    if (type_spec != nullptr) {
+      for (size_t j = 0; j < type_spec->type_count; j++) {
+        const ResTable_config& configuration = type_spec->types[j].configuration;
+        if (configuration.locale != 0) {
+          configuration.getBcp47Locale(temp_locale, canonicalize);
+          std::string locale(temp_locale);
+          out_locales->insert(std::move(locale));
+        }
+      }
+    }
+  }
+}
+
+uint32_t LoadedPackage::FindEntryByName(const std::u16string& type_name,
+                                        const std::u16string& entry_name) const {
+  ssize_t type_idx = type_string_pool_.indexOfString(type_name.data(), type_name.size());
+  if (type_idx < 0) {
+    return 0u;
+  }
+
+  ssize_t key_idx = key_string_pool_.indexOfString(entry_name.data(), entry_name.size());
+  if (key_idx < 0) {
+    return 0u;
+  }
+
+  const TypeSpec* type_spec = type_specs_[type_idx].get();
+  if (type_spec == nullptr) {
+    return 0u;
+  }
+
+  for (size_t ti = 0; ti < type_spec->type_count; ti++) {
+    const Type* type = &type_spec->types[ti];
+    size_t entry_count = dtohl(type->type->entryCount);
+    for (size_t entry_idx = 0; entry_idx < entry_count; entry_idx++) {
+      const uint32_t* entry_offsets = reinterpret_cast<const uint32_t*>(
+          reinterpret_cast<const uint8_t*>(type->type) + dtohs(type->type->header.headerSize));
+      const uint32_t offset = dtohl(entry_offsets[entry_idx]);
+      if (offset != ResTable_type::NO_ENTRY) {
+        const ResTable_entry* entry =
+            reinterpret_cast<const ResTable_entry*>(reinterpret_cast<const uint8_t*>(type->type) +
+                                                    dtohl(type->type->entriesStart) + offset);
+        if (dtohl(entry->key.index) == static_cast<uint32_t>(key_idx)) {
+          // The package ID will be overridden by the caller (due to runtime assignment of package
+          // IDs for shared libraries).
+          return make_resid(0x00, type_idx + type_id_offset_ + 1, entry_idx);
+        }
+      }
+    }
+  }
+  return 0u;
+}
+
 std::unique_ptr<LoadedPackage> LoadedPackage::Load(const Chunk& chunk) {
   ATRACE_CALL();
   std::unique_ptr<LoadedPackage> loaded_package{new LoadedPackage()};
@@ -574,6 +665,7 @@
         if (loaded_package->package_id_ == kAppPackageId) {
           loaded_package->dynamic_ = load_as_shared_library;
         }
+        loaded_package->system_ = system_;
         packages_.push_back(std::move(loaded_package));
       } break;
 
@@ -590,12 +682,13 @@
   return true;
 }
 
-std::unique_ptr<LoadedArsc> LoadedArsc::Load(const void* data, size_t len,
-                                             bool load_as_shared_library) {
+std::unique_ptr<const LoadedArsc> LoadedArsc::Load(const void* data, size_t len, bool system,
+                                                   bool load_as_shared_library) {
   ATRACE_CALL();
 
   // Not using make_unique because the constructor is private.
   std::unique_ptr<LoadedArsc> loaded_arsc(new LoadedArsc());
+  loaded_arsc->system_ = system;
 
   ChunkIterator iter(data, len);
   while (iter.HasNext()) {
@@ -617,7 +710,9 @@
     LOG(ERROR) << iter.GetLastError();
     return {};
   }
-  return loaded_arsc;
+
+  // Need to force a move for mingw32.
+  return std::move(loaded_arsc);
 }
 
 }  // namespace android
diff --git a/libs/androidfw/ResourceUtils.cpp b/libs/androidfw/ResourceUtils.cpp
new file mode 100644
index 0000000..1aa6cf6
--- /dev/null
+++ b/libs/androidfw/ResourceUtils.cpp
@@ -0,0 +1,48 @@
+/*
+ * 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.
+ */
+
+#include "androidfw/ResourceUtils.h"
+
+namespace android {
+
+bool ExtractResourceName(const StringPiece& str, StringPiece* out_package, StringPiece* out_type,
+                         StringPiece* out_entry) {
+  *out_package = "";
+  *out_type = "";
+  bool has_package_separator = false;
+  bool has_type_separator = false;
+  const char* start = str.data();
+  const char* end = start + str.size();
+  const char* current = start;
+  while (current != end) {
+    if (out_type->size() == 0 && *current == '/') {
+      has_type_separator = true;
+      out_type->assign(start, current - start);
+      start = current + 1;
+    } else if (out_package->size() == 0 && *current == ':') {
+      has_package_separator = true;
+      out_package->assign(start, current - start);
+      start = current + 1;
+    }
+    current++;
+  }
+  out_entry->assign(start, end - start);
+
+  return !(has_package_separator && out_package->empty()) &&
+         !(has_type_separator && out_type->empty());
+}
+
+}  // namespace android
diff --git a/libs/androidfw/include/androidfw/ApkAssets.h b/libs/androidfw/include/androidfw/ApkAssets.h
index 9d4fd29..6d1578c 100644
--- a/libs/androidfw/include/androidfw/ApkAssets.h
+++ b/libs/androidfw/include/androidfw/ApkAssets.h
@@ -31,8 +31,9 @@
 // Holds an APK.
 class ApkAssets {
  public:
-  static std::unique_ptr<ApkAssets> Load(const std::string& path);
-  static std::unique_ptr<ApkAssets> LoadAsSharedLibrary(const std::string& path);
+  static std::unique_ptr<const ApkAssets> Load(const std::string& path, bool system = false);
+  static std::unique_ptr<const ApkAssets> LoadAsSharedLibrary(const std::string& path,
+                                                              bool system = false);
 
   std::unique_ptr<Asset> Open(const std::string& path,
                               Asset::AccessMode mode = Asset::AccessMode::ACCESS_RANDOM) const;
@@ -44,7 +45,8 @@
  private:
   DISALLOW_COPY_AND_ASSIGN(ApkAssets);
 
-  static std::unique_ptr<ApkAssets> LoadImpl(const std::string& path, bool load_as_shared_library);
+  static std::unique_ptr<const ApkAssets> LoadImpl(const std::string& path, bool system,
+                                                   bool load_as_shared_library);
 
   ApkAssets() = default;
 
@@ -57,7 +59,7 @@
   ZipArchivePtr zip_handle_;
   std::string path_;
   std::unique_ptr<Asset> resources_asset_;
-  std::unique_ptr<LoadedArsc> loaded_arsc_;
+  std::unique_ptr<const LoadedArsc> loaded_arsc_;
 };
 
 }  // namespace android
diff --git a/libs/androidfw/include/androidfw/AssetManager2.h b/libs/androidfw/include/androidfw/AssetManager2.h
index 8655339..81cdc46 100644
--- a/libs/androidfw/include/androidfw/AssetManager2.h
+++ b/libs/androidfw/include/androidfw/AssetManager2.h
@@ -21,6 +21,7 @@
 
 #include <array>
 #include <limits>
+#include <set>
 #include <unordered_map>
 
 #include "androidfw/ApkAssets.h"
@@ -112,6 +113,24 @@
 
   inline const ResTable_config& GetConfiguration() const { return configuration_; }
 
+  // Returns all configurations for which there are resources defined. This includes resource
+  // configurations in all the ApkAssets set for this AssetManager.
+  // If `exclude_system` is set to true, resource configurations from system APKs
+  // ('android' package, other libraries) will be excluded from the list.
+  // If `exclude_mipmap` is set to true, resource configurations defined for resource type 'mipmap'
+  // will be excluded from the list.
+  std::set<ResTable_config> GetResourceConfigurations(bool exclude_system = false,
+                                                      bool exclude_mipmap = false);
+
+  // Returns all the locales for which there are resources defined. This includes resource
+  // locales in all the ApkAssets set for this AssetManager.
+  // If `exclude_system` is set to true, resource locales from system APKs
+  // ('android' package, other libraries) will be excluded from the list.
+  // If `merge_equivalent_languages` is set to true, resource locales will be canonicalized
+  // and de-duped in the resulting list.
+  std::set<std::string> GetResourceLocales(bool exclude_system = false,
+                                           bool merge_equivalent_languages = false);
+
   // Searches the set of APKs loaded by this AssetManager and opens the first one found located
   // in the assets/ directory.
   // `mode` controls how the file is opened.
@@ -149,6 +168,14 @@
   // Returns false if the resource was not found.
   bool GetResourceFlags(uint32_t resid, uint32_t* out_flags);
 
+  // Finds the resource ID assigned to `resource_name`.
+  // `resource_name` must be of the form '[package:][type/]entry'.
+  // If no package is specified in `resource_name`, then `fallback_package` is used as the package.
+  // If no type is specified in `resource_name`, then `fallback_type` is used as the type.
+  // Returns 0x0 if no resource by that name was found.
+  uint32_t GetResourceId(const std::string& resource_name, const std::string& fallback_type = {},
+                         const std::string& fallback_package = {});
+
   // Retrieves the best matching resource with ID `resid`. The resource value is filled into
   // `out_value` and the configuration for the selected value is populated in `out_selected_config`.
   // `out_flags` holds the same flags as retrieved with GetResourceFlags().
@@ -162,6 +189,22 @@
                               Res_value* out_value, ResTable_config* out_selected_config,
                               uint32_t* out_flags);
 
+  // Resolves the resource reference in `in_out_value` if the data type is
+  // Res_value::TYPE_REFERENCE.
+  // `cookie` is the ApkAssetsCookie of the reference in `in_out_value`.
+  // `in_out_value` is the reference to resolve. The result is placed back into this object.
+  // `in_out_flags` is the type spec flags returned from calls to GetResource() or
+  // GetResourceFlags(). Configuration flags of the values pointed to by the reference
+  // are OR'd together with `in_out_flags`.
+  // `in_out_config` is populated with the configuration for which the resolved value was defined.
+  // `out_last_reference` is populated with the last reference ID before resolving to an actual
+  // value.
+  // Returns the cookie of the APK the resolved resource was defined in, or kInvalidCookie if
+  // it was not found.
+  ApkAssetsCookie ResolveReference(ApkAssetsCookie cookie, Res_value* in_out_value,
+                                   ResTable_config* in_out_selected_config, uint32_t* in_out_flags,
+                                   ResTable_ref* out_last_reference);
+
   // Retrieves the best matching bag/map resource with ID `resid`.
   // This method will resolve all parent references for this bag and merge keys with the child.
   // To iterate over the keys, use the following idiom:
diff --git a/libs/androidfw/include/androidfw/LoadedArsc.h b/libs/androidfw/include/androidfw/LoadedArsc.h
index e8cb164..f30b158 100644
--- a/libs/androidfw/include/androidfw/LoadedArsc.h
+++ b/libs/androidfw/include/androidfw/LoadedArsc.h
@@ -18,6 +18,7 @@
 #define LOADEDARSC_H_
 
 #include <memory>
+#include <set>
 #include <vector>
 
 #include "android-base/macros.h"
@@ -68,20 +69,45 @@
                  LoadedArscEntry* out_entry, ResTable_config* out_selected_config,
                  uint32_t* out_flags) const;
 
+  // Returns the string pool where type names are stored.
   inline const ResStringPool* GetTypeStringPool() const { return &type_string_pool_; }
 
+  // Returns the string pool where the names of resource entries are stored.
   inline const ResStringPool* GetKeyStringPool() const { return &key_string_pool_; }
 
   inline const std::string& GetPackageName() const { return package_name_; }
 
   inline int GetPackageId() const { return package_id_; }
 
+  // Returns true if this package is dynamic (shared library) and needs to have an ID assigned.
   inline bool IsDynamic() const { return dynamic_; }
 
+  // Returns true if this package originates from a system provided resource.
+  inline bool IsSystem() const { return system_; }
+
+  // Returns the map of package name to package ID used in this LoadedPackage. At runtime, a
+  // package could have been assigned a different package ID than what this LoadedPackage was
+  // compiled with. AssetManager rewrites the package IDs so that they are compatible at runtime.
   inline const std::vector<DynamicPackageEntry>& GetDynamicPackageMap() const {
     return dynamic_package_map_;
   }
 
+  // Populates a set of ResTable_config structs, possibly excluding configurations defined for
+  // the mipmap type.
+  void CollectConfigurations(bool exclude_mipmap, std::set<ResTable_config>* out_configs) const;
+
+  // Populates a set of strings representing locales.
+  // If `canonicalize` is set to true, each locale is transformed into its canonical format
+  // before being inserted into the set. This may cause some equivalent locales to de-dupe.
+  void CollectLocales(bool canonicalize, std::set<std::string>* out_locales) const;
+
+  // Finds the entry with the specified type name and entry name. The names are in UTF-16 because
+  // the underlying ResStringPool API expects this. For now this is acceptable, but since
+  // the default policy in AAPT2 is to build UTF-8 string pools, this needs to change.
+  // Returns a partial resource ID, with the package ID left as 0x00. The caller is responsible
+  // for patching the correct package ID to the resource ID.
+  uint32_t FindEntryByName(const std::u16string& type_name, const std::u16string& entry_name) const;
+
  private:
   DISALLOW_COPY_AND_ASSIGN(LoadedPackage);
 
@@ -93,8 +119,9 @@
   ResStringPool key_string_pool_;
   std::string package_name_;
   int package_id_ = -1;
-  bool dynamic_ = false;
   int type_id_offset_ = 0;
+  bool dynamic_ = false;
+  bool system_ = false;
 
   ByteBucketArray<util::unique_cptr<TypeSpec>> type_specs_;
   std::vector<DynamicPackageEntry> dynamic_package_map_;
@@ -104,10 +131,14 @@
 // when loading, including offsets and lengths.
 class LoadedArsc {
  public:
-  // Load the resource table from memory. The data's lifetime must out-live the
-  // object returned from this method.
-  static std::unique_ptr<LoadedArsc> Load(const void* data, size_t len,
-                                          bool load_as_shared_library = false);
+  // Load a resource table from memory pointed to by `data` of size `len`.
+  // The lifetime of `data` must out-live the LoadedArsc returned from this method.
+  // If `system` is set to true, the LoadedArsc is considered as a system provided resource.
+  // If `load_as_shared_library` is set to true, the application package (0x7f) is treated
+  // as a shared library (0x00). When loaded into an AssetManager, the package will be assigned an
+  // ID.
+  static std::unique_ptr<const LoadedArsc> Load(const void* data, size_t len, bool system = false,
+                                                bool load_as_shared_library = false);
 
   ~LoadedArsc();
 
@@ -125,6 +156,10 @@
   // Gets a pointer to the name of the package in `resid`, or nullptr if the package doesn't exist.
   const LoadedPackage* GetPackageForId(uint32_t resid) const;
 
+  // Returns true if this is a system provided resource.
+  inline bool IsSystem() const { return system_; }
+
+  // Returns a vector of LoadedPackage pointers, representing the packages in this LoadedArsc.
   inline const std::vector<std::unique_ptr<const LoadedPackage>>& GetPackages() const {
     return packages_;
   }
@@ -137,6 +172,7 @@
 
   ResStringPool global_string_pool_;
   std::vector<std::unique_ptr<const LoadedPackage>> packages_;
+  bool system_ = false;
 };
 
 }  // namespace android
diff --git a/libs/androidfw/include/androidfw/ResourceTypes.h b/libs/androidfw/include/androidfw/ResourceTypes.h
index 56c22e6..04a5d95 100644
--- a/libs/androidfw/include/androidfw/ResourceTypes.h
+++ b/libs/androidfw/include/androidfw/ResourceTypes.h
@@ -1188,6 +1188,8 @@
     int compare(const ResTable_config& o) const;
     int compareLogical(const ResTable_config& o) const;
 
+    inline bool operator<(const ResTable_config& o) const { return compare(o) < 0; }
+
     // Flags indicating a set of config values.  These flag constants must
     // match the corresponding ones in android.content.pm.ActivityInfo and
     // attrs_manifest.xml.
diff --git a/libs/androidfw/include/androidfw/ResourceUtils.h b/libs/androidfw/include/androidfw/ResourceUtils.h
new file mode 100644
index 0000000..6bf7c24
--- /dev/null
+++ b/libs/androidfw/include/androidfw/ResourceUtils.h
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ */
+
+#ifndef ANDROIDFW_RESOURCEUTILS_H
+#define ANDROIDFW_RESOURCEUTILS_H
+
+#include "androidfw/StringPiece.h"
+
+namespace android {
+
+// Extracts the package, type, and name from a string of the format: [[package:]type/]name
+// Validation must be performed on each extracted piece.
+// Returns false if there was a syntax error.
+bool ExtractResourceName(const StringPiece& str, StringPiece* out_package, StringPiece* out_type,
+                         StringPiece* out_entry);
+
+inline uint32_t fix_package_id(uint32_t resid, uint8_t package_id) {
+  return resid | (static_cast<uint32_t>(package_id) << 24);
+}
+
+inline uint8_t get_package_id(uint32_t resid) {
+  return static_cast<uint8_t>((resid >> 24) & 0x000000ffu);
+}
+
+// The type ID is 1-based, so if the returned value is 0 it is invalid.
+inline uint8_t get_type_id(uint32_t resid) {
+  return static_cast<uint8_t>((resid >> 16) & 0x000000ffu);
+}
+
+inline uint16_t get_entry_id(uint32_t resid) { return static_cast<uint16_t>(resid & 0x0000ffffu); }
+
+inline bool is_internal_resid(uint32_t resid) {
+  return (resid & 0xffff0000u) != 0 && (resid & 0x00ff0000u) == 0;
+}
+
+inline bool is_valid_resid(uint32_t resid) {
+  return (resid & 0x00ff0000u) != 0 && (resid & 0xff000000u) != 0;
+}
+
+inline uint32_t make_resid(uint8_t package_id, uint8_t type_id, uint16_t entry_id) {
+  return (static_cast<uint32_t>(package_id) << 24) | (static_cast<uint32_t>(type_id) << 16) |
+         entry_id;
+}
+
+}  // namespace android
+
+#endif /* ANDROIDFW_RESOURCEUTILS_H */
diff --git a/libs/androidfw/include/androidfw/StringPiece.h b/libs/androidfw/include/androidfw/StringPiece.h
index c9effd1..a873d66 100644
--- a/libs/androidfw/include/androidfw/StringPiece.h
+++ b/libs/androidfw/include/androidfw/StringPiece.h
@@ -257,12 +257,50 @@
   return data_ + length_;
 }
 
+template <typename TChar>
+inline bool operator==(const TChar* lhs, const BasicStringPiece<TChar>& rhs) {
+  return BasicStringPiece<TChar>(lhs) == rhs;
+}
+
+template <typename TChar>
+inline bool operator!=(const TChar* lhs, const BasicStringPiece<TChar>& rhs) {
+  return BasicStringPiece<TChar>(lhs) != rhs;
+}
+
 inline ::std::ostream& operator<<(::std::ostream& out, const BasicStringPiece<char>& str) {
   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/androidfw/include/androidfw/Util.h b/libs/androidfw/include/androidfw/Util.h
index fd96730..3950cf2 100644
--- a/libs/androidfw/include/androidfw/Util.h
+++ b/libs/androidfw/include/androidfw/Util.h
@@ -94,37 +94,18 @@
 
   inline bool operator==(const unique_cptr& o) const { return ptr_ == o.ptr_; }
 
+  inline bool operator!=(const unique_cptr& o) const { return ptr_ != o.ptr_; }
+
   inline bool operator==(std::nullptr_t) const { return ptr_ == nullptr; }
 
+  inline bool operator!=(std::nullptr_t) const { return ptr_ != nullptr; }
+
  private:
   DISALLOW_COPY_AND_ASSIGN(unique_cptr);
 
   pointer ptr_;
 };
 
-inline uint32_t fix_package_id(uint32_t resid, uint8_t package_id) {
-  return resid | (static_cast<uint32_t>(package_id) << 24);
-}
-
-inline uint8_t get_package_id(uint32_t resid) {
-  return static_cast<uint8_t>((resid >> 24) & 0x000000ffu);
-}
-
-// The type ID is 1-based, so if the returned value is 0 it is invalid.
-inline uint8_t get_type_id(uint32_t resid) {
-  return static_cast<uint8_t>((resid >> 16) & 0x000000ffu);
-}
-
-inline uint16_t get_entry_id(uint32_t resid) { return static_cast<uint16_t>(resid & 0x0000ffffu); }
-
-inline bool is_internal_resid(uint32_t resid) {
-  return (resid & 0xffff0000u) != 0 && (resid & 0x00ff0000u) == 0;
-}
-
-inline bool is_valid_resid(uint32_t resid) {
-  return (resid & 0x00ff0000u) != 0 && (resid & 0xff000000u) != 0;
-}
-
 void ReadUtf16StringFromDevice(const uint16_t* src, size_t len, std::string* out);
 
 }  // namespace util
diff --git a/libs/androidfw/tests/Android.mk b/libs/androidfw/tests/Android.mk
index 650f813..19527c5 100644
--- a/libs/androidfw/tests/Android.mk
+++ b/libs/androidfw/tests/Android.mk
@@ -32,6 +32,7 @@
     ConfigLocale_test.cpp \
     Idmap_test.cpp \
     LoadedArsc_test.cpp \
+    ResourceUtils_test.cpp \
     ResTable_test.cpp \
     Split_test.cpp \
     StringPiece_test.cpp \
diff --git a/libs/androidfw/tests/ApkAssets_test.cpp b/libs/androidfw/tests/ApkAssets_test.cpp
index 0203712..6b4a719 100644
--- a/libs/androidfw/tests/ApkAssets_test.cpp
+++ b/libs/androidfw/tests/ApkAssets_test.cpp
@@ -24,7 +24,8 @@
 namespace android {
 
 TEST(ApkAssetsTest, LoadApk) {
-  std::unique_ptr<ApkAssets> loaded_apk = ApkAssets::Load(GetTestDataPath() + "/basic/basic.apk");
+  std::unique_ptr<const ApkAssets> loaded_apk =
+      ApkAssets::Load(GetTestDataPath() + "/basic/basic.apk");
   ASSERT_NE(nullptr, loaded_apk);
   EXPECT_NE(nullptr, loaded_apk->GetLoadedArsc());
 
@@ -33,7 +34,7 @@
 }
 
 TEST(ApkAssetsTest, LoadApkAsSharedLibrary) {
-  std::unique_ptr<ApkAssets> loaded_apk =
+  std::unique_ptr<const ApkAssets> loaded_apk =
       ApkAssets::Load(GetTestDataPath() + "/appaslib/appaslib.apk");
   ASSERT_NE(nullptr, loaded_apk);
   const LoadedArsc* loaded_arsc = loaded_apk->GetLoadedArsc();
diff --git a/libs/androidfw/tests/AssetManager2_bench.cpp b/libs/androidfw/tests/AssetManager2_bench.cpp
index b3c2dc3..273290a 100644
--- a/libs/androidfw/tests/AssetManager2_bench.cpp
+++ b/libs/androidfw/tests/AssetManager2_bench.cpp
@@ -38,7 +38,7 @@
 static void BM_AssetManagerLoadAssets(benchmark::State& state) {
   std::string path = GetTestDataPath() + "/basic/basic.apk";
   while (state.KeepRunning()) {
-    std::unique_ptr<ApkAssets> apk = ApkAssets::Load(path);
+    std::unique_ptr<const ApkAssets> apk = ApkAssets::Load(path);
     AssetManager2 assets;
     assets.SetApkAssets({apk.get()});
   }
@@ -61,7 +61,7 @@
 static void BM_AssetManagerLoadFrameworkAssets(benchmark::State& state) {
   std::string path = kFrameworkPath;
   while (state.KeepRunning()) {
-    std::unique_ptr<ApkAssets> apk = ApkAssets::Load(path);
+    std::unique_ptr<const ApkAssets> apk = ApkAssets::Load(path);
     AssetManager2 assets;
     assets.SetApkAssets({apk.get()});
   }
@@ -84,10 +84,10 @@
 static void GetResourceBenchmark(const std::vector<std::string>& paths,
                                  const ResTable_config* config, uint32_t resid,
                                  benchmark::State& state) {
-  std::vector<std::unique_ptr<ApkAssets>> apk_assets;
+  std::vector<std::unique_ptr<const ApkAssets>> apk_assets;
   std::vector<const ApkAssets*> apk_assets_ptrs;
   for (const std::string& path : paths) {
-    std::unique_ptr<ApkAssets> apk = ApkAssets::Load(path);
+    std::unique_ptr<const ApkAssets> apk = ApkAssets::Load(path);
     if (apk == nullptr) {
       state.SkipWithError(base::StringPrintf("Failed to load assets %s", path.c_str()).c_str());
       return;
@@ -187,7 +187,7 @@
 BENCHMARK(BM_AssetManagerGetResourceFrameworkLocaleOld);
 
 static void BM_AssetManagerGetBag(benchmark::State& state) {
-  std::unique_ptr<ApkAssets> apk = ApkAssets::Load(GetTestDataPath() + "/styles/styles.apk");
+  std::unique_ptr<const ApkAssets> apk = ApkAssets::Load(GetTestDataPath() + "/styles/styles.apk");
   if (apk == nullptr) {
     state.SkipWithError("Failed to load assets");
     return;
@@ -234,4 +234,40 @@
 }
 BENCHMARK(BM_AssetManagerGetBagOld);
 
+static void BM_AssetManagerGetResourceLocales(benchmark::State& state) {
+  std::unique_ptr<const ApkAssets> apk = ApkAssets::Load(kFrameworkPath);
+  if (apk == nullptr) {
+    state.SkipWithError("Failed to load assets");
+    return;
+  }
+
+  AssetManager2 assets;
+  assets.SetApkAssets({apk.get()});
+
+  while (state.KeepRunning()) {
+    std::set<std::string> locales =
+        assets.GetResourceLocales(false /*exclude_system*/, true /*merge_equivalent_languages*/);
+    benchmark::DoNotOptimize(locales);
+  }
+}
+BENCHMARK(BM_AssetManagerGetResourceLocales);
+
+static void BM_AssetManagerGetResourceLocalesOld(benchmark::State& state) {
+  AssetManager assets;
+  if (!assets.addAssetPath(String8(kFrameworkPath), nullptr /*cookie*/, false /*appAsLib*/,
+                           false /*isSystemAssets*/)) {
+    state.SkipWithError("Failed to load assets");
+    return;
+  }
+
+  const ResTable& table = assets.getResources(true);
+
+  while (state.KeepRunning()) {
+    Vector<String8> locales;
+    table.getLocales(&locales, true /*includeSystemLocales*/, true /*mergeEquivalentLangs*/);
+    benchmark::DoNotOptimize(locales);
+  }
+}
+BENCHMARK(BM_AssetManagerGetResourceLocalesOld);
+
 }  // namespace android
diff --git a/libs/androidfw/tests/AssetManager2_test.cpp b/libs/androidfw/tests/AssetManager2_test.cpp
index 543456a..78fbb0f 100644
--- a/libs/androidfw/tests/AssetManager2_test.cpp
+++ b/libs/androidfw/tests/AssetManager2_test.cpp
@@ -20,12 +20,14 @@
 #include "android-base/logging.h"
 
 #include "TestHelpers.h"
+#include "androidfw/ResourceUtils.h"
 #include "data/appaslib/R.h"
 #include "data/basic/R.h"
 #include "data/lib_one/R.h"
 #include "data/lib_two/R.h"
 #include "data/libclient/R.h"
 #include "data/styles/R.h"
+#include "data/system/R.h"
 
 namespace app = com::android::app;
 namespace appaslib = com::android::appaslib::app;
@@ -59,16 +61,20 @@
 
     appaslib_assets_ = ApkAssets::Load(GetTestDataPath() + "/appaslib/appaslib.apk");
     ASSERT_NE(nullptr, appaslib_assets_);
+
+    system_assets_ = ApkAssets::Load(GetTestDataPath() + "/system/system.apk", true /*system*/);
+    ASSERT_NE(nullptr, system_assets_);
   }
 
  protected:
-  std::unique_ptr<ApkAssets> basic_assets_;
-  std::unique_ptr<ApkAssets> basic_de_fr_assets_;
-  std::unique_ptr<ApkAssets> style_assets_;
-  std::unique_ptr<ApkAssets> lib_one_assets_;
-  std::unique_ptr<ApkAssets> lib_two_assets_;
-  std::unique_ptr<ApkAssets> libclient_assets_;
-  std::unique_ptr<ApkAssets> appaslib_assets_;
+  std::unique_ptr<const ApkAssets> basic_assets_;
+  std::unique_ptr<const ApkAssets> basic_de_fr_assets_;
+  std::unique_ptr<const ApkAssets> style_assets_;
+  std::unique_ptr<const ApkAssets> lib_one_assets_;
+  std::unique_ptr<const ApkAssets> lib_two_assets_;
+  std::unique_ptr<const ApkAssets> libclient_assets_;
+  std::unique_ptr<const ApkAssets> appaslib_assets_;
+  std::unique_ptr<const ApkAssets> system_assets_;
 };
 
 TEST_F(AssetManager2Test, FindsResourceFromSingleApkAssets) {
@@ -189,11 +195,11 @@
   ResTable_config selected_config;
   uint32_t flags;
   ApkAssetsCookie cookie = assetmanager.GetResource(
-      util::fix_package_id(appaslib::R::integer::number1, 0x02), false /*may_be_bag*/,
+      fix_package_id(appaslib::R::integer::number1, 0x02), false /*may_be_bag*/,
       0u /*density_override*/, &value, &selected_config, &flags);
   ASSERT_NE(kInvalidCookie, cookie);
   EXPECT_EQ(Res_value::TYPE_REFERENCE, value.dataType);
-  EXPECT_EQ(util::fix_package_id(appaslib::R::array::integerArray1, 0x02), value.data);
+  EXPECT_EQ(fix_package_id(appaslib::R::array::integerArray1, 0x02), value.data);
 }
 
 TEST_F(AssetManager2Test, FindsBagResourceFromSingleApkAssets) {
@@ -233,9 +239,9 @@
 
   // First two attributes come from lib_one.
   EXPECT_EQ(1, bag->entries[0].cookie);
-  EXPECT_EQ(0x03, util::get_package_id(bag->entries[0].key));
+  EXPECT_EQ(0x03, get_package_id(bag->entries[0].key));
   EXPECT_EQ(1, bag->entries[1].cookie);
-  EXPECT_EQ(0x03, util::get_package_id(bag->entries[1].key));
+  EXPECT_EQ(0x03, get_package_id(bag->entries[1].key));
 }
 
 TEST_F(AssetManager2Test, MergesStylesWithParentFromSingleApkAssets) {
@@ -291,6 +297,131 @@
   EXPECT_EQ(0, bag_two->entries[4].cookie);
 }
 
+TEST_F(AssetManager2Test, ResolveReferenceToResource) {
+  AssetManager2 assetmanager;
+  assetmanager.SetApkAssets({basic_assets_.get()});
+
+  Res_value value;
+  ResTable_config selected_config;
+  uint32_t flags;
+  ApkAssetsCookie cookie =
+      assetmanager.GetResource(basic::R::integer::ref1, false /*may_be_bag*/,
+                               0u /*density_override*/, &value, &selected_config, &flags);
+  ASSERT_NE(kInvalidCookie, cookie);
+
+  EXPECT_EQ(Res_value::TYPE_REFERENCE, value.dataType);
+  EXPECT_EQ(basic::R::integer::ref2, value.data);
+
+  ResTable_ref last_ref;
+  cookie = assetmanager.ResolveReference(cookie, &value, &selected_config, &flags, &last_ref);
+  ASSERT_NE(kInvalidCookie, cookie);
+  EXPECT_EQ(Res_value::TYPE_INT_DEC, value.dataType);
+  EXPECT_EQ(12000u, value.data);
+  EXPECT_EQ(basic::R::integer::ref2, last_ref.ident);
+}
+
+TEST_F(AssetManager2Test, ResolveReferenceToBag) {
+  AssetManager2 assetmanager;
+  assetmanager.SetApkAssets({basic_assets_.get()});
+
+  Res_value value;
+  ResTable_config selected_config;
+  uint32_t flags;
+  ApkAssetsCookie cookie =
+      assetmanager.GetResource(basic::R::integer::number2, true /*may_be_bag*/,
+                               0u /*density_override*/, &value, &selected_config, &flags);
+  ASSERT_NE(kInvalidCookie, cookie);
+
+  EXPECT_EQ(Res_value::TYPE_REFERENCE, value.dataType);
+  EXPECT_EQ(basic::R::array::integerArray1, value.data);
+
+  ResTable_ref last_ref;
+  cookie = assetmanager.ResolveReference(cookie, &value, &selected_config, &flags, &last_ref);
+  ASSERT_NE(kInvalidCookie, cookie);
+  EXPECT_EQ(Res_value::TYPE_REFERENCE, value.dataType);
+  EXPECT_EQ(basic::R::array::integerArray1, value.data);
+  EXPECT_EQ(basic::R::array::integerArray1, last_ref.ident);
+}
+
+static bool IsConfigurationPresent(const std::set<ResTable_config>& configurations,
+                                   const ResTable_config& configuration) {
+  return configurations.count(configuration) > 0;
+}
+
+TEST_F(AssetManager2Test, GetResourceConfigurations) {
+  AssetManager2 assetmanager;
+  assetmanager.SetApkAssets({system_assets_.get(), basic_de_fr_assets_.get()});
+
+  std::set<ResTable_config> configurations = assetmanager.GetResourceConfigurations();
+
+  // We expect the locale sv from the system assets, and de and fr from basic_de_fr assets.
+  // And one extra for the default configuration.
+  EXPECT_EQ(4u, configurations.size());
+
+  ResTable_config expected_config;
+  memset(&expected_config, 0, sizeof(expected_config));
+  expected_config.language[0] = 's';
+  expected_config.language[1] = 'v';
+  EXPECT_TRUE(IsConfigurationPresent(configurations, expected_config));
+
+  expected_config.language[0] = 'd';
+  expected_config.language[1] = 'e';
+  EXPECT_TRUE(IsConfigurationPresent(configurations, expected_config));
+
+  expected_config.language[0] = 'f';
+  expected_config.language[1] = 'r';
+  EXPECT_TRUE(IsConfigurationPresent(configurations, expected_config));
+
+  // Take out the system assets.
+  configurations = assetmanager.GetResourceConfigurations(true /* exclude_system */);
+
+  // We expect de and fr from basic_de_fr assets.
+  EXPECT_EQ(2u, configurations.size());
+
+  expected_config.language[0] = 's';
+  expected_config.language[1] = 'v';
+  EXPECT_FALSE(IsConfigurationPresent(configurations, expected_config));
+
+  expected_config.language[0] = 'd';
+  expected_config.language[1] = 'e';
+  EXPECT_TRUE(IsConfigurationPresent(configurations, expected_config));
+
+  expected_config.language[0] = 'f';
+  expected_config.language[1] = 'r';
+  EXPECT_TRUE(IsConfigurationPresent(configurations, expected_config));
+}
+
+TEST_F(AssetManager2Test, GetResourceLocales) {
+  AssetManager2 assetmanager;
+  assetmanager.SetApkAssets({system_assets_.get(), basic_de_fr_assets_.get()});
+
+  std::set<std::string> locales = assetmanager.GetResourceLocales();
+
+  // We expect the locale sv from the system assets, and de and fr from basic_de_fr assets.
+  EXPECT_EQ(3u, locales.size());
+  EXPECT_GT(locales.count("sv"), 0u);
+  EXPECT_GT(locales.count("de"), 0u);
+  EXPECT_GT(locales.count("fr"), 0u);
+
+  locales = assetmanager.GetResourceLocales(true /*exclude_system*/);
+  // We expect the de and fr locales from basic_de_fr assets.
+  EXPECT_EQ(2u, locales.size());
+  EXPECT_GT(locales.count("de"), 0u);
+  EXPECT_GT(locales.count("fr"), 0u);
+}
+
+TEST_F(AssetManager2Test, GetResourceId) {
+  AssetManager2 assetmanager;
+  assetmanager.SetApkAssets({basic_assets_.get()});
+
+  EXPECT_EQ(basic::R::layout::main,
+            assetmanager.GetResourceId("com.android.basic:layout/main", "", ""));
+  EXPECT_EQ(basic::R::layout::main,
+            assetmanager.GetResourceId("layout/main", "", "com.android.basic"));
+  EXPECT_EQ(basic::R::layout::main,
+            assetmanager.GetResourceId("main", "layout", "com.android.basic"));
+}
+
 TEST_F(AssetManager2Test, OpensFileFromSingleApkAssets) {}
 
 TEST_F(AssetManager2Test, OpensFileFromMultipleApkAssets) {}
diff --git a/libs/androidfw/tests/LoadedArsc_test.cpp b/libs/androidfw/tests/LoadedArsc_test.cpp
index f8aa61a..756869f 100644
--- a/libs/androidfw/tests/LoadedArsc_test.cpp
+++ b/libs/androidfw/tests/LoadedArsc_test.cpp
@@ -32,7 +32,8 @@
   ASSERT_TRUE(ReadFileFromZipToString(GetTestDataPath() + "/styles/styles.apk", "resources.arsc",
                                       &contents));
 
-  std::unique_ptr<LoadedArsc> loaded_arsc = LoadedArsc::Load(contents.data(), contents.size());
+  std::unique_ptr<const LoadedArsc> loaded_arsc =
+      LoadedArsc::Load(contents.data(), contents.size());
   ASSERT_NE(nullptr, loaded_arsc);
 
   const std::vector<std::unique_ptr<const LoadedPackage>>& packages = loaded_arsc->GetPackages();
@@ -58,7 +59,8 @@
   ASSERT_TRUE(
       ReadFileFromZipToString(GetTestDataPath() + "/basic/basic.apk", "resources.arsc", &contents));
 
-  std::unique_ptr<LoadedArsc> loaded_arsc = LoadedArsc::Load(contents.data(), contents.size());
+  std::unique_ptr<const LoadedArsc> loaded_arsc =
+      LoadedArsc::Load(contents.data(), contents.size());
   ASSERT_NE(nullptr, loaded_arsc);
 
   ResTable_config desired_config;
@@ -80,7 +82,8 @@
   ASSERT_TRUE(ReadFileFromZipToString(GetTestDataPath() + "/lib_one/lib_one.apk", "resources.arsc",
                                       &contents));
 
-  std::unique_ptr<LoadedArsc> loaded_arsc = LoadedArsc::Load(contents.data(), contents.size());
+  std::unique_ptr<const LoadedArsc> loaded_arsc =
+      LoadedArsc::Load(contents.data(), contents.size());
   ASSERT_NE(nullptr, loaded_arsc);
 
   const auto& packages = loaded_arsc->GetPackages();
@@ -101,7 +104,8 @@
   ASSERT_TRUE(ReadFileFromZipToString(GetTestDataPath() + "/libclient/libclient.apk",
                                       "resources.arsc", &contents));
 
-  std::unique_ptr<LoadedArsc> loaded_arsc = LoadedArsc::Load(contents.data(), contents.size());
+  std::unique_ptr<const LoadedArsc> loaded_arsc =
+      LoadedArsc::Load(contents.data(), contents.size());
   ASSERT_NE(nullptr, loaded_arsc);
 
   const auto& packages = loaded_arsc->GetPackages();
@@ -128,8 +132,8 @@
   ASSERT_TRUE(ReadFileFromZipToString(GetTestDataPath() + "/appaslib/appaslib.apk",
                                       "resources.arsc", &contents));
 
-  std::unique_ptr<LoadedArsc> loaded_arsc =
-      LoadedArsc::Load(contents.data(), contents.size(), true /*load_as_shared_library*/);
+  std::unique_ptr<const LoadedArsc> loaded_arsc = LoadedArsc::Load(
+      contents.data(), contents.size(), false /*system*/, true /*load_as_shared_library*/);
   ASSERT_NE(nullptr, loaded_arsc);
 
   const auto& packages = loaded_arsc->GetPackages();
@@ -143,7 +147,8 @@
   std::string contents;
   ASSERT_TRUE(ReadFileFromZipToString(GetTestDataPath() + "/feature/feature.apk", "resources.arsc",
                                       &contents));
-  std::unique_ptr<LoadedArsc> loaded_arsc = LoadedArsc::Load(contents.data(), contents.size());
+  std::unique_ptr<const LoadedArsc> loaded_arsc =
+      LoadedArsc::Load(contents.data(), contents.size());
   ASSERT_NE(nullptr, loaded_arsc);
 
   ResTable_config desired_config;
diff --git a/libs/androidfw/tests/ResourceUtils_test.cpp b/libs/androidfw/tests/ResourceUtils_test.cpp
new file mode 100644
index 0000000..b64a884
--- /dev/null
+++ b/libs/androidfw/tests/ResourceUtils_test.cpp
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+
+#include "androidfw/ResourceUtils.h"
+
+#include "TestHelpers.h"
+
+namespace android {
+
+TEST(ResourceUtilsTest, ExtractResourceName) {
+  StringPiece package, type, entry;
+  ASSERT_TRUE(ExtractResourceName("android:string/foo", &package, &type, &entry));
+  EXPECT_EQ("android", package);
+  EXPECT_EQ("string", type);
+  EXPECT_EQ("foo", entry);
+
+  ASSERT_TRUE(ExtractResourceName("string/foo", &package, &type, &entry));
+  EXPECT_EQ("", package);
+  EXPECT_EQ("string", type);
+  EXPECT_EQ("foo", entry);
+
+  ASSERT_TRUE(ExtractResourceName("foo", &package, &type, &entry));
+  EXPECT_EQ("", package);
+  EXPECT_EQ("", type);
+  EXPECT_EQ("foo", entry);
+
+  ASSERT_TRUE(ExtractResourceName("android:foo", &package, &type, &entry));
+  EXPECT_EQ("android", package);
+  EXPECT_EQ("", type);
+  EXPECT_EQ("foo", entry);
+
+  EXPECT_FALSE(ExtractResourceName(":string/foo", &package, &type, &entry));
+  EXPECT_FALSE(ExtractResourceName("/foo", &package, &type, &entry));
+}
+
+}  // namespace android
diff --git a/libs/androidfw/tests/Theme_bench.cpp b/libs/androidfw/tests/Theme_bench.cpp
index c471be6..594c39e 100644
--- a/libs/androidfw/tests/Theme_bench.cpp
+++ b/libs/androidfw/tests/Theme_bench.cpp
@@ -28,7 +28,7 @@
 constexpr const static uint32_t kAttrId = 0x01010030u;   // android:attr/colorForeground
 
 static void BM_ThemeApplyStyleFramework(benchmark::State& state) {
-  std::unique_ptr<ApkAssets> apk = ApkAssets::Load(kFrameworkPath);
+  std::unique_ptr<const ApkAssets> apk = ApkAssets::Load(kFrameworkPath);
   if (apk == nullptr) {
     state.SkipWithError("Failed to load assets");
     return;
@@ -62,7 +62,7 @@
 BENCHMARK(BM_ThemeApplyStyleFrameworkOld);
 
 static void BM_ThemeGetAttribute(benchmark::State& state) {
-  std::unique_ptr<ApkAssets> apk = ApkAssets::Load(kFrameworkPath);
+  std::unique_ptr<const ApkAssets> apk = ApkAssets::Load(kFrameworkPath);
 
   AssetManager2 assets;
   assets.SetApkAssets({apk.get()});
diff --git a/libs/androidfw/tests/Theme_test.cpp b/libs/androidfw/tests/Theme_test.cpp
index 59cb18a..dfff9c0 100644
--- a/libs/androidfw/tests/Theme_test.cpp
+++ b/libs/androidfw/tests/Theme_test.cpp
@@ -19,6 +19,7 @@
 #include "android-base/logging.h"
 
 #include "TestHelpers.h"
+#include "androidfw/ResourceUtils.h"
 #include "data/lib_one/R.h"
 #include "data/libclient/R.h"
 #include "data/styles/R.h"
@@ -46,10 +47,10 @@
   }
 
  protected:
-  std::unique_ptr<ApkAssets> style_assets_;
-  std::unique_ptr<ApkAssets> libclient_assets_;
-  std::unique_ptr<ApkAssets> lib_one_assets_;
-  std::unique_ptr<ApkAssets> lib_two_assets_;
+  std::unique_ptr<const ApkAssets> style_assets_;
+  std::unique_ptr<const ApkAssets> libclient_assets_;
+  std::unique_ptr<const ApkAssets> lib_one_assets_;
+  std::unique_ptr<const ApkAssets> lib_two_assets_;
 };
 
 TEST_F(ThemeTest, EmptyTheme) {
@@ -215,9 +216,9 @@
   EXPECT_EQ(Res_value::TYPE_REFERENCE, value.dataType);
 
   // lib_one is assigned package ID 0x03.
-  EXPECT_EQ(3u, util::get_package_id(value.data));
-  EXPECT_EQ(util::get_type_id(lib_one::R::string::foo), util::get_type_id(value.data));
-  EXPECT_EQ(util::get_entry_id(lib_one::R::string::foo), util::get_entry_id(value.data));
+  EXPECT_EQ(3u, get_package_id(value.data));
+  EXPECT_EQ(get_type_id(lib_one::R::string::foo), get_type_id(value.data));
+  EXPECT_EQ(get_entry_id(lib_one::R::string::foo), get_entry_id(value.data));
 }
 
 TEST_F(ThemeTest, CopyThemeSameAssetManager) {
diff --git a/libs/androidfw/tests/data/basic/R.h b/libs/androidfw/tests/data/basic/R.h
index 9352b5c..8e9741e 100644
--- a/libs/androidfw/tests/data/basic/R.h
+++ b/libs/androidfw/tests/data/basic/R.h
@@ -53,6 +53,8 @@
     enum : uint32_t {
       number1 = 0x7f040000,
       number2 = 0x7f040001,
+      ref1 = 0x7f040002,
+      ref2 = 0x7f040003,
 
       // From feature
       number3 = 0x7f090000,
diff --git a/libs/androidfw/tests/data/basic/basic.apk b/libs/androidfw/tests/data/basic/basic.apk
index 2c9771b..7ee6734 100644
--- a/libs/androidfw/tests/data/basic/basic.apk
+++ b/libs/androidfw/tests/data/basic/basic.apk
Binary files differ
diff --git a/libs/androidfw/tests/data/basic/basic_de_fr.apk b/libs/androidfw/tests/data/basic/basic_de_fr.apk
index 0481444..e45258c 100644
--- a/libs/androidfw/tests/data/basic/basic_de_fr.apk
+++ b/libs/androidfw/tests/data/basic/basic_de_fr.apk
Binary files differ
diff --git a/libs/androidfw/tests/data/basic/basic_hdpi-v4.apk b/libs/androidfw/tests/data/basic/basic_hdpi-v4.apk
index a8d06e7..4ae1a7c 100644
--- a/libs/androidfw/tests/data/basic/basic_hdpi-v4.apk
+++ b/libs/androidfw/tests/data/basic/basic_hdpi-v4.apk
Binary files differ
diff --git a/libs/androidfw/tests/data/basic/basic_xhdpi-v4.apk b/libs/androidfw/tests/data/basic/basic_xhdpi-v4.apk
index d1dfb14..a240d4c 100644
--- a/libs/androidfw/tests/data/basic/basic_xhdpi-v4.apk
+++ b/libs/androidfw/tests/data/basic/basic_xhdpi-v4.apk
Binary files differ
diff --git a/libs/androidfw/tests/data/basic/basic_xxhdpi-v4.apk b/libs/androidfw/tests/data/basic/basic_xxhdpi-v4.apk
index dca6f2f..fd3d9b2 100644
--- a/libs/androidfw/tests/data/basic/basic_xxhdpi-v4.apk
+++ b/libs/androidfw/tests/data/basic/basic_xxhdpi-v4.apk
Binary files differ
diff --git a/libs/androidfw/tests/data/basic/res/values/values.xml b/libs/androidfw/tests/data/basic/res/values/values.xml
index 11f6b8a..638c983 100644
--- a/libs/androidfw/tests/data/basic/res/values/values.xml
+++ b/libs/androidfw/tests/data/basic/res/values/values.xml
@@ -37,6 +37,12 @@
     <public type="integer" name="number2" id="0x7f040001" />
     <integer name="number2">@array/integerArray1</integer>
 
+    <public type="integer" name="ref1" id="0x7f040002" />
+    <integer name="ref1">@integer/ref2</integer>
+
+    <public type="integer" name="ref2" id="0x7f040003" />
+    <integer name="ref2">12000</integer>
+
     <public type="style" name="Theme1" id="0x7f050000" />
     <style name="Theme1">
         <item name="com.android.basic:attr1">100</item>
diff --git a/libs/hwui/Android.mk b/libs/hwui/Android.mk
index a799fdf..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,libRS,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/DeferredLayerUpdater.cpp b/libs/hwui/DeferredLayerUpdater.cpp
index ee77643..ff90160 100644
--- a/libs/hwui/DeferredLayerUpdater.cpp
+++ b/libs/hwui/DeferredLayerUpdater.cpp
@@ -31,7 +31,7 @@
         , mBlend(false)
         , mSurfaceTexture(nullptr)
         , mTransform(nullptr)
-        , mNeedsGLContextAttach(false)
+        , mGLContextAttached(false)
         , mUpdateTexImage(false)
         , mLayer(nullptr)
         , mLayerApi(layerApi)
@@ -47,10 +47,21 @@
 }
 
 void DeferredLayerUpdater::destroyLayer() {
-    if (mLayer) {
-        mLayer->postDecStrong();
-        mLayer = nullptr;
+    if (!mLayer) {
+        return;
     }
+
+    if (mSurfaceTexture.get() && mLayerApi == Layer::Api::OpenGL && mGLContextAttached) {
+        status_t err = mSurfaceTexture->detachFromContext();
+        mGLContextAttached = false;
+        if (err != 0) {
+            // TODO: Elevate to fatal exception
+            ALOGE("Failed to detach SurfaceTexture from context %d", err);
+        }
+    }
+
+    mLayer->postDecStrong();
+    mLayer = nullptr;
 }
 
 void DeferredLayerUpdater::setPaint(const SkPaint* paint) {
@@ -78,14 +89,17 @@
             LOG_ALWAYS_FATAL_IF(mLayer->getApi() != Layer::Api::OpenGL,
                                 "apply surfaceTexture with non GL backend %x, GL %x, VK %x",
                                 mLayer->getApi(), Layer::Api::OpenGL, Layer::Api::Vulkan);
-            if (mNeedsGLContextAttach) {
-                mNeedsGLContextAttach = false;
+            if (!mGLContextAttached) {
+                mGLContextAttached = true;
+                mUpdateTexImage = true;
                 mSurfaceTexture->attachToContext(static_cast<GlLayer*>(mLayer)->getTextureId());
             }
             if (mUpdateTexImage) {
                 mUpdateTexImage = false;
                 doUpdateTexImage();
             }
+            GLenum renderTarget = mSurfaceTexture->getCurrentTextureTarget();
+            static_cast<GlLayer*>(mLayer)->setRenderTarget(renderTarget);
         }
         if (mTransform) {
             mLayer->getTransform().load(*mTransform);
@@ -128,12 +142,8 @@
         }
         #endif
         mSurfaceTexture->getTransformMatrix(transform);
-        GLenum renderTarget = mSurfaceTexture->getCurrentTextureTarget();
 
-        LOG_ALWAYS_FATAL_IF(renderTarget != GL_TEXTURE_2D && renderTarget != GL_TEXTURE_EXTERNAL_OES,
-                "doUpdateTexImage target %x, 2d %x, EXT %x",
-                renderTarget, GL_TEXTURE_2D, GL_TEXTURE_EXTERNAL_OES);
-        updateLayer(forceFilter, renderTarget, transform);
+        updateLayer(forceFilter, transform);
     }
 }
 
@@ -143,40 +153,22 @@
                         mLayer->getApi(), Layer::Api::OpenGL, Layer::Api::Vulkan);
 
     static const mat4 identityMatrix;
-    updateLayer(false, GL_NONE, identityMatrix.data);
+    updateLayer(false, identityMatrix.data);
 
     VkLayer* vkLayer = static_cast<VkLayer*>(mLayer);
     vkLayer->updateTexture();
 }
 
-void DeferredLayerUpdater::updateLayer(bool forceFilter, GLenum renderTarget,
-        const float* textureTransform) {
+void DeferredLayerUpdater::updateLayer(bool forceFilter, const float* textureTransform) {
     mLayer->setBlend(mBlend);
     mLayer->setForceFilter(forceFilter);
     mLayer->setSize(mWidth, mHeight);
     mLayer->getTexTransform().load(textureTransform);
-
-    if (mLayer->getApi() == Layer::Api::OpenGL) {
-        GlLayer* glLayer = static_cast<GlLayer*>(mLayer);
-        if (renderTarget != glLayer->getRenderTarget()) {
-            glLayer->setRenderTarget(renderTarget);
-            glLayer->bindTexture();
-            glLayer->setFilter(GL_NEAREST, false, true);
-            glLayer->setWrap(GL_CLAMP_TO_EDGE, false, true);
-        }
-    }
 }
 
 void DeferredLayerUpdater::detachSurfaceTexture() {
     if (mSurfaceTexture.get()) {
-        if (mLayer->getApi() == Layer::Api::OpenGL) {
-            status_t err = mSurfaceTexture->detachFromContext();
-            if (err != 0) {
-                // TODO: Elevate to fatal exception
-                ALOGE("Failed to detach SurfaceTexture from context %d", err);
-            }
-            static_cast<GlLayer*>(mLayer)->clearTexture();
-        }
+        destroyLayer();
         mSurfaceTexture = nullptr;
     }
 }
diff --git a/libs/hwui/DeferredLayerUpdater.h b/libs/hwui/DeferredLayerUpdater.h
index 064b724..6164e47 100644
--- a/libs/hwui/DeferredLayerUpdater.h
+++ b/libs/hwui/DeferredLayerUpdater.h
@@ -68,9 +68,8 @@
         return false;
     }
 
-    ANDROID_API void setSurfaceTexture(const sp<GLConsumer>& texture, bool needsAttach) {
+    ANDROID_API void setSurfaceTexture(const sp<GLConsumer>& texture) {
         if (texture.get() != mSurfaceTexture.get()) {
-            mNeedsGLContextAttach = needsAttach;
             mSurfaceTexture = texture;
 
             GLenum target = texture->getCurrentTextureTarget();
@@ -102,7 +101,7 @@
 
     void detachSurfaceTexture();
 
-    void updateLayer(bool forceFilter, GLenum renderTarget, const float* textureTransform);
+    void updateLayer(bool forceFilter, const float* textureTransform);
 
     void destroyLayer();
 
@@ -122,7 +121,7 @@
     SkBlendMode mMode = SkBlendMode::kSrcOver;
     sp<GLConsumer> mSurfaceTexture;
     SkMatrix* mTransform;
-    bool mNeedsGLContextAttach;
+    bool mGLContextAttached;
     bool mUpdateTexImage;
 
     Layer* mLayer;
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/GlLayer.cpp b/libs/hwui/GlLayer.cpp
index 8174bcc..070e954 100644
--- a/libs/hwui/GlLayer.cpp
+++ b/libs/hwui/GlLayer.cpp
@@ -43,7 +43,10 @@
 }
 
 GlLayer::~GlLayer() {
-    if (texture.mId) {
+    // There's a rare possibility that Caches could have been destroyed already
+    // since this method is queued up as a task.
+    // Since this is a reset method, treat this as non-fatal.
+    if (caches.isInitialized() && texture.mId) {
         texture.deleteTexture();
     }
 }
@@ -52,9 +55,15 @@
     texture.deleteTexture();
 }
 
-void GlLayer::bindTexture() const {
-    if (texture.mId) {
-        caches.textureState().bindTexture(texture.target(), texture.mId);
+void GlLayer::setRenderTarget(GLenum renderTarget) {
+    if (renderTarget != getRenderTarget()) {
+        // new render target: bind with new target, and update filter/wrap
+        texture.mTarget = renderTarget;
+        if (texture.mId) {
+            caches.textureState().bindTexture(texture.target(), texture.mId);
+        }
+        texture.setFilter(GL_NEAREST, false, true);
+        texture.setWrap(GL_CLAMP_TO_EDGE, false, true);
     }
 }
 
@@ -64,15 +73,5 @@
     }
 }
 
-void GlLayer::clearTexture() {
-    // There's a rare possibility that Caches could have been destroyed already
-    // since this method is queued up as a task.
-    // Since this is a reset method, treat this as non-fatal.
-    if (caches.isInitialized()) {
-        caches.textureState().unbindTexture(texture.mId);
-    }
-    texture.mId = 0;
-}
-
 }; // namespace uirenderer
 }; // namespace android
diff --git a/libs/hwui/GlLayer.h b/libs/hwui/GlLayer.h
index 23dfd9d..20aaf4a 100644
--- a/libs/hwui/GlLayer.h
+++ b/libs/hwui/GlLayer.h
@@ -68,33 +68,15 @@
         return texture.target();
     }
 
-    inline void setRenderTarget(GLenum renderTarget) {
-        texture.mTarget = renderTarget;
-    }
-
     inline bool isRenderable() const {
         return texture.target() != GL_NONE;
     }
 
-    void setWrap(GLenum wrap, bool bindTexture = false, bool force = false) {
-        texture.setWrap(wrap, bindTexture, force);
-    }
+    void setRenderTarget(GLenum renderTarget);
 
-    void setFilter(GLenum filter, bool bindTexture = false, bool force = false) {
-        texture.setFilter(filter, bindTexture, force);
-    }
-
-    void bindTexture() const;
     void generateTexture();
 
     /**
-     * When the caller frees the texture itself, the caller
-     * must call this method to tell this layer that it lost
-     * the texture.
-     */
-    void clearTexture();
-
-    /**
      * Lost the GL context but the layer is still around, mark it invalid internally
      * so the dtor knows not to do any GL work
      */
diff --git a/libs/hwui/GlopBuilder.cpp b/libs/hwui/GlopBuilder.cpp
index 8a6e038..5cf52c6 100644
--- a/libs/hwui/GlopBuilder.cpp
+++ b/libs/hwui/GlopBuilder.cpp
@@ -605,6 +605,7 @@
         } else {
             mDescription.hasExternalTexture = true;
         }
+        mDescription.hasLinearTexture = mOutGlop->fill.texture.texture->isLinear();
     }
 
     mDescription.hasColors = mOutGlop->mesh.vertices.attribFlags & VertexAttribFlags::Color;
diff --git a/libs/hwui/GradientCache.cpp b/libs/hwui/GradientCache.cpp
index 1dad58f..71bee93 100644
--- a/libs/hwui/GradientCache.cpp
+++ b/libs/hwui/GradientCache.cpp
@@ -205,6 +205,10 @@
     *d++ = a * (start.g * oppAmount + end.g * amount);
     *d++ = a * (start.b * oppAmount + end.b * amount);
 #else
+    // What we're doing to the alpha channel here is technically incorrect
+    // but reproduces Android's old behavior when the alpha was pre-multiplied
+    // with gamma-encoded colors
+    a = EOCF_sRGB(a);
     *d++ = a * OECF_sRGB(start.r * oppAmount + end.r * amount);
     *d++ = a * OECF_sRGB(start.g * oppAmount + end.g * amount);
     *d++ = a * OECF_sRGB(start.b * oppAmount + end.b * amount);
diff --git a/libs/hwui/Program.h b/libs/hwui/Program.h
index e70982f..5c8f8e9 100644
--- a/libs/hwui/Program.h
+++ b/libs/hwui/Program.h
@@ -87,6 +87,7 @@
 #define PROGRAM_HAS_ROUND_RECT_CLIP 43
 
 #define PROGRAM_HAS_GAMMA_CORRECTION 44
+#define PROGRAM_HAS_LINEAR_TEXTURE 45
 
 ///////////////////////////////////////////////////////////////////////////////
 // Types
@@ -162,7 +163,10 @@
     bool hasDebugHighlight;
     bool hasRoundRectClip;
 
+    // Extra gamma correction used for text
     bool hasGammaCorrection;
+    // Set when sampling an image in linear space
+    bool hasLinearTexture;
 
     /**
      * Resets this description. All fields are reset back to the default
@@ -205,6 +209,7 @@
         hasRoundRectClip = false;
 
         hasGammaCorrection = false;
+        hasLinearTexture = false;
     }
 
     /**
@@ -275,6 +280,7 @@
         if (hasDebugHighlight) key |= programid(0x1) << PROGRAM_HAS_DEBUG_HIGHLIGHT;
         if (hasRoundRectClip) key |= programid(0x1) << PROGRAM_HAS_ROUND_RECT_CLIP;
         if (hasGammaCorrection) key |= programid(0x1) << PROGRAM_HAS_GAMMA_CORRECTION;
+        if (hasLinearTexture) key |= programid(0x1) << PROGRAM_HAS_LINEAR_TEXTURE;
         return key;
     }
 
diff --git a/libs/hwui/ProgramCache.cpp b/libs/hwui/ProgramCache.cpp
index 7107679..ca05648 100644
--- a/libs/hwui/ProgramCache.cpp
+++ b/libs/hwui/ProgramCache.cpp
@@ -161,27 +161,54 @@
         "uniform vec4 roundRectInnerRectLTRB;\n"
         "uniform float roundRectRadius;\n";
 
+const char* gFS_OETF[2] = {
+         "\nvec4 OETF(const vec4 linear) {\n"
+         "    return linear;\n"
+         "}\n",
+          // We expect linear data to be scRGB so we mirror the gamma function
+         "\nvec4 OETF(const vec4 linear) {"
+          "    return vec4(sign(linear.rgb) * OETF_sRGB(abs(linear.rgb)), linear.a);\n"
+          "}\n",
+};
+
+const char* gFS_Transfer_Functions = R"__SHADER__(
+        float OETF_sRGB(const float linear) {
+            // IEC 61966-2-1:1999
+            return linear <= 0.0031308 ? linear * 12.92 : (pow(linear, 1.0 / 2.4) * 1.055) - 0.055;
+        }
+
+        vec3 OETF_sRGB(const vec3 linear) {
+            return vec3(OETF_sRGB(linear.r), OETF_sRGB(linear.g), OETF_sRGB(linear.b));
+        }
+
+        float EOTF_sRGB(float srgb) {
+            // IEC 61966-2-1:1999
+            return srgb <= 0.04045 ? srgb / 12.92 : pow((srgb + 0.055) / 1.055, 2.4);
+        }
+)__SHADER__";
+
 // Dithering must be done in the quantization space
 // When we are writing to an sRGB framebuffer, we must do the following:
-//     EOCF(OECF(color) + dither)
-// We approximate the transfer functions with gamma 2.0 to avoid branches and pow()
+//     EOTF(OETF(color) + dither)
 // The dithering pattern is generated with a triangle noise generator in the range [-0.0,1.0]
 // TODO: Handle linear fp16 render targets
-const char* gFS_Gradient_Functions =
-        "\nfloat triangleNoise(const highp vec2 n) {\n"
-        "    highp vec2 p = fract(n * vec2(5.3987, 5.4421));\n"
-        "    p += dot(p.yx, p.xy + vec2(21.5351, 14.3137));\n"
-        "    highp float xy = p.x * p.y;\n"
-        "    return fract(xy * 95.4307) + fract(xy * 75.04961) - 1.0;\n"
-        "}\n";
+const char* gFS_Gradient_Functions = R"__SHADER__(
+        float triangleNoise(const highp vec2 n) {
+            highp vec2 p = fract(n * vec2(5.3987, 5.4421));
+            p += dot(p.yx, p.xy + vec2(21.5351, 14.3137));
+            highp float xy = p.x * p.y;
+            return fract(xy * 95.4307) + fract(xy * 75.04961) - 1.0;
+        }
+)__SHADER__";
 const char* gFS_Gradient_Preamble[2] = {
         // Linear framebuffer
         "\nvec4 dither(const vec4 color) {\n"
         "    return vec4(color.rgb + (triangleNoise(gl_FragCoord.xy * screenSize.xy) / 255.0), color.a);\n"
         "}\n"
         "\nvec4 gammaMix(const vec4 a, const vec4 b, float v) {\n"
-        "    vec4 c = pow(mix(a, b, v), vec4(vec3(1.0 / 2.2), 1.0));\n"
-        "    return vec4(c.rgb * c.a, c.a);\n"
+        "    vec4 c = mix(a, b, v);\n"
+        "    c.a = EOTF_sRGB(c.a);\n" // This is technically incorrect but preserves compatibility
+        "    return vec4(OETF_sRGB(c.rgb) * c.a, c.a);\n"
         "}\n",
         // sRGB framebuffer
         "\nvec4 dither(const vec4 color) {\n"
@@ -200,13 +227,15 @@
 // The gamma coefficient is chosen to thicken or thin the text accordingly
 // The dot product used to compute the luminance could be approximated with
 // a simple max(color.r, color.g, color.b)
-const char* gFS_Gamma_Preamble =
-        "\n#define GAMMA (%.2f)\n"
-        "#define GAMMA_INV (%.2f)\n"
-        "\nfloat gamma(float a, const vec3 color) {\n"
-        "    float luminance = dot(color, vec3(0.2126, 0.7152, 0.0722));\n"
-        "    return pow(a, luminance < 0.5 ? GAMMA_INV : GAMMA);\n"
-        "}\n";
+const char* gFS_Gamma_Preamble = R"__SHADER__(
+        #define GAMMA (%.2f)
+        #define GAMMA_INV (%.2f)
+
+        float gamma(float a, const vec3 color) {
+            float luminance = dot(color, vec3(0.2126, 0.7152, 0.0722));
+            return pow(a, luminance < 0.5 ? GAMMA_INV : GAMMA);
+        }
+)__SHADER__";
 
 const char* gFS_Main =
         "\nvoid main(void) {\n"
@@ -215,52 +244,6 @@
 const char* gFS_Main_AddDither =
         "    fragColor = dither(fragColor);\n";
 
-// Fast cases
-const char* gFS_Fast_SingleColor =
-        "\nvoid main(void) {\n"
-        "    gl_FragColor = color;\n"
-        "}\n\n";
-const char* gFS_Fast_SingleTexture =
-        "\nvoid main(void) {\n"
-        "    gl_FragColor = texture2D(baseSampler, outTexCoords);\n"
-        "}\n\n";
-const char* gFS_Fast_SingleModulateTexture =
-        "\nvoid main(void) {\n"
-        "    gl_FragColor = color.a * texture2D(baseSampler, outTexCoords);\n"
-        "}\n\n";
-const char* gFS_Fast_SingleA8Texture =
-        "\nvoid main(void) {\n"
-        "    gl_FragColor = texture2D(baseSampler, outTexCoords);\n"
-        "}\n\n";
-const char* gFS_Fast_SingleA8Texture_ApplyGamma =
-        "\nvoid main(void) {\n"
-        "    gl_FragColor = vec4(0.0, 0.0, 0.0, pow(texture2D(baseSampler, outTexCoords).a, GAMMA));\n"
-        "}\n\n";
-const char* gFS_Fast_SingleModulateA8Texture =
-        "\nvoid main(void) {\n"
-        "    gl_FragColor = color * texture2D(baseSampler, outTexCoords).a;\n"
-        "}\n\n";
-const char* gFS_Fast_SingleModulateA8Texture_ApplyGamma =
-        "\nvoid main(void) {\n"
-        "    gl_FragColor = color * gamma(texture2D(baseSampler, outTexCoords).a, color.rgb);\n"
-        "}\n\n";
-const char* gFS_Fast_SingleGradient[2] = {
-        "\nvoid main(void) {\n"
-        "    gl_FragColor = dither(texture2D(gradientSampler, linear));\n"
-        "}\n\n",
-        "\nvoid main(void) {\n"
-        "    gl_FragColor = dither(gammaMix(startColor, endColor, clamp(linear, 0.0, 1.0)));\n"
-        "}\n\n",
-};
-const char* gFS_Fast_SingleModulateGradient[2] = {
-        "\nvoid main(void) {\n"
-        "    gl_FragColor = dither(color.a * texture2D(gradientSampler, linear));\n"
-        "}\n\n",
-        "\nvoid main(void) {\n"
-        "    gl_FragColor = dither(color.a * gammaMix(startColor, endColor, clamp(linear, 0.0, 1.0)));\n"
-        "}\n\n"
-};
-
 // General case
 const char* gFS_Main_FetchColor =
         "    fragColor = color;\n";
@@ -273,7 +256,7 @@
         "    fragColor *= texture2D(baseSampler, vec2(alpha, 0.5)).a;\n";
 const char* gFS_Main_FetchTexture[2] = {
         // Don't modulate
-        "    fragColor = texture2D(baseSampler, outTexCoords);\n",
+        "    fragColor = OETF(texture2D(baseSampler, outTexCoords));\n",
         // Modulate
         "    fragColor = color * texture2D(baseSampler, outTexCoords);\n"
 };
@@ -304,9 +287,9 @@
         "    vec4 gradientColor = gammaMix(startColor, endColor, clamp(index - floor(index), 0.0, 1.0));\n"
 };
 const char* gFS_Main_FetchBitmap =
-        "    vec4 bitmapColor = texture2D(bitmapSampler, outBitmapTexCoords);\n";
+        "    vec4 bitmapColor = OETF(texture2D(bitmapSampler, outBitmapTexCoords));\n";
 const char* gFS_Main_FetchBitmapNpot =
-        "    vec4 bitmapColor = texture2D(bitmapSampler, wrap(outBitmapTexCoords));\n";
+        "    vec4 bitmapColor = OETF(texture2D(bitmapSampler, wrap(outBitmapTexCoords)));\n";
 const char* gFS_Main_BlendShadersBG =
         "    fragColor = blendShaders(gradientColor, bitmapColor)";
 const char* gFS_Main_BlendShadersGB =
@@ -632,71 +615,6 @@
         shader.appendFormat(gFS_Gamma_Preamble, Properties::textGamma, 1.0f / Properties::textGamma);
     }
 
-    // Optimization for common cases
-    if (!description.hasVertexAlpha
-            && !blendFramebuffer
-            && !description.hasColors
-            && description.colorOp == ProgramDescription::ColorFilterMode::None
-            && !description.hasDebugHighlight
-            && !description.hasRoundRectClip) {
-        bool fast = false;
-
-        const bool noShader = !description.hasGradient && !description.hasBitmap;
-        const bool singleTexture = (description.hasTexture || description.hasExternalTexture) &&
-                !description.hasAlpha8Texture && noShader;
-        const bool singleA8Texture = description.hasTexture &&
-                description.hasAlpha8Texture && noShader;
-        const bool singleGradient = !description.hasTexture && !description.hasExternalTexture &&
-                description.hasGradient && !description.hasBitmap &&
-                description.gradientType == ProgramDescription::kGradientLinear;
-
-        if (singleColor) {
-            shader.append(gFS_Fast_SingleColor);
-            fast = true;
-        } else if (singleTexture) {
-            if (!description.modulate) {
-                shader.append(gFS_Fast_SingleTexture);
-            } else {
-                shader.append(gFS_Fast_SingleModulateTexture);
-            }
-            fast = true;
-        } else if (singleA8Texture) {
-            if (!description.modulate) {
-                if (description.hasGammaCorrection) {
-                    shader.append(gFS_Fast_SingleA8Texture_ApplyGamma);
-                } else {
-                    shader.append(gFS_Fast_SingleA8Texture);
-                }
-            } else {
-                if (description.hasGammaCorrection) {
-                    shader.append(gFS_Fast_SingleModulateA8Texture_ApplyGamma);
-                } else {
-                    shader.append(gFS_Fast_SingleModulateA8Texture);
-                }
-            }
-            fast = true;
-        } else if (singleGradient) {
-            shader.append(gFS_Gradient_Functions);
-            shader.append(gFS_Gradient_Preamble[mHasSRGB]);
-            if (!description.modulate) {
-                shader.append(gFS_Fast_SingleGradient[description.isSimpleGradient]);
-            } else {
-                shader.append(gFS_Fast_SingleModulateGradient[description.isSimpleGradient]);
-            }
-            fast = true;
-        }
-
-        if (fast) {
-#if DEBUG_PROGRAMS
-                PROGRAM_LOGD("*** Fast case:\n");
-                PROGRAM_LOGD("*** Generated fragment shader:\n\n");
-                printLongString(shader);
-#endif
-
-            return shader;
-        }
-    }
-
     if (description.hasBitmap) {
         if (description.isShaderBitmapExternal) {
             shader.append(gFS_Uniforms_BitmapExternalSampler);
@@ -719,6 +637,13 @@
     if (description.useShaderBasedWrap) {
         generateTextureWrap(shader, description.bitmapWrapS, description.bitmapWrapT);
     }
+    if (description.hasGradient || description.hasLinearTexture) {
+        shader.append(gFS_Transfer_Functions);
+    }
+    if (description.hasBitmap || ((description.hasTexture || description.hasExternalTexture) &&
+            !description.hasAlpha8Texture)) {
+        shader.append(gFS_OETF[description.hasLinearTexture && !mHasSRGB]);
+    }
     if (description.hasGradient) {
         shader.append(gFS_Gradient_Functions);
         shader.append(gFS_Gradient_Preamble[mHasSRGB]);
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/SkiaCanvas.cpp b/libs/hwui/SkiaCanvas.cpp
index e54bc36..c57b1b3 100644
--- a/libs/hwui/SkiaCanvas.cpp
+++ b/libs/hwui/SkiaCanvas.cpp
@@ -198,9 +198,7 @@
 int SkiaCanvas::saveLayer(float left, float top, float right, float bottom,
             const SkPaint* paint, SaveFlags::Flags flags) {
     const SkRect bounds = SkRect::MakeLTRB(left, top, right, bottom);
-    //always save matrix and clip to match the behaviour of Skia and HWUI pipelines and to ensure
-    //android state tracking behavior matches that of the Skia API (partial save is not supported)
-    const SkCanvas::SaveLayerRec rec(&bounds, paint, layerFlags(flags | SaveFlags::MatrixClip));
+    const SkCanvas::SaveLayerRec rec(&bounds, paint, layerFlags(flags));
 
     return mCanvas->saveLayer(rec);
 }
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 705395e..0dbd767 100644
--- a/libs/hwui/Texture.cpp
+++ b/libs/hwui/Texture.cpp
@@ -44,10 +44,14 @@
     case GL_RGBA16F:
         return 8;
     default:
-        LOG_ALWAYS_FATAL("UNKNOWN FORMAT %d", glFormat);
+        LOG_ALWAYS_FATAL("UNKNOWN FORMAT 0x%x", glFormat);
     }
 }
 
+bool Texture::isLinear() const {
+    return mInternalFormat == GL_RGBA16F;
+}
+
 void Texture::setWrapST(GLenum wrapS, GLenum wrapT, bool bindTexture, bool force) {
 
     if (force || wrapS != mWrapS || wrapT != mWrapT) {
@@ -278,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/Texture.h b/libs/hwui/Texture.h
index b8397cc..ce9d4dc 100644
--- a/libs/hwui/Texture.h
+++ b/libs/hwui/Texture.h
@@ -128,6 +128,11 @@
     }
 
     /**
+     * Returns true if this texture uses a linear encoding format.
+     */
+    bool isLinear() const;
+
+    /**
      * Generation of the backing bitmap,
      */
     uint32_t generation = 0;
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 37126a6..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 += libRS 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/ReorderBarrierDrawables.cpp b/libs/hwui/pipeline/skia/ReorderBarrierDrawables.cpp
index d05e7f6..2ead5c5 100644
--- a/libs/hwui/pipeline/skia/ReorderBarrierDrawables.cpp
+++ b/libs/hwui/pipeline/skia/ReorderBarrierDrawables.cpp
@@ -24,6 +24,7 @@
 #include <SkGaussianEdgeShader.h>
 #include <SkPathOps.h>
 #include <SkRRectsGaussianEdgeMaskFilter.h>
+#include <SkShadowUtils.h>
 
 namespace android {
 namespace uirenderer {
@@ -115,498 +116,6 @@
     }
 }
 
-/**
- * @param canvas             the destination for the shadow draws
- * @param shape              the shape casting the shadow
- * @param casterZValue       the Z value of the caster RRect
- * @param ambientAlpha       the maximum alpha value to use when drawing the ambient shadow
- * @param draw               the function used to draw 'shape'
- */
-template <typename Shape, typename F>
-static void DrawAmbientShadowGeneral(SkCanvas* canvas, const Shape& shape, float casterZValue,
-        float ambientAlpha, F&& draw) {
-    if (ambientAlpha <= 0) {
-        return;
-    }
-
-    const float kHeightFactor = 1.f/128.f;
-    const float kGeomFactor = 64;
-
-    float umbraAlpha = 1 / (1 + SkMaxScalar(casterZValue*kHeightFactor, 0));
-    float radius = casterZValue*kHeightFactor*kGeomFactor;
-
-    sk_sp<SkMaskFilter> mf = SkBlurMaskFilter::Make(kNormal_SkBlurStyle,
-            SkBlurMask::ConvertRadiusToSigma(radius), SkBlurMaskFilter::kNone_BlurFlag);
-    SkPaint paint;
-    paint.setAntiAlias(true);
-    paint.setMaskFilter(std::move(mf));
-    paint.setARGB(ambientAlpha*umbraAlpha, 0, 0, 0);
-
-    draw(shape, paint);
-}
-
-/**
- * @param canvas             the destination for the shadow draws
- * @param shape              the shape casting the shadow
- * @param casterZValue       the Z value of the caster RRect
- * @param lightPos           the position of the light casting the shadow
- * @param lightWidth
- * @param spotAlpha          the maximum alpha value to use when drawing the spot shadow
- * @param draw               the function used to draw 'shape'
- */
-template <typename Shape, typename F>
-static void DrawSpotShadowGeneral(SkCanvas* canvas, const Shape& shape, float casterZValue,
-        float spotAlpha, F&& draw) {
-    if (spotAlpha <= 0) {
-        return;
-    }
-
-    const Vector3 lightPos = SkiaPipeline::getLightCenter();
-    float zRatio = casterZValue / (lightPos.z - casterZValue);
-    // clamp
-    if (zRatio < 0.0f) {
-        zRatio = 0.0f;
-    } else if (zRatio > 0.95f) {
-        zRatio = 0.95f;
-    }
-
-    float blurRadius = SkiaPipeline::getLightRadius()*zRatio;
-
-    SkAutoCanvasRestore acr(canvas, true);
-
-    sk_sp<SkMaskFilter> mf = SkBlurMaskFilter::Make(kNormal_SkBlurStyle,
-            SkBlurMask::ConvertRadiusToSigma(blurRadius), SkBlurMaskFilter::kNone_BlurFlag);
-
-    SkPaint paint;
-    paint.setAntiAlias(true);
-    paint.setMaskFilter(std::move(mf));
-    paint.setARGB(spotAlpha, 0, 0, 0);
-
-    // approximate projection by translating and scaling projected offset of bounds center
-    // TODO: compute the actual 2D projection
-    SkScalar scale = lightPos.z / (lightPos.z - casterZValue);
-    canvas->scale(scale, scale);
-    SkPoint center = SkPoint::Make(shape.getBounds().centerX(), shape.getBounds().centerY());
-    SkMatrix ctmInverse;
-    if (!canvas->getTotalMatrix().invert(&ctmInverse)) {
-        ALOGW("Matrix is degenerate. Will not render shadow!");
-        return;
-    }
-    SkPoint lightPos2D = SkPoint::Make(lightPos.x, lightPos.y);
-    ctmInverse.mapPoints(&lightPos2D, 1);
-    canvas->translate(zRatio*(center.fX - lightPos2D.fX), zRatio*(center.fY - lightPos2D.fY));
-
-    draw(shape, paint);
-}
-
-#define MAX_BLUR_RADIUS 16383.75f
-#define MAX_PAD         64
-
-/**
- * @param casterRect         the rectangle bounds of the RRect casting the shadow
- * @param casterCornerRadius the x&y radius for all the corners of the RRect casting the shadow
- * @param ambientAlpha       the maximum alpha value to use when drawing the ambient shadow
- * @param spotAlpha          the maximum alpha value to use when drawing the spot shadow
- * @param casterAlpha        the alpha value of the RRect casting the shadow (0.0-1.0 range)
- * @param casterZValue       the Z value of the caster RRect
- * @param scaleFactor        the scale needed to map from src-space to device-space
- * @param canvas             the destination for the shadow draws
- */
-static void DrawRRectShadows(const SkRect& casterRect, SkScalar casterCornerRadius,
-        SkScalar ambientAlpha, SkScalar spotAlpha, SkScalar casterAlpha, SkScalar casterZValue,
-        SkScalar scaleFactor, SkCanvas* canvas) {
-    SkASSERT(casterCornerRadius >= 0.0f);
-
-    // For all of these, we need to ensure we have a rrect with radius >= 0.5f in device space
-    const SkScalar minRadius = 0.5f / scaleFactor;
-
-    const bool isOval = casterCornerRadius >= std::max(SkScalarHalf(casterRect.width()),
-            SkScalarHalf(casterRect.height()));
-    const bool isRect = casterCornerRadius <= minRadius;
-
-    sk_sp<SkShader> edgeShader(SkGaussianEdgeShader::Make());
-
-    if (ambientAlpha > 0.0f) {
-        static const float kHeightFactor = 1.0f / 128.0f;
-        static const float kGeomFactor = 64.0f;
-
-        SkScalar srcSpaceAmbientRadius = casterZValue * kHeightFactor * kGeomFactor;
-        // the device-space radius sent to the blur shader must fit in 14.2 fixed point
-        if (srcSpaceAmbientRadius*scaleFactor > MAX_BLUR_RADIUS) {
-            srcSpaceAmbientRadius = MAX_BLUR_RADIUS/scaleFactor;
-        }
-        const float umbraAlpha = 1.0f / (1.0f + std::max(casterZValue * kHeightFactor, 0.0f));
-        const SkScalar ambientOffset = srcSpaceAmbientRadius * umbraAlpha;
-
-        // For the ambient rrect, we inset the offset rect by half the srcSpaceAmbientRadius
-        // to get our stroke shape.
-        SkScalar ambientPathOutset = std::max(ambientOffset - srcSpaceAmbientRadius * 0.5f,
-                minRadius);
-
-        SkRRect ambientRRect;
-        const SkRect temp = casterRect.makeOutset(ambientPathOutset, ambientPathOutset);
-        if (isOval) {
-            ambientRRect = SkRRect::MakeOval(temp);
-        } else if (isRect) {
-            ambientRRect = SkRRect::MakeRectXY(temp, ambientPathOutset, ambientPathOutset);
-        } else {
-            ambientRRect = SkRRect::MakeRectXY(temp, casterCornerRadius + ambientPathOutset,
-                    casterCornerRadius + ambientPathOutset);
-        }
-
-        SkPaint paint;
-        paint.setAntiAlias(true);
-        paint.setStyle(SkPaint::kStroke_Style);
-        // we outset the stroke a little to cover up AA on the interior edge
-        float pad = 0.5f;
-        paint.setStrokeWidth(srcSpaceAmbientRadius + 2.0f * pad);
-        // handle scale of radius and pad due to CTM
-        pad *= scaleFactor;
-        const SkScalar devSpaceAmbientRadius = srcSpaceAmbientRadius * scaleFactor;
-        SkASSERT(devSpaceAmbientRadius <= MAX_BLUR_RADIUS);
-        SkASSERT(pad < MAX_PAD);
-        // convert devSpaceAmbientRadius to 14.2 fixed point and place in the R & G components
-        // convert pad to 6.2 fixed point and place in the B component
-        uint16_t iDevSpaceAmbientRadius = (uint16_t)(4.0f * devSpaceAmbientRadius);
-        paint.setColor(SkColorSetARGB((unsigned char) ambientAlpha, iDevSpaceAmbientRadius >> 8,
-                iDevSpaceAmbientRadius & 0xff, (unsigned char)(4.0f * pad)));
-
-        paint.setShader(edgeShader);
-        canvas->drawRRect(ambientRRect, paint);
-    }
-
-    if (spotAlpha > 0.0f) {
-        const Vector3 lightPos = SkiaPipeline::getLightCenter();
-        float zRatio = casterZValue / (lightPos.z - casterZValue);
-        // clamp
-        if (zRatio < 0.0f) {
-            zRatio = 0.0f;
-        } else if (zRatio > 0.95f) {
-            zRatio = 0.95f;
-        }
-
-        const SkScalar lightWidth = SkiaPipeline::getLightRadius();
-        SkScalar srcSpaceSpotRadius = 2.0f * lightWidth * zRatio;
-        // the device-space radius sent to the blur shader must fit in 14.2 fixed point
-        if (srcSpaceSpotRadius*scaleFactor > MAX_BLUR_RADIUS) {
-            srcSpaceSpotRadius = MAX_BLUR_RADIUS/scaleFactor;
-        }
-
-        SkRRect spotRRect;
-        if (isOval) {
-            spotRRect = SkRRect::MakeOval(casterRect);
-        } else if (isRect) {
-            spotRRect = SkRRect::MakeRectXY(casterRect, minRadius, minRadius);
-        } else {
-            spotRRect = SkRRect::MakeRectXY(casterRect, casterCornerRadius, casterCornerRadius);
-        }
-
-        SkRRect spotShadowRRect;
-        // Compute the scale and translation for the spot shadow.
-        const SkScalar scale = lightPos.z / (lightPos.z - casterZValue);
-        spotRRect.transform(SkMatrix::MakeScale(scale, scale), &spotShadowRRect);
-
-        SkPoint center = SkPoint::Make(spotShadowRRect.rect().centerX(),
-                                       spotShadowRRect.rect().centerY());
-        SkMatrix ctmInverse;
-        if (!canvas->getTotalMatrix().invert(&ctmInverse)) {
-            ALOGW("Matrix is degenerate. Will not render spot shadow!");
-            return;
-        }
-        SkPoint lightPos2D = SkPoint::Make(lightPos.x, lightPos.y);
-        ctmInverse.mapPoints(&lightPos2D, 1);
-        const SkPoint spotOffset = SkPoint::Make(zRatio*(center.fX - lightPos2D.fX),
-                zRatio*(center.fY - lightPos2D.fY));
-
-        SkAutoCanvasRestore acr(canvas, true);
-
-        // We want to extend the stroked area in so that it meets up with the caster
-        // geometry. The stroked geometry will, by definition already be inset half the
-        // stroke width but we also have to account for the scaling.
-        // We also add 1/2 to cover up AA on the interior edge.
-        SkScalar scaleOffset = (scale - 1.0f) * SkTMax(SkTMax(SkTAbs(casterRect.fLeft),
-                SkTAbs(casterRect.fRight)), SkTMax(SkTAbs(casterRect.fTop),
-                SkTAbs(casterRect.fBottom)));
-        SkScalar insetAmount = spotOffset.length() - (0.5f * srcSpaceSpotRadius) +
-                scaleOffset + 0.5f;
-
-        // Compute area
-        SkScalar strokeWidth = srcSpaceSpotRadius + insetAmount;
-        SkScalar strokedArea = 2.0f*strokeWidth * (spotShadowRRect.width()
-                + spotShadowRRect.height());
-        SkScalar filledArea = (spotShadowRRect.height() + srcSpaceSpotRadius)
-                * (spotShadowRRect.width() + srcSpaceSpotRadius);
-
-        SkPaint paint;
-        paint.setAntiAlias(true);
-
-        // If the area of the stroked geometry is larger than the fill geometry, just fill it.
-        if (strokedArea > filledArea || casterAlpha < 1.0f || insetAmount < 0.0f) {
-            paint.setStyle(SkPaint::kStrokeAndFill_Style);
-            paint.setStrokeWidth(srcSpaceSpotRadius);
-        } else {
-            // Since we can't have unequal strokes, inset the shadow rect so the inner
-            // and outer edges of the stroke will land where we want.
-            SkRect insetRect = spotShadowRRect.rect().makeInset(insetAmount/2.0f, insetAmount/2.0f);
-            SkScalar insetRad = SkTMax(spotShadowRRect.getSimpleRadii().fX - insetAmount/2.0f,
-                    minRadius);
-            spotShadowRRect = SkRRect::MakeRectXY(insetRect, insetRad, insetRad);
-            paint.setStyle(SkPaint::kStroke_Style);
-            paint.setStrokeWidth(strokeWidth);
-        }
-
-        // handle scale of radius and pad due to CTM
-        const SkScalar devSpaceSpotRadius = srcSpaceSpotRadius * scaleFactor;
-        SkASSERT(devSpaceSpotRadius <= MAX_BLUR_RADIUS);
-
-        const SkScalar devSpaceSpotPad = 0;
-        SkASSERT(devSpaceSpotPad < MAX_PAD);
-
-        // convert devSpaceSpotRadius to 14.2 fixed point and place in the R & G
-        // components convert devSpaceSpotPad to 6.2 fixed point and place in the B component
-        uint16_t iDevSpaceSpotRadius = (uint16_t)(4.0f * devSpaceSpotRadius);
-        paint.setColor(SkColorSetARGB((unsigned char) spotAlpha, iDevSpaceSpotRadius >> 8,
-                iDevSpaceSpotRadius & 0xff, (unsigned char)(4.0f * devSpaceSpotPad)));
-        paint.setShader(edgeShader);
-
-        canvas->translate(spotOffset.fX, spotOffset.fY);
-        canvas->drawRRect(spotShadowRRect, paint);
-    }
-}
-
-/**
- * @param casterRect         the rectangle bounds of the RRect casting the shadow
- * @param casterCornerRadius the x&y radius for all the corners of the RRect casting the shadow
- * @param ambientAlpha       the maximum alpha value to use when drawing the ambient shadow
- * @param spotAlpha          the maximum alpha value to use when drawing the spot shadow
- * @param casterZValue       the Z value of the caster RRect
- * @param scaleFactor        the scale needed to map from src-space to device-space
- * @param clipRR             the oval or rect with which the drawn roundrect must be intersected
- * @param canvas             the destination for the shadow draws
- */
-static void DrawRRectShadowsWithClip(const SkRect& casterRect, SkScalar casterCornerRadius,
-        SkScalar ambientAlpha, SkScalar spotAlpha, SkScalar casterZValue, SkScalar scaleFactor,
-        const SkRRect& clipRR, SkCanvas* canvas) {
-    SkASSERT(casterCornerRadius >= 0.0f);
-
-    const bool isOval = casterCornerRadius >= std::max(SkScalarHalf(casterRect.width()),
-            SkScalarHalf(casterRect.height()));
-
-    if (ambientAlpha > 0.0f) {
-        static const float kHeightFactor = 1.0f / 128.0f;
-        static const float kGeomFactor = 64.0f;
-
-        const SkScalar srcSpaceAmbientRadius = casterZValue * kHeightFactor * kGeomFactor;
-        const SkScalar devSpaceAmbientRadius = srcSpaceAmbientRadius * scaleFactor;
-
-        const float umbraAlpha = 1.0f / (1.0f + std::max(casterZValue * kHeightFactor, 0.0f));
-        const SkScalar ambientOffset = srcSpaceAmbientRadius * umbraAlpha;
-
-        const SkRect srcSpaceAmbientRect = casterRect.makeOutset(ambientOffset, ambientOffset);
-        SkRect devSpaceAmbientRect;
-        canvas->getTotalMatrix().mapRect(&devSpaceAmbientRect, srcSpaceAmbientRect);
-
-        SkRRect devSpaceAmbientRRect;
-        if (isOval) {
-            devSpaceAmbientRRect = SkRRect::MakeOval(devSpaceAmbientRect);
-        } else {
-            const SkScalar devSpaceCornerRadius = scaleFactor * (casterCornerRadius + ambientOffset);
-            devSpaceAmbientRRect = SkRRect::MakeRectXY(devSpaceAmbientRect, devSpaceCornerRadius,
-                    devSpaceCornerRadius);
-        }
-
-        const SkRect srcSpaceAmbClipRect = clipRR.rect().makeOutset(ambientOffset, ambientOffset);
-        SkRect devSpaceAmbClipRect;
-        canvas->getTotalMatrix().mapRect(&devSpaceAmbClipRect, srcSpaceAmbClipRect);
-        SkRRect devSpaceAmbientClipRR;
-        if (clipRR.isOval()) {
-            devSpaceAmbientClipRR = SkRRect::MakeOval(devSpaceAmbClipRect);
-        } else {
-            SkASSERT(clipRR.isRect());
-            devSpaceAmbientClipRR = SkRRect::MakeRect(devSpaceAmbClipRect);
-        }
-
-        SkRect cover = srcSpaceAmbClipRect;
-        if (!cover.intersect(srcSpaceAmbientRect)) {
-            return;
-        }
-
-        SkPaint paint;
-        paint.setColor(SkColorSetARGB((unsigned char) ambientAlpha, 0, 0, 0));
-        paint.setMaskFilter(SkRRectsGaussianEdgeMaskFilter::Make(devSpaceAmbientRRect,
-            devSpaceAmbientClipRR, devSpaceAmbientRadius));
-        canvas->drawRect(cover, paint);
-    }
-
-    if (spotAlpha > 0.0f) {
-        const Vector3 lightPos = SkiaPipeline::getLightCenter();
-        float zRatio = casterZValue / (lightPos.z - casterZValue);
-        // clamp
-        if (zRatio < 0.0f) {
-            zRatio = 0.0f;
-        } else if (zRatio > 0.95f) {
-            zRatio = 0.95f;
-        }
-
-        const SkScalar lightWidth = SkiaPipeline::getLightRadius();
-        const SkScalar srcSpaceSpotRadius = 2.0f * lightWidth * zRatio;
-        const SkScalar devSpaceSpotRadius = srcSpaceSpotRadius * scaleFactor;
-
-        // Compute the scale and translation for the spot shadow.
-        const SkScalar scale = lightPos.z / (lightPos.z - casterZValue);
-        const SkMatrix spotMatrix = SkMatrix::MakeScale(scale, scale);
-
-        SkRect srcSpaceScaledRect = casterRect;
-        spotMatrix.mapRect(&srcSpaceScaledRect);
-        srcSpaceScaledRect.outset(SkScalarHalf(srcSpaceSpotRadius),
-                SkScalarHalf(srcSpaceSpotRadius));
-
-        SkRRect srcSpaceSpotRRect;
-        if (isOval) {
-            srcSpaceSpotRRect = SkRRect::MakeOval(srcSpaceScaledRect);
-        } else {
-            srcSpaceSpotRRect = SkRRect::MakeRectXY(srcSpaceScaledRect, casterCornerRadius * scale,
-                    casterCornerRadius * scale);
-        }
-
-        SkPoint center = SkPoint::Make(srcSpaceSpotRRect.rect().centerX(),
-                srcSpaceSpotRRect.rect().centerY());
-        SkMatrix ctmInverse;
-        if (!canvas->getTotalMatrix().invert(&ctmInverse)) {
-            ALOGW("Matrix is degenerate. Will not render spot shadow!");
-            return;
-        }
-        SkPoint lightPos2D = SkPoint::Make(lightPos.x, lightPos.y);
-        ctmInverse.mapPoints(&lightPos2D, 1);
-        const SkPoint spotOffset = SkPoint::Make(zRatio*(center.fX - lightPos2D.fX),
-                zRatio*(center.fY - lightPos2D.fY));
-
-        SkAutoCanvasRestore acr(canvas, true);
-        canvas->translate(spotOffset.fX, spotOffset.fY);
-
-        SkRect devSpaceScaledRect;
-        canvas->getTotalMatrix().mapRect(&devSpaceScaledRect, srcSpaceScaledRect);
-
-        SkRRect devSpaceSpotRRect;
-        if (isOval) {
-            devSpaceSpotRRect = SkRRect::MakeOval(devSpaceScaledRect);
-        } else {
-            const SkScalar devSpaceScaledCornerRadius = casterCornerRadius * scale * scaleFactor;
-            devSpaceSpotRRect = SkRRect::MakeRectXY(devSpaceScaledRect, devSpaceScaledCornerRadius,
-                    devSpaceScaledCornerRadius);
-        }
-
-        SkPaint paint;
-        paint.setColor(SkColorSetARGB((unsigned char) spotAlpha, 0, 0, 0));
-
-        SkRect srcSpaceScaledClipRect = clipRR.rect();
-        spotMatrix.mapRect(&srcSpaceScaledClipRect);
-        srcSpaceScaledClipRect.outset(SkScalarHalf(srcSpaceSpotRadius),
-                SkScalarHalf(srcSpaceSpotRadius));
-
-        SkRect devSpaceScaledClipRect;
-        canvas->getTotalMatrix().mapRect(&devSpaceScaledClipRect, srcSpaceScaledClipRect);
-        SkRRect devSpaceSpotClipRR;
-        if (clipRR.isOval()) {
-            devSpaceSpotClipRR = SkRRect::MakeOval(devSpaceScaledClipRect);
-        } else {
-            SkASSERT(clipRR.isRect());
-            devSpaceSpotClipRR = SkRRect::MakeRect(devSpaceScaledClipRect);
-        }
-
-        paint.setMaskFilter(SkRRectsGaussianEdgeMaskFilter::Make(devSpaceSpotRRect,
-            devSpaceSpotClipRR, devSpaceSpotRadius));
-
-        SkRect cover = srcSpaceScaledClipRect;
-        if (!cover.intersect(srcSpaceSpotRRect.rect())) {
-            return;
-        }
-
-        canvas->drawRect(cover, paint);
-    }
-}
-
-/**
- * @param casterRect         the rectangle bounds of the RRect casting the shadow
- * @param casterCornerRadius the x&y radius for all the corners of the RRect casting the shadow
- * @param casterClipRect     a rectangular clip that must be intersected with the
- *                           shadow-casting RRect prior to casting the shadow
- * @param revealClip         a circular clip that must be interested with the castClipRect
- *                           and the shadow-casting rect prior to casting the shadow
- * @param ambientAlpha       the maximum alpha value to use when drawing the ambient shadow
- * @param spotAlpha          the maximum alpha value to use when drawing the spot shadow
- * @param casterAlpha        the alpha value of the RRect casting the shadow (0.0-1.0 range)
- * @param casterZValue       the Z value of the caster RRect
- * @param canvas             the destination for the shadow draws
- *
- * We have special cases for 4 round rect shadow draws:
- *    1) a RRect clipped by a reveal animation
- *    2) a RRect clipped by a rectangle
- *    3) an unclipped RRect with non-uniform scale
- *    4) an unclipped RRect with uniform scale
- * 1,2 and 4 require that the scale is uniform.
- * 1 and 2 require that rects stay rects.
- */
-static bool DrawShadowsAsRRects(const SkRect& casterRect, SkScalar casterCornerRadius,
-        const SkRect& casterClipRect, const RevealClip& revealClip, SkScalar ambientAlpha,
-        SkScalar spotAlpha, SkScalar casterAlpha, SkScalar casterZValue, SkCanvas* canvas) {
-    SkScalar scaleFactors[2];
-    if (!canvas->getTotalMatrix().getMinMaxScales(scaleFactors)) {
-        ALOGW("Matrix is degenerate. Will not render shadow!");
-        return false;
-    }
-
-    // The casterClipRect will be empty when bounds clipping is disabled
-    bool casterIsClippedByRect = !casterClipRect.isEmpty();
-    bool uniformScale = scaleFactors[0] == scaleFactors[1];
-
-    if (revealClip.willClip()) {
-        if (casterIsClippedByRect || !uniformScale || !canvas->getTotalMatrix().rectStaysRect()) {
-            return false;  // Fall back to the slow path since PathOps are required
-        }
-
-        const float revealRadius = revealClip.getRadius();
-        SkRect revealClipRect = SkRect::MakeLTRB(revealClip.getX()-revealRadius,
-                revealClip.getY()-revealRadius, revealClip.getX()+revealRadius,
-                revealClip.getY()+revealRadius);
-        SkRRect revealClipRR = SkRRect::MakeOval(revealClipRect);
-
-        DrawRRectShadowsWithClip(casterRect, casterCornerRadius, ambientAlpha, spotAlpha,
-                casterZValue, scaleFactors[0], revealClipRR, canvas);
-        return true;
-    }
-
-    if (casterIsClippedByRect) {
-        if (!uniformScale || !canvas->getTotalMatrix().rectStaysRect()) {
-            return false;  // Fall back to the slow path since PathOps are required
-        }
-
-        SkRRect casterClipRR = SkRRect::MakeRect(casterClipRect);
-
-        DrawRRectShadowsWithClip(casterRect, casterCornerRadius, ambientAlpha, spotAlpha,
-                casterZValue, scaleFactors[0], casterClipRR, canvas);
-        return true;
-    }
-
-    // The fast path needs uniform scale
-    if (!uniformScale) {
-        SkRRect casterRR = SkRRect::MakeRectXY(casterRect, casterCornerRadius, casterCornerRadius);
-        DrawAmbientShadowGeneral(canvas, casterRR, casterZValue, ambientAlpha,
-                [&](const SkRRect& rrect, const SkPaint& paint) {
-                    canvas->drawRRect(rrect, paint);
-                });
-        DrawSpotShadowGeneral(canvas, casterRR, casterZValue, spotAlpha,
-                [&](const SkRRect& rrect, const SkPaint& paint) {
-                canvas->drawRRect(rrect, paint);
-                });
-        return true;
-    }
-
-    DrawRRectShadows(casterRect, casterCornerRadius, ambientAlpha, spotAlpha, casterAlpha,
-            casterZValue, scaleFactors[0], canvas);
-    return true;
-}
-
 // copied from FrameBuilder::deferShadow
 void EndReorderBarrierDrawable::drawShadow(SkCanvas* canvas, RenderNodeDrawable* caster) {
     const RenderProperties& casterProperties = caster->getNodeProperties();
@@ -626,8 +135,8 @@
         return;
     }
 
-    float ambientAlpha = SkiaPipeline::getAmbientShadowAlpha()*casterAlpha;
-    float spotAlpha = SkiaPipeline::getSpotShadowAlpha()*casterAlpha;
+    float ambientAlpha = (SkiaPipeline::getAmbientShadowAlpha()/255.f)*casterAlpha;
+    float spotAlpha = (SkiaPipeline::getSpotShadowAlpha()/255.f)*casterAlpha;
     const float casterZValue = casterProperties.getZ();
 
     const RevealClip& revealClip = casterProperties.getRevealClip();
@@ -659,19 +168,7 @@
     hwuiMatrix.copyTo(shadowMatrix);
     canvas->concat(shadowMatrix);
 
-    const Outline& casterOutline = casterProperties.getOutline();
-    Rect possibleRect;
-    float radius;
-    if (casterOutline.getAsRoundRect(&possibleRect, &radius)) {
-        if (DrawShadowsAsRRects(possibleRect.toSkRect(), radius, casterClipRect, revealClip,
-                ambientAlpha, spotAlpha, casterAlpha, casterZValue, canvas)) {
-            return;
-        }
-    }
-
-    // Hard cases and calls to general shadow code
     const SkPath* casterOutlinePath = casterProperties.getOutline().getPath();
-
     // holds temporary SkPath to store the result of intersections
     SkPath tmpPath;
     const SkPath* casterPath = casterOutlinePath;
@@ -691,16 +188,11 @@
         Op(*casterPath, clipBoundsPath, kIntersect_SkPathOp, &tmpPath);
         casterPath = &tmpPath;
     }
-
-    DrawAmbientShadowGeneral(canvas, *casterPath, casterZValue, ambientAlpha,
-            [&](const SkPath& path, const SkPaint& paint) {
-                canvas->drawPath(path, paint);
-            });
-
-    DrawSpotShadowGeneral(canvas, *casterPath, casterZValue, spotAlpha,
-            [&](const SkPath& path, const SkPaint& paint) {
-                canvas->drawPath(path, paint);
-            });
+    const Vector3 lightPos = SkiaPipeline::getLightCenter();
+    SkPoint3 skiaLightPos = SkPoint3::Make(lightPos.x, lightPos.y, lightPos.z);
+    SkShadowUtils::DrawShadow(canvas, *casterPath, casterZValue, skiaLightPos,
+            SkiaPipeline::getLightRadius(), ambientAlpha, spotAlpha, SK_ColorBLACK,
+            casterAlpha < 1.0f ? SkShadowFlags::kTransparentOccluder_ShadowFlag : 0);
 }
 
 }; // namespace skiapipeline
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/pipeline/skia/SkiaOpenGLPipeline.cpp b/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp
index de80ee3..f2b0eb3 100644
--- a/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp
+++ b/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp
@@ -128,6 +128,8 @@
         return false;
     }
 
+    // acquire most recent buffer for drawing
+    deferredLayer->updateTexImage();
     deferredLayer->apply();
 
     SkCanvas canvas(*bitmap);
diff --git a/libs/hwui/renderstate/RenderState.cpp b/libs/hwui/renderstate/RenderState.cpp
index 0d567f7..7dfc2ee 100644
--- a/libs/hwui/renderstate/RenderState.cpp
+++ b/libs/hwui/renderstate/RenderState.cpp
@@ -80,6 +80,7 @@
     delete mStencil;
     mStencil = nullptr;
 
+    destroyLayersInUpdater();
     GpuMemoryTracker::onGpuContextDestroyed();
 }
 
diff --git a/libs/hwui/renderstate/RenderState.h b/libs/hwui/renderstate/RenderState.h
index a44fa9d..f78bf7a 100644
--- a/libs/hwui/renderstate/RenderState.h
+++ b/libs/hwui/renderstate/RenderState.h
@@ -99,8 +99,6 @@
         mActiveLayerUpdaters.erase(layerUpdater);
     }
 
-    void destroyLayersInUpdater();
-
     // TODO: This system is a little clunky feeling, this could use some
     // more thinking...
     void postDecStrong(VirtualLightRefBase* object);
@@ -121,6 +119,7 @@
 private:
     void interruptForFunctorInvoke();
     void resumeFromFunctorInvoke();
+    void destroyLayersInUpdater();
 
     explicit RenderState(renderthread::RenderThread& thread);
     ~RenderState();
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 5a7de1d..a53e5e0 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -570,7 +570,6 @@
         }
         mRenderPipeline->onDestroyHardwareResources();
     }
-    mRenderThread.renderState().destroyLayersInUpdater();
 }
 
 void CanvasContext::trimMemory(RenderThread& thread, int level) {
diff --git a/libs/hwui/renderthread/OpenGLPipeline.cpp b/libs/hwui/renderthread/OpenGLPipeline.cpp
index 8a5d9cc..acd6110 100644
--- a/libs/hwui/renderthread/OpenGLPipeline.cpp
+++ b/libs/hwui/renderthread/OpenGLPipeline.cpp
@@ -120,6 +120,8 @@
 
 bool OpenGLPipeline::copyLayerInto(DeferredLayerUpdater* layer, SkBitmap* bitmap) {
     ATRACE_CALL();
+    // acquire most recent buffer for drawing
+    layer->updateTexImage();
     layer->apply();
     return OpenGLReadbackImpl::copyLayerInto(mRenderThread,
             static_cast<GlLayer&>(*layer->backingLayer()), bitmap);
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp
index fb79272..11614fa 100644
--- a/libs/hwui/renderthread/RenderProxy.cpp
+++ b/libs/hwui/renderthread/RenderProxy.cpp
@@ -667,11 +667,17 @@
 }
 
 int RenderProxy::copyGraphicBufferInto(GraphicBuffer* buffer, SkBitmap* bitmap) {
-    SETUP_TASK(copyGraphicBufferInto);
-    args->thread = &RenderThread::getInstance();
-    args->bitmap = bitmap;
-    args->buffer = buffer;
-    return static_cast<int>(reinterpret_cast<intptr_t>(staticPostAndWait(task)));
+    RenderThread& thread = RenderThread::getInstance();
+    if (Properties::isSkiaEnabled() && gettid() == thread.getTid()) {
+        //TODO: fix everything that hits this. We should never be triggering a readback ourselves.
+        return (int) thread.readback().copyGraphicBufferInto(buffer, bitmap);
+    } else {
+        SETUP_TASK(copyGraphicBufferInto);
+        args->thread = &thread;
+        args->bitmap = bitmap;
+        args->buffer = buffer;
+        return static_cast<int>(reinterpret_cast<intptr_t>(staticPostAndWait(task)));
+    }
 }
 
 void RenderProxy::post(RenderTask* task) {
@@ -690,6 +696,7 @@
 
 void* RenderProxy::staticPostAndWait(MethodInvokeRenderTask* task) {
     RenderThread& thread = RenderThread::getInstance();
+    LOG_ALWAYS_FATAL_IF(gettid() == thread.getTid());
     void* retval;
     task->setReturnPtr(&retval);
     thread.queueAndWait(task);
diff --git a/libs/hwui/renderthread/VulkanManager.cpp b/libs/hwui/renderthread/VulkanManager.cpp
index 454ce4d..c2c2f22 100644
--- a/libs/hwui/renderthread/VulkanManager.cpp
+++ b/libs/hwui/renderthread/VulkanManager.cpp
@@ -603,6 +603,11 @@
 }
 
 void VulkanManager::swapBuffers(VulkanSurface* surface) {
+    if (CC_UNLIKELY(Properties::waitForGpuCompletion)) {
+        ATRACE_NAME("Finishing GPU work");
+        mDeviceWaitIdle(mBackendContext->fDevice);
+    }
+
     VulkanSurface::BackbufferInfo* backbuffer = surface->mBackbuffers +
             surface->mCurrentBackbufferIndex;
     GrVkImageInfo* imageInfo;
diff --git a/libs/hwui/tests/common/TestContext.cpp b/libs/hwui/tests/common/TestContext.cpp
index 5e937f3..c1ca1e7 100644
--- a/libs/hwui/tests/common/TestContext.cpp
+++ b/libs/hwui/tests/common/TestContext.cpp
@@ -16,6 +16,8 @@
 
 #include "tests/common/TestContext.h"
 
+#include <cutils/trace.h>
+
 namespace android {
 namespace uirenderer {
 namespace test {
@@ -98,6 +100,11 @@
 }
 
 void TestContext::waitForVsync() {
+    // Hacky fix for not getting sysprop change callbacks
+    // We just poll the sysprop in vsync since it's when the UI thread is
+    // "idle" and shouldn't burn too much time
+    atrace_update_tags();
+
     if (mConsumer.get()) {
         BufferItem buffer;
         if (mConsumer->acquireBuffer(&buffer, 0, false) == OK) {
diff --git a/libs/hwui/tests/common/TestUtils.cpp b/libs/hwui/tests/common/TestUtils.cpp
index 3e52c39..64ec58d 100644
--- a/libs/hwui/tests/common/TestUtils.cpp
+++ b/libs/hwui/tests/common/TestUtils.cpp
@@ -74,7 +74,11 @@
     layerUpdater->setTransform(&transform);
 
     // updateLayer so it's ready to draw
-    layerUpdater->updateLayer(true, GL_TEXTURE_EXTERNAL_OES, Matrix4::identity().data);
+    layerUpdater->updateLayer(true, Matrix4::identity().data);
+    if (layerUpdater->backingLayer()->getApi() == Layer::Api::OpenGL) {
+        static_cast<GlLayer*>(layerUpdater->backingLayer())->setRenderTarget(
+                GL_TEXTURE_EXTERNAL_OES);
+    }
     return layerUpdater;
 }
 
diff --git a/libs/hwui/tests/common/scenes/BitmapShaders.cpp b/libs/hwui/tests/common/scenes/BitmapShaders.cpp
index e03c9e8..a7ebb68 100644
--- a/libs/hwui/tests/common/scenes/BitmapShaders.cpp
+++ b/libs/hwui/tests/common/scenes/BitmapShaders.cpp
@@ -48,21 +48,17 @@
         SkBitmap bitmap;
         SkPaint paint;
         hwuiBitmap->getSkBitmapForShaders(&bitmap);
-
-        sk_sp<SkShader> repeatShader = SkMakeBitmapShader(bitmap,
+        sk_sp<SkImage> image = SkMakeImageFromRasterBitmap(bitmap, kNever_SkCopyPixelsMode);
+        sk_sp<SkShader> repeatShader = image->makeShader(
                 SkShader::TileMode::kRepeat_TileMode,
                 SkShader::TileMode::kRepeat_TileMode,
-                nullptr,
-                kNever_SkCopyPixelsMode,
                 nullptr);
         paint.setShader(std::move(repeatShader));
         canvas.drawRoundRect(0, 0, 500, 500, 50.0f, 50.0f, paint);
 
-        sk_sp<SkShader> mirrorShader = SkMakeBitmapShader(bitmap,
+        sk_sp<SkShader> mirrorShader = image->makeShader(
                 SkShader::TileMode::kMirror_TileMode,
                 SkShader::TileMode::kMirror_TileMode,
-                nullptr,
-                kNever_SkCopyPixelsMode,
                 nullptr);
         paint.setShader(std::move(mirrorShader));
         canvas.drawRoundRect(0, 600, 500, 1100, 50.0f, 50.0f, paint);
diff --git a/libs/hwui/tests/common/scenes/ShadowShaderAnimation.cpp b/libs/hwui/tests/common/scenes/ShadowShaderAnimation.cpp
new file mode 100644
index 0000000..fac3968
--- /dev/null
+++ b/libs/hwui/tests/common/scenes/ShadowShaderAnimation.cpp
@@ -0,0 +1,68 @@
+/*
+ * 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.
+ */
+
+#include "TestSceneBase.h"
+
+class ShadowShaderAnimation;
+
+static TestScene::Registrar _ShadowShader(TestScene::Info{
+    "shadowshader",
+    "A set of overlapping shadowed areas with simple tessellation useful for"
+    " benchmarking shadow shader performance.",
+    TestScene::simpleCreateScene<ShadowShaderAnimation>
+});
+
+class ShadowShaderAnimation : public TestScene {
+public:
+    std::vector< sp<RenderNode> > cards;
+    void createContent(int width, int height, Canvas& canvas) override {
+        canvas.drawColor(0xFFFFFFFF, SkBlendMode::kSrcOver);
+        canvas.insertReorderBarrier(true);
+
+        int outset = 50;
+        for (int i = 0; i < 10; i++) {
+            sp<RenderNode> card = createCard(outset, outset,
+                    width - (outset * 2), height - (outset * 2));
+            canvas.drawRenderNode(card.get());
+            cards.push_back(card);
+        }
+
+        canvas.insertReorderBarrier(false);
+    }
+    void doFrame(int frameNr) override {
+        int curFrame = frameNr % 10;
+        for (size_t ci = 0; ci < cards.size(); ci++) {
+            cards[ci]->mutateStagingProperties().setTranslationX(curFrame);
+            cards[ci]->mutateStagingProperties().setTranslationY(curFrame);
+            cards[ci]->setPropertyFieldsDirty(RenderNode::X | RenderNode::Y);
+        }
+    }
+private:
+    sp<RenderNode> createCard(int x, int y, int width, int height) {
+        return TestUtils::createNode(x, y, x + width, y + height,
+                [width, height](RenderProperties& props, Canvas& canvas) {
+            props.setElevation(1000);
+
+            // Set 0 radius, no clipping, so shadow is easy to compute. Slightly transparent outline
+            // to signal contents aren't opaque (not necessary though, as elevation is so high, no
+            // inner content to cut out)
+            props.mutableOutline().setRoundRect(0, 0, width, height, 0, 0.99f);
+            props.mutableOutline().setShouldClip(false);
+
+            // don't draw anything to card's canvas - we just want the shadow
+        });
+    }
+};
diff --git a/libs/hwui/tests/common/scenes/SimpleColorMatrixAnimation.cpp b/libs/hwui/tests/common/scenes/SimpleColorMatrixAnimation.cpp
new file mode 100644
index 0000000..a63a585
--- /dev/null
+++ b/libs/hwui/tests/common/scenes/SimpleColorMatrixAnimation.cpp
@@ -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.
+ */
+
+#include "TestSceneBase.h"
+
+#include <SkColorMatrixFilter.h>
+#include <SkGradientShader.h>
+
+class SimpleColorMatrixAnimation;
+
+static TestScene::Registrar _SimpleColorMatrix(TestScene::Info{
+    "simpleColorMatrix",
+    "A color matrix shader benchmark for the simple scale/translate case, which has R, G, and B "
+    "all scaled and translated the same amount.",
+    TestScene::simpleCreateScene<SimpleColorMatrixAnimation>
+});
+
+class SimpleColorMatrixAnimation : public TestScene {
+public:
+    std::vector< sp<RenderNode> > cards;
+    void createContent(int width, int height, Canvas& canvas) override {
+        canvas.drawColor(Color::White, SkBlendMode::kSrcOver);
+
+        sp<RenderNode> card = createCard(0, 0, width, height);
+        canvas.drawRenderNode(card.get());
+        cards.push_back(card);
+    }
+    void doFrame(int frameNr) override {
+        int curFrame = frameNr % 20;
+        for (size_t ci = 0; ci < cards.size(); ci++) {
+            cards[ci]->mutateStagingProperties().setTranslationX(curFrame);
+            cards[ci]->mutateStagingProperties().setTranslationY(curFrame);
+            cards[ci]->setPropertyFieldsDirty(RenderNode::X | RenderNode::Y);
+        }
+    }
+private:
+    sp<RenderNode> createCard(int x, int y, int width, int height) {
+        return TestUtils::createNode(x, y, x + width, y + height,
+                [width, height](RenderProperties& props, Canvas& canvas) {
+            SkPaint paint;
+            float matrix[20] = { 0 };
+
+            // Simple scale/translate case where R, G, and B are all treated equivalently
+            matrix[SkColorMatrix::kR_Scale] = 1.1f;
+            matrix[SkColorMatrix::kG_Scale] = 1.1f;
+            matrix[SkColorMatrix::kB_Scale] = 1.1f;
+            matrix[SkColorMatrix::kA_Scale] = 0.5f;
+
+            matrix[SkColorMatrix::kR_Trans] = 5.0f;
+            matrix[SkColorMatrix::kG_Trans] = 5.0f;
+            matrix[SkColorMatrix::kB_Trans] = 5.0f;
+            matrix[SkColorMatrix::kA_Trans] = 10.0f;
+
+            paint.setColorFilter(SkColorFilter::MakeMatrixFilterRowMajor255(matrix));
+
+            // set a shader so it's not likely for the matrix to be optimized away (since a clever
+            // enough renderer might apply it directly to the paint color)
+            float pos[] = { 0, 1 };
+            SkPoint pts[] = { SkPoint::Make(0, 0), SkPoint::Make(width, height) };
+            SkColor colors[2] = { Color::DeepPurple_500, Color::DeepOrange_500 };
+            paint.setShader(SkGradientShader::MakeLinear(pts, colors, pos, 2,
+                SkShader::kClamp_TileMode));
+
+            // overdraw several times to emphasize shader cost
+            for (int i = 0; i < 10; i++) {
+                canvas.drawRect(i, i, width, height, paint);
+            }
+        });
+    }
+};
diff --git a/libs/hwui/tests/common/scenes/SimpleGradientAnimation.cpp b/libs/hwui/tests/common/scenes/SimpleGradientAnimation.cpp
new file mode 100644
index 0000000..053eb6d
--- /dev/null
+++ b/libs/hwui/tests/common/scenes/SimpleGradientAnimation.cpp
@@ -0,0 +1,65 @@
+/*
+ * 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.
+ */
+
+
+#include "TestSceneBase.h"
+
+#include <SkGradientShader.h>
+
+class SimpleGradientAnimation;
+
+static TestScene::Registrar _SimpleGradient(TestScene::Info{
+    "simpleGradient",
+    "A benchmark of shader performance of linear, 2 color gradients with black in them.",
+    TestScene::simpleCreateScene<SimpleGradientAnimation>
+});
+
+class SimpleGradientAnimation : public TestScene {
+public:
+    std::vector< sp<RenderNode> > cards;
+    void createContent(int width, int height, Canvas& canvas) override {
+        canvas.drawColor(Color::White, SkBlendMode::kSrcOver);
+
+        sp<RenderNode> card = createCard(0, 0, width, height);
+        canvas.drawRenderNode(card.get());
+        cards.push_back(card);
+    }
+    void doFrame(int frameNr) override {
+        int curFrame = frameNr % 20;
+        for (size_t ci = 0; ci < cards.size(); ci++) {
+            cards[ci]->mutateStagingProperties().setTranslationX(curFrame);
+            cards[ci]->mutateStagingProperties().setTranslationY(curFrame);
+            cards[ci]->setPropertyFieldsDirty(RenderNode::X | RenderNode::Y);
+        }
+    }
+private:
+    sp<RenderNode> createCard(int x, int y, int width, int height) {
+        return TestUtils::createNode(x, y, x + width, y + height,
+                [width, height](RenderProperties& props, Canvas& canvas) {
+            float pos[] = { 0, 1 };
+            SkPoint pts[] = { SkPoint::Make(0, 0), SkPoint::Make(width, height) };
+            SkPaint paint;
+            // overdraw several times to emphasize shader cost
+            for (int i = 0; i < 10; i++) {
+                // use i%2 start position to pick 2 color combo with black in it
+                SkColor colors[3] = { Color::Transparent, Color::Black, Color::Cyan_500 };
+                paint.setShader(SkGradientShader::MakeLinear(pts, colors + (i % 2), pos, 2,
+                    SkShader::kClamp_TileMode));
+                canvas.drawRect(i, i, width, height, paint);
+            }
+        });
+    }
+};
diff --git a/libs/hwui/tests/unit/DeferredLayerUpdaterTests.cpp b/libs/hwui/tests/unit/DeferredLayerUpdaterTests.cpp
index 1ef9dba..87d897e 100644
--- a/libs/hwui/tests/unit/DeferredLayerUpdaterTests.cpp
+++ b/libs/hwui/tests/unit/DeferredLayerUpdaterTests.cpp
@@ -44,7 +44,12 @@
     // push the deferred updates to the layer
     Matrix4 scaledMatrix;
     scaledMatrix.loadScale(0.5, 0.5, 0.0);
-    layerUpdater->updateLayer(true, GL_TEXTURE_EXTERNAL_OES, scaledMatrix.data);
+    layerUpdater->updateLayer(true, scaledMatrix.data);
+    if (layerUpdater->backingLayer()->getApi() == Layer::Api::OpenGL) {
+        GlLayer* glLayer = static_cast<GlLayer*>(layerUpdater->backingLayer());
+        glLayer->setRenderTarget(GL_TEXTURE_EXTERNAL_OES);
+    }
+
 
     // the backing layer should now have all the properties applied.
     if (layerUpdater->backingLayer()->getApi() == Layer::Api::OpenGL) {
diff --git a/libs/hwui/tests/unit/RecordingCanvasTests.cpp b/libs/hwui/tests/unit/RecordingCanvasTests.cpp
index 124f5fa..669f03c 100644
--- a/libs/hwui/tests/unit/RecordingCanvasTests.cpp
+++ b/libs/hwui/tests/unit/RecordingCanvasTests.cpp
@@ -748,11 +748,10 @@
         SkPaint paint;
         SkBitmap skBitmap;
         bitmap->getSkBitmap(&skBitmap);
-        sk_sp<SkShader> shader = SkMakeBitmapShader(skBitmap,
+        sk_sp<SkImage> image = SkMakeImageFromRasterBitmap(skBitmap, kNever_SkCopyPixelsMode);
+        sk_sp<SkShader> shader = image->makeShader(
                 SkShader::TileMode::kClamp_TileMode,
                 SkShader::TileMode::kClamp_TileMode,
-                nullptr,
-                kNever_SkCopyPixelsMode,
                 nullptr);
         paint.setShader(std::move(shader));
         canvas.drawRoundRect(0, 0, 100, 100, 20.0f, 20.0f, paint);
@@ -767,11 +766,10 @@
         SkPaint paint;
         SkBitmap skBitmap;
         bitmap->getSkBitmap(&skBitmap);
-        sk_sp<SkShader> shader1 = SkMakeBitmapShader(skBitmap,
+        sk_sp<SkImage> image = SkMakeImageFromRasterBitmap(skBitmap, kNever_SkCopyPixelsMode);
+        sk_sp<SkShader> shader1 = image->makeShader(
                 SkShader::TileMode::kClamp_TileMode,
                 SkShader::TileMode::kClamp_TileMode,
-                nullptr,
-                kNever_SkCopyPixelsMode,
                 nullptr);
 
         SkPoint center;
diff --git a/libs/hwui/tests/unit/SkiaBehaviorTests.cpp b/libs/hwui/tests/unit/SkiaBehaviorTests.cpp
index f32d97a..7ae58a6 100644
--- a/libs/hwui/tests/unit/SkiaBehaviorTests.cpp
+++ b/libs/hwui/tests/unit/SkiaBehaviorTests.cpp
@@ -39,12 +39,10 @@
  */
 TEST(SkiaBehavior, CreateBitmapShader1x1) {
     SkBitmap origBitmap = createSkBitmap(1, 1);
-    sk_sp<SkShader> s = SkMakeBitmapShader(
-            origBitmap,
+    sk_sp<SkImage> image = SkMakeImageFromRasterBitmap(origBitmap, kNever_SkCopyPixelsMode);
+    sk_sp<SkShader> s = image->makeShader(
             SkShader::kClamp_TileMode,
             SkShader::kRepeat_TileMode,
-            nullptr,
-            kNever_SkCopyPixelsMode,
             nullptr);
 
     SkBitmap bitmap;
@@ -93,7 +91,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/location/java/android/location/BatchedLocationCallback.java b/location/java/android/location/BatchedLocationCallback.java
new file mode 100644
index 0000000..f1c40ae
--- /dev/null
+++ b/location/java/android/location/BatchedLocationCallback.java
@@ -0,0 +1,44 @@
+/*
+ * 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.location;
+
+import android.annotation.IntDef;
+import android.annotation.SystemApi;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.List;
+
+/**
+ * Used for receiving notifications from the LocationManager when
+ * the a batch of location is ready. These methods are called if the
+ * BatchedLocationCallback has been registered with the location manager service
+ * using the
+ * {@link LocationManager#registerGnssBatchedLocationCallback#startGnssBatch(long,
+ * boolean, BatchedLocationCallback, android.os.Handler)} method.
+ * @hide
+ */
+@SystemApi
+public abstract class BatchedLocationCallback {
+
+    /**
+     * Called when a new batch of locations is ready
+     *
+     * @param locations A list of all new locations (possibly zero of them.)
+     */
+    public void onLocationBatch(List<Location> locations) {}
+}
diff --git a/location/java/android/location/BatchedLocationCallbackTransport.java b/location/java/android/location/BatchedLocationCallbackTransport.java
new file mode 100644
index 0000000..e00f855
--- /dev/null
+++ b/location/java/android/location/BatchedLocationCallbackTransport.java
@@ -0,0 +1,66 @@
+/*
+ * 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.location;
+
+import android.content.Context;
+import android.os.RemoteException;
+
+import java.util.List;
+
+/**
+ * A handler class to manage transport callbacks for {@link BatchedLocationCallback}.
+ *
+ * @hide
+ */
+class BatchedLocationCallbackTransport
+        extends LocalListenerHelper<BatchedLocationCallback> {
+    private final ILocationManager mLocationManager;
+
+    private final IBatchedLocationCallback mCallbackTransport = new CallbackTransport();
+
+    public BatchedLocationCallbackTransport(Context context, ILocationManager locationManager) {
+        super(context, "BatchedLocationCallbackTransport");
+        mLocationManager = locationManager;
+    }
+
+    @Override
+    protected boolean registerWithServer() throws RemoteException {
+        return mLocationManager.addGnssBatchingCallback(
+                mCallbackTransport,
+                getContext().getPackageName());
+    }
+
+    @Override
+    protected void unregisterFromServer() throws RemoteException {
+        mLocationManager.removeGnssBatchingCallback();
+    }
+
+    private class CallbackTransport extends IBatchedLocationCallback.Stub {
+        @Override
+        public void onLocationBatch(final List<Location> locations) {
+            ListenerOperation<BatchedLocationCallback> operation =
+                    new ListenerOperation<BatchedLocationCallback>() {
+                @Override
+                public void execute(BatchedLocationCallback callback)
+                        throws RemoteException {
+                    callback.onLocationBatch(locations);
+                }
+            };
+            foreach(operation);
+        }
+    }
+}
diff --git a/location/java/android/location/GnssNavigationMessage.java b/location/java/android/location/GnssNavigationMessage.java
index aa26111..c7188aa 100644
--- a/location/java/android/location/GnssNavigationMessage.java
+++ b/location/java/android/location/GnssNavigationMessage.java
@@ -89,7 +89,7 @@
      */
     public static abstract class Callback {
         /**
-         * The status of GNSS measurements event.
+         * The status of GNSS Navigation Message event.
          * @hide
          */
         @Retention(RetentionPolicy.SOURCE)
diff --git a/wifi/java/android/net/wifi/hotspot2/pps/HomeSP.aidl b/location/java/android/location/IBatchedLocationCallback.aidl
similarity index 68%
copy from wifi/java/android/net/wifi/hotspot2/pps/HomeSP.aidl
copy to location/java/android/location/IBatchedLocationCallback.aidl
index 62d5603..dce9f96 100644
--- a/wifi/java/android/net/wifi/hotspot2/pps/HomeSP.aidl
+++ b/location/java/android/location/IBatchedLocationCallback.aidl
@@ -1,5 +1,5 @@
-/**
- * Copyright (c) 2016, The Android Open Source Project
+/*
+ * 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.
@@ -14,6 +14,16 @@
  * limitations under the License.
  */
 
-package android.net.wifi.hotspot2.pps;
+package android.location;
 
-parcelable HomeSP;
+import android.location.Location;
+
+import java.util.List;
+
+/**
+ * {@hide}
+ */
+oneway interface IBatchedLocationCallback
+{
+    void onLocationBatch(in List<Location> locations);
+}
diff --git a/location/java/android/location/ILocationManager.aidl b/location/java/android/location/ILocationManager.aidl
index bc8b026..fc31f32 100644
--- a/location/java/android/location/ILocationManager.aidl
+++ b/location/java/android/location/ILocationManager.aidl
@@ -21,6 +21,7 @@
 import android.location.Criteria;
 import android.location.GeocoderParams;
 import android.location.Geofence;
+import android.location.IBatchedLocationCallback;
 import android.location.IGnssMeasurementsListener;
 import android.location.IGnssStatusListener;
 import android.location.IGnssNavigationMessageListener;
@@ -71,6 +72,13 @@
 
     int getGnssYearOfHardware();
 
+    int getGnssBatchSize(String packageName);
+    boolean addGnssBatchingCallback(in IBatchedLocationCallback callback, String packageName);
+    void removeGnssBatchingCallback();
+    boolean startGnssBatch(long periodNanos, boolean wakeOnFifoFull, String packageName);
+    void flushGnssBatch(String packageName);
+    boolean stopGnssBatch();
+
     // --- deprecated ---
     List<String> getAllProviders();
     List<String> getProviders(in Criteria criteria, boolean enabledOnly);
@@ -99,6 +107,9 @@
     // it need not be shared with other providers.
     void reportLocation(in Location location, boolean passive);
 
+    // Used when a (initially Gnss) Location batch arrives
+    void reportLocationBatch(in List<Location> locations);
+
     // for reporting callback completion
     void locationCallbackFinished(ILocationListener listener);
 
diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java
index 4e14626..f9385c6 100644
--- a/location/java/android/location/LocationManager.java
+++ b/location/java/android/location/LocationManager.java
@@ -18,6 +18,7 @@
 
 import com.android.internal.location.ProviderProperties;
 
+import android.Manifest;
 import android.annotation.RequiresPermission;
 import android.annotation.SystemApi;
 import android.annotation.TestApi;
@@ -59,13 +60,15 @@
  * return location results, but the update rate will be throttled and the exact
  * location will be obfuscated to a coarse level of accuracy.
  */
-public class LocationManager {
+public class LocationManager
+{
     private static final String TAG = "LocationManager";
 
     private final Context mContext;
     private final ILocationManager mService;
     private final GnssMeasurementCallbackTransport mGnssMeasurementCallbackTransport;
     private final GnssNavigationMessageCallbackTransport mGnssNavigationMessageCallbackTransport;
+    private final BatchedLocationCallbackTransport mBatchedLocationCallbackTransport;
     private final HashMap<GpsStatus.Listener, GnssStatusListenerTransport> mGpsStatusListeners =
             new HashMap<>();
     private final HashMap<GpsStatus.NmeaListener, GnssStatusListenerTransport> mGpsNmeaListeners =
@@ -321,9 +324,13 @@
     public LocationManager(Context context, ILocationManager service) {
         mService = service;
         mContext = context;
-        mGnssMeasurementCallbackTransport = new GnssMeasurementCallbackTransport(mContext, mService);
+        mGnssMeasurementCallbackTransport =
+                new GnssMeasurementCallbackTransport(mContext, mService);
         mGnssNavigationMessageCallbackTransport =
                 new GnssNavigationMessageCallbackTransport(mContext, mService);
+        mBatchedLocationCallbackTransport =
+                new BatchedLocationCallbackTransport(mContext, mService);
+
     }
 
     private LocationProvider createProvider(String name, ProviderProperties properties) {
@@ -1878,7 +1885,8 @@
      * No-op method to keep backward-compatibility.
      * Don't use it. Use {@link #unregisterGnssNavigationMessageCallback} instead.
      * @hide
-     * @deprecated use {@link #unregisterGnssNavigationMessageCallback(GnssMeasurements.Callback)}
+     * @deprecated use
+     * {@link #unregisterGnssNavigationMessageCallback(GnssNavigationMessage.Callback)}
      * instead
      */
     @Deprecated
@@ -1960,6 +1968,96 @@
     }
 
     /**
+     * Returns the batch size (in number of Location objects) that are supported by the batching
+     * interface.
+     *
+     * @return Maximum number of location objects that can be returned
+     * @hide
+     */
+    @SystemApi
+    @RequiresPermission(Manifest.permission.LOCATION_HARDWARE)
+    public int getGnssBatchSize() {
+        try {
+            return mService.getGnssBatchSize(mContext.getPackageName());
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
+     * Start hardware-batching of GNSS locations. This API is primarily used when the AP is
+     * asleep and the device can batch GNSS locations in the hardware.
+     *
+     * Note this is designed (as was the fused location interface before it) for a single user
+     * SystemApi - requests are not consolidated.  Care should be taken when the System switches
+     * users that may have different batching requests, to stop hardware batching for one user, and
+     * restart it for the next.
+     *
+     * @param periodNanos Time interval, in nanoseconds, that the GNSS locations are requested
+     *                    within the batch
+     * @param wakeOnFifoFull True if the hardware batching should flush the locations in a
+     *                       a callback to the listener, when it's internal buffer is full.  If
+     *                       set to false, the oldest location information is, instead,
+     *                       dropped when the buffer is full.
+     * @param callback The listener on which to return the batched locations
+     * @param handler The handler on which to process the callback
+     *
+     * @return True if batching was successfully started
+     * @hide
+     */
+    @SystemApi
+    @RequiresPermission(Manifest.permission.LOCATION_HARDWARE)
+    public boolean registerGnssBatchedLocationCallback(long periodNanos, boolean wakeOnFifoFull,
+                                  BatchedLocationCallback callback, Handler handler) {
+        mBatchedLocationCallbackTransport.add(callback, handler);
+
+        try {
+            return mService.startGnssBatch(periodNanos, wakeOnFifoFull, mContext.getPackageName());
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
+     * Flush the batched GNSS locations.
+     * All GNSS locations currently ready in the batch are returned via the callback sent in
+     * startGnssBatch(), and the buffer containing the batched locations is cleared.
+     *
+     * @hide
+     */
+    @SystemApi
+    @RequiresPermission(Manifest.permission.LOCATION_HARDWARE)
+    public void flushGnssBatch() {
+        try {
+            mService.flushGnssBatch(mContext.getPackageName());
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
+     * Stop batching locations. This API is primarily used when the AP is
+     * asleep and the device can batch locations in the hardware.
+     *
+     * @param callback the specific callback class to remove from the transport layer
+     *
+     * @return True if batching was successfully started
+     * @hide
+     */
+    @SystemApi
+    @RequiresPermission(Manifest.permission.LOCATION_HARDWARE)
+    public boolean unregisterGnssBatchedLocationCallback(BatchedLocationCallback callback) {
+
+        mBatchedLocationCallbackTransport.remove(callback);
+
+        try {
+            return mService.stopGnssBatch();
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
      * Sends additional commands to a location provider.
      * Can be used to support provider specific extensions to the Location Manager API
      *
diff --git a/media/java/android/media/AudioAttributes.java b/media/java/android/media/AudioAttributes.java
index 391a905..ce58a9c 100644
--- a/media/java/android/media/AudioAttributes.java
+++ b/media/java/android/media/AudioAttributes.java
@@ -913,13 +913,13 @@
         }
     }
     /**
-     * @hide
-     * CANDIDATE FOR PUBLIC (or at least SYSTEM) API
      * Returns the stream type matching the given attributes for volume control.
      * Use this method to derive the stream type needed to configure the volume
-     * control slider in an {@link Activity} with {@link Activity#setVolumeControlStream(int)}.
+     * control slider in an {@link android.app.Activity} with
+     * {@link android.app.Activity#setVolumeControlStream(int)}.
      * <BR>Do not use this method to set the stream type on an audio player object
-     * (e.g. {@link AudioTrack}, {@link MediaPlayer}), use <code>AudioAttributes</code> instead.
+     * (e.g. {@link AudioTrack}, {@link MediaPlayer}) as this is deprecated,
+     * use <code>AudioAttributes</code> instead.
      * @param aa non-null AudioAttributes.
      * @return a valid stream type for <code>Activity</code> or stream volume control that matches
      *     the attributes, or {@link AudioManager#USE_DEFAULT_STREAM_TYPE} if there isn't a direct
diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java
index fb3f5b3..a4f2a7e 100644
--- a/media/java/android/media/AudioManager.java
+++ b/media/java/android/media/AudioManager.java
@@ -1456,10 +1456,11 @@
     }
 
     /**
-     * Checks whether A2DP audio routing to the Bluetooth headset is on or off.
+     * Checks whether a Bluetooth A2DP audio peripheral is connected or not.
      *
-     * @return true if A2DP audio is being routed to/from Bluetooth headset;
+     * @return true if a Bluetooth A2DP peripheral is connected
      *         false if otherwise
+     * @deprecated Use {@link AudioManager#getDevices(int)} instead to list available audio devices.
      */
     public boolean isBluetoothA2dpOn() {
         if (AudioSystem.getDeviceConnectionState(DEVICE_OUT_BLUETOOTH_A2DP,"")
@@ -1492,7 +1493,7 @@
      *
      * @return true if a wired headset is connected.
      *         false if otherwise
-     * @deprecated Use only to check is a headset is connected or not.
+     * @deprecated Use {@link AudioManager#getDevices(int)} instead to list available audio devices.
      */
     public boolean isWiredHeadsetOn() {
         if (AudioSystem.getDeviceConnectionState(DEVICE_OUT_WIRED_HEADSET,"")
diff --git a/media/java/android/media/AudioTrack.java b/media/java/android/media/AudioTrack.java
index 5c9f270..ddd8a65 100644
--- a/media/java/android/media/AudioTrack.java
+++ b/media/java/android/media/AudioTrack.java
@@ -27,6 +27,7 @@
 
 import android.annotation.IntDef;
 import android.annotation.NonNull;
+import android.annotation.Nullable;
 import android.app.ActivityThread;
 import android.content.Context;
 import android.os.Handler;
@@ -538,6 +539,15 @@
             throw new IllegalArgumentException("Illegal null AudioFormat");
         }
 
+        // Check if we should enable deep buffer mode
+        if (shouldEnablePowerSaving(mAttributes, format, bufferSizeInBytes, mode)) {
+            mAttributes = new AudioAttributes.Builder(mAttributes)
+                .replaceFlags((mAttributes.getAllFlags()
+                        | AudioAttributes.FLAG_DEEP_BUFFER)
+                        & ~AudioAttributes.FLAG_LOW_LATENCY)
+                .build();
+        }
+
         // remember which looper is associated with the AudioTrack instantiation
         Looper looper;
         if ((looper = Looper.myLooper()) == null) {
@@ -861,7 +871,10 @@
                     .build();
                 break;
             case PERFORMANCE_MODE_NONE:
-                break;
+                if (!shouldEnablePowerSaving(mAttributes, mFormat, mBufferSizeInBytes, mMode)) {
+                    break; // do not enable deep buffer mode.
+                }
+                // permitted to fall through to enable deep buffer
             case PERFORMANCE_MODE_POWER_SAVING:
                 mAttributes = new AudioAttributes.Builder(mAttributes)
                 .replaceFlags((mAttributes.getAllFlags()
@@ -912,6 +925,56 @@
             AudioFormat.CHANNEL_OUT_SIDE_LEFT |
             AudioFormat.CHANNEL_OUT_SIDE_RIGHT;
 
+    // Returns a boolean whether the attributes, format, bufferSizeInBytes, mode allow
+    // power saving to be automatically enabled for an AudioTrack. Returns false if
+    // power saving is already enabled in the attributes parameter.
+    private static boolean shouldEnablePowerSaving(
+            @Nullable AudioAttributes attributes, @Nullable AudioFormat format,
+            int bufferSizeInBytes, int mode) {
+        // If no attributes, OK
+        // otherwise check attributes for USAGE_MEDIA and CONTENT_UNKNOWN, MUSIC, or MOVIE.
+        if (attributes != null &&
+                (attributes.getAllFlags() != 0  // cannot have any special flags
+                || attributes.getUsage() != AudioAttributes.USAGE_MEDIA
+                || (attributes.getContentType() != AudioAttributes.CONTENT_TYPE_UNKNOWN
+                    && attributes.getContentType() != AudioAttributes.CONTENT_TYPE_MUSIC
+                    && attributes.getContentType() != AudioAttributes.CONTENT_TYPE_MOVIE))) {
+            return false;
+        }
+
+        // Format must be fully specified and be linear pcm
+        if (format == null
+                || format.getSampleRate() == AudioFormat.SAMPLE_RATE_UNSPECIFIED
+                || !AudioFormat.isEncodingLinearPcm(format.getEncoding())
+                || !AudioFormat.isValidEncoding(format.getEncoding())
+                || format.getChannelCount() < 1) {
+            return false;
+        }
+
+        // Mode must be streaming
+        if (mode != MODE_STREAM) {
+            return false;
+        }
+
+        // A buffer size of 0 is always compatible with deep buffer (when called from the Builder)
+        // but for app compatibility we only use deep buffer power saving for large buffer sizes.
+        if (bufferSizeInBytes != 0) {
+            final long BUFFER_TARGET_MODE_STREAM_MS = 100;
+            final int MILLIS_PER_SECOND = 1000;
+            final long bufferTargetSize =
+                    BUFFER_TARGET_MODE_STREAM_MS
+                    * format.getChannelCount()
+                    * format.getBytesPerSample(format.getEncoding())
+                    * format.getSampleRate()
+                    / MILLIS_PER_SECOND;
+            if (bufferSizeInBytes < bufferTargetSize) {
+                return false;
+            }
+        }
+
+        return true;
+    }
+
     // Convenience method for the constructor's parameter checks.
     // This is where constructor IllegalArgumentException-s are thrown
     // postconditions:
@@ -1678,6 +1741,17 @@
         return setStereoVolume(gain, gain);
     }
 
+    @Override
+    /* package */ int playerApplyVolumeShaper(
+            @NonNull VolumeShaper.Configuration configuration,
+            @NonNull VolumeShaper.Operation operation) {
+        return native_applyVolumeShaper(configuration, operation);
+    }
+
+    @Override
+    /* package */ @Nullable VolumeShaper.State playerGetVolumeShaperState(int id) {
+        return native_getVolumeShaperState(id);
+    }
 
     /**
      * Sets the playback sample rate for this track. This sets the sampling rate at which
@@ -1893,7 +1967,13 @@
                         e.printStackTrace();
                     }
                     baseSetStartDelayMs(0);
-                    startImpl();
+                    try {
+                        startImpl();
+                    } catch (IllegalStateException e) {
+                        // fail silently for a state exception when it is happening after
+                        // a delayed start, as the player state could have changed between the
+                        // call to start() and the execution of startImpl()
+                    }
                 }
             }.start();
         }
@@ -3024,6 +3104,12 @@
     private native final void native_disableDeviceCallback();
     static private native int native_get_FCC_8();
 
+    private native int native_applyVolumeShaper(
+            @NonNull VolumeShaper.Configuration configuration,
+            @NonNull VolumeShaper.Operation operation);
+
+    private native @Nullable VolumeShaper.State native_getVolumeShaperState(int id);
+
     //---------------------------------------------------------
     // Utility methods
     //------------------
diff --git a/media/java/android/media/IPlayer.aidl b/media/java/android/media/IPlayer.aidl
index f068a0a..2d60bf9 100644
--- a/media/java/android/media/IPlayer.aidl
+++ b/media/java/android/media/IPlayer.aidl
@@ -16,6 +16,7 @@
 
 package android.media;
 
+import android.media.VolumeShaper;
 
 /**
  * @hide
@@ -27,4 +28,6 @@
     oneway void setVolume(float vol);
     oneway void setPan(float pan);
     oneway void setStartDelayMs(int delayMs);
+    oneway void applyVolumeShaper(in VolumeShaper.Configuration configuration,
+                                  in VolumeShaper.Operation operation);
 }
diff --git a/media/java/android/media/MediaExtractor.java b/media/java/android/media/MediaExtractor.java
index 4d332a8..2ca36ea 100644
--- a/media/java/android/media/MediaExtractor.java
+++ b/media/java/android/media/MediaExtractor.java
@@ -26,6 +26,7 @@
 import android.media.MediaFormat;
 import android.media.MediaHTTPService;
 import android.net.Uri;
+import android.os.Bundle;
 import android.os.IBinder;
 
 import com.android.internal.util.Preconditions;
@@ -598,6 +599,16 @@
      */
     public native boolean hasCacheReachedEndOfStream();
 
+    /**
+     *  Returns Analytics/Metrics data about the current media container.
+     *
+     * @return the set of keys and values available for the media being
+     * handled by this instance of MediaExtractor
+     *
+     */
+    public native Bundle getMetrics();
+
+
     private static native final void native_init();
     private native final void native_setup();
     private native final void native_finalize();
diff --git a/media/java/android/media/MediaHTTPConnection.java b/media/java/android/media/MediaHTTPConnection.java
index d6bf421..228a6de 100644
--- a/media/java/android/media/MediaHTTPConnection.java
+++ b/media/java/android/media/MediaHTTPConnection.java
@@ -61,8 +61,9 @@
     private final static int MAX_REDIRECTS = 20;
 
     public MediaHTTPConnection() {
-        if (CookieHandler.getDefault() == null) {
-            CookieHandler.setDefault(new CookieManager());
+        CookieManager cookieManager = (CookieManager)CookieHandler.getDefault();
+        if (cookieManager == null) {
+            Log.w(TAG, "MediaHTTPConnection: Unexpected. No CookieManager found.");
         }
 
         native_setup();
diff --git a/media/java/android/media/MediaHTTPService.java b/media/java/android/media/MediaHTTPService.java
index 52a68bf..b678630 100644
--- a/media/java/android/media/MediaHTTPService.java
+++ b/media/java/android/media/MediaHTTPService.java
@@ -19,25 +19,78 @@
 import android.os.IBinder;
 import android.util.Log;
 
+import java.net.CookieHandler;
+import java.net.CookieManager;
+import java.net.CookieStore;
+import java.net.HttpCookie;
+import java.util.List;
+
 /** @hide */
 public class MediaHTTPService extends IMediaHTTPService.Stub {
     private static final String TAG = "MediaHTTPService";
+    private List<HttpCookie> mCookies;
+    private Boolean mCookieStoreInitialized = new Boolean(false);
 
-    public MediaHTTPService() {
+    public MediaHTTPService(List<HttpCookie> cookies) {
+        mCookies = cookies;
+        Log.v(TAG, "MediaHTTPService(" + this + "): Cookies: " + cookies);
     }
 
     public IMediaHTTPConnection makeHTTPConnection() {
+
+        synchronized (mCookieStoreInitialized) {
+            // Only need to do it once for all connections
+            if ( !mCookieStoreInitialized )  {
+                CookieManager cookieManager = (CookieManager)CookieHandler.getDefault();
+                if (cookieManager == null) {
+                    cookieManager = new CookieManager();
+                    CookieHandler.setDefault(cookieManager);
+                    Log.v(TAG, "makeHTTPConnection: CookieManager created: " + cookieManager);
+                }
+                else {
+                    Log.v(TAG, "makeHTTPConnection: CookieManager(" + cookieManager + ") exists.");
+                }
+
+                // Applying the bootstrapping cookies
+                if ( mCookies != null ) {
+                    CookieStore store = cookieManager.getCookieStore();
+                    for ( HttpCookie cookie : mCookies ) {
+                        try {
+                            store.add(null, cookie);
+                        } catch ( Exception e ) {
+                            Log.v(TAG, "makeHTTPConnection: CookieStore.add" + e);
+                        }
+                        //for extended debugging when needed
+                        //Log.v(TAG, "MediaHTTPConnection adding Cookie[" + cookie.getName() +
+                        //        "]: " + cookie);
+                    }
+                }   // mCookies
+
+                mCookieStoreInitialized = true;
+
+                Log.v(TAG, "makeHTTPConnection(" + this + "): cookieManager: " + cookieManager +
+                        " Cookies: " + mCookies);
+            }   // mCookieStoreInitialized
+        }   // synchronized
+
         return new MediaHTTPConnection();
     }
 
     /* package private */static IBinder createHttpServiceBinderIfNecessary(
             String path) {
+        return createHttpServiceBinderIfNecessary(path, null);
+    }
+
+    // when cookies are provided
+    static IBinder createHttpServiceBinderIfNecessary(
+            String path, List<HttpCookie> cookies) {
         if (path.startsWith("http://") || path.startsWith("https://")) {
-            return (new MediaHTTPService()).asBinder();
+            return (new MediaHTTPService(cookies)).asBinder();
         } else if (path.startsWith("widevine://")) {
             Log.d(TAG, "Widevine classic is no longer supported");
         }
 
         return null;
     }
+
 }
diff --git a/media/java/android/media/MediaMuxer.java b/media/java/android/media/MediaMuxer.java
index a1f816b..aacce91 100644
--- a/media/java/android/media/MediaMuxer.java
+++ b/media/java/android/media/MediaMuxer.java
@@ -32,9 +32,8 @@
 import java.util.Map;
 
 /**
- * MediaMuxer facilitates muxing elementary streams. Currently supports mp4 or
- * webm file as the output and at most one audio and/or one video elementary
- * stream. MediaMuxer does not support muxing B-frames.
+ * MediaMuxer facilitates muxing elementary streams. Currently MediaMuxer supports MP4, Webm
+ * and 3GP file as the output. It also supports muxing B-frames in MP4 since Android Nougat.
  * <p>
  * It is generally used like this:
  *
@@ -65,6 +64,182 @@
  * muxer.stop();
  * muxer.release();
  * </pre>
+ *
+
+ <h4>Metadata Track</h4>
+ <p>
+  Metadata is usefule in carrying extra information that correlated with video or audio to
+  facilate offline processing, e.g. gyro signals from the sensor. Meatadata track is only
+  supported in MP4 format. When adding a metadata track, track's mime format must start with
+  prefix "application/", e.g. "applicaton/gyro". Metadata's format/layout will be defined by
+  the application. The generated MP4 file uses TextMetaDataSampleEntry defined in section 12.3.3.2
+  of the ISOBMFF to signal the metadata's mime format. When using {@link android.media.MediaExtractor}
+  to extract the file with metadata track, the mime format of the metadata will be extracted into
+  {@link android.media.MediaFormat}.
+
+ <pre class=prettyprint>
+   MediaMuxer muxer = new MediaMuxer("temp.mp4", OutputFormat.MUXER_OUTPUT_MPEG_4);
+   // More often, the MediaFormat will be retrieved from MediaCodec.getOutputFormat()
+   // or MediaExtractor.getTrackFormat().
+   MediaFormat audioFormat = new MediaFormat(...);
+   MediaFormat videoFormat = new MediaFormat(...);
+
+   // Setup Metadata Track
+   MediaFormat metadataFormat = new MediaFormat(...);
+   metadataFormat.setString(KEY_MIME, "application/gyro");
+
+   int audioTrackIndex = muxer.addTrack(audioFormat);
+   int videoTrackIndex = muxer.addTrack(videoFormat);
+   int metadataTrackIndex = muxer.addTrack(metadataFormat);
+   ByteBuffer inputBuffer = ByteBuffer.allocate(bufferSize);
+   boolean finished = false;
+   BufferInfo bufferInfo = new BufferInfo();
+
+   muxer.start();
+   while(!finished) {
+     // getInputBuffer() will fill the inputBuffer with one frame of encoded
+     // sample from either MediaCodec or MediaExtractor, set isAudioSample to
+     // true when the sample is audio data, set up all the fields of bufferInfo,
+     // and return true if there are no more samples.
+     finished = getInputBuffer(inputBuffer, sampleType, bufferInfo);
+     if (!finished) {
+       int currentTrackIndex = getTrackIndex(sampleType);
+       muxer.writeSampleData(currentTrackIndex, inputBuffer, bufferInfo);
+     }
+   };
+   muxer.stop();
+   muxer.release();
+ }</pre>
+
+ <h2 id=History><a name="History"></a>Features and API History</h2>
+ <p>
+ The following table summarizes the feature support in different API version and containers.
+ For API version numbers, see {@link android.os.Build.VERSION_CODES}.
+
+ <style>
+ .api > tr > th, .api > tr > td { text-align: center; padding: 4px 4px; }
+ .api > tr > th     { vertical-align: bottom; }
+ .api > tr > td     { vertical-align: middle; }
+ .sml > tr > th, .sml > tr > td { text-align: center; padding: 2px 4px; }
+ .fn { text-align: center; }
+ </style>
+
+ <table align="right" style="width: 0%">
+  <thead>
+   <tbody class=api>
+    <tr><th>Symbol</th>
+    <th>Meaning</th></tr>
+   </tbody>
+  </thead>
+  <tbody class=sml>
+   <tr><td>&#9679;</td><td>Supported</td></tr>
+   <tr><td>&#9675;</td><td>Not supported</td></tr>
+   <tr><td>&#9639;</td><td>Supported in MP4/WebM/3GP</td></tr>
+   <tr><td>&#8277;</td><td>Only Supported in MP4</td></tr>
+  </tbody>
+ </table>
+<table align="center" style="width: 100%;">
+  <thead class=api>
+   <tr>
+    <th rowspan=2>Feature</th>
+    <th colspan="24">SDK Version</th>
+   </tr>
+   <tr>
+    <th>18</th>
+    <th>19</th>
+    <th>20</th>
+    <th>21</th>
+    <th>22</th>
+    <th>23</th>
+    <th>24</th>
+    <th>25</th>
+    <th>26+</th>
+   </tr>
+  </thead>
+ <tbody class=api>
+   <tr>
+    <td align="center">MP4 container</td>
+    <td>&#9679;</td>
+    <td>&#9679;</td>
+    <td>&#9679;</td>
+    <td>&#9679;</td>
+    <td>&#9679;</td>
+    <td>&#9679;</td>
+    <td>&#9679;</td>
+    <td>&#9679;</td>
+    <td>&#9679;</td>
+   </tr>
+    <td align="center">WebM container</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#9679;</td>
+    <td>&#9679;</td>
+    <td>&#9679;</td>
+    <td>&#9679;</td>
+    <td>&#9679;</td>
+    <td>&#9679;</td>
+   </tr>
+    <td align="center">3GP container</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#9679;</td>
+   </tr>
+    <td align="center">Muxing B-Frames(bi-directional predicted frames)</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#8277;</td>
+    <td>&#8277;</td>
+    <td>&#8277;</td>
+   </tr>
+   </tr>
+    <td align="center">Muxing Single Video/Audio Track</td>
+    <td>&#9639;</td>
+    <td>&#9639;</td>
+    <td>&#9639;</td>
+    <td>&#9639;</td>
+    <td>&#9639;</td>
+    <td>&#9639;</td>
+    <td>&#9639;</td>
+    <td>&#9639;</td>
+    <td>&#9639;</td>
+   </tr>
+   </tr>
+    <td align="center">Muxing Multiple Video/Audio Tracks</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#8277;</td>
+   </tr>
+   </tr>
+    <td align="center">Muxing Metadata Tracks</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#9675;</td>
+    <td>&#8277;</td>
+   </tr>
+   </tbody>
+ </table>
  */
 
 final public class MediaMuxer {
@@ -83,13 +258,17 @@
         private OutputFormat() {}
         /** MPEG4 media file format*/
         public static final int MUXER_OUTPUT_MPEG_4 = 0;
+        /** WEBM media file format*/
         public static final int MUXER_OUTPUT_WEBM   = 1;
+        /** 3GPP media file format*/
+        public static final int MUXER_OUTPUT_3GPP   = 2;
     };
 
     /** @hide */
     @IntDef({
         OutputFormat.MUXER_OUTPUT_MPEG_4,
         OutputFormat.MUXER_OUTPUT_WEBM,
+        OutputFormat.MUXER_OUTPUT_3GPP,
     })
     @Retention(RetentionPolicy.SOURCE)
     public @interface Format {}
@@ -166,8 +345,8 @@
     }
 
     private void setUpMediaMuxer(@NonNull FileDescriptor fd, @Format int format) throws IOException {
-        if (format != OutputFormat.MUXER_OUTPUT_MPEG_4 &&
-                format != OutputFormat.MUXER_OUTPUT_WEBM) {
+        if (format != OutputFormat.MUXER_OUTPUT_MPEG_4 && format != OutputFormat.MUXER_OUTPUT_WEBM
+                && format != OutputFormat.MUXER_OUTPUT_3GPP) {
             throw new IllegalArgumentException("format: " + format + " is invalid");
         }
         mNativeObject = nativeSetup(fd, format);
diff --git a/media/java/android/media/MediaPlayer.java b/media/java/android/media/MediaPlayer.java
index 03dc2ea..5008a5f 100644
--- a/media/java/android/media/MediaPlayer.java
+++ b/media/java/android/media/MediaPlayer.java
@@ -73,6 +73,7 @@
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.ref.WeakReference;
+import java.net.HttpCookie;
 import java.net.HttpURLConnection;
 import java.net.InetSocketAddress;
 import java.net.URL;
@@ -80,6 +81,7 @@
 import java.util.Arrays;
 import java.util.BitSet;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.Scanner;
 import java.util.Set;
@@ -638,6 +640,8 @@
     private UUID mDrmUUID;
     private final Object mDrmLock = new Object();
     private DrmInfo mDrmInfo;
+    private MediaDrm mDrmObj;
+    private byte[] mDrmSessionId;
     private boolean mDrmInfoResolved;
     private boolean mActiveDrmScheme;
     private boolean mDrmConfigAllowed;
@@ -998,7 +1002,7 @@
      */
     public void setDataSource(@NonNull Context context, @NonNull Uri uri)
             throws IOException, IllegalArgumentException, SecurityException, IllegalStateException {
-        setDataSource(context, uri, null);
+        setDataSource(context, uri, null, null);
     }
 
     /**
@@ -1011,11 +1015,13 @@
      *                changed with key/value pairs through the headers parameter with
      *                "android-allow-cross-domain-redirect" as the key and "0" or "1" as the value
      *                to disallow or allow cross domain redirection.
+     *                The headers must not include cookies. Instead, use the cookies param.
+     * @param cookies the cookies to be sent together with the request
      * @throws IllegalStateException if it is called in an invalid state
      */
     public void setDataSource(@NonNull Context context, @NonNull Uri uri,
-            @Nullable Map<String, String> headers) throws IOException, IllegalArgumentException,
-                    SecurityException, IllegalStateException {
+            @Nullable Map<String, String> headers, @Nullable List<HttpCookie> cookies)
+            throws IOException, IllegalArgumentException, SecurityException, IllegalStateException {
         // The context and URI usually belong to the calling user. Get a resolver for that user
         // and strip out the userId from the URI if present.
         final ContentResolver resolver = context.getContentResolver();
@@ -1036,18 +1042,36 @@
             } else if (attemptDataSource(resolver, actualUri)) {
                 return;
             } else {
-                setDataSource(uri.toString(), headers);
+                setDataSource(uri.toString(), headers, cookies);
             }
         } else {
             // Try requested Uri locally first, or fallback to media server
             if (attemptDataSource(resolver, uri)) {
                 return;
             } else {
-                setDataSource(uri.toString(), headers);
+                setDataSource(uri.toString(), headers, cookies);
             }
         }
     }
 
+    /**
+     * Sets the data source as a content Uri.
+     *
+     * @param context the Context to use when resolving the Uri
+     * @param uri the Content URI of the data you want to play
+     * @param headers the headers to be sent together with the request for the data
+     *                Note that the cross domain redirection is allowed by default, but that can be
+     *                changed with key/value pairs through the headers parameter with
+     *                "android-allow-cross-domain-redirect" as the key and "0" or "1" as the value
+     *                to disallow or allow cross domain redirection.
+     * @throws IllegalStateException if it is called in an invalid state
+     */
+    public void setDataSource(@NonNull Context context, @NonNull Uri uri,
+            @Nullable Map<String, String> headers)
+            throws IOException, IllegalArgumentException, SecurityException, IllegalStateException {
+        setDataSource(context, uri, headers, null);
+    }
+
     private boolean attemptDataSource(ContentResolver resolver, Uri uri) {
         try (AssetFileDescriptor afd = resolver.openAssetFileDescriptor(uri, "r")) {
             setDataSource(afd);
@@ -1085,6 +1109,11 @@
      * @hide pending API council
      */
     public void setDataSource(String path, Map<String, String> headers)
+            throws IOException, IllegalArgumentException, SecurityException, IllegalStateException {
+        setDataSource(path, headers, null);
+    }
+
+    private void setDataSource(String path, Map<String, String> headers, List<HttpCookie> cookies)
             throws IOException, IllegalArgumentException, SecurityException, IllegalStateException
     {
         String[] keys = null;
@@ -1101,10 +1130,11 @@
                 ++i;
             }
         }
-        setDataSource(path, keys, values);
+        setDataSource(path, keys, values, cookies);
     }
 
-    private void setDataSource(String path, String[] keys, String[] values)
+    private void setDataSource(String path, String[] keys, String[] values,
+            List<HttpCookie> cookies)
             throws IOException, IllegalArgumentException, SecurityException, IllegalStateException {
         final Uri uri = Uri.parse(path);
         final String scheme = uri.getScheme();
@@ -1113,7 +1143,7 @@
         } else if (scheme != null) {
             // handle non-file sources
             nativeSetDataSource(
-                MediaHTTPService.createHttpServiceBinderIfNecessary(path),
+                MediaHTTPService.createHttpServiceBinderIfNecessary(path, cookies),
                 path,
                 keys,
                 values);
@@ -1258,7 +1288,13 @@
                         e.printStackTrace();
                     }
                     baseSetStartDelayMs(0);
-                    startImpl();
+                    try {
+                        startImpl();
+                    } catch (IllegalStateException e) {
+                        // fail silently for a state exception when it is happening after
+                        // a delayed start, as the player state could have changed between the
+                        // call to start() and the execution of startImpl()
+                    }
                 }
             }.start();
         }
@@ -1325,6 +1361,24 @@
         stop();
     }
 
+    @Override
+    /* package */ int playerApplyVolumeShaper(
+            @NonNull VolumeShaper.Configuration configuration,
+            @NonNull VolumeShaper.Operation operation) {
+        return native_applyVolumeShaper(configuration, operation);
+    }
+
+    @Override
+    /* package */ @Nullable VolumeShaper.State playerGetVolumeShaperState(int id) {
+        return native_getVolumeShaperState(id);
+    }
+
+    private native int native_applyVolumeShaper(
+            @NonNull VolumeShaper.Configuration configuration,
+            @NonNull VolumeShaper.Operation operation);
+
+    private native @Nullable VolumeShaper.State native_getVolumeShaperState(int id);
+
     /**
      * Set the low-level power management behavior for this MediaPlayer.  This
      * can be used when the MediaPlayer is not playing through a SurfaceHolder
@@ -1908,6 +1962,7 @@
         mOnSubtitleDataListener = null;
 
         // Modular DRM clean up
+        mOnDrmConfigListener = null;
         mOnDrmInfoHandlerDelegate = null;
         mOnDrmPreparedHandlerDelegate = null;
         resetDrmState();
@@ -3119,7 +3174,7 @@
                         onDrmInfoHandlerDelegate.notifyClient(drmInfo);
                     }
                 } else {
-                    Log.w(TAG, "MEDIA_DRM_INFO msg.obj NONE; UNEXPECTED" + msg.obj);
+                    Log.w(TAG, "MEDIA_DRM_INFO msg.obj of unexpected type " + msg.obj);
                 }
                 return;
 
@@ -3794,17 +3849,34 @@
      * and setDrmPropertyString.
      *
      */
-    public static abstract class OnDrmConfigCallback
+    public interface OnDrmConfigListener
     {
         /**
          * Called to give the app the opportunity to configure DRM before the session is created
          *
          * @param mp the {@code MediaPlayer} associated with this callback
          */
-        public void onDrmConfig(MediaPlayer mp) {}
+        public void onDrmConfig(MediaPlayer mp);
     }
 
     /**
+     * Register a callback to be invoked for configuration of the DRM object before
+     * the session is created.
+     * The callback will be invoked synchronously half-way into the execution
+     * of {@link #prepareDrm(UUID uuid)}.
+     *
+     * @param listener the callback that will be run
+     */
+    public void setOnDrmConfigListener(OnDrmConfigListener listener)
+    {
+        synchronized (mDrmLock) {
+            mOnDrmConfigListener = listener;
+        } // synchronized
+    }
+
+    private OnDrmConfigListener mOnDrmConfigListener;
+
+    /**
      * Interface definition of a callback to be invoked when the
      * DRM info becomes available
      */
@@ -4001,13 +4073,11 @@
         return drmInfo;
     }
 
-    private native void _prepareDrm(@NonNull byte[] uuid, int mode)
-            throws UnsupportedSchemeException, ResourceBusyException, NotProvisionedException;
 
     /**
      * Prepares the DRM for the current source
      * <p>
-     * If {@code OnDrmConfigCallback} is registered, it will be called half-way into
+     * If {@code OnDrmConfigListener} is registered, it will be called half-way into
      * preparation to allow configuration of the DRM properties before opening the
      * DRM session. Note that the callback is called synchronously in the thread that called
      * {@code prepareDrm}. It should be used only for a series of {@code getDrmPropertyString}
@@ -4035,10 +4105,12 @@
      * @throws ResourceBusyException       if required DRM resources are in use
      * @throws ProvisioningErrorException  if provisioning is required but an attempt failed
      */
-    public void prepareDrm(@NonNull UUID uuid, OnDrmConfigCallback configCallback)
+    public void prepareDrm(@NonNull UUID uuid)
             throws UnsupportedSchemeException,
                    ResourceBusyException, ProvisioningErrorException
     {
+        Log.v(TAG, "prepareDrm: uuid: " + uuid + " mOnDrmConfigListener: " + mOnDrmConfigListener);
+
         boolean allDoneWithoutProvisioning = false;
         // get a snapshot as we'll use them outside the lock
         OnDrmPreparedHandlerDelegate onDrmPreparedHandlerDelegate = null;
@@ -4047,58 +4119,46 @@
 
             // only allowing if tied to a protected source; might releax for releasing offline keys
             if (mDrmInfo == null) {
-                final String msg = String.format("prepareDrm(%s): Wrong usage: " +
-                                                 "The player must be prepared and DRM " +
-                                                 "info be retrieved before this call.", uuid);
+                final String msg = "prepareDrm(): Wrong usage: The player must be prepared and " +
+                        "DRM info be retrieved before this call.";
                 Log.e(TAG, msg);
                 throw new IllegalStateException(msg);
             }
 
             if (mActiveDrmScheme) {
-                final String msg = String.format("prepareDrm(%s): Wrong usage: There is already " +
-                                                 "an active DRM scheme with %s.", uuid, mDrmUUID);
+                final String msg = "prepareDrm(): Wrong usage: There is already " +
+                        "an active DRM scheme with " + mDrmUUID;
                 Log.e(TAG, msg);
                 throw new IllegalStateException(msg);
             }
 
             if (mPrepareDrmInProgress) {
-                final String msg = String.format("prepareDrm(%s): Wrong usage: There is already " +
-                                                 "a pending prepareDrm call.", uuid);
+                final String msg = "prepareDrm(): Wrong usage: There is already " +
+                        "a pending prepareDrm call.";
                 Log.e(TAG, msg);
                 throw new IllegalStateException(msg);
             }
 
             if (mDrmProvisioningInProgress) {
-                final String msg = String.format("prepareDrm(%s): Unexpectd: Provisioning is " +
-                                                 "already in progress.", uuid);
+                final String msg = "prepareDrm(): Unexpectd: Provisioning is already in progress.";
                 Log.e(TAG, msg);
                 throw new IllegalStateException(msg);
             }
 
+            // shouldn't need this; just for safeguard
+            cleanDrmObj();
+
             mPrepareDrmInProgress = true;
             // local copy while the lock is held
             onDrmPreparedHandlerDelegate = mOnDrmPreparedHandlerDelegate;
 
-            if (configCallback != null) {
-                try {
-                    boolean allowOpenSession = false;   // just pre-openSession
-                    _prepareDrm(getByteArrayFromUUID(uuid), allowOpenSession ? 1 : 0);
-                } catch (IllegalStateException e) {
-                    final String msg = String.format("prepareDrm(): Wrong usage: The player must " +
-                                                     "be in prepared state to call prepareDrm().");
-                    Log.e(TAG, msg);
-                    throw new IllegalStateException(msg);
-                } catch (NotProvisionedException e) {   // the pre-config step won't raise this
-                    final String msg = String.format("prepareDrm: Unexpected " +
-                                                     "NotProvisionedException here.");
-                    Log.e(TAG, msg);
-                    throw new ProvisioningErrorException(msg);
-                } catch (Exception e) {
-                    Log.w(TAG, String.format("prepareDrm: Exception %s", e));
-                    throw e;
-                } finally {
-                    mPrepareDrmInProgress = false;
-                }
+            try {
+                // only creating the DRM object to allow pre-openSession configuration
+                prepareDrm_createDrmStep(uuid);
+            } catch (Exception e) {
+                Log.w(TAG, "prepareDrm(): Exception ", e);
+                mPrepareDrmInProgress = false;
+                throw e;
             }
 
             mDrmConfigAllowed = true;
@@ -4106,51 +4166,55 @@
 
 
         // call the callback outside the lock
-        if (configCallback != null)  {
-            configCallback.onDrmConfig(this);
+        if (mOnDrmConfigListener != null)  {
+            mOnDrmConfigListener.onDrmConfig(this);
         }
 
         synchronized (mDrmLock) {
             mDrmConfigAllowed = false;
+            boolean earlyExit = false;
 
             try {
-                boolean allowOpenSession = true;    // all in
-                _prepareDrm(getByteArrayFromUUID(uuid), allowOpenSession ? 1 : 0);
+                prepareDrm_openSessionStep(uuid);
 
                 mDrmUUID = uuid;
                 mActiveDrmScheme = true;
 
-                mPrepareDrmInProgress = false;
-
                 allDoneWithoutProvisioning = true;
             } catch (IllegalStateException e) {
-                final String msg = String.format("prepareDrm(%s): Wrong usage: The player must be" +
-                                                 " in prepared state to call prepareDrm().", uuid);
+                final String msg = "prepareDrm(): Wrong usage: The player must be " +
+                        "in the prepared state to call prepareDrm().";
                 Log.e(TAG, msg);
+                earlyExit = true;
                 throw new IllegalStateException(msg);
             } catch (NotProvisionedException e) {
-                Log.w(TAG, String.format("prepareDrm: NotProvisionedException"));
+                Log.w(TAG, "prepareDrm: NotProvisionedException");
 
-                // handle provisioning internally
+                // handle provisioning internally; it'll reset mPrepareDrmInProgress
                 boolean result = HandleProvisioninig(uuid);
 
                 // if blocking mode, we're already done;
                 // if non-blocking mode, we attempted to launch background provisioning
                 if (result == false) {
-                    final String msg =
-                                String.format("prepareDrm: Provisioning was required but failed.");
+                    final String msg = "prepareDrm: Provisioning was required but failed.";
                     Log.e(TAG, msg);
+                    earlyExit = true;
                     throw new ProvisioningErrorException(msg);
                 }
-
                 // nothing else to do;
                 // if blocking or non-blocking, HandleProvisioninig does the re-attempt & cleanup
             } catch (Exception e) {
-                Log.w(TAG, String.format("prepareDrm: Exception %s", e));
+                Log.e(TAG, "prepareDrm: Exception " + e);
+                earlyExit = true;
                 throw e;
             } finally {
-                mPrepareDrmInProgress = false;
-            }
+                if (!mDrmProvisioningInProgress) {// if early exit other than provisioning exception
+                    mPrepareDrmInProgress = false;
+                }
+                if (earlyExit) {    // cleaning up object if didn't succeed
+                    cleanDrmObj();
+                }
+            } // finally
         }   // synchronized
 
 
@@ -4173,25 +4237,33 @@
     public void releaseDrm()
             throws NoDrmSchemeException
     {
+        Log.v(TAG, "releaseDrm:");
+
         synchronized (mDrmLock) {
             if (!mActiveDrmScheme) {
-                Log.e(TAG, String.format("releaseDrm(%s): No active DRM scheme to release."));
+                Log.e(TAG, "releaseDrm(): No active DRM scheme to release.");
                 throw new NoDrmSchemeException("releaseDrm: No active DRM scheme to release.");
-            } else {
+            }
+
+            try {
+                // we don't have the player's state in this layer. The below call raises
+                // exception if we're in a non-stopped/idle state.
+
+                // for cleaning native/mediaserver crypto object
                 _releaseDrm();
 
+                // for cleaning client-side MediaDrm object; only called if above has succeeded
+                cleanDrmObj();
+
                 mActiveDrmScheme = false;
+            } catch (Exception e) {
+                Log.w(TAG, "releaseDrm: Exception ", e);
+                throw e;
             }
         }   // synchronized
     }
 
 
-    @NonNull
-    private native MediaDrm.KeyRequest _getKeyRequest(@NonNull byte[] scope,
-            @Nullable String mimeType, @MediaDrm.KeyType int keyType,
-            @Nullable Map<String, String> optionalParameters)
-            throws NotProvisionedException;
-
     /**
      * A key request/response exchange occurs between the app and a license server
      * to obtain or release keys used to decrypt encrypted content.
@@ -4232,20 +4304,42 @@
             @MediaDrm.KeyType int keyType, @Nullable Map<String, String> optionalParameters)
             throws NoDrmSchemeException
     {
+        Log.v(TAG, "getKeyRequest: " +
+                " scope: " + scope + " mimeType: " + mimeType +
+                " keyType: " + keyType + " optionalParameters: " + optionalParameters);
+
         synchronized (mDrmLock) {
             if (!mActiveDrmScheme) {
-                Log.e(TAG, String.format("getKeyRequest NoDrmSchemeException"));
+                Log.e(TAG, "getKeyRequest NoDrmSchemeException");
                 throw new NoDrmSchemeException("getKeyRequest: Has to set a DRM scheme first.");
             }
 
             try {
-                return _getKeyRequest(scope, mimeType, keyType, optionalParameters);
+                byte[] scopeOut = (keyType != MediaDrm.KEY_TYPE_RELEASE) ?
+                                  mDrmSessionId : // sessionId for KEY_TYPE_STREAMING/OFFLINE
+                                  scope;          // keySetId for KEY_TYPE_RELEASE
+
+                byte[] initData = (keyType != MediaDrm.KEY_TYPE_RELEASE) ?
+                                  scope :         // initData for KEY_TYPE_STREAMING/OFFLINE
+                                  null;           // not used for KEY_TYPE_RELEASE
+
+                HashMap<String, String> hmapOptionalParameters =
+                                                (optionalParameters != null) ?
+                                                new HashMap<String, String>(optionalParameters) :
+                                                null;
+
+                MediaDrm.KeyRequest request = mDrmObj.getKeyRequest(scopeOut, initData, mimeType,
+                                                              keyType, hmapOptionalParameters);
+                Log.v(TAG, "getKeyRequest:   --> request: " + request);
+
+                return request;
+
             } catch (NotProvisionedException e) {
-                Log.w(TAG, String.format("getKeyRequest NotProvisionedException: " +
-                                         "Unexpected. Shouldn't have reached here."));
+                Log.w(TAG, "getKeyRequest NotProvisionedException: " +
+                        "Unexpected. Shouldn't have reached here.");
                 throw new IllegalStateException("getKeyRequest: Unexpected provisioning error.");
             } catch (Exception e) {
-                Log.w(TAG, String.format("getKeyRequest Exception %s", e));
+                Log.w(TAG, "getKeyRequest Exception " + e);
                 throw e;
             }
 
@@ -4253,10 +4347,6 @@
     }
 
 
-    @Nullable
-    private native byte[] _provideKeyResponse(@Nullable byte[] keySetId, @NonNull byte[] response)
-            throws DeniedByServerException;
-
     /**
      * A key response is received from the license server by the app, then it is
      * provided to the DRM engine plugin using provideKeyResponse. When the
@@ -4279,25 +4369,41 @@
     public byte[] provideKeyResponse(@Nullable byte[] keySetId, @NonNull byte[] response)
             throws NoDrmSchemeException, DeniedByServerException
     {
+        Log.v(TAG, "provideKeyResponse: keySetId: " + keySetId + " response: " + response);
+
         synchronized (mDrmLock) {
 
             if (!mActiveDrmScheme) {
-                Log.e(TAG, String.format("getKeyRequest NoDrmSchemeException"));
+                Log.e(TAG, "getKeyRequest NoDrmSchemeException");
                 throw new NoDrmSchemeException("getKeyRequest: Has to set a DRM scheme first.");
             }
 
             try {
-                return _provideKeyResponse(keySetId, response);
+                byte[] scope = (keySetId == null) ?
+                                mDrmSessionId :     // sessionId for KEY_TYPE_STREAMING/OFFLINE
+                                keySetId;           // keySetId for KEY_TYPE_RELEASE
+
+                byte[] keySetResult = mDrmObj.provideKeyResponse(scope, response);
+
+                Log.v(TAG, "provideKeyResponse: keySetId: " + keySetId + " response: " + response +
+                        " --> " + keySetResult);
+
+
+                return keySetResult;
+
+            } catch (NotProvisionedException e) {
+                Log.w(TAG, "provideKeyResponse NotProvisionedException: " +
+                        "Unexpected. Shouldn't have reached here.");
+                throw new IllegalStateException("provideKeyResponse: " +
+                        "Unexpected provisioning error.");
             } catch (Exception e) {
-                Log.w(TAG, String.format("provideKeyResponse Exception %s", e));
+                Log.w(TAG, "provideKeyResponse Exception " + e);
                 throw e;
             }
         }   // synchronized
     }
 
 
-    private native void _restoreKeys(@NonNull byte[] keySetId);
-
     /**
      * Restore persisted offline keys into a new session.  keySetId identifies the
      * keys to load, obtained from a prior call to {@link #provideKeyResponse}.
@@ -4307,17 +4413,19 @@
     public void restoreKeys(@NonNull byte[] keySetId)
             throws NoDrmSchemeException
     {
+        Log.v(TAG, "restoreKeys: keySetId: " + keySetId);
+
         synchronized (mDrmLock) {
 
             if (!mActiveDrmScheme) {
-                Log.w(TAG, String.format("restoreKeys NoDrmSchemeException"));
+                Log.w(TAG, "restoreKeys NoDrmSchemeException");
                 throw new NoDrmSchemeException("restoreKeys: Has to set a DRM scheme first.");
             }
 
             try {
-                _restoreKeys(keySetId);
+                mDrmObj.restoreKeys(mDrmSessionId, keySetId);
             } catch (Exception e) {
-                Log.w(TAG, String.format("restoreKeys Exception %s", e));
+                Log.w(TAG, "restoreKeys Exception " + e);
                 throw e;
             }
 
@@ -4325,9 +4433,6 @@
     }
 
 
-    @NonNull
-    private native String _getDrmPropertyString(@NonNull String propertyName);
-
     /**
      * Read a DRM engine plugin String property value, given the property name string.
      * <p>
@@ -4341,26 +4446,29 @@
     public String getDrmPropertyString(@NonNull @MediaDrm.StringProperty String propertyName)
             throws NoDrmSchemeException
     {
+        Log.v(TAG, "getDrmPropertyString: propertyName: " + propertyName);
+
         String value;
         synchronized (mDrmLock) {
 
             if (!mActiveDrmScheme && !mDrmConfigAllowed) {
-                Log.w(TAG, String.format("getDrmPropertyString NoDrmSchemeException"));
+                Log.w(TAG, "getDrmPropertyString NoDrmSchemeException");
                 throw new NoDrmSchemeException("getDrmPropertyString: Has to prepareDrm() first.");
             }
 
             try {
-                value = _getDrmPropertyString(propertyName);
+                value = mDrmObj.getPropertyString(propertyName);
             } catch (Exception e) {
-                Log.w(TAG, String.format("getDrmPropertyString Exception %s", e));
+                Log.w(TAG, "getDrmPropertyString Exception " + e);
                 throw e;
             }
         }   // synchronized
 
+        Log.v(TAG, "getDrmPropertyString: propertyName: " + propertyName + " --> value: " + value);
+
         return value;
     }
 
-    private native void _setDrmPropertyString(@NonNull String propertyName, @NonNull String value);
 
     /**
      * Set a DRM engine plugin String property value.
@@ -4376,17 +4484,19 @@
                                      @NonNull String value)
             throws NoDrmSchemeException
     {
+        Log.v(TAG, "setDrmPropertyString: propertyName: " + propertyName + " value: " + value);
+
         synchronized (mDrmLock) {
 
             if ( !mActiveDrmScheme && !mDrmConfigAllowed ) {
-                Log.w(TAG, String.format("setDrmPropertyString NoDrmSchemeException"));
+                Log.w(TAG, "setDrmPropertyString NoDrmSchemeException");
                 throw new NoDrmSchemeException("setDrmPropertyString: Has to prepareDrm() first.");
             }
 
             try {
-                _setDrmPropertyString(propertyName, value);
+                mDrmObj.setPropertyString(propertyName, value);
             } catch ( Exception e ) {
-                Log.w(TAG, String.format("setDrmPropertyString Exception %s", e));
+                Log.w(TAG, "setDrmPropertyString Exception " + e);
                 throw e;
             }
         }   // synchronized
@@ -4553,8 +4663,47 @@
         }
     }
 
+
+    private native void _prepareDrm(@NonNull byte[] uuid, @NonNull byte[] drmSessionId);
+
         // Modular DRM helpers
 
+    private void prepareDrm_createDrmStep(@NonNull UUID uuid)
+            throws UnsupportedSchemeException {
+        Log.v(TAG, "prepareDrm_createDrmStep: UUID: " + uuid);
+
+        try {
+            mDrmObj = new MediaDrm(uuid);
+            Log.v(TAG, "prepareDrm_createDrmStep: Created mDrmObj=" + mDrmObj);
+        } catch (Exception e) { // UnsupportedSchemeException
+            Log.e(TAG, "prepareDrm_createDrmStep: MediaDrm failed with " + e);
+            throw e;
+        }
+    }
+
+    private void prepareDrm_openSessionStep(@NonNull UUID uuid)
+            throws NotProvisionedException, ResourceBusyException {
+        Log.v(TAG, "prepareDrm_openSessionStep: uuid: " + uuid);
+
+        // TODO: don't need an open session for a future specialKeyReleaseDrm mode but we should do
+        // it anyway so it raises provisioning error if needed. We'd rather handle provisioning
+        // at prepareDrm/openSession rather than getKeyRequest/provideKeyResponse
+        try {
+            mDrmSessionId = mDrmObj.openSession();
+            Log.v(TAG, "prepareDrm_openSessionStep: mDrmSessionId=" + mDrmSessionId);
+
+            // Sending it down to native/mediaserver to create the crypto object
+            // This call could simply fail due to bad player state, e.g., after start().
+            _prepareDrm(getByteArrayFromUUID(uuid), mDrmSessionId);
+            Log.v(TAG, "prepareDrm_openSessionStep: _prepareDrm/Crypto succeeded");
+
+        } catch (Exception e) { //ResourceBusyException, NotProvisionedException
+            Log.e(TAG, "prepareDrm_openSessionStep: open/crypto failed with " + e);
+            throw e;
+        }
+
+    }
+
     private class ProvisioningThread extends Thread
     {
         public static final int TIMEOUT_MS = 60000;
@@ -4581,7 +4730,7 @@
             urlStr = request.getDefaultUrl() + "&signedRequest=" + new String(request.getData());
             this.uuid = uuid;
 
-            Log.v(TAG, String.format("HandleProvisioninig: Thread is initialised url: %s", urlStr));
+            Log.v(TAG, "HandleProvisioninig: Thread is initialised url: " + urlStr);
             return this;
         }
 
@@ -4601,30 +4750,27 @@
                     connection.connect();
                     response = Streams.readFully(connection.getInputStream());
 
-                    Log.v(TAG, String.format("HandleProvisioninig: Thread run response %d %s",
-                                             response.length, response));
+                    Log.v(TAG, "HandleProvisioninig: Thread run: response " +
+                            response.length + " " + response);
                 } catch (Exception e) {
-                    Log.w(TAG, String.format("HandleProvisioninig: Thread run connect %s url: %s",
-                                             e, url));
+                    Log.w(TAG, "HandleProvisioninig: Thread run: connect " + e + " url: " + url);
                 } finally {
                     connection.disconnect();
                 }
             } catch (Exception e)   {
-                Log.w(TAG, String.format("HandleProvisioninig: Thread run openConnection %s", e));
+                Log.w(TAG, "HandleProvisioninig: Thread run: openConnection " + e);
             }
 
             if (response != null) {
                 try {
-                    MediaDrm drm = new MediaDrm(uuid);
-                    drm.provideProvisionResponse(response);
-                    drm.release();
-                    Log.v(TAG, String.format("HandleProvisioninig: Thread run " +
-                                             "newDrm+provideProvisionResponse SUCCEEDED!"));
+                    mDrmObj.provideProvisionResponse(response);
+                    Log.v(TAG, "HandleProvisioninig: Thread run: " +
+                            "provideProvisionResponse SUCCEEDED!");
 
                     provisioningSucceeded = true;
                 } catch (Exception e)   {
-                    Log.w(TAG, String.format("HandleProvisioninig: Thread run " +
-                                             "newDrm+provideProvisionResponse %s", e));
+                    Log.w(TAG, "HandleProvisioninig: Thread run: " +
+                            "provideProvisionResponse " + e);
                 }
             }
 
@@ -4638,7 +4784,10 @@
                     }
                     mediaPlayer.mDrmProvisioningInProgress = false;
                     mediaPlayer.mPrepareDrmInProgress = false;
-                }
+                    if (!succeeded) {
+                        cleanDrmObj();  // cleaning up if it hasn't gone through while in the lock
+                    }
+                } // synchronized
 
                 // calling the callback outside the lock
                 onDrmPreparedHandlerDelegate.notifyClient(succeeded);
@@ -4650,6 +4799,9 @@
                 }
                 mediaPlayer.mDrmProvisioningInProgress = false;
                 mediaPlayer.mPrepareDrmInProgress = false;
+                if (!succeeded) {
+                    cleanDrmObj();  // cleaning up if it hasn't gone through
+                }
             }
 
             finished = true;
@@ -4662,24 +4814,18 @@
         // the lock is already held by the caller
 
         if (mDrmProvisioningInProgress) {
-            Log.e(TAG, String.format("HandleProvisioninig: Unexpected mDrmProvisioningInProgress"));
+            Log.e(TAG, "HandleProvisioninig: Unexpected mDrmProvisioningInProgress");
             return false;
         }
 
-        MediaDrm.ProvisionRequest provReq = null;
-        try {
-            MediaDrm drm = new MediaDrm(uuid);
-            provReq = drm.getProvisionRequest();
-            drm.release();
-        } catch (Exception e) {
-            Log.e(TAG, String.format("HandleProvisioninig: getProvisionRequest failed with %s", e));
+        MediaDrm.ProvisionRequest provReq = mDrmObj.getProvisionRequest();
+        if (provReq == null) {
+            Log.e(TAG, "HandleProvisioninig: getProvisionRequest returned null.");
             return false;
         }
 
-        Log.v(TAG, String.format("HandleProvisioninig provReq: data %s  url %s",
-                                 (provReq != null) ? provReq.getData() : "-",
-                                 (provReq != null) ? provReq.getDefaultUrl() : "://")
-              );
+        Log.v(TAG, "HandleProvisioninig provReq " +
+                " data: " + provReq.getData() + " url: " + provReq.getDefaultUrl());
 
         // networking in a background thread
         mDrmProvisioningInProgress = true;
@@ -4697,7 +4843,7 @@
             try {
                 mDrmProvisioningThread.join();
             } catch (Exception e) {
-                Log.w(TAG, String.format("HandleProvisioninig: Thread.join Exception %s", e));
+                Log.w(TAG, "HandleProvisioninig: Thread.join Exception " + e);
             }
             result = mDrmProvisioningThread.succeeded();
             // no longer need the thread
@@ -4709,19 +4855,21 @@
 
     private boolean resumePrepareDrm(UUID uuid)
     {
+        Log.v(TAG, "resumePrepareDrm: uuid: " + uuid);
+
         // mDrmLock is guaranteed to be held
         boolean success = false;
         try {
-            boolean allowOpenSession = true;  // resuming
-            _prepareDrm(getByteArrayFromUUID(uuid),  allowOpenSession ? 1 : 0);
+            // resuming
+            prepareDrm_openSessionStep(uuid);
 
             mDrmUUID = uuid;
             mActiveDrmScheme = true;
 
             success = true;
         } catch (Exception e) {
-            Log.w(TAG, String.format("HandleProvisioninig: " +
-                                     "Thread run _prepareDrm resume failed with %s", e));
+            Log.w(TAG, "HandleProvisioninig: Thread run _prepareDrm resume failed with " + e);
+            // mDrmObj clean up is done by the caller
         }
 
         return success;
@@ -4730,6 +4878,12 @@
     private void resetDrmState()
     {
         synchronized (mDrmLock) {
+            Log.v(TAG, "resetDrmState: " +
+                    " mDrmInfo=" + mDrmInfo +
+                    " mDrmProvisioningThread=" + mDrmProvisioningThread +
+                    " mPrepareDrmInProgress=" + mPrepareDrmInProgress +
+                    " mActiveDrmScheme=" + mActiveDrmScheme);
+
             mDrmInfoResolved = false;
             mDrmInfo = null;
 
@@ -4739,15 +4893,33 @@
                     mDrmProvisioningThread.join();
                 }
                 catch (InterruptedException e) {
-                    Log.w(TAG, String.format("resetDrmState: ProvThread.join Exception %s", e));
+                    Log.w(TAG, "resetDrmState: ProvThread.join Exception " + e);
                 }
                 mDrmProvisioningThread = null;
             }
 
             mPrepareDrmInProgress = false;
+            mActiveDrmScheme = false;
+
+            cleanDrmObj();
         }   // synchronized
     }
 
+    private void cleanDrmObj()
+    {
+        // the caller holds mDrmLock
+        Log.v(TAG, "cleanDrmObj: mDrmObj=" + mDrmObj + " mDrmSessionId=" + mDrmSessionId);
+
+        if (mDrmSessionId != null)    {
+            mDrmObj.closeSession(mDrmSessionId);
+            mDrmSessionId = null;
+        }
+        if (mDrmObj != null) {
+            mDrmObj.release();
+            mDrmObj = null;
+        }
+    }
+
     private static final byte[] getByteArrayFromUUID(@NonNull UUID uuid) {
         long msb = uuid.getMostSignificantBits();
         long lsb = uuid.getLeastSignificantBits();
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/media/java/android/media/PlayerBase.java b/media/java/android/media/PlayerBase.java
index d2b052a..b397b45 100644
--- a/media/java/android/media/PlayerBase.java
+++ b/media/java/android/media/PlayerBase.java
@@ -17,9 +17,11 @@
 package android.media;
 
 import android.annotation.NonNull;
+import android.annotation.Nullable;
 import android.app.ActivityThread;
 import android.app.AppOpsManager;
 import android.content.Context;
+import android.media.VolumeShaper;
 import android.os.Binder;
 import android.os.IBinder;
 import android.os.Parcel;
@@ -357,6 +359,42 @@
      * @param rightVolume the right volume to use if muting is false
      */
     abstract void playerSetVolume(boolean muting, float leftVolume, float rightVolume);
+
+    /**
+     * Abstract method to apply a {@link VolumeShaper.Configuration}
+     * and a {@link VolumeShaper.Operation} to the Player.
+     * This should be overridden by the Player to call into the native
+     * VolumeShaper implementation. Multiple {@code VolumeShapers} may be
+     * concurrently active for a given Player, each accessible by the
+     * {@code VolumeShaper} id.
+     *
+     * The {@code VolumeShaper} implementation caches the id returned
+     * when applying a fully specified configuration
+     * from {VolumeShaper.Configuration.Builder} to track later
+     * operation changes requested on it.
+     *
+     * @param configuration a {@code VolumeShaper.Configuration} object
+     *        created by {@link VolumeShaper.Configuration.Builder} or
+     *        an created from a {@code VolumeShaper} id
+     *        by the {@link VolumeShaper.Configuration} constructor.
+     * @param operation a {@code VolumeShaper.Operation}.
+     * @return a negative error status or a
+     *         non-negative {@code VolumeShaper} id on success.
+     */
+    /* package */ abstract int playerApplyVolumeShaper(
+            @NonNull VolumeShaper.Configuration configuration,
+            @NonNull VolumeShaper.Operation operation);
+
+    /**
+     * Abstract method to get the current VolumeShaper state.
+     * @param id the {@code VolumeShaper} id returned from
+     *           sending a fully specified {@code VolumeShaper.Configuration}
+     *           through {@link #playerApplyVolumeShaper}
+     * @return a {@code VolumeShaper.State} object or null if
+     *         there is no {@code VolumeShaper} for the id.
+     */
+    /* package */ abstract @Nullable VolumeShaper.State playerGetVolumeShaperState(int id);
+
     abstract int playerSetAuxEffectSendLevel(boolean muting, float level);
     abstract void playerStart();
     abstract void playerPause();
@@ -396,6 +434,13 @@
         public void setStartDelayMs(int delayMs) {
             baseSetStartDelayMs(delayMs);
         }
+
+        @Override
+        public void applyVolumeShaper(
+                @NonNull VolumeShaper.Configuration configuration,
+                @NonNull VolumeShaper.Operation operation) {
+            /* void */ playerApplyVolumeShaper(configuration, operation);
+        }
     };
 
     //=====================================================================
diff --git a/media/java/android/media/PlayerProxy.java b/media/java/android/media/PlayerProxy.java
index 1a2c668..5f3997a 100644
--- a/media/java/android/media/PlayerProxy.java
+++ b/media/java/android/media/PlayerProxy.java
@@ -18,6 +18,7 @@
 
 import android.annotation.NonNull;
 import android.annotation.SystemApi;
+import android.media.VolumeShaper;
 import android.os.RemoteException;
 import android.util.Log;
 
@@ -132,4 +133,21 @@
         }
     }
 
+    /**
+     * @hide
+     * @param configuration
+     * @param operation
+     * @return volume shaper id or error
+     */
+    public void applyVolumeShaper(
+            @NonNull VolumeShaper.Configuration configuration,
+            @NonNull VolumeShaper.Operation operation) {
+        try {
+            mConf.getIPlayer().applyVolumeShaper(configuration, operation);
+        } catch (NullPointerException|RemoteException e) {
+            throw new IllegalStateException(
+                    "No player to proxy for applyVolumeShaper operation,"
+                    + " player already released?", e);
+        }
+    }
 }
diff --git a/media/java/android/media/SoundPool.java b/media/java/android/media/SoundPool.java
index 4cc1f8e..dbbbfc6 100644
--- a/media/java/android/media/SoundPool.java
+++ b/media/java/android/media/SoundPool.java
@@ -20,6 +20,8 @@
 import java.io.FileDescriptor;
 import java.lang.ref.WeakReference;
 
+import android.annotation.NonNull;
+import android.annotation.Nullable;
 import android.app.ActivityThread;
 import android.app.AppOpsManager;
 import android.content.Context;
@@ -388,6 +390,17 @@
         _setVolume(streamID, leftVolume, rightVolume);
     }
 
+    @Override
+    /* package */ int playerApplyVolumeShaper(
+            @NonNull VolumeShaper.Configuration configuration,
+            @Nullable VolumeShaper.Operation operation) {
+        return -1;
+    }
+
+    @Override
+    /* package */ @Nullable VolumeShaper.State playerGetVolumeShaperState(int id) {
+        return null;
+    }
 
     @Override
     void playerSetVolume(boolean muting, float leftVolume, float rightVolume) {
diff --git a/wifi/java/android/net/wifi/hotspot2/pps/HomeSP.aidl b/media/java/android/media/VolumeShaper.aidl
similarity index 68%
copy from wifi/java/android/net/wifi/hotspot2/pps/HomeSP.aidl
copy to media/java/android/media/VolumeShaper.aidl
index 62d5603..ecf6a8f 100644
--- a/wifi/java/android/net/wifi/hotspot2/pps/HomeSP.aidl
+++ b/media/java/android/media/VolumeShaper.aidl
@@ -1,11 +1,11 @@
-/**
- * Copyright (c) 2016, The Android Open Source Project
+/*
+ * Copyright 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
+ *      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,
@@ -14,6 +14,8 @@
  * limitations under the License.
  */
 
-package android.net.wifi.hotspot2.pps;
+package android.media;
 
-parcelable HomeSP;
+parcelable VolumeShaper.Configuration;
+parcelable VolumeShaper.Operation;
+parcelable VolumeShaper.State;
\ No newline at end of file
diff --git a/media/java/android/media/VolumeShaper.java b/media/java/android/media/VolumeShaper.java
new file mode 100644
index 0000000..77af359
--- /dev/null
+++ b/media/java/android/media/VolumeShaper.java
@@ -0,0 +1,1275 @@
+/*
+ * Copyright 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.media;
+
+import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.ref.WeakReference;
+import java.util.Objects;
+
+/**
+ * TODO: remove @hide
+ * The {@code VolumeShaper} class is used to automatically control audio volume during media
+ * playback, allowing for simple implementation of transition effects and ducking.
+ *
+ * The {@link VolumeShaper} appears as an additional scaling on the audio output,
+ * and can be used independently of track or stream volume controls.
+ */
+public final class VolumeShaper {
+    /* member variables */
+    private int mId;
+    private final WeakReference<PlayerBase> mPlayerBase;
+    private final WeakReference<PlayerProxy> mPlayerProxy;
+
+    /**
+     * Constructs a {@code VolumeShaper} from a {@link VolumeShaper.Configuration} and an
+     * {@link AudioTrack}.
+     *
+     * @param configuration
+     * @param audioTrack
+     */
+    public VolumeShaper(@NonNull Configuration configuration, @NonNull AudioTrack audioTrack) {
+        this(configuration, (PlayerBase)audioTrack);
+    }
+
+    /**
+     * Constructs a {@code VolumeShaper} from a {@link VolumeShaper.Configuration} and a
+     * {@link MediaPlayer}.
+     *
+     * @param configuration
+     * @param mediaPlayer
+     */
+    public VolumeShaper(@NonNull Configuration configuration, @NonNull MediaPlayer mediaPlayer) {
+        this(configuration, (PlayerBase)mediaPlayer);
+    }
+
+    /* package */ VolumeShaper(
+            @NonNull Configuration configuration, @NonNull PlayerBase playerBase) {
+        mPlayerBase = new WeakReference<PlayerBase>(playerBase);
+        mPlayerProxy = null;
+        mId = applyPlayer(configuration, new Operation.Builder().defer().build());
+    }
+
+    /**
+     * @hide
+     * TODO SystemApi
+     * Constructs a {@code VolumeShaper} from a {@link VolumeShaper.Configuration} and a
+     * {@code PlayerProxy} object.  The PlayerProxy object requires that the configuration
+     * be set with a system VolumeShaper id (this is a reserved value).
+     *
+     * @param configuration
+     * @param playerProxy
+     */
+    public VolumeShaper(
+            @NonNull Configuration configuration, @NonNull PlayerProxy playerProxy) {
+        if (configuration.getId() < 0) {
+            throw new IllegalArgumentException("playerProxy configuration id must be specified");
+        }
+        mPlayerProxy = new WeakReference<PlayerProxy>(playerProxy);
+        mPlayerBase = null;
+        mId = applyPlayer(configuration, new Operation.Builder().defer().build());
+    }
+
+    /* package */ int getId() {
+        return mId;
+    }
+
+    /**
+     * Applies the {@link VolumeShaper.Operation} to the {@code VolumeShaper}.
+     * @param operation
+     */
+    public void apply(@NonNull Operation operation) {
+        /* void */ applyPlayer(new VolumeShaper.Configuration(mId), operation);
+    }
+
+    /**
+     * Replaces the current {@code VolumeShaper}
+     * configuration with a new configuration.
+     *
+     * This can be used to dynamically change the {@code VolumeShaper}
+     * configuration by joining several
+     * {@code VolumeShaper} configurations together.
+     * This is useful if the user changes the volume while the
+     * {@code VolumeShaper} is in effect.
+     *
+     * @param configuration
+     * @param operation
+     * @param join
+     */
+    public void replace(
+            @NonNull Configuration configuration, @NonNull Operation operation, boolean join) {
+        mId = applyPlayer(
+                configuration,
+                new Operation.Builder(operation).replace(mId, join).build());
+    }
+
+    /**
+     * Returns the current volume scale attributable to the {@code VolumeShaper}.
+     *
+     * @return the volume, linearly represented as a value between 0.f and 1.f.
+     */
+    public float getVolume() {
+        return getStatePlayer(mId).getVolume();
+    }
+
+    /**
+     * Releases the {@code VolumeShaper}. Any volume scale due to the
+     * {@code VolumeShaper} is removed.
+     */
+    public void release() {
+        try {
+            /* void */ applyPlayer(
+                    new VolumeShaper.Configuration(mId),
+                    new Operation.Builder().terminate().build());
+        } catch (IllegalStateException ise) {
+            ; // ok
+        }
+        if (mPlayerBase != null) {
+            mPlayerBase.clear();
+        }
+        if (mPlayerProxy != null) {
+            mPlayerProxy.clear();
+        }
+    }
+
+    @Override
+    protected void finalize() {
+        release(); // ensure we remove the native volume shaper
+    }
+
+    /**
+     * Internal call to apply the configuration and operation to the Player.
+     * Returns a valid shaper id or throws the appropriate exception.
+     * @param configuration
+     * @param operation
+     * @return id a non-negative shaper id.
+     */
+    private int applyPlayer(
+            @NonNull VolumeShaper.Configuration configuration,
+            @NonNull VolumeShaper.Operation operation) {
+        final int id;
+        if (mPlayerProxy != null) {
+            // The PlayerProxy accepts only one way transactions so
+            // the Configuration must have an id set to one of the system
+            // ids (a positive value less than 16).
+            PlayerProxy player = mPlayerProxy.get();
+            if (player == null) {
+                throw new IllegalStateException("player deallocated");
+            }
+            id = configuration.getId();
+            if (id < 0) {
+                throw new IllegalArgumentException("proxy requires configuration with id");
+            }
+            player.applyVolumeShaper(configuration, operation);
+        } else if (mPlayerBase != null) {
+            PlayerBase player = mPlayerBase.get();
+            if (player == null) {
+                throw new IllegalStateException("player deallocated");
+            }
+            id = player.playerApplyVolumeShaper(configuration, operation);
+        } else {
+            throw new IllegalStateException("uninitialized shaper");
+        }
+        if (id < 0) {
+            // TODO - get INVALID_OPERATION from platform.
+            final int VOLUME_SHAPER_INVALID_OPERATION = -38; // must match with platform
+            // Due to RPC handling, we translate integer codes to exceptions right before
+            // delivering to the user.
+            if (id == VOLUME_SHAPER_INVALID_OPERATION) {
+                throw new IllegalStateException("player or volume shaper deallocated");
+            } else {
+                throw new IllegalArgumentException("invalid configuration or operation: " + id);
+            }
+        }
+        return id;
+    }
+
+    /**
+     * Internal call to retrieve the current VolumeShaper state.
+     * @param id
+     * @return the current {@vode VolumeShaper.State}
+     */
+    private @NonNull VolumeShaper.State getStatePlayer(int id) {
+        final VolumeShaper.State state;
+        if (mPlayerProxy != null) {
+            PlayerProxy player = mPlayerProxy.get();
+            if (player == null) {
+                throw new IllegalStateException("player deallocated");
+            }
+            throw new IllegalStateException("getStatePlayer not permitted through proxy");
+        } else if (mPlayerBase != null) {
+            PlayerBase player = mPlayerBase.get();
+            if (player == null) {
+                throw new IllegalStateException("player deallocated");
+            }
+            state = player.playerGetVolumeShaperState(id);
+        } else {
+            throw new IllegalStateException("uninitialized shaper");
+        }
+        if (state == null) {
+            throw new IllegalStateException("shaper cannot be found");
+        }
+        return state;
+    }
+
+    /**
+     * The {@code VolumeShaper.Configuration} class contains curve shape
+     * and parameter information for constructing a {@code VolumeShaper}.
+     * This curve shape and parameter information is specified
+     * on {@code VolumeShaper} creation
+     * and may be replaced through {@link VolumeShaper#replace}.
+     */
+    public static final class Configuration implements Parcelable {
+        private static final int MAXIMUM_CURVE_POINTS = 16;
+
+        /**
+         * Returns the maximum number of curve points allowed for
+         * {@link VolumeShaper.Builder#setCurve(float[], float[])}.
+         */
+        public static int getMaximumCurvePoints() {
+            return MAXIMUM_CURVE_POINTS;
+        }
+
+        // These values must match the native VolumeShaper::Configuration::Type
+        /** @hide */
+        @IntDef({
+            TYPE_ID,
+            TYPE_SCALE,
+            })
+        @Retention(RetentionPolicy.SOURCE)
+        public @interface Type {}
+
+        /**
+         * Specifies a {@link VolumeShaper} handle created by {@link #VolumeShaper(int)}
+         * from an id returned by {@code setVolumeShaper()}.
+         * The type, curve, etc. may not be queried from
+         * a {@code VolumeShaper} object of this type;
+         * the handle is used to identify and change the operation of
+         * an existing {@code VolumeShaper} sent to the player.
+         */
+        /* package */ static final int TYPE_ID = 0;
+
+        /**
+         * Specifies a {@link VolumeShaper} to be used
+         * as an additional scale to the current volume.
+         * This is created by the {@link VolumeShaper.Builder}.
+         */
+        /* package */ static final int TYPE_SCALE = 1;
+
+        // These values must match the native InterpolatorType enumeration.
+        /** @hide */
+        @IntDef({
+            INTERPOLATOR_TYPE_STEP,
+            INTERPOLATOR_TYPE_LINEAR,
+            INTERPOLATOR_TYPE_CUBIC,
+            INTERPOLATOR_TYPE_CUBIC_MONOTONIC,
+            })
+        @Retention(RetentionPolicy.SOURCE)
+        public @interface InterpolatorType {}
+
+        /**
+         * Stepwise volume curve.
+         */
+        public static final int INTERPOLATOR_TYPE_STEP = 0;
+
+        /**
+         * Linear interpolated volume curve.
+         */
+        public static final int INTERPOLATOR_TYPE_LINEAR = 1;
+
+        /**
+         * Cubic interpolated volume curve.
+         * This is default if unspecified.
+         */
+        public static final int INTERPOLATOR_TYPE_CUBIC = 2;
+
+        /**
+         * Cubic interpolated volume curve
+         * with local monotonicity preservation.
+         * So long as the control points are locally monotonic,
+         * the curve interpolation will also be locally monotonic.
+         * This is useful for cubic spline interpolated
+         * volume ramps and ducks.
+         */
+        public static final int INTERPOLATOR_TYPE_CUBIC_MONOTONIC = 3;
+
+        // These values must match the native VolumeShaper::Configuration::InterpolatorType
+        /** @hide */
+        @IntDef({
+            OPTION_FLAG_VOLUME_IN_DBFS,
+            OPTION_FLAG_CLOCK_TIME,
+            })
+        @Retention(RetentionPolicy.SOURCE)
+        public @interface OptionFlag {}
+
+        /**
+         * Use a dB full scale volume range for the volume curve.
+         *<p>
+         * The volume scale is typically from 0.f to 1.f on a linear scale;
+         * this option changes to -inf to 0.f on a db full scale,
+         * where 0.f is equivalent to a scale of 1.f.
+         */
+        public static final int OPTION_FLAG_VOLUME_IN_DBFS = (1 << 0);
+
+        /**
+         * Use clock time instead of media time.
+         *<p>
+         * The default implementation of {@code VolumeShaper} is to apply
+         * volume changes by the media time of the player.
+         * Hence, the {@code VolumeShaper} will speed or slow down to
+         * match player changes of playback rate, pause, or resume.
+         *<p>
+         * The {@code OPTION_FLAG_CLOCK_TIME} option allows the {@code VolumeShaper}
+         * progress to be determined by clock time instead of media time.
+         */
+        public static final int OPTION_FLAG_CLOCK_TIME = (1 << 1);
+
+        private static final int OPTION_FLAG_PUBLIC_ALL =
+                OPTION_FLAG_VOLUME_IN_DBFS | OPTION_FLAG_CLOCK_TIME;
+
+        /**
+         * A one second linear ramp from silence to full volume.
+         * Use {@link VolumeShaper.Builder#reflectTimes()} to generate
+         * the matching linear duck.
+         */
+        public static final Configuration LINEAR_RAMP = new VolumeShaper.Configuration.Builder()
+                .setInterpolatorType(INTERPOLATOR_TYPE_LINEAR)
+                .setCurve(new float[] {0.f, 1.f} /* times */,
+                        new float[] {0.f, 1.f} /* volumes */)
+                .setDurationMs(1000.)
+                .build();
+
+        /**
+         * A one second cubic ramp from silence to full volume.
+         * Use {@link VolumeShaper.Builder#reflectTimes()} to generate
+         * the matching cubic duck.
+         */
+        public static final Configuration CUBIC_RAMP = new VolumeShaper.Configuration.Builder()
+                .setInterpolatorType(INTERPOLATOR_TYPE_CUBIC)
+                .setCurve(new float[] {0.f, 1.f} /* times */,
+                        new float[] {0.f, 1.f}  /* volumes */)
+                .setDurationMs(1000.)
+                .build();
+
+        /**
+         * A one second sine curve for energy preserving cross fades.
+         * Use {@link VolumeShaper.Builder#reflectTimes()} to generate
+         * the matching cosine duck.
+         */
+        public static final Configuration SINE_RAMP;
+
+        /**
+         * A one second sine-squared s-curve ramp.
+         * Use {@link VolumeShaper.Builder#reflectTimes()}
+         * or {@link VolumeShaper.Builder#invertVolumes()} to generate
+         * the matching s-curve duck.
+         */
+        public static final Configuration SCURVE_RAMP;
+
+        static {
+            final int POINTS = MAXIMUM_CURVE_POINTS;
+            final float times[] = new float[POINTS];
+            final float sines[] = new float[POINTS];
+            final float scurve[] = new float[POINTS];
+            for (int i = 0; i < POINTS; ++i) {
+                times[i] = (float)i / (POINTS - 1);
+                final float sine = (float)Math.sin(times[i] * Math.PI / 2.);
+                sines[i] = sine;
+                scurve[i] = sine * sine;
+            }
+            SINE_RAMP = new VolumeShaper.Configuration.Builder()
+                .setInterpolatorType(INTERPOLATOR_TYPE_CUBIC)
+                .setCurve(times, sines)
+                .setDurationMs(1000.)
+                .build();
+            SCURVE_RAMP = new VolumeShaper.Configuration.Builder()
+                .setInterpolatorType(INTERPOLATOR_TYPE_CUBIC)
+                .setCurve(times, scurve)
+                .setDurationMs(1000.)
+                .build();
+        }
+
+        /*
+         * member variables - these are all final
+         */
+
+        // type of VolumeShaper
+        private final int mType;
+
+        // valid when mType is TYPE_ID
+        private final int mId;
+
+        // valid when mType is TYPE_SCALE
+        private final int mInterpolatorType;
+        private final int mOptionFlags;
+        private final double mDurationMs;
+        private final float[] mTimes;
+        private final float[] mVolumes;
+
+        @Override
+        public String toString() {
+            return "VolumeShaper.Configuration["
+                    + "mType=" + mType
+                    + (mType == TYPE_ID
+                    ? ",mId" + mId
+                    : ",mInterpolatorType=" + mInterpolatorType
+                    + ",mOptionFlags=" + mOptionFlags
+                    + ",mDurationMs=" + mDurationMs
+                    + ",mTimes[]=" + mTimes
+                    + ",mVolumes[]=" + mVolumes
+                    + "]");
+        }
+
+        @Override
+        public int hashCode() {
+            return mType == TYPE_ID
+                    ? Objects.hash(mType, mId)
+                    : Objects.hash(mType, mInterpolatorType, mDurationMs, mTimes, mVolumes);
+        }
+
+        @Override
+        public boolean equals(Object o) {
+            if (!(o instanceof Configuration)) return false;
+            if (o == this) return true;
+            final Configuration other = (Configuration) o;
+            return mType == other.mType &&
+                    (mType == TYPE_ID ? mId == other.mId
+                    : mInterpolatorType == other.mInterpolatorType
+                    && mDurationMs == other.mDurationMs
+                    && mTimes == other.mTimes
+                    && mVolumes == other.mVolumes);
+        }
+
+        @Override
+        public int describeContents() {
+            return 0;
+        }
+
+        @Override
+        public void writeToParcel(Parcel dest, int flags) {
+            dest.writeInt(mType);
+            dest.writeInt(mId);
+            if (mType != TYPE_ID) {
+                dest.writeInt(mInterpolatorType);
+                dest.writeInt(mOptionFlags);
+                dest.writeDouble(mDurationMs);
+                dest.writeFloatArray(mTimes);
+                dest.writeFloatArray(mVolumes);
+            }
+        }
+
+        public static final Parcelable.Creator<VolumeShaper.Configuration> CREATOR
+                = new Parcelable.Creator<VolumeShaper.Configuration>() {
+            @Override
+            public VolumeShaper.Configuration createFromParcel(Parcel p) {
+                final int type = p.readInt();
+                final int id = p.readInt();
+                if (type == TYPE_ID) {
+                    return new VolumeShaper.Configuration(id);
+                } else {
+                    return new VolumeShaper.Configuration(
+                        type,
+                        id,                    // id
+                        p.readInt(),           // interpolatorType
+                        p.readInt(),           // optionFlags
+                        p.readDouble(),        // durationMs
+                        p.createFloatArray(),  // times
+                        p.createFloatArray()); // volumes
+                }
+            }
+
+            @Override
+            public VolumeShaper.Configuration[] newArray(int size) {
+                return new VolumeShaper.Configuration[size];
+            }
+        };
+
+        /**
+         * Constructs a volume shaper from an id.
+         *
+         * This is an opaque handle for controlling a {@code VolumeShaper} that has
+         * already been sent to a player.  The {@code id} is returned from the
+         * initial {@code setVolumeShaper()} call on success.
+         *
+         * These configurations are for native use only,
+         * they are never returned directly to the user.
+         *
+         * @param id
+         * @throws IllegalArgumentException if id is negative.
+         */
+        private Configuration(int id) {
+            if (id < 0) {
+                throw new IllegalArgumentException("negative id " + id);
+            }
+            mType = TYPE_ID;
+            mId = id;
+            mInterpolatorType = 0;
+            mOptionFlags = 0;
+            mDurationMs = 0;
+            mTimes = null;
+            mVolumes = null;
+        }
+
+        /**
+         * Direct constructor for VolumeShaper.
+         * Use the Builder instead.
+         */
+        private Configuration(@Type int type,
+                int id,
+                @InterpolatorType int interpolatorType,
+                @OptionFlag int optionFlags,
+                double durationMs,
+                @NonNull float[] times,
+                @NonNull float[] volumes) {
+            mType = type;
+            mId = id;
+            mInterpolatorType = interpolatorType;
+            mOptionFlags = optionFlags;
+            mDurationMs = durationMs;
+            // Builder should have cloned these arrays already.
+            mTimes = times;
+            mVolumes = volumes;
+        }
+
+        /**
+         * Returns the {@code VolumeShaper} type.
+         */
+        public @Type int getType() {
+            return mType;
+        }
+
+        /**
+         * @hide
+         * Returns the {@code VolumeShaper} id.
+         */
+        public int getId() {
+            return mId;
+        }
+
+        /**
+         * Returns the interpolator type.
+         */
+        public @InterpolatorType int getInterpolatorType() {
+            return mInterpolatorType;
+        }
+
+        /**
+         * Returns the option flags
+         */
+        public @OptionFlag int getOptionFlags() {
+            return mOptionFlags & OPTION_FLAG_PUBLIC_ALL;
+        }
+
+        /* package */ @OptionFlag int getAllOptionFlags() {
+            return mOptionFlags;
+        }
+
+        /**
+         * Returns the duration of the effect in milliseconds.
+         */
+        public double getDurationMs() {
+            return mDurationMs;
+        }
+
+        /**
+         * Returns the times (x) coordinate array of the volume curve points.
+         */
+        public float[] getTimes() {
+            return mTimes;
+        }
+
+        /**
+         * Returns the volumes (y) coordinate array of the volume curve points.
+         */
+        public float[] getVolumes() {
+            return mVolumes;
+        }
+
+        /**
+         * Checks the validity of times and volumes point representation.
+         *
+         * {@code times[]} and {@code volumes[]} are two arrays representing points
+         * for the volume curve.
+         *
+         * @param times the x coordinates for the points,
+         *        must be between 0.f and 1.f and be monotonic.
+         * @param volumes the y coordinates for the points,
+         *        must be between 0.f and 1.f for linear and
+         *        must be no greater than 0.f for log (dBFS).
+         * @param log set to true if the scale is logarithmic.
+         * @return null if no error, or the reason in a {@code String} for an error.
+         */
+        private static @Nullable String checkCurveForErrors(
+                @NonNull float[] times, @NonNull float[] volumes, boolean log) {
+            if (times.length != volumes.length) {
+                return "array length must match";
+            } else if (times.length < 2) {
+                return "array length must be at least 2";
+            } else if (times.length > MAXIMUM_CURVE_POINTS) {
+                return "array length must be no larger than " + MAXIMUM_CURVE_POINTS;
+            } else if (times[0] != 0.f) {
+                return "times must start at 0.f";
+            } else if (times[times.length - 1] != 1.f) {
+                return "times must end at 1.f";
+            }
+
+            // validate points along the curve
+            for (int i = 1; i < times.length; ++i) {
+                if (!(times[i] > times[i - 1]) /* handle nan */) {
+                    return "times not monotonic increasing, check index " + i;
+                }
+            }
+            if (log) {
+                for (int i = 0; i < volumes.length; ++i) {
+                    if (!(volumes[i] <= 0.f) /* handle nan */) {
+                        return "volumes for log scale cannot be positive, "
+                                + "check index " + i;
+                    }
+                }
+            } else {
+                for (int i = 0; i < volumes.length; ++i) {
+                    if (!(volumes[i] >= 0.f) || !(volumes[i] <= 1.f) /* handle nan */) {
+                        return "volumes for linear scale must be between 0.f and 1.f, "
+                                + "check index " + i;
+                    }
+                }
+            }
+            return null; // no errors
+        }
+
+        private static void checkValidVolume(float volume, boolean log) {
+            if (log) {
+                if (!(volume <= 0.f) /* handle nan */) {
+                    throw new IllegalArgumentException("dbfs volume must be 0.f or less");
+                }
+            } else {
+                if (!(volume >= 0.f) || !(volume <= 1.f) /* handle nan */) {
+                    throw new IllegalArgumentException("volume must be >= 0.f and <= 1.f");
+                }
+            }
+        }
+
+        private static void clampVolume(float[] volumes, boolean log) {
+            if (log) {
+                for (int i = 0; i < volumes.length; ++i) {
+                    if (!(volumes[i] <= 0.f) /* handle nan */) {
+                        volumes[i] = 0.f;
+                    }
+                }
+            } else {
+                for (int i = 0; i < volumes.length; ++i) {
+                    if (!(volumes[i] >= 0.f) /* handle nan */) {
+                        volumes[i] = 0.f;
+                    } else if (!(volumes[i] <= 1.f)) {
+                        volumes[i] = 1.f;
+                    }
+                }
+            }
+        }
+
+        /**
+         * Builder class for a {@link VolumeShaper.Configuration} object.
+         * <p> Here is an example where {@code Builder} is used to define the
+         * {@link VolumeShaper.Configuration}.
+         *
+         * <pre class="prettyprint">
+         * VolumeShaper.Configuration LINEAR_RAMP =
+         *         new VolumeShaper.Configuration.Builder()
+         *             .setInterpolatorType(VolumeShaper.Configuration.INTERPOLATOR_TYPE_LINEAR)
+         *             .setCurve(new float[] { 0.f, 1.f }, // times
+         *                       new float[] { 0.f, 1.f }) // volumes
+         *             .setDurationMs(1000.)
+         *             .build();
+         * </pre>
+         * <p>
+         */
+        public static final class Builder {
+            private int mType = TYPE_SCALE;
+            private int mId = -1; // invalid
+            private int mInterpolatorType = INTERPOLATOR_TYPE_CUBIC;
+            private int mOptionFlags = 0;
+            private double mDurationMs = 1000.;
+            private float[] mTimes = null;
+            private float[] mVolumes = null;
+
+            /**
+             * Constructs a new Builder with the defaults.
+             */
+            public Builder() {
+            }
+
+            /**
+             * Constructs a new Builder from a given {@code VolumeShaper.Configuration}
+             * @param configuration prototypical configuration
+             *        which will be reused in the new Builder.
+             */
+            public Builder(@NonNull Configuration configuration) {
+                mType = configuration.getType();
+                mId = configuration.getId();
+                mOptionFlags = configuration.getAllOptionFlags();
+                mInterpolatorType = configuration.getInterpolatorType();
+                mDurationMs = configuration.getDurationMs();
+                mTimes = configuration.getTimes();
+                mVolumes = configuration.getVolumes();
+            }
+
+            /**
+             * @hide
+             * TODO make SystemApi
+             *
+             * Set the id for system defined shapers.
+             * @param id
+             * @return
+             */
+            public @NonNull Builder setId(int id) {
+                mId = id;
+                return this;
+            }
+
+            /**
+             * Sets the interpolator type.
+             *
+             * If omitted the interplator type is {@link #INTERPOLATOR_TYPE_CUBIC}.
+             *
+             * @param interpolatorType method of interpolation used for the volume curve.
+             * @return the same Builder instance.
+             * @throws IllegalArgumentException if {@code interpolatorType} is not valid.
+             */
+            public @NonNull Builder setInterpolatorType(@InterpolatorType int interpolatorType) {
+                switch (interpolatorType) {
+                    case INTERPOLATOR_TYPE_STEP:
+                    case INTERPOLATOR_TYPE_LINEAR:
+                    case INTERPOLATOR_TYPE_CUBIC:
+                    case INTERPOLATOR_TYPE_CUBIC_MONOTONIC:
+                        mInterpolatorType = interpolatorType;
+                        break;
+                    default:
+                        throw new IllegalArgumentException("invalid interpolatorType: "
+                                + interpolatorType);
+                }
+                return this;
+            }
+
+            /**
+             * Sets the optional flags
+             *
+             * If omitted, flags are 0. If {@link #OPTION_FLAG_VOLUME_IN_DBFS} has
+             * changed the volume curve needs to be set again as the acceptable
+             * volume domain has changed.
+             *
+             * @param optionFlags new value to replace the old {@code optionFlags}.
+             * @return the same Builder instance.
+             * @throws IllegalArgumentException if flag is not recognized.
+             */
+            public @NonNull Builder setOptionFlags(@OptionFlag int optionFlags) {
+                if ((optionFlags & ~OPTION_FLAG_PUBLIC_ALL) != 0) {
+                    throw new IllegalArgumentException("invalid bits in flag: " + optionFlags);
+                }
+                mOptionFlags = mOptionFlags & ~OPTION_FLAG_PUBLIC_ALL | optionFlags;
+                return this;
+            }
+
+            /**
+             * Sets the volume shaper duration in milliseconds.
+             *
+             * If omitted, the default duration is 1 second.
+             *
+             * @param durationMs
+             * @return the same Builder instance.
+             * @throws IllegalArgumentException if duration is not positive.
+             */
+            public @NonNull Builder setDurationMs(double durationMs) {
+                if (durationMs <= 0.) {
+                    throw new IllegalArgumentException(
+                            "duration: " + durationMs + " not positive");
+                }
+                mDurationMs = durationMs;
+                return this;
+            }
+
+            /**
+             * Sets the volume curve.
+             *
+             * The volume curve is represented by a set of control points given by
+             * two float arrays of equal length,
+             * one representing the time (x) coordinates
+             * and one corresponding to the volume (y) coordinates.
+             * The length must be at least 2
+             * and no greater than {@link VolumeShaper.Configuration#getMaximumCurvePoints()}.
+             * <p>
+             * The volume curve is normalized as follows:
+             * (1) time (x) coordinates should be monotonically increasing, from 0.f to 1.f;
+             * (2) volume (y) coordinates must be within 0.f to 1.f for linear and be non-positive
+             *     for log scaling.
+             * <p>
+             * The time scale is set by {@link #setDurationMs} in seconds.
+             * <p>
+             * @param times an array of float values representing
+             *        the time line of the volume curve.
+             * @param volumes an array of float values representing
+             *        the amplitude of the volume curve.
+             * @return the same Builder instance.
+             * @throws IllegalArgumentException if {@code times} or {@code volumes} is invalid.
+             */
+            public @NonNull Builder setCurve(@NonNull float[] times, @NonNull float[] volumes) {
+                String error = checkCurveForErrors(
+                        times, volumes, (mOptionFlags & OPTION_FLAG_VOLUME_IN_DBFS) != 0);
+                if (error != null) {
+                    throw new IllegalArgumentException(error);
+                }
+                mTimes = times.clone();
+                mVolumes = volumes.clone();
+                return this;
+            }
+
+            /**
+             * Reflects the volume curve so that
+             * the shaper changes volume from the end
+             * to the start.
+             *
+             * @return the same Builder instance.
+             */
+            public @NonNull Builder reflectTimes() {
+                int i;
+                for (i = 0; i < mTimes.length / 2; ++i) {
+                    float temp = mTimes[0];
+                    mTimes[i] = 1.f - mTimes[mTimes.length - 1 - i];
+                    mTimes[mTimes.length - 1 - i] = 1.f - temp;
+                }
+                if ((mTimes.length & 1) != 0) {
+                    mTimes[i] = 1.f - mTimes[i];
+                }
+                return this;
+            }
+
+            /**
+             * Inverts the volume curve so that the max volume
+             * becomes the min volume and vice versa.
+             *
+             * @return the same Builder instance.
+             */
+            public @NonNull Builder invertVolumes() {
+                if (mVolumes.length >= 2) {
+                    float min = mVolumes[0];
+                    float max = mVolumes[0];
+                    for (int i = 1; i < mVolumes.length; ++i) {
+                        if (mVolumes[i] < min) {
+                            min = mVolumes[i];
+                        } else if (mVolumes[i] > max) {
+                            max = mVolumes[i];
+                        }
+                    }
+
+                    final float maxmin = max + min;
+                    for (int i = 0; i < mVolumes.length; ++i) {
+                        mVolumes[i] = maxmin - mVolumes[i];
+                    }
+                }
+                return this;
+            }
+
+            /**
+             * Scale the curve end volume to a target value.
+             *
+             * Keeps the start volume the same.
+             * This works best if the volume curve is monotonic.
+             *
+             * @return the same Builder instance.
+             * @throws IllegalArgumentException if volume is not valid.
+             */
+            public @NonNull Builder scaleToEndVolume(float volume) {
+                final boolean log = (mOptionFlags & OPTION_FLAG_VOLUME_IN_DBFS) != 0;
+                checkValidVolume(volume, log);
+                final float startVolume = mVolumes[0];
+                final float endVolume = mVolumes[mVolumes.length - 1];
+                if (endVolume == startVolume) {
+                    // match with linear ramp
+                    final float offset = volume - startVolume;
+                    for (int i = 0; i < mVolumes.length; ++i) {
+                        mVolumes[i] = mVolumes[i] + offset * mTimes[i];
+                    }
+                } else {
+                    // scale
+                    final float scale = (volume - startVolume) / (endVolume - startVolume);
+                    for (int i = 0; i < mVolumes.length; ++i) {
+                        mVolumes[i] = scale * (mVolumes[i] - startVolume) + startVolume;
+                    }
+                }
+                clampVolume(mVolumes, log);
+                return this;
+            }
+
+            /**
+             * Scale the curve start volume to a target value.
+             *
+             * Keeps the end volume the same.
+             * This works best if the volume curve is monotonic.
+             *
+             * @return the same Builder instance.
+             * @throws IllegalArgumentException if volume is not valid.
+             */
+            public @NonNull Builder scaleToStartVolume(float volume) {
+                final boolean log = (mOptionFlags & OPTION_FLAG_VOLUME_IN_DBFS) != 0;
+                checkValidVolume(volume, log);
+                final float startVolume = mVolumes[0];
+                final float endVolume = mVolumes[mVolumes.length - 1];
+                if (endVolume == startVolume) {
+                    // match with linear ramp
+                    final float offset = volume - startVolume;
+                    for (int i = 0; i < mVolumes.length; ++i) {
+                        mVolumes[i] = mVolumes[i] + offset * (1.f - mTimes[i]);
+                    }
+                } else {
+                    final float scale = (volume - endVolume) / (startVolume - endVolume);
+                    for (int i = 0; i < mVolumes.length; ++i) {
+                        mVolumes[i] = scale * (mVolumes[i] - endVolume) + endVolume;
+                    }
+                }
+                clampVolume(mVolumes, log);
+                return this;
+            }
+
+            /**
+             * Builds a new {@link VolumeShaper} object.
+             *
+             * @return a new {@link VolumeShaper} object
+             */
+            public @NonNull Configuration build() {
+                String error = checkCurveForErrors(
+                        mTimes, mVolumes, (mOptionFlags & OPTION_FLAG_VOLUME_IN_DBFS) != 0);
+                if (error != null) {
+                    throw new IllegalArgumentException(error);
+                }
+                return new Configuration(mType, mId, mInterpolatorType, mOptionFlags,
+                        mDurationMs, mTimes, mVolumes);
+            }
+        } // Configuration.Builder
+    } // Configuration
+
+    /**
+     * The {@code VolumeShaper.Operation} class is used to specify operations
+     * to the {@code VolumeShaper} that affect the volume change.
+     */
+    public static final class Operation implements Parcelable {
+        /**
+         * Forward playback from current volume time position.
+         */
+        public static final Operation PLAY =
+                new VolumeShaper.Operation.Builder()
+                    .build();
+
+        /**
+         * Reverse playback from current volume time position.
+         */
+        public static final Operation REVERSE =
+                new VolumeShaper.Operation.Builder()
+                    .reverse()
+                    .build();
+
+        // No user serviceable parts below.
+
+        // These flags must match the native VolumeShaper::Operation::Flag
+        /** @hide */
+        @IntDef({
+            FLAG_NONE,
+            FLAG_REVERSE,
+            FLAG_TERMINATE,
+            FLAG_JOIN,
+            FLAG_DEFER,
+            })
+        @Retention(RetentionPolicy.SOURCE)
+        public @interface Flag {}
+
+        /**
+         * No special {@code VolumeShaper} operation.
+         */
+        private static final int FLAG_NONE = 0;
+
+        /**
+         * Reverse the {@code VolumeShaper} progress.
+         *
+         * Reverses the {@code VolumeShaper} curve from its current
+         * position. If the {@code VolumeShaper} curve has not started,
+         * it automatically is considered finished.
+         */
+        private static final int FLAG_REVERSE = 1 << 0;
+
+        /**
+         * Terminate the existing {@code VolumeShaper}.
+         * This flag is generally used by itself;
+         * it takes precedence over all other flags.
+         */
+        private static final int FLAG_TERMINATE = 1 << 1;
+
+        /**
+         * Attempt to join as best as possible to the previous {@code VolumeShaper}.
+         * This requires the previous {@code VolumeShaper} to be active and
+         * {@link #setReplaceId} to be set.
+         */
+        private static final int FLAG_JOIN = 1 << 2;
+
+        /**
+         * Defer playback until next operation is sent. This is used
+         * when starting a VolumeShaper effect.
+         */
+        private static final int FLAG_DEFER = 1 << 3;
+
+        private static final int FLAG_PUBLIC_ALL = FLAG_REVERSE | FLAG_TERMINATE;
+
+        private final int mFlags;
+        private final int mReplaceId;
+
+        @Override
+        public String toString() {
+            return "VolumeShaper.Operation["
+                    + "mFlags=" + mFlags
+                    + ",mReplaceId" + mReplaceId
+                    + "]";
+        }
+
+        @Override
+        public int hashCode() {
+            return Objects.hash(mFlags, mReplaceId);
+        }
+
+        @Override
+        public boolean equals(Object o) {
+            if (!(o instanceof Operation)) return false;
+            if (o == this) return true;
+            final Operation other = (Operation) o;
+            return mFlags == other.mFlags
+                    && mReplaceId == other.mReplaceId;
+        }
+
+        @Override
+        public int describeContents() {
+            return 0;
+        }
+
+        @Override
+        public void writeToParcel(Parcel dest, int flags) {
+            dest.writeInt(mFlags);
+            dest.writeInt(mReplaceId);
+        }
+
+        public static final Parcelable.Creator<VolumeShaper.Operation> CREATOR
+                = new Parcelable.Creator<VolumeShaper.Operation>() {
+            @Override
+            public VolumeShaper.Operation createFromParcel(Parcel p) {
+                return new VolumeShaper.Operation(
+                        p.readInt()     // flags
+                        , p.readInt()); // replaceId
+            }
+
+            @Override
+            public VolumeShaper.Operation[] newArray(int size) {
+                return new VolumeShaper.Operation[size];
+            }
+        };
+
+        private Operation(@Flag int flags, int replaceId) {
+            mFlags = flags;
+            mReplaceId = replaceId;
+        }
+
+        /**
+         * @hide
+         * {@code Builder} class for {@link VolumeShaper.Operation} object.
+         *
+         * Not for public use.
+         */
+        public static final class Builder {
+            int mFlags;
+            int mReplaceId;
+
+            /**
+             * Constructs a new {@code Builder} with the defaults.
+             */
+            public Builder() {
+                mFlags = 0;
+                mReplaceId = -1;
+            }
+
+            /**
+             * Constructs a new Builder from a given {@code VolumeShaper.Operation}
+             * @param operation the {@code VolumeShaper.operation} whose data will be
+             *        reused in the new Builder.
+             */
+            public Builder(@NonNull VolumeShaper.Operation operation) {
+                mReplaceId = operation.mReplaceId;
+                mFlags = operation.mFlags;
+            }
+
+            /**
+             * Replaces the previous {@code VolumeShaper}.
+             * It has no other effect if the {@code VolumeShaper} is
+             * already expired. If the replaceId is the same as the id associated with
+             * the {@code VolumeShaper} in a {@code setVolumeShaper()} call,
+             * an error is returned.
+             * @param handle is a previous volumeShaper {@code VolumeShaper}.
+             * @param join the start to match the current volume of the previous
+             * shaper.
+             * @return the same Builder instance.
+             */
+            public @NonNull Builder replace(int id, boolean join) {
+                mReplaceId = id;
+                if (join) {
+                    mFlags |= FLAG_JOIN;
+                } else {
+                    mFlags &= ~FLAG_JOIN;
+                }
+                return this;
+            }
+
+            /**
+             * Defers all operations.
+             * @return the same Builder instance.
+             */
+            public @NonNull Builder defer() {
+                mFlags |= FLAG_DEFER;
+                return this;
+            }
+
+            /**
+             * Terminates the VolumeShaper.
+             * Do not call directly, use {@link VolumeShaper#release()}.
+             * @return the same Builder instance.
+             */
+            public @NonNull Builder terminate() {
+                mFlags |= FLAG_TERMINATE;
+                return this;
+            }
+
+            /**
+             * Reverses direction.
+             * @return the same Builder instance.
+             */
+            public @NonNull Builder reverse() {
+                mFlags ^= FLAG_REVERSE;
+                return this;
+            }
+
+            /**
+             * Sets the operation flag.  Do not call this directly but one of the
+             * other builder methods.
+             *
+             * @param flags new value for {@code flags}, consisting of ORed flags.
+             * @return the same Builder instance.
+             */
+            private @NonNull Builder setFlags(@Flag int flags) {
+                if ((flags & ~FLAG_PUBLIC_ALL) != 0) {
+                    throw new IllegalArgumentException("flag has unknown bits set: " + flags);
+                }
+                mFlags = mFlags & ~FLAG_PUBLIC_ALL | flags;
+                return this;
+            }
+
+            /**
+             * Builds a new {@link VolumeShaper.Operation} object.
+             *
+             * @return a new {@code VolumeShaper.Operation} object
+             */
+            public @NonNull Operation build() {
+                return new Operation(mFlags, mReplaceId);
+            }
+        } // Operation.Builder
+    } // Operation
+
+    /**
+     * @hide
+     * {@code VolumeShaper.State} represents the current progress
+     * of the {@code VolumeShaper}.
+     *
+     *  Not for public use.
+     */
+    public static final class State implements Parcelable {
+        private float mVolume;
+        private float mXOffset;
+
+        @Override
+        public String toString() {
+            return "VolumeShaper.State["
+                    + "mVolume=" + mVolume
+                    + ",mXOffset" + mXOffset
+                    + "]";
+        }
+
+        @Override
+        public int hashCode() {
+            return Objects.hash(mVolume, mXOffset);
+        }
+
+        @Override
+        public boolean equals(Object o) {
+            if (!(o instanceof State)) return false;
+            if (o == this) return true;
+            final State other = (State) o;
+            return mVolume == other.mVolume
+                    && mXOffset == other.mXOffset;
+        }
+
+        @Override
+        public int describeContents() {
+            return 0;
+        }
+
+        @Override
+        public void writeToParcel(Parcel dest, int flags) {
+            dest.writeFloat(mVolume);
+            dest.writeFloat(mXOffset);
+        }
+
+        public static final Parcelable.Creator<VolumeShaper.State> CREATOR
+                = new Parcelable.Creator<VolumeShaper.State>() {
+            @Override
+            public VolumeShaper.State createFromParcel(Parcel p) {
+                return new VolumeShaper.State(
+                        p.readFloat()     // volume
+                        , p.readFloat()); // xOffset
+            }
+
+            @Override
+            public VolumeShaper.State[] newArray(int size) {
+                return new VolumeShaper.State[size];
+            }
+        };
+
+        /* package */ State(float volume, float xOffset) {
+            mVolume = volume;
+            mXOffset = xOffset;
+        }
+
+        /**
+         * Gets the volume of the {@link VolumeShaper.State}.
+         */
+        public float getVolume() {
+            return mVolume;
+        }
+
+        /**
+         * Gets the elapsed ms of the {@link VolumeShaper.State}
+         */
+        public double getXOffset() {
+            return mXOffset;
+        }
+    } // State
+}
diff --git a/media/java/android/media/session/IOnMediaKeyListener.aidl b/media/java/android/media/session/IOnMediaKeyListener.aidl
index 7752357..aa98ea3 100644
--- a/media/java/android/media/session/IOnMediaKeyListener.aidl
+++ b/media/java/android/media/session/IOnMediaKeyListener.aidl
@@ -22,7 +22,7 @@
  * Listener to handle media key.
  * @hide
  */
-interface IOnMediaKeyListener {
+oneway interface IOnMediaKeyListener {
     void onMediaKey(in KeyEvent event, in ResultReceiver result);
 }
 
diff --git a/media/java/android/media/session/ISessionCallback.aidl b/media/java/android/media/session/ISessionCallback.aidl
index 2f6e260..a146c62 100644
--- a/media/java/android/media/session/ISessionCallback.aidl
+++ b/media/java/android/media/session/ISessionCallback.aidl
@@ -16,6 +16,7 @@
 package android.media.session;
 
 import android.content.Intent;
+import android.media.MediaDescription;
 import android.media.Rating;
 import android.net.Uri;
 import android.os.Bundle;
@@ -49,6 +50,10 @@
     void onRepeatMode(int repeatMode);
     void onShuffleMode(boolean enabled);
     void onCustomAction(String action, in Bundle args);
+    void onAddQueueItem(in MediaDescription description);
+    void onAddQueueItemAt(in MediaDescription description, int index);
+    void onRemoveQueueItem(in MediaDescription description);
+    void onRemoveQueueItemAt(int index);
 
     // These callbacks are for volume handling
     void onAdjustVolume(int direction);
diff --git a/media/java/android/media/session/ISessionController.aidl b/media/java/android/media/session/ISessionController.aidl
index e92758c..7b5233a 100644
--- a/media/java/android/media/session/ISessionController.aidl
+++ b/media/java/android/media/session/ISessionController.aidl
@@ -18,6 +18,7 @@
 import android.app.PendingIntent;
 import android.content.Intent;
 import android.content.pm.ParceledListSlice;
+import android.media.MediaDescription;
 import android.media.MediaMetadata;
 import android.media.Rating;
 import android.media.session.ISessionControllerCallback;
@@ -51,6 +52,11 @@
     MediaMetadata getMetadata();
     PlaybackState getPlaybackState();
     ParceledListSlice getQueue();
+    void addQueueItem(in MediaDescription description);
+    void addQueueItemAt(in MediaDescription description, int index);
+    void removeQueueItem(in MediaDescription description);
+    void removeQueueItemAt(int index);
+
     CharSequence getQueueTitle();
     Bundle getExtras();
     int getRatingType();
diff --git a/media/java/android/media/session/MediaController.java b/media/java/android/media/session/MediaController.java
index 8cbf8e1..bab2af2 100644
--- a/media/java/android/media/session/MediaController.java
+++ b/media/java/android/media/session/MediaController.java
@@ -23,6 +23,7 @@
 import android.content.pm.ParceledListSlice;
 import android.media.AudioAttributes;
 import android.media.AudioManager;
+import android.media.MediaDescription;
 import android.media.MediaMetadata;
 import android.media.Rating;
 import android.media.VolumeProvider;
@@ -38,6 +39,7 @@
 import android.view.KeyEvent;
 
 import java.lang.ref.WeakReference;
+import java.lang.UnsupportedOperationException;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -111,8 +113,7 @@
     }
 
     /**
-     * Get a {@link TransportControls} instance to send transport actions to
-     * the associated session.
+     * Get a {@link TransportControls} instance to send transport actions to this session.
      *
      * @return A transport controls instance.
      */
@@ -151,7 +152,7 @@
         try {
             return mSessionBinder.getPlaybackState();
         } catch (RemoteException e) {
-            Log.wtf(TAG, "Error calling getPlaybackState.", e);
+            Log.wtf(TAG, "Error calling getPlaybackState", e);
             return null;
         }
     }
@@ -165,7 +166,7 @@
         try {
             return mSessionBinder.getMetadata();
         } catch (RemoteException e) {
-            Log.wtf(TAG, "Error calling getMetadata.", e);
+            Log.wtf(TAG, "Error calling getMetadata", e);
             return null;
         }
     }
@@ -183,12 +184,103 @@
                 return queue.getList();
             }
         } catch (RemoteException e) {
-            Log.wtf(TAG, "Error calling getQueue.", e);
+            Log.wtf(TAG, "Error calling getQueue", e);
         }
         return null;
     }
 
     /**
+     * Add a queue item from the given {@code description} at the end of the play queue
+     * of this session. Not all sessions may support this.
+     *
+     * @param description The {@link MediaDescription} for creating the
+     *                    {@link MediaSession.QueueItem} to be inserted.
+     * @throws UnsupportedOperationException If this session doesn't support this.
+     * @see MediaSession#FLAG_HANDLES_QUEUE_COMMANDS
+     */
+    public void addQueueItem(MediaDescription description) {
+        try {
+            long flags = mSessionBinder.getFlags();
+            if ((flags & MediaSession.FLAG_HANDLES_QUEUE_COMMANDS) == 0) {
+                throw new UnsupportedOperationException(
+                        "This session doesn't support queue management operations");
+            }
+            mSessionBinder.addQueueItem(description);
+        } catch (RemoteException e) {
+            Log.wtf(TAG, "Error calling addQueueItem", e);
+        }
+    }
+
+    /**
+     * Add a queue item from the given {@code description} at the specified position
+     * in the play queue of this session. Shifts the queue item currently at that position
+     * (if any) and any subsequent queue items to the right (adds one to their indices).
+     * Not all sessions may support this.
+     *
+     * @param description The {@link MediaDescription} for creating the
+     *                    {@link MediaSession.QueueItem} to be inserted.
+     * @param index The index at which the created {@link MediaSession.QueueItem} is to be inserted.
+     * @throws UnsupportedOperationException If this session doesn't support this.
+     * @see MediaSession#FLAG_HANDLES_QUEUE_COMMANDS
+     */
+    public void addQueueItem(MediaDescription description, int index) {
+        try {
+            long flags = mSessionBinder.getFlags();
+            if ((flags & MediaSession.FLAG_HANDLES_QUEUE_COMMANDS) == 0) {
+                throw new UnsupportedOperationException(
+                        "This session doesn't support queue management operations");
+            }
+            mSessionBinder.addQueueItemAt(description, index);
+        } catch (RemoteException e) {
+            Log.wtf(TAG, "Error calling addQueueItemAt", e);
+        }
+    }
+
+    /**
+     * Remove the first occurrence of the specified {@link MediaSession.QueueItem}
+     * with the given {@link MediaDescription description} in the play queue of the associated
+     * session. Not all sessions may support this.
+     *
+     * @param description The {@link MediaDescription} for denoting the
+     *                    {@link MediaSession.QueueItem} to be removed.
+     * @throws UnsupportedOperationException If this session doesn't support this.
+     * @see MediaSession#FLAG_HANDLES_QUEUE_COMMANDS
+     */
+    public void removeQueueItem(MediaDescription description) {
+        try {
+            long flags = mSessionBinder.getFlags();
+            if ((flags & MediaSession.FLAG_HANDLES_QUEUE_COMMANDS) == 0) {
+                throw new UnsupportedOperationException(
+                        "This session doesn't support queue management operations");
+            }
+            mSessionBinder.removeQueueItem(description);
+        } catch (RemoteException e) {
+            Log.wtf(TAG, "Error calling removeQueueItem", e);
+        }
+    }
+
+    /**
+     * Remove an queue item at the specified position in the play queue
+     * of this session. Not all sessions may support this.
+     *
+     * @param index The index of the element to be removed.
+     * @throws UnsupportedOperationException If this session doesn't support this.
+     * @see MediaSession#FLAG_HANDLES_QUEUE_COMMANDS
+     */
+    public void removeQueueItemAt(int index) {
+        try {
+            long flags = mSessionBinder.getFlags();
+            if ((flags & MediaSession.FLAG_HANDLES_QUEUE_COMMANDS) == 0) {
+                throw new UnsupportedOperationException(
+                        "This session doesn't support queue management operations");
+            }
+            mSessionBinder.removeQueueItemAt(index);
+        } catch (RemoteException e) {
+            Log.wtf(TAG, "Error calling removeQueueItemAt", e);
+        }
+    }
+
+    /**
      * Get the queue title for this session.
      */
     public @Nullable CharSequence getQueueTitle() {
@@ -230,7 +322,7 @@
         try {
             return mSessionBinder.getRatingType();
         } catch (RemoteException e) {
-            Log.wtf(TAG, "Error calling getRatingType.", e);
+            Log.wtf(TAG, "Error calling getRatingType", e);
             return Rating.RATING_NONE;
         }
     }
@@ -245,7 +337,7 @@
         try {
             return mSessionBinder.getRepeatMode();
         } catch (RemoteException e) {
-            Log.wtf(TAG, "Error calling getRepeatMode.", e);
+            Log.wtf(TAG, "Error calling getRepeatMode", e);
             return PlaybackState.REPEAT_MODE_NONE;
         }
     }
@@ -259,7 +351,7 @@
         try {
             return mSessionBinder.isShuffleModeEnabled();
         } catch (RemoteException e) {
-            Log.wtf(TAG, "Error calling isShuffleModeEnabled.", e);
+            Log.wtf(TAG, "Error calling isShuffleModeEnabled", e);
             return false;
         }
     }
@@ -273,7 +365,7 @@
         try {
             return mSessionBinder.getFlags();
         } catch (RemoteException e) {
-            Log.wtf(TAG, "Error calling getFlags.", e);
+            Log.wtf(TAG, "Error calling getFlags", e);
         }
         return 0;
     }
@@ -290,7 +382,7 @@
                     result.maxVolume, result.currentVolume);
 
         } catch (RemoteException e) {
-            Log.wtf(TAG, "Error calling getAudioInfo.", e);
+            Log.wtf(TAG, "Error calling getAudioInfo", e);
         }
         return null;
     }
@@ -305,7 +397,7 @@
         try {
             return mSessionBinder.getLaunchPendingIntent();
         } catch (RemoteException e) {
-            Log.wtf(TAG, "Error calling getPendingIntent.", e);
+            Log.wtf(TAG, "Error calling getPendingIntent", e);
         }
         return null;
     }
@@ -334,7 +426,7 @@
         try {
             mSessionBinder.setVolumeTo(value, flags, mContext.getPackageName());
         } catch (RemoteException e) {
-            Log.wtf(TAG, "Error calling setVolumeTo.", e);
+            Log.wtf(TAG, "Error calling setVolumeTo", e);
         }
     }
 
@@ -355,7 +447,7 @@
         try {
             mSessionBinder.adjustVolume(direction, flags, mContext.getPackageName());
         } catch (RemoteException e) {
-            Log.wtf(TAG, "Error calling adjustVolumeBy.", e);
+            Log.wtf(TAG, "Error calling adjustVolumeBy", e);
         }
     }
 
@@ -421,7 +513,7 @@
         try {
             mSessionBinder.sendCommand(command, args, cb);
         } catch (RemoteException e) {
-            Log.d(TAG, "Dead object in sendCommand.", e);
+            Log.d(TAG, "Dead object in sendCommand", e);
         }
     }
 
@@ -435,7 +527,7 @@
             try {
                 mPackageName = mSessionBinder.getPackageName();
             } catch (RemoteException e) {
-                Log.d(TAG, "Dead object in getPackageName.", e);
+                Log.d(TAG, "Dead object in getPackageName", e);
             }
         }
         return mPackageName;
@@ -452,7 +544,7 @@
             try {
                 mTag = mSessionBinder.getTag();
             } catch (RemoteException e) {
-                Log.d(TAG, "Dead object in getTag.", e);
+                Log.d(TAG, "Dead object in getTag", e);
             }
         }
         return mTag;
@@ -652,7 +744,7 @@
             try {
                 mSessionBinder.prepare();
             } catch (RemoteException e) {
-                Log.wtf(TAG, "Error calling prepare.", e);
+                Log.wtf(TAG, "Error calling prepare", e);
             }
         }
 
@@ -671,12 +763,12 @@
         public void prepareFromMediaId(String mediaId, Bundle extras) {
             if (TextUtils.isEmpty(mediaId)) {
                 throw new IllegalArgumentException(
-                        "You must specify a non-empty String for prepareFromMediaId.");
+                        "You must specify a non-empty String for prepareFromMediaId");
             }
             try {
                 mSessionBinder.prepareFromMediaId(mediaId, extras);
             } catch (RemoteException e) {
-                Log.wtf(TAG, "Error calling prepare(" + mediaId + ").", e);
+                Log.wtf(TAG, "Error calling prepare(" + mediaId + ")", e);
             }
         }
 
@@ -702,7 +794,7 @@
             try {
                 mSessionBinder.prepareFromSearch(query, extras);
             } catch (RemoteException e) {
-                Log.wtf(TAG, "Error calling prepare(" + query + ").", e);
+                Log.wtf(TAG, "Error calling prepare(" + query + ")", e);
             }
         }
 
@@ -721,12 +813,12 @@
         public void prepareFromUri(Uri uri, Bundle extras) {
             if (uri == null || Uri.EMPTY.equals(uri)) {
                 throw new IllegalArgumentException(
-                        "You must specify a non-empty Uri for prepareFromUri.");
+                        "You must specify a non-empty Uri for prepareFromUri");
             }
             try {
                 mSessionBinder.prepareFromUri(uri, extras);
             } catch (RemoteException e) {
-                Log.wtf(TAG, "Error calling prepare(" + uri + ").", e);
+                Log.wtf(TAG, "Error calling prepare(" + uri + ")", e);
             }
         }
 
@@ -737,7 +829,7 @@
             try {
                 mSessionBinder.play();
             } catch (RemoteException e) {
-                Log.wtf(TAG, "Error calling play.", e);
+                Log.wtf(TAG, "Error calling play", e);
             }
         }
 
@@ -751,12 +843,12 @@
         public void playFromMediaId(String mediaId, Bundle extras) {
             if (TextUtils.isEmpty(mediaId)) {
                 throw new IllegalArgumentException(
-                        "You must specify a non-empty String for playFromMediaId.");
+                        "You must specify a non-empty String for playFromMediaId");
             }
             try {
                 mSessionBinder.playFromMediaId(mediaId, extras);
             } catch (RemoteException e) {
-                Log.wtf(TAG, "Error calling play(" + mediaId + ").", e);
+                Log.wtf(TAG, "Error calling play(" + mediaId + ")", e);
             }
         }
 
@@ -778,7 +870,7 @@
             try {
                 mSessionBinder.playFromSearch(query, extras);
             } catch (RemoteException e) {
-                Log.wtf(TAG, "Error calling play(" + query + ").", e);
+                Log.wtf(TAG, "Error calling play(" + query + ")", e);
             }
         }
 
@@ -792,12 +884,12 @@
         public void playFromUri(Uri uri, Bundle extras) {
             if (uri == null || Uri.EMPTY.equals(uri)) {
                 throw new IllegalArgumentException(
-                        "You must specify a non-empty Uri for playFromUri.");
+                        "You must specify a non-empty Uri for playFromUri");
             }
             try {
                 mSessionBinder.playFromUri(uri, extras);
             } catch (RemoteException e) {
-                Log.wtf(TAG, "Error calling play(" + uri + ").", e);
+                Log.wtf(TAG, "Error calling play(" + uri + ")", e);
             }
         }
 
@@ -809,7 +901,7 @@
             try {
                 mSessionBinder.skipToQueueItem(id);
             } catch (RemoteException e) {
-                Log.wtf(TAG, "Error calling skipToItem(" + id + ").", e);
+                Log.wtf(TAG, "Error calling skipToItem(" + id + ")", e);
             }
         }
 
@@ -821,7 +913,7 @@
             try {
                 mSessionBinder.pause();
             } catch (RemoteException e) {
-                Log.wtf(TAG, "Error calling pause.", e);
+                Log.wtf(TAG, "Error calling pause", e);
             }
         }
 
@@ -833,7 +925,7 @@
             try {
                 mSessionBinder.stop();
             } catch (RemoteException e) {
-                Log.wtf(TAG, "Error calling stop.", e);
+                Log.wtf(TAG, "Error calling stop", e);
             }
         }
 
@@ -846,7 +938,7 @@
             try {
                 mSessionBinder.seekTo(pos);
             } catch (RemoteException e) {
-                Log.wtf(TAG, "Error calling seekTo.", e);
+                Log.wtf(TAG, "Error calling seekTo", e);
             }
         }
 
@@ -858,7 +950,7 @@
             try {
                 mSessionBinder.fastForward();
             } catch (RemoteException e) {
-                Log.wtf(TAG, "Error calling fastForward.", e);
+                Log.wtf(TAG, "Error calling fastForward", e);
             }
         }
 
@@ -869,7 +961,7 @@
             try {
                 mSessionBinder.next();
             } catch (RemoteException e) {
-                Log.wtf(TAG, "Error calling next.", e);
+                Log.wtf(TAG, "Error calling next", e);
             }
         }
 
@@ -881,7 +973,7 @@
             try {
                 mSessionBinder.rewind();
             } catch (RemoteException e) {
-                Log.wtf(TAG, "Error calling rewind.", e);
+                Log.wtf(TAG, "Error calling rewind", e);
             }
         }
 
@@ -892,7 +984,7 @@
             try {
                 mSessionBinder.previous();
             } catch (RemoteException e) {
-                Log.wtf(TAG, "Error calling previous.", e);
+                Log.wtf(TAG, "Error calling previous", e);
             }
         }
 
@@ -907,7 +999,7 @@
             try {
                 mSessionBinder.rate(rating);
             } catch (RemoteException e) {
-                Log.wtf(TAG, "Error calling rate.", e);
+                Log.wtf(TAG, "Error calling rate", e);
             }
         }
 
@@ -923,7 +1015,7 @@
             try {
                 mSessionBinder.repeatMode(repeatMode);
             } catch (RemoteException e) {
-                Log.wtf(TAG, "Error calling setRepeatMode.", e);
+                Log.wtf(TAG, "Error calling setRepeatMode", e);
             }
         }
 
@@ -936,7 +1028,7 @@
             try {
                 mSessionBinder.shuffleMode(enabled);
             } catch (RemoteException e) {
-                Log.wtf(TAG, "Error calling shuffleMode.", e);
+                Log.wtf(TAG, "Error calling shuffleMode", e);
             }
         }
 
@@ -950,7 +1042,7 @@
         public void sendCustomAction(@NonNull PlaybackState.CustomAction customAction,
                     @Nullable Bundle args) {
             if (customAction == null) {
-                throw new IllegalArgumentException("CustomAction cannot be null.");
+                throw new IllegalArgumentException("CustomAction cannot be null");
             }
             sendCustomAction(customAction.getAction(), args);
         }
@@ -966,12 +1058,12 @@
          */
         public void sendCustomAction(@NonNull String action, @Nullable Bundle args) {
             if (TextUtils.isEmpty(action)) {
-                throw new IllegalArgumentException("CustomAction cannot be null.");
+                throw new IllegalArgumentException("CustomAction cannot be null");
             }
             try {
                 mSessionBinder.sendCustomAction(action, args);
             } catch (RemoteException e) {
-                Log.d(TAG, "Dead object in sendCustomAction.", e);
+                Log.d(TAG, "Dead object in sendCustomAction", e);
             }
         }
     }
diff --git a/media/java/android/media/session/MediaSession.java b/media/java/android/media/session/MediaSession.java
index 84dc93a..bee3f52 100644
--- a/media/java/android/media/session/MediaSession.java
+++ b/media/java/android/media/session/MediaSession.java
@@ -87,6 +87,12 @@
     public static final int FLAG_HANDLES_TRANSPORT_CONTROLS = 1 << 1;
 
     /**
+     * Set this flag on the session to indicate that it handles queue
+     * management commands through its {@link Callback}.
+     */
+    public static final int FLAG_HANDLES_QUEUE_COMMANDS = 1 << 2;
+
+    /**
      * System only flag for a session that needs to have priority over all other
      * sessions. This flag ensures this session will receive media button events
      * regardless of the current ordering in the system.
@@ -100,6 +106,7 @@
     @IntDef(flag = true, value = {
             FLAG_HANDLES_MEDIA_BUTTONS,
             FLAG_HANDLES_TRANSPORT_CONTROLS,
+            FLAG_HANDLES_QUEUE_COMMANDS,
             FLAG_EXCLUSIVE_GLOBAL_PRIORITY })
     public @interface SessionFlags { }
 
@@ -645,6 +652,22 @@
         postToCallback(CallbackMessageHandler.MSG_CUSTOM_ACTION, action, args);
     }
 
+    private void dispatchAddQueueItem(MediaDescription description) {
+        postToCallback(CallbackMessageHandler.MSG_ADD_QUEUE_ITEM, description);
+    }
+
+    private void dispatchAddQueueItem(MediaDescription description, int index) {
+        postToCallback(CallbackMessageHandler.MSG_ADD_QUEUE_ITEM_AT, description, index);
+    }
+
+    private void dispatchRemoveQueueItem(MediaDescription description) {
+        postToCallback(CallbackMessageHandler.MSG_REMOVE_QUEUE_ITEM, description);
+    }
+
+    private void dispatchRemoveQueueItemAt(int index) {
+        postToCallback(CallbackMessageHandler.MSG_REMOVE_QUEUE_ITEM_AT, index);
+    }
+
     private void dispatchMediaButton(Intent mediaButtonIntent) {
         postToCallback(CallbackMessageHandler.MSG_MEDIA_BUTTON, mediaButtonIntent);
     }
@@ -666,10 +689,22 @@
         postToCallback(CallbackMessageHandler.MSG_COMMAND, cmd);
     }
 
+    private void postToCallback(int what, int arg1) {
+        postToCallback(what, null, arg1);
+    }
+
     private void postToCallback(int what, Object obj) {
         postToCallback(what, obj, null);
     }
 
+    private void postToCallback(int what, Object obj, int arg1) {
+        synchronized (mLock) {
+            if (mCallback != null) {
+                mCallback.post(what, obj, arg1);
+            }
+        }
+    }
+
     private void postToCallback(int what, Object obj, Bundle extras) {
         synchronized (mLock) {
             if (mCallback != null) {
@@ -1043,6 +1078,47 @@
          */
         public void onCustomAction(@NonNull String action, @Nullable Bundle extras) {
         }
+
+        /**
+         * Called when a {@link MediaController} wants to add a {@link QueueItem} with the given
+         * {@link MediaDescription description} at the end of the play queue.
+         *
+         * @param description The {@link MediaDescription} for creating the {@link QueueItem} to be
+         *                    inserted.
+         */
+        public void onAddQueueItem(MediaDescription description) {
+        }
+
+        /**
+         * Called when a {@link MediaController} wants to add a {@link QueueItem} with the given
+         * {@link MediaDescription description} at the specified position in the play queue.
+         *
+         * @param description The {@link MediaDescription} for creating the {@link QueueItem} to be
+         *                    inserted.
+         * @param index The index at which the created {@link QueueItem} is to be inserted.
+         */
+        public void onAddQueueItem(MediaDescription description, int index) {
+        }
+
+        /**
+         * Called when a {@link MediaController} wants to remove the first occurrence of the
+         * specified {@link QueueItem} with the given {@link MediaDescription description}
+         * in the play queue.
+         *
+         * @param description The {@link MediaDescription} for denoting the {@link QueueItem} to be
+         *                    removed.
+         */
+        public void onRemoveQueueItem(MediaDescription description) {
+        }
+
+        /**
+         * Called when a {@link MediaController} wants to remove a {@link QueueItem} at the
+         * specified position in the play queue.
+         *
+         * @param index The index of the element to be removed.
+         */
+        public void onRemoveQueueItemAt(int index) {
+        }
     }
 
     /**
@@ -1239,6 +1315,38 @@
         }
 
         @Override
+        public void onAddQueueItem(MediaDescription description) {
+            MediaSession session = mMediaSession.get();
+            if (session != null) {
+                session.dispatchAddQueueItem(description);
+            }
+        }
+
+        @Override
+        public void onAddQueueItemAt(MediaDescription description, int index) {
+            MediaSession session = mMediaSession.get();
+            if (session != null) {
+                session.dispatchAddQueueItem(description, index);
+            }
+        }
+
+        @Override
+        public void onRemoveQueueItem(MediaDescription description) {
+            MediaSession session = mMediaSession.get();
+            if (session != null) {
+                session.dispatchRemoveQueueItem(description);
+            }
+        }
+
+        @Override
+        public void onRemoveQueueItemAt(int index) {
+            MediaSession session = mMediaSession.get();
+            if (session != null) {
+                session.dispatchRemoveQueueItemAt(index);
+            }
+        }
+
+        @Override
         public void onAdjustVolume(int direction) {
             MediaSession session = mMediaSession.get();
             if (session != null) {
@@ -1376,6 +1484,10 @@
         private static final int MSG_CUSTOM_ACTION = 22;
         private static final int MSG_ADJUST_VOLUME = 23;
         private static final int MSG_SET_VOLUME = 24;
+        private static final int MSG_ADD_QUEUE_ITEM = 25;
+        private static final int MSG_ADD_QUEUE_ITEM_AT = 26;
+        private static final int MSG_REMOVE_QUEUE_ITEM = 27;
+        private static final int MSG_REMOVE_QUEUE_ITEM_AT = 28;
 
         private MediaSession.Callback mCallback;
 
@@ -1465,7 +1577,7 @@
                     mCallback.onSetRating((Rating) msg.obj);
                     break;
                 case MSG_REPEAT_MODE:
-                    mCallback.onSetRepeatMode((int) msg.obj);
+                    mCallback.onSetRepeatMode(msg.arg1);
                     break;
                 case MSG_SHUFFLE_MODE:
                     mCallback.onSetShuffleModeEnabled((boolean) msg.obj);
@@ -1473,12 +1585,24 @@
                 case MSG_CUSTOM_ACTION:
                     mCallback.onCustomAction((String) msg.obj, msg.getData());
                     break;
+                case MSG_ADD_QUEUE_ITEM:
+                    mCallback.onAddQueueItem((MediaDescription) msg.obj);
+                    break;
+                case MSG_ADD_QUEUE_ITEM_AT:
+                    mCallback.onAddQueueItem((MediaDescription) msg.obj, msg.arg1);
+                    break;
+                case MSG_REMOVE_QUEUE_ITEM:
+                    mCallback.onRemoveQueueItem((MediaDescription) msg.obj);
+                    break;
+                case MSG_REMOVE_QUEUE_ITEM_AT:
+                    mCallback.onRemoveQueueItemAt(msg.arg1);
+                    break;
                 case MSG_ADJUST_VOLUME:
                     synchronized (mLock) {
                         vp = mVolumeProvider;
                     }
                     if (vp != null) {
-                        vp.onAdjustVolume((int) msg.obj);
+                        vp.onAdjustVolume(msg.arg1);
                     }
                     break;
                 case MSG_SET_VOLUME:
@@ -1486,7 +1610,7 @@
                         vp = mVolumeProvider;
                     }
                     if (vp != null) {
-                        vp.onSetVolumeTo((int) msg.obj);
+                        vp.onSetVolumeTo(msg.arg1);
                     }
                     break;
             }
diff --git a/media/java/android/media/tv/TvContract.java b/media/java/android/media/tv/TvContract.java
index 9a08fbe..77946a6 100644
--- a/media/java/android/media/tv/TvContract.java
+++ b/media/java/android/media/tv/TvContract.java
@@ -18,6 +18,7 @@
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
+import android.annotation.StringDef;
 import android.annotation.SystemApi;
 import android.content.ComponentName;
 import android.content.ContentResolver;
@@ -29,6 +30,8 @@
 import android.text.TextUtils;
 import android.util.ArraySet;
 
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -65,6 +68,7 @@
     private static final String PATH_CHANNEL = "channel";
     private static final String PATH_PROGRAM = "program";
     private static final String PATH_RECORDED_PROGRAM = "recorded_program";
+    private static final String PATH_PREVIEW_PROGRAM = "preview_program";
     private static final String PATH_PASSTHROUGH = "passthrough";
 
     /**
@@ -293,6 +297,37 @@
     }
 
     /**
+     * Builds a URI that points to a specific preview program.
+     *
+     * @param previewProgramId The ID of the preview program to point to.
+     */
+    public static final Uri buildPreviewProgramUri(long previewProgramId) {
+        return ContentUris.withAppendedId(PreviewPrograms.CONTENT_URI, previewProgramId);
+    }
+
+    /**
+     * Builds a URI that points to all preview programs on a given channel.
+     *
+     * @param channelId The ID of the channel to return preview programs for.
+     */
+    public static final Uri buildPreviewProgramsUriForChannel(long channelId) {
+        return PreviewPrograms.CONTENT_URI.buildUpon()
+                .appendQueryParameter(PARAM_CHANNEL, String.valueOf(channelId)).build();
+    }
+
+    /**
+     * Builds a URI that points to all preview programs on a given channel.
+     *
+     * @param channelUri The URI of the channel to return preview programs for.
+     */
+    public static final Uri buildPreviewProgramsUriForChannel(Uri channelUri) {
+        if (!isChannelUriForTunerInput(channelUri)) {
+            throw new IllegalArgumentException("Not a channel: " + channelUri);
+        }
+        return buildPreviewProgramsUriForChannel(ContentUris.parseId(channelUri));
+    }
+
+    /**
      * Builds a URI that points to a specific program the user watched.
      *
      * @param watchedProgramId The ID of the watched program to point to.
@@ -359,6 +394,285 @@
         String COLUMN_PACKAGE_NAME = "package_name";
     }
 
+    /**
+     * Common base for the tables of TV programs.
+     */
+    public interface BaseProgramColumns extends BaseTvColumns {
+        /**
+         * The ID of the TV channel that provides this TV program.
+         *
+         * <p>This is a part of the channel URI and matches to {@link BaseColumns#_ID}.
+         *
+         * <p>This is a required field.
+         *
+         * <p>Type: INTEGER (long)
+         */
+        public static final String COLUMN_CHANNEL_ID = "channel_id";
+
+        /**
+         * The title of this TV program.
+         *
+         * <p>If this program is an episodic TV show, it is recommended that the title is the series
+         * title and its related fields ({@link #COLUMN_SEASON_TITLE} and/or
+         * {@link #COLUMN_SEASON_DISPLAY_NUMBER}, {@link #COLUMN_SEASON_DISPLAY_NUMBER},
+         * {@link #COLUMN_EPISODE_DISPLAY_NUMBER}, and {@link #COLUMN_EPISODE_TITLE}) are filled in.
+         *
+         * <p>Type: TEXT
+         */
+        public static final String COLUMN_TITLE = "title";
+
+        /**
+         * The season display number of this TV program for episodic TV shows.
+         *
+         * <p>This is used to indicate the season number. (e.g. 1, 2 or 3) Note that the value
+         * does not necessarily be numeric. (e.g. 12B)
+         *
+         * <p>Can be empty.
+         *
+         * <p>Type: TEXT
+         */
+        public static final String COLUMN_SEASON_DISPLAY_NUMBER = "season_display_number";
+
+        /**
+         * The title of the season for this TV program for episodic TV shows.
+         *
+         * <p>This is an optional field supplied only when the season has a special title
+         * (e.g. The Final Season). If provided, the applications should display it instead of
+         * {@link #COLUMN_SEASON_DISPLAY_NUMBER}, and should display it without alterations.
+         * (e.g. for "The Final Season", displayed string should be "The Final Season", not
+         * "Season The Final Season"). When displaying multiple programs, the order should be based
+         * on {@link #COLUMN_SEASON_DISPLAY_NUMBER}, even when {@link #COLUMN_SEASON_TITLE} exists.
+         *
+         * <p>Can be empty.
+         *
+         * <p>Type: TEXT
+         */
+        public static final String COLUMN_SEASON_TITLE = "season_title";
+
+        /**
+         * The episode display number of this TV program for episodic TV shows.
+         *
+         * <p>This is used to indicate the episode number. (e.g. 1, 2 or 3) Note that the value
+         * does not necessarily be numeric. (e.g. 12B)
+         *
+         * <p>Can be empty.
+         *
+         * <p>Type: TEXT
+         */
+        public static final String COLUMN_EPISODE_DISPLAY_NUMBER = "episode_display_number";
+
+        /**
+         * The episode title of this TV program for episodic TV shows.
+         *
+         * <p>Can be empty.
+         *
+         * <p>Type: TEXT
+         */
+        public static final String COLUMN_EPISODE_TITLE = "episode_title";
+
+        /**
+         * The comma-separated canonical genre string of this TV program.
+         *
+         * <p>Canonical genres are defined in {@link Genres}. Use {@link Genres#encode} to create a
+         * text that can be stored in this column. Use {@link Genres#decode} to get the canonical
+         * genre strings from the text stored in the column.
+         *
+         * <p>Type: TEXT
+         * @see Genres
+         * @see Genres#encode
+         * @see Genres#decode
+         */
+        public static final String COLUMN_CANONICAL_GENRE = "canonical_genre";
+
+        /**
+         * The short description of this TV program that is displayed to the user by default.
+         *
+         * <p>It is recommended to limit the length of the descriptions to 256 characters.
+         *
+         * <p>Type: TEXT
+         */
+        public static final String COLUMN_SHORT_DESCRIPTION = "short_description";
+
+        /**
+         * The detailed, lengthy description of this TV program that is displayed only when the user
+         * wants to see more information.
+         *
+         * <p>TV input services should leave this field empty if they have no additional details
+         * beyond {@link #COLUMN_SHORT_DESCRIPTION}.
+         *
+         * <p>Type: TEXT
+         */
+        public static final String COLUMN_LONG_DESCRIPTION = "long_description";
+
+        /**
+         * The width of the video for this TV program, in the unit of pixels.
+         *
+         * <p>Together with {@link #COLUMN_VIDEO_HEIGHT} this is used to determine the video
+         * resolution of the current TV program. Can be empty if it is not known initially or the
+         * program does not convey any video such as the programs from type
+         * {@link Channels#SERVICE_TYPE_AUDIO} channels.
+         *
+         * <p>Type: INTEGER
+         */
+        public static final String COLUMN_VIDEO_WIDTH = "video_width";
+
+        /**
+         * The height of the video for this TV program, in the unit of pixels.
+         *
+         * <p>Together with {@link #COLUMN_VIDEO_WIDTH} this is used to determine the video
+         * resolution of the current TV program. Can be empty if it is not known initially or the
+         * program does not convey any video such as the programs from type
+         * {@link Channels#SERVICE_TYPE_AUDIO} channels.
+         *
+         * <p>Type: INTEGER
+         */
+        public static final String COLUMN_VIDEO_HEIGHT = "video_height";
+
+        /**
+         * The comma-separated audio languages of this TV program.
+         *
+         * <p>This is used to describe available audio languages included in the program. Use either
+         * ISO 639-1 or 639-2/T codes.
+         *
+         * <p>Type: TEXT
+         */
+        public static final String COLUMN_AUDIO_LANGUAGE = "audio_language";
+
+        /**
+         * The comma-separated content ratings of this TV program.
+         *
+         * <p>This is used to describe the content rating(s) of this program. Each comma-separated
+         * content rating sub-string should be generated by calling
+         * {@link TvContentRating#flattenToString}. Note that in most cases the program content is
+         * rated by a single rating system, thus resulting in a corresponding single sub-string that
+         * does not require comma separation and multiple sub-strings appear only when the program
+         * content is rated by two or more content rating systems. If any of those ratings is
+         * specified as "blocked rating" in the user's parental control settings, the TV input
+         * service should block the current content and wait for the signal that it is okay to
+         * unblock.
+         *
+         * <p>Type: TEXT
+         */
+        public static final String COLUMN_CONTENT_RATING = "content_rating";
+
+        /**
+         * The URI for the poster art of this TV program.
+         *
+         * <p>The data in the column must be a URL, or a URI in one of the following formats:
+         *
+         * <ul>
+         * <li>content ({@link android.content.ContentResolver#SCHEME_CONTENT})</li>
+         * <li>android.resource ({@link android.content.ContentResolver#SCHEME_ANDROID_RESOURCE})
+         * </li>
+         * <li>file ({@link android.content.ContentResolver#SCHEME_FILE})</li>
+         * </ul>
+         *
+         * <p>Can be empty.
+         *
+         * <p>Type: TEXT
+         */
+        public static final String COLUMN_POSTER_ART_URI = "poster_art_uri";
+
+        /**
+         * The URI for the thumbnail of this TV program.
+         *
+         * <p>The system can generate a thumbnail from the poster art if this column is not
+         * specified. Thus it is not necessary for TV input services to include a thumbnail if it is
+         * just a scaled image of the poster art.
+         *
+         * <p>The data in the column must be a URL, or a URI in one of the following formats:
+         *
+         * <ul>
+         * <li>content ({@link android.content.ContentResolver#SCHEME_CONTENT})</li>
+         * <li>android.resource ({@link android.content.ContentResolver#SCHEME_ANDROID_RESOURCE})
+         * </li>
+         * <li>file ({@link android.content.ContentResolver#SCHEME_FILE})</li>
+         * </ul>
+         *
+         * <p>Can be empty.
+         *
+         * <p>Type: TEXT
+         */
+        public static final String COLUMN_THUMBNAIL_URI = "thumbnail_uri";
+
+        /**
+         * The flag indicating whether this TV program is searchable or not.
+         *
+         * <p>The columns of searchable programs can be read by other applications that have proper
+         * permission. Care must be taken not to open sensitive data.
+         *
+         * <p>A value of 1 indicates that the program is searchable and its columns can be read by
+         * other applications, a value of 0 indicates that the program is hidden and its columns can
+         * be read only by the package that owns the program and the system. If not specified, this
+         * value is set to 1 (searchable) by default.
+         *
+         * <p>Type: INTEGER (boolean)
+         */
+        public static final String COLUMN_SEARCHABLE = "searchable";
+
+        /**
+         * Internal data used by individual TV input services.
+         *
+         * <p>This is internal to the provider that inserted it, and should not be decoded by other
+         * apps.
+         *
+         * <p>Type: BLOB
+         */
+        public static final String COLUMN_INTERNAL_PROVIDER_DATA = "internal_provider_data";
+
+        /**
+         * Internal integer flag used by individual TV input services.
+         *
+         * <p>This is internal to the provider that inserted it, and should not be decoded by other
+         * apps.
+         *
+         * <p>Type: INTEGER
+         */
+        public static final String COLUMN_INTERNAL_PROVIDER_FLAG1 = "internal_provider_flag1";
+
+        /**
+         * Internal integer flag used by individual TV input services.
+         *
+         * <p>This is internal to the provider that inserted it, and should not be decoded by other
+         * apps.
+         *
+         * <p>Type: INTEGER
+         */
+        public static final String COLUMN_INTERNAL_PROVIDER_FLAG2 = "internal_provider_flag2";
+
+        /**
+         * Internal integer flag used by individual TV input services.
+         *
+         * <p>This is internal to the provider that inserted it, and should not be decoded by other
+         * apps.
+         *
+         * <p>Type: INTEGER
+         */
+        public static final String COLUMN_INTERNAL_PROVIDER_FLAG3 = "internal_provider_flag3";
+
+        /**
+         * Internal integer flag used by individual TV input services.
+         *
+         * <p>This is internal to the provider that inserted it, and should not be decoded by other
+         * apps.
+         *
+         * <p>Type: INTEGER
+         */
+        public static final String COLUMN_INTERNAL_PROVIDER_FLAG4 = "internal_provider_flag4";
+
+        /**
+         * The version number of this row entry used by TV input services.
+         *
+         * <p>This is best used by sync adapters to identify the rows to update. The number can be
+         * defined by individual TV input services. One may assign the same value as
+         * {@code version_number} in ETSI EN 300 468 or ATSC A/65, if the data are coming from a TV
+         * broadcast.
+         *
+         * <p>Type: INTEGER
+         */
+        public static final String COLUMN_VERSION_NUMBER = "version_number";
+    }
+
     /** Column definitions for the TV channels table. */
     public static final class Channels implements BaseTvColumns {
 
@@ -372,6 +686,37 @@
         /** The MIME type of a single TV channel. */
         public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/channel";
 
+        /** @hide */
+        @StringDef({
+                TYPE_OTHER,
+                TYPE_NTSC,
+                TYPE_PAL,
+                TYPE_SECAM,
+                TYPE_DVB_T,
+                TYPE_DVB_T2,
+                TYPE_DVB_S,
+                TYPE_DVB_S2,
+                TYPE_DVB_C,
+                TYPE_DVB_C2,
+                TYPE_DVB_H,
+                TYPE_DVB_SH,
+                TYPE_ATSC_T,
+                TYPE_ATSC_C,
+                TYPE_ATSC_M_H,
+                TYPE_ISDB_T,
+                TYPE_ISDB_TB,
+                TYPE_ISDB_S,
+                TYPE_ISDB_C,
+                TYPE_1SEG,
+                TYPE_DTMB,
+                TYPE_CMMB,
+                TYPE_T_DMB,
+                TYPE_S_DMB,
+                TYPE_PREVIEW,
+        })
+        @Retention(RetentionPolicy.SOURCE)
+        public @interface Type {}
+
         /**
          * A generic channel type.
          *
@@ -554,6 +899,15 @@
          */
         public static final String TYPE_PREVIEW = "TYPE_PREVIEW";
 
+        /** @hide */
+        @StringDef({
+                SERVICE_TYPE_OTHER,
+                SERVICE_TYPE_AUDIO_VIDEO,
+                SERVICE_TYPE_AUDIO,
+        })
+        @Retention(RetentionPolicy.SOURCE)
+        public @interface ServiceType {}
+
         /** A generic service type. */
         public static final String SERVICE_TYPE_OTHER = "SERVICE_TYPE_OTHER";
 
@@ -563,6 +917,22 @@
         /** The service type for radio channels that have audio only. */
         public static final String SERVICE_TYPE_AUDIO = "SERVICE_TYPE_AUDIO";
 
+        /** @hide */
+        @StringDef({
+                VIDEO_FORMAT_240P,
+                VIDEO_FORMAT_360P,
+                VIDEO_FORMAT_480I,
+                VIDEO_FORMAT_576I,
+                VIDEO_FORMAT_576P,
+                VIDEO_FORMAT_720P,
+                VIDEO_FORMAT_1080I,
+                VIDEO_FORMAT_1080P,
+                VIDEO_FORMAT_2160P,
+                VIDEO_FORMAT_4320P,
+        })
+        @Retention(RetentionPolicy.SOURCE)
+        public @interface VideoFormat {}
+
         /** The video format for 240p. */
         public static final String VIDEO_FORMAT_240P = "VIDEO_FORMAT_240P";
 
@@ -596,6 +966,17 @@
         /** The video format for 4320p. */
         public static final String VIDEO_FORMAT_4320P = "VIDEO_FORMAT_4320P";
 
+        /** @hide */
+        @StringDef({
+                VIDEO_RESOLUTION_SD,
+                VIDEO_RESOLUTION_ED,
+                VIDEO_RESOLUTION_HD,
+                VIDEO_RESOLUTION_FHD,
+                VIDEO_RESOLUTION_UHD,
+        })
+        @Retention(RetentionPolicy.SOURCE)
+        public @interface VideoResolution {}
+
         /** The video resolution for standard-definition. */
         public static final String VIDEO_RESOLUTION_SD = "VIDEO_RESOLUTION_SD";
 
@@ -634,7 +1015,7 @@
          * @see #COLUMN_VIDEO_FORMAT
          */
         @Nullable
-        public static final String getVideoResolution(String videoFormat) {
+        public static final String getVideoResolution(@VideoFormat String videoFormat) {
             return VIDEO_FORMAT_TO_RESOLUTION_MAP.get(videoFormat);
         }
 
@@ -951,6 +1332,18 @@
         public static final String COLUMN_APP_LINK_INTENT_URI = "app_link_intent_uri";
 
         /**
+         * The internal ID used by individual TV input services.
+         *
+         * <p>This is internal to the provider that inserted it, and should not be decoded by other
+         * apps.
+         *
+         * <p>Can be empty.
+         *
+         * <p>Type: TEXT
+         */
+        public static final String COLUMN_INTERNAL_PROVIDER_ID = "internal_provider_id";
+
+        /**
          * Internal data used by individual TV input services.
          *
          * <p>This is internal to the provider that inserted it, and should not be decoded by other
@@ -1026,6 +1419,19 @@
         @SystemApi
         public static final String COLUMN_TRANSIENT = "transient";
 
+        /**
+         * The flag indicating whether this TV channel is approved to be shown by the system.
+         *
+         * <p>A value of 1 indicates that the channel is approved to be shown by the system, and a
+         * value of 0 indicates that the channel is blocked by system. If not specified, this value
+         * is set to 0 (not approved) by default.
+         *
+         * <p>Type: INTEGER (boolean)
+         * @hide
+         */
+        @SystemApi
+        public static final String COLUMN_SYSTEM_APPROVED = "system_approved";
+
         private Channels() {}
 
         /**
@@ -1075,7 +1481,7 @@
      * <p>By default, the query results will be sorted by
      * {@link Programs#COLUMN_START_TIME_UTC_MILLIS} in ascending order.
      */
-    public static final class Programs implements BaseTvColumns {
+    public static final class Programs implements BaseProgramColumns {
 
         /** The content:// style URI for this table. */
         public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/"
@@ -1088,299 +1494,6 @@
         public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/program";
 
         /**
-         * The program type for movie.
-         *
-         * @see #COLUMN_TYPE
-         */
-        public static final String TYPE_MOVIE = "TYPE_MOVIE";
-
-        /**
-         * The program type for TV series.
-         *
-         * @see #COLUMN_TYPE
-         */
-        public static final String TYPE_TV_SERIES = "TYPE_TV_SERIES";
-
-        /**
-         * The program type for TV season.
-         *
-         * @see #COLUMN_TYPE
-         */
-        public static final String TYPE_TV_SEASON = "TYPE_TV_SEASON";
-
-        /**
-         * The program type for TV episode.
-         *
-         * @see #COLUMN_TYPE
-         */
-        public static final String TYPE_TV_EPISODE = "TYPE_TV_EPISODE";
-
-        /**
-         * The program type for clip.
-         *
-         * @see #COLUMN_TYPE
-         */
-        public static final String TYPE_CLIP = "TYPE_CLIP";
-
-        /**
-         * The program type for event.
-         *
-         * @see #COLUMN_TYPE
-         */
-        public static final String TYPE_EVENT = "TYPE_EVENT";
-
-        /**
-         * The program type for channel.
-         *
-         * @see #COLUMN_TYPE
-         */
-        public static final String TYPE_CHANNEL = "TYPE_CHANNEL";
-
-        /**
-         * The program type for track.
-         *
-         * @see #COLUMN_TYPE
-         */
-        public static final String TYPE_TRACK = "TYPE_TRACK";
-
-        /**
-         * The program type for album.
-         *
-         * @see #COLUMN_TYPE
-         */
-        public static final String TYPE_ALBUM = "TYPE_ALBUM";
-
-        /**
-         * The program type for artist.
-         *
-         * @see #COLUMN_TYPE
-         */
-        public static final String TYPE_ARTIST = "TYPE_ARTIST";
-
-        /**
-         * The program type for playlist.
-         *
-         * @see #COLUMN_TYPE
-         */
-        public static final String TYPE_PLAYLIST = "TYPE_PLAYLIST";
-
-        /**
-         * The program type for station.
-         *
-         * @see #COLUMN_TYPE
-         */
-        public static final String TYPE_STATION = "TYPE_STATION";
-
-        /**
-         * The watch next type for CONTINUE.
-         *
-         * @see #COLUMN_WATCH_NEXT_TYPE
-         */
-        public static final String WATCH_NEXT_TYPE_CONTINUE = "WATCH_NEXT_TYPE_CONTINUE";
-
-        /**
-         * The watch next type for NEXT.
-         *
-         * @see #COLUMN_WATCH_NEXT_TYPE
-         */
-        public static final String WATCH_NEXT_TYPE_NEXT = "WATCH_NEXT_TYPE_NEXT";
-
-        /**
-         * The watch next type for NEW.
-         *
-         * @see #COLUMN_WATCH_NEXT_TYPE
-         */
-        public static final String WATCH_NEXT_TYPE_NEW = "WATCH_NEXT_TYPE_NEW";
-
-        /**
-         * The aspect ratio for 16:9.
-         *
-         * @see #COLUMN_POSTER_ART_ASPECT_RATIO
-         * @see #COLUMN_THUMBNAIL_ASPECT_RATIO
-         */
-        public static final String ASPECT_RATIO_16_9 = "ASPECT_RATIO_16_9";
-
-        /**
-         * The aspect ratio for 3:2.
-         *
-         * @see #COLUMN_POSTER_ART_ASPECT_RATIO
-         * @see #COLUMN_THUMBNAIL_ASPECT_RATIO
-         */
-        public static final String ASPECT_RATIO_3_2 = "ASPECT_RATIO_3_2";
-
-        /**
-         * The aspect ratio for 1:1.
-         *
-         * @see #COLUMN_POSTER_ART_ASPECT_RATIO
-         * @see #COLUMN_THUMBNAIL_ASPECT_RATIO
-         */
-        public static final String ASPECT_RATIO_1_1 = "ASPECT_RATIO_1_1";
-
-        /**
-         * The aspect ratio for 2:3.
-         *
-         * @see #COLUMN_POSTER_ART_ASPECT_RATIO
-         * @see #COLUMN_THUMBNAIL_ASPECT_RATIO
-         */
-        public static final String ASPECT_RATIO_2_3 = "ASPECT_RATIO_2_3";
-
-        /**
-         * The availability for "available to this user".
-         *
-         * @see #COLUMN_AVAILABILITY
-         */
-        public static final String AVAILABILITY_AVAILABLE = "AVAILABILITY_AVAILABLE";
-
-        /**
-         * The availability for "free with subscription".
-         *
-         * @see #COLUMN_AVAILABILITY
-         */
-        public static final String AVAILABILITY_FREE_WITH_SUBSCRIPTION =
-                "AVAILABILITY_FREE_WITH_SUBSCRIPTION";
-
-        /**
-         * The availability for "paid content, either to-own or rental
-         * (user has not purchased/rented).
-         *
-         * @see #COLUMN_AVAILABILITY
-         */
-        public static final String AVAILABILITY_PAID_CONTENT = "AVAILABILITY_PAID_CONTENT";
-
-        /**
-         * The interaction type for "listens".
-         *
-         * @see #COLUMN_INTERACTION_TYPE
-         */
-        public static final String INTERACTION_TYPE_LISTENS = "INTERACTION_TYPE_LISTENS";
-
-        /**
-         * The interaction type for "followers".
-         *
-         * @see #COLUMN_INTERACTION_TYPE
-         */
-        public static final String INTERACTION_TYPE_FOLLOWERS = "INTERACTION_TYPE_FOLLOWERS";
-
-        /**
-         * The interaction type for "fans".
-         *
-         * @see #COLUMN_INTERACTION_TYPE
-         */
-        public static final String INTERACTION_TYPE_FANS = "INTERACTION_TYPE_FANS";
-
-        /**
-         * The interaction type for "likes".
-         *
-         * @see #COLUMN_INTERACTION_TYPE
-         */
-        public static final String INTERACTION_TYPE_LIKES = "INTERACTION_TYPE_LIKES";
-
-        /**
-         * The interaction type for "thumbs".
-         *
-         * @see #COLUMN_INTERACTION_TYPE
-         */
-        public static final String INTERACTION_TYPE_THUMBS = "INTERACTION_TYPE_THUMBS";
-
-        /**
-         * The interaction type for "views".
-         *
-         * @see #COLUMN_INTERACTION_TYPE
-         */
-        public static final String INTERACTION_TYPE_VIEWS = "INTERACTION_TYPE_VIEWS";
-
-        /**
-         * The interaction type for "viewers".
-         *
-         * @see #COLUMN_INTERACTION_TYPE
-         */
-        public static final String INTERACTION_TYPE_VIEWERS = "INTERACTION_TYPE_VIEWERS";
-
-        /**
-         * The review rating style for five star rating.
-         *
-         * @see #COLUMN_REVIEW_RATING_STYLE
-         */
-        public static final String REVIEW_RATING_STYLE_STARS = "REVIEW_RATING_STYLE_STARS";
-
-        /**
-         * The review rating style for thumbs-up and thumbs-down rating.
-         *
-         * @see #COLUMN_REVIEW_RATING_STYLE
-         */
-        public static final String REVIEW_RATING_STYLE_THUMBS_UP_DOWN =
-                "REVIEW_RATING_STYLE_THUMBS_UP_DOWN";
-
-        /**
-         * The review rating style for 0 to 100 point system.
-         *
-         * @see #COLUMN_REVIEW_RATING_STYLE
-         */
-        public static final String REVIEW_RATING_STYLE_PERCENTAGE =
-                "REVIEW_RATING_STYLE_PERCENTAGE";
-
-        /**
-         * The ID of the TV channel that provides this TV program.
-         *
-         * <p>This is a part of the channel URI and matches to {@link BaseColumns#_ID}.
-         *
-         * <p>This is a required field.
-         *
-         * <p>Type: INTEGER (long)
-         */
-        public static final String COLUMN_CHANNEL_ID = "channel_id";
-
-        /**
-         * The type of this program content.
-         *
-         * <p>The value should match one of the followings:
-         * {@link #TYPE_MOVIE},
-         * {@link #TYPE_TV_SERIES},
-         * {@link #TYPE_TV_SEASON},
-         * {@link #TYPE_TV_EPISODE},
-         * {@link #TYPE_CLIP},
-         * {@link #TYPE_EVENT},
-         * {@link #TYPE_CHANNEL},
-         * {@link #TYPE_TRACK},
-         * {@link #TYPE_ALBUM},
-         * {@link #TYPE_ARTIST},
-         * {@link #TYPE_PLAYLIST}, and
-         * {@link #TYPE_STATION}.
-         *
-         * <p>This is a required field if the program is from a {@link Channels#TYPE_PREVIEW}
-         * channel.
-         *
-         * <p>Type: TEXT
-         */
-        public static final String COLUMN_TYPE = "type";
-
-        /**
-         * The "watch next" type of this program content.
-         *
-         * <p>The value should match one of the followings:
-         * {@link #WATCH_NEXT_TYPE_CONTINUE},
-         * {@link #WATCH_NEXT_TYPE_NEXT}, and
-         * {@link #WATCH_NEXT_TYPE_NEW}.
-         *
-         * <p>Can be empty.
-         *
-         * <p>Type: TEXT
-         */
-        public static final String COLUMN_WATCH_NEXT_TYPE = "watch_next_type";
-
-        /**
-         * The title of this TV program.
-         *
-         * <p>If this program is an episodic TV show, it is recommended that the title is the series
-         * title and its related fields ({@link #COLUMN_SEASON_TITLE} and/or
-         * {@link #COLUMN_SEASON_DISPLAY_NUMBER}, {@link #COLUMN_SEASON_DISPLAY_NUMBER},
-         * {@link #COLUMN_EPISODE_DISPLAY_NUMBER}, and {@link #COLUMN_EPISODE_TITLE}) are filled in.
-         *
-         * <p>Type: TEXT
-         */
-        public static final String COLUMN_TITLE = "title";
-
-        /**
          * The season number of this TV program for episodic TV shows.
          *
          * <p>Can be empty.
@@ -1393,34 +1506,6 @@
         public static final String COLUMN_SEASON_NUMBER = "season_number";
 
         /**
-         * The season display number of this TV program for episodic TV shows.
-         *
-         * <p>This is used to indicate the season number. (e.g. 1, 2 or 3) Note that the value
-         * does not necessarily be numeric. (e.g. 12B)
-         *
-         * <p>Can be empty.
-         *
-         * <p>Type: TEXT
-         */
-        public static final String COLUMN_SEASON_DISPLAY_NUMBER = "season_display_number";
-
-        /**
-         * The title of the season for this TV program for episodic TV shows.
-         *
-         * <p>This is an optional field supplied only when the season has a special title
-         * (e.g. The Final Season). If provided, the applications should display it instead of
-         * {@link #COLUMN_SEASON_DISPLAY_NUMBER}, and should display it without alterations.
-         * (e.g. for "The Final Season", displayed string should be "The Final Season", not
-         * "Season The Final Season"). When displaying multiple programs, the order should be based
-         * on {@link #COLUMN_SEASON_DISPLAY_NUMBER}, even when {@link #COLUMN_SEASON_TITLE} exists.
-         *
-         * <p>Can be empty.
-         *
-         * <p>Type: TEXT
-         */
-        public static final String COLUMN_SEASON_TITLE = "season_title";
-
-        /**
          * The episode number of this TV program for episodic TV shows.
          *
          * <p>Can be empty.
@@ -1433,27 +1518,6 @@
         public static final String COLUMN_EPISODE_NUMBER = "episode_number";
 
         /**
-         * The episode display number of this TV program for episodic TV shows.
-         *
-         * <p>This is used to indicate the episode number. (e.g. 1, 2 or 3) Note that the value
-         * does not necessarily be numeric. (e.g. 12B)
-         *
-         * <p>Can be empty.
-         *
-         * <p>Type: TEXT
-         */
-        public static final String COLUMN_EPISODE_DISPLAY_NUMBER = "episode_display_number";
-
-        /**
-         * The episode title of this TV program for episodic TV shows.
-         *
-         * <p>Can be empty.
-         *
-         * <p>Type: TEXT
-         */
-        public static final String COLUMN_EPISODE_TITLE = "episode_title";
-
-        /**
          * The start time of this TV program, in milliseconds since the epoch.
          *
          * <p>The value should be equal to or larger than {@link #COLUMN_END_TIME_UTC_MILLIS} of the
@@ -1496,257 +1560,6 @@
         public static final String COLUMN_BROADCAST_GENRE = "broadcast_genre";
 
         /**
-         * The comma-separated canonical genre string of this TV program.
-         *
-         * <p>Canonical genres are defined in {@link Genres}. Use {@link Genres#encode} to create a
-         * text that can be stored in this column. Use {@link Genres#decode} to get the canonical
-         * genre strings from the text stored in the column.
-         *
-         * <p>Type: TEXT
-         * @see Genres
-         * @see Genres#encode
-         * @see Genres#decode
-         */
-        public static final String COLUMN_CANONICAL_GENRE = "canonical_genre";
-
-        /**
-         * The short description of this TV program that is displayed to the user by default.
-         *
-         * <p>It is recommended to limit the length of the descriptions to 256 characters.
-         *
-         * <p>Type: TEXT
-         */
-        public static final String COLUMN_SHORT_DESCRIPTION = "short_description";
-
-        /**
-         * The detailed, lengthy description of this TV program that is displayed only when the user
-         * wants to see more information.
-         *
-         * <p>TV input services should leave this field empty if they have no additional details
-         * beyond {@link #COLUMN_SHORT_DESCRIPTION}.
-         *
-         * <p>Type: TEXT
-         */
-        public static final String COLUMN_LONG_DESCRIPTION = "long_description";
-
-        /**
-         * The width of the video for this TV program, in the unit of pixels.
-         *
-         * <p>Together with {@link #COLUMN_VIDEO_HEIGHT} this is used to determine the video
-         * resolution of the current TV program. Can be empty if it is not known initially or the
-         * program does not convey any video such as the programs from type
-         * {@link Channels#SERVICE_TYPE_AUDIO} channels.
-         *
-         * <p>Type: INTEGER
-         */
-        public static final String COLUMN_VIDEO_WIDTH = "video_width";
-
-        /**
-         * The height of the video for this TV program, in the unit of pixels.
-         *
-         * <p>Together with {@link #COLUMN_VIDEO_WIDTH} this is used to determine the video
-         * resolution of the current TV program. Can be empty if it is not known initially or the
-         * program does not convey any video such as the programs from type
-         * {@link Channels#SERVICE_TYPE_AUDIO} channels.
-         *
-         * <p>Type: INTEGER
-         */
-        public static final String COLUMN_VIDEO_HEIGHT = "video_height";
-
-        /**
-         * The comma-separated audio languages of this TV program.
-         *
-         * <p>This is used to describe available audio languages included in the program. Use either
-         * ISO 639-1 or 639-2/T codes.
-         *
-         * <p>Type: TEXT
-         */
-        public static final String COLUMN_AUDIO_LANGUAGE = "audio_language";
-
-        /**
-         * The comma-separated content ratings of this TV program.
-         *
-         * <p>This is used to describe the content rating(s) of this program. Each comma-separated
-         * content rating sub-string should be generated by calling
-         * {@link TvContentRating#flattenToString}. Note that in most cases the program content is
-         * rated by a single rating system, thus resulting in a corresponding single sub-string that
-         * does not require comma separation and multiple sub-strings appear only when the program
-         * content is rated by two or more content rating systems. If any of those ratings is
-         * specified as "blocked rating" in the user's parental control settings, the TV input
-         * service should block the current content and wait for the signal that it is okay to
-         * unblock.
-         *
-         * <p>Type: TEXT
-         */
-        public static final String COLUMN_CONTENT_RATING = "content_rating";
-
-        /**
-         * The URI for the poster art of this TV program.
-         *
-         * <p>The data in the column must be a URL, or a URI in one of the following formats:
-         *
-         * <ul>
-         * <li>content ({@link android.content.ContentResolver#SCHEME_CONTENT})</li>
-         * <li>android.resource ({@link android.content.ContentResolver#SCHEME_ANDROID_RESOURCE})
-         * </li>
-         * <li>file ({@link android.content.ContentResolver#SCHEME_FILE})</li>
-         * </ul>
-         *
-         * <p>Can be empty.
-         *
-         * <p>Type: TEXT
-         */
-        public static final String COLUMN_POSTER_ART_URI = "poster_art_uri";
-
-        /**
-         * The aspect ratio of the poster art for this TV program.
-         *
-         * <p>The value should match one of the followings:
-         * {@link #ASPECT_RATIO_16_9},
-         * {@link #ASPECT_RATIO_3_2},
-         * {@link #ASPECT_RATIO_1_1}, and
-         * {@link #ASPECT_RATIO_2_3}.
-         *
-         * <p>Type: TEXT
-         */
-        public static final String COLUMN_POSTER_ART_ASPECT_RATIO = "poster_art_aspect_ratio";
-
-        /**
-         * The URI for the thumbnail of this TV program.
-         *
-         * <p>The system can generate a thumbnail from the poster art if this column is not
-         * specified. Thus it is not necessary for TV input services to include a thumbnail if it is
-         * just a scaled image of the poster art.
-         *
-         * <p>The data in the column must be a URL, or a URI in one of the following formats:
-         *
-         * <ul>
-         * <li>content ({@link android.content.ContentResolver#SCHEME_CONTENT})</li>
-         * <li>android.resource ({@link android.content.ContentResolver#SCHEME_ANDROID_RESOURCE})
-         * </li>
-         * <li>file ({@link android.content.ContentResolver#SCHEME_FILE})</li>
-         * </ul>
-         *
-         * <p>Can be empty.
-         *
-         * <p>Type: TEXT
-         */
-        public static final String COLUMN_THUMBNAIL_URI = "thumbnail_uri";
-
-        /**
-         * The aspect ratio of the thumbnail for this TV program.
-         *
-         * <p>The value should match one of the followings:
-         * {@link #ASPECT_RATIO_16_9},
-         * {@link #ASPECT_RATIO_3_2},
-         * {@link #ASPECT_RATIO_1_1}, and
-         * {@link #ASPECT_RATIO_2_3}.
-         *
-         * <p>Type: TEXT
-         */
-        public static final String COLUMN_THUMBNAIL_ASPECT_RATIO = "poster_thumbnail_aspect_ratio";
-
-        /**
-         * The URI for the logo of this TV program.
-         *
-         * <p>This is a small badge shown on top of the poster art or thumbnail representing the
-         * source of the content.
-         *
-         * <p>The data in the column must be a URL, or a URI in one of the following formats:
-         *
-         * <ul>
-         * <li>content ({@link android.content.ContentResolver#SCHEME_CONTENT})</li>
-         * <li>android.resource ({@link android.content.ContentResolver#SCHEME_ANDROID_RESOURCE})
-         * </li>
-         * <li>file ({@link android.content.ContentResolver#SCHEME_FILE})</li>
-         * </ul>
-         *
-         * <p>Can be empty.
-         *
-         * <p>Type: TEXT
-         */
-        public static final String COLUMN_LOGO = "logo";
-
-        /**
-         * The availability of this TV program.
-         *
-         * <p>The value should match one of the followings:
-         * {@link #AVAILABILITY_AVAILABLE},
-         * {@link #AVAILABILITY_FREE_WITH_SUBSCRIPTION}, and
-         * {@link #AVAILABILITY_PAID_CONTENT}.
-         *
-         * <p>Type: TEXT
-         */
-        public static final String COLUMN_AVAILABILITY = "availability";
-
-        /**
-         * The starting price of this TV program.
-         *
-         * <p>This indicates the lowest regular acquisition cost of the content. It is only used
-         * if the availability of the program is {@link #AVAILABILITY_PAID_CONTENT}.
-         *
-         * <p>Type: TEXT
-         * @see #COLUMN_OFFER_PRICE
-         */
-        public static final String COLUMN_STARTING_PRICE = "starting_price";
-
-        /**
-         * The offer price of this TV program.
-         *
-         * <p>This is the promotional cost of the content. It is only used if the availability of
-         * the program is {@link #AVAILABILITY_PAID_CONTENT}.
-         *
-         * <p>Type: TEXT
-         * @see #COLUMN_STARTING_PRICE
-         */
-        public static final String COLUMN_OFFER_PRICE = "offer_price";
-
-        /**
-         * The release date of this TV program.
-         *
-         * <p>The value should be in the form of either "yyyy-MM-dd" or "yyyy".
-         *
-         * <p>Type: TEXT
-         */
-        public static final String COLUMN_RELEASE_DATE = "release_date";
-
-        /**
-         * The count of the items included in this TV program.
-         *
-         * <p>This is only relevant if the program represents a collection of items such as series,
-         * episodes, or music tracks.
-         *
-         * <p>Type: INTEGER
-         */
-        public static final String COLUMN_ITEM_COUNT = "item_count";
-
-        /**
-         * The flag indicating whether this TV program is live or not.
-         *
-         * <p>A value of 1 indicates that the content is airing and should be consumed now, a value
-         * of 0 indicates that the content is off the air and does not need to be consumed at the
-         * present time. If not specified, the value is set to 0 (not live) by default.
-         *
-         * <p>Type: INTEGER (boolean)
-         */
-        public static final String COLUMN_LIVE = "live";
-
-        /**
-         * The flag indicating whether this TV program is searchable or not.
-         *
-         * <p>The columns of searchable programs can be read by other applications that have proper
-         * permission. Care must be taken not to open sensitive data.
-         *
-         * <p>A value of 1 indicates that the program is searchable and its columns can be read by
-         * other applications, a value of 0 indicates that the program is hidden and its columns can
-         * be read only by the package that owns the program and the system. If not specified, this
-         * value is set to 1 (searchable) by default.
-         *
-         * <p>Type: INTEGER (boolean)
-         */
-        public static final String COLUMN_SEARCHABLE = "searchable";
-
-        /**
          * The flag indicating whether recording of this program is prohibited.
          *
          * <p>A value of 1 indicates that recording of this program is prohibited and application
@@ -1758,229 +1571,33 @@
          */
         public static final String COLUMN_RECORDING_PROHIBITED = "recording_prohibited";
 
-        /**
-         * Internal data used by individual TV input services.
-         *
-         * <p>This is internal to the provider that inserted it, and should not be decoded by other
-         * apps.
-         *
-         * <p>Type: BLOB
-         */
-        public static final String COLUMN_INTERNAL_PROVIDER_DATA = "internal_provider_data";
-
-        /**
-         * Internal integer flag used by individual TV input services.
-         *
-         * <p>This is internal to the provider that inserted it, and should not be decoded by other
-         * apps.
-         *
-         * <p>Type: INTEGER
-         */
-        public static final String COLUMN_INTERNAL_PROVIDER_FLAG1 = "internal_provider_flag1";
-
-        /**
-         * Internal integer flag used by individual TV input services.
-         *
-         * <p>This is internal to the provider that inserted it, and should not be decoded by other
-         * apps.
-         *
-         * <p>Type: INTEGER
-         */
-        public static final String COLUMN_INTERNAL_PROVIDER_FLAG2 = "internal_provider_flag2";
-
-        /**
-         * Internal integer flag used by individual TV input services.
-         *
-         * <p>This is internal to the provider that inserted it, and should not be decoded by other
-         * apps.
-         *
-         * <p>Type: INTEGER
-         */
-        public static final String COLUMN_INTERNAL_PROVIDER_FLAG3 = "internal_provider_flag3";
-
-        /**
-         * Internal integer flag used by individual TV input services.
-         *
-         * <p>This is internal to the provider that inserted it, and should not be decoded by other
-         * apps.
-         *
-         * <p>Type: INTEGER
-         */
-        public static final String COLUMN_INTERNAL_PROVIDER_FLAG4 = "internal_provider_flag4";
-
-        /**
-         * The version number of this row entry used by TV input services.
-         *
-         * <p>This is best used by sync adapters to identify the rows to update. The number can be
-         * defined by individual TV input services. One may assign the same value as
-         * {@code version_number} in ETSI EN 300 468 or ATSC A/65, if the data are coming from a TV
-         * broadcast.
-         *
-         * <p>Type: INTEGER
-         */
-        public static final String COLUMN_VERSION_NUMBER = "version_number";
-
-        /**
-         * The internal ID used by individual TV input services.
-         *
-         * <p>This is internal to the provider that inserted it, and should not be decoded by other
-         * apps.
-         *
-         * <p>Can be empty.
-         *
-         * <p>Type: TEXT
-         */
-        public static final String COLUMN_INTERNAL_PROVIDER_ID = "internal_provider_id";
-
-        /**
-         * The URI for the preview video.
-         *
-         * <p>This is only relevant to {@link Channels#TYPE_PREVIEW}. The data in the column must be
-         * a URL, or a URI in one of the following formats:
-         *
-         * <ul>
-         * <li>content ({@link android.content.ContentResolver#SCHEME_CONTENT})</li>
-         * <li>android.resource ({@link android.content.ContentResolver#SCHEME_ANDROID_RESOURCE})
-         * </li>
-         * <li>file ({@link android.content.ContentResolver#SCHEME_FILE})</li>
-         * </ul>
-         *
-         * <p>Can be empty.
-         *
-         * <p>Type: TEXT
-         */
-        public static final String COLUMN_PREVIEW_VIDEO_URI = "preview_video_uri";
-
-        /**
-         * The last playback position (in milliseconds) of the preview video.
-         *
-         * <p>This is only relevant to {@link Channels#TYPE_PREVIEW}.
-         *
-         * <p>Can be empty.
-         *
-         * <p>Type: INTEGER
-         */
-        public static final String COLUMN_PREVIEW_LAST_PLAYBACK_POSITION =
-                "preview_last_playback_position";
-
-        /**
-         * The duration (in milliseconds) of the preview video.
-         *
-         * <p>This is only relevant to {@link Channels#TYPE_PREVIEW}.
-         *
-         * <p>Can be empty.
-         *
-         * <p>Type: INTEGER
-         */
-        public static final String COLUMN_PREVIEW_DURATION = "preview_duration";
-
-        /**
-         * The intent URI which is launched when the preview video is selected.
-         *
-         * <p>The URI is created using {@link Intent#toUri} with {@link Intent#URI_INTENT_SCHEME}
-         * and converted back to the original intent with {@link Intent#parseUri}. The intent is
-         * launched when the user selects the preview video item.
-         *
-         * <p>Can be empty.
-         *
-         * <p>Type: TEXT
-         */
-        public static final String COLUMN_PREVIEW_INTENT_URI =
-                "preview_intent_uri";
-
-        /**
-         * The weight of the preview program within the channel.
-         *
-         * <p>The UI may choose to show this item in a different position in the channel row.
-         * A larger weight value means the program is more important than other programs having
-         * smaller weight values. The value is relevant for the preview programs in the same
-         * channel. This is only relevant to {@link Channels#TYPE_PREVIEW}.
-         *
-         * <p>Can be empty.
-         *
-         * <p>Type: INTEGER
-         */
-        public static final String COLUMN_PREVIEW_WEIGHT = "preview_weight";
-
-        /**
-         * The flag indicating whether this program is transient or not.
-         *
-         * <p>A value of 1 indicates that the channel will be automatically removed by the system on
-         * reboot, and a value of 0 indicates that the channel is persistent across reboot. If not
-         * specified, this value is set to 0 (not transient) by default.
-         *
-         * <p>Type: INTEGER (boolean)
-         * @see Channels#COLUMN_TRANSIENT
-         * @hide
-         */
-        @SystemApi
-        public static final String COLUMN_TRANSIENT = "transient";
-
-        /**
-         * The type of interaction for this TV program.
-         *
-         * <p> The value should match one of the followings:
-         * {@link #INTERACTION_TYPE_LISTENS},
-         * {@link #INTERACTION_TYPE_FOLLOWERS},
-         * {@link #INTERACTION_TYPE_FANS},
-         * {@link #INTERACTION_TYPE_LIKES},
-         * {@link #INTERACTION_TYPE_THUMBS},
-         * {@link #INTERACTION_TYPE_VIEWS}, and
-         * {@link #INTERACTION_TYPE_VIEWERS}.
-         *
-         * <p>Type: TEXT
-         * @see #COLUMN_INTERACTION_COUNT
-         */
-        public static final String COLUMN_INTERACTION_TYPE = "interaction_type";
-
-        /**
-         * The interaction count for this program.
-         *
-         * <p>This indicates the number of times interaction has happened.
-         *
-         * <p>Type: INTEGER
-         * @see #COLUMN_INTERACTION_TYPE
-         */
-        public static final String COLUMN_INTERACTION_COUNT = "interaction_count";
-
-        /**
-         * The author or artist of this content.
-         *
-         * <p>Type: TEXT
-         */
-        public static final String COLUMN_AUTHOR = "author";
-
-        /**
-         * The review rating score style used for {@link #COLUMN_REVIEW_RATING}.
-         *
-         * <p> The value should match one of the followings: {@link #REVIEW_RATING_STYLE_STARS},
-         * {@link #REVIEW_RATING_STYLE_THUMBS_UP_DOWN}, and {@link #REVIEW_RATING_STYLE_PERCENTAGE}.
-         *
-         * <p>Type: TEXT
-         * @see #COLUMN_REVIEW_RATING
-         */
-        public static final String COLUMN_REVIEW_RATING_STYLE = "review_rating_style";
-
-        /**
-         * The review rating score for this program.
-         *
-         * <p>The format of the value is dependent on {@link #COLUMN_REVIEW_RATING_STYLE}. If the
-         * style is {@link #REVIEW_RATING_STYLE_STARS}, the value should be a real number between
-         * 0.0 and 5.0. (e.g. "4.5") If the style is {@link #REVIEW_RATING_STYLE_THUMBS_UP_DOWN},
-         * the value should be two integers, one for thumbs-up count and the other for thumbs-down
-         * count, with a comma between them. (e.g. "200,40") If the style is
-         * {@link #REVIEW_RATING_STYLE_PERCENTAGE}, the value shoule be a real number between 0 and
-         * 100. (e.g. "99.9")
-         *
-         * <p>Type: TEXT
-         * @see #COLUMN_REVIEW_RATING_STYLE
-         */
-        public static final String COLUMN_REVIEW_RATING = "review_rating";
-
         private Programs() {}
 
         /** Canonical genres for TV programs. */
         public static final class Genres {
+            /** @hide */
+            @StringDef({
+                    FAMILY_KIDS,
+                    SPORTS,
+                    SHOPPING,
+                    MOVIES,
+                    COMEDY,
+                    TRAVEL,
+                    DRAMA,
+                    EDUCATION,
+                    ANIMAL_WILDLIFE,
+                    NEWS,
+                    GAMING,
+                    ARTS,
+                    ENTERTAINMENT,
+                    LIFE_STYLE,
+                    MUSIC,
+                    PREMIER,
+                    TECH_SCIENCE,
+            })
+            @Retention(RetentionPolicy.SOURCE)
+            public @interface Genre {}
+
             /** The genre for Family/Kids. */
             public static final String FAMILY_KIDS = "FAMILY_KIDS";
 
@@ -2068,7 +1685,7 @@
              * @return an encoded genre string that can be inserted into the
              *         {@link #COLUMN_BROADCAST_GENRE} or {@link #COLUMN_CANONICAL_GENRE} column.
              */
-            public static String encode(@NonNull String... genres) {
+            public static String encode(@NonNull @Genre String... genres) {
                 if (genres == null) {
                     // MNC and before will throw a NPE.
                     return null;
@@ -2107,7 +1724,7 @@
              *            {@link #COLUMN_BROADCAST_GENRE} or {@link #COLUMN_CANONICAL_GENRE} column.
              * @return genre strings.
              */
-            public static String[] decode(@NonNull String genres) {
+            public static @Genre String[] decode(@NonNull String genres) {
                 if (TextUtils.isEmpty(genres)) {
                     // MNC and before will throw a NPE for {@code null} genres.
                     return EMPTY_STRING_ARRAY;
@@ -2167,7 +1784,7 @@
      * <p>By default, the query results will be sorted by {@link #COLUMN_START_TIME_UTC_MILLIS} in
      * ascending order.
      */
-    public static final class RecordedPrograms implements BaseTvColumns {
+    public static final class RecordedPrograms implements BaseProgramColumns {
 
         /** The content:// style URI for this table. */
         public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/"
@@ -2191,83 +1808,6 @@
         public static final String COLUMN_INPUT_ID = "input_id";
 
         /**
-         * The ID of the TV channel that provided this recorded TV program.
-         *
-         * <p>This is a part of the channel URI and matches to {@link BaseColumns#_ID}.
-         *
-         * <p>This is a required field.
-         *
-         * <p>Type: INTEGER (long)
-         * @see Programs#COLUMN_CHANNEL_ID
-         */
-        public static final String COLUMN_CHANNEL_ID = Programs.COLUMN_CHANNEL_ID;
-
-        /**
-         * The title of this recorded TV program.
-         *
-         * <p>If this recorded program is an episodic TV show, it is recommended that the title is
-         * the series title and its related fields ({@link #COLUMN_SEASON_TITLE} and/or
-         * {@link #COLUMN_SEASON_DISPLAY_NUMBER}, {@link #COLUMN_EPISODE_DISPLAY_NUMBER},
-         * and {@link #COLUMN_EPISODE_TITLE}) are filled in.
-         *
-         * <p>Type: TEXT
-         * @see Programs#COLUMN_TITLE
-         */
-        public static final String COLUMN_TITLE = Programs.COLUMN_TITLE;
-
-        /**
-         * The season display number of this recorded TV program for episodic TV shows.
-         *
-         * <p>This is used to indicate the season number. (e.g. 1, 2 or 3) Note that the value
-         * does not necessarily be numeric. (e.g. 12B)
-         *
-         * <p>Can be empty.
-         *
-         * <p>Type: TEXT
-         */
-        public static final String COLUMN_SEASON_DISPLAY_NUMBER =
-                Programs.COLUMN_SEASON_DISPLAY_NUMBER;
-
-        /**
-         * The title of the season for this recorded TV program for episodic TV shows.
-         *
-         * <p>This is an optional field supplied only when the season has a special title
-         * (e.g. The Final Season). If provided, the applications should display it instead of
-         * {@link #COLUMN_SEASON_DISPLAY_NUMBER} without alterations.
-         * (e.g. for "The Final Season", displayed string should be "The Final Season", not
-         * "Season The Final Season"). When displaying multiple programs, the order should be based
-         * on {@link #COLUMN_SEASON_DISPLAY_NUMBER}, even when {@link #COLUMN_SEASON_TITLE} exists.
-         *
-         * <p>Can be empty.
-         *
-         * <p>Type: TEXT
-         */
-        public static final String COLUMN_SEASON_TITLE = Programs.COLUMN_SEASON_TITLE;
-
-        /**
-         * The episode display number of this recorded TV program for episodic TV shows.
-         *
-         * <p>This is used to indicate the episode number. (e.g. 1, 2 or 3) Note that the value
-         * does not necessarily be numeric. (e.g. 12B)
-         *
-         * <p>Can be empty.
-         *
-         * <p>Type: TEXT
-         */
-        public static final String COLUMN_EPISODE_DISPLAY_NUMBER =
-                Programs.COLUMN_EPISODE_DISPLAY_NUMBER;
-
-        /**
-         * The episode title of this recorded TV program for episodic TV shows.
-         *
-         * <p>Can be empty.
-         *
-         * <p>Type: TEXT
-         * @see Programs#COLUMN_EPISODE_TITLE
-         */
-        public static final String COLUMN_EPISODE_TITLE = Programs.COLUMN_EPISODE_TITLE;
-
-        /**
          * The start time of the original TV program, in milliseconds since the epoch.
          *
          * <p>Type: INTEGER (long)
@@ -2300,154 +1840,6 @@
         public static final String COLUMN_BROADCAST_GENRE = Programs.COLUMN_BROADCAST_GENRE;
 
         /**
-         * The comma-separated canonical genre string of this recorded TV program.
-         *
-         * <p>Canonical genres are defined in {@link Programs.Genres}. Use
-         * {@link Programs.Genres#encode Genres.encode()} to create a text that can be stored in
-         * this column. Use {@link Programs.Genres#decode Genres.decode()} to get the canonical
-         * genre strings from the text stored in the column.
-         *
-         * <p>Type: TEXT
-         * @see Programs#COLUMN_CANONICAL_GENRE
-         * @see Programs.Genres
-         */
-        public static final String COLUMN_CANONICAL_GENRE = Programs.COLUMN_CANONICAL_GENRE;
-
-        /**
-         * The short description of this recorded TV program that is displayed to the user by
-         * default.
-         *
-         * <p>It is recommended to limit the length of the descriptions to 256 characters.
-         *
-         * <p>Type: TEXT
-         * @see Programs#COLUMN_SHORT_DESCRIPTION
-         */
-        public static final String COLUMN_SHORT_DESCRIPTION = Programs.COLUMN_SHORT_DESCRIPTION;
-
-        /**
-         * The detailed, lengthy description of this recorded TV program that is displayed only when
-         * the user wants to see more information.
-         *
-         * <p>TV input services should leave this field empty if they have no additional details
-         * beyond {@link #COLUMN_SHORT_DESCRIPTION}.
-         *
-         * <p>Type: TEXT
-         * @see Programs#COLUMN_LONG_DESCRIPTION
-         */
-        public static final String COLUMN_LONG_DESCRIPTION = Programs.COLUMN_LONG_DESCRIPTION;
-
-        /**
-         * The width of the video for this recorded TV program, in the unit of pixels.
-         *
-         * <p>Together with {@link #COLUMN_VIDEO_HEIGHT} this is used to determine the video
-         * resolution of the current recorded TV program. Can be empty if it is not known or the
-         * recorded program does not convey any video.
-         *
-         * <p>Type: INTEGER
-         * @see Programs#COLUMN_VIDEO_WIDTH
-         */
-        public static final String COLUMN_VIDEO_WIDTH = Programs.COLUMN_VIDEO_WIDTH;
-
-        /**
-         * The height of the video for this recorded TV program, in the unit of pixels.
-         *
-         * <p>Together with {@link #COLUMN_VIDEO_WIDTH} this is used to determine the video
-         * resolution of the current recorded TV program. Can be empty if it is not known or the
-         * recorded program does not convey any video.
-         *
-         * <p>Type: INTEGER
-         * @see Programs#COLUMN_VIDEO_HEIGHT
-         */
-        public static final String COLUMN_VIDEO_HEIGHT = Programs.COLUMN_VIDEO_HEIGHT;
-
-        /**
-         * The comma-separated audio languages of this recorded TV program.
-         *
-         * <p>This is used to describe available audio languages included in the recorded program.
-         * Use either ISO 639-1 or 639-2/T codes.
-         *
-         * <p>Type: TEXT
-         * @see Programs#COLUMN_AUDIO_LANGUAGE
-         */
-        public static final String COLUMN_AUDIO_LANGUAGE = Programs.COLUMN_AUDIO_LANGUAGE;
-
-        /**
-         * The comma-separated content ratings of this recorded TV program.
-         *
-         * <p>This is used to describe the content rating(s) of this recorded program. Each
-         * comma-separated content rating sub-string should be generated by calling
-         * {@link TvContentRating#flattenToString}. Note that in most cases the recorded program
-         * content is rated by a single rating system, thus resulting in a corresponding single
-         * sub-string that does not require comma separation and multiple sub-strings appear only
-         * when the recorded program content is rated by two or more content rating systems. If any
-         * of those ratings is specified as "blocked rating" in the user's parental control
-         * settings, the TV input service should block the current content and wait for the signal
-         * that it is okay to unblock.
-         *
-         * <p>Type: TEXT
-         * @see Programs#COLUMN_CONTENT_RATING
-         */
-        public static final String COLUMN_CONTENT_RATING = Programs.COLUMN_CONTENT_RATING;
-
-        /**
-         * The URI for the poster art of this recorded TV program.
-         *
-         * <p>The data in the column must be a URL, or a URI in one of the following formats:
-         *
-         * <ul>
-         * <li>content ({@link android.content.ContentResolver#SCHEME_CONTENT})</li>
-         * <li>android.resource ({@link android.content.ContentResolver#SCHEME_ANDROID_RESOURCE})
-         * </li>
-         * <li>file ({@link android.content.ContentResolver#SCHEME_FILE})</li>
-         * </ul>
-         *
-         * <p>Can be empty.
-         *
-         * <p>Type: TEXT
-         * @see Programs#COLUMN_POSTER_ART_URI
-         */
-        public static final String COLUMN_POSTER_ART_URI = Programs.COLUMN_POSTER_ART_URI;
-
-        /**
-         * The URI for the thumbnail of this recorded TV program.
-         *
-         * <p>The system can generate a thumbnail from the poster art if this column is not
-         * specified. Thus it is not necessary for TV input services to include a thumbnail if it is
-         * just a scaled image of the poster art.
-         *
-         * <p>The data in the column must be a URL, or a URI in one of the following formats:
-         *
-         * <ul>
-         * <li>content ({@link android.content.ContentResolver#SCHEME_CONTENT})</li>
-         * <li>android.resource ({@link android.content.ContentResolver#SCHEME_ANDROID_RESOURCE})
-         * </li>
-         * <li>file ({@link android.content.ContentResolver#SCHEME_FILE})</li>
-         * </ul>
-         *
-         * <p>Can be empty.
-         *
-         * <p>Type: TEXT
-         * @see Programs#COLUMN_THUMBNAIL_URI
-         */
-        public static final String COLUMN_THUMBNAIL_URI = Programs.COLUMN_THUMBNAIL_URI;
-
-        /**
-         * The flag indicating whether this recorded TV program is searchable or not.
-         *
-         * <p>The columns of searchable recorded programs can be read by other applications that
-         * have proper permission. Care must be taken not to open sensitive data.
-         *
-         * <p>A value of 1 indicates that the recorded program is searchable and its columns can be
-         * read by other applications, a value of 0 indicates that the recorded program is hidden
-         * and its columns can be read only by the package that owns the recorded program and the
-         * system. If not specified, this value is set to 1 (searchable) by default.
-         *
-         * <p>Type: INTEGER (boolean)
-         * @see Programs#COLUMN_SEARCHABLE
-         */
-        public static final String COLUMN_SEARCHABLE = Programs.COLUMN_SEARCHABLE;
-
-        /**
          * The URI of the recording data for this recorded program.
          *
          * <p>Together with {@link #COLUMN_RECORDING_DATA_BYTES}, applications can use this
@@ -2497,84 +1889,652 @@
         public static final String COLUMN_RECORDING_EXPIRE_TIME_UTC_MILLIS =
                 "recording_expire_time_utc_millis";
 
-
-        /**
-         * Internal data used by individual TV input services.
-         *
-         * <p>This is internal to the provider that inserted it, and should not be decoded by other
-         * apps.
-         *
-         * <p>Type: BLOB
-         * @see Programs#COLUMN_INTERNAL_PROVIDER_DATA
-         */
-        public static final String COLUMN_INTERNAL_PROVIDER_DATA =
-                Programs.COLUMN_INTERNAL_PROVIDER_DATA;
-
-        /**
-         * Internal integer flag used by individual TV input services.
-         *
-         * <p>This is internal to the provider that inserted it, and should not be decoded by other
-         * apps.
-         *
-         * <p>Type: INTEGER
-         * @see Programs#COLUMN_INTERNAL_PROVIDER_FLAG1
-         */
-        public static final String COLUMN_INTERNAL_PROVIDER_FLAG1 =
-                Programs.COLUMN_INTERNAL_PROVIDER_FLAG1;
-
-        /**
-         * Internal integer flag used by individual TV input services.
-         *
-         * <p>This is internal to the provider that inserted it, and should not be decoded by other
-         * apps.
-         *
-         * <p>Type: INTEGER
-         * @see Programs#COLUMN_INTERNAL_PROVIDER_FLAG2
-         */
-        public static final String COLUMN_INTERNAL_PROVIDER_FLAG2 =
-                Programs.COLUMN_INTERNAL_PROVIDER_FLAG2;
-
-        /**
-         * Internal integer flag used by individual TV input services.
-         *
-         * <p>This is internal to the provider that inserted it, and should not be decoded by other
-         * apps.
-         *
-         * <p>Type: INTEGER
-         * @see Programs#COLUMN_INTERNAL_PROVIDER_FLAG3
-         */
-        public static final String COLUMN_INTERNAL_PROVIDER_FLAG3 =
-                Programs.COLUMN_INTERNAL_PROVIDER_FLAG3;
-
-        /**
-         * Internal integer flag used by individual TV input services.
-         *
-         * <p>This is internal to the provider that inserted it, and should not be decoded by other
-         * apps.
-         *
-         * <p>Type: INTEGER
-         * @see Programs#COLUMN_INTERNAL_PROVIDER_FLAG4
-         */
-        public static final String COLUMN_INTERNAL_PROVIDER_FLAG4 =
-                Programs.COLUMN_INTERNAL_PROVIDER_FLAG4;
-
-        /**
-         * The version number of this row entry used by TV input services.
-         *
-         * <p>This is best used by sync adapters to identify the rows to update. The number can be
-         * defined by individual TV input services. One may assign the same value as
-         * {@code version_number} in ETSI EN 300 468 or ATSC A/65, if the data are coming from a TV
-         * broadcast.
-         *
-         * <p>Type: INTEGER
-         * @see Programs#COLUMN_VERSION_NUMBER
-         */
-        public static final String COLUMN_VERSION_NUMBER = Programs.COLUMN_VERSION_NUMBER;
-
         private RecordedPrograms() {}
     }
 
     /**
+     * Column definitions for the preview TV programs table.
+     */
+    public static final class PreviewPrograms implements BaseProgramColumns {
+
+        /** The content:// style URI for this table. */
+        public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/"
+                + PATH_PREVIEW_PROGRAM);
+
+        /** The MIME type of a directory of preview TV programs. */
+        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/preview_program";
+
+        /** The MIME type of a single preview TV program. */
+        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/preview_program";
+
+        /** @hide */
+        @StringDef({
+                TYPE_MOVIE,
+                TYPE_TV_SERIES,
+                TYPE_TV_SEASON,
+                TYPE_TV_EPISODE,
+                TYPE_CLIP,
+                TYPE_EVENT,
+                TYPE_CHANNEL,
+                TYPE_TRACK,
+                TYPE_ALBUM,
+                TYPE_ARTIST,
+                TYPE_PLAYLIST,
+                TYPE_STATION,
+        })
+        @Retention(RetentionPolicy.SOURCE)
+        public @interface Type {}
+
+        /**
+         * The program type for movie.
+         *
+         * @see #COLUMN_TYPE
+         */
+        public static final String TYPE_MOVIE = "TYPE_MOVIE";
+
+        /**
+         * The program type for TV series.
+         *
+         * @see #COLUMN_TYPE
+         */
+        public static final String TYPE_TV_SERIES = "TYPE_TV_SERIES";
+
+        /**
+         * The program type for TV season.
+         *
+         * @see #COLUMN_TYPE
+         */
+        public static final String TYPE_TV_SEASON = "TYPE_TV_SEASON";
+
+        /**
+         * The program type for TV episode.
+         *
+         * @see #COLUMN_TYPE
+         */
+        public static final String TYPE_TV_EPISODE = "TYPE_TV_EPISODE";
+
+        /**
+         * The program type for clip.
+         *
+         * @see #COLUMN_TYPE
+         */
+        public static final String TYPE_CLIP = "TYPE_CLIP";
+
+        /**
+         * The program type for event.
+         *
+         * @see #COLUMN_TYPE
+         */
+        public static final String TYPE_EVENT = "TYPE_EVENT";
+
+        /**
+         * The program type for channel.
+         *
+         * @see #COLUMN_TYPE
+         */
+        public static final String TYPE_CHANNEL = "TYPE_CHANNEL";
+
+        /**
+         * The program type for track.
+         *
+         * @see #COLUMN_TYPE
+         */
+        public static final String TYPE_TRACK = "TYPE_TRACK";
+
+        /**
+         * The program type for album.
+         *
+         * @see #COLUMN_TYPE
+         */
+        public static final String TYPE_ALBUM = "TYPE_ALBUM";
+
+        /**
+         * The program type for artist.
+         *
+         * @see #COLUMN_TYPE
+         */
+        public static final String TYPE_ARTIST = "TYPE_ARTIST";
+
+        /**
+         * The program type for playlist.
+         *
+         * @see #COLUMN_TYPE
+         */
+        public static final String TYPE_PLAYLIST = "TYPE_PLAYLIST";
+
+        /**
+         * The program type for station.
+         *
+         * @see #COLUMN_TYPE
+         */
+        public static final String TYPE_STATION = "TYPE_STATION";
+
+        /** @hide */
+        @StringDef({
+                WATCH_NEXT_TYPE_CONTINUE,
+                WATCH_NEXT_TYPE_NEXT,
+                WATCH_NEXT_TYPE_NEW,
+        })
+        @Retention(RetentionPolicy.SOURCE)
+        public @interface WatchNextType {}
+
+        /**
+         * The watch next type for CONTINUE.
+         *
+         * @see #COLUMN_WATCH_NEXT_TYPE
+         */
+        public static final String WATCH_NEXT_TYPE_CONTINUE = "WATCH_NEXT_TYPE_CONTINUE";
+
+        /**
+         * The watch next type for NEXT.
+         *
+         * @see #COLUMN_WATCH_NEXT_TYPE
+         */
+        public static final String WATCH_NEXT_TYPE_NEXT = "WATCH_NEXT_TYPE_NEXT";
+
+        /**
+         * The watch next type for NEW.
+         *
+         * @see #COLUMN_WATCH_NEXT_TYPE
+         */
+        public static final String WATCH_NEXT_TYPE_NEW = "WATCH_NEXT_TYPE_NEW";
+
+        /** @hide */
+        @StringDef({
+                ASPECT_RATIO_16_9,
+                ASPECT_RATIO_3_2,
+                ASPECT_RATIO_1_1,
+                ASPECT_RATIO_2_3,
+        })
+        @Retention(RetentionPolicy.SOURCE)
+        public @interface AspectRatio {}
+
+        /**
+         * The aspect ratio for 16:9.
+         *
+         * @see #COLUMN_POSTER_ART_ASPECT_RATIO
+         * @see #COLUMN_THUMBNAIL_ASPECT_RATIO
+         */
+        public static final String ASPECT_RATIO_16_9 = "ASPECT_RATIO_16_9";
+
+        /**
+         * The aspect ratio for 3:2.
+         *
+         * @see #COLUMN_POSTER_ART_ASPECT_RATIO
+         * @see #COLUMN_THUMBNAIL_ASPECT_RATIO
+         */
+        public static final String ASPECT_RATIO_3_2 = "ASPECT_RATIO_3_2";
+
+        /**
+         * The aspect ratio for 1:1.
+         *
+         * @see #COLUMN_POSTER_ART_ASPECT_RATIO
+         * @see #COLUMN_THUMBNAIL_ASPECT_RATIO
+         */
+        public static final String ASPECT_RATIO_1_1 = "ASPECT_RATIO_1_1";
+
+        /**
+         * The aspect ratio for 2:3.
+         *
+         * @see #COLUMN_POSTER_ART_ASPECT_RATIO
+         * @see #COLUMN_THUMBNAIL_ASPECT_RATIO
+         */
+        public static final String ASPECT_RATIO_2_3 = "ASPECT_RATIO_2_3";
+
+        /** @hide */
+        @StringDef({
+                AVAILABILITY_AVAILABLE,
+                AVAILABILITY_FREE_WITH_SUBSCRIPTION,
+                AVAILABILITY_PAID_CONTENT,
+        })
+        @Retention(RetentionPolicy.SOURCE)
+        public @interface Availability {}
+
+        /**
+         * The availability for "available to this user".
+         *
+         * @see #COLUMN_AVAILABILITY
+         */
+        public static final String AVAILABILITY_AVAILABLE = "AVAILABILITY_AVAILABLE";
+
+        /**
+         * The availability for "free with subscription".
+         *
+         * @see #COLUMN_AVAILABILITY
+         */
+        public static final String AVAILABILITY_FREE_WITH_SUBSCRIPTION =
+                "AVAILABILITY_FREE_WITH_SUBSCRIPTION";
+
+        /**
+         * The availability for "paid content, either to-own or rental
+         * (user has not purchased/rented).
+         *
+         * @see #COLUMN_AVAILABILITY
+         */
+        public static final String AVAILABILITY_PAID_CONTENT = "AVAILABILITY_PAID_CONTENT";
+
+        /** @hide */
+        @StringDef({
+                INTERACTION_TYPE_LISTENS,
+                INTERACTION_TYPE_FOLLOWERS,
+                INTERACTION_TYPE_FANS,
+                INTERACTION_TYPE_LIKES,
+                INTERACTION_TYPE_THUMBS,
+                INTERACTION_TYPE_VIEWS,
+                INTERACTION_TYPE_VIEWERS,
+        })
+        @Retention(RetentionPolicy.SOURCE)
+        public @interface InteractionType {}
+
+        /**
+         * The interaction type for "listens".
+         *
+         * @see #COLUMN_INTERACTION_TYPE
+         */
+        public static final String INTERACTION_TYPE_LISTENS = "INTERACTION_TYPE_LISTENS";
+
+        /**
+         * The interaction type for "followers".
+         *
+         * @see #COLUMN_INTERACTION_TYPE
+         */
+        public static final String INTERACTION_TYPE_FOLLOWERS = "INTERACTION_TYPE_FOLLOWERS";
+
+        /**
+         * The interaction type for "fans".
+         *
+         * @see #COLUMN_INTERACTION_TYPE
+         */
+        public static final String INTERACTION_TYPE_FANS = "INTERACTION_TYPE_FANS";
+
+        /**
+         * The interaction type for "likes".
+         *
+         * @see #COLUMN_INTERACTION_TYPE
+         */
+        public static final String INTERACTION_TYPE_LIKES = "INTERACTION_TYPE_LIKES";
+
+        /**
+         * The interaction type for "thumbs".
+         *
+         * @see #COLUMN_INTERACTION_TYPE
+         */
+        public static final String INTERACTION_TYPE_THUMBS = "INTERACTION_TYPE_THUMBS";
+
+        /**
+         * The interaction type for "views".
+         *
+         * @see #COLUMN_INTERACTION_TYPE
+         */
+        public static final String INTERACTION_TYPE_VIEWS = "INTERACTION_TYPE_VIEWS";
+
+        /**
+         * The interaction type for "viewers".
+         *
+         * @see #COLUMN_INTERACTION_TYPE
+         */
+        public static final String INTERACTION_TYPE_VIEWERS = "INTERACTION_TYPE_VIEWERS";
+
+        /** @hide */
+        @StringDef({
+                REVIEW_RATING_STYLE_STARS,
+                REVIEW_RATING_STYLE_THUMBS_UP_DOWN,
+                REVIEW_RATING_STYLE_PERCENTAGE,
+        })
+        @Retention(RetentionPolicy.SOURCE)
+        public @interface ReviewRatingStyle {}
+
+        /**
+         * The review rating style for five star rating.
+         *
+         * @see #COLUMN_REVIEW_RATING_STYLE
+         */
+        public static final String REVIEW_RATING_STYLE_STARS = "REVIEW_RATING_STYLE_STARS";
+
+        /**
+         * The review rating style for thumbs-up and thumbs-down rating.
+         *
+         * @see #COLUMN_REVIEW_RATING_STYLE
+         */
+        public static final String REVIEW_RATING_STYLE_THUMBS_UP_DOWN =
+                "REVIEW_RATING_STYLE_THUMBS_UP_DOWN";
+
+        /**
+         * The review rating style for 0 to 100 point system.
+         *
+         * @see #COLUMN_REVIEW_RATING_STYLE
+         */
+        public static final String REVIEW_RATING_STYLE_PERCENTAGE =
+                "REVIEW_RATING_STYLE_PERCENTAGE";
+
+        /**
+         * The type of this program content.
+         *
+         * <p>The value should match one of the followings:
+         * {@link #TYPE_MOVIE},
+         * {@link #TYPE_TV_SERIES},
+         * {@link #TYPE_TV_SEASON},
+         * {@link #TYPE_TV_EPISODE},
+         * {@link #TYPE_CLIP},
+         * {@link #TYPE_EVENT},
+         * {@link #TYPE_CHANNEL},
+         * {@link #TYPE_TRACK},
+         * {@link #TYPE_ALBUM},
+         * {@link #TYPE_ARTIST},
+         * {@link #TYPE_PLAYLIST}, and
+         * {@link #TYPE_STATION}.
+         *
+         * <p>This is a required field if the program is from a {@link Channels#TYPE_PREVIEW}
+         * channel.
+         *
+         * <p>Type: TEXT
+         */
+        public static final String COLUMN_TYPE = "type";
+
+        /**
+         * The "watch next" type of this program content.
+         *
+         * <p>The value should match one of the followings:
+         * {@link #WATCH_NEXT_TYPE_CONTINUE},
+         * {@link #WATCH_NEXT_TYPE_NEXT}, and
+         * {@link #WATCH_NEXT_TYPE_NEW}.
+         *
+         * <p>Can be empty.
+         *
+         * <p>Type: TEXT
+         */
+        public static final String COLUMN_WATCH_NEXT_TYPE = "watch_next_type";
+
+        /**
+         * The aspect ratio of the poster art for this TV program.
+         *
+         * <p>The value should match one of the followings:
+         * {@link #ASPECT_RATIO_16_9},
+         * {@link #ASPECT_RATIO_3_2},
+         * {@link #ASPECT_RATIO_1_1}, and
+         * {@link #ASPECT_RATIO_2_3}.
+         *
+         * <p>Type: TEXT
+         */
+        public static final String COLUMN_POSTER_ART_ASPECT_RATIO = "poster_art_aspect_ratio";
+
+        /**
+         * The aspect ratio of the thumbnail for this TV program.
+         *
+         * <p>The value should match one of the followings:
+         * {@link #ASPECT_RATIO_16_9},
+         * {@link #ASPECT_RATIO_3_2},
+         * {@link #ASPECT_RATIO_1_1}, and
+         * {@link #ASPECT_RATIO_2_3}.
+         *
+         * <p>Type: TEXT
+         */
+        public static final String COLUMN_THUMBNAIL_ASPECT_RATIO = "poster_thumbnail_aspect_ratio";
+
+        /**
+         * The URI for the logo of this TV program.
+         *
+         * <p>This is a small badge shown on top of the poster art or thumbnail representing the
+         * source of the content.
+         *
+         * <p>The data in the column must be a URL, or a URI in one of the following formats:
+         *
+         * <ul>
+         * <li>content ({@link android.content.ContentResolver#SCHEME_CONTENT})</li>
+         * <li>android.resource ({@link android.content.ContentResolver#SCHEME_ANDROID_RESOURCE})
+         * </li>
+         * <li>file ({@link android.content.ContentResolver#SCHEME_FILE})</li>
+         * </ul>
+         *
+         * <p>Can be empty.
+         *
+         * <p>Type: TEXT
+         */
+        public static final String COLUMN_LOGO_URI = "logo_uri";
+
+        /**
+         * The availability of this TV program.
+         *
+         * <p>The value should match one of the followings:
+         * {@link #AVAILABILITY_AVAILABLE},
+         * {@link #AVAILABILITY_FREE_WITH_SUBSCRIPTION}, and
+         * {@link #AVAILABILITY_PAID_CONTENT}.
+         *
+         * <p>Type: TEXT
+         */
+        public static final String COLUMN_AVAILABILITY = "availability";
+
+        /**
+         * The starting price of this TV program.
+         *
+         * <p>This indicates the lowest regular acquisition cost of the content. It is only used
+         * if the availability of the program is {@link #AVAILABILITY_PAID_CONTENT}.
+         *
+         * <p>Type: TEXT
+         * @see #COLUMN_OFFER_PRICE
+         */
+        public static final String COLUMN_STARTING_PRICE = "starting_price";
+
+        /**
+         * The offer price of this TV program.
+         *
+         * <p>This is the promotional cost of the content. It is only used if the availability of
+         * the program is {@link #AVAILABILITY_PAID_CONTENT}.
+         *
+         * <p>Type: TEXT
+         * @see #COLUMN_STARTING_PRICE
+         */
+        public static final String COLUMN_OFFER_PRICE = "offer_price";
+
+        /**
+         * The release date of this TV program.
+         *
+         * <p>The value should be in the form of either "yyyy-MM-dd" or "yyyy".
+         *
+         * <p>Type: TEXT
+         */
+        public static final String COLUMN_RELEASE_DATE = "release_date";
+
+        /**
+         * The count of the items included in this TV program.
+         *
+         * <p>This is only relevant if the program represents a collection of items such as series,
+         * episodes, or music tracks.
+         *
+         * <p>Type: INTEGER
+         */
+        public static final String COLUMN_ITEM_COUNT = "item_count";
+
+        /**
+         * The flag indicating whether this TV program is live or not.
+         *
+         * <p>A value of 1 indicates that the content is airing and should be consumed now, a value
+         * of 0 indicates that the content is off the air and does not need to be consumed at the
+         * present time. If not specified, the value is set to 0 (not live) by default.
+         *
+         * <p>Type: INTEGER (boolean)
+         */
+        public static final String COLUMN_LIVE = "live";
+
+        /**
+         * The internal ID used by individual TV input services.
+         *
+         * <p>This is internal to the provider that inserted it, and should not be decoded by other
+         * apps.
+         *
+         * <p>Can be empty.
+         *
+         * <p>Type: TEXT
+         */
+        public static final String COLUMN_INTERNAL_PROVIDER_ID = "internal_provider_id";
+
+        /**
+         * The URI for the preview video.
+         *
+         * <p>This is only relevant to {@link Channels#TYPE_PREVIEW}. The data in the column must be
+         * a URL, or a URI in one of the following formats:
+         *
+         * <ul>
+         * <li>content ({@link android.content.ContentResolver#SCHEME_CONTENT})</li>
+         * <li>android.resource ({@link android.content.ContentResolver#SCHEME_ANDROID_RESOURCE})
+         * </li>
+         * <li>file ({@link android.content.ContentResolver#SCHEME_FILE})</li>
+         * </ul>
+         *
+         * <p>Can be empty.
+         *
+         * <p>Type: TEXT
+         */
+        public static final String COLUMN_PREVIEW_VIDEO_URI = "preview_video_uri";
+
+        /**
+         * The last playback position (in milliseconds) of the preview video.
+         *
+         * <p>This is only relevant to {@link Channels#TYPE_PREVIEW}.
+         *
+         * <p>Can be empty.
+         *
+         * <p>Type: INTEGER
+         */
+        public static final String COLUMN_LAST_PLAYBACK_POSITION_MILLIS =
+                "last_playback_position_millis";
+
+        /**
+         * The duration (in milliseconds) of the preview video.
+         *
+         * <p>This is only relevant to {@link Channels#TYPE_PREVIEW}.
+         *
+         * <p>Can be empty.
+         *
+         * <p>Type: INTEGER
+         */
+        public static final String COLUMN_DURATION_MILLIS = "duration_millis";
+
+        /**
+         * The intent URI which is launched when the preview video is selected.
+         *
+         * <p>The URI is created using {@link Intent#toUri} with {@link Intent#URI_INTENT_SCHEME}
+         * and converted back to the original intent with {@link Intent#parseUri}. The intent is
+         * launched when the user selects the preview video item.
+         *
+         * <p>Can be empty.
+         *
+         * <p>Type: TEXT
+         */
+        public static final String COLUMN_APP_LINK_INTENT_URI =
+                "app_link_intent_uri";
+
+        /**
+         * The weight of the preview program within the channel.
+         *
+         * <p>The UI may choose to show this item in a different position in the channel row.
+         * A larger weight value means the program is more important than other programs having
+         * smaller weight values. The value is relevant for the preview programs in the same
+         * channel. This is only relevant to {@link Channels#TYPE_PREVIEW}.
+         *
+         * <p>Can be empty.
+         *
+         * <p>Type: INTEGER
+         */
+        public static final String COLUMN_WEIGHT = "weight";
+
+        /**
+         * The flag indicating whether this program is transient or not.
+         *
+         * <p>A value of 1 indicates that the channel will be automatically removed by the system on
+         * reboot, and a value of 0 indicates that the channel is persistent across reboot. If not
+         * specified, this value is set to 0 (not transient) by default.
+         *
+         * <p>Type: INTEGER (boolean)
+         * @see Channels#COLUMN_TRANSIENT
+         * @hide
+         */
+        @SystemApi
+        public static final String COLUMN_TRANSIENT = "transient";
+
+        /**
+         * The type of interaction for this TV program.
+         *
+         * <p> The value should match one of the followings:
+         * {@link #INTERACTION_TYPE_LISTENS},
+         * {@link #INTERACTION_TYPE_FOLLOWERS},
+         * {@link #INTERACTION_TYPE_FANS},
+         * {@link #INTERACTION_TYPE_LIKES},
+         * {@link #INTERACTION_TYPE_THUMBS},
+         * {@link #INTERACTION_TYPE_VIEWS}, and
+         * {@link #INTERACTION_TYPE_VIEWERS}.
+         *
+         * <p>Type: TEXT
+         * @see #COLUMN_INTERACTION_COUNT
+         */
+        public static final String COLUMN_INTERACTION_TYPE = "interaction_type";
+
+        /**
+         * The interaction count for this program.
+         *
+         * <p>This indicates the number of times interaction has happened.
+         *
+         * <p>Type: INTEGER
+         * @see #COLUMN_INTERACTION_TYPE
+         */
+        public static final String COLUMN_INTERACTION_COUNT = "interaction_count";
+
+        /**
+         * The author or artist of this content.
+         *
+         * <p>Type: TEXT
+         */
+        public static final String COLUMN_AUTHOR = "author";
+
+        /**
+         * The review rating score style used for {@link #COLUMN_REVIEW_RATING}.
+         *
+         * <p> The value should match one of the followings: {@link #REVIEW_RATING_STYLE_STARS},
+         * {@link #REVIEW_RATING_STYLE_THUMBS_UP_DOWN}, and {@link #REVIEW_RATING_STYLE_PERCENTAGE}.
+         *
+         * <p>Type: TEXT
+         * @see #COLUMN_REVIEW_RATING
+         */
+        public static final String COLUMN_REVIEW_RATING_STYLE = "review_rating_style";
+
+        /**
+         * The review rating score for this program.
+         *
+         * <p>The format of the value is dependent on {@link #COLUMN_REVIEW_RATING_STYLE}. If the
+         * style is {@link #REVIEW_RATING_STYLE_STARS}, the value should be a real number between
+         * 0.0 and 5.0. (e.g. "4.5") If the style is {@link #REVIEW_RATING_STYLE_THUMBS_UP_DOWN},
+         * the value should be two integers, one for thumbs-up count and the other for thumbs-down
+         * count, with a comma between them. (e.g. "200,40") If the style is
+         * {@link #REVIEW_RATING_STYLE_PERCENTAGE}, the value shoule be a real number between 0 and
+         * 100. (e.g. "99.9")
+         *
+         * <p>Type: TEXT
+         * @see #COLUMN_REVIEW_RATING_STYLE
+         */
+        public static final String COLUMN_REVIEW_RATING = "review_rating";
+
+        /**
+         * The flag indicating whether this TV program is browsable or not.
+         *
+         * <p>This column can only be set by system apps. For other applications, it is a read-only
+         * column. Trying to modify it may cause {@link SecurityException}.
+         *
+         * <p>A value of 1 indicates that the program is browsable and can be shown to users in
+         * the UI. A value of 0 indicates that the program should be hidden from users and the
+         * application who changes this value to 0 should send
+         * {@link TvInputManager#ACTION_PROGRAM_BROWSABLE_DISABLED} to the owner of the program
+         * to notify this change.
+         *
+         * <p>This value is set to 1 (browsable) by default.
+         *
+         * <p>Type: INTEGER (boolean)
+         */
+        public static final String COLUMN_BROWSABLE = "browsable";
+
+        private PreviewPrograms() {}
+    }
+
+    /**
      * Column definitions for the TV programs that the user watched. Applications do not have access
      * to this table.
      *
diff --git a/media/java/android/media/tv/TvInputManager.java b/media/java/android/media/tv/TvInputManager.java
index b630270..4c2b031 100644
--- a/media/java/android/media/tv/TvInputManager.java
+++ b/media/java/android/media/tv/TvInputManager.java
@@ -325,23 +325,39 @@
             "android.media.tv.action.VIEW_RECORDING_SCHEDULES";
 
     /**
+     * Action sent by the system to tell the target TV input that one of its program's browsable
+     * state is disabled, i.e., it will no longer be shown to users, which, for example, might
+     * be a result of users' interaction with UI.
+     *
+     * <p>The intent must contain the following bundle parameter:
+     * <ul>
+     *     <li>{@link #EXTRA_PROGRAM_ID} the program ID as a long integer.
+     * </ul>
+     */
+    public static final String ACTION_PROGRAM_BROWSABLE_DISABLED =
+            "android.media.tv.action.PROGRAM_BROWSABLE_DISABLED";
+
+    /**
      * Action sent by an application telling the system to set the given channel as browsable.
      *
      * <p>The intent must contain the following bundle parameters:
      * <ul>
-     *     <li>{@link #EXTRA_CHANNEL_ID} then channel ID as an integer.
+     *     <li>{@link #EXTRA_CHANNEL_ID} the channel ID as a long integer.
      *     <li>{@link #EXTRA_PACKAGE_NAME} the package name of the requesting application.
      * </ul>
      */
     public static final String ACTION_MAKE_CHANNEL_BROWSABLE
             = "android.media.tv.action.MAKE_CHANNEL_BROWSABLE";
 
-    /** The key for a bundle parameter containing a channel ID as an integer */
+    /** The key for a bundle parameter containing a channel ID as a long integer */
     public static final String EXTRA_CHANNEL_ID = "android.media.tv.extra.CHANNEL_ID";
 
     /** The key for a bundle parameter containing a package name as a string. */
     public static final String EXTRA_PACKAGE_NAME = "android.media.tv.extra.PACKAGE_NAME";
 
+    /** The key for a bundle parameter containing a program ID as a long integer */
+    public static final String EXTRA_PROGRAM_ID = "android.media.tv.extra.PROGRAM_ID";
+
     private final ITvInputManager mService;
 
     private final Object mLock = new Object();
diff --git a/media/jni/android_media_MediaExtractor.cpp b/media/jni/android_media_MediaExtractor.cpp
index 4de1d00..2008f8d 100644
--- a/media/jni/android_media_MediaExtractor.cpp
+++ b/media/jni/android_media_MediaExtractor.cpp
@@ -19,6 +19,7 @@
 #include <utils/Log.h>
 
 #include "android_media_MediaExtractor.h"
+#include "android_media_MediaMetricsJNI.h"
 
 #include "android_media_Utils.h"
 #include "android_runtime/AndroidRuntime.h"
@@ -240,6 +241,13 @@
     return OK;
 }
 
+status_t JMediaExtractor::getMetrics(Parcel *reply) const {
+
+    status_t status = mImpl->getMetrics(reply);
+    return status;
+}
+
+
 status_t JMediaExtractor::getSampleMeta(sp<MetaData> *sampleMeta) {
     return mImpl->getSampleMeta(sampleMeta);
 }
@@ -767,6 +775,38 @@
     android_media_MediaExtractor_release(env, thiz);
 }
 
+static jobject
+android_media_MediaExtractor_getMetrics(JNIEnv * env, jobject thiz)
+{
+    ALOGV("android_media_MediaExtractor_getMetrics");
+
+    sp<JMediaExtractor> extractor = getMediaExtractor(env, thiz);
+    if (extractor == NULL ) {
+        jniThrowException(env, "java/lang/IllegalStateException", NULL);
+        return NULL;
+    }
+
+    // get what we have for the metrics from the codec
+    Parcel reply;
+    status_t err = extractor->getMetrics(&reply);
+    if (err != OK) {
+        ALOGE("getMetrics failed");
+        return (jobject) NULL;
+    }
+
+    // build and return the Bundle
+    MediaAnalyticsItem *item = new MediaAnalyticsItem;
+    item->readFromParcel(reply);
+    jobject mybundle = MediaMetricsJNI::writeMetricsToBundle(env, item, NULL);
+
+    // housekeeping
+    delete item;
+    item = NULL;
+
+    return mybundle;
+}
+
+
 static const JNINativeMethod gMethods[] = {
     { "release", "()V", (void *)android_media_MediaExtractor_release },
 
@@ -826,6 +866,9 @@
 
     { "hasCacheReachedEndOfStream", "()Z",
       (void *)android_media_MediaExtractor_hasCacheReachedEOS },
+
+    {"getMetrics",          "()Landroid/os/Bundle;",
+      (void *)android_media_MediaExtractor_getMetrics},
 };
 
 int register_android_media_MediaExtractor(JNIEnv *env) {
diff --git a/media/jni/android_media_MediaExtractor.h b/media/jni/android_media_MediaExtractor.h
index 9f62506..c747ef5 100644
--- a/media/jni/android_media_MediaExtractor.h
+++ b/media/jni/android_media_MediaExtractor.h
@@ -60,6 +60,7 @@
     status_t getSampleTime(int64_t *sampleTimeUs);
     status_t getSampleFlags(uint32_t *sampleFlags);
     status_t getSampleMeta(sp<MetaData> *sampleMeta);
+    status_t getMetrics(Parcel *reply) const;
 
     bool getCachedDuration(int64_t *durationUs, bool *eos) const;
 
diff --git a/media/jni/android_media_MediaPlayer.cpp b/media/jni/android_media_MediaPlayer.cpp
index 5e8135f..636727e 100644
--- a/media/jni/android_media_MediaPlayer.cpp
+++ b/media/jni/android_media_MediaPlayer.cpp
@@ -44,6 +44,7 @@
 #include "android_media_MediaMetricsJNI.h"
 #include "android_media_PlaybackParams.h"
 #include "android_media_SyncParams.h"
+#include "android_media_VolumeShaper.h"
 #include "android_media_Utils.h"
 
 #include "android_os_Parcel.h"
@@ -57,86 +58,20 @@
 #include "android_util_Binder.h"
 
 // Modular DRM begin
-#include <media/drm/DrmAPI.h>
-
 #define FIND_CLASS(var, className) \
 var = env->FindClass(className); \
 LOG_FATAL_IF(! (var), "Unable to find class " className);
 
-#define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
-var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \
-LOG_FATAL_IF(! (var), "Unable to find field " fieldName);
-
 #define GET_METHOD_ID(var, clazz, fieldName, fieldDescriptor) \
 var = env->GetMethodID(clazz, fieldName, fieldDescriptor); \
 LOG_FATAL_IF(! (var), "Unable to find method " fieldName);
 
-#define GET_STATIC_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
-var = env->GetStaticFieldID(clazz, fieldName, fieldDescriptor); \
-LOG_FATAL_IF(! (var), "Unable to find field " fieldName);
-
-
-// TODO: investigate if these can be shared with their MediaDrm counterparts
-struct RequestFields {
-    jfieldID data;
-    jfieldID defaultUrl;
-    jfieldID requestType;
-};
-
-struct HashmapFields {
-    jmethodID init;
-    jmethodID get;
-    jmethodID put;
-    jmethodID entrySet;
-};
-
-struct SetFields {
-    jmethodID iterator;
-};
-
-struct IteratorFields {
-    jmethodID next;
-    jmethodID hasNext;
-};
-
-struct EntryFields {
-    jmethodID getKey;
-    jmethodID getValue;
-};
-
-struct KeyTypes {
-    jint kKeyTypeStreaming;
-    jint kKeyTypeOffline;
-    jint kKeyTypeRelease;
-};
-
-static KeyTypes gKeyTypes;
-
-struct KeyRequestTypes {
-    jint kKeyRequestTypeInitial;
-    jint kKeyRequestTypeRenewal;
-    jint kKeyRequestTypeRelease;
-};
-
-static KeyRequestTypes gKeyRequestTypes;
-
 struct StateExceptionFields {
     jmethodID init;
     jclass classId;
 };
 
-struct drm_fields_t {
-    RequestFields keyRequest;
-    HashmapFields hashmap;
-    SetFields set;
-    IteratorFields iterator;
-    EntryFields entry;
-    StateExceptionFields stateException;
-    jclass stringClassId;
-};
-
-static drm_fields_t gFields;
-
+static StateExceptionFields gStateExceptionFields;
 // Modular DRM end
 
 // ----------------------------------------------------------------------------
@@ -160,6 +95,7 @@
 static BufferingParams::fields_t gBufferingParamsFields;
 static PlaybackParams::fields_t gPlaybackParamsFields;
 static SyncParams::fields_t gSyncParamsFields;
+static VolumeShaperHelper::fields_t gVolumeShaperFields;
 
 static Mutex sLock;
 
@@ -1039,55 +975,20 @@
     gBufferingParamsFields.init(env);
 
     // Modular DRM
-    FIND_CLASS(clazz, "android/media/MediaDrm");
-    if (clazz) {
-        jfieldID field;
-        GET_STATIC_FIELD_ID(field, clazz, "KEY_TYPE_STREAMING", "I");
-        gKeyTypes.kKeyTypeStreaming = env->GetStaticIntField(clazz, field);
-        GET_STATIC_FIELD_ID(field, clazz, "KEY_TYPE_OFFLINE", "I");
-        gKeyTypes.kKeyTypeOffline = env->GetStaticIntField(clazz, field);
-        GET_STATIC_FIELD_ID(field, clazz, "KEY_TYPE_RELEASE", "I");
-        gKeyTypes.kKeyTypeRelease = env->GetStaticIntField(clazz, field);
-
-        env->DeleteLocalRef(clazz);
-    } else {
-        ALOGE("JNI getKeyRequest android_media_MediaPlayer_native_init couldn't "
-              "get clazz android/media/MediaDrm");
-    }
-
-    FIND_CLASS(clazz, "android/media/MediaDrm$KeyRequest");
-    if (clazz) {
-        GET_FIELD_ID(gFields.keyRequest.data, clazz, "mData", "[B");
-        GET_FIELD_ID(gFields.keyRequest.defaultUrl, clazz, "mDefaultUrl", "Ljava/lang/String;");
-        GET_FIELD_ID(gFields.keyRequest.requestType, clazz, "mRequestType", "I");
-
-        jfieldID field;
-        GET_STATIC_FIELD_ID(field, clazz, "REQUEST_TYPE_INITIAL", "I");
-        gKeyRequestTypes.kKeyRequestTypeInitial = env->GetStaticIntField(clazz, field);
-        GET_STATIC_FIELD_ID(field, clazz, "REQUEST_TYPE_RENEWAL", "I");
-        gKeyRequestTypes.kKeyRequestTypeRenewal = env->GetStaticIntField(clazz, field);
-        GET_STATIC_FIELD_ID(field, clazz, "REQUEST_TYPE_RELEASE", "I");
-        gKeyRequestTypes.kKeyRequestTypeRelease = env->GetStaticIntField(clazz, field);
-
-        env->DeleteLocalRef(clazz);
-    } else {
-        ALOGE("JNI getKeyRequest android_media_MediaPlayer_native_init couldn't "
-              "get clazz android/media/MediaDrm$KeyRequest");
-    }
-
     FIND_CLASS(clazz, "android/media/MediaDrm$MediaDrmStateException");
     if (clazz) {
-        GET_METHOD_ID(gFields.stateException.init, clazz, "<init>", "(ILjava/lang/String;)V");
-        gFields.stateException.classId = static_cast<jclass>(env->NewGlobalRef(clazz));
+        GET_METHOD_ID(gStateExceptionFields.init, clazz, "<init>", "(ILjava/lang/String;)V");
+        gStateExceptionFields.classId = static_cast<jclass>(env->NewGlobalRef(clazz));
 
         env->DeleteLocalRef(clazz);
     } else {
-        ALOGE("JNI getKeyRequest android_media_MediaPlayer_native_init couldn't "
+        ALOGE("JNI android_media_MediaPlayer_native_init couldn't "
               "get clazz android/media/MediaDrm$MediaDrmStateException");
     }
 
     gPlaybackParamsFields.init(env);
     gSyncParamsFields.init(env);
+    gVolumeShaperFields.init(env);
 }
 
 static void
@@ -1259,6 +1160,51 @@
     ;
 }
 
+// Pass through the arguments to the MediaServer player implementation.
+static jint android_media_MediaPlayer_applyVolumeShaper(JNIEnv *env, jobject thiz,
+        jobject jconfig, jobject joperation) {
+    // NOTE: hard code here to prevent platform issues. Must match VolumeShaper.java
+    const int VOLUME_SHAPER_INVALID_OPERATION = -38;
+
+    sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
+    if (mp == nullptr) {
+        return (jint)VOLUME_SHAPER_INVALID_OPERATION;
+    }
+
+    sp<VolumeShaper::Configuration> configuration;
+    sp<VolumeShaper::Operation> operation;
+    if (jconfig != nullptr) {
+        configuration = VolumeShaperHelper::convertJobjectToConfiguration(
+                env, gVolumeShaperFields, jconfig);
+        ALOGV("applyVolumeShaper configuration: %s", configuration->toString().c_str());
+    }
+    if (joperation != nullptr) {
+        operation = VolumeShaperHelper::convertJobjectToOperation(
+                env, gVolumeShaperFields, joperation);
+        ALOGV("applyVolumeShaper operation: %s", operation->toString().c_str());
+    }
+    VolumeShaper::Status status = mp->applyVolumeShaper(configuration, operation);
+    if (status == INVALID_OPERATION) {
+        status = VOLUME_SHAPER_INVALID_OPERATION;
+    }
+    return (jint)status; // if status < 0 an error, else a VolumeShaper id
+}
+
+// Pass through the arguments to the MediaServer player implementation.
+static jobject android_media_MediaPlayer_getVolumeShaperState(JNIEnv *env, jobject thiz,
+        jint id) {
+    sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
+    if (mp == nullptr) {
+        return (jobject)nullptr;
+    }
+
+    sp<VolumeShaper::State> state = mp->getVolumeShaperState((int)id);
+    if (state.get() == nullptr) {
+        return (jobject)nullptr;
+    }
+    return VolumeShaperHelper::convertStateToJobject(env, gVolumeShaperFields, state);
+}
+
 /////////////////////////////////////////////////////////////////////////////////////
 // Modular DRM begin
 
@@ -1267,8 +1213,8 @@
 {
     ALOGE("Illegal DRM state exception: %s (%d)", msg, err);
 
-    jobject exception = env->NewObject(gFields.stateException.classId,
-            gFields.stateException.init, static_cast<int>(err),
+    jobject exception = env->NewObject(gStateExceptionFields.classId,
+            gStateExceptionFields.init, static_cast<int>(err),
             env->NewStringUTF(msg));
     env->Throw(static_cast<jthrowable>(exception));
 }
@@ -1345,18 +1291,6 @@
     return false;
 }
 
-// TODO: investigate if these can be shared with their MediaDrm counterparts
-static jbyteArray VectorToJByteArray(JNIEnv *env, Vector<uint8_t> const &vector)
-{
-    size_t length = vector.size();
-    jbyteArray result = env->NewByteArray(length);
-    if (result != NULL) {
-        env->SetByteArrayRegion(result, 0, length, (jbyte *)vector.array());
-    }
-    return result;
-}
-
-// TODO: investigate if these can be shared with their MediaDrm counterparts
 static Vector<uint8_t> JByteArrayToVector(JNIEnv *env, jbyteArray const &byteArray)
 {
     Vector<uint8_t> vector;
@@ -1366,74 +1300,8 @@
     return vector;
 }
 
-// TODO: investigate if these can be shared with their MediaDrm counterparts
-static String8 JStringToString8(JNIEnv *env, jstring const &jstr)
-{
-    String8 result;
-
-    const char *s = env->GetStringUTFChars(jstr, NULL);
-    if (s) {
-        result = s;
-        env->ReleaseStringUTFChars(jstr, s);
-    }
-    return result;
-}
-
-// TODO: investigate if these can be shared with their MediaDrm counterparts
-static KeyedVector<String8, String8> HashMapToKeyedVector(JNIEnv *env,
-                                             jobject &hashMap, bool* pIsOK)
-{
-    jclass clazz = gFields.stringClassId;
-    KeyedVector<String8, String8> keyedVector;
-    *pIsOK = true;
-
-    jobject entrySet = env->CallObjectMethod(hashMap, gFields.hashmap.entrySet);
-    if (entrySet) {
-        jobject iterator = env->CallObjectMethod(entrySet, gFields.set.iterator);
-        if (iterator) {
-            jboolean hasNext = env->CallBooleanMethod(iterator, gFields.iterator.hasNext);
-            while (hasNext) {
-                jobject entry = env->CallObjectMethod(iterator, gFields.iterator.next);
-                if (entry) {
-                    jobject obj = env->CallObjectMethod(entry, gFields.entry.getKey);
-                    if (obj == NULL || !env->IsInstanceOf(obj, clazz)) {
-                        jniThrowException(env, "java/lang/IllegalArgumentException",
-                                          "HashMap key is not a String");
-                        env->DeleteLocalRef(entry);
-                        *pIsOK = false;
-                        break;
-                    }
-                    jstring jkey = static_cast<jstring>(obj);
-
-                    obj = env->CallObjectMethod(entry, gFields.entry.getValue);
-                    if (obj == NULL || !env->IsInstanceOf(obj, clazz)) {
-                        jniThrowException(env, "java/lang/IllegalArgumentException",
-                                          "HashMap value is not a String");
-                        env->DeleteLocalRef(entry);
-                        *pIsOK = false;
-                        break;
-                    }
-                    jstring jvalue = static_cast<jstring>(obj);
-
-                    String8 key = JStringToString8(env, jkey);
-                    String8 value = JStringToString8(env, jvalue);
-                    keyedVector.add(key, value);
-
-                    env->DeleteLocalRef(jkey);
-                    env->DeleteLocalRef(jvalue);
-                    hasNext = env->CallBooleanMethod(iterator, gFields.iterator.hasNext);
-                }
-                env->DeleteLocalRef(entry);
-            }
-            env->DeleteLocalRef(iterator);
-        }
-        env->DeleteLocalRef(entrySet);
-    }
-    return keyedVector;
-}
-
 static void android_media_MediaPlayer_prepareDrm(JNIEnv *env, jobject thiz,
-                    jbyteArray uuidObj, jint mode)
+                    jbyteArray uuidObj, jbyteArray drmSessionIdObj)
 {
     sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
     if (mp == NULL) {
@@ -1456,13 +1324,23 @@
         return;
     }
 
-    status_t err = mp->prepareDrm(uuid.array(), mode);
+    Vector<uint8_t> drmSessionId = JByteArrayToVector(env, drmSessionIdObj);
+
+    if (drmSessionId.size() == 0) {
+        jniThrowException(
+                          env,
+                          "java/lang/IllegalArgumentException",
+                          "empty drmSessionId");
+        return;
+    }
+
+    status_t err = mp->prepareDrm(uuid.array(), drmSessionId);
     if (err != OK) {
         if (err == INVALID_OPERATION) {
             jniThrowException(
                               env,
                               "java/lang/IllegalStateException",
-                              "The player is not prepared yet.");
+                              "The player must be in prepared state.");
         } else if (err == ERROR_DRM_CANNOT_HANDLE) {
             jniThrowException(
                               env,
@@ -1488,211 +1366,10 @@
             jniThrowException(
                               env,
                               "java/lang/IllegalStateException",
-                              "The player is not prepared yet.");
+                              "Can not release DRM in an active player state.");
         }
     }
 }
-
-static jobject android_media_MediaPlayer_getKeyRequest(JNIEnv *env, jobject thiz, jbyteArray jscope,
-                       jstring jmimeType, jint jkeyType, jobject joptParams)
-{
-    sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
-    if (mp == NULL) {
-        jniThrowException(env, "java/lang/IllegalStateException", NULL);
-        return NULL;
-    }
-
-    Vector<uint8_t> scope;
-    if (jscope != NULL) {
-        scope = JByteArrayToVector(env, jscope);
-    }
-
-    String8 mimeType;
-    if (jmimeType != NULL) {
-        mimeType = JStringToString8(env, jmimeType);
-    }
-
-    DrmPlugin::KeyType keyType;
-    if (jkeyType == gKeyTypes.kKeyTypeStreaming) {
-        keyType = DrmPlugin::kKeyType_Streaming;
-    } else if (jkeyType == gKeyTypes.kKeyTypeOffline) {
-        keyType = DrmPlugin::kKeyType_Offline;
-    } else if (jkeyType == gKeyTypes.kKeyTypeRelease) {
-        keyType = DrmPlugin::kKeyType_Release;
-    } else {
-        jniThrowException(env, "java/lang/IllegalArgumentException", "invalid keyType");
-        return NULL;
-    }
-
-    KeyedVector<String8, String8> optParams;
-    if (joptParams != NULL) {
-        bool isOK;
-        optParams = HashMapToKeyedVector(env, joptParams, &isOK);
-        if (!isOK) {
-            return NULL;
-        }
-    }
-
-    Vector<uint8_t> request;
-    String8 defaultUrl;
-    DrmPlugin::KeyRequestType keyRequestType;
-    status_t err = mp->getKeyRequest(scope, mimeType, keyType, optParams, request, defaultUrl,
-                           keyRequestType);
-
-    if (throwDrmExceptionAsNecessary(env, err, "Failed to get key request")) {
-        return NULL;
-    }
-
-    ALOGV("JNI getKeyRequest err %d  request %d  url %s  keyReqType %d",
-          err, (int)request.size(), defaultUrl.string(), (int)keyRequestType);
-
-    // Fill out return obj
-    jclass clazz;
-    FIND_CLASS(clazz, "android/media/MediaDrm$KeyRequest");
-
-    jobject keyObj = NULL;
-
-    if (clazz) {
-        keyObj = env->AllocObject(clazz);
-        jbyteArray jrequest = VectorToJByteArray(env, request);
-        env->SetObjectField(keyObj, gFields.keyRequest.data, jrequest);
-
-        jstring jdefaultUrl = env->NewStringUTF(defaultUrl.string());
-        env->SetObjectField(keyObj, gFields.keyRequest.defaultUrl, jdefaultUrl);
-
-        switch (keyRequestType) {
-        case DrmPlugin::kKeyRequestType_Initial:
-            env->SetIntField(keyObj, gFields.keyRequest.requestType,
-                         gKeyRequestTypes.kKeyRequestTypeInitial);
-            break;
-        case DrmPlugin::kKeyRequestType_Renewal:
-            env->SetIntField(keyObj, gFields.keyRequest.requestType,
-                         gKeyRequestTypes.kKeyRequestTypeRenewal);
-            break;
-        case DrmPlugin::kKeyRequestType_Release:
-            env->SetIntField(keyObj, gFields.keyRequest.requestType,
-                         gKeyRequestTypes.kKeyRequestTypeRelease);
-            break;
-        default:
-            throwDrmStateException(env, "MediaPlayer/DRM plugin failure: unknown "
-                    "key request type", ERROR_DRM_UNKNOWN);
-            break;
-        }
-    }
-
-    return keyObj;
-}
-
-static jbyteArray android_media_MediaPlayer_provideKeyResponse(JNIEnv *env, jobject thiz,
-                          jbyteArray jreleaseKeySetId, jbyteArray jresponse)
-{
-    sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
-    if (mp == NULL ) {
-        jniThrowException(env, "java/lang/IllegalStateException", NULL);
-        return NULL;
-    }
-
-    if (jresponse == NULL) {
-        jniThrowException(env, "java/lang/IllegalArgumentException", "key response is null");
-        return NULL;
-    }
-
-    Vector<uint8_t> releaseKeySetId;
-    if (jreleaseKeySetId != NULL) {
-        releaseKeySetId = JByteArrayToVector(env, jreleaseKeySetId);
-    }
-
-    Vector<uint8_t> response(JByteArrayToVector(env, jresponse));
-    Vector<uint8_t> keySetId;
-
-    status_t err = mp->provideKeyResponse(releaseKeySetId, response, keySetId);
-
-    if (throwDrmExceptionAsNecessary(env, err, "Failed to handle key response")) {
-        return NULL;
-    }
-    return VectorToJByteArray(env, keySetId);
-}
-
-static void android_media_MediaPlayer_restoreKeys(JNIEnv *env, jobject thiz, jbyteArray jkeySetId)
-{
-     sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
-     if (mp == NULL) {
-         jniThrowException(env, "java/lang/IllegalStateException", NULL);
-         return;
-     }
-
-    if (jkeySetId == NULL) {
-        jniThrowException(env, "java/lang/IllegalArgumentException", "invalid keyType");
-        return;
-    }
-
-    Vector<uint8_t> keySetId;
-    keySetId = JByteArrayToVector(env, jkeySetId);
-
-    status_t err = mp->restoreKeys(keySetId);
-
-    ALOGV("JNI restoreKeys err %d ", err);
-    throwDrmExceptionAsNecessary(env, err, "Failed to restore keys");
-}
-
-static jstring android_media_MediaPlayer_getDrmPropertyString(JNIEnv *env, jobject thiz,
-                       jstring jname)
-{
-    sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
-    if (mp == NULL) {
-        jniThrowException(env, "java/lang/IllegalStateException", NULL);
-        return NULL;
-    }
-
-    if (jname == NULL) {
-        jniThrowException(env, "java/lang/IllegalArgumentException",
-                "property name String is null");
-        return NULL;
-    }
-
-    String8 name = JStringToString8(env, jname);
-    String8 value;
-
-    status_t err = mp->getDrmPropertyString(name, value);
-
-    ALOGV("JNI getPropertyString err %d", err);
-
-    if (throwDrmExceptionAsNecessary(env, err, "Failed to get property")) {
-        return NULL;
-    }
-
-    return env->NewStringUTF(value.string());
-}
-
-static void android_media_MediaPlayer_setDrmPropertyString(JNIEnv *env, jobject thiz,
-                    jstring jname, jstring jvalue)
-{
-    sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
-    if (mp == NULL) {
-        jniThrowException(env, "java/lang/IllegalStateException", NULL);
-        return;
-    }
-
-    if (jname == NULL) {
-        jniThrowException(env, "java/lang/IllegalArgumentException",
-                "property name String is null");
-        return;
-    }
-
-    if (jvalue == NULL) {
-        jniThrowException(env, "java/lang/IllegalArgumentException",
-                "property value String is null");
-        return;
-    }
-
-    String8 name = JStringToString8(env, jname);
-    String8 value = JStringToString8(env, jvalue);
-
-    status_t err = mp->setDrmPropertyString(name, value);
-
-    ALOGV("JNI setPropertyString err %d", err);
-    throwDrmExceptionAsNecessary(env, err, "Failed to set property");
-}
 // Modular DRM end
 // ----------------------------------------------------------------------------
 
@@ -1747,15 +1424,15 @@
     {"native_pullBatteryData", "(Landroid/os/Parcel;)I",        (void *)android_media_MediaPlayer_pullBatteryData},
     {"native_setRetransmitEndpoint", "(Ljava/lang/String;I)I",  (void *)android_media_MediaPlayer_setRetransmitEndpoint},
     {"setNextMediaPlayer",  "(Landroid/media/MediaPlayer;)V",   (void *)android_media_MediaPlayer_setNextMediaPlayer},
+    {"native_applyVolumeShaper",
+                            "(Landroid/media/VolumeShaper$Configuration;Landroid/media/VolumeShaper$Operation;)I",
+                                                                (void *)android_media_MediaPlayer_applyVolumeShaper},
+    {"native_getVolumeShaperState",
+                            "(I)Landroid/media/VolumeShaper$State;",
+                                                                (void *)android_media_MediaPlayer_getVolumeShaperState},
     // Modular DRM
-    { "_prepareDrm", "([BI)V",                                  (void *)android_media_MediaPlayer_prepareDrm },
+    { "_prepareDrm", "([B[B)V",                                 (void *)android_media_MediaPlayer_prepareDrm },
     { "_releaseDrm", "()V",                                     (void *)android_media_MediaPlayer_releaseDrm },
-    { "_getKeyRequest", "([BLjava/lang/String;ILjava/util/Map;)" "Landroid/media/MediaDrm$KeyRequest;",
-        (void *)android_media_MediaPlayer_getKeyRequest },
-    { "_provideKeyResponse", "([B[B)[B",                        (void *)android_media_MediaPlayer_provideKeyResponse },
-    { "_getDrmPropertyString", "(Ljava/lang/String;)Ljava/lang/String;", (void *)android_media_MediaPlayer_getDrmPropertyString },
-    { "_setDrmPropertyString", "(Ljava/lang/String;Ljava/lang/String;)V",(void *)android_media_MediaPlayer_setDrmPropertyString },
-    { "_restoreKeys", "([B)V",                                  (void *)android_media_MediaPlayer_restoreKeys },
 };
 
 // This function only registers the native methods
diff --git a/media/jni/android_media_VolumeShaper.h b/media/jni/android_media_VolumeShaper.h
new file mode 100644
index 0000000..dbbc478
--- /dev/null
+++ b/media/jni/android_media_VolumeShaper.h
@@ -0,0 +1,221 @@
+/*
+ * Copyright 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.
+ */
+
+#ifndef _ANDROID_MEDIA_VOLUME_SHAPER_H_
+#define _ANDROID_MEDIA_VOLUME_SHAPER_H_
+
+#include <media/VolumeShaper.h>
+
+namespace android {
+
+// This entire class is inline as it is used from both core and media
+struct VolumeShaperHelper {
+    struct fields_t {
+        // VolumeShaper.Configuration
+        jclass    coClazz;
+        jmethodID coConstructId;
+        jfieldID  coTypeId;
+        jfieldID  coIdId;
+        jfieldID  coInterpolatorTypeId;
+        jfieldID  coOptionFlagsId;
+        jfieldID  coDurationMsId;
+        jfieldID  coTimesId;
+        jfieldID  coVolumesId;
+
+        // VolumeShaper.Operation
+        jclass    opClazz;
+        jmethodID opConstructId;
+        jfieldID  opFlagsId;
+        jfieldID  opReplaceIdId;
+
+        // VolumeShaper.State
+        jclass    stClazz;
+        jmethodID stConstructId;
+        jfieldID  stVolumeId;
+        jfieldID  stXOffsetId;
+
+        void init(JNIEnv *env) {
+            jclass lclazz = env->FindClass("android/media/VolumeShaper$Configuration");
+            if (lclazz == nullptr) {
+                return;
+            }
+            coClazz = (jclass)env->NewGlobalRef(lclazz);
+            if (coClazz == nullptr) {
+                return;
+            }
+            coConstructId = env->GetMethodID(coClazz, "<init>", "(IIIID[F[F)V");
+            coTypeId = env->GetFieldID(coClazz, "mType", "I");
+            coIdId = env->GetFieldID(coClazz, "mId", "I");
+            coInterpolatorTypeId = env->GetFieldID(coClazz, "mInterpolatorType", "I");
+            coOptionFlagsId = env->GetFieldID(coClazz, "mOptionFlags", "I");
+            coDurationMsId = env->GetFieldID(coClazz, "mDurationMs", "D");
+            coTimesId = env->GetFieldID(coClazz, "mTimes", "[F");
+            coVolumesId = env->GetFieldID(coClazz, "mVolumes", "[F");
+            env->DeleteLocalRef(lclazz);
+
+            lclazz = env->FindClass("android/media/VolumeShaper$Operation");
+            if (lclazz == nullptr) {
+                return;
+            }
+            opClazz = (jclass)env->NewGlobalRef(lclazz);
+            if (opClazz == nullptr) {
+                return;
+            }
+            opConstructId = env->GetMethodID(opClazz, "<init>", "(II)V");
+            opFlagsId = env->GetFieldID(opClazz, "mFlags", "I");
+            opReplaceIdId = env->GetFieldID(opClazz, "mReplaceId", "I");
+            env->DeleteLocalRef(lclazz);
+
+            lclazz = env->FindClass("android/media/VolumeShaper$State");
+            if (lclazz == nullptr) {
+                return;
+            }
+            stClazz = (jclass)env->NewGlobalRef(lclazz);
+            if (stClazz == nullptr) {
+                return;
+            }
+            stConstructId = env->GetMethodID(stClazz, "<init>", "(FF)V");
+            stVolumeId = env->GetFieldID(stClazz, "mVolume", "F");
+            stXOffsetId = env->GetFieldID(stClazz, "mXOffset", "F");
+            env->DeleteLocalRef(lclazz);
+        }
+
+        void exit(JNIEnv *env) {
+            env->DeleteGlobalRef(coClazz);
+            coClazz = nullptr;
+        }
+    };
+
+    static sp<VolumeShaper::Configuration> convertJobjectToConfiguration(
+            JNIEnv *env, const fields_t &fields, jobject jshaper) {
+        sp<VolumeShaper::Configuration> configuration = new VolumeShaper::Configuration();
+
+        configuration->setType(
+            (VolumeShaper::Configuration::Type)env->GetIntField(jshaper, fields.coTypeId));
+        configuration->setId(
+            (int)env->GetIntField(jshaper, fields.coIdId));
+        if (configuration->getType() == VolumeShaper::Configuration::TYPE_SCALE) {
+            configuration->setInterpolatorType(
+                (VolumeShaper::Configuration::InterpolatorType)
+                env->GetIntField(jshaper, fields.coInterpolatorTypeId));
+            configuration->setOptionFlags(
+                (VolumeShaper::Configuration::OptionFlag)
+                env->GetIntField(jshaper, fields.coOptionFlagsId));
+            configuration->setDurationMs(
+                    (double)env->GetDoubleField(jshaper, fields.coDurationMsId));
+
+            // convert point arrays
+            jobject xobj = env->GetObjectField(jshaper, fields.coTimesId);
+            jfloatArray *xarray = reinterpret_cast<jfloatArray*>(&xobj);
+            jsize xlen = env->GetArrayLength(*xarray);
+            /* const */ float * const x =
+                    env->GetFloatArrayElements(*xarray, nullptr /* isCopy */);
+            jobject yobj = env->GetObjectField(jshaper, fields.coVolumesId);
+            jfloatArray *yarray = reinterpret_cast<jfloatArray*>(&yobj);
+            jsize ylen = env->GetArrayLength(*yarray);
+            /* const */ float * const y =
+                    env->GetFloatArrayElements(*yarray, nullptr /* isCopy */);
+            if (xlen != ylen) {
+                ALOGE("array size must match");
+                return nullptr;
+            }
+            for (jsize i = 0; i < xlen; ++i) {
+                configuration->emplace(x[i], y[i]);
+            }
+            env->ReleaseFloatArrayElements(*xarray, x, JNI_ABORT); // no need to copy back
+            env->ReleaseFloatArrayElements(*yarray, y, JNI_ABORT);
+        }
+        return configuration;
+    }
+
+    static jobject convertVolumeShaperToJobject(
+            JNIEnv *env, const fields_t &fields,
+            const sp<VolumeShaper::Configuration> &configuration) {
+        jfloatArray xarray = nullptr;
+        jfloatArray yarray = nullptr;
+        if (configuration->getType() == VolumeShaper::Configuration::TYPE_SCALE) {
+            // convert curve arrays
+            jfloatArray xarray = env->NewFloatArray(configuration->size());
+            jfloatArray yarray = env->NewFloatArray(configuration->size());
+            float * const x = env->GetFloatArrayElements(xarray, nullptr /* isCopy */);
+            float * const y = env->GetFloatArrayElements(yarray, nullptr /* isCopy */);
+            float *xptr = x, *yptr = y;
+            for (const auto &pt : *configuration.get()) {
+                *xptr++ = pt.first;
+                *yptr++ = pt.second;
+            }
+            env->ReleaseFloatArrayElements(xarray, x, 0 /* mode */);
+            env->ReleaseFloatArrayElements(yarray, y, 0 /* mode */);
+        }
+
+        // prepare constructor args
+        jvalue args[7];
+        args[0].i = (jint)configuration->getType();
+        args[1].i = (jint)configuration->getId();
+        args[2].i = (jint)configuration->getInterpolatorType();
+        args[3].i = (jint)configuration->getOptionFlags();
+        args[4].d = (jdouble)configuration->getDurationMs();
+        args[5].l = xarray;
+        args[6].l = yarray;
+        jobject jshaper = env->NewObjectA(fields.coClazz, fields.coConstructId, args);
+        return jshaper;
+    }
+
+    static sp<VolumeShaper::Operation> convertJobjectToOperation(
+            JNIEnv *env, const fields_t &fields, jobject joperation) {
+        VolumeShaper::Operation::Flag flags =
+            (VolumeShaper::Operation::Flag)env->GetIntField(joperation, fields.opFlagsId);
+        int replaceId = env->GetIntField(joperation, fields.opReplaceIdId);
+
+        sp<VolumeShaper::Operation> operation = new VolumeShaper::Operation(flags, replaceId);
+        return operation;
+    }
+
+    static jobject convertOperationToJobject(
+            JNIEnv *env, const fields_t &fields, const sp<VolumeShaper::Operation> &operation) {
+        // prepare constructor args
+        jvalue args[2];
+        args[0].i = (jint)operation->getFlags();
+        args[1].i = (jint)operation->getReplaceId();
+
+        jobject joperation = env->NewObjectA(fields.opClazz, fields.opConstructId, args);
+        return joperation;
+    }
+
+    static sp<VolumeShaper::State> convertJobjectToState(
+            JNIEnv *env, const fields_t &fields, jobject jstate) {
+        float volume = env->GetFloatField(jstate, fields.stVolumeId);
+        float xOffset = env->GetFloatField(jstate, fields.stXOffsetId);
+
+        sp<VolumeShaper::State> state = new VolumeShaper::State(volume, xOffset);
+        return state;
+    }
+
+    static jobject convertStateToJobject(
+            JNIEnv *env, const fields_t &fields, const sp<VolumeShaper::State> &state) {
+        // prepare constructor args
+        jvalue args[2];
+        args[0].f = (jfloat)state->getVolume();
+        args[1].f = (jfloat)state->getXOffset();
+
+        jobject jstate = env->NewObjectA(fields.stClazz, fields.stConstructId, args);
+        return jstate;
+    }
+};
+
+}  // namespace android
+
+#endif // _ANDROID_MEDIA_VOLUME_SHAPER_H_
diff --git a/native/android/Android.mk b/native/android/Android.mk
index 355f52e..f8405ef 100644
--- a/native/android/Android.mk
+++ b/native/android/Android.mk
@@ -1,6 +1,8 @@
 BASE_PATH := $(call my-dir)
 LOCAL_PATH:= $(call my-dir)
 
+common_cflags := -Wall -Werror -Wunused -Wunreachable-code
+
 include $(CLEAR_VARS)
 
 # our source files
@@ -10,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 \
@@ -43,6 +47,23 @@
 
 LOCAL_MODULE := libandroid
 
-LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
+LOCAL_CFLAGS += $(common_cflags)
+
+include $(BUILD_SHARED_LIBRARY)
+
+# Network library.
+include $(CLEAR_VARS)
+LOCAL_MODULE := libandroid_net
+LOCAL_CFLAGS := $(common_cflags)
+LOCAL_SRC_FILES:= \
+    net.c \
+
+LOCAL_SHARED_LIBRARIES := \
+    libnetd_client \
+
+LOCAL_C_INCLUDES += \
+    frameworks/base/native/include \
+    bionic/libc/dns/include \
+    system/netd/include \
 
 include $(BUILD_SHARED_LIBRARY)
diff --git a/native/android/hardware_buffer.cpp b/native/android/hardware_buffer.cpp
index 2f75c10..77ebd52 100644
--- a/native/android/hardware_buffer.cpp
+++ b/native/android/hardware_buffer.cpp
@@ -16,23 +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 <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 <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
 
@@ -96,10 +98,14 @@
     }
 
     status_t err;
-    uint32_t usage = android_hardware_HardwareBuffer_convertToGrallocUsageBits(
-            desc->usage0, desc->usage1);
+    uint64_t producerUsage = 0;
+    uint64_t consumerUsage = 0;
+    android_hardware_HardwareBuffer_convertToGrallocUsageBits(desc->usage0,
+            desc->usage1, &producerUsage, &consumerUsage);
     sp<GraphicBuffer> gbuffer = allocator->createGraphicBuffer(desc->width,
-            desc->height, format, desc->layers, usage, &err);
+            desc->height, format, desc->layers, producerUsage, consumerUsage,
+            std::string("AHardwareBuffer pid [") + std::to_string(getpid()) +
+            "]", &err);
     if (err != NO_ERROR) {
         return err;
     }
@@ -131,7 +137,7 @@
     outDesc->layers = gbuffer->getLayerCount();
     outDesc->usage0 =
             android_hardware_HardwareBuffer_convertFromGrallocUsageBits(
-                    gbuffer->getUsage());
+                    gbuffer->getUsage(), gbuffer->getUsage());
     outDesc->usage1 = 0;
     outDesc->format = android_hardware_HardwareBuffer_convertFromPixelFormat(
             static_cast<uint32_t>(gbuffer->getPixelFormat()));
@@ -148,15 +154,19 @@
         return BAD_VALUE;
     }
 
-    uint32_t usage = android_hardware_HardwareBuffer_convertToGrallocUsageBits(
-            usage0, 0);
+    uint64_t producerUsage = 0;
+    uint64_t consumerUsage = 0;
+    android_hardware_HardwareBuffer_convertToGrallocUsageBits(usage0, 0,
+            &producerUsage, &consumerUsage);
     GraphicBuffer* gBuffer = AHardwareBuffer_to_GraphicBuffer(buffer);
+    Rect bounds;
     if (!rect) {
-        return gBuffer->lockAsync(usage, outVirtualAddress, fence);
+        bounds.set(Rect(gBuffer->getWidth(), gBuffer->getHeight()));
     } else {
-        Rect bounds(rect->left, rect->top, rect->right, rect->bottom);
-        return gBuffer->lockAsync(usage, bounds, outVirtualAddress, fence);
+        bounds.set(Rect(rect->left, rect->top, rect->right, rect->bottom));
     }
+    return gBuffer->lockAsync(producerUsage, consumerUsage, bounds,
+            outVirtualAddress, fence);
 }
 
 int AHardwareBuffer_unlock(AHardwareBuffer* buffer, int32_t* fence) {
@@ -290,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/obex/javax/obex/ServerSession.java b/obex/javax/obex/ServerSession.java
index acee5dd..3831cf7 100644
--- a/obex/javax/obex/ServerSession.java
+++ b/obex/javax/obex/ServerSession.java
@@ -658,6 +658,11 @@
          */
         byte[] sendData = new byte[totalLength];
         int maxRxLength = ObexHelper.getMaxRxPacketSize(mTransport);
+        if (maxRxLength > mMaxPacketLength) {
+            if(V) Log.v(TAG,"Set maxRxLength to min of maxRxServrLen:" + maxRxLength +
+                    " and MaxNegotiated from Client: " + mMaxPacketLength);
+            maxRxLength = mMaxPacketLength;
+        }
         sendData[0] = (byte)code;
         sendData[1] = length[2];
         sendData[2] = length[3];
diff --git a/opengl/java/android/opengl/GLU.java b/opengl/java/android/opengl/GLU.java
index ed64556..ef9bf167 100644
--- a/opengl/java/android/opengl/GLU.java
+++ b/opengl/java/android/opengl/GLU.java
@@ -203,8 +203,8 @@
      * @param view the current view, {x, y, width, height}
      * @param viewOffset the offset into the view array where the view vector
      *        data starts.
-     * @param obj the output vector {objX, objY, objZ}, that returns the
-     *        computed object coordinates.
+     * @param obj the output vector {objX, objY, objZ, objW}, that returns the
+     *        computed homogeneous object coordinates.
      * @param objOffset the offset into the obj array where the obj vector data
      *        starts.
      * @return A return value of GL10.GL_TRUE indicates success, a return value
diff --git a/packages/Keyguard/test/Android.mk b/packages/CompanionDeviceManager/Android.mk
similarity index 70%
rename from packages/Keyguard/test/Android.mk
rename to packages/CompanionDeviceManager/Android.mk
index 54224b7..f730356 100644
--- a/packages/Keyguard/test/Android.mk
+++ b/packages/CompanionDeviceManager/Android.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2013 The Android Open Source Project
+# 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.
@@ -11,21 +11,17 @@
 # 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_MODULE_TAGS := optional
 
 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
+LOCAL_PACKAGE_NAME := CompanionDeviceManager
 
 include $(BUILD_PACKAGE)
+
+include $(call all-makefiles-under, $(LOCAL_PATH))
diff --git a/packages/CompanionDeviceManager/AndroidManifest.xml b/packages/CompanionDeviceManager/AndroidManifest.xml
new file mode 100644
index 0000000..65cac09
--- /dev/null
+++ b/packages/CompanionDeviceManager/AndroidManifest.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright (c) 2017 Google Inc.
+ *
+ * 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.companiondevicemanager">
+
+    <permission
+        android:name="com.android.companiondevicemanager.permission.BIND"
+        android:protectionLevel="signature" />
+
+    <uses-permission android:name="android.permission.BLUETOOTH"/>
+    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
+    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
+
+    <application
+        android:allowClearUserData="true"
+        android:label="@string/app_label"
+        android:allowBackup="false"
+        android:supportsRtl="true">
+
+        <service
+            android:name=".DeviceDiscoveryService"
+            android:permission="android.permission.BIND_COMPANION_DEVICE_MANAGER_SERVICE"
+            android:exported="true">
+        </service>
+
+        <activity
+            android:name=".DeviceChooserActivity"
+            android:theme="@style/ChooserActivity"
+            android:permission="android.permission.BIND_COMPANION_DEVICE_MANAGER_SERVICE">
+            <!--TODO include url scheme filter similar to PrintSpooler -->
+            <intent-filter>
+                <action android:name="android.companiondevice.START_DISCOVERY" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
+
+    </application>
+
+</manifest>
diff --git a/packages/CompanionDeviceManager/MODULE_LICENSE_APACHE2 b/packages/CompanionDeviceManager/MODULE_LICENSE_APACHE2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/CompanionDeviceManager/MODULE_LICENSE_APACHE2
diff --git a/packages/CompanionDeviceManager/NOTICE b/packages/CompanionDeviceManager/NOTICE
new file mode 100644
index 0000000..c5b1efa
--- /dev/null
+++ b/packages/CompanionDeviceManager/NOTICE
@@ -0,0 +1,190 @@
+
+   Copyright (c) 2005-2008, 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.
+
+   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.
+
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
diff --git a/core/res/res/values-ldrtl/dimens.xml b/packages/CompanionDeviceManager/res/drawable/dialog_background.xml
similarity index 67%
copy from core/res/res/values-ldrtl/dimens.xml
copy to packages/CompanionDeviceManager/res/drawable/dialog_background.xml
index 807c042..af2c83f 100644
--- a/core/res/res/values-ldrtl/dimens.xml
+++ b/packages/CompanionDeviceManager/res/drawable/dialog_background.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!-- 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.
@@ -14,7 +14,9 @@
      limitations under the License.
 -->
 
-<resources>
-    <item type="dimen" format="integer" name="time_picker_column_start_material">1</item>
-    <item type="dimen" format="integer" name="time_picker_column_end_material">0</item>
-</resources>
+<inset xmlns:android="http://schemas.android.com/apk/res/android">
+    <shape android:shape="rectangle">
+        <corners android:radius="2dp" />
+        <solid android:color="?android:attr/colorBackground" />
+    </shape>
+</inset>
diff --git a/packages/CompanionDeviceManager/res/layout/buttons.xml b/packages/CompanionDeviceManager/res/layout/buttons.xml
new file mode 100644
index 0000000..350a791
--- /dev/null
+++ b/packages/CompanionDeviceManager/res/layout/buttons.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/buttons"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="horizontal"
+    android:layout_alignParentBottom="true"
+    android:layout_alignParentEnd="true"
+    android:gravity="end"
+>
+    <Button
+        android:id="@+id/button_cancel"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/cancel"
+        style="@android:style/Widget.Material.Light.Button.Borderless.Colored"
+    />
+    <Button
+        android:id="@+id/button_pair"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/pair"
+        style="@android:style/Widget.Material.Light.Button.Borderless.Colored"
+    />
+</LinearLayout>
\ No newline at end of file
diff --git a/packages/CompanionDeviceManager/res/layout/device_chooser.xml b/packages/CompanionDeviceManager/res/layout/device_chooser.xml
new file mode 100644
index 0000000..88de33f
--- /dev/null
+++ b/packages/CompanionDeviceManager/res/layout/device_chooser.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<RelativeLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/container"
+    android:layout_height="400dp"
+    style="@style/ContainerLayout"
+    >
+
+    <include layout="@layout/title" />
+
+    <ListView
+        android:id="@+id/device_list"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_below="@+id/title"
+        android:layout_above="@+id/buttons"
+        style="@android:style/Widget.Material.Light.ListView"
+    />
+
+    <include layout="@layout/buttons" />
+
+</RelativeLayout>
\ No newline at end of file
diff --git a/core/res/res/values-ldrtl/dimens.xml b/packages/CompanionDeviceManager/res/layout/device_confirmation.xml
similarity index 63%
copy from core/res/res/values-ldrtl/dimens.xml
copy to packages/CompanionDeviceManager/res/layout/device_confirmation.xml
index 807c042..7cde41a 100644
--- a/core/res/res/values-ldrtl/dimens.xml
+++ b/packages/CompanionDeviceManager/res/layout/device_confirmation.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!-- 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.
@@ -14,7 +14,15 @@
      limitations under the License.
 -->
 
-<resources>
-    <item type="dimen" format="integer" name="time_picker_column_start_material">1</item>
-    <item type="dimen" format="integer" name="time_picker_column_end_material">0</item>
-</resources>
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/container"
+    android:layout_height="wrap_content"
+    style="@style/ContainerLayout"
+    >
+
+    <include layout="@layout/title" />
+
+    <include layout="@layout/buttons" />
+
+</LinearLayout>
\ No newline at end of file
diff --git a/core/res/res/values-ldrtl/dimens.xml b/packages/CompanionDeviceManager/res/layout/title.xml
similarity index 63%
copy from core/res/res/values-ldrtl/dimens.xml
copy to packages/CompanionDeviceManager/res/layout/title.xml
index 807c042..dfa71e2 100644
--- a/core/res/res/values-ldrtl/dimens.xml
+++ b/packages/CompanionDeviceManager/res/layout/title.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!-- 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.
@@ -14,7 +14,12 @@
      limitations under the License.
 -->
 
-<resources>
-    <item type="dimen" format="integer" name="time_picker_column_start_material">1</item>
-    <item type="dimen" format="integer" name="time_picker_column_end_material">0</item>
-</resources>
+
+<TextView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/title"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:textColor="@android:color/black"
+    style="@*android:style/TextAppearance.Widget.Toolbar.Title"
+/>
\ No newline at end of file
diff --git a/packages/CompanionDeviceManager/res/values/dimens.xml b/packages/CompanionDeviceManager/res/values/dimens.xml
new file mode 100644
index 0000000..da7b0d1
--- /dev/null
+++ b/packages/CompanionDeviceManager/res/values/dimens.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+    <!--  Padding applied on most UI elements  -->
+    <dimen name="padding">12dp</dimen>
+
+</resources>
\ No newline at end of file
diff --git a/packages/CompanionDeviceManager/res/values/strings.xml b/packages/CompanionDeviceManager/res/values/strings.xml
new file mode 100644
index 0000000..469c1fb
--- /dev/null
+++ b/packages/CompanionDeviceManager/res/values/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+    <!-- Title of the CompanionDeviceManager application. [CHAR LIMIT=50] -->
+    <string name="app_label">Companion Device Manager</string>
+
+    <!-- Title of the device selection dialog. -->
+    <string name="chooser_title">Pair with &lt;strong&gt;<xliff:g id="app_name" example="Android Wear">%1$s</xliff:g>&lt;/strong&gt; via Bluetooth?</string>
+
+    <!-- Title of the device pairing confirmation dialog. -->
+    <string name="confirmation_title">Pair &lt;strong&gt;<xliff:g id="app_name" example="Android Wear">%1$s</xliff:g>&lt;/strong&gt; with &lt;strong&gt;<xliff:g id="device_name" example="ASUS ZenWatch 2">%2$s</xliff:g>&lt;/strong&gt; via Bluetooth?</string>
+
+    <!-- Label on the pair button in a companion device chooser/confirmation dialog -->
+    <string name="pair">Pair</string>
+
+    <!-- Label on the cancel button in a companion device chooser/confirmation dialog -->
+    <string name="cancel">Cancel</string>
+
+</resources>
diff --git a/packages/CompanionDeviceManager/res/values/styles.xml b/packages/CompanionDeviceManager/res/values/styles.xml
new file mode 100644
index 0000000..9dced47b
--- /dev/null
+++ b/packages/CompanionDeviceManager/res/values/styles.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<resources>
+    <style name="ContainerLayout">
+        <item name="android:orientation">vertical</item>
+        <item name="android:layout_width">match_parent</item>
+        <item name="android:elevation">16dp</item>
+        <item name="android:background">@drawable/dialog_background</item>
+        <item name="android:paddingTop">18dip</item>
+        <item name="android:paddingStart">20dip</item>
+        <item name="android:paddingEnd">16dip</item>
+        <item name="android:paddingBottom">16dip</item>
+        <item name="android:layout_gravity">center</item>
+    </style>
+</resources>
\ No newline at end of file
diff --git a/core/res/res/values-ldrtl/dimens.xml b/packages/CompanionDeviceManager/res/values/themes.xml
similarity index 61%
copy from core/res/res/values-ldrtl/dimens.xml
copy to packages/CompanionDeviceManager/res/values/themes.xml
index 807c042..e3fc67c 100644
--- a/core/res/res/values-ldrtl/dimens.xml
+++ b/packages/CompanionDeviceManager/res/values/themes.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!-- 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.
@@ -15,6 +15,12 @@
 -->
 
 <resources>
-    <item type="dimen" format="integer" name="time_picker_column_start_material">1</item>
-    <item type="dimen" format="integer" name="time_picker_column_end_material">0</item>
+
+    <style name="ChooserActivity"
+           parent="@android:style/Theme.DeviceDefault.Light.Dialog.NoActionBar">
+        <item name="*android:windowFixedHeightMajor">100%</item>
+        <item name="*android:windowFixedHeightMinor">100%</item>
+        <item name="android:windowBackground">@android:color/transparent</item>
+    </style>
+
 </resources>
diff --git a/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/DeviceChooserActivity.java b/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/DeviceChooserActivity.java
new file mode 100644
index 0000000..25127ef
--- /dev/null
+++ b/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/DeviceChooserActivity.java
@@ -0,0 +1,136 @@
+/*
+ * 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.companiondevicemanager;
+
+import static android.companion.BluetoothDeviceFilterUtils.getDeviceDisplayName;
+
+import android.app.Activity;
+import android.bluetooth.BluetoothDevice;
+import android.companion.CompanionDeviceManager;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.content.res.Resources;
+import android.database.DataSetObserver;
+import android.os.Bundle;
+import android.text.Html;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.View;
+import android.widget.ListView;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+
+public class DeviceChooserActivity extends Activity {
+
+    private static final boolean DEBUG = false;
+    private static final String LOG_TAG = "DeviceChooserActivity";
+
+    private ListView mDeviceListView;
+    private View mPairButton;
+    private View mCancelButton;
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        if (DEBUG) Log.i(LOG_TAG, "Started with intent " + getIntent());
+
+        if (getService().mDevicesFound.isEmpty()) {
+            Log.e(LOG_TAG, "About to show UI, but no devices to show");
+        }
+
+        if (getService().mRequest.isSingleDevice()) {
+            setContentView(R.layout.device_confirmation);
+            final BluetoothDevice selectedDevice = getService().mDevicesFound.get(0);
+            setTitle(Html.fromHtml(getString(
+                    R.string.confirmation_title,
+                    getCallingAppName(),
+                    getDeviceDisplayName(selectedDevice)), 0));
+            getService().mSelectedDevice = selectedDevice;
+        } else {
+            setContentView(R.layout.device_chooser);
+            setTitle(Html.fromHtml(getString(R.string.chooser_title, getCallingAppName()), 0));
+            mDeviceListView = (ListView) findViewById(R.id.device_list);
+            final DeviceDiscoveryService.DevicesAdapter adapter = getService().mDevicesAdapter;
+            mDeviceListView.setAdapter(adapter);
+            adapter.registerDataSetObserver(new DataSetObserver() {
+                @Override
+                public void onChanged() {
+                    updatePairButtonEnabled();
+                }
+            });
+            mDeviceListView.addFooterView(getProgressBar(), null, false);
+        }
+
+        mPairButton = findViewById(R.id.button_pair);
+        mPairButton.setOnClickListener((view) ->
+                onPairTapped(getService().mSelectedDevice));
+        updatePairButtonEnabled();
+
+        mCancelButton = findViewById(R.id.button_cancel);
+        mCancelButton.setOnClickListener((view) -> {
+            setResult(RESULT_CANCELED);
+            finish();
+        });
+    }
+
+    private CharSequence getCallingAppName() {
+        try {
+            final PackageManager packageManager = getPackageManager();
+            return packageManager.getApplicationLabel(
+                    packageManager.getApplicationInfo(getService().mCallingPackage, 0));
+        } catch (PackageManager.NameNotFoundException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    @Override
+    public void setTitle(CharSequence title) {
+        final TextView titleView = (TextView) findViewById(R.id.title);
+        final int padding = getPadding(getResources());
+        titleView.setPadding(padding, padding, padding, padding);
+        titleView.setText(title);
+    }
+
+    //TODO put in resources xmls
+    private ProgressBar getProgressBar() {
+        final ProgressBar progressBar = new ProgressBar(this);
+        progressBar.setForegroundGravity(Gravity.CENTER_HORIZONTAL);
+        final int padding = getPadding(getResources());
+        progressBar.setPadding(padding, padding, padding, padding);
+        return progressBar;
+    }
+
+    static int getPadding(Resources r) {
+        return r.getDimensionPixelSize(R.dimen.padding);
+    }
+
+    private void updatePairButtonEnabled() {
+        mPairButton.setEnabled(getService().mSelectedDevice != null);
+    }
+
+    private DeviceDiscoveryService getService() {
+        return DeviceDiscoveryService.sInstance;
+    }
+
+    protected void onPairTapped(BluetoothDevice selectedDevice) {
+        getService().onDeviceSelected();
+        setResult(RESULT_OK,
+                new Intent().putExtra(CompanionDeviceManager.EXTRA_DEVICE, selectedDevice));
+        finish();
+    }
+}
\ No newline at end of file
diff --git a/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/DeviceDiscoveryService.java b/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/DeviceDiscoveryService.java
new file mode 100644
index 0000000..11c722d
--- /dev/null
+++ b/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/DeviceDiscoveryService.java
@@ -0,0 +1,286 @@
+/*
+ * 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.
+ */
+
+package com.android.companiondevicemanager;
+
+import static android.companion.BluetoothDeviceFilterUtils.getDeviceDisplayName;
+import static android.companion.BluetoothLEDeviceFilter.nullsafe;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.app.PendingIntent;
+import android.app.Service;
+import android.bluetooth.BluetoothAdapter;
+import android.bluetooth.BluetoothDevice;
+import android.bluetooth.BluetoothManager;
+import android.bluetooth.le.BluetoothLeScanner;
+import android.bluetooth.le.ScanCallback;
+import android.bluetooth.le.ScanFilter;
+import android.bluetooth.le.ScanResult;
+import android.bluetooth.le.ScanSettings;
+import android.companion.AssociationRequest;
+import android.companion.BluetoothLEDeviceFilter;
+import android.companion.ICompanionDeviceDiscoveryService;
+import android.companion.ICompanionDeviceDiscoveryServiceCallback;
+import android.companion.IFindDeviceCallback;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.graphics.Color;
+import android.graphics.drawable.Drawable;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.util.Log;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+import android.widget.TextView;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+public class DeviceDiscoveryService extends Service {
+
+    private static final boolean DEBUG = false;
+    private static final String LOG_TAG = "DeviceDiscoveryService";
+
+    static DeviceDiscoveryService sInstance;
+
+    private BluetoothAdapter mBluetoothAdapter;
+    private BluetoothLEDeviceFilter mFilter;
+    private ScanFilter mScanFilter;
+    private ScanSettings mDefaultScanSettings = new ScanSettings.Builder().build();
+    AssociationRequest<?> mRequest;
+    List<BluetoothDevice> mDevicesFound;
+    BluetoothDevice mSelectedDevice;
+    DevicesAdapter mDevicesAdapter;
+    IFindDeviceCallback mFindCallback;
+    ICompanionDeviceDiscoveryServiceCallback mServiceCallback;
+    String mCallingPackage;
+
+    private final ICompanionDeviceDiscoveryService mBinder =
+            new ICompanionDeviceDiscoveryService.Stub() {
+        @Override
+        public void startDiscovery(AssociationRequest request,
+                String callingPackage,
+                IFindDeviceCallback findCallback,
+                ICompanionDeviceDiscoveryServiceCallback serviceCallback) {
+            if (DEBUG) {
+                Log.i(LOG_TAG,
+                        "startDiscovery() called with: filter = [" + request
+                                + "], findCallback = [" + findCallback + "]"
+                                + "], serviceCallback = [" + serviceCallback + "]");
+            }
+            mFindCallback = findCallback;
+            mServiceCallback = serviceCallback;
+            mCallingPackage = callingPackage;
+            DeviceDiscoveryService.this.startDiscovery(request);
+        }
+    };
+
+    private final ScanCallback mBLEScanCallback = new ScanCallback() {
+        @Override
+        public void onScanResult(int callbackType, ScanResult result) {
+            final BluetoothDevice device = result.getDevice();
+            if (callbackType == ScanSettings.CALLBACK_TYPE_MATCH_LOST) {
+                onDeviceLost(device);
+            } else {
+                onDeviceFound(device);
+            }
+        }
+    };
+
+    private BluetoothLeScanner mBLEScanner;
+
+    private BroadcastReceiver mBluetoothDeviceFoundBroadcastReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            final BluetoothDevice device = intent.getParcelableExtra(
+                    BluetoothDevice.EXTRA_DEVICE);
+            if (!mFilter.matches(device)) return; // ignore device
+
+            if (intent.getAction().equals(BluetoothDevice.ACTION_FOUND)) {
+                onDeviceFound(device);
+            } else {
+                onDeviceLost(device);
+            }
+        }
+    };
+
+    @Override
+    public IBinder onBind(Intent intent) {
+        if (DEBUG) Log.i(LOG_TAG, "onBind(" + intent + ")");
+        return mBinder.asBinder();
+    }
+
+    @Override
+    public void onCreate() {
+        super.onCreate();
+
+        if (DEBUG) Log.i(LOG_TAG, "onCreate()");
+
+        mBluetoothAdapter = getSystemService(BluetoothManager.class).getAdapter();
+        mBLEScanner = mBluetoothAdapter.getBluetoothLeScanner();
+
+        mDevicesFound = new ArrayList<>();
+        mDevicesAdapter = new DevicesAdapter();
+
+        sInstance = this;
+    }
+
+    private void startDiscovery(AssociationRequest<?> request) {
+        //TODO support other protocols as well
+        mRequest = request;
+        mFilter = nullsafe((BluetoothLEDeviceFilter) request.getDeviceFilter());
+        mScanFilter = mFilter.getScanFilter();
+
+        reset();
+
+        final IntentFilter intentFilter = new IntentFilter();
+        intentFilter.addAction(BluetoothDevice.ACTION_FOUND);
+        intentFilter.addAction(BluetoothDevice.ACTION_DISAPPEARED);
+
+        registerReceiver(mBluetoothDeviceFoundBroadcastReceiver, intentFilter);
+        mBluetoothAdapter.startDiscovery();
+
+        mBLEScanner.startScan(
+                Collections.singletonList(mScanFilter), mDefaultScanSettings, mBLEScanCallback);
+    }
+
+    private void reset() {
+        mDevicesFound.clear();
+        mSelectedDevice = null;
+        mDevicesAdapter.notifyDataSetChanged();
+    }
+
+    @Override
+    public boolean onUnbind(Intent intent) {
+        stopScan();
+        return super.onUnbind(intent);
+    }
+
+    public void onDeviceSelected() {
+        try {
+            mServiceCallback.onDeviceSelected(mCallingPackage, getUserId());
+        } catch (RemoteException e) {
+            Log.e(LOG_TAG, "Error reporting selected device");
+        }
+    }
+
+    private void stopScan() {
+        if (DEBUG) Log.i(LOG_TAG, "stopScan() called");
+        mBluetoothAdapter.cancelDiscovery();
+        mBLEScanner.stopScan(mBLEScanCallback);
+        unregisterReceiver(mBluetoothDeviceFoundBroadcastReceiver);
+        stopSelf();
+    }
+
+    private void onDeviceFound(BluetoothDevice device) {
+        if (mDevicesFound.contains(device)) {
+            return;
+        }
+
+        if (DEBUG) {
+            Log.i(LOG_TAG, "Considering device " + getDeviceDisplayName(device));
+        }
+
+        if (!mFilter.matches(device)) {
+            return;
+        }
+
+        if (DEBUG) {
+            Log.i(LOG_TAG, "Found device " + getDeviceDisplayName(device));
+        }
+        if (mDevicesFound.isEmpty()) {
+            onReadyToShowUI();
+        }
+        mDevicesFound.add(device);
+        mDevicesAdapter.notifyDataSetChanged();
+    }
+
+    //TODO also, on timeout -> call onFailure
+    private void onReadyToShowUI() {
+        try {
+            mFindCallback.onSuccess(PendingIntent.getActivity(
+                    this, 0,
+                    new Intent(this, DeviceChooserActivity.class),
+                    PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_CANCEL_CURRENT
+                            | PendingIntent.FLAG_IMMUTABLE));
+        } catch (RemoteException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    private void onDeviceLost(BluetoothDevice device) {
+        mDevicesFound.remove(device);
+        mDevicesAdapter.notifyDataSetChanged();
+        if (DEBUG) {
+            Log.i(LOG_TAG, "Lost device " + getDeviceDisplayName(device));
+        }
+    }
+
+    class DevicesAdapter extends ArrayAdapter<BluetoothDevice> {
+        private Drawable BLUETOOTH_ICON = icon(android.R.drawable.stat_sys_data_bluetooth);
+
+        private Drawable icon(int drawableRes) {
+            Drawable icon = getResources().getDrawable(drawableRes, null);
+            icon.setTint(Color.DKGRAY);
+            return icon;
+        }
+
+        public DevicesAdapter() {
+            super(DeviceDiscoveryService.this, 0, mDevicesFound);
+        }
+
+        @Override
+        public View getView(
+                int position,
+                @Nullable View convertView,
+                @NonNull ViewGroup parent) {
+            TextView view = convertView instanceof TextView
+                    ? (TextView) convertView
+                    : newView();
+            bind(view, getItem(position));
+            return view;
+        }
+
+        private void bind(TextView textView, BluetoothDevice device) {
+            textView.setText(getDeviceDisplayName(device));
+            textView.setBackgroundColor(
+                    device.equals(mSelectedDevice)
+                            ? Color.GRAY
+                            : Color.TRANSPARENT);
+            textView.setOnClickListener((view) -> {
+                mSelectedDevice = device;
+                notifyDataSetChanged();
+            });
+        }
+
+        //TODO move to a layout file
+        private TextView newView() {
+            final TextView textView = new TextView(DeviceDiscoveryService.this);
+            textView.setTextColor(Color.BLACK);
+            final int padding = DeviceChooserActivity.getPadding(getResources());
+            textView.setPadding(padding, padding, padding, padding);
+            textView.setCompoundDrawablesWithIntrinsicBounds(
+                    BLUETOOTH_ICON, null, null, null);
+            textView.setCompoundDrawablePadding(padding);
+            return textView;
+        }
+    }
+}
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/res/values-af/strings.xml b/packages/Keyguard/res/values-af/strings.xml
deleted file mode 100644
index a338165..0000000
--- a/packages/Keyguard/res/values-af/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Keyguard"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Voer PIN-kode in"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Voer SIM PUK- en nuwe PIN-kode in"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM PUK-kode"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Nuwe SIM PIN-kode"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Raak om wagwoord in te voer"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Voer wagwoord in om te ontsluit"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Voer PIN in om te ontsluit"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Verkeerde PIN-kode."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Gelaai"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Laai tans"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Laai tans vinnig"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Laai tans stadig"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Koppel jou herlaaier."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Druk kieslys om te ontsluit."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Netwerk gesluit"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Geen SIM-kaart nie"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Geen SIM-kaart in tablet nie."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Geen SIM-kaart in foon nie."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Steek \'n SIM-kaart in."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"Die SIM-kaart is weg of nie leesbaar nie. Steek \'n SIM-kaart in."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Onbruikbare SIM-kaart."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Jou SIM-kaart is permanent gedeaktiveer.\n Kontak jou draadlose diensverskaffer vir \'n ander SIM-kaart."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM-kaart is gesluit."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM-kaart is PUK-geslote."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Ontsluit tans SIM-kaart…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN-area"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM-PIN-area"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM-PUK-area"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Volgende wekker gestel vir <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Vee uit"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Invoersleutel"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Het jy die patroon vergeet?"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Verkeerde patroon"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Verkeerde wagwoord"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Verkeerde PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Probeer weer oor <xliff:g id="NUMBER">%d</xliff:g> sekondes."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Teken jou patroon"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Voer SIM-PIN in"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Voer SIM se PIN vir \"<xliff:g id="CARRIER">%1$s</xliff:g>\" in"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Voer PIN in"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Voer wagwoord in"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM is nou gedeaktiveer. Voer PUK-kode in om voort te gaan. Kontak diensverskaffer vir details."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" is nou gedeaktiveer. Voer die PUK-kode in om voort te gaan. Kontak die diensverskaffer vir besonderhede."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Voer die gewenste PIN-kode in"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Bevestig gewenste PIN-kode"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Ontsluit tans SIM-kaart…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Tik \'n PIN in wat 4 tot 8 syfers lank is."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK-kode moet 8 of meer syfers wees."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Voer weer die korrekte PUK-kode in. Herhaalde pogings sal die SIM permanent deaktiveer."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN-kodes stem nie ooreen nie"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Te veel patroonpogings"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Jy het jou PIN <xliff:g id="NUMBER_0">%1$d</xliff:g> keer verkeerd ingetik. \n\nProbeer weer oor <xliff:g id="NUMBER_1">%2$d</xliff:g> sekondes."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Jy het <xliff:g id="NUMBER_0">%1$d</xliff:g> keer jou wagwoord verkeerdelik getik. \n\nProbeer weer oor <xliff:g id="NUMBER_1">%2$d</xliff:g> sekondes."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Jy het jou ontsluitpatroon <xliff:g id="NUMBER_0">%1$d</xliff:g> keer verkeerdelik geteken. \n\nProbeer weer oor <xliff:g id="NUMBER_1">%2$d</xliff:g> sekondes."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Jy het die tablet <xliff:g id="NUMBER_0">%1$d</xliff:g> keer verkeerd probeer ontsluit. Na nog <xliff:g id="NUMBER_1">%2$d</xliff:g> onsuksesvolle pogings sal hierdie tablet teruggestel word, wat al sy data sal uitvee."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Jy het die foon <xliff:g id="NUMBER_0">%1$d</xliff:g> keer verkeerd probeer ontsluit. Na nog <xliff:g id="NUMBER_1">%2$d</xliff:g> onsuksesvolle pogings sal hierdie foon teruggestel word, wat al sy data sal uitvee."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Jy het die tablet <xliff:g id="NUMBER">%d</xliff:g> keer verkeerd probeer ontsluit. Hierdie tablet sal teruggestel word, wat al sy data sal uitvee."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Jy het die foon <xliff:g id="NUMBER">%d</xliff:g> keer verkeerd probeer ontsluit. Hierdie foon sal teruggestel word, wat al sy data sal uitvee."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Jy het die tablet <xliff:g id="NUMBER_0">%1$d</xliff:g> keer verkeerd probeer ontsluit. Na nog <xliff:g id="NUMBER_1">%2$d</xliff:g> onsuksesvolle pogings sal hierdie gebruiker verwyder word, wat alle gebruikerdata sal uitvee."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Jy het die foon <xliff:g id="NUMBER_0">%1$d</xliff:g> keer verkeerd probeer ontsluit. Na nog <xliff:g id="NUMBER_1">%2$d</xliff:g> onsuksesvolle pogings sal hierdie gebruiker verwyder word, wat alle gebruikerdata sal uitvee."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Jy het die tablet <xliff:g id="NUMBER">%d</xliff:g> keer verkeerd probeer ontsluit. Hierdie gebruiker sal verwyder word, wat alle gebruikerdata sal uitvee."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Jy het die foon <xliff:g id="NUMBER">%d</xliff:g> keer verkeerd probeer ontsluit. Hierdie gebruiker sal verwyder word, wat alle gebruikerdata sal uitvee."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Jy het die tablet <xliff:g id="NUMBER_0">%1$d</xliff:g> keer verkeerd probeer ontsluit. Na nog <xliff:g id="NUMBER_1">%2$d</xliff:g> onsuksesvolle pogings sal die werkprofiel verwyder word, wat alle profieldata sal uitvee."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Jy het die foon <xliff:g id="NUMBER_0">%1$d</xliff:g> keer verkeerd probeer ontsluit. Na nog <xliff:g id="NUMBER_1">%2$d</xliff:g> onsuksesvolle pogings sal die werkprofiel verwyder word, wat alle profieldata sal uitvee."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Jy het die tablet <xliff:g id="NUMBER">%d</xliff:g> keer verkeerd probeer ontsluit. Die werkprofiel sal verwyder word, wat alle profieldata sal uitvee."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Jy het die foon <xliff:g id="NUMBER">%d</xliff:g> keer verkeerd probeer ontsluit. Die werkprofiel sal verwyder word, wat alle profieldata sal uitvee."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Jy het jou ontsluitpatroon <xliff:g id="NUMBER_0">%1$d</xliff:g> keer verkeerdelik geteken. Na nog <xliff:g id="NUMBER_1">%2$d</xliff:g> onsuksesvolle pogings, sal jy gevra word om jou tablet te ontsluit deur middel van \'n e-posrekening.\n\n Probeer weer oor <xliff:g id="NUMBER_2">%3$d</xliff:g> sekondes."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Jy het jou ontsluitpatroon <xliff:g id="NUMBER_0">%1$d</xliff:g> keer verkeerdelik geteken. Na nog <xliff:g id="NUMBER_1">%2$d</xliff:g> onsuksesvolle pogings, sal jy gevra word om jou foon te ontsluit deur middel van \'n e-posrekening.\n\n Probeer weer oor <xliff:g id="NUMBER_2">%3$d</xliff:g> sekondes."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Verkeerde SIM PIN-kode, jy sal nou jou diensverskaffer moet kontak om jou toestel te ontsluit."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">Verkeerde SIM-PIN-kode. Jy het <xliff:g id="NUMBER_1">%d</xliff:g> pogings oor.</item>
-      <item quantity="one">Verkeerde SIM-PIN-kode. Jy het <xliff:g id="NUMBER_0">%d</xliff:g> poging oor voordat jy jou diensverskaffer moet kontak om jou toestel te ontsluit.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM is onbruikbaar. Kontak jou diensverskaffer."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">Verkeerde SIM-PUK-kode. Jy het <xliff:g id="NUMBER_1">%d</xliff:g> pogings oor voordat SIM permanent onbruikbaar word.</item>
-      <item quantity="one">Verkeerde SIM-PUK-kode. Jy het <xliff:g id="NUMBER_0">%d</xliff:g> poging oor voordat SIM permanent onbruikbaar word.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"SIM PIN-bewerking het misluk!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"SIM PUK-bewerking het misluk!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Kode is aanvaar!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Geen diens nie."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Wissel invoermetode"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Vliegtuigmodus"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Patroon word vereis nadat toestel herbegin het"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"PIN word vereis nadat toestel herbegin het"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Wagwoord word vereis nadat toestel herbegin het"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Patroon word vir bykomende sekuriteit vereis"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"PIN word vir bykomende sekuriteit vereis"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Wagwoord word vir bykomende sekuriteit vereis"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Patroon word vereis wanneer jy profiele wissel"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"PIN word vereis wanneer jy profiele wissel"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Wagwoord word vereis wanneer jy profiele wissel"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Toesteladministrateur het toestel gesluit"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Toestel is handmatig gesluit"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Toestel is <xliff:g id="NUMBER_1">%d</xliff:g> uur lank nie ontsluit nie. Bevestig patroon.</item>
-      <item quantity="one">Toestel is <xliff:g id="NUMBER_0">%d</xliff:g> uur lank nie ontsluit nie. Bevestig patroon.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Toestel is <xliff:g id="NUMBER_1">%d</xliff:g> uur lank nie ontsluit nie. Bevestig PIN.</item>
-      <item quantity="one">Toestel is <xliff:g id="NUMBER_0">%d</xliff:g> uur lank nie ontsluit nie. Bevestig PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Toestel is <xliff:g id="NUMBER_1">%d</xliff:g> uur lank nie ontsluit nie. Bevestig wagwoord.</item>
-      <item quantity="one">Toestel is <xliff:g id="NUMBER_0">%d</xliff:g> uur lank nie ontsluit nie. Bevestig wagwoord.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Nie herken nie"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-am/strings.xml b/packages/Keyguard/res/values-am/strings.xml
deleted file mode 100644
index 67fdc32..0000000
--- a/packages/Keyguard/res/values-am/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"የቁልፍ ጥበቃ"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"ፒን ኮድ ተይብ"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"የሲም PUK እና አዲሱን ፒን ኮድ ይተይቡ"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"የሲም PUK ኮድ"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"አዲስ ሲም ፒን ኮድ"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"የይለፍ ቃል ለመተየብ ንካ"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"ለመክፈት የይለፍ ቃል ተይብ"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"ለመክፈት ፒን ተይብ"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"ትክክል ያልሆነ ፒን  ኮድ።"</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"ባትሪ ሞልቷል"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"ኃይል በመሙላት ላይ"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"ኃይል በፍጥነት በመሙላት ላይ"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"ኃይል በዝግታ በመሙላት ላይ"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"የኃይል መሙያዎን ይሰኩ።"</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"ለመክፈት ምናሌውን ይጫኑ።"</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"አውታረ መረብ ተቆልፏል"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"ምንም ሲም ካርድ የለም"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"በጡባዊ ውስጥ ምንም ሲም ካርድ የለም።"</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"በስልኩ ውስጥ ምንም ሲም ካርድ የለም።"</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"ሲም ካርድ ያስገቡ።"</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"ሲም ካርዱ ጠፍቷል ወይም መነበብ አይችልም። እባክዎ ሲም ሲም ካርድ ያስገቡ።"</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"የማይሰራ ሲም ካርድ።"</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"ሲም ካርድዎ እስከመጨረሻው ተሰናክሏል።\n ሌላ ሲም ካርድ ለማግኘት ከገመድ አልባ አገልግሎት አቅራቢዎ ጋር ይገናኙ።"</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"ሲም ካርድ ተዘግቷል።"</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"ሲም ካርድ በፒዩኬ ተዘግቷል።"</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"ሲም ካርዱን በመክፈት ላይ…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"የፒን አካባቢ"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"የሲም ፒን አካባቢ"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"የሲም PUK አካባቢ"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"ቀጣዩ ማንቂያ ለ<xliff:g id="ALARM">%1$s</xliff:g> ተዘጋጅቷል"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"ሰርዝ"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"አስገባ"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"ስርዓተ ጥለቱን እርሳ"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"የተሳሳተ ስርዓተ ጥለት"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"የተሳሳተ ይለፍ ቃል"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"የተሳሳተ ፒን"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"በ<xliff:g id="NUMBER">%d</xliff:g> ሰከንዶች ውስጥ እንደገና ይሞክሩ።"</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"ስርዓተ ጥለትዎን ይሳሉ"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"የሲም ፒን ያስገቡ"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"የ«<xliff:g id="CARRIER">%1$s</xliff:g>» ሲም ፒን ያስገቡ"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"ፒን ያስገቡ"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"የይለፍ ቃል ያስገቡ"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"ሲም አሁን ተሰናክሏል። ለመቀጠል የPUK ኮድ ያስገቡ። ለዝርዝር ድምጸ ተያያዥ ሞደምን ያግኙ።"</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"ሲም «<xliff:g id="CARRIER">%1$s</xliff:g>» አሁን ተሰናክሏል። ለመቀጠል የፒዩኬ ኮድ ያስገቡ። ዝርዝር መረጃን ለማግኘት የተንቀሳቃሽ ስልክ አገልግሎት አቅራቢውን ያነጋግሩ።"</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"የተፈለገውን የፒን ኮድ ያስገቡ"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"የተፈለገውን የፒን ኮድ ያረጋግጡ"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"ሲም ካርዱን በመክፈት ላይ…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"ከ4 እስከ 8 ቁጥሮች የያዘ ፒን ይተይቡ።"</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"የPUK ኮድ 8 ወይም ከዚያ በላይ ቁጥሮች ሊኖረው ይገባል።"</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"ትክክለኛውን የPUK ኮድ እንደገና ያስገቡ። ተደጋጋሚ ሙከራዎች ሲም ካርዱን እስከመጨረሻው ያሰናክሉታል።"</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"ፒን ኮዶች አይገጣጠሙም"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"በጣም ብዙ የስርዓተ ጥለት ሙከራዎች"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"ፒንዎን <xliff:g id="NUMBER_0">%1$d</xliff:g> ጊዜ በትክክል አልተየቡም። \n\nበ<xliff:g id="NUMBER_1">%2$d</xliff:g> ሰኮንዶች ውስጥ እንደገና ይሞክሩ።"</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"የይለፍ ቃልዎን <xliff:g id="NUMBER_0">%1$d</xliff:g> ጊዜ ትክክል ባልሆነ መንገድ ተይበዋል።\n\nበ<xliff:g id="NUMBER_1">%2$d</xliff:g> ሰኮንዶች ውስጥ እንደገና ይሞክሩ።"</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"የመክፈቻ ስርዓተ ጥለትዎን <xliff:g id="NUMBER_0">%1$d</xliff:g> ጊዜ በትክክል አልሳሉትም። \n\n ከ<xliff:g id="NUMBER_1">%2$d</xliff:g> ሰከንዶች በኋላ እንደገና ይሞክሩ።"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"ጡባዊውን <xliff:g id="NUMBER_0">%1$d</xliff:g> ጊዜ ትክክል ባልሆነ መልኩ ለማስከፈት ሞክረዋል። ከ<xliff:g id="NUMBER_1">%2$d</xliff:g> ተጨማሪ ያልተሳኩ ሙከራዎች በኋላ ይህ ስልክ ዳግም ይጀመራል፣ ይህም ሁሉንም ውሂቡን ይሰርዛል።"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"ስልኩን <xliff:g id="NUMBER_0">%1$d</xliff:g> ጊዜ ትክክል ባልሆነ መልኩ ለማስከፈት ሞክረዋል። ከ<xliff:g id="NUMBER_1">%2$d</xliff:g> ተጨማሪ ያልተሳኩ ሙከራዎች በኋላ ይህ ስልክ ዳግም ይጀመራል፣ ይህም ሁሉንም ውሂቡን ይሰርዛል።"</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"ጡባዊውን <xliff:g id="NUMBER">%d</xliff:g> ጊዜ ትክክል ባልሆነ ሁኔታ ለማስከፈት ሞክረዋል። ስልኩ ዳግም ይጀመራል፣ ይህም ሁሉንም ውሂቡን ይሰርዛል።"</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"ስልኩን <xliff:g id="NUMBER">%d</xliff:g> ጊዜ ትክክል ባልሆነ ሁኔታ ለማስከፈት ሞክረዋል። ስልኩ ዳግም ይጀመራል፣ ይህም ሁሉንም ውሂቡን ይሰርዛል።"</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"ጡባዊውን <xliff:g id="NUMBER_0">%1$d</xliff:g> ጊዜ ትክክል ባልሆነ መልኩ ለማስከፈት ሞክረዋል። ከ<xliff:g id="NUMBER_1">%2$d</xliff:g> ተጨማሪ ያልተሳኩ ሙከራዎች በኋላ ይህ ተጠቃሚ ይወገዳል፣ ይህም ሁሉንም የተጠቃሚ ውሂብ ይሰርዛል።"</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"ስልኩን <xliff:g id="NUMBER_0">%1$d</xliff:g> ጊዜ ትክክል ባልሆነ መልኩ ለማስከፈት ሞክረዋል። ከ<xliff:g id="NUMBER_1">%2$d</xliff:g> ተጨማሪ ያልተሳኩ ሙከራዎች በኋላ ይህ ተጠቃሚ ይወገዳል፣ ይህም ሁሉንም የተጠቃሚ ውሂብ ይሰርዛል።"</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"ጡባዊውን <xliff:g id="NUMBER">%d</xliff:g> ጊዜ ትክክል ባልሆነ መልኩ ለማስከፈት ሞክረዋል። ይህ ተጠቃሚ ይወገዳል፣ ይህም ሁሉንም የተጠቃሚ ውሂብ ይሰርዛል።"</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"ስልኩን <xliff:g id="NUMBER">%d</xliff:g> ጊዜ ትክክል ባልሆነ መልኩ ለማስከፈት ሞክረዋል። ይህ ተጠቃሚ ይወገዳል፣ ይህም ሁሉንም የተጠቃሚ ውሂብ ይሰርዛል።"</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"ጡባዊውን <xliff:g id="NUMBER_0">%1$d</xliff:g> ጊዜ ትክክል ባልሆነ መልኩ ለማስከፈት ሞክረዋል። ከ<xliff:g id="NUMBER_1">%2$d</xliff:g> ተጨማሪ ያልተሳኩ ሙከራዎች በኋላ የስራ መገለጫው ይወገዳል፣ ይህም ሁሉንም የመገለጫ ውሂብ ይሰርዛል።"</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"ስልኩን <xliff:g id="NUMBER_0">%1$d</xliff:g> ጊዜ ትክክል ባልሆነ መልኩ ለማስከፈት ሞክረዋል። ከ<xliff:g id="NUMBER_1">%2$d</xliff:g> ተጨማሪ ያልተሳኩ ሙከራዎች በኋላ የስራ መገለጫው ይወገዳል፣ ይህም ሁሉንም የመገለጫ ውሂብ ይሰርዛል።"</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"ጡባዊውን <xliff:g id="NUMBER">%d</xliff:g> ጊዜ ትክክል ባልሆነ መልኩ ለማስከፈት ሞክረዋል። የስራ መገለጫው ይወገዳል፣ ይህም ሁሉንም የመገለጫ ውሂብ ይሰርዛል።"</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"ስልኩን <xliff:g id="NUMBER">%d</xliff:g> ጊዜ ትክክል ባልሆነ መልኩ ለማስከፈት ሞክረዋል። የስራ መገለጫው ይወገዳል፣ ይህም ሁሉንም የመገለጫ ውሂብ ይሰርዛል።"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"የመክፈቻ ስርዓተ ጥለቱን <xliff:g id="NUMBER_0">%1$d</xliff:g> ጊዜ በትክክል አልሳሉትም። ከ<xliff:g id="NUMBER_1">%2$d</xliff:g> ተጨማሪ ያልተሳኩ ሙከራዎች በኋላ የኢሜይል መለያ ተጠቅመው ጡባዊ ቱኮዎን እንዲከፍቱ ይጠየቃሉ።\n\n ከ<xliff:g id="NUMBER_2">%3$d</xliff:g> ከሰከንዶች በኋላ እንደገና ይሞክሩ።"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"የመክፈቻ ስርዓተ ጥለቱን <xliff:g id="NUMBER_0">%1$d</xliff:g> ጊዜ በትክክል አልሳሉትም። ከ<xliff:g id="NUMBER_1">%2$d</xliff:g> ተጨማሪ ያልተሳኩ ሙከራዎች በኋላ የኢሜይል መለያ ተጠቅመው ስልክዎን እንዲከፍቱ ይጠየቃሉ።\n\nእባክዎ ከ<xliff:g id="NUMBER_2">%3$d</xliff:g> ሰከንዶች በኋላ እንደገና ይሞክሩ።"</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"ልክ ያልሆነ የሲም ኮድ። አሁን መሳሪያዎን ለማስከፈት ድምጸ ተያያዥ ሞደምዎን ማግኘት አለብዎ።"</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">ልክ ያልሆነ የሲም ፒን ኮድ፣ <xliff:g id="NUMBER_1">%d</xliff:g> ሙከራዎች ይቀርዎታል።</item>
-      <item quantity="other">ልክ ያልሆነ የሲም ፒን ኮድ፣ <xliff:g id="NUMBER_1">%d</xliff:g> ሙከራዎች ይቀርዎታል።</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"ሲሙ ጥቅም ላይ መዋል እይችልም። የእርስዎን ድምጸ ተያያዥ ሞደም ያግኙ።"</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">ልክ ያልሆነ የሲም PUK ኮድ፣ ሲም ካርድዎ በቋሚነት ጥቅም ላይ መዋል የማይችል ሊሆን <xliff:g id="NUMBER_1">%d</xliff:g> ሙከራዎች ይቀሩዎታል።</item>
-      <item quantity="other">ልክ ያልሆነ የሲም PUK ኮድ፣ ሲም ካርድዎ በቋሚነት ጥቅም ላይ መዋል የማይችል ሊሆን <xliff:g id="NUMBER_1">%d</xliff:g> ሙከራዎች ይቀሩዎታል።</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"የሲም ፒን ክወና አልተሳካም!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"የሲም PUK ክወና አልተሳካም!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"ኮዱ ተቀባይነት አግኝቷል!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"ከአገልግሎት መስጫ ክልል ውጪ።"</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"የግቤት ስልት ቀይር"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"የአውሮፕላን ሁነታ"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"መሣሪያ ዳግም ከጀመረ በኋላ ሥርዓተ ጥለት ያስፈልጋል"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"መሣሪያ ዳግም ከጀመረ በኋላ ፒን ያስፈልጋል"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"መሣሪያ ዳግም ከጀመረ በኋላ የይለፍ ቃል ያስፈልጋል"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"ሥርዓተ ጥለት ለተጨማሪ ደህንነት ያስፈልጋል"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"ፒን ለተጨማሪ ደህንነት ያስፈልጋል"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"የይለፍ ቃል ለተጨማሪ ደህንነት ያስፈልጋል"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"መገለጫዎችን በሚቀያይሯቸው ጊዜ ሥርዓተ ጥለት ያስፈልጋል"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"መገለጫዎችን በሚቀያይሯቸው ፒን ያስፈልጋል"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"መገለጫዎችን በሚቀያይሯቸው ጊዜ የይለፍ ቃል ያስፈልጋል"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"የመሣሪያ አስተዳዳሪ መሣሪያውን ቆልፏል"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"መሣሪያ በእጅ ተቆልፏል"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">መሳሪያው ለ<xliff:g id="NUMBER_1">%d</xliff:g>ሰዓቶች አልተከፈተም ነበር። ስርዓተ ጥለት ያረጋግጡ።</item>
-      <item quantity="other">መሳሪያው ለ<xliff:g id="NUMBER_1">%d</xliff:g>ሰዓቶች አልተከፈተም ነበር። ስርዓተ ጥለት ያረጋግጡ።</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">መሳሪያው ለ<xliff:g id="NUMBER_1">%d</xliff:g> ሰዓቶች አልተከፈተም ነበር። ፒን ያረጋግጡ።</item>
-      <item quantity="other">መሳሪያው ለ<xliff:g id="NUMBER_1">%d</xliff:g> ሰዓቶች አልተከፈተም ነበር። ፒን ያረጋግጡ።</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">መሳሪያው ለ<xliff:g id="NUMBER_1">%d</xliff:g> ሰዓቶች አልተከፈተም ነበር። የይለፍ ቃል ያረጋግጡ።</item>
-      <item quantity="other">መሳሪያው ለ<xliff:g id="NUMBER_1">%d</xliff:g> ሰዓቶች አልተከፈተም ነበር። የይለፍ ቃል ያረጋግጡ።</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"አልታወቀም"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-ar/strings.xml b/packages/Keyguard/res/values-ar/strings.xml
deleted file mode 100644
index 8438699..0000000
--- a/packages/Keyguard/res/values-ar/strings.xml
+++ /dev/null
@@ -1,152 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Keyguard"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"‏اكتب رمز رمز PIN"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"‏أدخل رمز PUK لبطاقة SIM ورمز \"رقم التعريف الشخصي\" الجديد"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"‏رمز PUK لبطاقة SIM"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"‏رمز \"رقم تعريف شخصي\" جديد لبطاقة SIM"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"المس لكتابة كلمة المرور"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"اكتب كلمة المرور لإلغاء التأمين"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"‏اكتب رمز PIN لإلغاء التأمين"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"‏رمز PIN غير صحيح."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"تم الشحن"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"جارٍ الشحن"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"الشحن سريعًا"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"الشحن ببطء"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"توصيل جهاز الشحن."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"اضغط على \"القائمة\" لإلغاء القفل."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"الشبكة مؤمّنة"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"‏ليست هناك شريحة SIM"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"‏ليست هناك شريحة SIM في الجهاز اللوحي."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"‏ليست هناك شريحة SIM في الهاتف."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"‏أدخل شريحة SIM."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"‏شريحة SIM مفقودة أو غير قابلة للقراءة. أدخل شريحة SIM."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"‏شريحة SIM غير قابلة للاستخدام."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"‏تم تعطيل شريحة SIM بشكل دائم.\n اتصل بمقدم خدمة اللاسلكي للحصول على شريحة SIM أخرى."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"‏شريحة SIM مؤمّنة."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"‏شريحة SIM مؤمّنة بكود PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"‏جارٍ إلغاء تأمين شريحة SIM…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"منطقة رقم التعريف الشخصي"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"‏منطقة رقم التعريف الشخصي لبطاقة SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"‏منطقة PUK لبطاقة SIM"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"تم ضبط التنبيه التالي على <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"حذف"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"نسيت النقش"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"نقش خاطئ"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"كلمة مرور خاطئة"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"رقم تعريف شخصي خاطئ"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"حاول مرة أخرى خلال <xliff:g id="NUMBER">%d</xliff:g> ثانية."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"ارسم نقشك"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"‏أدخل رمز PIN لبطاقة SIM"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"‏إدخال رقم التعريف الشخصي لبطاقة SIM التابعة للمشغل \"<xliff:g id="CARRIER">%1$s</xliff:g>\"."</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"‏أدخل رمز PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"أدخل كلمة المرور"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"‏شريحة SIM معطلة الآن. أدخل رمز PUK للمتابعة. اتصل بمشغل شبكة الجوال للاطلاع على التفاصيل."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"‏SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" معطلة الآن. أدخل رمز PUK للمتابعة. واتصل بمشغل شبكة الجوال لمعرفة التفاصيل."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"‏إدخال رمز رمز PIN المراد"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"‏تأكيد رمز رمز PIN المراد"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"‏جارٍ إلغاء تأمين شريحة SIM…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"اكتب  رقم التعريف الشخصي المكون من ٤ إلى ٨ أرقام."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"‏يجب أن يتضمن رمز PUK‏ ۸ أرقام أو أكثر."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"‏أعد إدخال رمز PUK الصحيح. وستؤدي المحاولات المتكررة إلى تعطيل شريحة SIM نهائيًا."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"‏لا يتطابق رمزا رمز PIN"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"محاولات النقش كثيرة جدًا"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"‏لقد كتبت رمز PIN بشكل غير صحيح <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. \n\nأعد المحاولة خلال <xliff:g id="NUMBER_1">%2$d</xliff:g> ثانية."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"لقد كتبت كلمة المرور بشكل غير صحيح <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. \n\nأعد المحاولة خلال <xliff:g id="NUMBER_1">%2$d</xliff:g> ثانية."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"لقد رسمت نقش إلغاء التأمين بطريقة غير صحيحة <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. \n\nأعد المحاولة خلال <xliff:g id="NUMBER_1">%2$d</xliff:g> ثانية."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"أخطأت في محاولة إلغاء قفل الجهاز اللوحي <xliff:g id="NUMBER_0">%1$d</xliff:g> من المرات. بعد <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة الأخرى، ستتم إعادة تعيين هذا الجهاز والتي بدورها تحذف جميع بياناته."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"أخطأت في محاولة إلغاء قفل الهاتف <xliff:g id="NUMBER_0">%1$d</xliff:g> من المرات. بعد <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة الأخرى، ستتم إعادة تعيين هذا الهاتف والتي بدورها تحذف جميع بياناته."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"أخطأت في محاولة إلغاء قفل الجهاز اللوحي <xliff:g id="NUMBER">%d</xliff:g> من المرات. ستتم إعادة تعيين هذا الجهاز والتي بدورها تحذف جميع بياناته."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"أخطأت في محاولة إلغاء قفل الهاتف <xliff:g id="NUMBER">%d</xliff:g> من المرات. ستتم إعادة تعيين هذا الهاتف والتي بدورها تحذف جميع بياناته."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"أخطأت في محاولة إلغاء قفل الجهاز اللوحي <xliff:g id="NUMBER_0">%1$d</xliff:g> من المرات. بعد <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة الأخرى، ستتم إزالة هذا المستخدم والتي بدورها تحذف جميع بيانات المستخدم."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"أخطأت في محاولة إلغاء قفل الهاتف <xliff:g id="NUMBER_0">%1$d</xliff:g> من المرات. بعد <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة الأخرى، ستتم إزالة هذا المستخدم والتي بدورها تحذف جميع بيانات المستخدم."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"أخطأت في محاولة إلغاء قفل الجهاز اللوحي <xliff:g id="NUMBER">%d</xliff:g> من المرات. ستتم إزالة المستخدم والتي بدورها تحذف جميع بياناته."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"أخطأت في محاولة إلغاء قفل الهاتف <xliff:g id="NUMBER">%d</xliff:g> من المرات. ستتم إزالة المستخدم والتي بدورها تحذف جميع بياناته."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"أخطأت في محاولة إلغاء قفل الجهاز اللوحي <xliff:g id="NUMBER_0">%1$d</xliff:g> من المرات. بعد <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة الأخرى، ستتم إزالة الملف الشخصي للعمل والتي بدورها تحذف جميع بيانات الملف الشخصي."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"أخطأت في محاولة إلغاء قفل الهاتف <xliff:g id="NUMBER_0">%1$d</xliff:g> من المرات. بعد <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة الأخرى، ستتم إزالة الملف الشخصي للعمل والتي بدورها تحذف جميع بيانات الملف الشخصي."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"أخطأت في محاولة إلغاء قفل الجهاز اللوحي <xliff:g id="NUMBER">%d</xliff:g> من المرات. ستتم إزالة الملف الشخصي للعمل والتي بدورها تحذف جميع بياناته."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"أخطأت في محاولة إلغاء قفل الهاتف <xliff:g id="NUMBER">%d</xliff:g> من المرات. ستتم إزالة الملف الشخصي للعمل والتي بدورها تحذف جميع بياناته."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"لقد رسمت نقش إلغاء التأمين بشكل غير صحيح <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. بعد إجراء <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة الأخرى، ستطالَب بإلغاء تأمين الجهاز اللوحي باستخدام معلومات حساب بريد إلكتروني.\n\n أعد المحاولة خلال <xliff:g id="NUMBER_2">%3$d</xliff:g> ثانية."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"لقد رسمت نقش إلغاء التأمين بشكل غير صحيح <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. بعد إجراء <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة الأخرى، ستُطالب بإلغاء تأمين الهاتف باستخدام حساب بريد إلكتروني لإلغاء تأمين الهاتف.\n\n أعد المحاولة خلال <xliff:g id="NUMBER_2">%3$d</xliff:g> ثانية."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"‏رمز \"رقم التعريف الشخصي\" لبطاقة SIM غير صحيح، ويلزمك الاتصال الآن بمشغّل شبكة الجوّال لإلغاء قفل الجهاز."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="zero">‏رمز رقم التعريف الشخصي لبطاقة SIM غير صحيح، ولم تتبق لديك أية محاولات (<xliff:g id="NUMBER_1">%d</xliff:g>).</item>
-      <item quantity="two">‏رمز رقم التعريف الشخصي لبطاقة SIM غير صحيح، ويتبقى لديك محاولتان (<xliff:g id="NUMBER_1">%d</xliff:g>).</item>
-      <item quantity="few">‏رمز رقم التعريف الشخصي لبطاقة SIM غير صحيح، ويتبقى لديك <xliff:g id="NUMBER_1">%d</xliff:g> محاولات.</item>
-      <item quantity="many">‏رمز رقم التعريف الشخصي لبطاقة SIM غير صحيح، ويتبقى لديك <xliff:g id="NUMBER_1">%d</xliff:g> محاولة.</item>
-      <item quantity="other">‏رمز رقم التعريف الشخصي\" لبطاقة SIM غير صحيح، ويتبقى لديك <xliff:g id="NUMBER_1">%d</xliff:g> من المحاولات.</item>
-      <item quantity="one">‏رمز رقم التعريف الشخصي لبطاقة SIM غير صحيح، ويتبقى لديك محاولة واحدة (<xliff:g id="NUMBER_0">%d</xliff:g>) يتعين عليك بعدها الاتصال بمشغّل شبكة الجوّال لإلغاء قفل الجهاز.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"‏شريحة SIM غير صالحة للاستخدام. يُرجى الاتصال بمشغّل شبكة الجوّال."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="zero">‏رمز PUK لشريحة SIM غير صحيح، ولم تتبق لديك أية محاولات (<xliff:g id="NUMBER_1">%d</xliff:g>) تصبح بعدها شريحة SIM غير صالحة للاستخدام بشكل دائم.</item>
-      <item quantity="two">‏رمز PUK لشريحة SIM غير صحيح، ويتبقى لديك محاولتان (<xliff:g id="NUMBER_1">%d</xliff:g>) تصبح بعدها شريحة SIM غير صالحة للاستخدام بشكل دائم.</item>
-      <item quantity="few">‏رمز PUK لشريحة SIM غير صحيح، ويتبقى لديك <xliff:g id="NUMBER_1">%d</xliff:g> محاولات تصبح بعدها شريحة SIM غير صالحة للاستخدام بشكل دائم.</item>
-      <item quantity="many">‏رمز PUK لشريحة SIM غير صحيح، ويتبقى لديك <xliff:g id="NUMBER_1">%d</xliff:g> محاولة تصبح بعدها شريحة SIM غير صالحة للاستخدام بشكل دائم.</item>
-      <item quantity="other">‏رمز PUK لشريحة SIM غير صحيح، ويتبقى لديك <xliff:g id="NUMBER_1">%d</xliff:g> من المحاولات تصبح بعدها شريحة SIM غير صالحة للاستخدام بشكل دائم.</item>
-      <item quantity="one">‏رمز PUK لشريحة SIM غير صحيح، ويتبقى لديك محاولة واحدة (<xliff:g id="NUMBER_0">%d</xliff:g>) تصبح بعدها شريحة SIM غير صالحة للاستخدام بشكل دائم.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"‏أخفقت عملية \"رقم التعريف الشخصي\" لبطاقة SIM!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"‏أخفقت عملية PUK لبطاقة SIM!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"تم قبول الرمز!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"لا تتوفر خدمة"</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"تبديل أسلوب الإدخال"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"وضع الطائرة"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"يجب رسم النقش بعد إعادة تشغيل الجهاز."</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"يجب إدخال رقم التعريف الشخصي بعد إعادة تشغيل الجهاز."</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"يجب إدخال كلمة المرور بعد إعادة تشغيل الجهاز."</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"يجب رسم النقش لمزيد من الأمان."</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"يجب إدخال رقم التعريف الشخصي لمزيد من الأمان."</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"يجب إدخال كلمة المرور لمزيد من الأمان."</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"يجب رسم النقش عند تبديل الملفات الشخصية."</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"يجب إدخال رقم التعريف الشخصي عند تبديل الملفات الشخصية."</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"يجب إدخال كلمة المرور عند تبديل الملفات الشخصية."</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"تم حظر الجهاز بواسطة المسؤول"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"تم حظر الجهاز يدويًا"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="zero">لم يتم إلغاء تأمين الجهاز لمدة <xliff:g id="NUMBER_1">%d</xliff:g> من الساعات. تأكيد النقش.</item>
-      <item quantity="two">لم يتم إلغاء تأمين الجهاز لمدة ساعتين (<xliff:g id="NUMBER_1">%d</xliff:g>). تأكيد النقش.</item>
-      <item quantity="few">لم يتم إلغاء تأمين الجهاز لمدة <xliff:g id="NUMBER_1">%d</xliff:g> ساعات. تأكيد النقش.</item>
-      <item quantity="many">لم يتم إلغاء تأمين الجهاز لمدة <xliff:g id="NUMBER_1">%d</xliff:g> ساعة. تأكيد النقش.</item>
-      <item quantity="other">لم يتم إلغاء تأمين الجهاز لمدة <xliff:g id="NUMBER_1">%d</xliff:g> من الساعات. تأكيد النقش.</item>
-      <item quantity="one">لم يتم إلغاء تأمين الجهاز لمدة <xliff:g id="NUMBER_0">%d</xliff:g> ساعة. تأكيد النقش.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="zero">لم يتم إلغاء تأمين الجهاز لمدة <xliff:g id="NUMBER_1">%d</xliff:g> من الساعات. تأكيد رقم التعريف الشخصي.</item>
-      <item quantity="two">لم يتم إلغاء تأمين الجهاز لمدة ساعتين (<xliff:g id="NUMBER_1">%d</xliff:g>). تأكيد رقم التعريف الشخصي.</item>
-      <item quantity="few">لم يتم إلغاء تأمين الجهاز لمدة <xliff:g id="NUMBER_1">%d</xliff:g> ساعات. تأكيد رقم التعريف الشخصي.</item>
-      <item quantity="many">لم يتم إلغاء تأمين الجهاز لمدة <xliff:g id="NUMBER_1">%d</xliff:g> ساعة. تأكيد رقم التعريف الشخصي.</item>
-      <item quantity="other">لم يتم إلغاء تأمين الجهاز لمدة <xliff:g id="NUMBER_1">%d</xliff:g> من الساعات. تأكيد رقم التعريف الشخصي.</item>
-      <item quantity="one">لم يتم إلغاء تأمين الجهاز لمدة <xliff:g id="NUMBER_0">%d</xliff:g> ساعة. تأكيد رقم التعريف الشخصي.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="zero">لم يتم إلغاء تأمين الجهاز لمدة <xliff:g id="NUMBER_1">%d</xliff:g> من الساعات. تأكيد كلمة المرور.</item>
-      <item quantity="two">لم يتم إلغاء تأمين الجهاز لمدة ساعتين (<xliff:g id="NUMBER_1">%d</xliff:g>). تأكيد كلمة المرور.</item>
-      <item quantity="few">لم يتم إلغاء تأمين الجهاز لمدة <xliff:g id="NUMBER_1">%d</xliff:g> ساعات. تأكيد كلمة المرور.</item>
-      <item quantity="many">لم يتم إلغاء تأمين الجهاز لمدة <xliff:g id="NUMBER_1">%d</xliff:g> ساعة. تأكيد كلمة المرور.</item>
-      <item quantity="other">لم يتم إلغاء تأمين الجهاز لمدة <xliff:g id="NUMBER_1">%d</xliff:g> من الساعات. تأكيد كلمة المرور.</item>
-      <item quantity="one">لم يتم إلغاء تأمين الجهاز لمدة <xliff:g id="NUMBER_0">%d</xliff:g> ساعة. تأكيد كلمة المرور.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"لم يتم التعرف عليها"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-az/strings.xml b/packages/Keyguard/res/values-az/strings.xml
deleted file mode 100644
index c7a8091..0000000
--- a/packages/Keyguard/res/values-az/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Klaviatura kilidi"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"PİN kodu daxil edin"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"SIM PUK və yeni PIN kodu yazın"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM PUK kodu"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Yeni SIM PIN kodu"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Şifrə daxil etmək üçün toxunun"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Kilidi açmaq üçün parol yazın"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Kilidi açmaq üçün PIN daxil edin"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Yanlış PIN kodu."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Dolmuş"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Enerji doldurulur"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Enerji sürətlə dolur"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Enerji yavaş dolur"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Elektrikə qoşun."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Kilidi açmaq üçün Menyu düyməsinə baxın."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Şəbəkə kilidləndi"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"SİM kart yoxdur"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Planşetdə SİM kart yoxdur.."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Telefonda SİM kart yoxdu."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"SIM kartı daxil edin."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SİM kart yoxdur və ya oxuna bilinmir. SİM kart daxil edin."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Yararsız SIM kart."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Sizin SİM kartınız daimi olaraq deaktivləşib.\n Başqa SİM kart üçün simsiz xidmət provayderinizə müraciət edin."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM kart kilidlənib."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SİM kart PUK ilə kilidlənib."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"SİM kartın kilidi açılır..."</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN sahəsi"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM PIN sahəsi"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM PUK sahəsi"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Növbəti alarm vaxtı: <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Sil"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Daxil olun"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Şablonu unutmuşam"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Yanlış Model"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Yanlış Şifrə"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"PIN səhvdir"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"<xliff:g id="NUMBER">%d</xliff:g> saniyə sonra yenidən cəhd edin."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Şablonunuzu çəkin"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"SIM PIN kodu daxil edin"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"\"<xliff:g id="CARRIER">%1$s</xliff:g>\" üçün SIM PIN daxil edin"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"PİN kodu daxil edin"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Parol daxil edin"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM indi deaktivdir. Davam etmək üçün PUK kodu daxil edin. Əlavə məlumat üçün operatora müraciət edin."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" indi qeyri-aktiv edilib. Davam etmək üçün PUK kodu daxil edin. Təfərrüatlar üçün operatorunuzla əlaqə saxlayın."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"İstədiyiniz PİN kodu daxil edin"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"İstədiyiniz PIN kodu təsdiqləyin"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"SİM kartın kilidi açılır..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"4-dən 8-ə qədər rəqəmi olan PIN yazın."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK kod 8 rəqəm və ya daha çox olmalıdır."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Düzgün PUK kodu yenidən daxil edin. Təkrarlanan cəhdlər SIM\'i birdəfəlik sıradan çıxaracaq."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN kodları uyğun deyil"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Həddindən çox cəhd edildi!"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"PIN kodunuzu <xliff:g id="NUMBER_0">%1$d</xliff:g> dəfə yanlış daxil etdiniz.\n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> saniyə ərzində yenidən yoxlayın"</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Şifrənizi <xliff:g id="NUMBER_0">%1$d</xliff:g> dəfə yanlış daxil etdiniz. \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> saniyə ərzində yenidən yoxlayın."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Modelinizi <xliff:g id="NUMBER_0">%1$d</xliff:g> dəfə yanlış çəkmisiniz.\n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> saniyə ərzində yenidən yoxlayın"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Siz <xliff:g id="NUMBER_0">%1$d</xliff:g> dəfə planşetinizin kilidini açmaq üçün yanlış cəhdlər etdiniz. Daha <xliff:g id="NUMBER_1">%2$d</xliff:g> uğursuz cəhddən sonra bu planşet ilkin vəziyyətinə bərpa olunacaq və ondakı bütün məlumatlar silinəcəkdir."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Siz <xliff:g id="NUMBER_0">%1$d</xliff:g> dəfə telefonunuzun kilidini açmaq üçün yanlış cəhdlər etdiniz. Daha <xliff:g id="NUMBER_1">%2$d</xliff:g> uğursuz cəhddən sonra bu telefon ilkin vəziyyətinə bərpa olunacaq və ondakı bütün məlumatlar silinəcəkdir."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Siz <xliff:g id="NUMBER">%d</xliff:g> dəfə planşetinizin kilidini açmaq üçün yanlış cəhdlər etdiniz. Bu planşet ilkin vəziyyətinə bərpa olunacaq və ondakı bütün məlumatlar silinəcəkdir."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Siz <xliff:g id="NUMBER">%d</xliff:g> dəfə telefonunuzun kilidini açmaq üçün yanlış cəhdlər etdiniz. Bu telefon ilkin vəziyyətinə bərpa olunacaq və ondakı bütün məlumatlar silinəcəkdir."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Siz <xliff:g id="NUMBER_0">%1$d</xliff:g> dəfə planşetinizin kilidini açmaq üçün yanlış cəhdlər etdiniz. Daha <xliff:g id="NUMBER_1">%2$d</xliff:g> uğursuz cəhddən sonra bütün istifadəçi məlumatlarını siləcək bu istifadəçi silinəcəkdir."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Siz <xliff:g id="NUMBER_0">%1$d</xliff:g> dəfə telefonunuzun kilidini açmaq üçün yanlış cəhdlər etdiniz. Daha <xliff:g id="NUMBER_1">%2$d</xliff:g> uğursuz cəhddən sonra bütün istifadəçi məlumatlarını siləcək bu istifadəçi silinəcəkdir."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Siz <xliff:g id="NUMBER">%d</xliff:g> dəfə planşetinizin kilidini açmaq üçün yanlış cəhdlər etdiniz. Bu istifadəçi və istifadəçi ilə bağlı bütün məlumatlar silinəcəkdir."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Siz <xliff:g id="NUMBER">%d</xliff:g> dəfə telefonunuzun kilidini açmaq üçün yanlış cəhdlər etdiniz. Bu istifadəçi və istifadəçi ilə bağlı bütün məlumatlar silinəcəkdir."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Siz <xliff:g id="NUMBER_0">%1$d</xliff:g> dəfə planşetinizin kilidini açmaq üçün yanlış cəhdlər etdiniz. <xliff:g id="NUMBER_1">%2$d</xliff:g> uğursuz cəhddən sonra bütün profil məlumatlarını siləcək iş profili silinəcəkdir."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Siz <xliff:g id="NUMBER_0">%1$d</xliff:g> dəfə telefonunuzun kilidini açmaq üçün yanlış cəhdlər etdiniz. <xliff:g id="NUMBER_1">%2$d</xliff:g> uğursuz cəhddən sonra bütün profil məlumatlarını siləcək iş profili silinəcəkdir."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Siz <xliff:g id="NUMBER">%d</xliff:g> dəfə planşetinizin kilidini açmaq üçün yanlış cəhdlər etdiniz. Bütün profil məlumatlarınızı siləcək iş profili silinəcəkdir."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Siz <xliff:g id="NUMBER">%d</xliff:g> dəfə telefonunuzun kilidini açmaq üçün yanlış cəhdlər etdiniz. Bütün profil məlumatlarınızı siləcək iş profili silinəcəkdir."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Siz kilidi açmaq üçün şablonu <xliff:g id="NUMBER_0">%1$d</xliff:g> dəfə səhv çəkdiniz. <xliff:g id="NUMBER_1">%2$d</xliff:g> daha uğursuz cəhddən sonra planşetinizin kilidini e-poçt hesabınızla açmaq tələb olunacaq.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> saniyə ərzində bir daha yoxlayın."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Siz artıq modeli <xliff:g id="NUMBER_0">%1$d</xliff:g> dəfə yanlış daxil etmisiniz.<xliff:g id="NUMBER_1">%2$d</xliff:g> dəfə də yanlış daxil etsəniz, telefonun kilidinin açılması üçün elektron poçt ünvanınız tələb olunacaq.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> saniyə ərzində yenidən cəhd edin."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Yanlış SIM PIN kodu  cihazınızın açılması üçün operatorunuzla indi əlaqə saxlamalısınız."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">Yanlış SIM PIN kodu, <xliff:g id="NUMBER_1">%d</xliff:g> cəhdiniz qalır.</item>
-      <item quantity="one">Yanlış SIM PIN kodu, cihazınızı kiliddən çıxarmaq üçün operatorunuzla əlaqə saxlamadan öncə <xliff:g id="NUMBER_0">%d</xliff:g> cəhdiniz qalır.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM yararsızdır. Operatorunuzla əlaqə saxlayın."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">Yanlış SIM PUK kodu, SIM kartınızın daimi olaraq yararsız olmasından öncə <xliff:g id="NUMBER_1">%d</xliff:g> cəhdiniz qalır.</item>
-      <item quantity="one">Yanlış SIM PUK kodu, SIM kartınızın daimi olaraq yararsız olmasından öncə <xliff:g id="NUMBER_0">%d</xliff:g> cəhdiniz qalır.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"SIM PIN əməliyyatı alınmadı!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"SIM PUK əməliyyatı alınmadı!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Kod Qəbul Edildi!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Xidmət yoxdur."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Daxiletmə metoduna keçin"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Təyyarə rejimi"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Cihaz söndürülüb yandırılandan sonra qrafik açar tələb olunur"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Cihaz yeniden başladıqdan sonra PIN tələb olunur"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Cihaz yeniden başladıqdan sonra parol tələb olunur"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Əlavə güvənlik üçün qrafik açar gərəkdir"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Əlavə təhlükəsizlik üçün PIN tələb olunur"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Əlavə təhlükəsizlik üçün parol tələb olunur"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Profillər arasında keçid edərkən qrafik açar tələb olunur"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Profillər arasında keçid edərkən PIN kod tələb olunur"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Profillər arasında keçid edərkən parol tələb olunur"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Cihaz administratoru cihazı kilidlədi"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Cihaz əl ilə kilidləndi"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Cihaz <xliff:g id="NUMBER_1">%d</xliff:g> saat kiliddən çıxarılmayıb. Nümunə kodu təsdiq edin.</item>
-      <item quantity="one">Cihaz <xliff:g id="NUMBER_0">%d</xliff:g> saat kiliddən çıxarılmayıb. Nümunə kodu təsdiq edin.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Cihaz<xliff:g id="NUMBER_1">%d</xliff:g> saat kiliddən çıxarılmayıb. PIN kodunu təsdiq edin.</item>
-      <item quantity="one">Cihaz <xliff:g id="NUMBER_0">%d</xliff:g> saat kiliddən çıxarılmayıb. PIN kodunu təsdiq edin.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Cihaz<xliff:g id="NUMBER_1">%d</xliff:g> saat kiliddən çıxarılmayıb. Parolu təsdiq edin.</item>
-      <item quantity="one">Cihaz <xliff:g id="NUMBER_0">%d</xliff:g> saat kiliddən çıxarılmayıb. Parolu təsdiq edin.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Tanınmır"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-b+sr+Latn/strings.xml b/packages/Keyguard/res/values-b+sr+Latn/strings.xml
deleted file mode 100644
index 8006125..0000000
--- a/packages/Keyguard/res/values-b+sr+Latn/strings.xml
+++ /dev/null
@@ -1,137 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Zaštita tastera"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Unesite PIN kôd"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Unesite SIM PUK kôd i novi PIN kôd"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM PUK kôd"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Novi SIM PIN kôd"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Dodirnite da biste uneli lozinku"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Otkucajte lozinku da biste otključali"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Unesite PIN za otključavanje"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"PIN kôd je netačan."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Napunjeno"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Punjenje"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Brzo se puni"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Sporo se puni"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Povežite punjač."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Pritisnite Meni da biste otključali."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Mreža je zaključana"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Nema SIM kartice"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"U tabletu nema SIM kartice."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"U telefonu nema SIM kartice."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Umetnite SIM karticu."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM kartica nedostaje ili ne može da se pročita. Umetnite SIM karticu."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"SIM kartica je neupotrebljiva."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"SIM kartica je trajno onemogućena.\n Obratite se dobavljaču usluge bežične mreže da biste dobili drugu SIM karticu."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM kartica je zaključana."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM kartica je zaključana PUK kodom."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Otključavanje SIM kartice…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Oblast za PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Oblast za PIN za SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Oblast za PUK za SIM"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Sledeći alarm je podešen za <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Izbriši"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Zaboravljeni šablon"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Pogrešan šablon"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Pogrešna lozinka"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Pogrešan PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Probajte ponovo za <xliff:g id="NUMBER">%d</xliff:g> sekunde(i)."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Nacrtajte šablon"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Unesite PIN SIM kartice"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Unesite PIN za SIM „<xliff:g id="CARRIER">%1$s</xliff:g>“"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Unesite PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Unesite lozinku"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM kartica je sada onemogućena. Unesite PUK kôd da biste nastavili. Za detalje kontaktirajte operatera."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM „<xliff:g id="CARRIER">%1$s</xliff:g>“ je sada onemogućen. Unesite PUK kôd da biste nastavili. Kontaktirajte operatera za detalje."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Unesite željeni PIN kôd"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Potvrdite željeni PIN kôd"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Otključavanje SIM kartice…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Unesite PIN koji ima od 4 do 8 brojeva."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK kôd treba da ima 8 ili više brojeva."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Ponovo unesite ispravni PUK kôd. Ponovljeni pokušaji će trajno onemogućiti SIM."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN kodovi se ne podudaraju"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Previše pokušaja unosa šablona"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Uneli ste netačni PIN <xliff:g id="NUMBER_0">%1$d</xliff:g> puta. \n\nProbajte ponovo za <xliff:g id="NUMBER_1">%2$d</xliff:g> sekunde(i)."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Uneli ste netačnu lozinku <xliff:g id="NUMBER_0">%1$d</xliff:g> puta. \n\nProbajte ponovo za <xliff:g id="NUMBER_1">%2$d</xliff:g> sekunde(i)."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Nacrtali ste šablon za otključavanje netačno <xliff:g id="NUMBER_0">%1$d</xliff:g> puta. \n\nProbajte ponovo za <xliff:g id="NUMBER_1">%2$d</xliff:g> sekunde(i)."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Pogrešno ste pokušali da otključate tablet <xliff:g id="NUMBER_0">%1$d</xliff:g> put(a). Imate još <xliff:g id="NUMBER_1">%2$d</xliff:g> pokušaj(a), nakon čega se tablet resetuje i svi podaci sa njega brišu."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Pogrešno ste pokušali da otključate telefon <xliff:g id="NUMBER_0">%1$d</xliff:g> put(a). Imate još <xliff:g id="NUMBER_1">%2$d</xliff:g> pokušaj(a), nakon čega se telefon resetuje i svi podaci sa njega brišu."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Pogrešno ste pokušali da otključate tablet <xliff:g id="NUMBER">%d</xliff:g> put(a). Tablet će biti resetovan i svi podaci sa njega će biti izbrisani."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Pogrešno ste pokušali da otključate telefon <xliff:g id="NUMBER">%d</xliff:g> put(a). Telefon će biti resetovan i svi podaci sa njega će biti izbrisani."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Pogrešno ste pokušali da otključate tablet <xliff:g id="NUMBER_0">%1$d</xliff:g> put(a). Imate još <xliff:g id="NUMBER_1">%2$d</xliff:g> pokušaj(a), nakon čega se ovaj korisnik uklanja i svi podaci korisnika brišu."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Pogrešno ste pokušali da otključate telefon <xliff:g id="NUMBER_0">%1$d</xliff:g> put(a). Imate još <xliff:g id="NUMBER_1">%2$d</xliff:g> pokušaj(a), nakon čega se ovaj korisnik uklanja i svi podaci korisnika brišu."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Pogrešno ste pokušali da otključate tablet <xliff:g id="NUMBER">%d</xliff:g> put(a). Ovaj korisnik će biti uklonjen i svi podaci korisnika će biti izbrisani."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Pogrešno ste pokušali da otključate telefon <xliff:g id="NUMBER">%d</xliff:g> put(a). Ovaj korisnik će biti uklonjen i svi podaci korisnika će biti izbrisani."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Pogrešno ste pokušali da otključate tablet <xliff:g id="NUMBER_0">%1$d</xliff:g> put(a). Imate još <xliff:g id="NUMBER_1">%2$d</xliff:g> pokušaj(a), nakon čega se poslovni profil uklanja i svi podaci sa profila brišu."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Pogrešno ste pokušali da otključate telefon <xliff:g id="NUMBER_0">%1$d</xliff:g> put(a). Imate još <xliff:g id="NUMBER_1">%2$d</xliff:g> pokušaj(a), nakon čega se poslovni profil uklanja i svi podaci sa profila brišu."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Pogrešno ste pokušali da otključate tablet <xliff:g id="NUMBER">%d</xliff:g> put(a). Poslovni profil će biti uklonjen i svi podaci sa njega će biti izbrisani."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Pogrešno ste pokušali da otključate telefon <xliff:g id="NUMBER">%d</xliff:g> put(a). Poslovni profil će biti uklonjen i svi podaci sa njega će biti izbrisani."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Nacrtali ste šablon za otključavanje netačno <xliff:g id="NUMBER_0">%1$d</xliff:g> puta. Posle još <xliff:g id="NUMBER_1">%2$d</xliff:g> neuspešna(ih) pokušaja, od vas će biti zatraženo da otključate tablet pomoću naloga e-pošte.\n\nProbajte ponovo za <xliff:g id="NUMBER_2">%3$d</xliff:g> sekunde(i)."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Nacrtali ste šablon za otključavanje netačno <xliff:g id="NUMBER_0">%1$d</xliff:g> puta. Posle još <xliff:g id="NUMBER_1">%2$d</xliff:g> neuspešna(ih) pokušaja, od vas će biti zatraženo da otključate telefon pomoću naloga e-pošte.\n\nProbajte ponovo za <xliff:g id="NUMBER_2">%3$d</xliff:g> sekunde(i)."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Netačan SIM PIN kôd. Sada morate da kontaktirate mobilnog operatera da biste otključali uređaj."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">Netačan SIM PIN kôd. Imate još <xliff:g id="NUMBER_1">%d</xliff:g> pokušaj.</item>
-      <item quantity="few">Netačan SIM PIN kôd. Imate još <xliff:g id="NUMBER_1">%d</xliff:g> pokušaja.</item>
-      <item quantity="other">Netačan SIM PIN kôd. Imate još <xliff:g id="NUMBER_1">%d</xliff:g> pokušaja.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM kartica je neupotrebljiva. Kontaktirajte mobilnog operatera."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">Netačan SIM PUK kôd. Imate još <xliff:g id="NUMBER_1">%d</xliff:g> pokušaj pre nego što SIM kartica postane trajno neupotrebljiva.</item>
-      <item quantity="few">Netačan SIM PUK kôd. Imate još <xliff:g id="NUMBER_1">%d</xliff:g> pokušaja pre nego što SIM kartica postane trajno neupotrebljiva.</item>
-      <item quantity="other">Netačan SIM PUK kôd. Imate još <xliff:g id="NUMBER_1">%d</xliff:g> pokušaja pre nego što SIM kartica postane trajno neupotrebljiva.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Radnja sa SIM PIN kodom nije uspela!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Radnja sa SIM PUK kodom nije uspela!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Kôd je prihvaćen!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Oflajn ste."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Promeni metod unosa"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Režim rada u avionu"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Treba da unesete šablon kada se uređaj ponovo pokrene"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Treba da unesete PIN kada se uređaj ponovo pokrene"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Treba da uneste lozinku kada se uređaj ponovo pokrene"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Treba da unesete šablon radi dodatne bezbednosti"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Treba da unesete PIN radi dodatne bezbednosti"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Treba da unesete lozinku radi dodatne bezbednosti"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Treba da unesete šablon kada prelazite sa jednog profila na drugi"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Treba da unesete PIN kada prelazite sa jednog profila na drugi"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Treba da unesete lozinku kada prelazite sa jednog profila na drugi"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Administrator uređaja je zaključao uređaj"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Uređaj je ručno zaključan"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">Niste otključali uređaj <xliff:g id="NUMBER_1">%d</xliff:g> sat. Potvrdite šablon.</item>
-      <item quantity="few">Niste otključali uređaj <xliff:g id="NUMBER_1">%d</xliff:g> sata. Potvrdite šablon.</item>
-      <item quantity="other">Niste otključali uređaj <xliff:g id="NUMBER_1">%d</xliff:g> sati. Potvrdite šablon.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">Niste otključali uređaj <xliff:g id="NUMBER_1">%d</xliff:g> sat. Potvrdite PIN.</item>
-      <item quantity="few">Niste otključali uređaj <xliff:g id="NUMBER_1">%d</xliff:g> sata. Potvrdite PIN.</item>
-      <item quantity="other">Niste otključali uređaj <xliff:g id="NUMBER_1">%d</xliff:g> sati. Potvrdite PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">Niste otključali uređaj <xliff:g id="NUMBER_1">%d</xliff:g> sat. Potvrdite lozinku.</item>
-      <item quantity="few">Niste otključali uređaj <xliff:g id="NUMBER_1">%d</xliff:g> sata. Potvrdite lozinku.</item>
-      <item quantity="other">Niste otključali uređaj <xliff:g id="NUMBER_1">%d</xliff:g> sati. Potvrdite lozinku.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Nije prepoznat"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-be/strings.xml b/packages/Keyguard/res/values-be/strings.xml
deleted file mode 100644
index f357961..0000000
--- a/packages/Keyguard/res/values-be/strings.xml
+++ /dev/null
@@ -1,142 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Keyguard"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Увядзіце PIN-код"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Увядзіце PUK-код і новы PIN-код SIM-карты"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"PUK-код SIM-карты"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Новы PIN-код SIM-карты"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Дакраніцеся, каб увесці пароль"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Увядзіце пароль для разблакавання"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Каб разблакаваць, увядзіце PIN-код"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Няправільны PIN-код."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Зараджаны"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Зарадка"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Зараджаецца хутка"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Зараджаецца павольна"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Падключыце зарадную прыладу."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Націсніце кнопку \"Меню\", каб разблакіраваць."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Сетка заблакiраваная"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Няма SIM-карты"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"У планшэце няма SIM-карты."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"У тэлефоне няма SIM-карты."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Устаўце SIM-карту."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM-карта адсутнічае ці не чытаецца. Устаўце SIM-карту."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"SIM-карту немагчыма выкарыстоўваць."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Ваша SIM-карта была адключана назаўсёды.\n Звяжыцеся з аператарам бесправадной сувязі, каб атрымаць іншую SIM-карту."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM-карта заблакiраваная."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM-карта заблакiравана PUK-кодам."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Разблакiраванне SIM-карты..."</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Поле для PIN-кода"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Поле для PIN-кода SIM-карты"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Поле для PUK-кода SIM-карты"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Наступны будзільнік пастаўлены на <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Выдаліць"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Забылі ключ"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Няправільны ўзор"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Няправiльны пароль"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Няправільны PIN-код"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Паўтарыце спробу праз <xliff:g id="NUMBER">%d</xliff:g> с."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Намалюйце ключ"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Увядзіце PIN-код SIM-карты"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Увядзіце PIN-код SIM-карты «<xliff:g id="CARRIER">%1$s</xliff:g>»"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Увядзіце PIN-код"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Увядзіце пароль"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM-карта зараз адключана. Увядзіце PUK-код, каб працягнуць. Звяжыцеся са сваiм аператарам, каб атрымаць дадатковую iнфармацыю."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM-карта «<xliff:g id="CARRIER">%1$s</xliff:g>» зараз адключана. Увядзіце PUK-код, каб працягнуць. Каб атрымаць дадатковую iнфармацыю, звяжыцеся з аператарам."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Увядзіце жаданы PIN-код"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Пацвердзіце жадан PIN-код"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Разблакiроўка SIM-карты..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Увядзіце PIN-код, які змяшчае ад 4 да 8 лічбаў."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK-код павінен утрымлiваць 8 лiчбаў і больш."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Паўторна увядзіце правільны PUK-код. Неаднаразовыя спробы назаўжды адключаць SIM-карту."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN-коды не супадаюць"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Занадта шмат спроб паўтарыць шаблон!"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Вы няправільна ўвялі PIN-код пэўную колькасць разоў: <xliff:g id="NUMBER_0">%1$d</xliff:g>. \n\nПаўтарыце спробу праз <xliff:g id="NUMBER_1">%2$d</xliff:g> с."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Вы няправільна ўвялі пароль пэўную колькасць разоў: <xliff:g id="NUMBER_0">%1$d</xliff:g>. \n\nПаўтарыце спробу праз <xliff:g id="NUMBER_1">%2$d</xliff:g> с."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Вы няправільна ўвялі графічны ключ разблакiроўкi пэўную колькасць разоў: <xliff:g id="NUMBER_0">%1$d</xliff:g>. \n\nПаўтарыце спробу праз <xliff:g id="NUMBER_1">%2$d</xliff:g> с."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Вы не змаглі разблакіраваць планшэт столькі разоў: <xliff:g id="NUMBER_0">%1$d</xliff:g>. Пасля яшчэ некалькіх няўдалых спроб (<xliff:g id="NUMBER_1">%2$d</xliff:g>) ён будзе скінуты да заводскіх налад, гэта прывядзе да выдалення ўсіх даных."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Вы не змаглі разблакіраваць тэлефон столькі разоў: <xliff:g id="NUMBER_0">%1$d</xliff:g>. Пасля яшчэ некалькіх няўдалых спроб (<xliff:g id="NUMBER_1">%2$d</xliff:g>) ён будзе скінуты да заводскіх налад, гэта прывядзе да выдалення ўсіх даных."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Вы не змаглі разблакіраваць планшэт столькі разоў: <xliff:g id="NUMBER">%d</xliff:g>. Цяпер ён будзе скінуты да заводскіх налад, гэты прывядзе да выдалення ўсіх даных."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Вы не змаглі разблакіраваць тэлефон столькі разоў: <xliff:g id="NUMBER">%d</xliff:g>. Цяпер ён будзе скінуты да заводскіх налад, гэты прывядзе да выдалення ўсіх даных."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Вы не змаглі разблакіраваць планшэт столькі разоў: <xliff:g id="NUMBER_0">%1$d</xliff:g>. Пасля яшчэ некалькіх няўдалых спроб (<xliff:g id="NUMBER_1">%2$d</xliff:g>) гэты карыстальнік будзе выдалены, гэта прывядзе да выдалення ўсіх карыстальніцкіх даных."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Вы не змаглі разблакіраваць тэлефон столькі разоў: <xliff:g id="NUMBER_0">%1$d</xliff:g>. Пасля яшчэ некалькіх няўдалых спроб (<xliff:g id="NUMBER_1">%2$d</xliff:g>) гэты карыстальнік будзе выдалены, гэта прывядзе да выдалення ўсіх карыстальніцкіх даных."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Вы не змаглі разблакіраваць планшэт столькі разоў: <xliff:g id="NUMBER">%d</xliff:g>. Гэты карыстальнік будзе выдалены, гэта прывядзе да выдалення ўсіх карыстальніцкіх даных."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Вы не змаглі разблакіраваць тэлефон столькі разоў: <xliff:g id="NUMBER">%d</xliff:g>. Гэты карыстальнік будзе выдалены, гэта прывядзе да выдалення ўсіх карыстальніцкіх даных."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Вы не змаглі разблакіраваць планшэт столькі разоў: <xliff:g id="NUMBER_0">%1$d</xliff:g>. Пасля яшчэ некалькіх няўдалых спроб (<xliff:g id="NUMBER_1">%2$d</xliff:g>) працоўны профіль будзе выдалены, гэта прывядзе да выдалення ўсіх даных у профілі."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Вы не змаглі разблакіраваць тэлефон столькі разоў: <xliff:g id="NUMBER_0">%1$d</xliff:g>. Пасля яшчэ некалькіх няўдалых спроб (<xliff:g id="NUMBER_1">%2$d</xliff:g>) працоўны профіль будзе выдалены, гэта прывядзе да выдалення ўсіх даных у профілі."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Вы не змаглі разблакіраваць планшэт столькі разоў: <xliff:g id="NUMBER">%d</xliff:g>. Працоўны профіль будзе выдалены, гэта прывядзе да выдалення ўсіх даных у профілі."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Вы не змаглі разблакіраваць тэлефон столькі разоў: <xliff:g id="NUMBER">%d</xliff:g>. Працоўны профіль будзе выдалены, гэта прывядзе да выдалення ўсіх даных у профілі."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Вы няправільна ўвялі графічны ключ разблакiроўкi пэўную колькасць разоў: <xliff:g id="NUMBER_0">%1$d</xliff:g>. Пасля яшчэ некалькiх няўдалых спроб (<xliff:g id="NUMBER_1">%2$d</xliff:g>) вам будзе прапанавана разблакiраваць тэлефон, увайшоўшы ў Google.\n\n Паўтарыце спробу праз <xliff:g id="NUMBER_2">%3$d</xliff:g> с."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Вы няправільна ўвялі графічны ключ разблакiроўкi пэўную колькасць разоў: <xliff:g id="NUMBER_0">%1$d</xliff:g>. Пасля яшчэ некалькiх няўдалых спроб (<xliff:g id="NUMBER_1">%2$d</xliff:g>) вам будзе прапанавана разблакiраваць тэлефон, увайшоўшы ў Google.\n\n Паўтарыце спробу праз <xliff:g id="NUMBER_2">%3$d</xliff:g> с."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Няправільны PIN-код SIM-карты, цяпер вы павінны звязацца з аператарам для разблакіроўкі прылады."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">Няправільны PIN-код SIM-карты, у вас засталася <xliff:g id="NUMBER_1">%d</xliff:g> спроба.</item>
-      <item quantity="few">Няправільны PIN-код SIM-карты, у вас засталося <xliff:g id="NUMBER_1">%d</xliff:g> спробы.</item>
-      <item quantity="many">Няправільны PIN-код SIM-карты, у вас засталося <xliff:g id="NUMBER_1">%d</xliff:g> спроб.</item>
-      <item quantity="other">Няправільны PIN-код SIM-карты, у вас засталося <xliff:g id="NUMBER_1">%d</xliff:g> спробы.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM-карта не прыдатная для выкарыстання. Звяжыцеся з аператарам."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">Няправільны PUK-код SIM-карты, у вас засталася <xliff:g id="NUMBER_1">%d</xliff:g> спроба перад тым, як SIM-карта перастане працаваць назаўжды.</item>
-      <item quantity="few">Няправільны PUK-код SIM-карты, у вас засталося <xliff:g id="NUMBER_1">%d</xliff:g> спробы перад тым, як SIM-карта перастане працаваць назаўжды.</item>
-      <item quantity="many">Няправільны PUK-код SIM-карты, у вас засталося <xliff:g id="NUMBER_1">%d</xliff:g> спроб перад тым, як SIM-карта перастане працаваць назаўжды.</item>
-      <item quantity="other">Няправільны PUK-код SIM-карты, у вас засталося <xliff:g id="NUMBER_1">%d</xliff:g> спробы перад тым, як SIM-карта перастане працаваць назаўжды.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Разблакіраваць SIM-карту PIN-кодам не атрымалася!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Разблакіраваць SIM-карту PUK-кодам не атрымалася!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Код прыняты!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Не абслугоўваецца."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Пераключэнне рэжыму ўводу"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Рэжым палёту"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Пасля перазапуску прылады патрабуецца ўзор"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Пасля перазапуску прылады патрабуецца PIN-код"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Пасля перазапуску прылады патрабуецца пароль"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Для забеспячэння дадатковай бяспекі патрабуецца ўзор"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Для забеспячэння дадатковай бяспекі патрабуецца PIN-код"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Для забеспячэння дадатковай бяспекі патрабуецца пароль"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Пры пераключэнні профіляў патрабуецца ўзор"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Пры пераключэнні профіляў патрабуецца PIN-код"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Пры пераключэнні профіляў патрабуецца пароль"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Адміністратар прылады заблакіраваў прыладу"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Прылада была заблакіравана ўручную"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">Прылада не была разблакіравана на працягу <xliff:g id="NUMBER_1">%d</xliff:g> гадзіны. Увядзіце ўзор.</item>
-      <item quantity="few">Прылада не была разблакіравана на працягу <xliff:g id="NUMBER_1">%d</xliff:g> гадзін. Увядзіце ўзор.</item>
-      <item quantity="many">Прылада не была разблакіравана на працягу <xliff:g id="NUMBER_1">%d</xliff:g> гадзін. Увядзіце ўзор.</item>
-      <item quantity="other">Прылада не была разблакіравана на працягу <xliff:g id="NUMBER_1">%d</xliff:g> гадзіны. Увядзіце ўзор.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">Прылада не была разблакіравана на працягу <xliff:g id="NUMBER_1">%d</xliff:g> гадзіны. Увядзіце PIN-код.</item>
-      <item quantity="few">Прылада не была разблакіравана на працягу <xliff:g id="NUMBER_1">%d</xliff:g> гадзін. Увядзіце PIN-код.</item>
-      <item quantity="many">Прылада не была разблакіравана на працягу <xliff:g id="NUMBER_1">%d</xliff:g> гадзін. Увядзіце PIN-код.</item>
-      <item quantity="other">Прылада не была разблакіравана на працягу <xliff:g id="NUMBER_1">%d</xliff:g> гадзіны. Увядзіце PIN-код.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">Прылада не была разблакіравана на працягу <xliff:g id="NUMBER_1">%d</xliff:g> гадзіны. Увядзіце пароль.</item>
-      <item quantity="few">Прылада не была разблакіравана на працягу <xliff:g id="NUMBER_1">%d</xliff:g> гадзін. Увядзіце пароль.</item>
-      <item quantity="many">Прылада не была разблакіравана на працягу <xliff:g id="NUMBER_1">%d</xliff:g> гадзін. Увядзіце пароль.</item>
-      <item quantity="other">Прылада не была разблакіравана на працягу <xliff:g id="NUMBER_1">%d</xliff:g> гадзіны. Увядзіце пароль.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Не распазнаны"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-bg/strings.xml b/packages/Keyguard/res/values-bg/strings.xml
deleted file mode 100644
index 988e97f..0000000
--- a/packages/Keyguard/res/values-bg/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Keyguard"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Въведете ПИН кода"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Въведете PUK за SIM картата и новия ПИН код"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"PUK код за SIM картата"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Нов ПИН код за SIM картата"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Докоснете и въведете парола"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Въведете парола, за да отключите"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Въведете ПИН, за да отключите"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Неправилен ПИН код."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Заредена"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Зарежда се"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Зарежда се бързо"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Зарежда се бавно"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Свържете зарядното си устройство."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Натиснете иконата за меню, за да отключите."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Мрежата е заключена"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Няма SIM карта"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"В таблета няма SIM карта."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"В телефона няма SIM карта."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Поставете SIM карта."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM картата липсва или е нечетима. Поставете SIM карта."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Неизползваема SIM карта."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"SIM картата ви е деактивирана за постоянно.\nЗа да получите друга, се свържете с доставчика на безжичната си услуга."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM картата е заключена."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM картата е заключена с PUK код."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"SIM картата се отключва…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Област за ПИН кода"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Област за ПИН кода на SIM картата"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Област за PUK кода на SIM картата"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Следващият будилник е зададен за <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Изтриване"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Забравена фигура"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Грешна фигура"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Грешна парола"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Грешен ПИН код"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Опитайте отново след <xliff:g id="NUMBER">%d</xliff:g> секунди."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Начертайте фигурата си"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Въведете ПИН кода за SIM картата"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Въведете ПИН кода на SIM картата за „<xliff:g id="CARRIER">%1$s</xliff:g>“"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Въведете ПИН код"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Въведете паролата"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM картата вече е деактивирана. Въведете PUK кода, за да продължите. Свържете се с оператора за подробности."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM картата „<xliff:g id="CARRIER">%1$s</xliff:g>“ вече е деактивирана. Въведете PUK код, за да продължите. За подробности се свържете с оператора си."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Въведете желания ПИН код"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Потвърдете желания ПИН код"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"SIM картата се отключва…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Въведете ПИН код с четири до осем цифри."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK кодът трябва да е с 8 или повече цифри."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Въведете отново правилния PUK код. Многократните опити ще деактивират за постоянно SIM картата."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"ПИН кодовете не съвпадат"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Опитите за фигурата са твърде много"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Въведохте неправилно ПИН кода си <xliff:g id="NUMBER_0">%1$d</xliff:g> пъти. \n\nОпитайте отново след <xliff:g id="NUMBER_1">%2$d</xliff:g> секунди."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Въведохте неправилно паролата си <xliff:g id="NUMBER_0">%1$d</xliff:g> пъти. \n\nОпитайте отново след <xliff:g id="NUMBER_1">%2$d</xliff:g> секунди."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Начертахте неправилно фигурата си за отключване <xliff:g id="NUMBER_0">%1$d</xliff:g> пъти. \n\nОпитайте отново след <xliff:g id="NUMBER_1">%2$d</xliff:g> секунди."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Неправилно опитахте да отключите таблета <xliff:g id="NUMBER_0">%1$d</xliff:g> пъти. След още <xliff:g id="NUMBER_1">%2$d</xliff:g> неуспешни опита той ще бъде нулиран, при което ще се изтрият всичките му данни."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Неправилно опитахте да отключите телефона <xliff:g id="NUMBER_0">%1$d</xliff:g> пъти. След още <xliff:g id="NUMBER_1">%2$d</xliff:g> неуспешни опита той ще бъде нулиран, при което ще се изтрият всичките му данни."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Неправилно опитахте да отключите таблета <xliff:g id="NUMBER">%d</xliff:g> пъти. Той ще бъде нулиран, при което ще се изтрият всичките му данни."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Неправилно опитахте да отключите телефона <xliff:g id="NUMBER">%d</xliff:g> пъти. Той ще бъде нулиран, при което ще се изтрият всичките му данни."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Неправилно опитахте да отключите таблета <xliff:g id="NUMBER_0">%1$d</xliff:g> пъти. След още <xliff:g id="NUMBER_1">%2$d</xliff:g> неуспешни опита този потребител ще бъде премахнат, при което ще се изтрият всички данни за него."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Неправилно опитахте да отключите телефона <xliff:g id="NUMBER_0">%1$d</xliff:g> пъти. След още <xliff:g id="NUMBER_1">%2$d</xliff:g> неуспешни опита този потребител ще бъде премахнат, при което ще се изтрият всички данни за него."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Неправилно опитахте да отключите таблета <xliff:g id="NUMBER">%d</xliff:g> пъти. Този потребител ще бъде премахнат, при което ще се изтрият всички данни за него."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Неправилно опитахте да отключите телефона <xliff:g id="NUMBER">%d</xliff:g> пъти. Този потребител ще бъде премахнат, при което ще се изтрият всички данни за него."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Неправилно опитахте да отключите таблета <xliff:g id="NUMBER_0">%1$d</xliff:g> пъти. След още <xliff:g id="NUMBER_1">%2$d</xliff:g> неуспешни опита служебният потребителски профил ще бъде премахнат, при което ще се изтрият всички данни за него."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Неправилно опитахте да отключите телефона <xliff:g id="NUMBER_0">%1$d</xliff:g> пъти. След още <xliff:g id="NUMBER_1">%2$d</xliff:g> неуспешни опита служебният потребителски профил ще бъде премахнат, при което ще се изтрият всички данни за него."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Неправилно опитахте да отключите таблета <xliff:g id="NUMBER">%d</xliff:g> пъти. Служебният потребителски профил ще бъде премахнат, при което ще се изтрият всички данни за него."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Неправилно опитахте да отключите телефона <xliff:g id="NUMBER">%d</xliff:g> пъти. Служебният потребителски профил ще бъде премахнат, при което ще се изтрият всички данни за него."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Начертахте неправилно фигурата си за отключване <xliff:g id="NUMBER_0">%1$d</xliff:g> пъти. След още <xliff:g id="NUMBER_1">%2$d</xliff:g> неуспешни опита ще бъдете помолени да отключите таблета посредством имейл адрес.\n\n Опитайте отново след <xliff:g id="NUMBER_2">%3$d</xliff:g> секунди."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Начертахте неправилно фигурата си за отключване <xliff:g id="NUMBER_0">%1$d</xliff:g> пъти. След още <xliff:g id="NUMBER_1">%2$d</xliff:g> неуспешни опита ще бъдете помолени да отключите телефона посредством имейл адрес.\n\n Опитайте отново след <xliff:g id="NUMBER_2">%3$d</xliff:g> секунди."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Неправилен ПИН код за SIM картата – сега трябва да се свържете с оператора си, за да отключите устройството."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">Неправилен ПИН код за SIM картата – остават ви <xliff:g id="NUMBER_1">%d</xliff:g> опита.</item>
-      <item quantity="one">Неправилен ПИН код за SIM картата – остава ви <xliff:g id="NUMBER_0">%d</xliff:g> опит, преди да трябва да се свържете с оператора си, за да отключите устройството.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM картата е неизползваема. Свържете се с оператора си."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">Неправилен PUK код за SIM картата – остават ви <xliff:g id="NUMBER_1">%d</xliff:g> опита, преди тя да стане неизползваема завинаги.</item>
-      <item quantity="one">Неправилен PUK код за SIM картата – остава ви <xliff:g id="NUMBER_0">%d</xliff:g> опит, преди тя да стане неизползваема завинаги.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Операцията с ПИН кода за SIM картата не бе успешна!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Операцията с PUK кода за SIM картата не бе успешна!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Кодът е приет!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Няма покритие."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Превключване на метода на въвеждане"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Самолетен режим"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"След рестартиране на устройството се изисква фигура"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"След рестартиране на устройството се изисква ПИН код"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"След рестартиране на устройството се изисква парола"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"За допълнителна сигурност се изисква фигура"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"За допълнителна сигурност се изисква ПИН код"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"За допълнителна сигурност се изисква парола"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"При превключване между потребителските профили се изисква фигура"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"При превключване между потребителските профили се изисква ПИН код"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"При превключване между потребителските профили се изисква парола"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Устройството е заключено от администратора му"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Устройството бе заключено ръчно"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Устройството не е отключвано от <xliff:g id="NUMBER_1">%d</xliff:g> часа. Потвърдете фигурата.</item>
-      <item quantity="one">Устройството не е отключвано от <xliff:g id="NUMBER_0">%d</xliff:g> час. Потвърдете фигурата.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Устройството не е отключвано от <xliff:g id="NUMBER_1">%d</xliff:g> часа. Потвърдете ПИН кода.</item>
-      <item quantity="one">Устройството не е отключвано от <xliff:g id="NUMBER_0">%d</xliff:g> час. Потвърдете ПИН кода.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Устройството не е отключвано от <xliff:g id="NUMBER_1">%d</xliff:g> часа. Потвърдете паролата.</item>
-      <item quantity="one">Устройството не е отключвано от <xliff:g id="NUMBER_0">%d</xliff:g> час. Потвърдете паролата.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Не е разпознато"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-bn/strings.xml b/packages/Keyguard/res/values-bn/strings.xml
deleted file mode 100644
index 1a2a8dd..0000000
--- a/packages/Keyguard/res/values-bn/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"কীগার্ড"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"পিন কোড লিখুন"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"সিম PUK এবং নতুন পিন কোড লিখুন"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"সিম PUK কোড"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"নতুন সিম পিন কোড"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"পাসওয়ার্ড লিখতে স্পর্শ করুন"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"আনলক করতে পাসওয়ার্ড লিখুন"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"আনলক করতে পিন লিখুন"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"ভুল পিন কোড৷"</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"চার্জ হয়েছে"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"চার্জ হচ্ছে"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"দ্রুত চার্জ হচ্ছে"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"ধীরে ধীরে চার্জ হচ্ছে"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"আপনার চার্জার সংযুক্ত করুন৷"</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"আনলক করতে মেনু টিপুন৷"</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"নেটওয়ার্ক লক হয়েছে"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"কোনো সিম কার্ড নেই"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"ট্যাবলেটের মধ্যে কোনো সিম কার্ড নেই৷"</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"ফোনের মধ্যে কোনো সিম কার্ড নেই৷"</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"একটি সিম কার্ড ঢোকান৷"</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"সিম কার্ডটি অনুপস্থিত বা পাঠযোগ্য নয়৷ একটি সিম কার্ড ঢোকান৷"</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"অব্যবহারযোগ্য সিম কার্ড৷"</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"আপনার সিম কার্ড স্থায়ীভাবে অক্ষম করা হয়েছে৷\n অন্য একটি সিম কার্ড পেতে আপনার ওয়্যারলেস পরিষেবা প্রদানকারীর সাথে যোগাযোগ করুন৷"</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"সিম কার্ড লক করা আছে৷"</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"সিম কার্ডটি PUK কোড দিয়ে লক করা আছে৷"</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"সিম কার্ড আনলক করা হচ্ছে…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"পিন অঞ্চল"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM পিন অঞ্চল"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM PUK অঞ্চল"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"<xliff:g id="ALARM">%1$s</xliff:g> এ পরবর্তী অ্যালার্ম সেট করা হয়েছে"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"মুছুন"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"প্যাটার্ন ভুলে গেছেন"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"ভুল প্যাটার্ন"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"ভুল পাসওয়ার্ড"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"ভুল পিন"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"<xliff:g id="NUMBER">%d</xliff:g> সেকেন্ডের মধ্যে আবার চেষ্টা করুন৷"</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"আপনার প্যাটার্ন আঁকুন"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"সিম পিন লিখুন"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"\"<xliff:g id="CARRIER">%1$s</xliff:g>\" এর জন্য SIM পিন লিখুন"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"পিন লিখুন"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"পাসওয়ার্ড লিখুন"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"সিম এখন অক্ষম করা হয়েছে৷ অবিরত থাকতে PUK কোডটি লিখুন৷ বিশদ বিবরণের জন্য ক্যারিয়ারের সাথে যোগাযোগ করুন৷"</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" এখন অক্ষম করা হয়েছে৷ চালিয়ে যেতে PUK কোড লিখুন৷ বিস্তারিত জানার জন্য ক্যারিয়ারের সাথে যোগাযোগ করুন৷"</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"কাঙ্ক্ষিত পিন কোড লিখুন"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"কাঙ্ক্ষিত পিন কোড নিশ্চিত করুন"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"সিম কার্ড আনলক করা হচ্ছে…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"৪ থেকে ৮টি সংখ্যার একটি পিন লিখুন৷"</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK কোডটিকে ৮টি বা তার বেশি সংখ্য বিশিষ্ট হতে হবে৷"</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"সঠিক PUK কোড পুনরায় লিখুন৷ বার বার প্রচেষ্টা করা হলে তা স্থায়ীভাবে সিমটিকে অক্ষম করে দেবে৷"</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"পিন কোডগুলি মিলছে না"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"বিভিন্ন প্যাটার্নের সাহায্যে খুব বেশি বার প্রচেষ্টা করা হয়ে গেছে"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"আপনি আপনার পাসওয়ার্ড <xliff:g id="NUMBER_0">%1$d</xliff:g> বার ভুল টাইপ করেছেন৷ \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> সেকেন্ডের মধ্যে আবার চেষ্টা করুন৷"</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"আপনি আপনার পাসওয়ার্ড <xliff:g id="NUMBER_0">%1$d</xliff:g> বার ভুল টাইপ করেছেন৷ \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> সেকেন্ডের মধ্যে আবার চেষ্টা করুন৷"</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"আপনি আপনার আনলকের প্যাটার্ন আঁকার ক্ষেত্রে <xliff:g id="NUMBER_0">%1$d</xliff:g> বার ভুল করেছেন৷ \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> সেকেন্ডের মধ্যে আবার চেষ্টা করুন৷"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"আপনি <xliff:g id="NUMBER_0">%1$d</xliff:g> বার ভুল করে ট্যাবলেট আনলক করার চেষ্টা করেছেন৷ <xliff:g id="NUMBER_1">%2$d</xliff:g>টি অসফল প্রচেষ্টার পরে, এই ট্যাবলেটটিকে পুনরায় সেট করা হবে যা এটির সমস্ত ডেটা মুছে ফেলবে৷"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"আপনি <xliff:g id="NUMBER_0">%1$d</xliff:g> বার ভুল করে ফোন আনলক করার চেষ্টা করেছেন৷ <xliff:g id="NUMBER_1">%2$d</xliff:g>টি অসফল প্রচেষ্টার পরে, এই ফোনটিকে পুনরায় সেট করা হবে যা এটির সমস্ত ডেটা মুছে ফেলবে৷"</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"আপনি <xliff:g id="NUMBER">%d</xliff:g> বার ভুল করে ট্যাবলেট আনলক করার চেষ্টা করেছেন৷ এই ট্যাবলেটটিকে পুনরায় সেট করা হবে যা এটির সমস্ত ডেটা মুছে ফেলবে৷"</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"আপনি <xliff:g id="NUMBER">%d</xliff:g> বার ভুল করে ফোন আনলক করার চেষ্টা করেছেন৷ এই ফোনটিকে পুনরায় সেট করা হবে যা এটির সমস্ত ডেটা মুছে ফেলবে৷"</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"আপনি <xliff:g id="NUMBER_0">%1$d</xliff:g> বার ভুল করে ট্যাবলেট আনলক করার চেষ্টা করেছেন৷ <xliff:g id="NUMBER_1">%2$d</xliff:g>টি অসফল প্রচেষ্টার পরে, এই ব্যবহারকারীকে সরানো হবে যা সমস্ত ব্যবহারকারীর ডেটা মুছে ফেলবে৷"</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"আপনি <xliff:g id="NUMBER_0">%1$d</xliff:g> বার ভুল করে ফোন আনলক করার চেষ্টা করেছেন৷ <xliff:g id="NUMBER_1">%2$d</xliff:g>টি অসফল প্রচেষ্টার পরে, এই ব্যবহারকারীকে সরানো হবে যা সমস্ত ব্যবহারকারীর ডেটা মুছে ফেলবে৷"</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"আপনি <xliff:g id="NUMBER">%d</xliff:g> বার ভুল করে ট্যাবলেটটি আনলক করার চেষ্টা করেছেন৷ এই ব্যবহারকারীকে সরানো হবে যা সমস্ত ব্যবহারকারীর ডেটা মুছে ফেলবে৷"</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"আপনি <xliff:g id="NUMBER">%d</xliff:g> বার ভুল করে ফোনটি আনলক করার চেষ্টা করেছেন৷ এই ব্যবহারকারীকে সরানো হবে যা সমস্ত ব্যবহারকারীর ডেটা মুছে ফেলবে৷"</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"আপনি <xliff:g id="NUMBER_0">%1$d</xliff:g> বার ভুল করে ট্যাবলেট আনলক করার চেষ্টা করেছেন৷ <xliff:g id="NUMBER_1">%2$d</xliff:g>টি অসফল প্রচেষ্টার পরে, কাজের প্রোফাইল সরানো হবে যা সমস্ত প্রোফাইল ডেটা মুছে ফেলবে৷"</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"আপনি <xliff:g id="NUMBER_0">%1$d</xliff:g> বার ভুল করে ফোন আনলক করার চেষ্টা করেছেন৷ <xliff:g id="NUMBER_1">%2$d</xliff:g>টি অসফল প্রচেষ্টার পরে, কাজের প্রোফাইল সরানো হবে যা সমস্ত প্রোফাইল ডেটা মুছে ফেলবে৷"</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"আপনি <xliff:g id="NUMBER">%d</xliff:g> বার ভুল করে ট্যাবলেটটি আনলক করার চেষ্টা করেছেন৷ কাজের প্রোফাইল সরানো হবে যা সমস্ত প্রোফাইল ডেটা মুছে ফেলবে৷"</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"আপনি <xliff:g id="NUMBER">%d</xliff:g> বার ভুল করে ফোনটি আনলক করার চেষ্টা করেছেন৷ কাজের প্রোফাইল সরানো হবে যা সমস্ত প্রোফাইল ডেটা মুছে ফেলবে৷"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"আপনি আপনার আনলকের প্যাটার্ন আঁকার ক্ষেত্রে <xliff:g id="NUMBER_0">%1$d</xliff:g> বার ভুল করেছেন৷ আর <xliff:g id="NUMBER_1">%2$d</xliff:g> বার অসফল প্রচেষ্টা করা হলে আপনাকে একটি ইমেল অ্যাকাউন্ট মারফত আপনার ট্যাবলেট আনলক করতে বলা হবে৷\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> সেকেন্ডের মধ্যে আবার চেষ্টা করুন৷"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"আপনি আপনার আনলকের প্যাটার্ন আঁকার ক্ষেত্রে <xliff:g id="NUMBER_0">%1$d</xliff:g> বার ভুল করেছেন৷ আর <xliff:g id="NUMBER_1">%2$d</xliff:g> বার অসফল প্রচেষ্টা করা হলে আপনাকে একটি ইমেল অ্যাকাউন্ট মারফত আপনার ফোন আনলক করতে বলা হবে৷\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> সেকেন্ডের মধ্যে আবার চেষ্টা করুন৷"</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"ভুল সিম পিন কোড, আপনার ডিভাইসটি আনলক করতে এখন আপনাকে অবশ্যই আপনার ক্যারিয়ারের সাথে যোগাযোগ করতে হবে৷"</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">ভুল SIM পিন কোড, আপনার কাছে আর <xliff:g id="NUMBER_1">%d</xliff:g>টি প্রচেষ্টা বাকি রয়েছে৷</item>
-      <item quantity="other">ভুল SIM পিন কোড, আপনার কাছে আর <xliff:g id="NUMBER_1">%d</xliff:g>টি প্রচেষ্টা বাকি রয়েছে৷</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIMটি ব্যবহারের অযোগ্য৷ আপনার ক্যারিয়ারের সাথে যোগাযোগ করুন৷"</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">ভুল SIM PUK কোড, আপনার কাছে আর <xliff:g id="NUMBER_1">%d</xliff:g>টি প্রচেষ্টা বাকি রয়েছে এটির পরেই আপনার SIM স্থায়ীভাবে অব্যবহারযোগ্য হবে৷</item>
-      <item quantity="other">ভুল SIM PUK কোড, আপনার কাছে আর <xliff:g id="NUMBER_1">%d</xliff:g>টি প্রচেষ্টা বাকি রয়েছে এটির পরেই আপনার SIM স্থায়ীভাবে অব্যবহারযোগ্য হবে৷</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"সিম পিন ক্রিয়াকলাপটি ব্যর্থ হয়েছে!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"সিম PUK ক্রিয়াকলাপটি ব্যর্থ হয়েছে!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"কোড স্বীকৃত হয়েছে!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"কোনো পরিষেবা নেই৷"</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"ইনপুট পদ্ধতি পাল্টান"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"বিমান মোড"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"ডিভাইস পুনরায় আরম্ভ করার পর প্যাটার্নের প্রয়োজন হবে"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"ডিভাইস পুনরায় আরম্ভ করার পর পিন এর প্রয়োজন হবে"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"ডিভাইস পুনরায় আরম্ভ করার পর পাসওয়ার্ডের প্রয়োজন হবে"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"অতিরিক্ত সুরক্ষার জন্য প্যাটার্ন প্রয়োজন"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"অতিরিক্ত সুরক্ষার জন্য পিন প্রয়োজন"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"অতিরিক্ত সুরক্ষার জন্য পাসওয়ার্ড প্রয়োজন"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"যখন আপনি প্রোফাইলগুলি পাল্টাবেন তখন প্যাটার্নের প্রয়োজন হবে"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"যখন আপনি প্রোফাইলগুলি পাল্টাবেন তখন পিন এর প্রয়োজন হবে"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"যখন আপনি প্রোফাইলগুলি পাল্টাবেন তখন পাসওয়ার্ডের প্রয়োজন হবে"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"ডিভাইস প্রশাসক ডিভাইসটিকে লক করেছেন"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"ডিভাইসটিকে নিজের হাতে লক করা হয়েছে"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">ডিভাইস <xliff:g id="NUMBER_1">%d</xliff:g> ঘন্টার জন্য আনলক করা হয়নি। প্যাটার্ন নিশ্চিত করুন।</item>
-      <item quantity="other">ডিভাইস <xliff:g id="NUMBER_1">%d</xliff:g> ঘন্টার জন্য আনলক করা হয়নি। প্যাটার্ন নিশ্চিত করুন।</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">ডিভাইস <xliff:g id="NUMBER_1">%d</xliff:g> ঘন্টার জন্য আনলক করা হয়নি। পিন নিশ্চিত করুন৷</item>
-      <item quantity="other">ডিভাইস <xliff:g id="NUMBER_1">%d</xliff:g> ঘন্টার জন্য আনলক করা হয়নি। পিন নিশ্চিত করুন৷</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">ডিভাইস <xliff:g id="NUMBER_1">%d</xliff:g> ঘন্টার জন্য আনলক করা হয়নি। পাসওয়ার্ড নিশ্চিত করুন৷</item>
-      <item quantity="other">ডিভাইস <xliff:g id="NUMBER_1">%d</xliff:g> ঘন্টার জন্য আনলক করা হয়নি। পাসওয়ার্ড নিশ্চিত করুন৷</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"স্বীকৃত নয়"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-bs/strings.xml b/packages/Keyguard/res/values-bs/strings.xml
deleted file mode 100644
index b8ff2a9..0000000
--- a/packages/Keyguard/res/values-bs/strings.xml
+++ /dev/null
@@ -1,137 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Čuvar tastature"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Unesite PIN"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Unesite SIM PUK i novi PIN kôd"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM PUK kôd"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Novi SIM PIN kôd"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Dodirnite za unos lozinke"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Unesite lozinku za otključavanje tipkovnice"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Unesite PIN za otključavanje tipkovnice"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Pogrešan PIN."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Napunjeno"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Punjenje"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Brzo punjenje"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Sporo punjenje"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Povežite na punjač."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Pritisnite meni da otključate."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Mreža je zaključana"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Nema SIM kartice"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Nema SIM kartice u tabletu."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Nema SIM kartice u telefonu."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Umetnite SIM karticu."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM kartica nedostaje ili se ne može pročitati. Umetnite SIM karticu."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Neupotrebljiva SIM kartica."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Vaša SIM kartica je trajno onemogućena. \n Obratite se svom pružaocu bežičnih usluga za drugu SIM karticu."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM kartica je zaključana."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM kartica je zaključana PUK kodom."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Otključavanje SIM kartice…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Prostor za PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Prostor za SIM PIN"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Prostor za SIM PUK"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Sljedeći alarm je podešen za <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Izbriši"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Potvrdi"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Zaboravili ste uzorak?"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Pogrešan uzorak"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Pogrešna lozinka"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Pogrešan PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Broj sekundi do sljedećeg pokušaja: <xliff:g id="NUMBER">%d</xliff:g>."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Nacrtajte obrazac"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Unesite PIN za SIM"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Unesite SIM PIN za \"<xliff:g id="CARRIER">%1$s</xliff:g>\""</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Unesite PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Unesite lozinku"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM je sada onemogućen. Unesite PUK kôd da nastavite. Obratite se operateru za detalje."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM operator \"<xliff:g id="CARRIER">%1$s</xliff:g>\" je sada isključen. Unesite PUK kôd da nastavite. Za više detalja obratite se operateru."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Unesite željeni PIN kôd"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Potvrdi željeni PIN kôd"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Otključavanje SIM kartice…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Unesite PIN koji sadrži od 4 do 8 brojeva."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK kôd treba da sadrži 8 brojeva ili više."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Ponovo unesite ispravan PUK kôd. Ponovljeni pokušaji će trajno onemogućiti SIM."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN kodovi se ne poklapaju"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Previše pokušaja otključavanja pomoću uzorka"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Pogrešno ste unijeli PIN <xliff:g id="NUMBER_0">%1$d</xliff:g> puta. \n\nBroj sekundi do sljedećeg pokušaja: <xliff:g id="NUMBER_1">%2$d</xliff:g>."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Pogrešno ste unijeli lozinku <xliff:g id="NUMBER_0">%1$d</xliff:g> puta. \n\nBroj sekundi do sljedećeg pokušaja: <xliff:g id="NUMBER_1">%2$d</xliff:g>."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Pogrešno ste nacrtali uzorak <xliff:g id="NUMBER_0">%1$d</xliff:g> puta. \n\nBroj sekundi do sljedećeg pokušaja: <xliff:g id="NUMBER_1">%2$d</xliff:g>."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Pokušali ste <xliff:g id="NUMBER_0">%1$d</xliff:g> puta neispravno otključati tablet. U slučaju još <xliff:g id="NUMBER_1">%2$d</xliff:g> pokušaja bez uspjeha, tablet će biti vraćen na fabričke postavke a svi podaci će biti izbrisani."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Pokušali ste <xliff:g id="NUMBER_0">%1$d</xliff:g> puta neispravno otključati telefon. U slučaju još <xliff:g id="NUMBER_1">%2$d</xliff:g> pokušaja bez uspjeha, telefon će biti vraćen na fabričke postavke a svi podaci će biti izbrisani."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Pokušali ste <xliff:g id="NUMBER">%d</xliff:g> puta neispravno otključati tablet. Tablet će sada biti vraćen na fabričke postavke a svi podaci će biti izbrisani."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Pokušali ste <xliff:g id="NUMBER">%d</xliff:g> puta neispravno otključati telefon. Telefon će sada biti vraćen na fabričke postavke a svi podaci će biti izbrisani."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Pokušali ste <xliff:g id="NUMBER_0">%1$d</xliff:g> puta neispravno otključati tablet. U slučaju još <xliff:g id="NUMBER_1">%2$d</xliff:g> pokušaja bez uspjeha, ovaj korisnik će biti uklonjen a svi podaci korisnika bit će izbrisani."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Pokušali ste <xliff:g id="NUMBER_0">%1$d</xliff:g> puta neispravno otključati telefon. U slučaju još <xliff:g id="NUMBER_1">%2$d</xliff:g> pokušaja bez uspjeha, ovaj korisnik će biti uklonjen a svi podaci korisnika bit će izbrisani."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Pokušali ste <xliff:g id="NUMBER">%d</xliff:g> puta neispravno otključati tablet. Korisnik će biti uklonjen a svi podaci korisnika bit će izbrisani."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Pokušali ste <xliff:g id="NUMBER">%d</xliff:g> puta neispravno otključati telefon. Korisnik će biti uklonjen a svi podaci korisnika bit će izbrisani."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Pokušali ste <xliff:g id="NUMBER_0">%1$d</xliff:g> puta neispravno otključati tablet. U slučaju još <xliff:g id="NUMBER_1">%2$d</xliff:g> pokušaja bez uspjeha, poslovni profil će biti uklonjen a svi podaci s profila bit će izbrisani."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Pokušali ste <xliff:g id="NUMBER_0">%1$d</xliff:g> puta neispravno otključati telefon. U slučaju još <xliff:g id="NUMBER_1">%2$d</xliff:g> pokušaja bez uspjeha, poslovni profil će biti uklonjen a svi podaci s profila bit će izbrisani."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Pokušali ste <xliff:g id="NUMBER">%d</xliff:g> puta neispravno otključati tablet. Poslovni profil će biti uklonjen a svi podaci s profila bit će izbrisani."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Pokušali ste <xliff:g id="NUMBER">%d</xliff:g> puta neispravno otključati telefon. Poslovni profil će biti uklonjen a svi podaci s profila bit će izbrisani."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Pogrešno ste nacrtali uzorak za otključavanje <xliff:g id="NUMBER_0">%1$d</xliff:g> puta. Ako napravite još <xliff:g id="NUMBER_1">%2$d</xliff:g> pokušaja bez uspjeha, od vas će se tražiti da otključate tablet pomoću e-pošte. \n\n Pokušajte ponovo za <xliff:g id="NUMBER_2">%3$d</xliff:g> sek."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Pogrešno ste nacrtali uzorak za otključavanje <xliff:g id="NUMBER_0">%1$d</xliff:g> puta. Ako napravite još <xliff:g id="NUMBER_1">%2$d</xliff:g> pokušaja bez uspjeha, od vas će se tražiti da otključate telefon pomoću e-pošte. \n\n Pokušajte ponovo za <xliff:g id="NUMBER_2">%3$d</xliff:g> sek."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Pogrešan PIN kôd za SIM. Morate obratiti svom operateru za otključavanje uređaja."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">PIN kôd za SIM karticu je netačan. Imate još <xliff:g id="NUMBER_1">%d</xliff:g> pokušaj.</item>
-      <item quantity="few">PIN kôd za SIM karticu je netačan. Imate još <xliff:g id="NUMBER_1">%d</xliff:g> pokušaja.</item>
-      <item quantity="other">PIN kôd za SIM karticu je netačan. Imate još <xliff:g id="NUMBER_1">%d</xliff:g> pokušaja.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM je neupotrebljiv. Obratite se svom operateru."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">PUK kôd za SIM karticu je netačan. Imate još <xliff:g id="NUMBER_1">%d</xliff:g> pokušaj prije nego SIM kartica postane trajno neupotrebljiva.</item>
-      <item quantity="few">PUK kôd za SIM karticu je netačan. Imate još <xliff:g id="NUMBER_1">%d</xliff:g> pokušaja prije nego SIM kartica postane trajno neupotrebljiva.</item>
-      <item quantity="other">PUK kôd za SIM karticu je netačan. Imate još <xliff:g id="NUMBER_1">%d</xliff:g> pokušaja prije nego SIM kartica postane trajno neupotrebljiva.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Korištenje PIN-a za SIM nije uspjelo!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Korištenje PUK-a za SIM nije uspjelo!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Kôd je prihvaćen"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Nema usluge."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Promijeni način unosa"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Način rada u avionu"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Potreban je uzorak nakon ponovnog pokretanja uređaja"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Potreban je PIN nakon ponovnog pokretanja uređaja"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Potrebna je lozinka nakon ponovnog pokretanja uređaja"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Uzorak je potreban radi dodatne sigurnosti"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"PIN je potreban radi dodatne sigurnosti"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Lozinka je potrebna radi dodatne sigurnosti"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Potreban je uzorak nakon prelaska na drugi profil"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Potreban je PIN nakon prelaska na drugi profil"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Potrebna je lozinka nakon prelaska na drugi profil"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Administrator je zaključao uređaj."</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Uređaj je ručno zaključan"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">Uređaj nije bio otključan <xliff:g id="NUMBER_1">%d</xliff:g> sat. Potvrdite obrazac.</item>
-      <item quantity="few">Uređaj nije bio otključan <xliff:g id="NUMBER_1">%d</xliff:g> sata. Potvrdite obrazac.</item>
-      <item quantity="other">Uređaj nije bio otključan <xliff:g id="NUMBER_1">%d</xliff:g> sati. Potvrdite obrazac.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">Uređaj nije bio otključan <xliff:g id="NUMBER_1">%d</xliff:g> sat. Potvrdite PIN.</item>
-      <item quantity="few">Uređaj nije bio otključan <xliff:g id="NUMBER_1">%d</xliff:g> sata. Potvrdite PIN.</item>
-      <item quantity="other">Uređaj nije bio otključan <xliff:g id="NUMBER_1">%d</xliff:g> sati. Potvrdite PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">Uređaj nije bio otključan <xliff:g id="NUMBER_1">%d</xliff:g> sat. Potvrdite lozinku.</item>
-      <item quantity="few">Uređaj nije bio otključan <xliff:g id="NUMBER_1">%d</xliff:g> sata. Potvrdite lozinku.</item>
-      <item quantity="other">Uređaj nije bio otključan <xliff:g id="NUMBER_1">%d</xliff:g> sati. Potvrdite lozinku.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Nije prepoznat"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-ca/strings.xml b/packages/Keyguard/res/values-ca/strings.xml
deleted file mode 100644
index 9207e0e..0000000
--- a/packages/Keyguard/res/values-ca/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Bloqueig de teclat"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Introdueix el codi PIN"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Escriu el PUK de la SIM i el codi PIN nou."</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"Codi PUK de la SIM"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Codi PIN de la SIM nou"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Toca per introduir contrasenya"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Introdueix la contrasenya per desbloquejar"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Introdueix la contrasenya per desbloquejar"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Codi PIN incorrecte."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Carregada"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Carregant"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"S\'està carregant ràpidament"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"S\'està carregant lentament"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Connecta el carregador."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Prem Menú per desbloquejar."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Xarxa bloquejada"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"No hi ha cap targeta SIM."</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"No hi ha cap targeta SIM a la tauleta."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"No hi ha cap targeta SIM al telèfon."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Insereix una targeta SIM."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"Falta la targeta SIM o no es pot llegir. Insereix-ne una."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Targeta SIM no utilitzable."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"La targeta SIM s\'ha desactivat permanentment.\n Contacta amb el teu proveïdor de serveis sense fil per obtenir-ne una altra."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"La targeta SIM està bloquejada."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"La targeta SIM està bloquejada pel PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"S\'està desbloquejant la targeta SIM..."</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Zona del PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Zona del PIN de la SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Zona del PUK de la SIM"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"S\'ha definit la pròxima alarma per a les: <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Suprimeix"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Retorn"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Patró oblidat"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Patró incorrecte"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Contrasenya incorrecta"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"PIN incorrecte"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Torna-ho a provar d\'aquí a <xliff:g id="NUMBER">%d</xliff:g> segons."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Dibuixa el patró"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Introdueix el PIN de la SIM"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Introdueix el PIN de la SIM de <xliff:g id="CARRIER">%1$s</xliff:g>."</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Introdueix el PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Introdueix la contrasenya"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"La SIM està desactivada. Introdueix el codi PUK per continuar. Contacta amb l\'operador de telefonia mòbil per obtenir detalls."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"La SIM de <xliff:g id="CARRIER">%1$s</xliff:g> està desactivada. Introdueix el codi PUK per continuar. Contacta amb l\'operador de telefonia mòbil per obtenir més informació."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Introdueix el codi PIN"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Confirma el codi PIN"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"S\'està desbloquejant la targeta SIM..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Escriu un PIN que tingui de 4 a 8 números."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"El codi PUK ha de tenir 8 números o més."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Torna a introduir el codi PUK correcte. Els intents repetits faran que es desactivi la SIM de manera permanent."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Els codis PIN no coincideixen"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Massa intents incorrectes"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Has escrit malament el PIN <xliff:g id="NUMBER_0">%1$d</xliff:g> vegades. \n\nTorna-ho a provar d\'aquí a <xliff:g id="NUMBER_1">%2$d</xliff:g> segons."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Has escrit malament la contrasenya <xliff:g id="NUMBER_0">%1$d</xliff:g> vegades. \n\nTorna-ho a provar d\'aquí a <xliff:g id="NUMBER_1">%2$d</xliff:g> segons."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Has dibuixat el patró de desbloqueig de manera incorrecta <xliff:g id="NUMBER_0">%1$d</xliff:g> vegades. \n\nTorna-ho a provar d\'aquí a <xliff:g id="NUMBER_1">%2$d</xliff:g> segons."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Has provat de desbloquejar la tauleta incorrectament <xliff:g id="NUMBER_0">%1$d</xliff:g> vegades. Et queden <xliff:g id="NUMBER_1">%2$d</xliff:g> intents més. Si no ho fas bé, la tauleta es restablirà i se n\'esborraran totes les dades."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Has provat de desbloquejar el telèfon incorrectament <xliff:g id="NUMBER_0">%1$d</xliff:g> vegades. Et queden <xliff:g id="NUMBER_1">%2$d</xliff:g> intents més. Si no ho fas bé, el telèfon es restablirà i se n\'esborraran totes les dades."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Has provat de desbloquejar la tauleta incorrectament <xliff:g id="NUMBER">%d</xliff:g> vegades. La tauleta es restablirà i se n\'esborraran totes les dades."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Has provat de desbloquejar el telèfon incorrectament <xliff:g id="NUMBER">%d</xliff:g> vegades. El telèfon es restablirà i se n\'esborraran totes les dades."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Has provat de desbloquejar la tauleta incorrectament <xliff:g id="NUMBER_0">%1$d</xliff:g> vegades. Et queden <xliff:g id="NUMBER_1">%2$d</xliff:g> intents més. Si no ho fas bé, l\'usuari se suprimirà, juntament amb totes les seves dades."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Has provat de desbloquejar el telèfon incorrectament <xliff:g id="NUMBER_0">%1$d</xliff:g> vegades. Et queden <xliff:g id="NUMBER_1">%2$d</xliff:g> intents més. Si no ho fas bé, l\'usuari se suprimirà, juntament amb totes les seves dades."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Has provat de desbloquejar la tauleta incorrectament <xliff:g id="NUMBER">%d</xliff:g> vegades. L\'usuari se suprimirà, juntament amb totes les seves dades."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Has provat de desbloquejar el telèfon incorrectament <xliff:g id="NUMBER">%d</xliff:g> vegades. L\'usuari se suprimirà, juntament amb totes les seves dades."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Has provat de desbloquejar la tauleta incorrectament <xliff:g id="NUMBER_0">%1$d</xliff:g> vegades. Et queden <xliff:g id="NUMBER_1">%2$d</xliff:g> intents més. Si no ho fas bé, el perfil professional se suprimirà, juntament amb totes les dades que contingui."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Has provat de desbloquejar el telèfon incorrectament <xliff:g id="NUMBER_0">%1$d</xliff:g> vegades. Et queden <xliff:g id="NUMBER_1">%2$d</xliff:g> intents més. Si no ho fas bé, el perfil professional se suprimirà, juntament amb totes les dades que contingui."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Has provat de desbloquejar la tauleta incorrectament <xliff:g id="NUMBER">%d</xliff:g> vegades. El perfil professional se suprimirà, juntament amb totes les dades que contingui."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Has provat de desbloquejar el telèfon incorrectament <xliff:g id="NUMBER">%d</xliff:g> vegades. El perfil professional se suprimirà, juntament amb totes les dades que contingui."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Has dibuixat el patró de desbloqueig <xliff:g id="NUMBER_0">%1$d</xliff:g> vegades de manera incorrecta. Si falles <xliff:g id="NUMBER_1">%2$d</xliff:g> vegades més, se\'t demanarà que desbloquegis la tauleta amb un compte de correu electrònic.\n\n Torna-ho a provar d\'aquí a <xliff:g id="NUMBER_2">%3$d</xliff:g> segons."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Has dibuixat el patró de desbloqueig <xliff:g id="NUMBER_0">%1$d</xliff:g> vegades de manera incorrecta. Si falles <xliff:g id="NUMBER_1">%2$d</xliff:g> vegades més, se\'t demanarà que desbloquegis el telèfon amb un compte de correu electrònic.\n\n Torna-ho a provar d\'aquí a <xliff:g id="NUMBER_2">%3$d</xliff:g> segons."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"El codi PIN de la SIM no és correcte. Has de contactar amb l\'operador de telefonia mòbil per desbloquejar el dispositiu."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">El codi PIN de la SIM no és correcte. Et queden <xliff:g id="NUMBER_1">%d</xliff:g> intents.</item>
-      <item quantity="one">El codi PIN de la SIM no és correcte. Et queda <xliff:g id="NUMBER_0">%d</xliff:g> intent; si no l\'encertes, contacta amb l\'operador de telefonia mòbil per desbloquejar el dispositiu.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"La SIM no es pot utilitzar. Contacta amb l\'operador de telefonia mòbil."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">El codi PUK de la SIM no és correcte. Et queden <xliff:g id="NUMBER_1">%d</xliff:g> intents; si no l\'encertes, la SIM no es podrà tornar a fer servir.</item>
-      <item quantity="one">El codi PUK de la SIM no és correcte. Et queda <xliff:g id="NUMBER_0">%d</xliff:g> intent; si no l\'encertes, la SIM no es podrà tornar a fer servir.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Hi ha hagut un problema en l\'operació del PIN de la SIM."</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Hi ha hagut un problema en l\'operació del PUK de la SIM."</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"S\'ha acceptat el codi."</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Sense servei."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Canvia el mètode d\'introducció"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Mode d\'avió"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Cal introduir el patró quan es reinicia el dispositiu"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Cal introduir el PIN quan es reinicia el dispositiu"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Cal introduir la contrasenya quan es reinicia el dispositiu"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Cal introduir el patró per disposar de més seguretat"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Cal introduir el PIN per disposar de més seguretat"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Cal introduir la contrasenya per disposar de més seguretat"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Cal introduir el patró en canviar de perfil"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Cal introduir el PIN en canviar de perfil"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Cal introduir la contrasenya en canviar de perfil"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"L\'administrador ha bloquejat el dispositiu"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"El dispositiu s\'ha bloquejat manualment"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Fa <xliff:g id="NUMBER_1">%d</xliff:g> hores que no es desbloqueja el dispositiu. Confirma el patró.</item>
-      <item quantity="one">Fa <xliff:g id="NUMBER_0">%d</xliff:g> hora que no es desbloqueja el dispositiu. Confirma el patró.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Fa <xliff:g id="NUMBER_1">%d</xliff:g> hores que no es desbloqueja el dispositiu. Confirma el PIN.</item>
-      <item quantity="one">Fa <xliff:g id="NUMBER_0">%d</xliff:g> hora que no es desbloqueja el dispositiu. Confirma el PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Fa <xliff:g id="NUMBER_1">%d</xliff:g> hores que no es desbloqueja el dispositiu. Confirma la contrasenya.</item>
-      <item quantity="one">Fa <xliff:g id="NUMBER_0">%d</xliff:g> hora que no es desbloqueja el dispositiu. Confirma la contrasenya.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"No s\'ha reconegut"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-cs/strings.xml b/packages/Keyguard/res/values-cs/strings.xml
deleted file mode 100644
index aa7115d..0000000
--- a/packages/Keyguard/res/values-cs/strings.xml
+++ /dev/null
@@ -1,142 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Uzamčení kláves"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Zadejte kód PIN"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Zadejte kód PUK SIM karty a nový kód PIN."</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"Kód PUK SIM karty"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Nový kód PIN SIM karty"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Dotykem zadáte heslo"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Zadejte heslo pro odemknutí"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Zadejte kód PIN pro odemknutí"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Nesprávný kód PIN."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Nabito"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Nabíjení"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Rychlé nabíjení"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Pomalé nabíjení"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Připojte dobíjecí zařízení."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Telefon odemknete stisknutím tlačítka Menu."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Síť je blokována"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Není vložena SIM karta."</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"V tabletu není SIM karta."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"V telefonu není SIM karta."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Vložte SIM kartu."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM karta chybí nebo je nečitelná. Vložte SIM kartu."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Nepoužitelná SIM karta."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Vaše SIM karta byla natrvalo zablokována.\n Požádejte svého poskytovatele bezdrátových služeb o další SIM kartu."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM karta je zablokována."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM karta je zablokována pomocí kódu PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Odblokování SIM karty…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Oblast kódu PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Oblast kódu PIN SIM karty"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Oblast kódu PUK SIM karty"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Další budík je nastaven na <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Smazat"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Zapomenuté gesto"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Nesprávné gesto"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Nesprávné heslo"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Nesprávný kód PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Zkuste to znovu za <xliff:g id="NUMBER">%d</xliff:g> s."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Nakreslete gesto"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Zadejte kód PIN SIM karty"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Zadejte PIN SIM karty <xliff:g id="CARRIER">%1$s</xliff:g>."</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Zadejte kód PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Zadejte heslo"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM karta byla deaktivována. Chcete-li pokračovat, je třeba zadat kód PUK. Podrobné informace získáte od operátora."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM karta <xliff:g id="CARRIER">%1$s</xliff:g> je nyní zakázána. Chcete-li pokračovat, zadejte kód PUK. Podrobnosti vám poskytne operátor."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Zadejte požadovaný kód PIN."</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Potvrďte požadovaný kód PIN."</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Odblokování SIM karty..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Zadejte kód PIN o délce 4–8 číslic."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"Minimální délka kódu PUK je 8 číslic."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Znovu zadejte správný kód PUK. Opakovanými pokusy SIM kartu trvale deaktivujete."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Kódy PIN se neshodují."</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Příliš mnoho pokusů o nakreslení gesta"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Již <xliff:g id="NUMBER_0">%1$d</xliff:g>krát jste zadali nesprávný kód PIN. \n\nZkuste to znovu za <xliff:g id="NUMBER_1">%2$d</xliff:g> s."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Již <xliff:g id="NUMBER_0">%1$d</xliff:g>krát jste nesprávně zadali heslo. \n\nZkuste to znovu za <xliff:g id="NUMBER_1">%2$d</xliff:g> s."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Již <xliff:g id="NUMBER_0">%1$d</xliff:g>krát jste zadali nesprávné bezpečnostní gesto. \n\nZkuste to znovu za <xliff:g id="NUMBER_1">%2$d</xliff:g> s."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Již jste se <xliff:g id="NUMBER_0">%1$d</xliff:g>krát pokusili odemknout tablet nesprávným způsobem. Po <xliff:g id="NUMBER_1">%2$d</xliff:g> dalších neúspěšných pokusech bude tablet resetován, čímž se z něj smažou všechna data."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Již jste se <xliff:g id="NUMBER_0">%1$d</xliff:g>krát pokusili odemknout telefon nesprávným způsobem. Po <xliff:g id="NUMBER_1">%2$d</xliff:g> dalších neúspěšných pokusech bude telefon resetován, čímž se z něj smažou všechna data."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Již jste se <xliff:g id="NUMBER">%d</xliff:g>krát pokusili odemknout tablet nesprávným způsobem. Tablet bude resetován, čímž z něj budou smazána všechna data."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Již jste se <xliff:g id="NUMBER">%d</xliff:g>krát pokusili odemknout telefon nesprávným způsobem. Telefon bude resetován, čímž z něj budou smazána všechna data."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Již jste se <xliff:g id="NUMBER_0">%1$d</xliff:g>krát pokusili odemknout tablet nesprávným způsobem. Po <xliff:g id="NUMBER_1">%2$d</xliff:g> dalších neúspěšných pokusech bude tento uživatel odstraněn, čímž se smažou všechna jeho data."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Již jste se <xliff:g id="NUMBER_0">%1$d</xliff:g>krát pokusili odemknout telefon nesprávným způsobem. Po <xliff:g id="NUMBER_1">%2$d</xliff:g> dalších neúspěšných pokusech bude tento uživatel odstraněn, čímž se smažou všechna jeho data."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Již jste se <xliff:g id="NUMBER">%d</xliff:g>krát pokusili odemknout tablet nesprávným způsobem. Uživatel bude odstraněn, čímž budou smazána všechna jeho data."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Již jste se <xliff:g id="NUMBER">%d</xliff:g>krát pokusili odemknout telefon nesprávným způsobem. Uživatel bude odstraněn, čímž budou smazána všechna jeho data."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Již jste se <xliff:g id="NUMBER_0">%1$d</xliff:g>krát pokusili odemknout tablet nesprávným způsobem. Po <xliff:g id="NUMBER_1">%2$d</xliff:g> dalších neúspěšných pokusech bude pracovní profil odstraněn, čímž se smažou všechna jeho data."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Již jste se <xliff:g id="NUMBER_0">%1$d</xliff:g>krát pokusili odemknout telefon nesprávným způsobem. Po <xliff:g id="NUMBER_1">%2$d</xliff:g> dalších neúspěšných pokusech bude pracovní profil odstraněn, čímž se smažou všechna jeho data."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Již jste se <xliff:g id="NUMBER">%d</xliff:g>krát pokusili odemknout tablet nesprávným způsobem. Pracovní profil bude odstraněn, čímž budou smazána všechna jeho data."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Již jste se <xliff:g id="NUMBER">%d</xliff:g>krát pokusili odemknout telefon nesprávným způsobem. Pracovní profil bude odstraněn, čímž budou smazána všechna jeho data."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Již <xliff:g id="NUMBER_0">%1$d</xliff:g>krát jste nesprávně nakreslili své heslo odemknutí. Po <xliff:g id="NUMBER_1">%2$d</xliff:g>dalších neúspěšných pokusech budete požádáni o odemčení tabletu pomocí e-mailového účtu.\n\n Zkuste to znovu za <xliff:g id="NUMBER_2">%3$d</xliff:g> s."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Již <xliff:g id="NUMBER_0">%1$d</xliff:g>krát jste nesprávně nakreslili své heslo odemknutí. Po <xliff:g id="NUMBER_1">%2$d</xliff:g> dalších neúspěšných pokusech budete požádáni o odemčení telefonu pomocí e-mailového účtu.\n\n Zkuste to znovu za <xliff:g id="NUMBER_2">%3$d</xliff:g> s."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Zadali jste nesprávný kód PIN SIM karty. Nyní musíte za účelem odemknutí zařízení kontaktovat svého operátora."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="few">Zadali jste nesprávný kód PIN SIM karty. Máte ještě <xliff:g id="NUMBER_1">%d</xliff:g> pokusy.</item>
-      <item quantity="many">Zadali jste nesprávný kód PIN SIM karty. Máte ještě <xliff:g id="NUMBER_1">%d</xliff:g> pokusu.</item>
-      <item quantity="other">Zadali jste nesprávný kód PIN SIM karty. Máte ještě <xliff:g id="NUMBER_1">%d</xliff:g> pokusů.</item>
-      <item quantity="one">Zadali jste nesprávný PIN SIM karty. Zbývá <xliff:g id="NUMBER_0">%d</xliff:g> pokus, poté bude muset zařízení odemknout operátor.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM kartu nelze použít. Kontaktujte operátora."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="few">Nesprávný kód PUK SIM karty. Máte ještě <xliff:g id="NUMBER_1">%d</xliff:g> pokusy, poté bude SIM karta natrvalo zablokována.</item>
-      <item quantity="many">Nesprávný kód PUK SIM karty. Máte ještě <xliff:g id="NUMBER_1">%d</xliff:g> pokusu, poté bude SIM karta natrvalo zablokována.</item>
-      <item quantity="other">Nesprávný kód PUK SIM karty. Máte ještě <xliff:g id="NUMBER_1">%d</xliff:g> pokusů, poté bude SIM karta natrvalo zablokována.</item>
-      <item quantity="one">Nesprávný kód PUK SIM karty. Máte ještě <xliff:g id="NUMBER_0">%d</xliff:g> pokus, poté bude SIM karta natrvalo zablokována.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Operace pomocí kódu PIN SIM karty se nezdařila!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Operace pomocí kódu PUK SIM karty se nezdařila!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Kód byl přijat."</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Žádný signál."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Přepnout metodu zadávání"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Režim Letadlo"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Po restartování zařízení je vyžadováno gesto"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Po restartování zařízení je vyžadován kód PIN"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Po restartování zařízení je vyžadováno heslo"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Za účelem zvýšení zabezpečení je vyžadováno gesto"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Za účelem zvýšení zabezpečení je vyžadován kód PIN"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Za účelem zvýšení zabezpečení je vyžadováno heslo"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Po přepnutí profilů je vyžadováno gesto"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Po přepnutí profilů je vyžadován kód PIN"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Po přepnutí profilů je vyžadováno heslo"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Správce zařízení toto zařízení uzamkl"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Zařízení bylo ručně uzamčeno"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="few">Zařízení již <xliff:g id="NUMBER_1">%d</xliff:g> hodiny nebylo odemknuto. Potvrďte gesto.</item>
-      <item quantity="many">Zařízení již <xliff:g id="NUMBER_1">%d</xliff:g> hodiny nebylo odemknuto. Potvrďte gesto.</item>
-      <item quantity="other">Zařízení již <xliff:g id="NUMBER_1">%d</xliff:g> hodin nebylo odemknuto. Potvrďte gesto.</item>
-      <item quantity="one">Zařízení již <xliff:g id="NUMBER_0">%d</xliff:g> hodinu nebylo odemknuto. Potvrďte gesto.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="few">Zařízení již <xliff:g id="NUMBER_1">%d</xliff:g> hodiny nebylo odemknuto. Potvrďte PIN.</item>
-      <item quantity="many">Zařízení již <xliff:g id="NUMBER_1">%d</xliff:g> hodiny nebylo odemknuto. Potvrďte PIN.</item>
-      <item quantity="other">Zařízení již <xliff:g id="NUMBER_1">%d</xliff:g> hodin nebylo odemknuto. Potvrďte PIN.</item>
-      <item quantity="one">Zařízení již <xliff:g id="NUMBER_0">%d</xliff:g> hodinu nebylo odemknuto. Potvrďte PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="few">Zařízení již <xliff:g id="NUMBER_1">%d</xliff:g> hodiny nebylo odemknuto. Potvrďte heslo.</item>
-      <item quantity="many">Zařízení již <xliff:g id="NUMBER_1">%d</xliff:g> hodiny nebylo odemknuto. Potvrďte heslo.</item>
-      <item quantity="other">Zařízení již <xliff:g id="NUMBER_1">%d</xliff:g> hodin nebylo odemknuto. Potvrďte heslo.</item>
-      <item quantity="one">Zařízení již <xliff:g id="NUMBER_0">%d</xliff:g> hodinu nebylo odemknuto. Potvrďte heslo.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Nerozpoznáno"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-da/strings.xml b/packages/Keyguard/res/values-da/strings.xml
deleted file mode 100644
index b98a253..0000000
--- a/packages/Keyguard/res/values-da/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Tastaturlås"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Indtast pinkode"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Indtast PUK-koden til SIM-kortet og den nye pinkode"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"PUK-kode til SIM-kort"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Ny pinkode til SIM-kortet"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Tryk for at angive adgangskode"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Indtast adgangskoden for at låse op"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Indtast pinkode for at låse op"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Forkert pinkode."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Opladet"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Oplader"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Oplader hurtigt"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Oplader langsomt"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Tilslut din oplader."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Tryk på Menu for at låse op."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Netværket er låst"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Intet SIM-kort"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Der er ikke noget SIM-kort i tabletten."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Der er ikke noget SIM-kort i telefonen."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Indsæt et SIM-kort."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM-kortet mangler eller kan ikke læses. Indsæt et SIM-kort."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Ubrugeligt SIM-kort."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Dit SIM-kort er blevet permanent deaktiveret.\nKontakt din tjenesteudbyder for at få et nyt SIM-kort."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM-kortet er låst."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM-kort er låst med PUK-koden."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"SIM-kortet låses op…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Område for pinkoden"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Område for pinkoden til simkortet"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Område for PUK-koden til simkortet"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Næste alarm er indstillet til <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Slet"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Angiv"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Glemt mønster"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Forkert mønster"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Forkert adgangskode"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Forkert pinkode"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Prøv igen om <xliff:g id="NUMBER">%d</xliff:g> sekunder."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Tegn dit mønster"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Indtast pinkode til SIM"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Indtast SIM-pinkoden for \"<xliff:g id="CARRIER">%1$s</xliff:g>\""</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Indtast pinkode"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Angiv adgangskode"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM-kortet er nu deaktiveret. Indtast PUK-koden for at fortsætte. Kontakt mobiloperatøren for at få flere oplysninger."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM-kortet fra \"<xliff:g id="CARRIER">%1$s</xliff:g>\" er nu deaktiveret. Indtast PUK-koden for at fortsætte. Kontakt mobilselskabet for at få flere oplysninger."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Indtast den ønskede pinkode"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Bekræft den ønskede pinkode"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"SIM-kortet låses op…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Indtast en pinkode på mellem 4 og 8 tal."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK-koden skal være på 8 tal eller mere."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Indtast den korrekte PUK-kode. Gentagne forsøg vil permanent deaktivere SIM-kortet."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Pinkoderne stemmer ikke overens"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"For mange forsøg på at tegne mønstret korrekt"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Du har indtastet en forkert pinkode <xliff:g id="NUMBER_0">%1$d</xliff:g> gange. \n\nPrøv igen om <xliff:g id="NUMBER_1">%2$d</xliff:g> sekunder."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Du har indtastet din adgangskode forkert <xliff:g id="NUMBER_0">%1$d</xliff:g> gange. \n\nPrøv igen om <xliff:g id="NUMBER_1">%2$d</xliff:g> sekunder."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Du har tegnet dit oplåsningsmønster forkert <xliff:g id="NUMBER_0">%1$d</xliff:g> gange. \n\nPrøv igen om <xliff:g id="NUMBER_1">%2$d</xliff:g> sekunder."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Du har forsøgt at låse tabletten forkert op <xliff:g id="NUMBER_0">%1$d</xliff:g> gange. Efter endnu <xliff:g id="NUMBER_1">%2$d</xliff:g> mislykkede forsøg nulstilles denne tablet, hvilket vil slette alle dens data."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Du har forsøgt at låse telefonen forkert op <xliff:g id="NUMBER_0">%1$d</xliff:g> gange. Efter endnu <xliff:g id="NUMBER_1">%2$d</xliff:g> mislykkede forsøg nulstilles denne telefon, hvilket vil slette alle dens data."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Du har forsøgt at låse tabletten forkert op <xliff:g id="NUMBER">%d</xliff:g> gange. Tabletten nulstilles, hvilket vil slette alle dens data."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Du har forsøgt at låse telefonen forkert op <xliff:g id="NUMBER">%d</xliff:g> gange. Telefonen nulstilles, hvilket vil slette alle dens data."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Du har forsøgt at låse tabletten forkert op <xliff:g id="NUMBER_0">%1$d</xliff:g> gange. Efter endnu <xliff:g id="NUMBER_1">%2$d</xliff:g> mislykkede forsøg fjernes denne bruger, hvilket vil slette alle brugerdata."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Du har forsøgt at låse telefonen forkert op <xliff:g id="NUMBER_0">%1$d</xliff:g> gange. Efter endnu <xliff:g id="NUMBER_1">%2$d</xliff:g> mislykkede forsøg fjernes denne bruger, hvilket vil slette alle brugerdata."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Du har forsøgt at låse tabletten forkert op <xliff:g id="NUMBER">%d</xliff:g> gange. Brugeren fjernes, hvilket vil slette alle brugerdata."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Du har forsøgt at låse telefonen forkert op <xliff:g id="NUMBER">%d</xliff:g> gange. Brugeren fjernes, hvilket vil slette alle brugerdata."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Du har forsøgt at låse tabletten forkert op <xliff:g id="NUMBER_0">%1$d</xliff:g> gange. Efter endnu <xliff:g id="NUMBER_1">%2$d</xliff:g> mislykkede forsøg fjernes arbejdsprofilen, hvilket vil slette alle profildata."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Du har forsøgt at låse telefonen forkert op <xliff:g id="NUMBER_0">%1$d</xliff:g> gange. Efter endnu <xliff:g id="NUMBER_1">%2$d</xliff:g> mislykkede forsøg fjernes arbejdsprofilen, hvilket vil slette alle profildata."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Du har forsøgt at låse tabletten forkert op <xliff:g id="NUMBER">%d</xliff:g> gange. Arbejdsprofilen fjernes, hvilket vil slette alle profildata."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Du har forsøgt at låse telefonen forkert op <xliff:g id="NUMBER">%d</xliff:g> gange. Arbejdsprofilen fjernes, hvilket vil slette alle profildata."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Du har tegnet dit oplåsningsmønster forkert <xliff:g id="NUMBER_0">%1$d</xliff:g> gange. Efter <xliff:g id="NUMBER_1">%2$d</xliff:g> yderligere mislykkede forsøg vil du blive bedt om at låse din tablet op ved hjælp af en e-mailkonto\n\n Prøv igen om <xliff:g id="NUMBER_2">%3$d</xliff:g> sekunder."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Du har tegnet dit oplåsningsmønster forkert <xliff:g id="NUMBER_0">%1$d</xliff:g> gange. Efter <xliff:g id="NUMBER_1">%2$d</xliff:g> yderligere mislykkede forsøg til vil du blive bedt om at låse din telefon op ved hjælp af en e-mailkonto.\n\n Prøv igen om <xliff:g id="NUMBER_2">%3$d</xliff:g> sekunder."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Forkert pinkode til SIM-kort. Du skal nu kontakte dit mobilselskab for at låse din enhed op."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">Forkert pinkode til SIM-kort. Du har <xliff:g id="NUMBER_1">%d</xliff:g> forsøg tilbage.</item>
-      <item quantity="other">Forkert pinkode til SIM-kort. Du har <xliff:g id="NUMBER_1">%d</xliff:g> forsøg tilbage.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM-kortet er ubrugeligt. Kontakt dit mobilselskab."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">Forkert PUK-kode til SIM-kort. Du har <xliff:g id="NUMBER_1">%d</xliff:g> forsøg tilbage, før SIM-kortet bliver permanent ubrugeligt.</item>
-      <item quantity="other">Forkert PUK-kode til SIM-kort. Du har <xliff:g id="NUMBER_1">%d</xliff:g> forsøg tilbage, før SIM-kortet bliver permanent ubrugeligt.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Pinkoden til SIM-kortet blev afvist."</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"PUK-koden til SIM-kortet blev afvist."</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Koden blev accepteret."</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Ingen dækning."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Skift indtastningsmetode"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Flytilstand"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Du skal indtaste et mønster efter genstart af enheden"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Der skal indtaste en pinkode efter genstart af enheden"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Du skal indtaste en adgangskode efter genstart af enheden"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Der kræves et mønster som ekstra beskyttelse"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Der kræves en pinkode som ekstra beskyttelse"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Der kræves en adgangskode som ekstra beskyttelse"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Du skal indtaste et mønster, når du skifter profil"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Du skal indtaste en pinkode, når du skifter profil"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Du skal indtaste en adgangskode, når du skifter profil"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Enhedsadministratoren har låst enheden"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Enheden blev låst manuelt"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">Enheden blev sidst låst op for <xliff:g id="NUMBER_1">%d</xliff:g> timer siden. Bekræft mønsteret.</item>
-      <item quantity="other">Enheden blev sidst låst op for <xliff:g id="NUMBER_1">%d</xliff:g> timer siden. Bekræft mønsteret.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">Enheden blev sidst låst op for <xliff:g id="NUMBER_1">%d</xliff:g> timer siden. Bekræft pinkoden.</item>
-      <item quantity="other">Enheden blev sidst låst op for <xliff:g id="NUMBER_1">%d</xliff:g> timer siden. Bekræft pinkoden.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">Enheden blev sidst låst op for <xliff:g id="NUMBER_1">%d</xliff:g> timer siden. Bekræft adgangskoden.</item>
-      <item quantity="other">Enheden blev sidst låst op for <xliff:g id="NUMBER_1">%d</xliff:g> timer siden. Bekræft adgangskoden.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Ikke genkendt"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-de/strings.xml b/packages/Keyguard/res/values-de/strings.xml
deleted file mode 100644
index a519ce8..0000000
--- a/packages/Keyguard/res/values-de/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Keyguard"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"PIN-Code eingeben"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Gib den PUK-Code der SIM-Karte und den neuen PIN-Code ein."</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"PUK-Code der SIM-Karte"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Neuer PIN-Code der SIM-Karte"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Zur Passworteingabe berühren"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Passwort zum Entsperren eingeben"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"PIN zum Entsperren eingeben"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Falscher PIN-Code"</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Aufgeladen"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Wird aufgeladen"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Schnelles Aufladen"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Langsames Aufladen"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Bitte Ladegerät anschließen"</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Zum Entsperren die Menütaste drücken"</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Netzwerk gesperrt"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Keine SIM-Karte"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Keine SIM-Karte im Tablet"</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Keine SIM-Karte im Telefon"</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Lege eine SIM-Karte ein."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM-Karte fehlt oder ist nicht lesbar. Bitte lege eine SIM-Karte ein."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"SIM-Karte unbrauchbar"</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Deine SIM-Karte wurde dauerhaft deaktiviert.\n Wende dich an deinen Mobilfunkanbieter, um eine andere SIM-Karte zu erhalten."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM-Karte ist gesperrt."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM-Karte ist gesperrt. PUK-Eingabe erforderlich."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"SIM-Karte wird entsperrt…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN-Bereich"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM-PIN-Bereich"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM-PUK-Bereich"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Nächster Wecker gestellt für <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Löschen"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Eingabetaste"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Muster vergessen"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Falsches Muster"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Falsches Passwort"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Falsche PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Versuche es in <xliff:g id="NUMBER">%d</xliff:g> Sekunden erneut."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Muster zeichnen"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"SIM-PIN eingeben"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"SIM-PIN für \"<xliff:g id="CARRIER">%1$s</xliff:g>\" eingeben"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"PIN eingeben"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Passwort eingeben"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"Die SIM-Karte ist jetzt deaktiviert. Gib den PUK-Code ein, um fortzufahren. Weitere Informationen erhältst du von deinem Mobilfunkanbieter."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"Die SIM-Karte \"<xliff:g id="CARRIER">%1$s</xliff:g>\" ist jetzt deaktiviert. Gib den PUK-Code ein, um fortzufahren. Weitere Informationen erhältst du von deinem Mobilfunkanbieter."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Gewünschten PIN-Code eingeben"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Gewünschten PIN-Code bestätigen"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"SIM-Karte wird entsperrt…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Gib eine 4- bis 8-stellige PIN ein."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"Der PUK-Code muss mindestens 8 Ziffern betragen."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Gib den richtigen PUK-Code ein. Bei wiederholten Versuchen wird die SIM-Karte dauerhaft deaktiviert."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN-Codes stimmen nicht überein"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Zu viele Musterversuche"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Du hast deine PIN <xliff:g id="NUMBER_0">%1$d</xliff:g>-mal falsch eingegeben.\n\nVersuche es in <xliff:g id="NUMBER_1">%2$d</xliff:g> Sekunden erneut."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Du hast dein Passwort <xliff:g id="NUMBER_0">%1$d</xliff:g>-mal falsch eingegeben.\n\nVersuche es in <xliff:g id="NUMBER_1">%2$d</xliff:g> Sekunden erneut."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Du hast dein Entsperrungsmuster <xliff:g id="NUMBER_0">%1$d</xliff:g>-mal falsch gezeichnet. \n\nVersuche es in <xliff:g id="NUMBER_1">%2$d</xliff:g> Sekunden erneut."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Du hast <xliff:g id="NUMBER_0">%1$d</xliff:g>-mal erfolglos versucht, das Tablet zu entsperren. Nach <xliff:g id="NUMBER_1">%2$d</xliff:g> weiteren erfolglosen Versuchen wird dieses Tablet zurückgesetzt. Dadurch werden alle Gerätedaten gelöscht."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Du hast <xliff:g id="NUMBER_0">%1$d</xliff:g>-mal erfolglos versucht, das Telefon zu entsperren. Nach <xliff:g id="NUMBER_1">%2$d</xliff:g> weiteren erfolglosen Versuchen wird dieses Telefon zurückgesetzt. Dadurch werden alle Gerätedaten gelöscht."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Du hast <xliff:g id="NUMBER">%d</xliff:g>-mal erfolglos versucht, das Tablet zu entsperren. Dieses Tablet wird nun zurückgesetzt und alle Gerätedaten werden gelöscht."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Du hast <xliff:g id="NUMBER">%d</xliff:g>-mal erfolglos versucht, das Telefon zu entsperren. Dieses Telefon wird nun zurückgesetzt und alle Gerätedaten werden gelöscht."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Du hast <xliff:g id="NUMBER_0">%1$d</xliff:g>-mal erfolglos versucht, das Tablet zu entsperren. Nach <xliff:g id="NUMBER_1">%2$d</xliff:g> weiteren erfolglosen Versuchen wird dieser Nutzer entfernt. Dadurch werden alle Nutzerdaten gelöscht."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Du hast <xliff:g id="NUMBER_0">%1$d</xliff:g>-mal erfolglos versucht, das Telefon zu entsperren. Nach <xliff:g id="NUMBER_1">%2$d</xliff:g> weiteren erfolglosen Versuchen wird dieser Nutzer entfernt. Dadurch werden alle Nutzerdaten gelöscht."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Du hast <xliff:g id="NUMBER">%d</xliff:g>-mal erfolglos versucht, das Tablet zu entsperren. Dieser Nutzer wird nun entfernt und alle Nutzerdaten werden gelöscht."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Du hast <xliff:g id="NUMBER">%d</xliff:g>-mal erfolglos versucht, das Telefon zu entsperren. Dieser Nutzer wird nun entfernt und alle Nutzerdaten werden gelöscht."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Du hast <xliff:g id="NUMBER_0">%1$d</xliff:g>-mal erfolglos versucht, das Tablet zu entsperren. Nach <xliff:g id="NUMBER_1">%2$d</xliff:g> weiteren erfolglosen Versuchen wird das Arbeitsprofil entfernt. Dadurch werden alle Profildaten gelöscht."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Du hast <xliff:g id="NUMBER_0">%1$d</xliff:g>-mal erfolglos versucht, das Telefon zu entsperren. Nach <xliff:g id="NUMBER_1">%2$d</xliff:g> weiteren erfolglosen Versuchen wird das Arbeitsprofil entfernt. Dadurch werden alle Profildaten gelöscht."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Du hast <xliff:g id="NUMBER">%d</xliff:g>-mal erfolglos versucht, das Tablet zu entsperren. Das Arbeitsprofil wird nun entfernt und alle Profildaten werden gelöscht."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Du hast <xliff:g id="NUMBER">%d</xliff:g>-mal erfolglos versucht, das Telefon zu entsperren. Das Arbeitsprofil wird nun entfernt und alle Profildaten werden gelöscht."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Du hast dein Entsperrungsmuster <xliff:g id="NUMBER_0">%1$d</xliff:g>-mal falsch gezeichnet. Nach <xliff:g id="NUMBER_1">%2$d</xliff:g> weiteren erfolglosen Versuchen wirst du aufgefordert, dein Tablet mithilfe eines E-Mail-Kontos zu entsperren.\n\n Versuche es in <xliff:g id="NUMBER_2">%3$d</xliff:g> Sekunden erneut."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Du hast dein Entsperrungsmuster <xliff:g id="NUMBER_0">%1$d</xliff:g>-mal falsch gezeichnet. Nach <xliff:g id="NUMBER_1">%2$d</xliff:g> weiteren erfolglosen Versuchen wirst du aufgefordert, dein Telefon mithilfe eines E-Mail-Kontos zu entsperren.\n\n Versuche es in <xliff:g id="NUMBER_2">%3$d</xliff:g> Sekunden erneut."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Falscher PIN-Code der SIM-Karte. Bitte wende dich an deinen Mobilfunkanbieter, damit er dein Gerät entsperrt."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">Falscher PIN-Code der SIM-Karte. Du hast noch <xliff:g id="NUMBER_1">%d</xliff:g> Versuche.</item>
-      <item quantity="one">Falscher PIN-Code der SIM-Karte. Du hast noch <xliff:g id="NUMBER_0">%d</xliff:g> Versuch, bevor du das Gerät von deinem Mobilfunkanbieter entsperren lassen musst.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"Die SIM-Karte kann nicht verwendet werden. Bitte wende dich an deinen Mobilfunkanbieter."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">Falscher PUK-Code der SIM-Karte. Du hast noch <xliff:g id="NUMBER_1">%d</xliff:g> Versuche, bevor deine SIM-Karte endgültig gesperrt wird.</item>
-      <item quantity="one">Falscher PUK-Code der SIM-Karte. Du hast noch <xliff:g id="NUMBER_0">%d</xliff:g> Versuch, bevor deine SIM-Karte endgültig gesperrt wird.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Fehler beim Entsperren mit der PIN der SIM-Karte"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Fehler beim Entsperren mithilfe des PUK-Codes der SIM-Karte"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Code akzeptiert"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Kein Dienst"</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Eingabemethode wechseln"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Flugmodus"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Nach dem Neustart des Geräts ist die Eingabe des Musters erforderlich."</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Nach dem Neustart des Geräts ist die Eingabe der PIN erforderlich."</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Nach dem Neustart des Geräts ist die Eingabe des Passworts erforderlich."</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Zur Verbesserung der Sicherheit ist ein Muster erforderlich."</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Zur Verbesserung der Sicherheit ist eine PIN erforderlich."</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Zur Verbesserung der Sicherheit ist ein Passwort erforderlich."</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Beim Profilwechsel ist die Eingabe des Musters erforderlich."</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Beim Profilwechsel ist die Eingabe der PIN erforderlich."</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Beim Profilwechsel ist die Eingabe des Passworts erforderlich."</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Gerät von Geräteadministrator gesperrt"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Gerät manuell gesperrt"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Das Gerät wurde seit <xliff:g id="NUMBER_1">%d</xliff:g> Stunden nicht mehr entsperrt. Bestätige das Muster.</item>
-      <item quantity="one">Das Gerät wurde seit <xliff:g id="NUMBER_0">%d</xliff:g> Stunde nicht mehr entsperrt. Bestätige das Muster.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Das Gerät wurde seit <xliff:g id="NUMBER_1">%d</xliff:g> Stunden nicht mehr entsperrt. Bestätige die PIN.</item>
-      <item quantity="one">Das Gerät wurde seit <xliff:g id="NUMBER_0">%d</xliff:g> Stunde nicht mehr entsperrt. Bestätige die PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Das Gerät wurde seit <xliff:g id="NUMBER_1">%d</xliff:g> Stunden nicht mehr entsperrt. Bestätige das Passwort.</item>
-      <item quantity="one">Das Gerät wurde seit <xliff:g id="NUMBER_0">%d</xliff:g> Stunde nicht mehr entsperrt. Bestätige das Passwort.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Nicht erkannt"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-el/strings.xml b/packages/Keyguard/res/values-el/strings.xml
deleted file mode 100644
index d969266..0000000
--- a/packages/Keyguard/res/values-el/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Keyguard"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Πληκτρολογήστε τον κωδικό αριθμό PIN"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Πληκτρολογήστε τον κωδικό PUK της κάρτας SIM και τον νέο κωδικό PIN"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"Κωδικός PUK κάρτας SIM"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Νέος κώδικας αριθμού PIN της κάρτας SIM"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Αγγίξτε για εισαγ. κωδ. πρόσβ."</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Πληκτρολογήστε τον κωδικό πρόσβασης για ξεκλείδωμα"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Πληκτρολογήστε τον αριθμό PIN για ξεκλείδωμα"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Λανθασμένος κωδικός PIN."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Φορτίστηκε"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Φόρτιση"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Ταχύτατη φόρτιση"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Αργή φόρτιση"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Συνδέστε τον φορτιστή."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Πατήστε \"Μενού\" για ξεκλείδωμα."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Το δίκτυο κλειδώθηκε"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Δεν υπάρχει κάρτα SIM"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Δεν υπάρχει κάρτα SIM στο tablet."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Δεν υπάρχει κάρτα SIM στο τηλέφωνο."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Τοποθετήστε μια κάρτα SIM."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"Η κάρτα SIM δεν υπάρχει ή δεν είναι δυνατή η ανάγνωσή της. Τοποθετήστε μια κάρτα SIM."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Η κάρτα SIM δεν μπορεί να χρησιμοποιηθεί."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Η κάρτα SIM έχει απενεργοποιηθεί οριστικά.\n Επικοινωνήστε με τον παροχέα υπηρεσιών ασύρματου δικτύου για να λάβετε μια νέα κάρτα SIM."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"Η κάρτα SIM είναι κλειδωμένη."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"Η κάρτα SIM είναι κλειδωμένη με κωδικό PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Ξεκλείδωμα κάρτας SIM…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Περιοχή PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Περιοχή PIN SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Περιοχή PUK SIM"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Το επόμενο ξυπνητήρι ορίστηκε στις <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Διαγραφή"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Ξεχάσατε το μοτίβο"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Λάθος μοτίβο"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Λανθασμένος κωδικός πρόσβασης"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Λανθασμένος κωδικός PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Δοκιμάστε ξανά σε <xliff:g id="NUMBER">%d</xliff:g> δευτερόλεπτα."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Σχεδιάστε το μοτίβο σας"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Εισαγωγή PIN SIM"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Εισάγετε τον αριθμό PIN της SIM για \"<xliff:g id="CARRIER">%1$s</xliff:g>\""</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Πληκτρολογήστε το PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Εισαγάγετε κωδικό πρόσβασης"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"Η κάρτα SIM είναι απενεργοποιημένη αυτή τη στιγμή. Εισαγάγετε τον κωδικό PUK για να συνεχίσετε. Επικοινωνήστε με την εταιρεία κινητής τηλεφωνίας σας για λεπτομέρειες."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"Η SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" έχει απενεργοποιηθεί. Εισάγετε τον κωδικό PUK για συνέχεια. Επικοινωνήστε με το φορέα κινητής τηλεφωνίας για λεπτομέρειες."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Εισαγάγετε τον απαιτούμενο κωδικό PIN"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Επιβεβαιώστε τον απαιτούμενο κωδικό PIN"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Ξεκλείδωμα κάρτας SIM..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Πληκτρολογήστε έναν αριθμό PIN που να αποτελείται από 4 έως 8 αριθμούς."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"Ο κωδικός PUK θα πρέπει να περιέχει τουλάχιστον 8 αριθμούς."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Εισαγάγετε ξανά τον κωδικό PUK. Οι επαναλαμβανόμενες προσπάθειες θα απενεργοποιήσουν οριστικά την κάρτα SIM."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Δεν υπάρχει αντιστοιχία των κωδικών PIN"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Πάρα πολλές προσπάθειες μοτίβου"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Έχετε πληκτρολογήσει εσφαλμένα τον κωδικό σας PIN <xliff:g id="NUMBER_0">%1$d</xliff:g> φορές. \n\nΔοκιμάστε ξανά σε <xliff:g id="NUMBER_1">%2$d</xliff:g> δευτερόλεπτα."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Έχετε πληκτρολογήσει τον κωδικό πρόσβασης εσφαλμένα <xliff:g id="NUMBER_0">%1$d</xliff:g> φορές. \n\nΔοκιμάστε ξανά σε <xliff:g id="NUMBER_1">%2$d</xliff:g> δευτερόλεπτα."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Σχεδιάσατε εσφαλμένα το μοτίβο ξεκλειδώματος <xliff:g id="NUMBER_0">%1$d</xliff:g> φορές. \n\nΔοκιμάστε ξανά σε <xliff:g id="NUMBER_1">%2$d</xliff:g> δευτερόλετπα."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Δοκιμάσατε να ξεκλειδώσετε το tablet <xliff:g id="NUMBER_0">%1$d</xliff:g> φορές χωρίς επιτυχία. Μετά από <xliff:g id="NUMBER_1">%2$d</xliff:g> ακόμα ανεπιτυχείς δοκιμές, αυτό το tablet θα ρυθμιστεί εκ νέου, και έτσι θα διαγραφούν όλα τα δεδομένα του."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Δοκιμάσατε να ξεκλειδώσετε το τηλέφωνο <xliff:g id="NUMBER_0">%1$d</xliff:g> φορές χωρίς επιτυχία. Μετά από <xliff:g id="NUMBER_1">%2$d</xliff:g> ακόμα ανεπιτυχείς δοκιμές, αυτό το τηλέφωνο θα ρυθμιστεί εκ νέου, και έτσι θα διαγραφούν όλα τα δεδομένα του."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Δοκιμάσατε να ξεκλειδώσετε αυτό το tablet <xliff:g id="NUMBER">%d</xliff:g> φορές χωρίς επιτυχία. Αυτό το tablet θα ρυθμιστεί εκ νέου, και έτσι θα διαγραφούν όλα τα δεδομένα του."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Δοκιμάσατε να ξεκλειδώσετε το τηλέφωνο <xliff:g id="NUMBER">%d</xliff:g> φορές χωρίς επιτυχία. Αυτό το τηλέφωνο θα ρυθμιστεί εκ νέου, και έτσι θα διαγραφούν όλα τα δεδομένα του."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Δοκιμάσατε να ξεκλειδώσετε το tablet <xliff:g id="NUMBER_0">%1$d</xliff:g> φορές χωρίς επιτυχία. Μετά από <xliff:g id="NUMBER_1">%2$d</xliff:g> ακόμα ανεπιτυχείς δοκιμές, αυτός ο χρήστης θα καταργηθεί, και έτσι θα διαγραφούν όλα τα δεδομένα χρήστη."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Δοκιμάσατε να ξεκλειδώσετε το τηλέφωνο <xliff:g id="NUMBER_0">%1$d</xliff:g> φορές χωρίς επιτυχία. Μετά από <xliff:g id="NUMBER_1">%2$d</xliff:g> ακόμα ανεπιτυχείς δοκιμές, αυτός ο χρήστης θα καταργηθεί, και έτσι θα διαγραφούν όλα τα δεδομένα χρήστη."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Δοκιμάσατε να ξεκλειδώσετε το tablet <xliff:g id="NUMBER">%d</xliff:g> φορές χωρίς επιτυχία. Αυτός ο χρήστης θα καταργηθεί, και έτσι θα διαγραφούν όλα τα δεδομένα χρήστη."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Δοκιμάσατε να ξεκλειδώσετε το τηλέφωνο <xliff:g id="NUMBER">%d</xliff:g> φορές χωρίς επιτυχία. Αυτός ο χρήστης θα καταργηθεί, και έτσι θα διαγραφούν όλα τα δεδομένα χρήστη."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Δοκιμάσατε να ξεκλειδώσετε το tablet <xliff:g id="NUMBER_0">%1$d</xliff:g> φορές χωρίς επιτυχία. Μετά από <xliff:g id="NUMBER_1">%2$d</xliff:g> ακόμα ανεπιτυχείς δοκιμές, το προφίλ εργασίας θα καταργηθεί, και έτσι θα διαγραφούν όλα τα δεδομένα προφίλ."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Δοκιμάσατε να ξεκλειδώσετε το τηλέφωνο <xliff:g id="NUMBER_0">%1$d</xliff:g> φορές χωρίς επιτυχία. Μετά από <xliff:g id="NUMBER_1">%2$d</xliff:g> ακόμα ανεπιτυχείς δοκιμές, το προφίλ εργασίας θα καταργηθεί, και έτσι θα διαγραφούν όλα τα δεδομένα προφίλ."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Δοκιμάσατε να ξεκλειδώσετε το tablet <xliff:g id="NUMBER">%d</xliff:g> φορές χωρίς επιτυχία. Το προφίλ εργασίας θα καταργηθεί, και έτσι θα διαγραφούν όλα τα δεδομένα προφίλ."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Δοκιμάσατε να ξεκλειδώσετε το τηλέφωνο <xliff:g id="NUMBER">%d</xliff:g> φορές χωρίς επιτυχία. Το προφίλ εργασίας θα καταργηθεί, και έτσι θα διαγραφούν όλα τα δεδομένα προφίλ."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Σχεδιάσατε το μοτίβο ξεκλειδώματος εσφαλμένα <xliff:g id="NUMBER_0">%1$d</xliff:g> φορές. Μετά από <xliff:g id="NUMBER_1">%2$d</xliff:g> ανεπιτυχείς προσπάθειες ακόμη, θα σας ζητηθεί να ξεκλειδώσετε το tablet σας με τη χρήση ενός λογαριασμού ηλεκτρονικού ταχυδρομείου.\n\n Δοκιμάστε να συνδεθείτε ξανά σε <xliff:g id="NUMBER_2">%3$d</xliff:g> δευτερόλεπτα."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Σχεδιάσατε το μοτίβο ξεκλειδώματος εσφαλμένα <xliff:g id="NUMBER_0">%1$d</xliff:g> φορές. Μετά από <xliff:g id="NUMBER_1">%2$d</xliff:g> ανεπιτυχείς προσπάθειες ακόμη, θα σας ζητηθεί να ξεκλειδώσετε το τηλέφωνό σας με τη χρήση ενός λογαριασμού ηλεκτρονικού ταχυδρομείου.\n\n Δοκιμάστε ξανά σε <xliff:g id="NUMBER_2">%3$d</xliff:g> δευτερόλεπτα."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Λανθασμένος κωδικός PIN κάρτας SIM. Θα πρέπει να επικοινωνήσετε με τον πάροχο κινητής τηλεφωνίας σας για να ξεκλειδώσετε τη συσκευή σας."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">Λανθασμένος κωδικός PIN κάρτας SIM. Απομένουν άλλες <xliff:g id="NUMBER_1">%d</xliff:g> προσπάθειες. </item>
-      <item quantity="one">Λανθασμένος κωδικός PIN κάρτας SIM. Απομένει άλλη <xliff:g id="NUMBER_0">%d</xliff:g> προσπάθεια. Στη συνέχεια, θα πρέπει να επικοινωνήσετε με τον πάροχο κινητής τηλεφωνίας σας για να ξεκλειδώσετε τη συσκευή σας.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"Η κάρτα SIM δεν μπορεί να χρησιμοποιηθεί. Επικοινωνήστε με τον πάροχο κινητής τηλεφωνίας σας."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">Λανθασμένος κωδικός PUK κάρτας SIM. Απομένουν άλλες <xliff:g id="NUMBER_1">%d</xliff:g> προσπάθειες προτού να μην είναι πλέον δυνατή η χρήση της κάρτας SIM.</item>
-      <item quantity="one">Λανθασμένος κωδικός PUK κάρτας SIM. Απομένει άλλη <xliff:g id="NUMBER_0">%d</xliff:g> προσπάθεια προτού να μην είναι πλέον δυνατή η χρήση της κάρτας SIM.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Αποτυχία λειτουργίας κωδικού PIN κάρτας SIM!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Αποτυχία λειτουργίας κωδικού PUK κάρτας SIM!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Αποδεκτός κωδικός!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Καμία υπηρεσία."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Εναλλαγή μεθόδου εισαγωγής"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Λειτουργία πτήσης"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Απαιτείται μοτίβο μετά την επανεκκίνηση της συσκευής"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Απαιτείται PIN μετά την επανεκκίνηση της συσκευής"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Απαιτείται κωδικός πρόσβασης μετά την επανεκκίνηση της συσκευής"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Απαιτείται μοτίβο για πρόσθετη ασφάλεια"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Απαιτείται PIN για πρόσθετη ασφάλεια"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Απαιτείται κωδικός πρόσβασης για πρόσθετη ασφάλεια"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Απαιτείται μοτίβο κατά την εναλλαγή προφίλ"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Απαιτείται PIN κατά την εναλλαγή προφίλ"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Απαιτείται κωδικός πρόσβασης κατά την εναλλαγή προφίλ"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Η συσκευή κλειδώθηκε από το διαχειριστή της"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Η συσκευή κλειδώθηκε με μη αυτόματο τρόπο"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Η συσκευή δεν έχει ξεκλειδωθεί για <xliff:g id="NUMBER_1">%d</xliff:g> ώρες. Επιβεβαιώστε το μοτίβο.</item>
-      <item quantity="one">Η συσκευή δεν έχει ξεκλειδωθεί για <xliff:g id="NUMBER_0">%d</xliff:g> ώρα. Επιβεβαιώστε το μοτίβο.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Η συσκευή δεν έχει ξεκλειδωθεί για <xliff:g id="NUMBER_1">%d</xliff:g> ώρες. Επιβεβαιώστε τον αριθμό PIN.</item>
-      <item quantity="one">Η συσκευή δεν έχει ξεκλειδωθεί για <xliff:g id="NUMBER_0">%d</xliff:g> ώρα. Επιβεβαιώστε τον αριθμό PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Η συσκευή δεν έχει ξεκλειδωθεί για <xliff:g id="NUMBER_1">%d</xliff:g> ώρες. Επιβεβαίωση κωδικού πρόσβασης.</item>
-      <item quantity="one">Η συσκευή δεν έχει ξεκλειδωθεί για <xliff:g id="NUMBER_0">%d</xliff:g> ώρα. Επιβεβαίωση κωδικού πρόσβασης.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Δεν αναγνωρίστηκε"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-en-rAU/strings.xml b/packages/Keyguard/res/values-en-rAU/strings.xml
deleted file mode 100644
index 9ecd979..0000000
--- a/packages/Keyguard/res/values-en-rAU/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Keyguard"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Type PIN code"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Type SIM PUK and new PIN code"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM PUK code"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"New SIM PIN code"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Touch to type password"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Type password to unlock"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Type PIN to unlock"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Incorrect PIN code."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Charged"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Charging"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Charging rapidly"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Charging slowly"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Connect your charger."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Press Menu to unlock."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Network locked"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"No SIM card"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"No SIM card in tablet."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"No SIM card in phone."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Insert a SIM card."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"The SIM card is missing or not readable. Insert a SIM card."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Unusable SIM card."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Your SIM card has been permanently disabled.\n Contact your wireless service provider for another SIM card."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM card is locked."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM card is PUK-locked."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Unlocking SIM card…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN area"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM PIN area"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM PUK area"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Next alarm set for <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Delete"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Forgot Pattern"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Wrong Pattern"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Wrong Password"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Wrong PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Try again in <xliff:g id="NUMBER">%d</xliff:g> seconds."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Draw your pattern"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Enter SIM PIN"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Enter SIM PIN for \"<xliff:g id="CARRIER">%1$s</xliff:g>\""</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Enter PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Enter Password"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM is now disabled. Enter PUK code to continue. Contact carrier for details."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" is now disabled. Enter PUK code to continue. Contact operator for details."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Enter desired PIN code"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Confirm desired PIN code"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Unlocking SIM card…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Type a PIN that is 4 to 8 numbers."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK code should be 8 numbers or more."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Re-enter the correct PUK code. Repeated attempts will permanently disable the SIM."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN codes do not match"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Too many pattern attempts"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"You have incorrectly typed your PIN <xliff:g id="NUMBER_0">%1$d</xliff:g> times. \n\nTry again in <xliff:g id="NUMBER_1">%2$d</xliff:g> seconds."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"You have incorrectly typed your password <xliff:g id="NUMBER_0">%1$d</xliff:g> times. \n\nTry again in <xliff:g id="NUMBER_1">%2$d</xliff:g> seconds."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"You have incorrectly drawn your unlock pattern <xliff:g id="NUMBER_0">%1$d</xliff:g> times. \n\nTry again in <xliff:g id="NUMBER_1">%2$d</xliff:g> seconds."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"You have incorrectly attempted to unlock the tablet <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, this tablet will be reset, which will delete all its data."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"You have incorrectly attempted to unlock the phone <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, this phone will be reset, which will delete all its data."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"You have incorrectly attempted to unlock the tablet <xliff:g id="NUMBER">%d</xliff:g> times. This tablet will be reset, which will delete all its data."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"You have incorrectly attempted to unlock the phone <xliff:g id="NUMBER">%d</xliff:g> times. This phone will be reset, which will delete all its data."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"You have incorrectly attempted to unlock the tablet <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, this user will be removed, which will delete all user data."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"You have incorrectly attempted to unlock the phone <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, this user will be removed, which will delete all user data."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"You have incorrectly attempted to unlock the tablet <xliff:g id="NUMBER">%d</xliff:g> times. This user will be removed, which will delete all user data."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"You have incorrectly attempted to unlock the phone <xliff:g id="NUMBER">%d</xliff:g> times. This user will be removed, which will delete all user data."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"You have incorrectly attempted to unlock the tablet <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, the work profile will be removed, which will delete all profile data."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"You have incorrectly attempted to unlock the phone <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, the work profile will be removed, which will delete all profile data."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"You have incorrectly attempted to unlock the tablet <xliff:g id="NUMBER">%d</xliff:g> times. The work profile will be removed, which will delete all profile data."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"You have incorrectly attempted to unlock the phone <xliff:g id="NUMBER">%d</xliff:g> times. The work profile will be removed, which will delete all profile data."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"You have incorrectly drawn your unlock pattern <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, you will be asked to unlock your tablet using an email account.\n\n Try again in <xliff:g id="NUMBER_2">%3$d</xliff:g> seconds."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"You have incorrectly drawn your unlock pattern <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, you will be asked to unlock your phone using an email account.\n\n Try again in <xliff:g id="NUMBER_2">%3$d</xliff:g> seconds."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Incorrect SIM PIN code; you must now contact your operator to unlock your device."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">Incorrect SIM PIN code, you have <xliff:g id="NUMBER_1">%d</xliff:g> remaining attempts.</item>
-      <item quantity="one">Incorrect SIM PIN code, you have <xliff:g id="NUMBER_0">%d</xliff:g> remaining attempt before you must contact your operator to unlock your device.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM is unusable. Contact your operator."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">Incorrect SIM PUK code, you have <xliff:g id="NUMBER_1">%d</xliff:g> remaining attempts before SIM becomes permanently unusable.</item>
-      <item quantity="one">Incorrect SIM PUK code, you have <xliff:g id="NUMBER_0">%d</xliff:g> remaining attempt before SIM becomes permanently unusable.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"SIM PIN operation failed!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"SIM PUK operation failed!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Code accepted"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"No service."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Switch input method"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Aeroplane mode"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Pattern required after device restarts"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"PIN required after device restarts"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Password required after device restarts"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Pattern required for additional security"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"PIN required for additional security"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Password required for additional security"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Pattern required when you switch profiles"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"PIN required when you switch profiles"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Password required when you switch profiles"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Device administrator locked device"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Device was locked manually"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Device hasn\'t been unlocked for <xliff:g id="NUMBER_1">%d</xliff:g> hours. Confirm pattern.</item>
-      <item quantity="one">Device hasn\'t been unlocked for <xliff:g id="NUMBER_0">%d</xliff:g> hour. Confirm pattern.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Device hasn\'t been unlocked for <xliff:g id="NUMBER_1">%d</xliff:g> hours. Confirm PIN.</item>
-      <item quantity="one">Device hasn\'t been unlocked for <xliff:g id="NUMBER_0">%d</xliff:g> hour. Confirm PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Device hasn\'t been unlocked for <xliff:g id="NUMBER_1">%d</xliff:g> hours. Confirm password.</item>
-      <item quantity="one">Device hasn\'t been unlocked for <xliff:g id="NUMBER_0">%d</xliff:g> hour. Confirm password.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Not recognised"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-en-rGB/strings.xml b/packages/Keyguard/res/values-en-rGB/strings.xml
deleted file mode 100644
index 9ecd979..0000000
--- a/packages/Keyguard/res/values-en-rGB/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Keyguard"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Type PIN code"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Type SIM PUK and new PIN code"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM PUK code"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"New SIM PIN code"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Touch to type password"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Type password to unlock"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Type PIN to unlock"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Incorrect PIN code."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Charged"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Charging"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Charging rapidly"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Charging slowly"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Connect your charger."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Press Menu to unlock."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Network locked"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"No SIM card"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"No SIM card in tablet."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"No SIM card in phone."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Insert a SIM card."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"The SIM card is missing or not readable. Insert a SIM card."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Unusable SIM card."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Your SIM card has been permanently disabled.\n Contact your wireless service provider for another SIM card."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM card is locked."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM card is PUK-locked."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Unlocking SIM card…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN area"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM PIN area"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM PUK area"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Next alarm set for <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Delete"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Forgot Pattern"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Wrong Pattern"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Wrong Password"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Wrong PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Try again in <xliff:g id="NUMBER">%d</xliff:g> seconds."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Draw your pattern"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Enter SIM PIN"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Enter SIM PIN for \"<xliff:g id="CARRIER">%1$s</xliff:g>\""</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Enter PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Enter Password"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM is now disabled. Enter PUK code to continue. Contact carrier for details."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" is now disabled. Enter PUK code to continue. Contact operator for details."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Enter desired PIN code"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Confirm desired PIN code"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Unlocking SIM card…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Type a PIN that is 4 to 8 numbers."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK code should be 8 numbers or more."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Re-enter the correct PUK code. Repeated attempts will permanently disable the SIM."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN codes do not match"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Too many pattern attempts"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"You have incorrectly typed your PIN <xliff:g id="NUMBER_0">%1$d</xliff:g> times. \n\nTry again in <xliff:g id="NUMBER_1">%2$d</xliff:g> seconds."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"You have incorrectly typed your password <xliff:g id="NUMBER_0">%1$d</xliff:g> times. \n\nTry again in <xliff:g id="NUMBER_1">%2$d</xliff:g> seconds."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"You have incorrectly drawn your unlock pattern <xliff:g id="NUMBER_0">%1$d</xliff:g> times. \n\nTry again in <xliff:g id="NUMBER_1">%2$d</xliff:g> seconds."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"You have incorrectly attempted to unlock the tablet <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, this tablet will be reset, which will delete all its data."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"You have incorrectly attempted to unlock the phone <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, this phone will be reset, which will delete all its data."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"You have incorrectly attempted to unlock the tablet <xliff:g id="NUMBER">%d</xliff:g> times. This tablet will be reset, which will delete all its data."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"You have incorrectly attempted to unlock the phone <xliff:g id="NUMBER">%d</xliff:g> times. This phone will be reset, which will delete all its data."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"You have incorrectly attempted to unlock the tablet <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, this user will be removed, which will delete all user data."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"You have incorrectly attempted to unlock the phone <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, this user will be removed, which will delete all user data."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"You have incorrectly attempted to unlock the tablet <xliff:g id="NUMBER">%d</xliff:g> times. This user will be removed, which will delete all user data."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"You have incorrectly attempted to unlock the phone <xliff:g id="NUMBER">%d</xliff:g> times. This user will be removed, which will delete all user data."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"You have incorrectly attempted to unlock the tablet <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, the work profile will be removed, which will delete all profile data."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"You have incorrectly attempted to unlock the phone <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, the work profile will be removed, which will delete all profile data."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"You have incorrectly attempted to unlock the tablet <xliff:g id="NUMBER">%d</xliff:g> times. The work profile will be removed, which will delete all profile data."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"You have incorrectly attempted to unlock the phone <xliff:g id="NUMBER">%d</xliff:g> times. The work profile will be removed, which will delete all profile data."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"You have incorrectly drawn your unlock pattern <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, you will be asked to unlock your tablet using an email account.\n\n Try again in <xliff:g id="NUMBER_2">%3$d</xliff:g> seconds."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"You have incorrectly drawn your unlock pattern <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, you will be asked to unlock your phone using an email account.\n\n Try again in <xliff:g id="NUMBER_2">%3$d</xliff:g> seconds."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Incorrect SIM PIN code; you must now contact your operator to unlock your device."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">Incorrect SIM PIN code, you have <xliff:g id="NUMBER_1">%d</xliff:g> remaining attempts.</item>
-      <item quantity="one">Incorrect SIM PIN code, you have <xliff:g id="NUMBER_0">%d</xliff:g> remaining attempt before you must contact your operator to unlock your device.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM is unusable. Contact your operator."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">Incorrect SIM PUK code, you have <xliff:g id="NUMBER_1">%d</xliff:g> remaining attempts before SIM becomes permanently unusable.</item>
-      <item quantity="one">Incorrect SIM PUK code, you have <xliff:g id="NUMBER_0">%d</xliff:g> remaining attempt before SIM becomes permanently unusable.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"SIM PIN operation failed!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"SIM PUK operation failed!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Code accepted"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"No service."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Switch input method"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Aeroplane mode"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Pattern required after device restarts"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"PIN required after device restarts"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Password required after device restarts"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Pattern required for additional security"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"PIN required for additional security"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Password required for additional security"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Pattern required when you switch profiles"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"PIN required when you switch profiles"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Password required when you switch profiles"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Device administrator locked device"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Device was locked manually"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Device hasn\'t been unlocked for <xliff:g id="NUMBER_1">%d</xliff:g> hours. Confirm pattern.</item>
-      <item quantity="one">Device hasn\'t been unlocked for <xliff:g id="NUMBER_0">%d</xliff:g> hour. Confirm pattern.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Device hasn\'t been unlocked for <xliff:g id="NUMBER_1">%d</xliff:g> hours. Confirm PIN.</item>
-      <item quantity="one">Device hasn\'t been unlocked for <xliff:g id="NUMBER_0">%d</xliff:g> hour. Confirm PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Device hasn\'t been unlocked for <xliff:g id="NUMBER_1">%d</xliff:g> hours. Confirm password.</item>
-      <item quantity="one">Device hasn\'t been unlocked for <xliff:g id="NUMBER_0">%d</xliff:g> hour. Confirm password.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Not recognised"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-en-rIN/strings.xml b/packages/Keyguard/res/values-en-rIN/strings.xml
deleted file mode 100644
index 9ecd979..0000000
--- a/packages/Keyguard/res/values-en-rIN/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Keyguard"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Type PIN code"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Type SIM PUK and new PIN code"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM PUK code"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"New SIM PIN code"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Touch to type password"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Type password to unlock"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Type PIN to unlock"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Incorrect PIN code."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Charged"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Charging"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Charging rapidly"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Charging slowly"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Connect your charger."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Press Menu to unlock."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Network locked"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"No SIM card"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"No SIM card in tablet."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"No SIM card in phone."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Insert a SIM card."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"The SIM card is missing or not readable. Insert a SIM card."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Unusable SIM card."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Your SIM card has been permanently disabled.\n Contact your wireless service provider for another SIM card."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM card is locked."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM card is PUK-locked."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Unlocking SIM card…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN area"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM PIN area"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM PUK area"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Next alarm set for <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Delete"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Forgot Pattern"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Wrong Pattern"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Wrong Password"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Wrong PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Try again in <xliff:g id="NUMBER">%d</xliff:g> seconds."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Draw your pattern"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Enter SIM PIN"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Enter SIM PIN for \"<xliff:g id="CARRIER">%1$s</xliff:g>\""</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Enter PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Enter Password"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM is now disabled. Enter PUK code to continue. Contact carrier for details."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" is now disabled. Enter PUK code to continue. Contact operator for details."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Enter desired PIN code"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Confirm desired PIN code"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Unlocking SIM card…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Type a PIN that is 4 to 8 numbers."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK code should be 8 numbers or more."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Re-enter the correct PUK code. Repeated attempts will permanently disable the SIM."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN codes do not match"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Too many pattern attempts"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"You have incorrectly typed your PIN <xliff:g id="NUMBER_0">%1$d</xliff:g> times. \n\nTry again in <xliff:g id="NUMBER_1">%2$d</xliff:g> seconds."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"You have incorrectly typed your password <xliff:g id="NUMBER_0">%1$d</xliff:g> times. \n\nTry again in <xliff:g id="NUMBER_1">%2$d</xliff:g> seconds."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"You have incorrectly drawn your unlock pattern <xliff:g id="NUMBER_0">%1$d</xliff:g> times. \n\nTry again in <xliff:g id="NUMBER_1">%2$d</xliff:g> seconds."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"You have incorrectly attempted to unlock the tablet <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, this tablet will be reset, which will delete all its data."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"You have incorrectly attempted to unlock the phone <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, this phone will be reset, which will delete all its data."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"You have incorrectly attempted to unlock the tablet <xliff:g id="NUMBER">%d</xliff:g> times. This tablet will be reset, which will delete all its data."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"You have incorrectly attempted to unlock the phone <xliff:g id="NUMBER">%d</xliff:g> times. This phone will be reset, which will delete all its data."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"You have incorrectly attempted to unlock the tablet <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, this user will be removed, which will delete all user data."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"You have incorrectly attempted to unlock the phone <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, this user will be removed, which will delete all user data."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"You have incorrectly attempted to unlock the tablet <xliff:g id="NUMBER">%d</xliff:g> times. This user will be removed, which will delete all user data."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"You have incorrectly attempted to unlock the phone <xliff:g id="NUMBER">%d</xliff:g> times. This user will be removed, which will delete all user data."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"You have incorrectly attempted to unlock the tablet <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, the work profile will be removed, which will delete all profile data."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"You have incorrectly attempted to unlock the phone <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, the work profile will be removed, which will delete all profile data."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"You have incorrectly attempted to unlock the tablet <xliff:g id="NUMBER">%d</xliff:g> times. The work profile will be removed, which will delete all profile data."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"You have incorrectly attempted to unlock the phone <xliff:g id="NUMBER">%d</xliff:g> times. The work profile will be removed, which will delete all profile data."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"You have incorrectly drawn your unlock pattern <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, you will be asked to unlock your tablet using an email account.\n\n Try again in <xliff:g id="NUMBER_2">%3$d</xliff:g> seconds."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"You have incorrectly drawn your unlock pattern <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, you will be asked to unlock your phone using an email account.\n\n Try again in <xliff:g id="NUMBER_2">%3$d</xliff:g> seconds."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Incorrect SIM PIN code; you must now contact your operator to unlock your device."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">Incorrect SIM PIN code, you have <xliff:g id="NUMBER_1">%d</xliff:g> remaining attempts.</item>
-      <item quantity="one">Incorrect SIM PIN code, you have <xliff:g id="NUMBER_0">%d</xliff:g> remaining attempt before you must contact your operator to unlock your device.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM is unusable. Contact your operator."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">Incorrect SIM PUK code, you have <xliff:g id="NUMBER_1">%d</xliff:g> remaining attempts before SIM becomes permanently unusable.</item>
-      <item quantity="one">Incorrect SIM PUK code, you have <xliff:g id="NUMBER_0">%d</xliff:g> remaining attempt before SIM becomes permanently unusable.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"SIM PIN operation failed!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"SIM PUK operation failed!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Code accepted"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"No service."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Switch input method"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Aeroplane mode"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Pattern required after device restarts"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"PIN required after device restarts"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Password required after device restarts"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Pattern required for additional security"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"PIN required for additional security"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Password required for additional security"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Pattern required when you switch profiles"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"PIN required when you switch profiles"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Password required when you switch profiles"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Device administrator locked device"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Device was locked manually"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Device hasn\'t been unlocked for <xliff:g id="NUMBER_1">%d</xliff:g> hours. Confirm pattern.</item>
-      <item quantity="one">Device hasn\'t been unlocked for <xliff:g id="NUMBER_0">%d</xliff:g> hour. Confirm pattern.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Device hasn\'t been unlocked for <xliff:g id="NUMBER_1">%d</xliff:g> hours. Confirm PIN.</item>
-      <item quantity="one">Device hasn\'t been unlocked for <xliff:g id="NUMBER_0">%d</xliff:g> hour. Confirm PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Device hasn\'t been unlocked for <xliff:g id="NUMBER_1">%d</xliff:g> hours. Confirm password.</item>
-      <item quantity="one">Device hasn\'t been unlocked for <xliff:g id="NUMBER_0">%d</xliff:g> hour. Confirm password.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Not recognised"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-es-rUS/strings.xml b/packages/Keyguard/res/values-es-rUS/strings.xml
deleted file mode 100644
index 61f5c0d..0000000
--- a/packages/Keyguard/res/values-es-rUS/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Bloqueo de teclado"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Ingresa el código PIN"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Escribe el código PUK de la tarjeta SIM y un nuevo código PIN."</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"Código PUK de la tarjeta SIM"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Nuevo código PIN de la tarjeta SIM"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Toca para ingresar la contraseña"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Ingresar contraseña para desbloquear"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Ingresa el PIN para desbloquear"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Código PIN incorrecto"</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Cargada"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Cargando"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Carga rápida"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Carga lenta"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Conecta tu cargador."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Presiona Menú para desbloquear."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Bloqueada para la red"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"No se insertó ninguna tarjeta SIM."</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"No se insertó ninguna tarjeta SIM en la tablet."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"No se insertó ninguna tarjeta SIM en el dispositivo."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Inserta una tarjeta SIM."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"Falta la tarjeta SIM o esta no se puede leer. Inserta una tarjeta SIM."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Tarjeta SIM inutilizable"</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Tu tarjeta SIM se inhabilitó de forma permanente.\n Comunícate con tu proveedor de servicios inalámbricos para obtener otra tarjeta SIM."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"La tarjeta SIM está bloqueada."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"La tarjeta SIM está bloqueada por código PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Desbloqueando tarjeta SIM…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Área de PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Área de PIN de SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Área de PUK de SIM"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Próxima alarma establecida: <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Eliminar"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Ingresar"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"¿Olvidaste el patrón?"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Patrón incorrecto"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Contraseña incorrecta"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"PIN incorrecto"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Vuelve a intentarlo en <xliff:g id="NUMBER">%d</xliff:g> segundos."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Dibuja tu patrón."</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Ingresa el PIN de la tarjeta SIM."</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Ingresa el PIN de la tarjeta SIM para \"<xliff:g id="CARRIER">%1$s</xliff:g>\"."</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Ingresa el PIN."</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Ingresa tu contraseña."</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"La tarjeta SIM está inhabilitada. Para continuar, ingresa el código PUK. Si quieres obtener más información, ponte en contacto con el proveedor."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"La tarjeta SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" está inhabilitada. Para continuar, ingresa el código PUK. Para obtener más información, comunícate con el proveedor."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Ingresa el código PIN deseado"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Confirmar código PIN deseado"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Desbloqueando tarjeta SIM…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Escribe un PIN que tenga de cuatro a ocho números."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"El código PUK debe tener ocho números como mínimo."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Vuelve a ingresar el código PUK correcto. Si ingresas un código incorrecto varias veces, se inhabilitará la tarjeta SIM."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Los códigos PIN no coinciden."</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Demasiados intentos incorrectos de ingresar el patrón"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Escribiste incorrectamente tu PIN <xliff:g id="NUMBER_0">%1$d</xliff:g> veces. \n\nVuelve a intentarlo en <xliff:g id="NUMBER_1">%2$d</xliff:g> segundos."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Escribiste incorrectamente tu contraseña <xliff:g id="NUMBER_0">%1$d</xliff:g> veces. \n\nVuelve a intentarlo en <xliff:g id="NUMBER_1">%2$d</xliff:g> segundos."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Dibujaste incorrectamente tu patrón de desbloqueo <xliff:g id="NUMBER_0">%1$d</xliff:g> veces. \n\nVuelve a intentarlo en <xliff:g id="NUMBER_1">%2$d</xliff:g> segundos."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Intentaste desbloquear la tablet <xliff:g id="NUMBER_0">%1$d</xliff:g> veces de manera incorrecta. Después de <xliff:g id="NUMBER_1">%2$d</xliff:g> intentos incorrectos más, se restablecerá la tablet y se perderán todos los datos."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Intentaste desbloquear el teléfono <xliff:g id="NUMBER_0">%1$d</xliff:g> veces de manera incorrecta. Después de <xliff:g id="NUMBER_1">%2$d</xliff:g> intentos incorrectos más, se restablecerá el teléfono y se perderán todos los datos."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Intentaste desbloquear la tablet <xliff:g id="NUMBER">%d</xliff:g> veces de manera incorrecta. Se restablecerá la tablet y se perderán todos los datos."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Intentaste desbloquear el teléfono <xliff:g id="NUMBER">%d</xliff:g> veces de manera incorrecta. Se restablecerá el teléfono y se perderán todos los datos."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Intentaste desbloquear la tablet <xliff:g id="NUMBER_0">%1$d</xliff:g> veces de manera incorrecta. Después de <xliff:g id="NUMBER_1">%2$d</xliff:g> intentos incorrectos más, se eliminará el usuario y se perderán todos los datos de usuario."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Intentaste desbloquear el teléfono <xliff:g id="NUMBER_0">%1$d</xliff:g> veces de manera incorrecta. Después de <xliff:g id="NUMBER_1">%2$d</xliff:g> intentos incorrectos más, se eliminará el usuario y se perderán todos los datos de usuario."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Intentaste desbloquear la tablet <xliff:g id="NUMBER">%d</xliff:g> veces de manera incorrecta. Se eliminará el usuario y se perderán todos los datos de usuario."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Intentaste desbloquear el teléfono <xliff:g id="NUMBER">%d</xliff:g> veces de manera incorrecta. Se eliminará el usuario y se perderán todos los datos de usuario."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Intentaste desbloquear la tablet <xliff:g id="NUMBER_0">%1$d</xliff:g> veces de manera incorrecta. Después de <xliff:g id="NUMBER_1">%2$d</xliff:g> intentos incorrectos más, se eliminará el perfil de trabajo y se perderán todos los datos de perfil."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Intentaste desbloquear el teléfono <xliff:g id="NUMBER_0">%1$d</xliff:g> veces de manera incorrecta. Después de <xliff:g id="NUMBER_1">%2$d</xliff:g> intentos incorrectos más, se eliminará el perfil de trabajo y se perderán todos los datos de perfil."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Intentaste desbloquear la tablet <xliff:g id="NUMBER">%d</xliff:g> veces de manera incorrecta. Se eliminará el perfil de trabajo y se perderán todos los datos de perfil."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Intentaste desbloquear el teléfono <xliff:g id="NUMBER">%d</xliff:g> veces de manera incorrecta. Se eliminará el perfil de trabajo y se perderán todos los datos de perfil."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Dibujaste incorrectamente tu patrón de desbloqueo <xliff:g id="NUMBER_0">%1$d</xliff:g> veces. Luego de <xliff:g id="NUMBER_1">%2$d</xliff:g> intentos incorrectos más, se te solicitará que desbloquees tu tablet mediante el uso de una cuenta de correo.\n\n Vuelve a intentarlo en <xliff:g id="NUMBER_2">%3$d</xliff:g> segundos."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Dibujaste incorrectamente tu patrón de desbloqueo <xliff:g id="NUMBER_0">%1$d</xliff:g> veces. Luego de <xliff:g id="NUMBER_1">%2$d</xliff:g> intentos incorrectos más, se te solicitará que desbloquees tu dispositivo mediante el uso de una cuenta de correo.\n\n Vuelve a intentarlo en <xliff:g id="NUMBER_2">%3$d</xliff:g> segundos."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"El código PIN de la tarjeta SIM es incorrecto. Debes comunicarte con el proveedor para desbloquear el dispositivo."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">El código PIN de la tarjeta SIM es incorrecto. Tienes <xliff:g id="NUMBER_1">%d</xliff:g> intentos más.</item>
-      <item quantity="one">El código PIN de la tarjeta SIM es incorrecto. Tienes <xliff:g id="NUMBER_0">%d</xliff:g> intento más antes de que debas comunicarte con el proveedor para desbloquear el dispositivo.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"La tarjeta SIM no se puede utilizar. Comunícate con el proveedor."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">El código PUK de la tarjeta SIM es incorrecto. Tienes <xliff:g id="NUMBER_1">%d</xliff:g> intentos más antes de que la tarjeta SIM quede inutilizable de forma permanente.</item>
-      <item quantity="one">El código PUK de la tarjeta SIM es incorrecto. Tienes <xliff:g id="NUMBER_0">%d</xliff:g> intento más antes de que la tarjeta SIM quede inutilizable de forma permanente.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Error al desbloquear la tarjeta SIM con el PIN"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Error al desbloquear la tarjeta SIM con el PUK"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Código aceptado"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Sin servicio"</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Cambiar método de entrada"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Modo de avión"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Se requiere el patrón después de reiniciar el dispositivo"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Se requiere el PIN después de reiniciar el dispositivo"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Se requiere la contraseña después de reiniciar el dispositivo"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Se requiere el patrón por razones de seguridad"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Se requiere el PIN por razones de seguridad"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Se requiere la contraseña por razones de seguridad"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Se requiere el patrón al cambiar de perfil"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Se requiere el PIN al cambiar de perfil"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Se requiere la contraseña al cambiar de perfil"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"El administrador bloqueó el dispositivo"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"El dispositivo se bloqueó manualmente"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Hace <xliff:g id="NUMBER_1">%d</xliff:g> horas que no se desbloquea el dispositivo. Confirma el patrón.</item>
-      <item quantity="one">Hace <xliff:g id="NUMBER_0">%d</xliff:g> hora que no se desbloquea el dispositivo. Confirma el patrón.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Hace <xliff:g id="NUMBER_1">%d</xliff:g> horas que no se desbloquea el dispositivo. Confirma el PIN.</item>
-      <item quantity="one">Hace <xliff:g id="NUMBER_0">%d</xliff:g> hora que no se desbloquea el dispositivo. Confirma el PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Hace <xliff:g id="NUMBER_1">%d</xliff:g> horas que no se desbloquea el dispositivo. Confirma la contraseña.</item>
-      <item quantity="one">Hace <xliff:g id="NUMBER_0">%d</xliff:g> hora que no se desbloquea el dispositivo. Confirma la contraseña.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"No reconocido"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-es/strings.xml b/packages/Keyguard/res/values-es/strings.xml
deleted file mode 100644
index 3ef737c..0000000
--- a/packages/Keyguard/res/values-es/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Bloqueo"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Introduce el código PIN."</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Escribe el PUK de la tarjeta SIM y un nuevo código PIN"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"Código PUK de la tarjeta SIM"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Nuevo código PIN de tarjeta SIM"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Toca para introducir contraseña"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Introduce la contraseña para desbloquear."</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Introduce el código PIN para desbloquear."</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Código PIN incorrecto"</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Cargado"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Cargando"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Cargando rápidamente"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Cargando lentamente"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Conecta el cargador."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Ve al menú para desbloquear la pantalla."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Bloqueada para la red"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"No hay tarjeta SIM"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"No se ha insertado ninguna tarjeta SIM en el tablet."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"No se ha insertado ninguna tarjeta SIM en el teléfono."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Inserta una tarjeta SIM."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"Falta la tarjeta SIM o no se puede leer. Introduce una tarjeta SIM."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Tarjeta SIM inutilizable"</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Tu tarjeta SIM se ha inhabilitado permanentemente.\n Para obtener otra, ponte en contacto con tu proveedor de servicios de telefonía."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"La tarjeta SIM está bloqueada."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"La tarjeta SIM está bloqueada con el código PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Desbloqueando tarjeta SIM…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Área de PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Área de PIN de SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Área de PUK de SIM"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Próxima alarma: <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Eliminar"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Intro"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"¿Has olvidado el patrón?"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"El patrón es incorrecto"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Contraseña incorrecta"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"PIN incorrecto"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Inténtalo de nuevo en <xliff:g id="NUMBER">%d</xliff:g> segundos."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Dibuja tu patrón de desbloqueo."</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Introduce el PIN de la tarjeta SIM."</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Introduce el PIN de la SIM de <xliff:g id="CARRIER">%1$s</xliff:g>"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Introduce el PIN."</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Escribe tu contraseña."</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"La tarjeta SIM está inhabilitada. Para continuar, introduce el código PUK. Si quieres obtener más información, ponte en contacto con el operador"</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"La SIM de <xliff:g id="CARRIER">%1$s</xliff:g> está inhabilitada. Introduce el código PUK para continuar. Ponte en contacto con el operador para obtener más información."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Introduce el código PIN deseado"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Confirma el código PIN"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Desbloqueando tarjeta SIM…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Introduce un código PIN con una longitud comprendida entre cuatro y ocho dígitos."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"El código PUK debe tener ocho números como mínimo."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Vuelve a introducir el código PUK correcto. Si introduces un código incorrecto varias veces, se inhabilitará la tarjeta SIM."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Los códigos PIN no coinciden."</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Demasiados intentos incorrectos de crear el patrón"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Has introducido un código PIN incorrecto <xliff:g id="NUMBER_0">%1$d</xliff:g> veces. \n\nInténtalo de nuevo en <xliff:g id="NUMBER_1">%2$d</xliff:g> segundos."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Has introducido una contraseña incorrecta <xliff:g id="NUMBER_0">%1$d</xliff:g> veces. \n\nInténtalo de nuevo en <xliff:g id="NUMBER_1">%2$d</xliff:g> segundos."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Has fallado <xliff:g id="NUMBER_0">%1$d</xliff:g> veces al dibujar tu patrón de desbloqueo. \n\nInténtalo de nuevo en <xliff:g id="NUMBER_1">%2$d</xliff:g> segundos."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Has intentado desbloquear el tablet de forma incorrecta <xliff:g id="NUMBER_0">%1$d</xliff:g> veces. Si se producen <xliff:g id="NUMBER_1">%2$d</xliff:g> intentos incorrectos más, se restablecerá el tablet, lo que borrará todos sus datos."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Has intentado desbloquear el teléfono de forma incorrecta <xliff:g id="NUMBER_0">%1$d</xliff:g> veces. Si se producen <xliff:g id="NUMBER_1">%2$d</xliff:g> intentos incorrectos más, se restablecerá el teléfono, lo que borrará todos sus datos."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Has intentado desbloquear el tablet de forma incorrecta <xliff:g id="NUMBER">%d</xliff:g> veces. Este tablet se eliminará, lo que borrará todos sus datos."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Has intentado desbloquear el teléfono de forma incorrecta <xliff:g id="NUMBER">%d</xliff:g> veces. Este teléfono se eliminará, lo que borrará todos sus datos."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Has intentado desbloquear el tablet de forma incorrecta <xliff:g id="NUMBER_0">%1$d</xliff:g> veces. Si se producen <xliff:g id="NUMBER_1">%2$d</xliff:g> intentos incorrectos más, se eliminará a este usuario, lo que borrará todos sus datos."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Has intentado desbloquear el teléfono de forma incorrecta <xliff:g id="NUMBER_0">%1$d</xliff:g> veces. Si se producen <xliff:g id="NUMBER_1">%2$d</xliff:g> intentos incorrectos más, se eliminará a este usuario, lo que borrará todos sus datos."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Has intentado desbloquear el tablet de forma incorrecta <xliff:g id="NUMBER">%d</xliff:g> veces. Este usuario se eliminará, lo que borrará todos sus datos."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Has intentado desbloquear el teléfono de forma incorrecta <xliff:g id="NUMBER">%d</xliff:g> veces. Este usuario se eliminará, lo que borrará todos sus datos."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Has intentado desbloquear el tablet de forma incorrecta <xliff:g id="NUMBER_0">%1$d</xliff:g> veces. Si se producen <xliff:g id="NUMBER_1">%2$d</xliff:g> intentos incorrectos más, se eliminará el perfil de trabajo, lo que borrará todos sus datos."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Has intentado desbloquear el teléfono de forma incorrecta <xliff:g id="NUMBER_0">%1$d</xliff:g> veces. Si se producen <xliff:g id="NUMBER_1">%2$d</xliff:g> intentos incorrectos más, se eliminará el perfil de trabajo, lo que borrará todos sus datos."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Has intentado desbloquear el tablet de forma incorrecta <xliff:g id="NUMBER">%d</xliff:g> veces. El perfil de trabajo se eliminará, lo que borrará todos sus datos."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Has intentado desbloquear el teléfono de forma incorrecta <xliff:g id="NUMBER">%d</xliff:g> veces. El perfil de trabajo se eliminará, lo que borrará todos sus datos."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Has fallado <xliff:g id="NUMBER_0">%1$d</xliff:g> veces al dibujar el patrón de desbloqueo. Si fallas otras <xliff:g id="NUMBER_1">%2$d</xliff:g> veces, deberás usar una cuenta de correo electrónico para desbloquear el tablet.\n\n Inténtalo de nuevo en <xliff:g id="NUMBER_2">%3$d</xliff:g> segundos."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Has fallado <xliff:g id="NUMBER_0">%1$d</xliff:g> veces al dibujar el patrón de desbloqueo. Si fallas otras <xliff:g id="NUMBER_1">%2$d</xliff:g> veces, deberás usar una cuenta de correo electrónico para desbloquear el teléfono.\n\n Inténtalo de nuevo en <xliff:g id="NUMBER_2">%3$d</xliff:g> segundos."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Código PIN de la tarjeta SIM incorrecto. Debes ponerte en contacto con tu operador para desbloquear el dispositivo."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">Código PIN de la tarjeta SIM incorrecto. Te quedan <xliff:g id="NUMBER_1">%d</xliff:g> intentos.</item>
-      <item quantity="one">Código PIN de la tarjeta SIM incorrecto. Te queda <xliff:g id="NUMBER_0">%d</xliff:g> intento para tener que ponerte en contacto con tu operador para desbloquear el dispositivo.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"La tarjeta SIM no se puede utilizar. Ponte en contacto con tu operador."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">Código PUK de la tarjeta SIM incorrecto. Te quedan <xliff:g id="NUMBER_1">%d</xliff:g> intentos para que la tarjeta SIM no se pueda utilizar de forma permanente.</item>
-      <item quantity="one">Código PUK de la tarjeta SIM incorrecto. Te queda <xliff:g id="NUMBER_0">%d</xliff:g> intento para que la tarjeta SIM no se pueda utilizar de forma permanente.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Error al intentar desbloquear la tarjeta SIM con el código PIN"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Error al intentar desbloquear la tarjeta SIM con el código PUK"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Código aceptado"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Sin servicio"</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Cambiar método de introducción"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Modo avión"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Debes introducir el patrón después de reiniciar el dispositivo"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Debes introducir el PIN después de reiniciar el dispositivo"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Debes introducir la contraseña después de reiniciar el dispositivo"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Debes introducir el patrón como medida de seguridad adicional"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Debes introducir el PIN como medida de seguridad adicional"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Debes introducir la contraseña como medida de seguridad adicional"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Debes introducir el patrón cuando cambies de perfil"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Debes introducir el PIN cuando cambies de perfil"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Debes introducir la contraseña cuando cambies de perfil"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Un administrador ha bloqueado el dispositivo"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"El dispositivo se ha bloqueado manualmente"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">El dispositivo no se ha desbloqueado durante <xliff:g id="NUMBER_1">%d</xliff:g> horas. Confirma el patrón.</item>
-      <item quantity="one">El dispositivo no se ha desbloqueado durante <xliff:g id="NUMBER_0">%d</xliff:g> hora. Confirma el patrón.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">El dispositivo no se ha desbloqueado durante <xliff:g id="NUMBER_1">%d</xliff:g> horas. Confirma el PIN.</item>
-      <item quantity="one">El dispositivo no se ha desbloqueado durante <xliff:g id="NUMBER_0">%d</xliff:g> hora. Confirma el PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">El dispositivo no se ha desbloqueado durante <xliff:g id="NUMBER_1">%d</xliff:g> horas. Confirma la contraseña.</item>
-      <item quantity="one">El dispositivo no se ha desbloqueado durante <xliff:g id="NUMBER_0">%d</xliff:g> hora. Confirma la contraseña.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"No reconocido"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-et/strings.xml b/packages/Keyguard/res/values-et/strings.xml
deleted file mode 100644
index 47b6332..0000000
--- a/packages/Keyguard/res/values-et/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Klahvilukk"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Sisestage PIN-kood"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Sisestage SIM-i PUK- ja uus PIN-kood"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM-i PUK-kood"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Uus SIM-i PIN-kood"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Puudutage parooli sisestamiseks"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Avamiseks sisestage parool"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Avamiseks sisestage PIN-kood"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Vale PIN-kood."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Laetud"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Laadimine"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Kiiresti laadimine"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Aeglaselt laadimine"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Ühendage laadija."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Avamiseks vajutage menüüklahvi."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Võrk on suletud"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"SIM-kaarti pole"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Tahvelarvutis pole SIM-kaarti."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Telefonis pole SIM-kaarti."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Sisestage SIM-kaart."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM-kaart puudub või on loetamatu. Sisestage SIM-kaart."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Kasutamiskõlbmatu SIM-kaart."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"SIM-kaart on jäädavalt keelatud.\n Uue SIM-kaardi saamiseks võtke ühendust oma mobiilsideoperaatoriga."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM-kaart on lukus."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM-kaart on PUK-lukus."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"SIM-kaardi avamine ..."</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN-koodi ala"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM-kaardi PIN-koodi ala"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM-kaardi PUK-koodi ala"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Järgmine alarm on määratud ajaks <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Kustuta"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Sisestusklahv"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Unustasin mustri"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Vale muster"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Vale parool"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Vale PIN-kood"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Proovige uuesti <xliff:g id="NUMBER">%d</xliff:g> sekundi pärast."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Joonistage oma muster"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Sisestage SIM-i PIN-kood"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Sisestage SIM-kaardi PIN-kood operaatori „<xliff:g id="CARRIER">%1$s</xliff:g>” puhul"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Sisestage PIN-kood"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Sisestage parool"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM on nüüd keelatud. Jätkamiseks sisestage PUK-kood. Üksikasju küsige operaatorilt."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM-kaart „<xliff:g id="CARRIER">%1$s</xliff:g>” on nüüd keelatud. Jätkamiseks sisestage PUK-kood. Üksikasjade saamiseks võtke ühendust operaatoriga."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Sisestage soovitud PIN-kood"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Kinnitage soovitud PIN-kood"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"SIM-kaardi avamine ..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Sisestage 4–8-numbriline PIN-kood."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK-koodi pikkus peab olema vähemalt 8 numbrit."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Sisestage uuesti õige PUK-kood. Korduvkatsete korral keelatakse SIM jäädavalt."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN-koodid ei ole vastavuses"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Liiga palju mustrikatseid"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Olete PIN-koodi <xliff:g id="NUMBER_0">%1$d</xliff:g> korda valesti sisestanud.\n\nProovige <xliff:g id="NUMBER_1">%2$d</xliff:g> sekundi pärast uuesti."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Olete parooli <xliff:g id="NUMBER_0">%1$d</xliff:g> korda valesti sisestanud. \n\nProovige uuesti <xliff:g id="NUMBER_1">%2$d</xliff:g> sekundi pärast."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Joonistasite oma avamismustri <xliff:g id="NUMBER_0">%1$d</xliff:g> korda valesti.\n\nProovige <xliff:g id="NUMBER_1">%2$d</xliff:g> sekundi pärast uuesti."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Olete püüdnud <xliff:g id="NUMBER_0">%1$d</xliff:g> korda valesti tahvelarvutit avada. Pärast <xliff:g id="NUMBER_1">%2$d</xliff:g> ebaõnnestunud katset tahvelarvuti lähtestatakse ja kõik selle andmed kustutatakse."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Olete püüdnud <xliff:g id="NUMBER_0">%1$d</xliff:g> korda valesti telefoni avada. Pärast <xliff:g id="NUMBER_1">%2$d</xliff:g> ebaõnnestunud katset telefon lähtestatakse ja kõik selle andmed kustutatakse."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Olete püüdnud <xliff:g id="NUMBER">%d</xliff:g> korda valesti tahvelarvutit avada. Tahvelarvuti lähtestatakse ja kõik selle andmed kustutatakse."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Olete püüdnud <xliff:g id="NUMBER">%d</xliff:g> korda valesti telefoni avada. Telefon lähtestatakse ja kõik selle andmed kustutatakse."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Olete püüdnud <xliff:g id="NUMBER_0">%1$d</xliff:g> korda valesti tahvelarvutit avada. Pärast <xliff:g id="NUMBER_1">%2$d</xliff:g> ebaõnnestunud katset kasutaja eemaldatakse ja kõik kasutaja andmed kustutatakse."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Olete püüdnud <xliff:g id="NUMBER_0">%1$d</xliff:g> korda valesti telefoni avada. Pärast <xliff:g id="NUMBER_1">%2$d</xliff:g> ebaõnnestunud katset kasutaja eemaldatakse ja kõik kasutaja andmed kustutatakse."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Olete püüdnud <xliff:g id="NUMBER">%d</xliff:g> korda valesti tahvelarvutit avada. Kasutaja eemaldatakse ja kõik kasutaja andmed kustutatakse."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Olete püüdnud <xliff:g id="NUMBER">%d</xliff:g> korda valesti telefoni avada. Kasutaja eemaldatakse ja kõik kasutaja andmed kustutatakse."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Olete püüdnud <xliff:g id="NUMBER_0">%1$d</xliff:g> korda valesti tahvelarvutit avada. Pärast <xliff:g id="NUMBER_1">%2$d</xliff:g> ebaõnnestunud katset tööprofiil eemaldatakse ja kõik profiili andmed kustutatakse."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Olete püüdnud <xliff:g id="NUMBER_0">%1$d</xliff:g> korda valesti telefoni avada. Pärast <xliff:g id="NUMBER_1">%2$d</xliff:g> ebaõnnestunud katset tööprofiil eemaldatakse ja kõik profiili andmed kustutatakse."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Olete püüdnud <xliff:g id="NUMBER">%d</xliff:g> korda valesti tahvelarvutit avada. Tööprofiil eemaldatakse ja kõik profiili andmed kustutatakse."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Olete püüdnud <xliff:g id="NUMBER">%d</xliff:g> korda valesti telefoni avada. Tööprofiil eemaldatakse ja kõik profiili andmed kustutatakse."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Joonistasite oma avamismustri <xliff:g id="NUMBER_0">%1$d</xliff:g> korda valesti. Pärast veel <xliff:g id="NUMBER_1">%2$d</xliff:g> ebaõnnestunud katset palutakse teil tahvelarvuti avada meilikontoga.\n\n Proovige uuesti <xliff:g id="NUMBER_2">%3$d</xliff:g> sekundi pärast."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Joonistasite oma avamismustri <xliff:g id="NUMBER_0">%1$d</xliff:g> korda valesti. Pärast veel <xliff:g id="NUMBER_1">%2$d</xliff:g> ebaõnnestunud katset palutakse teil telefon avada meilikontoga.\n\n Proovige uuesti <xliff:g id="NUMBER_2">%3$d</xliff:g> sekundi pärast."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Vale SIM-i PIN-kood, seadme avamiseks peate nüüd ühendust võtma oma operaatoriga."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">Vale SIM-kaardi PIN-kood, teil on jäänud veel <xliff:g id="NUMBER_1">%d</xliff:g> katset.</item>
-      <item quantity="one">Vale SIM-kaardi PIN-kood, teil on jäänud veel <xliff:g id="NUMBER_0">%d</xliff:g> katse enne, kui peate seadme avamiseks operaatoriga ühendust võtma.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM ei ole kasutatav. Võtke ühendust operaatoriga."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">Vale SIM-kaardi PUK-kood, teil on jäänud veel <xliff:g id="NUMBER_1">%d</xliff:g> katset enne, kui SIM-kaart püsivalt lukustatakse.</item>
-      <item quantity="one">Vale SIM-kaardi PUK-kood, teil on jäänud veel <xliff:g id="NUMBER_0">%d</xliff:g> katse enne, kui SIM-kaart püsivalt lukustatakse.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"SIM-i PIN-koodi toiming ebaõnnestus."</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"SIM-i PUK-koodi toiming ebaõnnestus."</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Kood on õige."</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Teenus puudub."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Vaheta sisestusmeetodit"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Lennukirežiim"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Pärast seadme taaskäivitamist tuleb sisestada muster"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Pärast seadme taaskäivitamist tuleb sisestada PIN-kood"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Pärast seadme taaskäivitamist tuleb sisestada parool"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Lisaturvalisuse huvides tuleb sisestada muster"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Lisaturvalisuse huvides tuleb sisestada PIN-kood"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Lisaturvalisuse huvides tuleb sisestada parool"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Profiilide vahetamisel tuleb sisestada muster"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Profiilide vahetamisel tuleb sisestada PIN-kood"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Profiilide vahetamisel tuleb sisestada parool"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Seadme administraator lukustas seadme"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Seade lukustati käsitsi"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Seadet pole avatud <xliff:g id="NUMBER_1">%d</xliff:g> tundi. Kinnitage muster.</item>
-      <item quantity="one">Seadet pole avatud <xliff:g id="NUMBER_0">%d</xliff:g> tund. Kinnitage muster.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Seadet pole avatud <xliff:g id="NUMBER_1">%d</xliff:g> tundi. Kinnitage PIN-kood.</item>
-      <item quantity="one">Seadet pole avatud <xliff:g id="NUMBER_0">%d</xliff:g> tund. Kinnitage PIN-kood.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Seadet pole avatud <xliff:g id="NUMBER_1">%d</xliff:g> tundi. Kinnitage parool.</item>
-      <item quantity="one">Seadet pole avatud <xliff:g id="NUMBER_0">%d</xliff:g> tund. Kinnitage parool.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Ei tuvastatud"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-eu/strings.xml b/packages/Keyguard/res/values-eu/strings.xml
deleted file mode 100644
index 5f4abce..0000000
--- a/packages/Keyguard/res/values-eu/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Teklatu-babeslea"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Idatzi PIN kodea"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Idatzi SIM txartelaren PUK kodea eta PIN kode berria"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM txartelaren PUK kodea"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"SIM txartelaren PIN kode berria"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Pasahitza idazteko, ukitu hau"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Idatzi desblokeatzeko pasahitza"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Idatzi desblokeatzeko PIN kodea"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"PIN kode okerra."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Kargatuta"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Kargatzen"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Bizkor kargatzen"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Motel kargatzen"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Konektatu kargagailura."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Desblokeatzeko, sakatu Menua."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Sarea blokeatuta"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Ez dago SIM txartelik"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Tabletak ez du SIM txartelik."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Telefonoak ez du SIM txartelik."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Sartu SIM txartela."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM txartela falta da edo ezin da irakurri. Sartu SIM txartel bat."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"SIM txartela erabilgaitza da."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"SIM txartela behin betiko desgaitu zaizu.\n Beste SIM txartel bat lortzeko, jarri telefonia-zerbitzuen hornitzailearekin harremanetan."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM txartela blokeatuta dago."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM txartela PUK bidez blokeatuta dago."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"SIM txartela desblokeatzen…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN kodearen eremua"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM txartelaren PIN kodearen eremua"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM txartelaren PUK kodearen eremua"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Hurrengo alarmak ordu honetan joko du: <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Ezabatu"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Sartu"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Eredua ahaztu zaizu"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Eredu okerra"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Pasahitz okerra"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"PIN okerra"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Saiatu berriro <xliff:g id="NUMBER">%d</xliff:g> segundo barru."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Marraztu eredua"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Idatzi SIMaren PIN kodea"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Idatzi \"<xliff:g id="CARRIER">%1$s</xliff:g>\" operadorearen SIM txartelaren PIN kodea"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Idatzi PINa"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Idatzi pasahitza"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIMa desgaitu egin da. Jarraitzeko, idatzi PUK kodea. Xehetasunak lortzeko, jarri operadorearekin harremanetan."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"\"<xliff:g id="CARRIER">%1$s</xliff:g>\" SIM txartela desgaitu egin da. Jarraitzeko, idatzi PUK kodea. Xehetasunak jakiteko, jarri operadorearekin harremanetan."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Idatzi erabili nahi duzun PIN kodea"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Berretsi erabili nahi duzun PIN kodea"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"SIM txartela desblokeatzen…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Idatzi 4 eta 8 zenbaki arteko PINa."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUKak 8 zenbaki izan behar ditu gutxienez."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Idatzi berriro PUK kode zuzena. Hainbat saiakera oker eginez gero, betirako desgaituko da SIMa."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN kodeak ez datoz bat"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Eredua marrazteko saiakera gehiegi egin dira"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"PINa oker idatzi duzu <xliff:g id="NUMBER_0">%1$d</xliff:g> aldiz. \n\nSaiatu berriro <xliff:g id="NUMBER_1">%2$d</xliff:g> segundo barru."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Pasahitza oker idatzi duzu <xliff:g id="NUMBER_0">%1$d</xliff:g> aldiz. \n\nSaiatu berriro <xliff:g id="NUMBER_1">%2$d</xliff:g> segundo barru."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Desblokeatzeko eredua oker marraztu duzu <xliff:g id="NUMBER_0">%1$d</xliff:g> aldiz. \n\nSaiatu berriro <xliff:g id="NUMBER_1">%2$d</xliff:g> segundo barru."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"<xliff:g id="NUMBER_0">%1$d</xliff:g> aldiz saiatu zara telefonoa desblokeatzen, baina huts egin duzu denetan. Beste <xliff:g id="NUMBER_1">%2$d</xliff:g> aldiz huts egiten baduzu, tableta berrezarri egingo da eta, ondorioz, datu guztiak ezabatuko dira."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"<xliff:g id="NUMBER_0">%1$d</xliff:g> aldiz saiatu zara telefonoa desblokeatzen, baina huts egin duzu denetan. Beste <xliff:g id="NUMBER_1">%2$d</xliff:g> aldiz huts egiten baduzu, telefonoa berrezarri egingo da eta, ondorioz, datu guztiak ezabatuko dira."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"<xliff:g id="NUMBER">%d</xliff:g> aldiz saiatu zara telefonoa desblokeatzen, baina huts egin duzu denetan. Tableta berrezarri egingo da eta, ondorioz, datu guztiak ezabatuko dira."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"<xliff:g id="NUMBER">%d</xliff:g> aldiz saiatu zara telefonoa desblokeatzen, baina huts egin duzu denetan. Telefonoa berrezarri egingo da eta, ondorioz, datu guztiak ezabatuko dira."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"<xliff:g id="NUMBER_0">%1$d</xliff:g> aldiz saiatu zara tableta desblokeatzen, baina huts egin duzu denetan. Beste <xliff:g id="NUMBER_1">%2$d</xliff:g> aldiz huts egiten baduzu, erabiltzailea kendu egingo da eta, ondorioz, erabiltzailearen datu guztiak ezabatuko dira."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"<xliff:g id="NUMBER_0">%1$d</xliff:g> aldiz saiatu zara telefonoa desblokeatzen, baina huts egin duzu denetan. Beste <xliff:g id="NUMBER_1">%2$d</xliff:g> aldiz huts egiten baduzu, erabiltzailea kendu egingo da eta, ondorioz, erabiltzailearen datu guztiak ezabatuko dira."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"<xliff:g id="NUMBER">%d</xliff:g> aldiz saiatu zara tableta desblokeatzen, baina huts egin duzu denetan. Erabiltzailea kendu egingo da eta, ondorioz, erabiltzailearen datu guztiak ezabatuko dira."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"<xliff:g id="NUMBER">%d</xliff:g> aldiz saiatu zara telefonoa desblokeatzen, baina huts egin duzu denetan. Erabiltzailea kendu egingo da eta, ondorioz, erabiltzailearen datu guztiak ezabatuko dira."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"<xliff:g id="NUMBER_0">%1$d</xliff:g> aldiz saiatu zara tableta desblokeatzen, baina huts egin duzu denetan. Beste <xliff:g id="NUMBER_1">%2$d</xliff:g> aldiz huts egiten baduzu, laneko profila kendu egingo da eta, ondorioz, profileko datu guztiak ezabatuko dira."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"<xliff:g id="NUMBER_0">%1$d</xliff:g> aldiz saiatu zara telefonoa desblokeatzen, baina huts egin duzu denetan. Beste <xliff:g id="NUMBER_1">%2$d</xliff:g> aldiz huts egiten baduzu, laneko profila kendu egingo da eta, ondorioz, profileko datu guztiak ezabatuko dira."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"<xliff:g id="NUMBER">%d</xliff:g> aldiz saiatu zara tableta desblokeatzen, baina huts egin duzu denetan. Laneko profila kendu egingo da eta, ondorioz, profileko datu guztiak ezabatuko dira."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"<xliff:g id="NUMBER">%d</xliff:g> aldiz saiatu zara telefonoa desblokeatzen, baina huts egin duzu denetan. Laneko profila kendu egingo da eta, ondorioz, profileko datu guztiak ezabatuko dira."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Desblokeatzeko eredua oker marraztu duzu <xliff:g id="NUMBER_0">%1$d</xliff:g> aldiz. Beste <xliff:g id="NUMBER_1">%2$d</xliff:g> aldiz oker marrazten baduzu, tableta posta-kontu baten bidez desblokeatzeko eskatuko dizugu.\n\n Saiatu berriro <xliff:g id="NUMBER_2">%3$d</xliff:g> segundo barru."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Desblokeatzeko eredua oker marraztu duzu <xliff:g id="NUMBER_0">%1$d</xliff:g> aldiz. Beste <xliff:g id="NUMBER_1">%2$d</xliff:g> aldiz oker marrazten baduzu, telefonoa posta-kontu baten bidez desblokeatzeko eskatuko dizugu.\n\n Saiatu berriro <xliff:g id="NUMBER_2">%3$d</xliff:g> segundo barru."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"SIM txartelaren PIN kodea okerra da. Gailua desblokeatzeko, jarri operadorearekin harremanetan."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">SIM txartelaren PIN kodea okerra da. <xliff:g id="NUMBER_1">%d</xliff:g> saiakera geratzen zaizkizu gailua desblokeatzeko.</item>
-      <item quantity="one">SIM txartelaren PIN kodea okerra da. <xliff:g id="NUMBER_0">%d</xliff:g> saiakera geratzen zaizu gailua desblokeatzeko.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM txartela erabilgaitza da. Jarri operadorearekin harremanetan."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">SIM txartelaren PUK kodea okerra da. <xliff:g id="NUMBER_1">%d</xliff:g> saiakera geratzen zaizkizu SIM txartela betiko erabilgaitz geratu aurretik.</item>
-      <item quantity="one">SIM txartelaren PUK kodea okerra da. <xliff:g id="NUMBER_0">%d</xliff:g> saiakera geratzen zaizu SIM txartela betiko erabilgaitz geratu aurretik.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"SIM txartelaren PIN eragiketak huts egin du!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"SIM txartelaren PUK eragiketak huts egin du!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Kodea onartu da!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Zerbitzurik gabe."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Aldatu idazketa-metodoa"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Hegaldi modua"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Eredua marraztu beharko duzu gailua berrabiarazten denean"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"PIN kodea idatzi beharko duzu gailua berrabiarazten denean"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Pasahitza idatzi beharko duzu gailua berrabiarazten denean"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Segurtasun handiagoa izateko, eredua behar da"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Segurtasun handiagoa izateko, PIN kodea behar da"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Segurtasun handiagoa izateko, pasahitza behar da"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Eredua marraztu beharko duzu profilez aldatzen baduzu"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"PIN kodea idatzi beharko duzu profilez aldatzen baduzu"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Pasahitza idatzi beharko duzu profilez aldatzen baduzu"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Gailua blokeatu du administratzaileak"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Gailua blokeatu da eskuz"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Gailua ez da desblokeatu <xliff:g id="NUMBER_1">%d</xliff:g> orduz. Berretsi eredua.</item>
-      <item quantity="one">Gailua ez da desblokeatu <xliff:g id="NUMBER_0">%d</xliff:g> orduz. Berretsi eredua.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Gailua ez da desblokeatu <xliff:g id="NUMBER_1">%d</xliff:g> orduz. Berretsi PIN kodea.</item>
-      <item quantity="one">Gailua ez da desblokeatu <xliff:g id="NUMBER_0">%d</xliff:g> orduz. Berretsi PIN kodea.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Gailua ez da desblokeatu <xliff:g id="NUMBER_1">%d</xliff:g> orduz. Berretsi pasahitza.</item>
-      <item quantity="one">Gailua ez da desblokeatu <xliff:g id="NUMBER_0">%d</xliff:g> orduz. Berretsi pasahitza.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Ez da ezagutzen"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-fa/strings.xml b/packages/Keyguard/res/values-fa/strings.xml
deleted file mode 100644
index 40952e2..0000000
--- a/packages/Keyguard/res/values-fa/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Keyguard"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"پین کد را وارد کنید"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"‏PUK سیم کارت و کد پین جدید را تایپ کنید"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"‏کد PUK سیم کارت"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"کد پین جدید سیم کارت"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"برای تایپ گذرواژه لمس کنید"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"برای بازکردن قفل، گذرواژه را وارد کنید"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"برای بازکردن قفل، پین را تایپ کنید"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"پین کد اشتباه است."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"شارژ شد"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"در حال شارژ شدن"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"شارژ سریع"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"شارژ آهسته"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"شارژر خود را وصل کنید."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"برای بازگشایی قفل روی منو فشار دهید."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"شبکه قفل شد"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"سیم کارت موجود نیست"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"سیم کارتی در رایانه لوحی نیست."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"سیم کارت در تلفن نیست."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"سیم کارت را وارد کنید."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"سیم کارت موجود نیست یا قابل خواندن نیست. یک سیم کارت وارد کنید."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"سیم کارت غیرقابل استفاده است."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"‏سیم کارت شما به‌طور دائم غیر فعال شده است. \nبرای داشتن سیم کارت دیگر با ارائه‎دهنده سرویس بی‎سیم خود تماس بگیرید."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"سیم کارت قفل شد."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"‏سیم کارت با PUK قفل شده است."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"درحال بازگشایی قفل سیم کارت..."</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"قسمت پین"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"قسمت پین سیم‌کارت"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"‏قسمت PUK سیم‌کارت"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"هشدار بعدی برای <xliff:g id="ALARM">%1$s</xliff:g> تنظیم شد"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Delete"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"الگو را فراموش کرده‌اید"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"الگوی اشتباه"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"گذرواژه اشتباه"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"پین اشتباه"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"پس از <xliff:g id="NUMBER">%d</xliff:g> ثانیه دوباره امتحان کنید."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"الگوی خود را رسم کنید"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"پین سیم کارت را وارد کنید"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"پین سیم‌کارت «<xliff:g id="CARRIER">%1$s</xliff:g>» را وارد کنید"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"پین را وارد کنید"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"گذرواژه را وارد کنید"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"اکنون سیم کارت غیرفعال است. پین کد را برای ادامه وارد کنید. برای جزئیات با شرکت مخابراتی خود تماس بگیرید."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"‏اکنون سیم‌کارت «<xliff:g id="CARRIER">%1$s</xliff:g>» غیرفعال شده است. برای ادامه دادن، کد PUK را وارد کنید. برای اطلاع از جزئیات با شرکت مخابراتی تماس بگیرید."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"پین کد دلخواه را وارد کنید"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"تأیید پین کد دلخواه"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"بازگشایی قفل سیم کارت..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"یک پین ۴ تا ۸ رقمی را تایپ کنید."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"پین کد باید ۸ عدد یا بیشتر باشد."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"پین کد صحیح را دوباره وارد کنید. تلاش‌های مکرر به‌طور دائم سیم کارت را غیرفعال خواهد کرد."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"پین کدها منطبق نیستند"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"‏تلاش‎های زیادی برای کشیدن الگو صورت گرفته است"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"پین خود را <xliff:g id="NUMBER_0">%1$d</xliff:g> بار اشتباه تایپ کردید. \n\nپس از <xliff:g id="NUMBER_1">%2$d</xliff:g> ثانیه دوباره امتحان کنید."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"گذرواژه خود را <xliff:g id="NUMBER_0">%1$d</xliff:g> بار اشتباه تایپ کردید. \n\nپس از <xliff:g id="NUMBER_1">%2$d</xliff:g> ثانیه دوباره امتحان کنید."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"الگوی بازگشایی قفل خود را <xliff:g id="NUMBER_0">%1$d</xliff:g> بار اشتباه کشیدید. \n\nلطفاً پس از <xliff:g id="NUMBER_1">%2$d</xliff:g> ثانیه دوباره امتحان کنید."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"<xliff:g id="NUMBER_0">%1$d</xliff:g> تلاش ناموفق برای باز کردن قفل رایانه لوحی داشته‌اید. پس از <xliff:g id="NUMBER_1">%2$d</xliff:g> تلاش ناموفق دیگر، این رایانه لوحی بازنشانی می‌شود که با آن کل اطلاعاتش حذف می‌شود."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"<xliff:g id="NUMBER_0">%1$d</xliff:g> تلاش ناموفق برای باز کردن قفل تلفن داشته‌اید. پس از <xliff:g id="NUMBER_1">%2$d</xliff:g> تلاش ناموفق دیگر، تلفن بازنشانی می‌شود که با آن کل اطلاعاتش حذف می‌شود."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"<xliff:g id="NUMBER">%d</xliff:g> تلاش ناموفق برای باز کردن قفل رایانه لوحی داشته‌اید. این رایانه لوحی بازنشانی می‌شود که با آن همه اطلاعاتش حذف می‌شود."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"<xliff:g id="NUMBER">%d</xliff:g> تلاش ناموفق برای باز کردن قفل تلفن داشته‌اید. این تلفن بازنشانی می‌شود که با آن همه اطلاعاتش حذف می‌شود."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"<xliff:g id="NUMBER_0">%1$d</xliff:g> تلاش ناموفق برای باز کردن قفل رایانه لوحی داشته‌اید. پس از <xliff:g id="NUMBER_1">%2$d</xliff:g> تلاش ناموفق دیگر، این کاربر حذف می‌شود که با آن کل اطلاعات کاربر حذف می‌شود."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"<xliff:g id="NUMBER_0">%1$d</xliff:g> تلاش ناموفق برای باز کردن قفل تلفن داشته‌اید. پس از <xliff:g id="NUMBER_1">%2$d</xliff:g> تلاش ناموفق دیگر، این کاربر حذف می‌شود که با آن کل اطلاعات کاربر حذف می‌شود."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"<xliff:g id="NUMBER">%d</xliff:g> تلاش ناموفق برای باز کردن قفل رایانه لوحی داشته‌اید. این کاربر حذف می‌شود که با آن همه اطلاعات کاربر حذف می‌شود."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"<xliff:g id="NUMBER">%d</xliff:g> تلاش ناموفق برای باز کردن قفل تلفن داشته‌اید. این کاربر حذف می‌شود که با آن همه اطلاعات کاربر حذف می‌شود."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"<xliff:g id="NUMBER_0">%1$d</xliff:g> تلاش ناموفق برای باز کردن قفل رایانه لوحی داشته‌اید. پس از <xliff:g id="NUMBER_1">%2$d</xliff:g> تلاش ناموفق دیگر، نمایه کار حذف می‌شود که با آن کل اطلاعات نمایه حذف می‌شود."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"<xliff:g id="NUMBER_0">%1$d</xliff:g> تلاش ناموفق برای باز کردن قفل تلفن داشته‌اید. پس از <xliff:g id="NUMBER_1">%2$d</xliff:g> تلاش ناموفق دیگر، نمایه کار حذف می‌شود که با آن کل اطلاعات نمایه حذف می‌شود."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"<xliff:g id="NUMBER">%d</xliff:g> تلاش ناموفق برای باز کردن قفل رایانه لوحی داشته‌اید. نمایه کار حذف می‌شود که با آن همه اطلاعات نمایه حذف می‌شود."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"<xliff:g id="NUMBER">%d</xliff:g> تلاش ناموفق برای باز کردن قفل تلفن داشته‌اید. نمایه کار حذف می‌شود که با آن همه اطلاعات نمایه حذف می‌شود."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"‏شما الگوی بازگشایی قفل خود را <xliff:g id="NUMBER_0">%1$d</xliff:g> بار اشتباه کشیده‎اید. بعد از <xliff:g id="NUMBER_1">%2$d</xliff:g> تلاش ناموفق، از شما خواسته می‎شود که با استفاده از یک حساب رایانامه قفل رایانه لوحی خود را باز کنید.\n\n لطفاً پس از <xliff:g id="NUMBER_2">%3$d</xliff:g> ثانیه دوباره امتحان کنید."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"‏شما الگوی بازگشایی قفل خود را <xliff:g id="NUMBER_0">%1$d</xliff:g> بار اشتباه کشیده‌اید. پس از <xliff:g id="NUMBER_1">%2$d</xliff:g> تلاش ناموفق، از شما خواسته می‎شود که با استفاده از یک حساب رایانامه قفل تلفن خود را باز کنید.\n\n لطفاً پس از <xliff:g id="NUMBER_2">%3$d</xliff:g> ثانیه دوباره امتحان کنید."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"کد پین سیم کارت اشتباه است، اکنون برای گشودن قفل دستگاهتان باید با شرکت مخابراتی تماس بگیرید."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">کد پین سیم‌کارت اشتباه است، <xliff:g id="NUMBER_1">%d</xliff:g> بار دیگر می‌توانید تلاش کنید.</item>
-      <item quantity="other">کد پین سیم‌کارت اشتباه است، <xliff:g id="NUMBER_1">%d</xliff:g> بار دیگر می‌توانید تلاش کنید.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"سیم کارت غیر قابل استفاده است. با شرکت مخابراتی‌تان تماس بگیرید."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">‏کد PUK سیم‌کارت اشتباه است، <xliff:g id="NUMBER_1">%d</xliff:g> بار دیگر می‌توانید تلاش کنید و پس از آن سیم‌کارت به صورت دائم غیر قابل استفاده می‌شود.</item>
-      <item quantity="other">‏کد PUK سیم‌کارت اشتباه است، <xliff:g id="NUMBER_1">%d</xliff:g> بار دیگر می‌توانید تلاش کنید و پس از آن سیم‌کارت به صورت دائم غیر قابل استفاده می‌شود.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"عملیات پین سیم کارت ناموفق بود!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"‏عملیات PUK سیم کارت ناموفق بود!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"کد پذیرفته شد!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"خدماتی وجود ندارد."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"تغییر روش ورودی"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"حالت هواپیما"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"بعد از بازنشانی دستگاه باید الگو وارد شود"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"بعد از بازنشانی دستگاه باید پین وارد شود"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"بعد از بازنشانی دستگاه باید گذرواژه وارد شود"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"برای ایمنی بیشتر باید الگو وارد شود"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"برای ایمنی بیشتر باید پین وارد شود"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"برای ایمنی بیشتر باید گذرواژه وارد شود"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"بعد از تغییر نمایه‌ها باید الگو وارد شود"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"بعد از تغییر نمایه‌ها باید پین وارد شود"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"بعد از تغییر نمایه‌ها باید گذرواژه وارد شود"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"سرپرست دستگاه آن را قفل کرده است"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"دستگاه به‌صورت دستی قفل شده است"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">قفل دستگاه به مدت <xliff:g id="NUMBER_1">%d</xliff:g> ساعت باز نشده است. الگو را تأیید کنید.</item>
-      <item quantity="other">قفل دستگاه به مدت <xliff:g id="NUMBER_1">%d</xliff:g> ساعت باز نشده است. الگو را تأیید کنید.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">قفل دستگاه به مدت <xliff:g id="NUMBER_1">%d</xliff:g> ساعت باز نشده است. پین را تأیید کنید.</item>
-      <item quantity="other">قفل دستگاه به مدت <xliff:g id="NUMBER_1">%d</xliff:g> ساعت باز نشده است. پین را تأیید کنید.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">قفل دستگاه به مدت <xliff:g id="NUMBER_1">%d</xliff:g> ساعت باز نشده است. گذرواژه را تأیید کنید.</item>
-      <item quantity="other">قفل دستگاه به مدت <xliff:g id="NUMBER_1">%d</xliff:g> ساعت باز نشده است. گذرواژه را تأیید کنید.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"شناخته نشد"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-fi/strings.xml b/packages/Keyguard/res/values-fi/strings.xml
deleted file mode 100644
index a1b96ca..0000000
--- a/packages/Keyguard/res/values-fi/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Näppäinvahti"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Anna PIN-koodi"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Anna SIM-kortin PUK-koodi ja uusi PIN-koodi"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM-kortin PUK-koodi"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Uusi SIM-kortin PIN-koodi"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Kosketa ja anna salasana"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Poista lukitus antamalla salasana"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Poista lukitus antamalla PIN-koodi"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"PIN-koodi väärin."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Täynnä"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Ladataan"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Nopea lataus"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Hidas lataus"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Kytke laturi."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Poista lukitus painamalla Valikko-painiketta."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Verkko lukittu"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Ei SIM-korttia"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Tablet-laitteessa ei ole SIM-korttia."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Puhelimessa ei ole SIM-korttia."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Aseta SIM-kortti."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM-korttia ei löydy tai sitä ei voi lukea. Aseta SIM-kortti."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"SIM-kortti ei kelpaa."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"SIM-kortti on poistettu pysyvästi käytöstä.\n Ota yhteyttä operaattoriisi ja hanki uusi SIM-kortti."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM-kortti on lukittu."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM-kortti on PUK-lukittu."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"SIM-kortin lukitusta poistetaan…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN-koodin alue"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM-kortin PIN-koodin alue"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM-kortin PUK-koodin alue"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Seuraava hälytys asetettu: <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Poista"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Unohtunut kuvio"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Väärä kuvio"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Väärä salasana"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Väärä PIN-koodi"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Yritä uudelleen <xliff:g id="NUMBER">%d</xliff:g> sekunnin kuluttua."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Piirrä kuvio"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Anna SIM-kortin PIN-koodi"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Anna operaattorin <xliff:g id="CARRIER">%1$s</xliff:g> SIM-kortin PIN-koodi"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Anna PIN-koodi"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Anna salasana"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM-kortti on nyt poistettu käytöstä. Jatka antamalla PUK-koodi. Saat lisätietoja ottamalla yhteyttä operaattoriin."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"Operaattorin <xliff:g id="CARRIER">%1$s</xliff:g> SIM-kortti on nyt lukittu. Jatka antamalla PUK-koodi. Saat lisätietoja operaattoriltasi."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Anna haluamasi PIN-koodi"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Vahvista haluamasi PIN-koodi"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"SIM-kortin lukitusta poistetaan…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Anna 4–8-numeroinen PIN-koodi."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK-koodissa tulee olla vähintään 8 numeroa."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Anna uudelleen oikea PUK-koodi. Jos teet liian monta yritystä, SIM-kortti poistetaan käytöstä pysyvästi."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN-koodit eivät täsmää"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Liikaa kuvionpiirtoyrityksiä"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Olet kirjoittanut PIN-koodin väärin <xliff:g id="NUMBER_0">%1$d</xliff:g> kertaa. \n\nYritä uudelleen <xliff:g id="NUMBER_1">%2$d</xliff:g> sekunnin kuluttua."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Olet kirjoittanut salasanan väärin <xliff:g id="NUMBER_0">%1$d</xliff:g> kertaa. \n\nYritä uudelleen <xliff:g id="NUMBER_1">%2$d</xliff:g> sekunnin kuluttua."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Olet piirtänyt lukituksenpoistokuvion väärin <xliff:g id="NUMBER_0">%1$d</xliff:g> kertaa. \n\nYritä uudelleen <xliff:g id="NUMBER_1">%2$d</xliff:g> sekunnin kuluttua."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Yritit avata tabletin lukituksen virheellisillä tiedoilla <xliff:g id="NUMBER_0">%1$d</xliff:g> kertaa. Jos teet vielä <xliff:g id="NUMBER_1">%2$d</xliff:g> epäonnistunutta yritystä, tämä tabletti nollataan ja kaikki sen tiedot poistetaan."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Yritit avata puhelimen lukituksen virheellisillä tiedoilla <xliff:g id="NUMBER_0">%1$d</xliff:g> kertaa. Jos teet vielä <xliff:g id="NUMBER_1">%2$d</xliff:g> epäonnistunutta yritystä, tämä puhelin nollataan ja kaikki sen tiedot poistetaan."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Yritit avata tabletin lukituksen virheellisillä tiedoilla <xliff:g id="NUMBER">%d</xliff:g> kertaa. Tämä tabletti nollataan ja kaikki sen tiedot poistetaan."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Yritit avata puhelimen lukituksen virheellisillä tiedoilla <xliff:g id="NUMBER">%d</xliff:g> kertaa. Tämä puhelin nollataan ja kaikki sen tiedot poistetaan."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Yritit avata tabletin lukituksen virheellisillä tiedoilla <xliff:g id="NUMBER_0">%1$d</xliff:g> kertaa. Jos teet vielä <xliff:g id="NUMBER_1">%2$d</xliff:g> epäonnistunutta yritystä, tämä käyttäjä ja kaikki käyttäjän tiedot poistetaan."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Yritit avata puhelimen lukituksen virheellisillä tiedoilla <xliff:g id="NUMBER_0">%1$d</xliff:g> kertaa. Jos teet vielä <xliff:g id="NUMBER_1">%2$d</xliff:g> epäonnistunutta yritystä, tämä käyttäjä ja kaikki käyttäjän tiedot poistetaan."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Yritit avata tabletin lukituksen virheellisillä tiedoilla <xliff:g id="NUMBER">%d</xliff:g> kertaa. Tämä käyttäjä ja kaikki sen tiedot poistetaan."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Yritit avata puhelimen lukituksen virheellisillä tiedoilla <xliff:g id="NUMBER">%d</xliff:g> kertaa. Tämä käyttäjä ja kaikki sen tiedot poistetaan."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Yritit avata tabletin lukituksen virheellisillä tiedoilla <xliff:g id="NUMBER_0">%1$d</xliff:g> kertaa. Jos teet vielä <xliff:g id="NUMBER_1">%2$d</xliff:g> epäonnistunutta yritystä, työprofiili ja kaikki sen tiedot poistetaan."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Yritit avata puhelimen lukituksen virheellisillä tiedoilla <xliff:g id="NUMBER_0">%1$d</xliff:g> kertaa. Jos teet vielä <xliff:g id="NUMBER_1">%2$d</xliff:g> epäonnistunutta yritystä, työprofiili ja kaikki sen tiedot poistetaan."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Yritit avata tabletin lukituksen virheellisillä tiedoilla <xliff:g id="NUMBER">%d</xliff:g> kertaa. Työprofiili ja kaikki sen tiedot poistetaan."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Yritit avata puhelimen lukituksen virheellisillä tiedoilla <xliff:g id="NUMBER">%d</xliff:g> kertaa. Työprofiili ja kaikki sen tiedot poistetaan."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Piirsit lukituksenpoistokuvion väärin <xliff:g id="NUMBER_0">%1$d</xliff:g> kertaa. Jos piirrät kuvion väärin vielä <xliff:g id="NUMBER_1">%2$d</xliff:g> kertaa, sinua pyydetään poistamaan tablet-laitteesi lukitus sähköpostitilin avulla.\n\n Yritä uudelleen <xliff:g id="NUMBER_2">%3$d</xliff:g> sekunnin kuluttua."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Piirsit lukituksenpoistokuvion väärin <xliff:g id="NUMBER_0">%1$d</xliff:g> kertaa. Jos piirrät kuvion väärin vielä <xliff:g id="NUMBER_1">%2$d</xliff:g> kertaa, sinua pyydetään poistamaan puhelimesi lukitus sähköpostitilin avulla.\n\n Yritä uudelleen <xliff:g id="NUMBER_2">%3$d</xliff:g> sekunnin kuluttua."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Virheellinen SIM-kortin PIN-koodi. Sinun on nyt otettava yhteys operaattoriin laitteen lukituksen avaamiseksi."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">Virheellinen SIM-kortin PIN-koodi. Sinulla on <xliff:g id="NUMBER_1">%d</xliff:g> yritystä jäljellä.</item>
-      <item quantity="one">Virheellinen SIM-kortin PIN-koodi. Sinulla on <xliff:g id="NUMBER_0">%d</xliff:g> yritys jäljellä, ennen kuin sinun on otettava yhteyttä operaattoriin laitteen lukituksen avaamiseksi.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM-kortti on käyttökelvoton. Ota yhteys operaattoriin."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">Virheellinen SIM-kortin PUK-koodi. Sinulla on <xliff:g id="NUMBER_1">%d</xliff:g> yritystä jäljellä, ennen kuin SIM-kortista tulee pysyvästi käyttökelvoton.</item>
-      <item quantity="one">Virheellinen SIM-kortin PUK-koodi. Sinulla on <xliff:g id="NUMBER_0">%d</xliff:g> yritys jäljellä, ennen kuin SIM-kortista tulee pysyvästi käyttökelvoton.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"SIM-kortin PIN-toiminto epäonnistui!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"SIM-kortin PUK-toiminto epäonnistui!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Koodi hyväksytty!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Ei yhteyttä."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Vaihda syöttötapaa."</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Lentokonetila"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Kuvio vaaditaan laitteen uudelleenkäynnistyksen jälkeen."</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"PIN-koodi vaaditaan laitteen uudelleenkäynnistyksen jälkeen."</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Salasana vaaditaan laitteen uudelleenkäynnistyksen jälkeen."</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Kuvio vaaditaan suojauksen parantamiseksi."</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"PIN-koodi vaaditaan suojauksen parantamiseksi."</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Salasana vaaditaan suojauksen parantamiseksi."</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Kuvio vaaditaan profiilia vaihdettaessa."</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"PIN-koodi vaaditaan profiilia vaihdettaessa."</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Salasana vaaditaan profiilia vaihdettaessa."</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Laitteen järjestelmänvalvoja on lukinnut laitteen."</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Laite lukittiin manuaalisesti."</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Laitteen lukitusta ei ole avattu <xliff:g id="NUMBER_1">%d</xliff:g> tuntiin. Vahvista kuvio.</item>
-      <item quantity="one">Laitteen lukitusta ei ole avattu <xliff:g id="NUMBER_0">%d</xliff:g> tuntiin. Vahvista kuvio.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Laitteen lukitusta ei ole avattu <xliff:g id="NUMBER_1">%d</xliff:g> tuntiin. Vahvista PIN-koodi.</item>
-      <item quantity="one">Laitteen lukitusta ei ole avattu <xliff:g id="NUMBER_0">%d</xliff:g> tuntiin. Vahvista PIN-koodi.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Laitteen lukitusta ei ole avattu <xliff:g id="NUMBER_1">%d</xliff:g> tuntiin. Vahvista salasana.</item>
-      <item quantity="one">Laitteen lukitusta ei ole avattu <xliff:g id="NUMBER_0">%d</xliff:g> tuntiin. Vahvista salasana.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Ei tunnistettu"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-fr-rCA/strings.xml b/packages/Keyguard/res/values-fr-rCA/strings.xml
deleted file mode 100644
index d920415..0000000
--- a/packages/Keyguard/res/values-fr-rCA/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Verrouillage du clavier"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Saisissez le NIP."</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Entrez le code PUK et le nouveau NIP de la carte SIM"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"Code PUK de la carte SIM"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Nouveau NIP de la carte SIM"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Appuyer pour saisir mot passe"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Saisissez le mot de passe pour déverrouiller le clavier."</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Saisissez le NIP pour déverrouiller le clavier."</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"NIP erroné."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Chargé"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Charge en cours..."</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Charge rapide"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Charge lente"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Branchez votre chargeur."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Appuyez sur \"Menu\" pour déverrouiller l\'appareil."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Réseau verrouillé"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Aucune carte SIM"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Aucune carte SIM n\'est insérée dans la tablette."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Aucune carte SIM n\'est insérée dans le téléphone."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Insérez une carte SIM."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"Carte SIM absente ou illisible. Veuillez insérer une carte SIM."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Carte SIM inutilisable."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Votre carte SIM a été définitivement désactivée.\n Veuillez contacter votre opérateur de téléphonie mobile pour en obtenir une autre."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"La carte SIM est verrouillée."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"La carte SIM est verrouillée par clé PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Déverrouillage de la carte SIM en cours…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Zone du NIP"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Zone du NIP de la carte SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Zone du code PUK de la carte SIM"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Heure de la prochaine alarme : <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Supprimer"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Entrée"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"J\'ai oublié le schéma"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Schéma incorrect."</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Mot de passe incorrect."</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"NIP incorrect."</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Réessayez dans <xliff:g id="NUMBER">%d</xliff:g> secondes."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Dessinez votre schéma."</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Saisissez le NIP de la carte SIM"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Entrez le NIP de la carte SIM pour « <xliff:g id="CARRIER">%1$s</xliff:g> »"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Saisissez le NIP."</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Saisissez votre mot de passe."</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"La carte SIM est maintenant désactivée. Saisissez le code PUK pour continuer. Contactez votre opérateur pour en savoir plus."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"Le carte SIM « <xliff:g id="CARRIER">%1$s</xliff:g> » est maintenant désactivée. Entrez le code PUK pour continuer.  Pour obtenir plus de détails, communiquez avec le fournisseur de services."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Saisir le NIP souhaité"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Confirmer le NIP souhaité"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Déblocage de la carte SIM en cours…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Saisissez un NIP comprenant entre quatre et huit chiffres"</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"Le code PUK doit contenir au moins 8 chiffres."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Veuillez saisir de nouveau le code PUK correct. Des tentatives répétées désactivent définitivement la carte SIM."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Les codes PIN ne correspondent pas."</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Trop de tentatives."</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Vous avez saisi un NIP incorrect à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. \n\nVeuillez réessayer dans <xliff:g id="NUMBER_1">%2$d</xliff:g> secondes."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Vous avez saisi un mot de passe incorrect à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. \n\nVeuillez réessayer dans <xliff:g id="NUMBER_1">%2$d</xliff:g> secondes."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Vous avez dessiné un schéma de déverrouillage incorrect à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises.\n\nVeuillez réessayer dans <xliff:g id="NUMBER_1">%2$d</xliff:g> secondes."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Vous avez tenté de déverrouiller cette tablette à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Après <xliff:g id="NUMBER_1">%2$d</xliff:g> tentative(s) infructueuse(s) supplémentaire(s), cette tablette sera réinitialisée, ce qui entraînera la suppression de toutes les données qu\'elle contient."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Vous avez tenté de déverrouiller ce téléphone à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Après <xliff:g id="NUMBER_1">%2$d</xliff:g> tentative(s) infructueuse(s) supplémentaire(s), le téléphone sera réinitialisé, ce qui entraînera la suppression de toutes les données qu\'il contient."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Vous avez tenté de déverrouiller cette tablette à <xliff:g id="NUMBER">%d</xliff:g> reprises. Cette tablette sera réinitialisée, ce qui entraîne la suppression de toutes les données qu\'elle contient."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Vous avez tenté de déverrouiller ce téléphone à <xliff:g id="NUMBER">%d</xliff:g> reprises. Ce téléphone sera réinitialisé, ce qui entraîne la suppression de toutes les données qu\'il contient."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Vous avez tenté de déverrouiller cette tablette à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Après <xliff:g id="NUMBER_1">%2$d</xliff:g> tentative(s) infructueuse(s) supplémentaire(s), cet utilisateur sera supprimé, ce qui entraînera la suppression de toutes ses données."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Vous avez tenté de déverrouiller ce téléphone à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Après <xliff:g id="NUMBER_1">%2$d</xliff:g> tentative(s) infructueuse(s) supplémentaire(s), cet utilisateur sera supprimé, ce qui entraînera la suppression de toutes ses données."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Vous avez tenté de déverrouiller cette tablette à <xliff:g id="NUMBER">%d</xliff:g> reprises. Cet utilisateur sera supprimé, ce qui entraîne la suppression de toutes ses données."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Vous avez tenté de déverrouiller ce téléphone à <xliff:g id="NUMBER">%d</xliff:g> reprises. Cet utilisateur sera supprimé, ce qui entraîne la suppression de toutes ses données."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Vous avez tenté de déverrouiller cette tablette à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Après <xliff:g id="NUMBER_1">%2$d</xliff:g> tentative(s) infructueuse(s) supplémentaire(s), le profil professionnel sera supprimé, ce qui entraînera la suppression de toutes ses données."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Vous avez tenté de déverrouiller ce téléphone à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Après <xliff:g id="NUMBER_1">%2$d</xliff:g> tentative(s) infructueuse(s) supplémentaire(s), le profil professionnel sera supprimé, ce qui entraînera la suppression de toutes ses données."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Vous avez tenté de déverrouiller cette tablette à <xliff:g id="NUMBER">%d</xliff:g> reprises. Le profil professionnel sera supprimé, ce qui entraîne la suppression de toutes ses données."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Vous avez tenté de déverrouiller ce téléphone à <xliff:g id="NUMBER">%d</xliff:g> reprises. Le profil professionnel sera supprimé, ce qui entraîne la suppression de toutes ses données."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Vous avez dessiné un schéma de déverrouillage incorrect à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Si vous échouez encore <xliff:g id="NUMBER_1">%2$d</xliff:g> fois, vous devrez déverrouiller votre tablette à l\'aide d\'un compte de messagerie électronique.\n\n Veuillez réessayer dans <xliff:g id="NUMBER_2">%3$d</xliff:g> secondes."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Vous avez dessiné un schéma de déverrouillage incorrect à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Si vous échouez encore <xliff:g id="NUMBER_1">%2$d</xliff:g> fois, vous devrez déverrouiller votre téléphone à l\'aide d\'un compte de messagerie électronique.\n\n Veuillez réessayer dans <xliff:g id="NUMBER_2">%3$d</xliff:g> secondes."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"NIP de carte SIM incorrect. Vous devez maintenant communiquer avec votre fournisseur de services pour déverrouiller votre appareil."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">Le NIP de la carte SIM incorrect. Il vous reste <xliff:g id="NUMBER_1">%d</xliff:g> tentative.</item>
-      <item quantity="other">Le NIP de la carte SIM incorrect. Il vous reste <xliff:g id="NUMBER_1">%d</xliff:g> tentatives.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"La carte SIM est inutilisable. Communiquez avec votre fournisseur de services."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">Le code PUK de la carte SIM est incorrect. Il vous reste <xliff:g id="NUMBER_1">%d</xliff:g> tentative avant que votre carte SIM devienne définitivement inutilisable.</item>
-      <item quantity="other">Le code PUK de la carte SIM est incorrect. Il vous reste <xliff:g id="NUMBER_1">%d</xliff:g> tentatives avant que votre carte SIM devienne définitivement inutilisable.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Le déverrouillage par NIP de la carte SIM a échoué."</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Le déverrouillage de la carte SIM par code PUK a échoué."</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Code accepté"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Aucun service"</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Changer de méthode d\'entrée"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Mode Avion"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Le schéma est exigé après le redémarrage de l\'appareil"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Le NIP est exigé après le redémarrage de l\'appareil"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Le mot de passe est exigé après le redémarrage de l\'appareil"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Le schéma est exigé pour plus de sécurité"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Le NIP est exigé pour plus de sécurité"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Le mot de passe est exigé pour plus de sécurité"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Le schéma est exigé lorsque vous changez de profil"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Le NIP est exigé lorsque vous changez de profil"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Le mot de passe est exigé lorsque vous changez de profil"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"L\'administrateur de l\'appareil l\'a verrouillé"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"L\'appareil a été verrouillé manuellement"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heure. Confirmez le schéma.</item>
-      <item quantity="other">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heures. Confirmez le schéma.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heure. Confirmez le NIP.</item>
-      <item quantity="other">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heures. Confirmez le NIP.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heure. Confirmez le mot de passe.</item>
-      <item quantity="other">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heures. Confirmez le mot de passe.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Doigt non reconnu"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-fr/strings.xml b/packages/Keyguard/res/values-fr/strings.xml
deleted file mode 100644
index 8615b99..0000000
--- a/packages/Keyguard/res/values-fr/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Protection des touches"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Saisissez le code PIN."</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Saisissez la clé PUK et le nouveau code PIN de la carte SIM."</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"Clé PUK de la carte SIM"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Nouveau code PIN de la carte SIM"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Appuyez pour saisir mot passe"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Saisissez le mot de passe pour déverrouiller le clavier."</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Saisissez le code PIN pour déverrouiller le clavier."</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Le code PIN est erroné."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Chargé"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Batterie en charge…"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Rechargement rapide en cours…"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Rechargement lent…"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Branchez votre chargeur."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Appuyez sur \"Menu\" pour déverrouiller l\'appareil."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Réseau verrouillé"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Aucune carte SIM"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Aucune carte SIM n\'est insérée dans la tablette."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Aucune carte SIM n\'est insérée dans le téléphone."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Insérez une carte SIM."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"Carte SIM absente ou illisible. Veuillez insérer une carte SIM."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Carte SIM inutilisable."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Votre carte SIM a été définitivement désactivée.\n Veuillez contacter votre opérateur de téléphonie mobile pour en obtenir une autre."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"La carte SIM est verrouillée."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"La carte SIM est verrouillée par clé PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Déverrouillage de la carte SIM en cours…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Champ du code PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Champ du code PIN de la carte SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Champ du code PUK de la carte SIM"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Prochaine alarme définie à <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Supprimer"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Entrée"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"J\'ai oublié le schéma"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Schéma incorrect."</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Mot de passe incorrect."</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Code PIN incorrect."</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Réessayez dans <xliff:g id="NUMBER">%d</xliff:g> secondes."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Dessinez votre schéma."</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Saisissez le code PIN de la carte SIM."</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Saisissez le code PIN de la carte SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\"."</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Saisissez le code PIN."</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Saisissez votre mot de passe."</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"La carte SIM est maintenant désactivée. Saisissez le code PUK pour continuer. Contactez votre opérateur pour en savoir plus."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"La carte SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" est maintenant désactivée. Pour continuer, saisissez la clé PUK. Contactez votre opérateur pour en savoir plus."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Saisir le code PIN souhaité"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Confirmer le code PIN souhaité"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Déblocage de la carte SIM en cours…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Veuillez saisir un code PIN comprenant entre quatre et huit chiffres."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"Le code PUK doit contenir au moins 8 chiffres."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Veuillez saisir de nouveau le code PUK correct. Des tentatives répétées désactivent définitivement la carte SIM."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Les codes PIN ne correspondent pas."</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Trop de tentatives."</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Vous avez saisi un code PIN incorrect à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. \n\nVeuillez réessayer dans <xliff:g id="NUMBER_1">%2$d</xliff:g> secondes."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Vous avez saisi un mot de passe incorrect à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. \n\nVeuillez réessayer dans <xliff:g id="NUMBER_1">%2$d</xliff:g> secondes."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Vous avez dessiné un schéma de déverrouillage incorrect à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises.\n\nVeuillez réessayer dans <xliff:g id="NUMBER_1">%2$d</xliff:g> secondes."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Vous avez tenté de déverrouiller la tablette à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Si vous échouez encore <xliff:g id="NUMBER_1">%2$d</xliff:g> fois, cette tablette sera réinitialisée et toutes les données qu\'elle contient seront supprimées."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Vous avez tenté de déverrouiller le téléphone à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Si vous échouez encore <xliff:g id="NUMBER_1">%2$d</xliff:g> fois, ce téléphone sera réinitialisé et toutes les données qu\'il contient seront supprimées."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Vous avez tenté de déverrouiller la tablette à <xliff:g id="NUMBER">%d</xliff:g> reprises. Cette tablette va être réinitialisée et toutes les données qu\'elle contient seront supprimées."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Vous avez tenté de déverrouiller le téléphone à <xliff:g id="NUMBER">%d</xliff:g> reprises. Ce téléphone va être réinitialisé et toutes les données qu\'il contient seront supprimées."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Vous avez tenté de déverrouiller la tablette à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Si vous échouez encore <xliff:g id="NUMBER_1">%2$d</xliff:g> fois, ce compte utilisateur et toutes les données associées seront supprimés."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Vous avez tenté de déverrouiller le téléphone à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Si vous échouez encore <xliff:g id="NUMBER_1">%2$d</xliff:g> fois, ce compte utilisateur et toutes les données associées seront supprimés."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Vous avez tenté de déverrouiller la tablette à <xliff:g id="NUMBER">%d</xliff:g> reprises. Ce compte utilisateur et toutes les données associées vont être supprimés."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Vous avez tenté de déverrouiller le téléphone à <xliff:g id="NUMBER">%d</xliff:g> reprises. Ce compte utilisateur et toutes les données associées vont être supprimés."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Vous avez tenté de déverrouiller la tablette à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Si vous échouez encore <xliff:g id="NUMBER_1">%2$d</xliff:g> fois, le profil professionnel et toutes les données associées seront supprimés."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Vous avez tenté de déverrouiller le téléphone à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Si vous échouez encore <xliff:g id="NUMBER_1">%2$d</xliff:g> fois, le profil professionnel et toutes les données associées seront supprimés."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Vous avez tenté de déverrouiller la tablette à <xliff:g id="NUMBER">%d</xliff:g> reprises. Le profil professionnel et toutes les données associées vont être supprimés."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Vous avez tenté de déverrouiller le téléphone à <xliff:g id="NUMBER">%d</xliff:g> reprises. Le profil professionnel et toutes les données associées vont être supprimés."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Vous avez dessiné un schéma de déverrouillage incorrect à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Si vous échouez encore <xliff:g id="NUMBER_1">%2$d</xliff:g> fois, vous devrez déverrouiller votre tablette à l\'aide d\'un compte de messagerie électronique.\n\n Veuillez réessayer dans <xliff:g id="NUMBER_2">%3$d</xliff:g> secondes."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Vous avez dessiné un schéma de déverrouillage incorrect à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Si vous échouez encore <xliff:g id="NUMBER_1">%2$d</xliff:g> fois, vous devrez déverrouiller votre téléphone à l\'aide d\'un compte de messagerie électronique.\n\n Veuillez réessayer dans <xliff:g id="NUMBER_2">%3$d</xliff:g> secondes."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Code PIN de la carte SIM incorrect. Vous devez désormais contacter votre opérateur pour déverrouiller votre appareil."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">Code PIN de la carte SIM erroné. Il vous reste <xliff:g id="NUMBER_1">%d</xliff:g> tentative.</item>
-      <item quantity="other">Code PIN de la carte SIM erroné. Il vous reste <xliff:g id="NUMBER_1">%d</xliff:g> tentatives.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"La carte SIM est inutilisable. Veuillez contacter votre opérateur."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">Clé PUK de la carte SIM erronée. Il vous reste <xliff:g id="NUMBER_1">%d</xliff:g> tentative avant que votre carte SIM ne devienne définitivement inutilisable.</item>
-      <item quantity="other">Clé PUK de la carte SIM erronée. Il vous reste <xliff:g id="NUMBER_1">%d</xliff:g> tentatives avant que votre carte SIM ne devienne définitivement inutilisable.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Échec du déverrouillage à l\'aide du code PIN de la carte SIM."</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Échec du déverrouillage à l\'aide de la clé PUK de la carte SIM."</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Code accepté."</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Aucun service"</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Changer le mode de saisie"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Mode Avion"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Veuillez saisir le schéma après le redémarrage de l\'appareil."</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Veuillez saisir le code d\'accès après le redémarrage de l\'appareil."</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Veuillez saisir le mot de passe après le redémarrage de l\'appareil."</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Veuillez saisir le schéma pour renforcer la sécurité."</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Veuillez saisir le code d\'accès pour renforcer la sécurité."</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Veuillez saisir le mot de passe pour renforcer la sécurité."</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Veuillez saisir le schéma lorsque vous changez de profil."</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Veuillez saisir le code d\'accès lorsque vous changez de profil."</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Veuillez saisir le mot de passe lorsque vous changez de profil."</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Appareil verrouillé par l\'administrateur"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Appareil verrouillé manuellement"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heure. Confirmez le schéma.</item>
-      <item quantity="other">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heures. Confirmez le schéma.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heure. Confirmez le code d\'accès.</item>
-      <item quantity="other">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heures. Confirmez le code d\'accès.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heure. Confirmez le mot de passe.</item>
-      <item quantity="other">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heures. Confirmez le mot de passe.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Non reconnu"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-gl/strings.xml b/packages/Keyguard/res/values-gl/strings.xml
deleted file mode 100644
index a894fc5..0000000
--- a/packages/Keyguard/res/values-gl/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Bloqueo de teclado"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Escribe o código PIN"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Escribe o PUK da SIM e o código PIN novo"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"Código PUK da SIM"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Código PIN da SIM novo"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Toca e escribe o contrasinal"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Escribe o contrasinal para desbloquear"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Escribe o PIN para desbloquear"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Código PIN incorrecto"</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Cargado"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Cargando"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Cargando rapidamente"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Cargando lentamente"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Conecta o cargador."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Preme Menú para desbloquear."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Bloqueada pola rede"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Non hai ningunha tarxeta SIM"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Non hai ningunha tarxeta SIM na tableta."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Non hai ningunha tarxeta SIM no teléfono."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Insire unha tarxeta SIM."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"Falta a tarxeta SIM ou non se pode ler. Insire unha tarxeta SIM."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Tarxeta SIM inutilizable"</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"A túa tarxeta SIM desactivouse permanentemente.\n Ponte en contacto co teu fornecedor de servizos de telefonía para obter outra tarxeta SIM."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"A tarxeta SIM está bloqueada."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"A tarxeta SIM está bloqueada mediante un PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Desbloqueando tarxeta SIM…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Área do PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Área do PIN da tarxeta SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Área do PUK da tarxeta SIM"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Próxima alarma definida para <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Eliminar"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Intro"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Esqueciches o padrón"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Padrón incorrecto"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Contrasinal incorrecto"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"PIN incorrecto"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Téntao de novo en <xliff:g id="NUMBER">%d</xliff:g> segundos."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Debuxa o teu padrón"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Introduce o PIN da tarxeta SIM"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Introduce o PIN da SIM para \"<xliff:g id="CARRIER">%1$s</xliff:g>\""</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Introduce o PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Insire o teu contrasinal"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"Agora a tarxeta SIM está desactivada. Introduce o código PUK para continuar. Ponte en contacto co operador para obter información detallada."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"Agora a SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" está desactivada. Introduce o código PUK para continuar. Ponte en contacto co operador para obter máis información."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Introduce o código PIN desexado"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Confirma o código PIN desexado"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Desbloqueando tarxeta SIM…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Escribe un PIN que teña entre 4 e 8 números."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"O código PUK debe ter 8 números como mínimo."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Volve introducir o código PUK correcto. Se realizas intentos repetidos é posible que se desactive a tarxeta SIM permanentemente."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Os códigos PIN non coinciden"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Tentaches debuxar o padrón moitas veces"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Introduciches o PIN incorrectamente <xliff:g id="NUMBER_0">%1$d</xliff:g> veces. \n\nTéntao de novo en <xliff:g id="NUMBER_1">%2$d</xliff:g> segundos."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Introduciches o contrasinal incorrectamente <xliff:g id="NUMBER_0">%1$d</xliff:g> veces. \n\nTéntao de novo en <xliff:g id="NUMBER_1">%2$d</xliff:g> segundos."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Debuxaches incorrectamente o padrón de desbloqueo <xliff:g id="NUMBER_0">%1$d</xliff:g> veces. \n\nTéntao de novo en <xliff:g id="NUMBER_1">%2$d</xliff:g> segundos."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Tentaches desbloquear a tableta <xliff:g id="NUMBER_0">%1$d</xliff:g> veces de forma incorrecta. Se realizas <xliff:g id="NUMBER_1">%2$d</xliff:g> intentos incorrectos máis, restablecerase a tableta e, por conseguinte, eliminaranse todos os seus datos."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Tentaches desbloquear o teléfono <xliff:g id="NUMBER_0">%1$d</xliff:g> veces de forma incorrecta. Se realizas <xliff:g id="NUMBER_1">%2$d</xliff:g> intentos incorrectos máis, restablecerase o teléfono e, por conseguinte, eliminaranse todos os seus datos."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Tentaches desbloquear a tableta <xliff:g id="NUMBER">%d</xliff:g> veces de forma incorrecta. Restablecerase a tableta e, por conseguinte, eliminaranse todos os seus datos."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Tentaches desbloquear o teléfono <xliff:g id="NUMBER">%d</xliff:g> veces de forma incorrecta. Restablecerase o teléfono e, por conseguinte, eliminaranse todos os seus datos."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Tentaches desbloquear a tableta <xliff:g id="NUMBER_0">%1$d</xliff:g> veces de forma incorrecta. Se realizas <xliff:g id="NUMBER_1">%2$d</xliff:g> intentos incorrectos máis, eliminarase este usuario e, por conseguinte, todos os datos do usuario."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Tentaches desbloquear o teléfono <xliff:g id="NUMBER_0">%1$d</xliff:g> veces de forma incorrecta. Se realizas <xliff:g id="NUMBER_1">%2$d</xliff:g> intentos incorrectos máis, eliminarase este usuario e, por conseguinte, todos os datos do usuario."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Tentaches desbloquear a tableta <xliff:g id="NUMBER">%d</xliff:g> veces de forma incorrecta. Eliminarase este usuario e, por conseguinte, todos os datos do usuario."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Tentaches desbloquear o teléfono <xliff:g id="NUMBER">%d</xliff:g> veces de forma incorrecta. Eliminarase este usuario e, por conseguinte, todos os datos do usuario."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Tentaches desbloquear a tableta <xliff:g id="NUMBER_0">%1$d</xliff:g> veces de forma incorrecta. Se realizas <xliff:g id="NUMBER_1">%2$d</xliff:g> intentos incorrectos máis, eliminarase o perfil de traballo e, por conseguinte, todos os datos do perfil."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Tentaches desbloquear o teléfono <xliff:g id="NUMBER_0">%1$d</xliff:g> veces de forma incorrecta. Se realizas <xliff:g id="NUMBER_1">%2$d</xliff:g> intentos incorrectos máis, eliminarase o perfil de traballo e, por conseguinte, todos os datos do perfil."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Tentaches desbloquear a tableta <xliff:g id="NUMBER">%d</xliff:g> veces de forma incorrecta. Eliminarase o perfil de traballo e, por conseguinte, todos os datos do perfil."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Tentaches desbloquear o teléfono <xliff:g id="NUMBER">%d</xliff:g> veces de forma incorrecta. Eliminarase o perfil de traballo e, por conseguinte, todos os datos do perfil."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Debuxaches o padrón de desbloqueo incorrectamente <xliff:g id="NUMBER_0">%1$d</xliff:g> veces. Se realizas <xliff:g id="NUMBER_1">%2$d</xliff:g> intentos incorrectos máis, terás que desbloquear a tableta a través dunha unha conta de correo electrónico.\n\n Téntao de novo dentro de <xliff:g id="NUMBER_2">%3$d</xliff:g> segundos."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Debuxaches o padrón de desbloqueo incorrectamente <xliff:g id="NUMBER_0">%1$d</xliff:g> veces. Se realizas <xliff:g id="NUMBER_1">%2$d</xliff:g> intentos incorrectos máis, terás que desbloquear o teléfono a través dunha conta de correo electrónico.\n\n Téntao de novo dentro de <xliff:g id="NUMBER_2">%3$d</xliff:g> segundos."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"O código PIN da SIM non é correcto. Agora debes contactar co teu operador para desbloquear o dispositivo."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">O código PIN da SIM é incorrecto. Quédanche <xliff:g id="NUMBER_1">%d</xliff:g> intentos.</item>
-      <item quantity="one">O código PIN da SIM é incorrecto. Quédache <xliff:g id="NUMBER_0">%d</xliff:g> intento antes de que teñas que contactar co operador para desbloquear o dispositivo.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"A SIM está inutilizable. Contacta co teu operador."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">O código PUK da SIM é incorrecto. Quédanche <xliff:g id="NUMBER_1">%d</xliff:g> intentos antes de que a SIM quede inutilizable para sempre.</item>
-      <item quantity="one">O código PUK da SIM é incorrecto. Quédache <xliff:g id="NUMBER_0">%d</xliff:g> intento antes de que a SIM quede inutilizable para sempre.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Erro ao tentar desbloquear a tarxeta SIM co código PIN."</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Erro ao tentar desbloquar a tarxeta SIM co código PUK."</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Código aceptado"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Non hai servizo."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Cambiar de método de entrada"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Modo avión"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"É necesario o padrón despois do reinicio do dispositivo"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"É necesario o PIN despois do reinicio do dispositivo"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"É necesario o contrasinal despois do reinicio do dispositivo"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"É necesario o padrón para obter seguranza adicional"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"É necesario o PIN para obter seguranza adicional"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"É necesario o contrasinal para obter seguranza adicional"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"É necesario o padrón para cambiar os perfís"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"É necesario o PIN para cambiar os perfís"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"É necesario o contrasinal para cambiar os perfís"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"O administrador do dispositivo bloqueouno"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"O dispositivo bloqueouse manualmente"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">O dispositivo non se desbloqueou durante <xliff:g id="NUMBER_1">%d</xliff:g> horas. Confirma o padrón.</item>
-      <item quantity="one">O dispositivo non se desbloqueou durante <xliff:g id="NUMBER_0">%d</xliff:g> hora. Confirma o padrón.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">O dispositivo non se desbloqueou durante <xliff:g id="NUMBER_1">%d</xliff:g> horas. Confirma o PIN.</item>
-      <item quantity="one">O dispositivo non se desbloqueou durante <xliff:g id="NUMBER_0">%d</xliff:g> hora. Confirma o PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">O dispositivo non se desbloqueou durante <xliff:g id="NUMBER_1">%d</xliff:g> horas. Confirma o contrasinal.</item>
-      <item quantity="one">O dispositivo non se desbloqueou durante <xliff:g id="NUMBER_0">%d</xliff:g> hora. Confirma o contrasinal.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Non se recoñece"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-gu/strings.xml b/packages/Keyguard/res/values-gu/strings.xml
deleted file mode 100644
index d288b3f..0000000
--- a/packages/Keyguard/res/values-gu/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"કીગાર્ડ"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"PIN કોડ લખો"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"SIM PUK અને નવો PIN કોડ લખો"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM PUK કોડ"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"નવો SIM PIN કોડ"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"પાસવર્ડ લખવા માટે ટચ કરો"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"અનલૉક કરવા માટે પાસવર્ડ લખો"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"અનલૉક કરવા માટે PIN લખો"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"ખોટો PIN કોડ."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"ચાર્જ થયું"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"ચાર્જ થઈ રહ્યું છે"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"ઝડપથી ચાર્જિંગ થઇ રહી છે"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"ધીમેથી ચાર્જિંગ થઇ રહી છે"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"તમારું ચાર્જર કનેક્ટ કરો."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"અનલૉક કરવા માટે મેનૂ દબાવો."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"નેટવર્ક લૉક થયું"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"કોઈ SIM કાર્ડ નથી"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"ટેબ્લેટમાં SIM કાર્ડ નથી."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"ફોનમાં SIM કાર્ડ નથી."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"એક SIM કાર્ડ દાખલ કરો."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM કાર્ડ ખૂટે છે અથવા વાંચન યોગ્ય નથી. SIM કાર્ડ દાખલ કરો."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"બિનઉપયોગી SIM કાર્ડ."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"તમારું SIM કાર્ડ કાયમીરૂપે અક્ષમ કરવામાં આવ્યું છે.\n બીજા SIM કાર્ડ માટે તમારા વાયરલેસ સેવા પ્રદાતાનો સંપર્ક કરો."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM કાર્ડ લૉક કરેલ છે."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM કાર્ડ, PUK-લૉક કરેલ છે."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"SIM કાર્ડ અનલૉક કરી રહ્યાં છે…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN ક્ષેત્ર"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM PIN ક્ષેત્ર"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM PUK ક્ષેત્ર"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"<xliff:g id="ALARM">%1$s</xliff:g> માટે આગલો એલાર્મ સેટ કર્યો"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"કાઢી નાખો"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"દાખલ કરો"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"પેટર્ન ભૂલી ગયાં"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"ખોટી પેટર્ન"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"ખોટો પાસવર્ડ"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"ખોટો PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"<xliff:g id="NUMBER">%d</xliff:g> સેકંડમાં ફરી પ્રયાસ કરો."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"તમારી પેટર્ન દોરો"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"SIM PIN દાખલ કરો"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"\"<xliff:g id="CARRIER">%1$s</xliff:g>\" માટે SIM PIN દાખલ કરો"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"PIN દાખલ કરો"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"પાસવર્ડ દાખલ કરો"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM હવે અક્ષમ છે. ચાલુ રાખવા માટે PUK કોડ દાખલ કરો. વિગતો માટે કેરીઅરનો સંપર્ક કરો."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" હવે અક્ષમ છે. ચાલુ રાખવા માટે PUK કોડ દાખલ કરો. વિગતો માટે કેરીઅરનો સંપર્ક કરો."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"જોઈતો PIN કોડ દાખલ કરો"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"જોઈતા PIN કોડની પુષ્ટિ કરો"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"SIM કાર્ડ અનલૉક કરી રહ્યાં છે…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"એક PIN લખો જે 4 થી 8 સંખ્યાનો છે."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK કોડ 8 અથવા વધુ નંબર્સનો હોવો જોઈએ."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"સાચો PUK કોડ ફરીથી દાખલ કરો. પુનરાવર્તિત પ્રયાસો SIM ને કાયમી રીતે અક્ષમ કરશે."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN કોડ્સ મેળ ખાતા નથી"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"ઘણા બધા પેટર્ન પ્રયાસો"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"તમે <xliff:g id="NUMBER_0">%1$d</xliff:g> વખત ખોટી રીતે તમારો PIN લખ્યો છે. \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> સેકંડમાં ફરીથી પ્રયાસ કરો."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"તમે <xliff:g id="NUMBER_0">%1$d</xliff:g> વખત ખોટી રીતે તમારો પાસવર્ડ લખ્યો છે. \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> સેકંડમાં ફરીથી પ્રયાસ કરો."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"તમે <xliff:g id="NUMBER_0">%1$d</xliff:g> વખત ખોટી રીતે તમારી અનલૉક પેટર્ન દોરી. \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> સેકંડમાં ફરીથી પ્રયાસ કરો."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"તમે ટેબ્લેટને અનલૉક કરવા માટે <xliff:g id="NUMBER_0">%1$d</xliff:g> વખત ખોટી રીતે પ્રયાસ કર્યો. <xliff:g id="NUMBER_1">%2$d</xliff:g> વધુ અસફળ પ્રયાસો પછી, આ ટેબ્લેટ ફરીથી સેટ કરવામાં આવશે, જે તેનો તમામ ડેટા કાઢી નાખશે."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"તમે ફોનને અનલૉક કરવા માટે <xliff:g id="NUMBER_0">%1$d</xliff:g> વખત ખોટી રીતે પ્રયાસ કર્યો. <xliff:g id="NUMBER_1">%2$d</xliff:g> વધુ અસફળ પ્રયાસ પછી, આ ફોન ફરીથી સેટ કરવામાં આવશે, જે તેનો તમામ ડેટા કાઢી નાખશે."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"તમે <xliff:g id="NUMBER">%d</xliff:g> વખત ખોટી રીતે ટેબ્લેટને અનલૉક કરવાનો પ્રયાસ કર્યો. આ ટેબ્લેટ ફરીથી સેટ થશે, જે તેનો તમામ ડેટા કાઢી નાખશે."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"તમે <xliff:g id="NUMBER">%d</xliff:g> વખત ખોટી રીતે ફોનને અનલૉક કરવાનો પ્રયાસ કર્યો. આ ફોન ફરીથી સેટ થશે, જે તેનો તમામ ડેટા કાઢી નાખશે."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"તમે ટેબ્લેટને અનલૉક કરવા માટે <xliff:g id="NUMBER_0">%1$d</xliff:g> વખત ખોટી રીતે પ્રયાસ કર્યો. <xliff:g id="NUMBER_1">%2$d</xliff:g> વધુ અસફળ પ્રયાસો પછી, આ વપરાશકર્તાને દૂર કરવામાં આવશે, જે તમામ વપરાશકર્તા ડેટાને કાઢી નાખશે."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"તમે ફોનને અનલૉક કરવા માટે <xliff:g id="NUMBER_0">%1$d</xliff:g> વખત ખોટી રીતે પ્રયાસ કર્યો. <xliff:g id="NUMBER_1">%2$d</xliff:g> વધુ અસફળ પ્રયાસ પછી, આ વપરાશકર્તા દૂર કરવામાં આવશે, જે તમામ વપરાશકર્તા ડેટા કાઢી નાખશે."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"તમે <xliff:g id="NUMBER">%d</xliff:g> વખત ખોટી રીતે ટેબ્લેટને અનલૉક કરવાનો પ્રયાસ કર્યો. આ વપરાશકર્તાને દૂર કરવામાં આવશે, જે તમામ વપરાશકર્તા ડેટાને કાઢી નાખશે."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"તમે <xliff:g id="NUMBER">%d</xliff:g> વખત ખોટી રીતે ફોનને અનલૉક કરવાનો પ્રયાસ કર્યો. આ વપરાશકર્તાને દૂર કરવામાં આવશે, જે તમામ વપરાશકર્તા ડેટાને કાઢી નાખશે."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"તમે ટેબ્લેટને અનલૉક કરવાનો <xliff:g id="NUMBER_0">%1$d</xliff:g> વખત ખોટી રીતે પ્રયાસ કર્યો છે. હજી <xliff:g id="NUMBER_1">%2$d</xliff:g> અસફળ પ્રયાસ પછી, કાર્ય પ્રોફાઇલ દૂર કરવામાં આવશે, જે તમામ પ્રોફાઇલ ડેટાને કાઢી નાખશે."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"તમે ફોનને અનલૉક કરવાનો <xliff:g id="NUMBER_0">%1$d</xliff:g> વખત ખોટી રીતે પ્રયાસ કર્યો છે. હજી <xliff:g id="NUMBER_1">%2$d</xliff:g> અસફળ પ્રયાસ પછી, કાર્ય પ્રોફાઇલ દૂર કરવામાં આવશે, જે તમામ પ્રોફાઇલ ડેટાને કાઢી નાખશે."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"તમે <xliff:g id="NUMBER">%d</xliff:g> વખત ખોટી રીતે ટેબ્લેટને અનલૉક કરવાનો પ્રયાસ કર્યો. કાર્ય પ્રોફાઇલ દૂર કરવામાં આવશે, જે તમામ પ્રોફાઇલ ડેટાને કાઢી નાખશે."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"તમે <xliff:g id="NUMBER">%d</xliff:g> વખત ખોટી રીતે ફોનને અનલૉક કરવાનો પ્રયાસ કર્યો. કાર્ય પ્રોફાઇલ દૂર કરવામાં આવશે, જે તમામ પ્રોફાઇલ ડેટાને કાઢી નાખશે."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"તમે <xliff:g id="NUMBER_0">%1$d</xliff:g> વખત ખોટી રીતે અનલૉક પેટર્ન દોરી છે. વધુ <xliff:g id="NUMBER_1">%2$d</xliff:g> વખત અસફળ પ્રયાસો પછી, તમને એક ઇમેઇલ એકાઉન્ટનો ઉપયોગ કરીને તમારા ટેબ્લેટને અનલૉક કરવા માટે પૂછવામાં આવશે.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> સેકંડમાં ફરી પ્રયાસ કરો."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"તમે તમારી અનલૉક પેટર્ન <xliff:g id="NUMBER_0">%1$d</xliff:g> વખત ખોટી રીતે દોરી. હજી <xliff:g id="NUMBER_1">%2$d</xliff:g> અસફળ પ્રયાસ પછી, તમને ઇમેઇલ એકાઉન્ટનો ઉપયોગ કરીને ફોનને અનલૉક કરવાનું કહેવામાં આવશે.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> સેકંડમાં ફરીથી પ્રયાસ કરો."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"ખોટો SIM PIN કોડ, તમારે હવે તમારું ઉપકરણ અનલૉક કરવા માટે તમારા કેરિઅરનો સંપર્ક કરવો આવશ્યક છે."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">ખોટો SIM PIN કોડ, તમારી પાસે <xliff:g id="NUMBER_1">%d</xliff:g> પ્રયાસ બાકી છે.</item>
-      <item quantity="other">ખોટો SIM PIN કોડ, તમારી પાસે <xliff:g id="NUMBER_1">%d</xliff:g> પ્રયાસ બાકી છે.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM અનુપયોગી છે. તમારા કેરીઅરનો સંપર્ક કરો."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">ખોટો SIM PUK કોડ, SIM કાયમી રીતે અનુપયોગી બની જાય તે પહેલા તમારી પાસે <xliff:g id="NUMBER_1">%d</xliff:g> પ્રયાસ બાકી છે.</item>
-      <item quantity="other">ખોટો SIM PUK કોડ, SIM કાયમી રીતે અનુપયોગી બની જાય તે પહેલા તમારી પાસે <xliff:g id="NUMBER_1">%d</xliff:g> પ્રયાસ બાકી છે.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"SIM PIN ઑપરેશન નિષ્ફળ થયું!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"SIM PUK ઓપરેશન નિષ્ફળ થયું!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"કોડ સ્વીકાર્યો!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"કોઈ સેવા ."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"ઇનપુટ પદ્ધતિ સ્વિચ કરો"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"એરપ્લેન મોડ"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"ઉપકરણ પુનઃપ્રારંભ થાય તે પછી પેટર્ન જરૂરી છે"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"ઉપકરણ પુનઃપ્રારંભ થાય તે પછી PIN જરૂરી છે"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"ઉપકરણ પુનઃપ્રારંભ થાય તે પછી પાસવર્ડ જરૂરી છે"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"વધારાની સુરક્ષા માટે પેટર્ન જરૂરી છે"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"વધારાની સુરક્ષા માટે PIN જરૂરી છે"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"વધારાની સુરક્ષા માટે પાસવર્ડ જરૂરી છે"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"જ્યારે તમે પ્રોફાઇલ્સ સ્વિચ કરો ત્યારે પેટર્ન જરૂરી છે"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"જ્યારે તમે પ્રોફાઇલ્સ સ્વિચ કરો ત્યારે PIN જરૂરી છે"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"જ્યારે તમે પ્રોફાઇલ્સ સ્વિચ કરો ત્યારે પાસવર્ડ જરૂરી છે"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"ઉપકરણ વ્યવસ્થાપકે ઉપકરણ લૉક કર્યું"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"ઉપકરણ મેન્યુઅલી લૉક કર્યું હતું"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">ઉપકરણ <xliff:g id="NUMBER_1">%d</xliff:g> કલાક માટે અનલૉક કરવામાં આવ્યું નથી. પેટર્નની પુષ્ટિ કરો.</item>
-      <item quantity="other">ઉપકરણ <xliff:g id="NUMBER_1">%d</xliff:g> કલાક માટે અનલૉક કરવામાં આવ્યું નથી. પેટર્નની પુષ્ટિ કરો.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">ઉપકરણ <xliff:g id="NUMBER_1">%d</xliff:g> કલાક માટે અનલૉક કરવામાં આવ્યું નથી. PIN ની પુષ્ટિ કરો.</item>
-      <item quantity="other">ઉપકરણ <xliff:g id="NUMBER_1">%d</xliff:g> કલાક માટે અનલૉક કરવામાં આવ્યું નથી. PIN ની પુષ્ટિ કરો.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">ઉપકરણ <xliff:g id="NUMBER_1">%d</xliff:g> કલાક માટે અનલૉક કરવામાં આવ્યું નથી. પાસવર્ડની પુષ્ટિ કરો.</item>
-      <item quantity="other">ઉપકરણ <xliff:g id="NUMBER_1">%d</xliff:g> કલાક માટે અનલૉક કરવામાં આવ્યું નથી. પાસવર્ડની પુષ્ટિ કરો.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"ઓળખાયેલ નથી"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-hi/strings.xml b/packages/Keyguard/res/values-hi/strings.xml
deleted file mode 100644
index bf36312..0000000
--- a/packages/Keyguard/res/values-hi/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"कीगार्ड"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"पिन कोड लिखें"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"सिम PUK और नया PIN कोड लिखें"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"सिम PUK कोड"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"नया सिम PIN कोड"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"पासवर्ड लिखने के लिए स्पर्श करें"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"अनलॉक करने के लिए पासवर्ड लिखें"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"अनलॉक करने के लिए पिन लिखें"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"गलत पिन कोड."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"चार्ज हो गई है"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"चार्ज हो रहा है"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"तेज़ी से चार्ज हो रही है"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"धीमे चार्ज हो रही है"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"अपना चार्जर कनेक्‍ट करें."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"अनलॉक करने के लिए मेनू दबाएं."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"नेटवर्क लॉक किया गया"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"कोई सिम कार्ड नहीं है"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"टेबलेट में कोई सिम कार्ड नहीं है."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"फ़ोन में कोई सिम कार्ड नहीं है."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"सिम कार्ड डालें."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"सिम कार्ड गुम है या पढ़ने योग्‍य नहीं है. सिम कार्ड डालें."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"अनुपयोगी सिम कार्ड."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"आपका सिम कार्ड स्‍थायी रूप से अक्षम कर दिया गया है.\n दूसरे सिम कार्ड के लिए अपने वायरलेस सेवा प्रदाता से संपर्क करें."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"सिम कार्ड लॉक है."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"सिम कार्ड PUK द्वारा लॉक किया हुआ है."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"सिम कार्ड अनलॉक हो रहा है…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"पिन क्षेत्र"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"सिम पिन क्षेत्र"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"सिम पिइउके क्षेत्र"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"अगला अलार्म <xliff:g id="ALARM">%1$s</xliff:g> के लिए सेट किया गया"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"हटाएं"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"आकार भूल गए"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"गलत आकार"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"गलत पासवर्ड"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"गलत PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"<xliff:g id="NUMBER">%d</xliff:g> सेकंड में पुन: प्रयास करें."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"अपना आकार आरेखित करें"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"सिम PIN डालें"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"\"<xliff:g id="CARRIER">%1$s</xliff:g>\" के लिए सिम पिन डालें"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"PIN डालें"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"पासवर्ड डालें"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"सिम अब अक्षम हो गई है. जारी रखने के लिए PUK कोड डालें. विवरण के लिए कैरियर से संपर्क करें."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"सिम \"<xliff:g id="CARRIER">%1$s</xliff:g>\" अब अक्षम हो गई है. जारी रखने के लिए PUK कोड डालें. विवरण के लिए कैरियर से संपर्क करें."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"इच्छित पिन कोड डालें"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"इच्छित पिन कोड की दुबारा पूछें"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"सिम कार्ड अनलॉक कर रहा है…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"ऐसा PIN लिखें, जो 4 से 8 अंकों का हो."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK कोड 8 या अधिक संख्या वाला होना चाहिए."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"सही PUK कोड पुन: डालें. बार-बार प्रयास करने से सिम स्थायी रूप से अक्षम हो जाएगी."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"पिन कोड का मिलान नहीं होता"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"बहुत अधिक आकार प्रयास"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"आप अपना PIN <xliff:g id="NUMBER_0">%1$d</xliff:g> बार गलत तरीके से लिख चुके हैं. \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> सेकंड में पुन: प्रयास करें."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"आप अपना पासवर्ड <xliff:g id="NUMBER_0">%1$d</xliff:g> बार गलत तरीके से लिख चुके हैं. \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> सेकंड में पुन: प्रयास करें."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"आपने अपना अनलॉक आकार <xliff:g id="NUMBER_0">%1$d</xliff:g> बार गलत तरीके से आरेखित किया है. \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> सेकंड में पुन: प्रयास करें."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"आपने टैबलेट को अनलॉक करने के लिए <xliff:g id="NUMBER_0">%1$d</xliff:g> बार गलत तरीके से प्रयास किया है. <xliff:g id="NUMBER_1">%2$d</xliff:g> और असफल प्रयासों के बाद, इस टैबलेट को रीसेट कर दिया जाएगा, जिससे सभी उपयोगकर्ता डेटा हट जाएगा."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"आपने फ़ोन को अनलॉक करने के लिए <xliff:g id="NUMBER_0">%1$d</xliff:g> बार गलत तरीके से प्रयास किया है. <xliff:g id="NUMBER_1">%2$d</xliff:g> और असफल प्रयासों के बाद, इस फ़ोन को रीसेट कर दिया जाएगा, जिससे सभी उपयोगकर्ता डेटा हट जाएगा."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"आपने टैबलेट को अनलॉक करने के लिए <xliff:g id="NUMBER">%d</xliff:g> बार गलत तरीके से प्रयास किया है. इस टैबलेट को रीसेट कर दिया जाएगा, जिससे उसका सभी डेटा हट जाएगा."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"आपने फ़ोन को अनलॉक करने के लिए <xliff:g id="NUMBER">%d</xliff:g> बार गलत तरीके से प्रयास किया है. इस फ़ोन को रीसेट कर दिया जाएगा, जिससे उसका सभी डेटा हट जाएगा."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"आपने टैबलेट को अनलॉक करने के लिए <xliff:g id="NUMBER_0">%1$d</xliff:g> बार गलत तरीके से प्रयास किया है. <xliff:g id="NUMBER_1">%2$d</xliff:g> और असफल प्रयासों के बाद, इस उपयोगकर्ता को निकाल दिया जाएगा, जिससे सभी उपयोगकर्ता डेटा हट जाएगा."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"आपने फ़ोन को अनलॉक करने के लिए <xliff:g id="NUMBER_0">%1$d</xliff:g> बार गलत तरीके से प्रयास किया है. <xliff:g id="NUMBER_1">%2$d</xliff:g> और असफल प्रयासों के बाद, इस उपयोगकर्ता को निकाल दिया जाएगा, जिससे सभी उपयोगकर्ता डेटा हट जाएगा."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"आपने टैबलेट को अनलॉक करने के लिए <xliff:g id="NUMBER">%d</xliff:g> बार गलत तरीके से प्रयास किया है. इस उपयोगकर्ता को निकाल दिया जाएगा, जिससे सभी उपयोगकर्ता डेटा हट जाएगा."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"आपने फ़ोन को अनलॉक करने के लिए <xliff:g id="NUMBER">%d</xliff:g> बार गलत तरीके से प्रयास किया है. इस उपयोगकर्ता को निकाल दिया जाएगा, जिससे सभी उपयोगकर्ता डेटा हट जाएगा."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"आपने टैबलेट को अनलॉक करने के लिए <xliff:g id="NUMBER_0">%1$d</xliff:g> बार गलत तरीके से प्रयास किया है. <xliff:g id="NUMBER_1">%2$d</xliff:g> और असफल प्रयासों के बाद, कार्य प्रोफ़ाइल को निकाल दिया जाएगा, जिससे सभी प्रोफ़ाइल डेटा हट जाएगा."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"आपके डिवाइस ने फ़ोन को अनलॉक करने के लिए <xliff:g id="NUMBER_0">%1$d</xliff:g> बार गलत तरीके से प्रयास किया है. <xliff:g id="NUMBER_1">%2$d</xliff:g> और असफल प्रयासों के बाद, कार्य प्रोफ़ाइल को निकाल दिया जाएगा, जिससे सभी प्रोफ़ाइल डेटा हट जाएगा."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"आपने टैबलेट को अनलॉक करने के लिए <xliff:g id="NUMBER">%d</xliff:g> बार गलत तरीके से प्रयास किया है. कार्य प्रोफ़ाइल को निकाल दिया जाएगा, जिससे सभी प्रोफ़ाइल डेटा हट जाएगा."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"आपने फ़ोन को अनलॉक करने के लिए <xliff:g id="NUMBER">%d</xliff:g> बार गलत तरीके से प्रयास किया है. कार्य प्रोफ़ाइल को निकाल दिया जाएगा, जिससे सभी प्रोफ़ाइल डेटा हट जाएगा."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"आपने अपने अनलॉक आकार को <xliff:g id="NUMBER_0">%1$d</xliff:g> बार गलत तरीके से आरेखित किया है. <xliff:g id="NUMBER_1">%2$d</xliff:g> और असफल प्रयासों के बाद, आपसे अपने टेबलेट को किसी ईमेल खाते के उपयोग से अनलॉक करने के लिए कहा जाएगा.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> सेकंड में पुन: प्रयास करें."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"आपने अपने अनलॉक आकार को <xliff:g id="NUMBER_0">%1$d</xliff:g> बार गलत तरीके से आरेखित किया है. <xliff:g id="NUMBER_1">%2$d</xliff:g> और असफल प्रयासों के बाद, आपसे अपने फ़ोन को किसी ईमेल खाते का उपयोग करके अनलॉक करने के लिए कहा जाएगा.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> सेकंड में पुन: प्रयास करें."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"गलत सिम PIN कोड अपने डिवाइस को अनलॉक करने के लिए अब आपको अपने वाहक से संपर्क करना होगा."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">गलत सिम PIN कोड, आपके पास <xliff:g id="NUMBER_1">%d</xliff:g> प्रयास शेष हैं.</item>
-      <item quantity="other">गलत सिम PIN कोड, आपके पास <xliff:g id="NUMBER_1">%d</xliff:g> प्रयास शेष हैं.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"सिम अनुपयोगी है. अपने वाहक से संपर्क करें."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">गलत सिम PUK कोड, सिम के स्थायी रूप से अनुपयोगी हो जाने से पहले आपके पास <xliff:g id="NUMBER_1">%d</xliff:g> प्रयास शेष हैं.</item>
-      <item quantity="other">गलत सिम PUK कोड, सिम के स्थायी रूप से अनुपयोगी हो जाने से पहले आपके पास <xliff:g id="NUMBER_1">%d</xliff:g> प्रयास शेष हैं.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"सिम PIN की कार्यवाही विफल रही!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"सिम PUK की कार्यवाही विफल रही!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"कोड स्वीकार किया गया!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"कोई सेवा नहीं."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"इनपुट पद्धति‍ बदलें"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"हवाई जहाज़ मोड"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"डिवाइस के पुनः प्रारंभ होने पर पैटर्न की आवश्यकता होती है"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"डिवाइस के पुनः प्रारंभ होने पर पिन की आवश्यकता होती है"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"डिवाइस के पुनः प्रारंभ होने पर पासवर्ड की आवश्यकता होती है"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"अतिरिक्‍त सुरक्षा के लिए पैटर्न आवश्‍यक है"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"अतिरिक्‍त सुरक्षा के लिए पिन आवश्‍यक है"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"अतिरिक्‍त सुरक्षा के लिए पासवर्ड आवश्‍यक है"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"प्रोफ़ाइल में स्विच करते समय पैटर्न की आवश्यकता होती है"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"प्रोफ़ाइल में स्विच करते समय पिन की आवश्यकता होती है"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"प्रोफ़ाइल में स्विच करते समय पासवर्ड की आवश्यकता होती है"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"डिवाइस व्यवस्थापक ने डिवाइस को लॉक कर दिया है"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"डिवाइस को मैन्युअल रूप से लॉक किया गया था"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">डिवाइस <xliff:g id="NUMBER_1">%d</xliff:g> घंटे से अनलॉक नहीं किया गया है. पैटर्न की पुष्टि करें.</item>
-      <item quantity="other">डिवाइस <xliff:g id="NUMBER_1">%d</xliff:g> घंटे से अनलॉक नहीं किया गया है. पैटर्न की पुष्टि करें.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">डिवाइस <xliff:g id="NUMBER_1">%d</xliff:g> घंटे से अनलॉक नहीं किया गया है. पिन की पुष्‍टि करें.</item>
-      <item quantity="other">डिवाइस <xliff:g id="NUMBER_1">%d</xliff:g> घंटे से अनलॉक नहीं किया गया है. पिन की पुष्‍टि करें.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">डिवाइस <xliff:g id="NUMBER_1">%d</xliff:g> घंटे से अनलॉक नहीं किया गया है. पासवर्ड की पुष्टि करें.</item>
-      <item quantity="other">डिवाइस <xliff:g id="NUMBER_1">%d</xliff:g> घंटे से अनलॉक नहीं किया गया है. पासवर्ड की पुष्टि करें.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"पहचाना नहीं गया"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-hr/strings.xml b/packages/Keyguard/res/values-hr/strings.xml
deleted file mode 100644
index 169bc57..0000000
--- a/packages/Keyguard/res/values-hr/strings.xml
+++ /dev/null
@@ -1,137 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Zaštita tipkovnice"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Unesite PIN kôd"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Unesite PUK i novi PIN kôd SIM kartice"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"PUK kôd SIM kartice"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Novi PIN kôd SIM kartice"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Dodirnite za tipkanje zaporke"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Unesite zaporku za otključavanje"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Unesite PIN za otključavanje"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Netočan PIN kôd."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Napunjeno"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Punjenje"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Brzo punjenje"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Sporo punjenje"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Priključite punjač."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Pritisnite Izbornik za otključavanje."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Mreža je zaključana"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Nema SIM kartice"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"U tabletnom uređaju nema SIM kartice."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"U telefonu nema SIM kartice."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Umetnite SIM karticu."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM kartica nedostaje ili nije čitljiva. Umetnite SIM karticu."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Neupotrebljiva SIM kartica."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Vaša SIM kartica trajno je onemogućena.\n Obratite se svom pružatelju bežičnih usluga da biste dobili drugu SIM karticu."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM kartica je zaključana."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM kartica zaključana je PUK-om."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Otključavanje SIM kartice…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Područje PIN-a"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Područje PIN-a za SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Područje PUK-a za SIM"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Sljedeći alarm postavljen za <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Izbriši"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Zaboravili ste obrazac"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Pogrešan obrazac"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Pogrešna zaporka"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Pogrešan PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Pokušajte ponovo za <xliff:g id="NUMBER">%d</xliff:g> s."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Iscrtajte svoj obrazac"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Unesite PIN za SIM"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Unesite PIN za SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\""</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Unesite PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Unesite zaporku"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM je sad onemogućen. Unesite PUK kôd da biste nastavili. Kontaktirajte operatera za pojedinosti."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" sada je onemogućen. Unesite PUK kôd da biste nastavili. Obratite se mobilnom operateru za više pojedinosti."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Upišite željeni PIN kôd"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Potvrdite željeni PIN kôd"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Otključavanje SIM kartice…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Unesite PIN koji ima od 4 do 8 brojeva."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK kôd treba imati 8 brojeva ili više."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Ponovo unesite ispravan PUK kôd. Ponovljeni pokušaji trajno će onemogućiti SIM."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN kodovi nisu jednaki"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Previše pokušaja iscrtavanja obrasca"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Netočno ste napisali PIN <xliff:g id="NUMBER_0">%1$d</xliff:g> puta. \n\nPokušajte ponovo za <xliff:g id="NUMBER_1">%2$d</xliff:g> s."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Netočno ste napisali zaporku <xliff:g id="NUMBER_0">%1$d</xliff:g> puta. \n\nPokušajte ponovo za <xliff:g id="NUMBER_1">%2$d</xliff:g> s."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Netočno ste iscrtali obrazac za otključavanje <xliff:g id="NUMBER_0">%1$d</xliff:g> puta. \n\nPokušajte ponovo za <xliff:g id="NUMBER_1">%2$d</xliff:g> s."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"<xliff:g id="NUMBER_0">%1$d</xliff:g> put/a ste neuspješno pokušali otključati tablet. Nakon još <xliff:g id="NUMBER_1">%2$d</xliff:g> pokušaja tablet će se vratiti na zadano, a time će se izbrisati i svi podaci na njemu."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"<xliff:g id="NUMBER_0">%1$d</xliff:g> put/a ste neuspješno pokušali otključati telefon. Nakon još <xliff:g id="NUMBER_1">%2$d</xliff:g> pokušaja telefon će se vratiti na zadano, a time će se izbrisati i svi podaci na njemu."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"<xliff:g id="NUMBER">%d</xliff:g> put/a ste neuspješno pokušali otključati tablet. Tablet će se vratiti na zadano, a time će se izbrisati i svi podaci na njemu."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"<xliff:g id="NUMBER">%d</xliff:g> put/a ste neuspješno pokušali otključati telefon. Telefon će se vratiti na zadano, a time će se izbrisati i svi podaci na njemu."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"<xliff:g id="NUMBER_0">%1$d</xliff:g> put/a ste neuspješno pokušali otključati tablet. Nakon još <xliff:g id="NUMBER_1">%2$d</xliff:g> pokušaja taj će se korisnik ukloniti, a time će se izbrisati i svi njegovi podaci."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"<xliff:g id="NUMBER_0">%1$d</xliff:g> put/a ste neuspješno pokušali otključati telefon. Nakon još <xliff:g id="NUMBER_1">%2$d</xliff:g> pokušaja taj će se korisnik ukloniti, a time će se izbrisati i svi njegovi podaci."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"<xliff:g id="NUMBER">%d</xliff:g> put/a ste neuspješno pokušali otključati tablet. Taj će se korisnik ukloniti, a time će se izbrisati i svi njegovi podaci."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"<xliff:g id="NUMBER">%d</xliff:g> put/a ste neuspješno pokušali otključati telefon. Taj će se korisnik ukloniti, a time će se izbrisati i svi njegovi podaci."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"<xliff:g id="NUMBER_0">%1$d</xliff:g> put/a ste neuspješno pokušali otključati tablet. Nakon još <xliff:g id="NUMBER_1">%2$d</xliff:g> pokušaja radni će se profil ukloniti, a time će se izbrisati i svi njegovi podaci."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"<xliff:g id="NUMBER_0">%1$d</xliff:g> put/a ste neuspješno pokušali otključati telefon. Nakon još <xliff:g id="NUMBER_1">%2$d</xliff:g> pokušaja radni će se profil ukloniti, a time će se izbrisati i svi njegovi podaci."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"<xliff:g id="NUMBER">%d</xliff:g> put/a ste neuspješno pokušali otključati tablet. Radni će se profil ukloniti, a time će se izbrisati i svi njegovi podaci."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"<xliff:g id="NUMBER">%d</xliff:g> put/a ste neuspješno pokušali otključati telefon. Radni će se profil ukloniti, a time će se izbrisati i svi njegovi podaci."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Netočno ste iscrtali obrazac za otključavanje <xliff:g id="NUMBER_0">%1$d</xliff:g> puta. Nakon još ovoliko neuspješnih pokušaja: <xliff:g id="NUMBER_1">%2$d</xliff:g> morat ćete otključati tabletno računalo pomoću računa e-pošte.\n\n Pokušajte ponovo za <xliff:g id="NUMBER_2">%3$d</xliff:g> s."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Netočno ste iscrtali obrazac za otključavanje <xliff:g id="NUMBER_0">%1$d</xliff:g> puta. Nakon još ovoliko neuspješnih pokušaja: <xliff:g id="NUMBER_1">%2$d</xliff:g> morat ćete otključati telefon pomoću računa e-pošte.\n\n Pokušajte ponovo za <xliff:g id="NUMBER_2">%3$d</xliff:g> s."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Netočan PIN kôd SIM kartice; sada morate kontaktirati svog mobilnog operatera da bi otključao vaš uređaj."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">Netočan PIN kôd SIM kartice; imate još <xliff:g id="NUMBER_1">%d</xliff:g> pokušaj.</item>
-      <item quantity="few">Netočan PIN kôd SIM kartice; imate još <xliff:g id="NUMBER_1">%d</xliff:g> pokušaja.</item>
-      <item quantity="other">Netočan PIN kôd SIM kartice; imate još <xliff:g id="NUMBER_1">%d</xliff:g> pokušaja.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM kartica nije upotrebljiva. Kontaktirajte svog mobilnog operatera."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">Netočan PUK kôd SIM kartice; imate još <xliff:g id="NUMBER_1">%d</xliff:g> pokušaj prije nego što SIM kartica postane trajno neupotrebljiva.</item>
-      <item quantity="few">Netočan PUK kôd SIM kartice; imate još <xliff:g id="NUMBER_1">%d</xliff:g> pokušaja prije nego što SIM kartica postane trajno neupotrebljiva.</item>
-      <item quantity="other">Netočan PUK kôd SIM kartice; imate još <xliff:g id="NUMBER_1">%d</xliff:g> pokušaja prije nego što SIM kartica postane trajno neupotrebljiva.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Operacija PIN-a SIM kartice nije uspjela!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Operacija PUK-a SIM kartice nije uspjela!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Kôd je prihvaćen!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Nema usluge."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Promjena načina unosa"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Način rada u zrakoplovu"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Nakon ponovnog pokretanja uređaja morate unijeti uzorak"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Nakon ponovnog pokretanja uređaja morate unijeti PIN"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Nakon ponovnog pokretanja uređaja morate unijeti zaporku"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Unesite uzorak radi dodatne sigurnosti"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Unesite PIN radi dodatne sigurnosti"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Unesite zaporku radi dodatne sigurnosti"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Za promjenu profila morate unijeti uzorak"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Za promjenu profila morate unijeti PIN"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Za promjenu profila morate unijeti zaporku"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Administrator uređaja zaključao je uređaj"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Uređaj je ručno zaključan"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">Uređaj nije bio otključan <xliff:g id="NUMBER_1">%d</xliff:g> sat. Potvrdite uzorak.</item>
-      <item quantity="few">Uređaj nije bio otključan <xliff:g id="NUMBER_1">%d</xliff:g> sata. Potvrdite uzorak.</item>
-      <item quantity="other">Uređaj nije bio otključan <xliff:g id="NUMBER_1">%d</xliff:g> sati. Potvrdite uzorak.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">Uređaj nije bio otključan <xliff:g id="NUMBER_1">%d</xliff:g> sat. Potvrdite PIN.</item>
-      <item quantity="few">Uređaj nije bio otključan <xliff:g id="NUMBER_1">%d</xliff:g> sata. Potvrdite PIN.</item>
-      <item quantity="other">Uređaj nije bio otključan <xliff:g id="NUMBER_1">%d</xliff:g> sati. Potvrdite PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">Uređaj nije bio otključan <xliff:g id="NUMBER_1">%d</xliff:g> sat. Potvrdite zaporku.</item>
-      <item quantity="few">Uređaj nije bio otključan <xliff:g id="NUMBER_1">%d</xliff:g> sata. Potvrdite zaporku.</item>
-      <item quantity="other">Uređaj nije bio otključan <xliff:g id="NUMBER_1">%d</xliff:g> sati. Potvrdite zaporku.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Nije prepoznat"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-hu/strings.xml b/packages/Keyguard/res/values-hu/strings.xml
deleted file mode 100644
index bc3bf4e..0000000
--- a/packages/Keyguard/res/values-hu/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Billentyűzár"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Írja be a PIN kódot"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Írja be a SIM kártya PUK kódját, majd az új PIN kódot"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM kártya PUK kódja"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Új PIN-kód a SIM kártyához"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Érintsen jelszó megadásához"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"A feloldáshoz írja be a jelszót"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Feloldáshoz írja be a PIN kódot"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Helytelen PIN-kód."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Feltöltve"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Töltés"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Gyors töltés folyamatban"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Lassú töltés folyamatban"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Csatlakoztassa a töltőt."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"A feloldáshoz nyomja meg a Menü gombot."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"A hálózat lezárva"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Nincs SIM-kártya."</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Nincs SIM-kártya a táblagépben."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Nincs SIM kártya a telefonban."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Helyezzen be egy SIM kártyát."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"A SIM kártya hiányzik vagy nem olvasható. Helyezzen be egy SIM kártyát."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"A SIM kártya nem használható."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"SIM kártyája véglegesen le van tiltva.\n Forduljon a vezeték nélküli szolgáltatójához másik SIM kártya beszerzése érdekében."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"A SIM kártya le van zárva."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"A SIM kártya le van zárva a PUK kóddal."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"SIM kártya feloldása..."</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN-kód területe"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM PIN-kód területe"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM PUK kód területe"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"A következő ébresztés beállított ideje: <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Delete"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Elfelejtett minta"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Helytelen minta"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Helytelen jelszó"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Helytelen PIN-kód"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Próbálkozzon újra <xliff:g id="NUMBER">%d</xliff:g> másodperc múlva."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Rajzolja le a mintát"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Adja meg a SIM kártya PIN kódját"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Adja meg a(z) „<xliff:g id="CARRIER">%1$s</xliff:g>” SIM kártya PIN kódját."</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Adja meg a PIN kódot"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Írja be a jelszót"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"A SIM kártya le van tiltva. A folytatáshoz adja meg a PUK kódot. A részletekért vegye fel a kapcsolatot szolgáltatójával."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"A(z) „<xliff:g id="CARRIER">%1$s</xliff:g>” SIM kártyát a rendszer letiltotta. A folytatáshoz adja meg a PUK kódot. A részletekért vegye a fel a kapcsolatot szolgáltatójával."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Kívánt PIN-kód megadása"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Kívánt PIN-kód megerősítése"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"SIM kártya feloldása..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"4–8 számjegyű PIN kódot írjon be."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"A PUK kód legalább  8 számjegyből kell, hogy álljon."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Adja meg újra a helyes PUK kódot. Az ismételt próbálkozással véglegesen letiltja a SIM kártyát."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"A PIN kódok nem egyeznek."</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Túl sok mintarajzolási próbálkozás"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"<xliff:g id="NUMBER_0">%1$d</xliff:g> alkalommal helytelenül adta meg PIN kódját. \n\nPróbálja újra <xliff:g id="NUMBER_1">%2$d</xliff:g> másodperc múlva."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"<xliff:g id="NUMBER_0">%1$d</xliff:g> alkalommal helytelenül adta meg a jelszót. \n\nPróbálja újra <xliff:g id="NUMBER_1">%2$d</xliff:g> másodperc múlva."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"<xliff:g id="NUMBER_0">%1$d</xliff:g> alkalommal rosszul rajzolta le feloldási mintát. \n\nPróbálja újra <xliff:g id="NUMBER_1">%2$d</xliff:g> másodperc múlva."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"<xliff:g id="NUMBER_0">%1$d</xliff:g> alkalommal próbálkozott sikertelenül a táblagép zárolásának feloldásával. <xliff:g id="NUMBER_1">%2$d</xliff:g> további sikertelen kísérlet után a rendszer visszaállítja a táblagépet a gyári állapotba; ekkor az összes adat törlődik róla."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"<xliff:g id="NUMBER_0">%1$d</xliff:g> alkalommal próbálkozott sikertelenül a telefon zárolásának feloldásával. <xliff:g id="NUMBER_1">%2$d</xliff:g> további sikertelen kísérlet után a rendszer visszaállítja a telefont a gyári állapotba; ekkor az összes adat törlődik róla."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"<xliff:g id="NUMBER">%d</xliff:g> alkalommal próbálkozott sikertelenül a táblagép zárolásának feloldásával. A rendszer visszaállítja a táblagépet a gyári állapotba, és annak összes adata törlődik."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"<xliff:g id="NUMBER">%d</xliff:g> alkalommal próbálkozott sikertelenül a telefon zárolásának feloldásával. A rendszer visszaállítja a telefont a gyári állapotba, és annak összes adata törlődik."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"<xliff:g id="NUMBER_0">%1$d</xliff:g> alkalommal próbálkozott sikertelenül a táblagép zárolásának feloldásával. <xliff:g id="NUMBER_1">%2$d</xliff:g> további sikertelen kísérlet után a rendszer eltávolítja ezt a felhasználót; ekkor összes felhasználói adata törlődni fog."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"<xliff:g id="NUMBER_0">%1$d</xliff:g> alkalommal próbálkozott sikertelenül a telefon zárolásának feloldásával. <xliff:g id="NUMBER_1">%2$d</xliff:g> további sikertelen kísérlet után a rendszer eltávolítja ezt a felhasználót; ekkor összes felhasználói adata törlődni fog."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"<xliff:g id="NUMBER">%d</xliff:g> alkalommal próbálkozott sikertelenül a táblagép zárolásának feloldásával. A rendszer eltávolítja a felhasználót, és annak összes felhasználói adata törlődik."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"<xliff:g id="NUMBER">%d</xliff:g> alkalommal próbálkozott sikertelenül a telefon zárolásának feloldásával. A rendszer eltávolítja a felhasználót, és annak összes felhasználói adata törlődik."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"<xliff:g id="NUMBER_0">%1$d</xliff:g> alkalommal próbálkozott sikertelenül a táblagép zárolásának feloldásával. <xliff:g id="NUMBER_1">%2$d</xliff:g> további sikertelen kísérlet után a rendszer eltávolítja munkahelyi profilját; ekkor összes profiladata törlődni fog."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"<xliff:g id="NUMBER_0">%1$d</xliff:g> alkalommal próbálkozott sikertelenül a telefon zárolásának feloldásával. <xliff:g id="NUMBER_1">%2$d</xliff:g> további sikertelen kísérlet után a rendszer eltávolítja munkahelyi profilját; ekkor összes profiladata törlődni fog."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"<xliff:g id="NUMBER">%d</xliff:g> alkalommal próbálkozott sikertelenül a táblagép zárolásának feloldásával. A rendszer eltávolítja munkahelyi profilját, és összes profiladata törlődik."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"<xliff:g id="NUMBER">%d</xliff:g> alkalommal próbálkozott sikertelenül a telefon zárolásának feloldásával. A rendszer eltávolítja munkahelyi profilját, és összes profiladata törlődik."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"<xliff:g id="NUMBER_0">%1$d</xliff:g> alkalommal helytelenül rajzolta le a feloldási mintát. További <xliff:g id="NUMBER_1">%2$d</xliff:g> sikertelen kísérlet után egy e-mail fiók használatával kell feloldania a táblagépét.\n\n Kérjük, próbálja újra <xliff:g id="NUMBER_2">%3$d</xliff:g> másodperc múlva."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"<xliff:g id="NUMBER_0">%1$d</xliff:g> alkalommal helytelenül rajzolta le a feloldási mintát. További <xliff:g id="NUMBER_1">%2$d</xliff:g> sikertelen kísérlet után egy e-mail fiók használatával kell feloldania a telefonját.\n\n Kérjük, próbálja újra <xliff:g id="NUMBER_2">%3$d</xliff:g> másodperc múlva."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Helytelen PIN-kód a SIM kártyához; vegye fel a kapcsolatot szolgáltatójával az eszköz feloldásához."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">A SIM kártya PIN kódja helytelen. <xliff:g id="NUMBER_1">%d</xliff:g> próbálkozás maradt.</item>
-      <item quantity="one">A SIM kártya PIN kódja helytelen. <xliff:g id="NUMBER_0">%d</xliff:g> próbálkozás maradt. Utána a szolgáltatótól kell feloldást kérnie.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"A SIM kártya használhatatlan. Vegye fel a kapcsolatot szolgáltatójával."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">Helytelen PUK kód a SIM kártyához. Még <xliff:g id="NUMBER_1">%d</xliff:g> próbálkozása van, mielőtt a SIM kártya végleg használhatatlanná válik.</item>
-      <item quantity="one">Helytelen PUK kód a SIM kártyához. Még <xliff:g id="NUMBER_0">%d</xliff:g> próbálkozása van, mielőtt a SIM kártya végleg használhatatlanná válik.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"A SIM kártya PIN-művelete sikertelen!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"A SIM kártya PUK-művelete sikertelen!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Kód elfogadva."</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Nincs szolgáltatás."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Beviteli mód váltása"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Repülős üzemmód"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Az eszköz újraindítását követően meg kell adni a mintát"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Az eszköz újraindítását követően meg kell adni a PIN-kódot"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Az eszköz újraindítását követően meg kell adni a jelszót"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Minta szükséges a nagyobb biztonság érdekében"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"PIN-kód szükséges a nagyobb biztonság érdekében"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Jelszó szükséges a nagyobb biztonság érdekében"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Ha vált a profilok között, meg kell adni a mintát"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Ha vált a profilok között, meg kell adni a PIN-kódot"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Ha vált a profilok között, meg kell adni a jelszót"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Az eszközadminisztrátor lezárta az eszközt"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Az eszközt manuálisan lezárták"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Az eszköz zárolása <xliff:g id="NUMBER_1">%d</xliff:g> órája nem lett feloldva. Erősítse meg a mintát.</item>
-      <item quantity="one">Az eszköz zárolása <xliff:g id="NUMBER_0">%d</xliff:g> órája nem lett feloldva. Erősítse meg a mintát.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Az eszköz zárolása <xliff:g id="NUMBER_1">%d</xliff:g> órája nem lett feloldva. Erősítse meg a PIN kódot.</item>
-      <item quantity="one">Az eszköz zárolása <xliff:g id="NUMBER_0">%d</xliff:g> órája nem lett feloldva. Erősítse meg a PIN kódot.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Az eszköz zárolása <xliff:g id="NUMBER_1">%d</xliff:g> órája nem lett feloldva. Erősítse meg a jelszót.</item>
-      <item quantity="one">Az eszköz zárolása <xliff:g id="NUMBER_0">%d</xliff:g> órája nem lett feloldva. Erősítse meg a jelszót.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Nem sikerült felismerni"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-hy/strings.xml b/packages/Keyguard/res/values-hy/strings.xml
deleted file mode 100644
index ae92f6b..0000000
--- a/packages/Keyguard/res/values-hy/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Keyguard"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Մուտքագրեք PIN կոդը"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Մուտքագրեք SIM PUK-ը և նոր PIN կոդը"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM PUK կոդը"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Նոր SIM PIN կոդը"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Հպեք` գաղտնաբառը մուտքագրելու համար"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Մուտքագրեք գաղտնաբառը ապակողպման համար"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Մուտքագրեք PIN-ը ապակողպման համար"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Սխալ PIN ծածկագիր:"</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Լիցքավորված է"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Լիցքավորում"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Արագ լիցքավորում"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Դանդաղ լիցքավորում"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Միացրեք ձեր լիցքավորիչը:"</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Ապակողպելու համար սեղմեք Ցանկը:"</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Ցանցը կողպված է"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"SIM քարտ չկա"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Գրասալիկում SIM քարտ չկա:"</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Հեռախոսի մեջ SIM քարտ չկա:"</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Զետեղեք SIM քարտը:"</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM քարտը բացակայում է կամ չի կարող կարդացվել: Մտցրեք SIM քարտ:"</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Անպիտան SIM քարտ:"</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Ձեր SIM քարտը ընդմիշտ կասեցվել է:\nԿապվեք ձեր բջջային ծառայության մատակարարի հետ նոր SIM քարտ ձեռք բերելու համար:"</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM քարտը կողպված է:"</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM քարտը PUK-ով կողպված է:"</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"SIM քարտը ապակողպվում է..."</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN կոդի տարածք"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM քարտի PIN կոդի տարածք"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM քարտի PUK կոդի տարածք"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Հաջորդ զարթուցիչը դրված է <xliff:g id="ALARM">%1$s</xliff:g>-ի վրա"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Ջնջել"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Մուտք"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Մոռացել եմ սխեման"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Սխալ սխեմա"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Սխալ գաղտնաբառ"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Սխալ PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Փորձեք կրկին <xliff:g id="NUMBER">%d</xliff:g> վայրկյանից:"</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Հավաքեք ձեր սխեման"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Մուտքագրեք SIM-քարտի PIN-կոդը"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Մուտքագրեք SIM-ի PIN կոդը <xliff:g id="CARRIER">%1$s</xliff:g>-ի համար"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Մուտքագրեք PIN-ը"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Մուտքագրեք գաղտնաբառը"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM-ը այս պահին անջատված է: Մուտքագրեք PUK կոդը շարունակելու համար: Մանրամասների համար կապվեք օպերատորի հետ:"</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"<xliff:g id="CARRIER">%1$s</xliff:g> SIM քարտն այժմ անջատված է: Շարունակելու համար մուտքագրեք PUK կոդը: Մանրամասն տեղեկություններ ստանալու համար դիմեք օպերատորին:"</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Մուտքագրեք ցանկալի PIN ծածկագիրը"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Հաստատեք ցանկալի PIN ծածկագիրը"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Ապակողպում է SIM քարտը ..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Մուտքագրեք PIN, որը 4-ից 8 թիվ է:"</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK կոդը պետք է լինի 8 կամ ավելի թիվ:"</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Վերամուտքագրեք ճիշտ PUK ծածկագիրը: Կրկնվող փորձերը ընդմիշտ կկասեցնեն SIM քարտը:"</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN ծածկագրերը չեն համընկնում"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Չափից շատ սխեմայի փորձեր"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Դուք <xliff:g id="NUMBER_0">%1$d</xliff:g> անգամ սխալ եք մուտքագրել ձեր PIN-ը: \n\nՓորձեք կրկին <xliff:g id="NUMBER_1">%2$d</xliff:g> վայրկյանից:"</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Դուք սխալ եք մուտքագրել ձեր գաղտնաբառը <xliff:g id="NUMBER_0">%1$d</xliff:g> անգամ: \n\nՓորձեք կրկին <xliff:g id="NUMBER_1">%2$d</xliff:g> վայրկյանից:"</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Դուք <xliff:g id="NUMBER_0">%1$d</xliff:g> անգամ սխալ եք հավաքել ձեր ապակողպման սխեման: \n\nՓորձեք կրկին <xliff:g id="NUMBER_1">%2$d</xliff:g> վայրկյանից:"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Դուք կատարել եք գրասալիկն ապակողպելու <xliff:g id="NUMBER_0">%1$d</xliff:g> անհաջող փորձ: Եվս <xliff:g id="NUMBER_1">%2$d</xliff:g> անհաջող փորձից հետո այս պլանշետը կվերակայվի և բոլոր տվյալները կջնջվեն:"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Դուք կատարել եք հեռախոսն ապակողպելու <xliff:g id="NUMBER_0">%1$d</xliff:g> անհաջող փորձ: Եվս <xliff:g id="NUMBER_1">%2$d</xliff:g> անհաջող փորձից հետո այս հեռախոսը կվերակայվի և բոլոր տվյալները կջնջվեն:"</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Դուք կատարել եք գրասալիկն ապակողպելու <xliff:g id="NUMBER">%d</xliff:g> անհաջող փորձ: Այս պլանշետը կվերակայվի և բոլոր տվյալները կջնջվեն:"</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Դուք կատարել եք հեռախոսն ապակողպելու <xliff:g id="NUMBER">%d</xliff:g> անհաջող փորձ: Այս հեռախոսը կվերակայվի և բոլոր տվյալները կջնջվեն:"</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Դուք կատարել եք գրասալիկն ապակողպելու <xliff:g id="NUMBER_0">%1$d</xliff:g> անհաջող փորձ: Եվս <xliff:g id="NUMBER_1">%2$d</xliff:g> անհաջող փորձից հետո այս օգտատերը կհեռացվի և օգտատիրոջ բոլոր տվյալները կջնջվեն:"</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Դուք կատարել եք հեռախոսն ապակողպելու <xliff:g id="NUMBER_0">%1$d</xliff:g> անհաջող փորձ: Եվս <xliff:g id="NUMBER_1">%2$d</xliff:g> անհաջող փորձից հետո այս օգտատերը կհեռացվի և օգտատիրոջ բոլոր տվյալները կջնջվեն:"</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Դուք կատարել եք գրասալիկն ապակողպելու <xliff:g id="NUMBER">%d</xliff:g> անհաջող փորձ: Օգտատերը կհեռացվի և օգտատիրոջ բոլոր տվյալները կջնջվեն:"</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Դուք կատարել եք հեռախոսն ապակողպելու <xliff:g id="NUMBER">%d</xliff:g> անհաջող փորձ: Օգտատերը կհեռացվի և օգտատիրոջ բոլոր տվյալները կջնջվեն:"</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Դուք կատարել եք գրասալիկն ապակողպելու <xliff:g id="NUMBER_0">%1$d</xliff:g> անհաջող փորձ: Եվս <xliff:g id="NUMBER_1">%2$d</xliff:g> անհաջող փորձից հետո աշխատանքային պրոֆիլը կհեռացվի և պրոֆիլի բոլոր տվյալները կջնջվեն:"</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Դուք կատարել եք հեռախոսն ապակողպելու <xliff:g id="NUMBER_0">%1$d</xliff:g> անհաջող փորձ: Եվս <xliff:g id="NUMBER_1">%2$d</xliff:g> անհաջող փորձից հետո աշխատանքային պրոֆիլը կհեռացվի և պրոֆիլի բոլոր տվյալները կջնջվեն:"</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Դուք կատարել եք գրասալիկն ապակողպելու <xliff:g id="NUMBER">%d</xliff:g> անհաջող փորձ: Աշխատանքային պրոֆիլը կհեռացվի և պրոֆիլի բոլոր տվյալները կջնջվեն:"</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Դուք կատարել եք հեռախոսն ապակողպելու <xliff:g id="NUMBER">%d</xliff:g> անհաջող փորձ: Աշխատանքային պրոֆիլը կհեռացվի և պրոֆիլի բոլոր տվյալները կջնջվեն:"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Դուք սխալ եք հավաքել ձեր ապակողպման սխեման <xliff:g id="NUMBER_0">%1$d</xliff:g> անգամ: Եվս <xliff:g id="NUMBER_1">%2$d</xliff:g> անհաջող փորձից հետո ձեզանից կպահանջվի ապակողպել ձեր պլանշետը` օգտագործելով էլփոստի հաշիվ:\n\n Փորձեք կրկին <xliff:g id="NUMBER_2">%3$d</xliff:g> վայրկյանից:"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Դուք <xliff:g id="NUMBER_0">%1$d</xliff:g> անգամ սխալ եք հավաքել ձեր ապակողպման նմուշը: <xliff:g id="NUMBER_1">%2$d</xliff:g> անգամից ավել անհաջող փորձերից հետո ձեզ կառաջարկվի ապակողպել ձեր հեռախոսը` օգտագործելով էլփոստի հաշիվ:\n\n Փորձեք կրկին <xliff:g id="NUMBER_2">%3$d</xliff:g> վայրկյանից:"</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Սխալ SIM PIN կոդի պատճառով պետք է դիմեք ձեր օպերատորին՝ սարքն արգելաբացելու համար:"</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">SIM PIN կոդը սխալ է: Մնաց <xliff:g id="NUMBER_1">%d</xliff:g> փորձ:</item>
-      <item quantity="other">SIM PIN կոդը սխալ է: Մնաց <xliff:g id="NUMBER_1">%d</xliff:g> փորձ:</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM-ը հնարավոր չէ օգտագործել: Դիմեք ձեր օպերատորին:"</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">SIM PUK կոդը սխալ է: Մնաց <xliff:g id="NUMBER_1">%d</xliff:g> փորձ, որից հետո SIM քարտն այլևս հնարավոր չի լինի օգտագործել:</item>
-      <item quantity="other">SIM PUK կոդը սխալ է: Մնաց <xliff:g id="NUMBER_1">%d</xliff:g> փորձ, որից հետո SIM քարտն այլևս հնարավոր չի լինի օգտագործել:</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"SIM PIN գործողությունը ձախողվեց:"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"SIM PUK գործողությունը ձախողվեց:"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Կոդն ընդունվեց:"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Ծառայություն չկա:"</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Փոխարկել մուտքագրման եղանակը"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Ինքնաթիռի ռեժիմ"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Սարքը վերագործարկելուց հետո անհրաժեշտ է մուտքագրել նախշը"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Սարքը վերագործարկելուց հետո անհրաժեշտ է մուտքագրել PIN կոդը"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Սարքը վերագործարկելուց հետո անհրաժեշտ է մուտքագրել գաղտնաբառը"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Անվտանգության նկատառումներից ելնելով անհրաժեշտ է մուտքագրել նախշը"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Անվտանգության նկատառումներից ելնելով անհրաժեշտ է մուտքագրել PIN կոդը"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Անվտանգության նկատառումներից ելնելով անհրաժեշտ է մուտքագրել գաղտնաբառը"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Պրոֆիլները փոխարկելիս անհրաժեշտ է մուտքագրել նախշը"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Պրոֆիլները փոխարկելիս անհրաժեշտ է մուտքագրել PIN կոդը"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Պրոֆիլները փոխարկելիս անհրաժեշտ է մուտքագրել գաղտնաբառը"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Սարքի ադմինիստրատորը կողպել է սարքը"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Սարքը կողպվել է ձեռքով"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">Սարքը չի ապակողպվել <xliff:g id="NUMBER_1">%d</xliff:g> ժամվա ընթացքում: Հաստատեք նախշը:</item>
-      <item quantity="other">Սարքը չի ապակողպվել <xliff:g id="NUMBER_1">%d</xliff:g> ժամվա ընթացքում: Հաստատեք նախշը:</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">Սարքը չի ապակողպվել <xliff:g id="NUMBER_1">%d</xliff:g> ժամվա ընթացքում: Հաստատեք PIN կոդը:</item>
-      <item quantity="other">Սարքը չի ապակողպվել <xliff:g id="NUMBER_1">%d</xliff:g> ժամվա ընթացքում: Հաստատեք PIN կոդը:</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">Սարքը չի ապակողպվել <xliff:g id="NUMBER_1">%d</xliff:g> ժամվա ընթացքում: Հաստատեք գաղտնաբառը:</item>
-      <item quantity="other">Սարքը չի ապակողպվել <xliff:g id="NUMBER_1">%d</xliff:g> ժամվա ընթացքում: Հաստատեք գաղտնաբառը:</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Չճանաչվեց"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-in/strings.xml b/packages/Keyguard/res/values-in/strings.xml
deleted file mode 100644
index dda63a8..0000000
--- a/packages/Keyguard/res/values-in/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Keyguard"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Ketik kode PIN"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Ketik kode PIN baru dan PUK SIM"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"Kode PUK SIM"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Kode PIN SIM baru"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Sentuh untuk mengetikkan sandi"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Ketik sandi untuk membuka kunci"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Ketik PIN untuk membuka kunci"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Kode PIN salah."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Terisi"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Mengisi daya"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Mengisi daya dengan cepat"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Mengisi daya dengan lambat"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Hubungkan pengisi daya."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Tekan Menu untuk membuka."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Jaringan terkunci"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Tidak ada kartu SIM"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Tidak ada kartu SIM dalam tablet."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Tidak ada Kartu SIM di dalam ponsel."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Masukkan kartu SIM."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"Kartu SIM tidak ada atau tidak dapat dibaca. Masukkan kartu SIM."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Kartu SIM tidak dapat digunakan."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Kartu SIM Anda telah dinonaktifkan secara permanen.\n Hubungi penyedia layanan nirkabel Anda untuk kartu SIM lain."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"Kartu SIM terkunci."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"Kartu SIM terkunci PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Membuka kartu SIM…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Bidang PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Bidang PIN SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Bidang PUK SIM"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Alarm berikutnya disetel untuk <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Hapus"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Lupa Pola?"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Pola Salah"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Sandi Salah"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"PIN Salah"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Coba lagi dalam <xliff:g id="NUMBER">%d</xliff:g> detik."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Gambar pola Anda"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Masukkan PIN SIM"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Masukkan PIN SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\""</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Masukkan PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Masukkan Sandi"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM telah dinonaktifkan. Masukkan kode PUK untuk melanjutkan. Hubungi operator untuk keterangan selengkapnya."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" kini dinonaktifkan. Masukkan kode PUK untuk melanjutkan. Hubungi operator untuk mengetahui detailnya."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Masukkan kode PIN yang diinginkan"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Konfirmasi kode PIN yang diinginkan"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Membuka kunci kartu SIM…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Ketik PIN yang terdiri dari 4 sampai 8 angka."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"Kode PUK harus terdiri dari 8 angka atau lebih."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Masukkan kembali kode PUK yang benar. Jika berulang kali gagal, SIM akan dinonaktifkan secara permanen."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Kode PIN tidak cocok"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Terlalu banyak upaya pola"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Anda telah <xliff:g id="NUMBER_0">%1$d</xliff:g> kali salah mengetik PIN. \n\nCoba lagi dalam <xliff:g id="NUMBER_1">%2$d</xliff:g> detik."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Anda telah <xliff:g id="NUMBER_0">%1$d</xliff:g> kali salah mengetik sandi. \n\nCoba lagi dalam <xliff:g id="NUMBER_1">%2$d</xliff:g> detik."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Anda telah <xliff:g id="NUMBER_0">%1$d</xliff:g> kali salah menggambar pola pembuka kunci. \n\nCoba lagi dalam <xliff:g id="NUMBER_1">%2$d</xliff:g> detik."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Sudah <xliff:g id="NUMBER_0">%1$d</xliff:g> kali Anda berupaya membuka kunci tablet dengan tidak benar. Setelah <xliff:g id="NUMBER_1">%2$d</xliff:g> lagi upaya yang tidak berhasil, tablet ini akan disetel ulang, sehingga semua datanya akan dihapus."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Sudah <xliff:g id="NUMBER_0">%1$d</xliff:g> kali Anda berupaya membuka kunci ponsel dengan tidak benar. Setelah <xliff:g id="NUMBER_1">%2$d</xliff:g> lagi upaya yang tidak berhasil, ponsel ini akan disetel ulang, sehingga semua datanya akan dihapus."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Sudah <xliff:g id="NUMBER">%d</xliff:g> kali Anda berupaya membuka kunci tablet dengan tidak benar. Tablet ini akan disetel ulang, sehingga menghapus semua datanya."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Sudah <xliff:g id="NUMBER">%d</xliff:g> kali Anda berupaya membuka kunci ponsel dengan tidak benar. Ponsel ini akan disetel ulang, sehingga menghapus semua datanya."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Sudah <xliff:g id="NUMBER_0">%1$d</xliff:g> kali Anda berupaya membuka kunci tablet dengan tidak benar. Setelah <xliff:g id="NUMBER_1">%2$d</xliff:g> lagi upaya yang tidak berhasil, pengguna ini akan dihapus, sehingga semua data pengguna akan dihapus."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Sudah <xliff:g id="NUMBER_0">%1$d</xliff:g> kali Anda berupaya membuka kunci ponsel dengan tidak benar. Setelah <xliff:g id="NUMBER_1">%2$d</xliff:g> lagi upaya yang tidak berhasil, pengguna ini akan dihapus, sehingga semua data pengguna akan dihapus."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Sudah <xliff:g id="NUMBER">%d</xliff:g> kali Anda berupaya membuka kunci tablet dengan tidak benar. Pengguna ini akan dihapus, sehingga menghapus semua data pengguna."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Sudah <xliff:g id="NUMBER">%d</xliff:g> kali Anda berupaya membuka kunci ponsel dengan tidak benar. Pengguna ini akan dihapus, sehingga menghapus semua data pengguna."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Sudah <xliff:g id="NUMBER_0">%1$d</xliff:g> kali Anda berupaya membuka kunci tablet dengan tidak benar. Setelah <xliff:g id="NUMBER_1">%2$d</xliff:g> lagi upaya yang tidak berhasil, profil kerja akan dihapus, sehingga semua data profil akan dihapus."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Sudah <xliff:g id="NUMBER_0">%1$d</xliff:g> kali Anda berupaya membuka kunci ponsel dengan tidak benar. Setelah <xliff:g id="NUMBER_1">%2$d</xliff:g> lagi upaya yang tidak berhasil, profil kerja akan dihapus, sehingga semua data profil akan dihapus."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Sudah <xliff:g id="NUMBER">%d</xliff:g> kali Anda berupaya membuka kunci tablet dengan tidak benar. Profil kerja akan dihapus, sehingga menghapus semua data profil."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Sudah <xliff:g id="NUMBER">%d</xliff:g> kali Anda berupaya membuka kunci ponsel dengan tidak benar. Profil kerja akan dihapus, sehingga menghapus semua data profil."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Anda telah <xliff:g id="NUMBER_0">%1$d</xliff:g> kali salah menggambar pola pembuka kunci. Setelah <xliff:g id="NUMBER_1">%2$d</xliff:g> lagi upaya gagal, Anda akan diminta membuka kunci tablet menggunakan akun email.\n\nCoba lagi dalam <xliff:g id="NUMBER_2">%3$d</xliff:g> detik."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Anda telah <xliff:g id="NUMBER_0">%1$d</xliff:g> kali salah menggambar pola pembuka kunci. Setelah <xliff:g id="NUMBER_1">%2$d</xliff:g> lagi upaya gagal, Anda akan diminta membuka kunci ponsel menggunakan akun email.\n\nCoba lagi dalam <xliff:g id="NUMBER_2">%3$d</xliff:g> detik."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Kode PIN SIM salah. Hubungi operator untuk membuka kunci perangkat."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">Kode PIN SIM salah, sisa <xliff:g id="NUMBER_1">%d</xliff:g> percobaan.</item>
-      <item quantity="one">Kode PIN SIM salah, sisa <xliff:g id="NUMBER_0">%d</xliff:g> percobaan sebelum Anda harus menghubungi operator untuk membuka kunci perangkat.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM tidak dapat digunakan. Hubungi operator Anda."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">Kode PUK SIM salah, sisa <xliff:g id="NUMBER_1">%d</xliff:g> percobaan sebelum SIM tidak dapat digunakan selamanya.</item>
-      <item quantity="one">Kode PUK SIM salah, sisa <xliff:g id="NUMBER_0">%d</xliff:g> percobaan sebelum SIM tidak dapat digunakan selamanya.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Operasi PIN SIM gagal!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Operasi PUK SIM gagal!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Kode Diterima!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Tidak ada layanan."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Beralih metode masukan"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Mode pesawat"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Pola diperlukan setelah perangkat dimulai ulang"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"PIN diperlukan setelah perangkat dimulai ulang"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Sandi diperlukan setelah perangkat dimulai ulang"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Pola diperlukan untuk keamanan tambahan"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"PIN diperlukan untuk keamanan tambahan"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Sandi diperlukan untuk keamanan tambahan"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Pola diperlukan jika Anda beralih profil"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"PIN diperlukan jika Anda beralih profil"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Sandi diperlukan jika Anda beralih profil"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Perangkat dikunci oleh administrator"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Perangkat dikunci secara manual"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Perangkat belum dibuka kuncinya selama <xliff:g id="NUMBER_1">%d</xliff:g> jam. Konfirmasi pola.</item>
-      <item quantity="one">Perangkat belum dibuka kuncinya selama <xliff:g id="NUMBER_0">%d</xliff:g> jam. Konfirmasi pola.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Perangkat belum dibuka kuncinya selama <xliff:g id="NUMBER_1">%d</xliff:g> jam. Konfirmasi PIN.</item>
-      <item quantity="one">Perangkat belum dibuka kuncinya selama <xliff:g id="NUMBER_0">%d</xliff:g> jam. Konfirmasi PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Perangkat belum dibuka kuncinya selama <xliff:g id="NUMBER_1">%d</xliff:g> jam. Konfirmasi sandi.</item>
-      <item quantity="one">Perangkat belum dibuka kuncinya selama <xliff:g id="NUMBER_0">%d</xliff:g> jam. Konfirmasi sandi.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Tidak dikenali"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-is/strings.xml b/packages/Keyguard/res/values-is/strings.xml
deleted file mode 100644
index 278e031..0000000
--- a/packages/Keyguard/res/values-is/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Takkavörn"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Sláðu inn PIN-númer"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Sláðu inn PUK-númer SIM-korts og nýtt PIN-númer"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"PUK-númer SIM-korts"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Nýtt PIN-númer SIM-korts"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Snertu og sláðu inn aðgangsorð"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Sláðu inn aðgangsorðið til að opna"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Sláðu inn PIN-númer til að opna"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Rangt PIN-númer."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Fullhlaðið"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Í hleðslu"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Hröð hleðsla"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Hæg hleðsla"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Tengdu hleðslutækið."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Ýttu á valmyndarhnappinn til að taka úr lás."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Símkerfi læst"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Ekkert SIM-kort"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Ekkert SIM-kort í spjaldtölvunni."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Ekkert SIM-kort í símanum."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Settu SIM-kort í."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM-kort vantar eða það er ekki læsilegt. Settu SIM-kort í."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Ónothæft SIM-kort."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"SIM-kortið hefur verið gert varanlega óvirkt.\n Hafðu samband við símafyrirtækið þitt til að fá annað SIM-kort."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM-kortið er læst."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM-kortið er PUK-læst."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Tekur SIM-kort úr lás…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN-svæði"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"PIN-svæði SIM-korts"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"PUK-svæði SIM-korts"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Næsti vekjari stilltur á <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Eyða"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Man ekki mynstrið"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Rangt mynstur"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Rangt aðgangsorð"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Rangt PIN-númer"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Reyndu aftur eftir <xliff:g id="NUMBER">%d</xliff:g> sekúndur."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Teiknaðu mynstrið þitt"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Sláðu inn PIN-númer SIM-kortsins"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Sláðu inn PIN-númer SIM-korts fyrir „<xliff:g id="CARRIER">%1$s</xliff:g>“"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Sláðu inn PIN-númer"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Sláðu inn aðgangsorð"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM-kortið hefur verið gert óvirkt. Sláðu inn PUK-númerið til að halda áfram. Hafðu samband við símafyrirtækið til að fá frekari upplýsingar."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM-kortið „<xliff:g id="CARRIER">%1$s</xliff:g>“ hefur verið gert óvirkt. Sláðu inn PUK-númerið til að halda áfram. Hafðu samband við símafyrirtækið til að fá frekari upplýsingar."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Sláðu inn nýtt PIN-númer"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Staðfestu nýja PIN-númerið"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Opnar SIM-kort…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Sláðu in PIN-númer sem er 4 til 8 tölustafir."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK-númerið verður að vera 8 tölustafir eða lengra."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Prófaðu aftur að setja inn rétt PUK-númer. Endurteknar tilraunir gera SIM-kortið varanlega óvirkt."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN-númerin stemma ekki"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Of margar tilraunir til að teikna mynstur"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Þú hefur slegið inn rangt PIN-númer <xliff:g id="NUMBER_0">%1$d</xliff:g> sinnum. \n\nReyndu aftur eftir <xliff:g id="NUMBER_1">%2$d</xliff:g> sekúndur."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Þú hefur slegið inn rangt aðgangsorð <xliff:g id="NUMBER_0">%1$d</xliff:g> sinnum. \n\nReyndu aftur eftir <xliff:g id="NUMBER_1">%2$d</xliff:g> sekúndur."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Þú hefur teiknað rangt opnunarmynstur <xliff:g id="NUMBER_0">%1$d</xliff:g> sinnum. \n\nReyndu aftur eftir <xliff:g id="NUMBER_1">%2$d</xliff:g> sekúndur."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Þú hefur gert <xliff:g id="NUMBER_0">%1$d</xliff:g> árangurslausar tilraunir til að opna spjaldtölvuna. Eftir <xliff:g id="NUMBER_1">%2$d</xliff:g> árangurslausar tilraunir í viðbót verður spjaldtölvan endurstillt, með þeim afleiðingum að öllum gögnum hennar verður eytt."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Þú hefur gert <xliff:g id="NUMBER_0">%1$d</xliff:g> árangurslausar tilraunir til að opna símann. Eftir <xliff:g id="NUMBER_1">%2$d</xliff:g> árangurslausar tilraunir í viðbót verður síminn endurstilltur, með þeim afleiðingum að öllum gögnum hans verður eytt."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Þú hefur gert <xliff:g id="NUMBER">%d</xliff:g> árangurslausar tilraunir til að opna spjaldtölvuna. Spjaldtölvan verður endurstillt, með þeim afleiðingum að öllum gögnum hennar verður eytt."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Þú hefur gert <xliff:g id="NUMBER">%d</xliff:g> árangurslausar tilraunir til að opna símann. Síminn verður endurstilltur, með þeim afleiðingum að öllum gögnum hans verður eytt."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Þú hefur gert <xliff:g id="NUMBER_0">%1$d</xliff:g> árangurslausar tilraunir til að opna spjaldtölvuna. Eftir <xliff:g id="NUMBER_1">%2$d</xliff:g> árangurslausar tilraunir í viðbót verður notandinn fjarlægður með þeim afleiðingum að öllum notandagögnum verður eytt."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Þú hefur gert <xliff:g id="NUMBER_0">%1$d</xliff:g> árangurslausar tilraunir til að opna símann. Eftir <xliff:g id="NUMBER_1">%2$d</xliff:g> árangurslausar tilraunir í viðbót verður notandinn fjarlægður með þeim afleiðingum að öllum notandagögnum verður eytt."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Þú hefur gert <xliff:g id="NUMBER">%d</xliff:g> árangurslausar tilraunir til að opna spjaldtölvuna. Notandinn verður fjarlægður, með þeim afleiðingum að öllum notandagögnum verður eytt."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Þú hefur gert <xliff:g id="NUMBER">%d</xliff:g> árangurslausar tilraunir til að opna símann. Notandinn verður fjarlægður, með þeim afleiðingum að öllum notandagögnum verður eytt."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Þú hefur gert <xliff:g id="NUMBER_0">%1$d</xliff:g> árangurslausar tilraunir til að opna spjaldtölvuna. Eftir <xliff:g id="NUMBER_1">%2$d</xliff:g> árangurslausar tilraunir í viðbót verður vinnusniðið fjarlægt með þeim afleiðingum að öllum gögnum þess verður eytt."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Þú hefur gert <xliff:g id="NUMBER_0">%1$d</xliff:g> árangurslausar tilraunir til að opna símann. Eftir <xliff:g id="NUMBER_1">%2$d</xliff:g> árangurslausar tilraunir í viðbót verður vinnusniðið fjarlægt með þeim afleiðingum að öllum gögnum þess verður eytt."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Þú hefur gert <xliff:g id="NUMBER">%d</xliff:g> árangurslausar tilraunir til að opna spjaldtölvuna. Vinnusniðið verður fjarlægt, með þeim afleiðingum að öllum gögnum þess verður eytt."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Þú hefur gert <xliff:g id="NUMBER">%d</xliff:g> árangurslausar tilraunir til að opna símann. Vinnusniðið verður fjarlægt, með þeim afleiðingum að öllum gögnum þess verður eytt."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Þú hefur teiknað rangt opnunarmynstur <xliff:g id="NUMBER_0">%1$d</xliff:g> sinnum. Eftir <xliff:g id="NUMBER_1">%2$d</xliff:g> árangurslausar tilraunir í viðbót verður þú beðin(n) um að opna spjaldtölvuna með tölvupóstreikningi.\n\n Reyndu aftur eftir <xliff:g id="NUMBER_2">%3$d</xliff:g> sekúndur."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Þú hefur teiknað rangt opnunarmynstur <xliff:g id="NUMBER_0">%1$d</xliff:g> sinnum. Eftir <xliff:g id="NUMBER_1">%2$d</xliff:g> árangurslausar tilraunir í viðbót verður þú beðin(n) um að opna símann með tölvupóstreikningi.\n\n Reyndu aftur eftir <xliff:g id="NUMBER_2">%3$d</xliff:g> sekúndur."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Rangt PIN-númer SIM-korts. Þú þarft núna að hafa samband við símafyrirtækið þitt til að taka tækið úr lás."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">Rangt PIN-númer SIM-korts. Þú átt <xliff:g id="NUMBER_1">%d</xliff:g> tilraun eftir.</item>
-      <item quantity="other">Rangt PIN-númer SIM-korts. Þú átt <xliff:g id="NUMBER_1">%d</xliff:g> tilraunir eftir.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM-kortið er ónothæft. Hafðu samband við símafyrirtækið þitt."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">Rangt PUK-númer SIM-korts. Þú átt <xliff:g id="NUMBER_1">%d</xliff:g> tilraun eftir áður en SIM-kortið verður ónothæft til frambúðar.</item>
-      <item quantity="other">Rangt PUK-númer SIM-korts. Þú átt <xliff:g id="NUMBER_1">%d</xliff:g> tilraunir eftir áður en SIM-kortið verður ónothæft til frambúðar.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"PIN-aðgerð SIM-korts mistókst!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"PUK-aðgerð SIM-korts mistókst!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Númer samþykkt!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Ekkert símasamband."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Skipta um innsláttaraðferð"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Flugstilling"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Mynsturs er krafist þegar tækið er endurræst"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"PIN-númers er krafist þegar tækið er endurræst"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Aðgangsorðs er krafist þegar tækið er endurræst"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Mynsturs er krafist af öryggisástæðum"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"PIN-númers er krafist af öryggisástæðum"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Aðgangsorðs er krafist af öryggisástæðum"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Mynsturs er krafist þegar þú skiptir um snið"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"PIN-númers er krafist þegar þú skiptir um snið"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Aðgangsorðs er krafist þegar þú skiptir um snið"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Stjórnandi hefur læst tækinu"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Tækinu var læst handvirkt"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">Tækið hefur ekki verið tekið úr lás í <xliff:g id="NUMBER_1">%d</xliff:g> klukkustund. Staðfestu mynstrið.</item>
-      <item quantity="other">Tækið hefur ekki verið tekið úr lás í <xliff:g id="NUMBER_1">%d</xliff:g> klukkustundir. Staðfestu mynstrið.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">Tækið hefur ekki verið tekið úr lás í <xliff:g id="NUMBER_1">%d</xliff:g> klukkustund. Staðfestu PIN-númerið</item>
-      <item quantity="other">Tækið hefur ekki verið tekið úr lás í <xliff:g id="NUMBER_1">%d</xliff:g> klukkustundir. Staðfestu PIN-númerið</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">Tækið hefur ekki verið tekið úr lás í <xliff:g id="NUMBER_1">%d</xliff:g> klukkustund. Staðfestu aðgangsorðið.</item>
-      <item quantity="other">Tækið hefur ekki verið tekið úr lás í <xliff:g id="NUMBER_1">%d</xliff:g> klukkustundir. Staðfestu aðgangsorðið.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Þekktist ekki"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-it/strings.xml b/packages/Keyguard/res/values-it/strings.xml
deleted file mode 100644
index 98bcae4..0000000
--- a/packages/Keyguard/res/values-it/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Keyguard"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Inserisci il codice PIN"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Digita il PUK della SIM e il nuovo codice PIN"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"Codice PUK della SIM"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Nuovo PIN della SIM"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Tocca per inserire la password"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Inserisci password per sbloccare"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Inserisci PIN per sbloccare"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Codice PIN errato."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Carico"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"In carica"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Ricarica veloce"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Ricarica lenta"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Collega il caricabatterie."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Premi Menu per sbloccare."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Rete bloccata"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Nessuna scheda SIM"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Nessuna scheda SIM presente nel tablet."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Nessuna scheda SIM presente nel telefono."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Inserisci una scheda SIM."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"Scheda SIM mancante o non leggibile. Inserisci una scheda SIM."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Scheda SIM inutilizzabile."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"La scheda SIM è stata disattivata definitivamente.\n Contatta il fornitore del tuo servizio wireless per ricevere un\'altra scheda SIM."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"La SIM è bloccata."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"La SIM è bloccata tramite PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Sblocco scheda SIM..."</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Area PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Area PIN SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Area PUK SIM"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Prossima sveglia impostata a: <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Canc"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Invio"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Sequenza dimenticata"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Sequenza sbagliata"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Password sbagliata"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"PIN errato"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Riprova fra <xliff:g id="NUMBER">%d</xliff:g> secondi."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Inserisci la sequenza"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Inserisci il PIN della SIM"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Inserisci il PIN della scheda SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\""</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Inserisci PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Inserisci la password"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"La scheda SIM è disattivata. Inserisci il codice PUK per continuare. Contatta l\'operatore per avere informazioni dettagliate."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"La SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" non è attiva al momento. Inserisci il codice PUK per continuare. Contatta l\'operatore per avere informazioni dettagliate."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Inserisci il codice PIN desiderato"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Conferma il codice PIN desiderato"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Sblocco scheda SIM..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Il PIN deve essere di 4-8 numeri."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"Il codice PUK dovrebbe avere almeno otto numeri."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Inserisci di nuovo il codice PUK corretto. Ripetuti tentativi comportano la disattivazione definitiva della scheda SIM."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"I codici PIN non corrispondono"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Troppi tentativi di inserimento della sequenza"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Hai digitato il tuo PIN <xliff:g id="NUMBER_0">%1$d</xliff:g> volte in modo errato. \n\nRiprova tra <xliff:g id="NUMBER_1">%2$d</xliff:g> secondi."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Hai digitato la tua password <xliff:g id="NUMBER_0">%1$d</xliff:g> volte in modo errato. \n\nRiprova tra <xliff:g id="NUMBER_1">%2$d</xliff:g> secondi."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"<xliff:g id="NUMBER_0">%1$d</xliff:g> tentativi errati di inserimento della sequenza di sblocco. \n\nRiprova tra <xliff:g id="NUMBER_1">%2$d</xliff:g> secondi."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Hai tentato di sbloccare il tablet senza riuscirci per <xliff:g id="NUMBER_0">%1$d</xliff:g> volte. Dopo altri <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativi falliti, il tablet verrà ripristinato e verranno quindi eliminati tutti i relativi dati."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Hai tentato di sbloccare il telefono senza riuscirci per <xliff:g id="NUMBER_0">%1$d</xliff:g> volte. Dopo altri <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativi falliti, il telefono verrà ripristinato e verranno quindi eliminati tutti i relativi dati."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Hai tentato di sbloccare il tablet senza riuscirci per <xliff:g id="NUMBER">%d</xliff:g> volte. Il tablet verrà ripristinato e verranno quindi eliminati tutti i relativi dati."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Hai tentato di sbloccare il telefono senza riuscirci per <xliff:g id="NUMBER">%d</xliff:g> volte. Il telefono verrà ripristinato e verranno quindi eliminati tutti i relativi dati."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Hai tentato di sbloccare il tablet senza riuscirci per <xliff:g id="NUMBER_0">%1$d</xliff:g> volte. Dopo altri <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativi falliti, questo utente verrà rimosso e verranno quindi eliminati tutti i dati associati."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Hai tentato di sbloccare il telefono senza riuscirci per <xliff:g id="NUMBER_0">%1$d</xliff:g> volte. Dopo altri <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativi falliti, questo utente verrà rimosso e verranno quindi eliminati tutti i dati associati."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Hai tentato di sbloccare il tablet senza riuscirci per <xliff:g id="NUMBER">%d</xliff:g> volte. Questo utente verrà rimosso e verranno quindi eliminati tutti i dati associati."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Hai tentato di sbloccare il telefono senza riuscirci per <xliff:g id="NUMBER">%d</xliff:g> volte. Questo utente verrà rimosso e verranno quindi eliminati tutti i dati associati."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Hai tentato di sbloccare il tablet senza riuscirci per <xliff:g id="NUMBER_0">%1$d</xliff:g> volte. Dopo altri <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativi falliti, il profilo di lavoro verrà rimosso e verranno quindi eliminati tutti i dati associati."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Hai tentato di sbloccare il telefono senza riuscirci per <xliff:g id="NUMBER_0">%1$d</xliff:g> volte. Dopo altri <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativi falliti, il profilo di lavoro verrà rimosso e verranno quindi eliminati tutti i dati associati."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Hai tentato di sbloccare il tablet senza riuscirci per <xliff:g id="NUMBER">%d</xliff:g> volte. Il profilo di lavoro verrà rimosso e verranno quindi eliminati tutti i dati associati."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Hai tentato di sbloccare il telefono senza riuscirci per <xliff:g id="NUMBER">%d</xliff:g> volte. Il profilo di lavoro verrà rimosso e verranno quindi eliminati tutti i dati associati."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"<xliff:g id="NUMBER_0">%1$d</xliff:g> tentativi errati di inserimento della sequenza di sblocco. Dopo altri <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativi falliti, ti verrà chiesto di sbloccare il tablet con un account email.\n\n Riprova tra <xliff:g id="NUMBER_2">%3$d</xliff:g> secondi."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"<xliff:g id="NUMBER_0">%1$d</xliff:g> tentativi errati di inserimento della sequenza di sblocco. Dopo altri <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativi falliti, ti verrà chiesto di sbloccare il telefono con un account email.\n\n Riprova tra <xliff:g id="NUMBER_2">%3$d</xliff:g> secondi."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Codice PIN della SIM errato. Devi contattare l\'operatore per sbloccare il dispositivo."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">Codice PIN della SIM errato. Hai ancora <xliff:g id="NUMBER_1">%d</xliff:g> tentativi a disposizione.</item>
-      <item quantity="one">Codice PIN della SIM errato. Hai ancora <xliff:g id="NUMBER_0">%d</xliff:g> tentativo a disposizione, dopodiché dovrai contattare l\'operatore per sbloccare il dispositivo.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM inutilizzabile. Contatta il tuo operatore."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">Codice PUK della SIM errato. Hai ancora <xliff:g id="NUMBER_1">%d</xliff:g> tentativi a disposizione prima che la SIM diventi definitivamente inutilizzabile.</item>
-      <item quantity="one">Codice PUK della SIM errato. Hai ancora <xliff:g id="NUMBER_0">%d</xliff:g> tentativo a disposizione prima che la SIM diventi definitivamente inutilizzabile.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Operazione con PIN della SIM non riuscita."</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Operazione con PUK della SIM non riuscita."</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Codice accettato."</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Nessun servizio."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Cambia metodo di immissione"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Modalità aereo"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Sequenza obbligatoria dopo il riavvio del dispositivo"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"PIN obbligatorio dopo il riavvio del dispositivo"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Password obbligatoria dopo il riavvio del dispositivo"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Sequenza obbligatoria per maggiore sicurezza"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"PIN obbligatorio per maggiore sicurezza"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Password obbligatoria per maggiore sicurezza"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Sequenza obbligatoria dopo aver cambiato profilo"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"PIN obbligatorio dopo aver cambiato profilo"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Password obbligatoria dopo aver cambiato profilo"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"L\'amministratore del dispositivo lo ha bloccato"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Il dispositivo è stato bloccato manualmente"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Il dispositivo non viene sbloccato da <xliff:g id="NUMBER_1">%d</xliff:g> ore. Conferma la sequenza.</item>
-      <item quantity="one">Il dispositivo non viene sbloccato da <xliff:g id="NUMBER_0">%d</xliff:g> ora. Conferma la sequenza.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Il dispositivo non viene sbloccato da <xliff:g id="NUMBER_1">%d</xliff:g> ore. Conferma il PIN.</item>
-      <item quantity="one">Il dispositivo non viene sbloccato da <xliff:g id="NUMBER_0">%d</xliff:g> ora. Conferma il PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Il dispositivo non viene sbloccato da <xliff:g id="NUMBER_1">%d</xliff:g> ore. Conferma la password.</item>
-      <item quantity="one">Il dispositivo non viene sbloccato da <xliff:g id="NUMBER_0">%d</xliff:g> ora. Conferma la password.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Non riconosciuto"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-iw/strings.xml b/packages/Keyguard/res/values-iw/strings.xml
deleted file mode 100644
index 8d1ada3..0000000
--- a/packages/Keyguard/res/values-iw/strings.xml
+++ /dev/null
@@ -1,142 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"מגן מקלדת"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"‏הקלד קוד PIN"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"‏הקלד קוד PUK של כרטיס SIM וקוד PIN חדש"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"‏קוד PUK של כרטיס SIM"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"‏מספר PIN חדש של כרטיס SIM"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"גע כדי להקליד את הסיסמה"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"הקלד סיסמה לביטול הנעילה"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"‏הקלד קוד PIN לביטול הנעילה"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"‏קוד PIN שגוי"</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"טעון"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"טוען"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"טעינה מהירה"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"טעינה איטית"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"חבר את המטען."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"לחץ על \'תפריט\' כדי לבטל את הנעילה."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"רשת נעולה"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"‏אין כרטיס SIM"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"‏אין כרטיס SIM בטאבלט."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"‏אין כרטיס SIM בטלפון."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"‏הכנס כרטיס SIM."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"‏כרטיס ה-SIM חסר או שלא ניתן לקרוא אותו. הכנס כרטיס SIM."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"‏לא ניתן להשתמש בכרטיס SIM זה."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"‏כרטיס ה-SIM שלך הושבת לצמיתות.\nפנה לספק השירות האלחוטי שלך לקבלת כרטיס SIM אחר."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"‏כרטיס ה-SIM נעול."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"‏כרטיס SIM נעול באמצעות PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"‏מבטל נעילה של כרטיס SIM…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"‏אזור עבור קוד PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"‏אזור עבור קוד PIN של SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"‏אזור עבור קוד PUK של SIM"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"ההתראה הבאה נקבעה לשעה <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"מחק"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"שכחת את הקו"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"קו ביטול נעילה שגוי"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"סיסמה שגויה"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"‏מספר PIN שגוי"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"נסה שוב בעוד <xliff:g id="NUMBER">%d</xliff:g> שניות."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"שרטט את קו ביטול הנעילה"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"‏הזן מספר PIN ל-SIM"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"‏הזן קוד אימות של SIM עבור \"<xliff:g id="CARRIER">%1$s</xliff:g>\""</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"‏הזן מספר PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"הזן את הסיסמה"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"‏כרטיס ה-SIM מושבת כעת. הזן קוד PUK כדי להמשיך. פנה אל הספק לפרטים."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"‏ה-SIM של \"<xliff:g id="CARRIER">%1$s</xliff:g>\" מושבת כעת. הזן קוד PUK כדי להמשיך. לפרטים, פנה לספק."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"‏הזן את קוד ה-PIN הרצוי"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"‏אשר את קוד ה-PIN הרצוי"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"‏מבטל נעילה של כרטיס SIM…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"‏הקלד מספר PIN שאורכו 4 עד 8 ספרות."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"‏קוד PUK צריך להיות בן 8 ספרות או יותר."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"‏הזן מחדש את קוד PUK הנכון. ניסיונות חוזרים ישביתו לצמיתות את כרטיס ה-SIM."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"‏קודי ה-PIN אינם תואמים"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"ניסיונות רבים מדי לשרטוט קו ביטול נעילה."</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"‏הקלדת מספר PIN שגוי <xliff:g id="NUMBER_0">%1$d</xliff:g> פעמים. \n\nנסה שוב בעוד <xliff:g id="NUMBER_1">%2$d</xliff:g> שניות."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"הקלדת סיסמה שגויה <xliff:g id="NUMBER_0">%1$d</xliff:g> פעמים.\n\nנסה שוב בעוד <xliff:g id="NUMBER_1">%2$d</xliff:g> שניות."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"שרטטת את קו ביטול הנעילה באופן שגוי <xliff:g id="NUMBER_0">%1$d</xliff:g> פעמים. \n\nנסה שוב בעוד <xliff:g id="NUMBER_1">%2$d</xliff:g> שניות."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"ניסית לבטל את נעילת הטאבלט <xliff:g id="NUMBER_0">%1$d</xliff:g> פעמים באופן שגוי. לאחר <xliff:g id="NUMBER_1">%2$d</xliff:g> ניסיונות כושלים נוספים, טאבלט זה יאופס וכתוצאה מכך כל הנתונים שלו יימחקו."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"ניסית לבטל את נעילת הטלפון <xliff:g id="NUMBER_0">%1$d</xliff:g> פעמים באופן שגוי. לאחר <xliff:g id="NUMBER_1">%2$d</xliff:g> ניסיונות כושלים נוספים, טלפון זה יאופס וכתוצאה מכך כל הנתונים שלו יימחקו."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"ניסית לבטל את נעילת הטאבלט <xliff:g id="NUMBER">%d</xliff:g> פעמים באופן שגוי. הטאבלט יאופס וכתוצאה מכך כל הנתונים שלו יימחקו."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"ניסית לבטל את נעילת הטלפון <xliff:g id="NUMBER">%d</xliff:g> פעמים באופן שגוי. הטלפון יאופס וכתוצאה מכך כל הנתונים שלו יימחקו."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"ניסית לבטל את נעילת הטאבלט <xliff:g id="NUMBER_0">%1$d</xliff:g> פעמים באופן שגוי. לאחר <xliff:g id="NUMBER_1">%2$d</xliff:g> ניסיונות כושלים נוספים, משתמש זה יוסר וכתוצאה מכך כל נתוני המשתמש יימחקו."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"ניסית לבטל את נעילת הטלפון <xliff:g id="NUMBER_0">%1$d</xliff:g> פעמים באופן שגוי. לאחר <xliff:g id="NUMBER_1">%2$d</xliff:g> ניסיונות כושלים נוספים, משתמש זה יוסר וכתוצאה מכך כל נתוני המשתמש יימחקו."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"ניסית לבטל את נעילת הטאבלט <xliff:g id="NUMBER">%d</xliff:g> פעמים באופן שגוי. משתמש זה יוסר וכתוצאה מכך כל נתוני המשתמש יימחקו."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"ניסית לבטל את נעילת הטלפון <xliff:g id="NUMBER">%d</xliff:g> פעמים באופן שגוי. משתמש זה יוסר וכתוצאה מכך כל נתוני המשתמש יימחקו."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"ניסית לבטל את נעילת הטאבלט <xliff:g id="NUMBER_0">%1$d</xliff:g> פעמים באופן שגוי. לאחר <xliff:g id="NUMBER_1">%2$d</xliff:g> ניסיונות כושלים נוספים, פרופיל העבודה יוסר וכתוצאה מכך כל נתוני הפרופיל יימחקו."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"ניסית לבטל את נעילת הטלפון <xliff:g id="NUMBER_0">%1$d</xliff:g> פעמים באופן שגוי. לאחר <xliff:g id="NUMBER_1">%2$d</xliff:g> ניסיונות כושלים נוספים, פרופיל העבודה יוסר וכתוצאה מכך כל נתוני הפרופיל יימחקו."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"ניסית לבטל את נעילת הטאבלט <xliff:g id="NUMBER">%d</xliff:g> פעמים באופן שגוי. פרופיל העבודה יוסר וכתוצאה מכך כל נתוני הפרופיל יימחקו."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"ניסית לבטל את נעילת הטלפון <xliff:g id="NUMBER">%d</xliff:g> פעמים באופן שגוי. פרופיל העבודה יוסר וכתוצאה מכך כל נתוני הפרופיל יימחקו."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"שרטטת את קו ביטול הנעילה באופן שגוי <xliff:g id="NUMBER_0">%1$d</xliff:g> פעמים. לאחר <xliff:g id="NUMBER_1">%2$d</xliff:g> ניסיונות כושלים נוספים, תתבקש לבטל את נעילת הטאבלט באמצעות חשבון אימייל‏.\n\nנסה שוב בעוד <xliff:g id="NUMBER_2">%3$d</xliff:g> שניות."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"שרטטת את קו ביטול הנעילה באופן שגוי <xliff:g id="NUMBER_0">%1$d</xliff:g> פעמים. לאחר <xliff:g id="NUMBER_1">%2$d</xliff:g> ניסיונות כושלים נוספים, תתבקש לבטל את נעילת הטלפון באמצעות חשבון אימייל‏.\n\nנסה שוב בעוד <xliff:g id="NUMBER_2">%3$d</xliff:g> שניות."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"‏מספר PIN שגוי של כרטיס ה-SIM. עליך ליצור כעת קשר עם הספק על מנת לבטל את נעילת המכשיר."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="two">‏קוד PIN שגוי של כרטיס SIM. נותרו לך <xliff:g id="NUMBER_1">%d</xliff:g> ניסיונות.</item>
-      <item quantity="many">‏קוד PIN שגוי של כרטיס SIM. נותרו לך <xliff:g id="NUMBER_1">%d</xliff:g> ניסיונות.</item>
-      <item quantity="other">‏קוד PIN שגוי של כרטיס SIM. נותרו לך <xliff:g id="NUMBER_1">%d</xliff:g> ניסיונות.</item>
-      <item quantity="one">‏קוד PIN שגוי של כרטיס SIM. נותר לך ניסיון <xliff:g id="NUMBER_0">%d</xliff:g> לפני שיהיה עליך ליצור קשר עם הספק כדי לבטל את נעילת המכשיר.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"‏לא ניתן להשתמש בכרטיס ה-SIM. צור קשר עם הספק."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="two">‏קוד PUK שגוי של כרטיס SIM. נותרו לך <xliff:g id="NUMBER_1">%d</xliff:g> ניסיונות לפני שכרטיס ה-SIM יינעל לצמיתות.</item>
-      <item quantity="many">‏קוד PUK שגוי של כרטיס SIM. נותרו לך <xliff:g id="NUMBER_1">%d</xliff:g> ניסיונות לפני שכרטיס ה-SIM יינעל לצמיתות.</item>
-      <item quantity="other">‏קוד PUK שגוי של כרטיס SIM. נותרו לך <xliff:g id="NUMBER_1">%d</xliff:g> ניסיונות לפני שכרטיס ה-SIM יינעל לצמיתות.</item>
-      <item quantity="one">‏קוד PUK שגוי של כרטיס SIM. נותר לך ניסיון <xliff:g id="NUMBER_0">%d</xliff:g> לפני שכרטיס ה-SIM יינעל לצמיתות.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"‏פעולת מספר ה-PIN של כרטיס ה-SIM נכשלה!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"‏פעולת קוד ה-PUK של כרטיס ה-SIM נכשלה!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"הקוד התקבל!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"אין קליטה."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"החלפת שיטת קלט"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"מצב טיסה"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"יש להזין את קו ביטול הנעילה לאחר הפעלה מחדש של המכשיר"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"‏יש להזין PIN לאחר הפעלה מחדש של המכשיר"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"יש להזין סיסמה לאחר הפעלה מחדש של המכשיר"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"יש להזין את קו ביטול הנעילה על מנת להגביר את רמת האבטחה"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"‏יש להזין PIN על מנת להגביר את רמת האבטחה"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"יש להזין סיסמה על מנת להגביר את רמת האבטחה"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"יש להזין את קו ביטול הנעילה בעת החלפת פרופילים"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"‏יש להזין את ה-PIN בעת החלפת פרופילים"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"יש להזין את הסיסמה בעת החלפת פרופילים"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"מנהל המכשיר נעל אותו"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"המכשיר ננעל באופן ידני"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="two">נעילת המכשיר לא בוטלה במשך <xliff:g id="NUMBER_1">%d</xliff:g> שעות. אשר את קו ביטול הנעילה.</item>
-      <item quantity="many">נעילת המכשיר לא בוטלה במשך <xliff:g id="NUMBER_1">%d</xliff:g> שעות. אשר את קו ביטול הנעילה.</item>
-      <item quantity="other">נעילת המכשיר לא בוטלה במשך <xliff:g id="NUMBER_1">%d</xliff:g> שעות. אשר את קו ביטול הנעילה.</item>
-      <item quantity="one">נעילת המכשיר לא בוטלה במשך שעה <xliff:g id="NUMBER_0">%d</xliff:g>. אשר את קו ביטול הנעילה.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="two">‏נעילת המכשיר לא בוטלה במשך <xliff:g id="NUMBER_1">%d</xliff:g> שעות. אשר את ה-PIN.</item>
-      <item quantity="many">‏נעילת המכשיר לא בוטלה במשך <xliff:g id="NUMBER_1">%d</xliff:g> שעות. אשר את ה-PIN.</item>
-      <item quantity="other">‏נעילת המכשיר לא בוטלה במשך <xliff:g id="NUMBER_1">%d</xliff:g> שעות. אשר את ה-PIN.</item>
-      <item quantity="one">‏נעילת המכשיר לא בוטלה במשך שעה <xliff:g id="NUMBER_0">%d</xliff:g>. אשר את ה-PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="two">נעילת המכשיר לא בוטלה במשך <xliff:g id="NUMBER_1">%d</xliff:g> שעות. אשר את הסיסמה.</item>
-      <item quantity="many">נעילת המכשיר לא בוטלה במשך <xliff:g id="NUMBER_1">%d</xliff:g> שעות. אשר את הסיסמה.</item>
-      <item quantity="other">נעילת המכשיר לא בוטלה במשך <xliff:g id="NUMBER_1">%d</xliff:g> שעות. אשר את הסיסמה.</item>
-      <item quantity="one">נעילת המכשיר לא בוטלה במשך שעה <xliff:g id="NUMBER_0">%d</xliff:g>. אשר את הסיסמה.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"לא זוהתה"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-ja/strings.xml b/packages/Keyguard/res/values-ja/strings.xml
deleted file mode 100644
index c4b4c98..0000000
--- a/packages/Keyguard/res/values-ja/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"キーガード"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"PINコードを入力"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"PUKと新しいPINコードを入力"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM PUKコード"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"新しいSIM PINコード"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"タップしてパスワードを入力"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"ロックを解除するにはパスワードを入力"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"ロックを解除するにはPINを入力"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"PINコードが正しくありません。"</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"充電完了"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"充電中"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"急速充電中"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"低速充電中"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"充電してください。"</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"メニューからロックを解除できます。"</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"ネットワークがロックされました"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"SIMカードが挿入されていません"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"タブレット内にSIMカードがありません。"</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"SIMカードが端末に挿入されていません。"</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"SIMカードを挿入してください。"</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIMカードが見つからないか読み取れません。SIMカードを挿入してください。"</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"SIMカードは使用できません。"</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"お使いのSIMカードは永久に無効となっています。\nワイヤレスサービスプロバイダに問い合わせて新しいSIMカードを入手してください。"</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIMカードはロックされています。"</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIMカードはPUKでロックされています。"</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"SIMカードをロック解除しています…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PINエリア"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM PINエリア"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM PUKエリア"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"次のアラームは<xliff:g id="ALARM">%1$s</xliff:g>に設定されました"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"削除"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"パターンを忘れた場合"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"パターンが正しくありません"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"パスワードが正しくありません"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"PINが正しくありません"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"<xliff:g id="NUMBER">%d</xliff:g>秒後にもう一度お試しください。"</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"パターンを入力"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"SIM PINを入力"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"「<xliff:g id="CARRIER">%1$s</xliff:g>」のSIM PINを入力します"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"PINを入力"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"パスワードを入力"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIMが無効になりました。続行するにはPUKコードを入力してください。詳しくは携帯通信会社にお問い合わせください。"</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM「<xliff:g id="CARRIER">%1$s</xliff:g>」は現在無効になっています。処理を続行するにはPUKコードを入力します。詳しくは携帯通信会社にお問い合わせください。"</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"希望のPINコードを入力してください"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"希望のPINコードを確認してください"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"SIMカードのロック解除中…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"PINは4~8桁の数字で入力してください。"</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUKコードは8桁以上の番号です。"</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"正しいPUKコードを再入力してください。誤入力を繰り返すと、SIMが永久に無効になるおそれがあります。"</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PINコードが一致しません"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"パターンの入力を所定の回数以上間違えました。"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"PINの入力を<xliff:g id="NUMBER_0">%1$d</xliff:g>回間違えました。\n\n<xliff:g id="NUMBER_1">%2$d</xliff:g>秒後にもう一度お試しください。"</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"パスワードの入力を<xliff:g id="NUMBER_0">%1$d</xliff:g>回間違えました。\n\n<xliff:g id="NUMBER_1">%2$d</xliff:g>秒後にもう一度お試しください。"</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"ロック解除パターンの入力を<xliff:g id="NUMBER_0">%1$d</xliff:g>回間違えました。\n\n<xliff:g id="NUMBER_1">%2$d</xliff:g>秒後にもう一度お試しください。"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"タブレットのロック解除に<xliff:g id="NUMBER_0">%1$d</xliff:g>回失敗しました。あと<xliff:g id="NUMBER_1">%2$d</xliff:g>回失敗すると、このタブレットはリセットされ、データがすべて削除されます。"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"携帯電話のロック解除に<xliff:g id="NUMBER_0">%1$d</xliff:g>回失敗しました。あと<xliff:g id="NUMBER_1">%2$d</xliff:g>回失敗すると、この携帯電話はリセットされ、データがすべて削除されます。"</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"タブレットのロック解除に<xliff:g id="NUMBER">%d</xliff:g>回失敗しました。このタブレットはリセットされ、データがすべて削除されます。"</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"携帯電話のロック解除に<xliff:g id="NUMBER">%d</xliff:g>回失敗しました。この携帯電話はリセットされ、データがすべて削除されます。"</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"タブレットのロック解除に<xliff:g id="NUMBER_0">%1$d</xliff:g>回失敗しました。あと<xliff:g id="NUMBER_1">%2$d</xliff:g>回失敗すると、このユーザーは削除され、ユーザーのデータがすべて削除されます。"</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"携帯電話のロック解除に<xliff:g id="NUMBER_0">%1$d</xliff:g>回失敗しました。あと<xliff:g id="NUMBER_1">%2$d</xliff:g>回失敗すると、このユーザーは削除され、ユーザーのデータがすべて削除されます。"</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"タブレットのロック解除に<xliff:g id="NUMBER">%d</xliff:g>回失敗しました。このユーザーは削除され、ユーザーのデータがすべて削除されます。"</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"携帯電話のロック解除に<xliff:g id="NUMBER">%d</xliff:g>回失敗しました。このユーザーは削除され、ユーザーのデータがすべて削除されます。"</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"タブレットのロック解除に<xliff:g id="NUMBER_0">%1$d</xliff:g>回失敗しました。あと<xliff:g id="NUMBER_1">%2$d</xliff:g>回失敗すると、仕事用プロファイルが削除され、プロファイルのデータがすべて削除されます。"</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"スマートフォンのロック解除に<xliff:g id="NUMBER_0">%1$d</xliff:g>回失敗しました。あと<xliff:g id="NUMBER_1">%2$d</xliff:g>回失敗すると、仕事用プロファイルが削除され、プロファイルのデータがすべて削除されます。"</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"タブレットのロック解除に<xliff:g id="NUMBER">%d</xliff:g>回失敗しました。仕事用プロファイルが削除され、プロファイルのデータがすべて削除されます。"</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"スマートフォンのロック解除に<xliff:g id="NUMBER">%d</xliff:g>回失敗しました。仕事用プロファイルが削除され、プロファイルのデータがすべて削除されます。"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"ロック解除パターンの入力を<xliff:g id="NUMBER_0">%1$d</xliff:g>回間違えました。あと<xliff:g id="NUMBER_1">%2$d</xliff:g>回間違えると、タブレットのロック解除にメールアカウントが必要になります。\n\n<xliff:g id="NUMBER_2">%3$d</xliff:g>秒後にもう一度お試しください。"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"ロック解除パターンの入力を<xliff:g id="NUMBER_0">%1$d</xliff:g>回間違えました。あと<xliff:g id="NUMBER_1">%2$d</xliff:g>回間違えると、モバイル端末のロック解除にメールアカウントが必要になります。\n\n<xliff:g id="NUMBER_2">%3$d</xliff:g>秒後にもう一度お試しください。"</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"SIM PINコードが無効です。お使いの端末をロック解除するには携帯通信会社にお問い合わせいただく必要があります。"</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">SIM PINコードが無効です。入力できるのはあと<xliff:g id="NUMBER_1">%d</xliff:g>回です。</item>
-      <item quantity="one">SIM PINコードが無効です。入力できるのはあと<xliff:g id="NUMBER_0">%d</xliff:g>回です。この回数を超えた場合は、携帯通信会社にお問い合わせください。</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIMは使用できません。携帯通信会社にお問い合わせください。"</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">SIM PUKコードが無効です。入力できるのはあと<xliff:g id="NUMBER_1">%d</xliff:g>回です。この回数を超えるとSIMは完全に使用できなくなります。</item>
-      <item quantity="one">SIM PUKコードが無効です。入力できるのはあと<xliff:g id="NUMBER_0">%d</xliff:g>回です。この回数を超えるとSIMは完全に使用できなくなります。</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"SIM PIN操作に失敗しました。"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"SIM PUK操作に失敗しました。"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"コードが承認されました。"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"通信サービスはありません。"</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"入力方法の切り替え"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"機内モード"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"端末の再起動後はパターンの入力が必要となります"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"端末の再起動後は PIN の入力が必要となります"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"端末の再起動後はパスワードの入力が必要となります"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"セキュリティを強化するにはパターンが必要です"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"セキュリティを強化するには PIN が必要です"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"セキュリティを強化するにはパスワードが必要です"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"プロファイルを切り替えるにはパターンが必要です"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"プロファイルを切り替えるには PIN が必要です"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"プロファイルを切り替えるにはパスワードが必要です"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"端末管理アプリが端末をロックしました"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"端末は手動でロックされました"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">端末のロックが<xliff:g id="NUMBER_1">%d</xliff:g>時間、解除されていません。パターンを確認してください。</item>
-      <item quantity="one">端末のロックが<xliff:g id="NUMBER_0">%d</xliff:g>時間、解除されていません。パターンを確認してください。</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">端末のロックが<xliff:g id="NUMBER_1">%d</xliff:g>時間、解除されていません。PINを確認してください。</item>
-      <item quantity="one">端末のロックが<xliff:g id="NUMBER_0">%d</xliff:g>時間、解除されていません。PINを確認してください。</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">端末のロックが<xliff:g id="NUMBER_1">%d</xliff:g>時間、解除されていません。パスワードを確認してください。</item>
-      <item quantity="one">端末のロックが<xliff:g id="NUMBER_0">%d</xliff:g>時間、解除されていません。パスワードを確認してください。</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"認識されませんでした"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-ka/strings.xml b/packages/Keyguard/res/values-ka/strings.xml
deleted file mode 100644
index 658194ff..0000000
--- a/packages/Keyguard/res/values-ka/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Keyguard"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"აკრიფეთ PIN კოდი"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"დაბეჭდეთ SIM-ის PUK კოდი და ახალი PIN კოდი"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM PUK კოდი"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"SIM-ის ახალი PIN-ის კოდი"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384">"შეეხეთ "<font size="17">"-ს პაროლის"</font>" დასაბეჭდად."</string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"განსაბლოკად აკრიფეთ პაროლი"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"განსაბლოკად აკრიფეთ PIN კოდი"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"არასწორი PIN კოდი."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"დამუხტულია"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"მიმდინარეობს დატენვა"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"იმუხტება სწრაფად"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"იმუხტება ნელა"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"შეაერთეთ დამტენი."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"განბლოკვისთვის დააჭირეთ მენიუს."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"ქსელი ჩაკეტილია"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"SIM ბარათი არ არის"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"ტაბლეტში არ დევს SIM ბარათი."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"არ არის SIM ბარათი ტელეფონში."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"ჩადეთ SIM ბარათი."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM ბარათი არ არის ან არ იკითხება. ჩადეთ SIM ბარათი."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"არამოხმარებადი SIM ბარათი."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"თქვენი SIM ბარათი გამუდმებით გამორთული იყო.\n დაუკავშირდით თქვენი უკაბელო სერვისის პროვაიდერს სხვა SIM ბარათისთვის."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM ბარათი დაბლოკილია."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM ბარათი დაბლოკილია PUK კოდით."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"მიმდინარეობს SIM ბარათის განბლოკვა…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN-ის არე"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM-ის PIN-ის არე"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM-ის PUK-ის არე"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"შემდეგი მაღვიძარა დაყენებულია <xliff:g id="ALARM">%1$s</xliff:g>-ზე"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"წაშლა"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"შეყვანა"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"დაგავიწყდათ ნიმუში"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"არასწორი ნიმუში"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"არასწორი პაროლი"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"არასწორი PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"კიდევ სცადეთ <xliff:g id="NUMBER">%d</xliff:g> წამში."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"დახატეთ თქვენი ნიმუში."</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"SIM PIN-ის შეყვანა"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"შეიყვანეთ \"<xliff:g id="CARRIER">%1$s</xliff:g>\" -სათვის SIM-ის PIN"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"შეიყვანეთ PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"პაროლის შეყვანა"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM ამჟამად დეაქტივირებულია. გასაგრძელებლად შეიყვანეთ PUK კოდი. დეტალებისთვის მიმართეთ მობილურ ოპერატორს."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"\"<xliff:g id="CARRIER">%1$s</xliff:g>\" -ის SIM ახლა გამორთულია. გაგრძელებისათვის, შეიყვანეთ PUK კოდი. დეტალებისათვის მიმართეთ თქვენს პროვაიდერს."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"სასურველი PIN კოდის შეყვანა"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"სასურველი PIN კოდის დადასტურება"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"SIM ბარათის განბლოკვა…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"აკრიფეთ PIN, რომელიც შედგება 4-დან 8 ციფრამდე."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK კოდი უნდა იყოს რვა ან მეტი ციფრისგან შემდგარი."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"ხელახლა შეიყვანეთ სწორი PUK კოდი. რამდენიმე წარუმატებელი მცდელობა გამოიწვევს SIM ბარათის დაბლოკვას."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN კოდები არ ემთხვევა"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"ნახატი ნიმუშის ძალიან ბევრი მცდელობა"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"თქვენ <xliff:g id="NUMBER_0">%1$d</xliff:g>-ჯერ არასწორად შეიყვანეთ PIN კოდი. \n\nსცადეთ ხელახლა <xliff:g id="NUMBER_1">%2$d</xliff:g> წამში."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"თქვენ <xliff:g id="NUMBER_0">%1$d</xliff:g>-ჯერ არასწორად დაბეჭდეთ თქვენი პაროლი. \n\nხელახლა სცადეთ <xliff:g id="NUMBER_1">%2$d</xliff:g> წამში."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"თქვენ <xliff:g id="NUMBER_0">%1$d</xliff:g>-ჯერ დახატეთ განბლოკვის ნიმუში. \n\nსცადეთ ხელახლა <xliff:g id="NUMBER_1">%2$d</xliff:g> წამში."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"თქვენ არასწორად სცადეთ ტაბლეტის განბლოკვა <xliff:g id="NUMBER_0">%1$d</xliff:g> ჯერ. კიდევ <xliff:g id="NUMBER_1">%2$d</xliff:g> წარუმატებელი ცდის შემდეგ, ეს ტაბლეტი გადაიტვირთება, რაც წაშლის მის მთლიან მონაცემს."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"თქვენ არასწორად სცადეთ ტელეფონის განბლოკვა <xliff:g id="NUMBER_0">%1$d</xliff:g> ჯერ. კიდევ <xliff:g id="NUMBER_1">%2$d</xliff:g> წარუმატებელი მცდელობის შემდეგ, ეს ტელეფონი გადაიტვირთება, რაც წაშლის მის მთლიან მონაცემს."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"თქვენ არასწორად სცადეთ ტაბლეტის განბლოკვა <xliff:g id="NUMBER">%d</xliff:g> ჯერ. ეს ტაბლეტი გადაიტვირთება, რაც წაშლის მის მთლიან მონაცემს."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"თქვენ არასწორად სცადეთ ტელეფონის განბლოკვა <xliff:g id="NUMBER">%d</xliff:g> ჯერ. ეს ტელეფონი გადაიტვირთება, რაც წაშლის მის მთლიან მონაცემს."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"თქვენ არასწორად სცადეთ ტაბლეტის განბლოკვა <xliff:g id="NUMBER_0">%1$d</xliff:g> ჯერ. კიდევ <xliff:g id="NUMBER_1">%2$d</xliff:g> წარუმატებელი მცდელობის შემდეგ, ამოიშლება ეს მომხმარებელი და წაიშლება მომხმარებლის მთლიანი მონაცემი."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"თქვენ არასწორად სცადეთ ტელეფონის განბლოკვა <xliff:g id="NUMBER_0">%1$d</xliff:g> ჯერ. კიდევ <xliff:g id="NUMBER_1">%2$d</xliff:g> წარუმატებელი მცდელობის შემდეგ, ამოიშლება ეს მომხმარებელი და წაიშლება მომხმარებლის მთლიანი მონაცემი."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"თქვენ არასწორად სცადეთ ტაბლეტის განბლოკვა <xliff:g id="NUMBER">%d</xliff:g> ჯერ. ეს მომხმარებელი ამოიშლება, რაც წაშლის მომხმარებლის მთლიან მონაცემს."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"თქვენ არასწორად სცადეთ ტელეფონის განბლოკვა <xliff:g id="NUMBER">%d</xliff:g> ჯერ. ეს მომხმარებელი ამოიშლება, რაც წაშლის მომხმარებლის მთლიან მონაცემს."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"თქვენ არასწორად სცადეთ ტაბლეტის განბლოკვა <xliff:g id="NUMBER_0">%1$d</xliff:g> ჯერ. კიდევ <xliff:g id="NUMBER_1">%2$d</xliff:g> წარუმატებელი მცდელობის შემდეგ, ამოიშლება სამუშაო პროფილი და წაიშლება პროფილის მთლიანი მონაცემი."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"თქვენ არასწორად სცადეთ ტელეფონის განბლოკვა <xliff:g id="NUMBER_0">%1$d</xliff:g> ჯერ. კიდევ <xliff:g id="NUMBER_1">%2$d</xliff:g> წარუმატებელი მცდელობის შემდეგ, ამოიშლება სამუშაო პროფილი და წაიშლება მთლიანი პროფილის მონაცემი."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"თქვენ არასწორად სცადეთ ტაბლეტის განბლოკვა <xliff:g id="NUMBER">%d</xliff:g> ჯერ. სამუშაო პროფილი ამოიშლება, რაც წაშლის პროფილის მთლიან მონაცემს."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"თქვენ არასწორად სცადეთ ტელეფონის განბლოკვა <xliff:g id="NUMBER">%d</xliff:g> ჯერ. სამუშაო პროფილი ამოიშლება, რაც წაშლის პროფილის მთლიან მონაცემს."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"თქვენ არასწორად დახატეთ თქვენი განბლოკვის ნიმუში <xliff:g id="NUMBER_0">%1$d</xliff:g> ჯერ. კიდევ <xliff:g id="NUMBER_1">%2$d</xliff:g> წარუმატებელი ცდის შემდეგ მოგთხოვთ ტაბლეტის განბლოკვას ელფოსტის ანგარიშის გამოყენებით.\n\n ხელახლა სცადეთ <xliff:g id="NUMBER_2">%3$d</xliff:g> წამში."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"თქვენ არასწორად დახატეთ თქვენი განბლოკვის ნიმუში <xliff:g id="NUMBER_0">%1$d</xliff:g>-ჯერ. კიდევ <xliff:g id="NUMBER_1">%2$d</xliff:g> წარუმატებელი ცდის შემდეგ, დაგჭირდებათ თქვენი ტელეფონის განბლოკვა ელფოსტის ანგარიშის გამოყენებით.\n\n ხელახლა სცადეთ <xliff:g id="NUMBER_2">%3$d</xliff:g> წამში."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"SIM-ის არასწორი PIN კოდი. თქვენ ახლა მოგიწევთ მოწყობილობის განსაბლოკად მიმართოთ ოპერატორს."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">SIM-ის PIN კოდი არასწორია. თქვენ დაგრჩათ <xliff:g id="NUMBER_1">%d</xliff:g> მცდელობა.</item>
-      <item quantity="one">SIM-ის PIN კოდი არასწორია. თქვენ დაგრჩათ <xliff:g id="NUMBER_0">%d</xliff:g> მცდელობა, სანამ მოგიწევთ თქვენი მოწყობილობის განსაბლოკად ოპერატორთან დაკავშირება.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM გამოუსადეგარია. დაუკავშირდით ოპერატორს."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">SIM-ის PUK კოდი არასწორია. თქვენ დაგრჩათ <xliff:g id="NUMBER_1">%d</xliff:g> მცდელობა, სანამ SIM სამუდამოდ გამოუსადეგარი გახდება.</item>
-      <item quantity="one">SIM-ის PUK კოდი არასწორია. თქვენ დაგრჩათ <xliff:g id="NUMBER_0">%d</xliff:g> მცდელობა, სანამ SIM სამუდამოდ გამოუსადეგარი გახდება.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"SIM PIN ოპერაცია ჩაიშალა!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"SIM PUK ოპერაცია ჩაიშალა!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"კოდი მიღებულია!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"არ არის სერვისი."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"შეყვანის მეთოდის გადართვა"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"თვითმფრინავის რეჟიმი"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"მოწყობილობის გადატვირთვის შემდეგ საჭიროა ნიმუშის შეყვანა"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"მოწყობილობის გადატვირთვის შემდეგ საჭიროა PIN-კოდის შეყვანა"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"მოწყობილობის გადატვირთვის შემდეგ საჭიროა პაროლის შეყვანა"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"დამატებითი უსაფრთხოებისთვის, საჭიროა ნიმუშის შეყვანა"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"დამატებითი უსაფრთხოებისთვის, საჭიროა PIN-კოდის შეყვანა"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"დამატებითი უსაფრთხოებისთვის, საჭიროა პაროლის შეყვანა"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"პროფილების გადართვისას საჭიროა ნიმუშის შეყვანა"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"პროფილების გადართვისას საჭიროა PIN-კოდის შეყვანა"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"პროფილების გადართვისას საჭიროა პაროლის შეყვანა"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"მოწყობილობა ადმინისტრატორის მიერ ჩაიკეტა"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"მოწყობილობა ხელით ჩაიკეტა"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">მოწყობილობა არ განბლოკილა <xliff:g id="NUMBER_1">%d</xliff:g> საათის განმავლობაში. დაადასტურეთ ნიმუში.</item>
-      <item quantity="one">მოწყობილობა არ განბლოკილა <xliff:g id="NUMBER_0">%d</xliff:g> საათის განმავლობაში. დაადასტურეთ ნიმუში.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">მოწყობილობა არ განბლოკილა <xliff:g id="NUMBER_1">%d</xliff:g> საათის განმავლობაში. დაადასტურეთ PIN-კოდი.</item>
-      <item quantity="one">მოწყობილობა არ განბლოკილა <xliff:g id="NUMBER_0">%d</xliff:g> საათის განმავლობაში. დაადასტურეთ PIN-კოდი.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">მოწყობილობა არ განბლოკილა <xliff:g id="NUMBER_1">%d</xliff:g> საათის განმავლობაში. დაადასტურეთ პაროლი.</item>
-      <item quantity="one">მოწყობილობა არ განბლოკილა <xliff:g id="NUMBER_0">%d</xliff:g> საათის განმავლობაში. დაადასტურეთ პაროლი.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"არ არის ამოცნობილი"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-kk/strings.xml b/packages/Keyguard/res/values-kk/strings.xml
deleted file mode 100644
index 2eb3948..0000000
--- a/packages/Keyguard/res/values-kk/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Пернелер қорғағышы"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"PIN кодын теріңіз"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"SIM PUK және жаңа PIN кодтарын теріңіз."</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM PUK коды"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Жаңа SIM PIN коды"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Құпия сөзді теру үшін түртіңіз"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Бекітпесін ашу үшін құпия сөзді теріңіз"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Бекітпесін ашу үшін PIN кодын теріңіз"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Қате PIN код"</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Зарядталған"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Зарядтауда"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Тез зарядталуда"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Баяу зарядталуда"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Зарядтау құрылғысын жалғаңыз."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Ашу үшін мәзірді басыңыз."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Желі бекітулі."</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"SIM картасы енгізілмеген."</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Планшетте SIM картасы жоқ."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Телефонда SIM картасы жоқ."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"SIM картасын енгізіңіз."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM картасы енгізілмеген немесе ашылмайды. SIM картасына енгізіңіз."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Қолданыстан шыққан SIM картасы."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"SIM картаңыз істен шықты. \n Сымсыз байланыс жабдықтау қызметіне хабарласып, басқа SIM картасын алыңыз."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM картасы бекітулі."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM картасының PUK коды бекітілген."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"SIM картасының бекітпесін ашуда…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN аумағы"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM PIN аумағы"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM PUK аумағы"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Келесі дабыл <xliff:g id="ALARM">%1$s</xliff:g> уақытына орнатылған"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Жою"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Енгізу"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Кескінді ұмытып қалу"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Қате өрнек"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Қате кілтсөз"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Қате PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"<xliff:g id="NUMBER">%d</xliff:g> секундтан кейін қайта әрекеттеніңіз."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Кескініңізді салыңыз"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"SIM PIN кодын енгізіңіз"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"«<xliff:g id="CARRIER">%1$s</xliff:g>» үшін SIM PIN кодын енгізіңіз"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"PIN кодын енгізіңіз"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Кілтсөзді енгізу"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM картасы істен шықты. Жалғастыру үшін PUK кодын енгізіңіз. Толығырақ ақпаратты жабдықтаушыдан алыңыз."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"«<xliff:g id="CARRIER">%1$s</xliff:g>» SIM картасы қазір өшірілген. Жалғастыру үшін PUK кодын енгізіңіз. Мәліметтер алу үшін операторға хабарласыңыз."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Қажетті PIN кодын енгізіңіз"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Қажетті PIN кодты растау"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"SIM картаны ашу…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"4-8 сандардан тұратын PIN кодты теріңіз."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK коды 8 немесе одан көп сандардан тұрады."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Дұрыс PUK кодын қайта енгізіңіз. Әрекеттерді қайталау SIM картасының істен шығуына себеп болады."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN коды сәйкес емес."</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Тым көп кескін әрекеттері"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"PIN кодты <xliff:g id="NUMBER_0">%1$d</xliff:g> рет қате тердіңіз. \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> секундтан кейін қайталаңыз."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Құпия сөзді <xliff:g id="NUMBER_0">%1$d</xliff:g> рет қате тердіңіз. \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> секундтан кейін қайталаңыз."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Құлыпты ашу өрнегін <xliff:g id="NUMBER_0">%1$d</xliff:g> рет қате салдыңыз. \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> секундтан кейін әрекетті қайталаңыз."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Планшет бекітпесін ашуға <xliff:g id="NUMBER_0">%1$d</xliff:g> рет дұрыс емес әрекет жасадыңыз. Тағы <xliff:g id="NUMBER_1">%2$d</xliff:g> сәтсіз әрекеттен кейін осы планшет қалпына келтіріліп, оның бүкіл деректері жойылады."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Телефон бекітпесін ашуға <xliff:g id="NUMBER_0">%1$d</xliff:g> рет дұрыс емес әрекет жасадыңыз. Тағы <xliff:g id="NUMBER_1">%2$d</xliff:g> сәтсіз әрекеттен кейін осы телефон қалпына келтіріліп, оның бүкіл деректері жойылады."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Планшет бекітпесін ашуға <xliff:g id="NUMBER">%d</xliff:g> рет дұрыс емес әрекет жасадыңыз. Осы планшет қалпына келтіріліп, оның бүкіл деректері жойылады."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Телефон бекітпесін ашуға <xliff:g id="NUMBER">%d</xliff:g> рет дұрыс емес әрекет жасадыңыз. Осы телефон қалпына келтіріліп, оның бүкіл деректері жойылады."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Планшет бекітпесін ашуға <xliff:g id="NUMBER_0">%1$d</xliff:g> рет дұрыс емес әрекет жасадыңыз. Тағы <xliff:g id="NUMBER_1">%2$d</xliff:g> сәтсіз әрекеттен кейін осы пайдаланушы жойылып, бүкіл пайдаланушы деректері жойылады."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Телефон бекітпесін ашуға <xliff:g id="NUMBER_0">%1$d</xliff:g> рет дұрыс емес әрекет жасадыңыз. Тағы <xliff:g id="NUMBER_1">%2$d</xliff:g> сәтсіз әрекеттен кейін осы пайдаланушы жойылып, бүкіл пайдаланушы деректері жойылады."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Планшет бекітпесін ашуға <xliff:g id="NUMBER">%d</xliff:g> рет дұрыс емес әрекет жасадыңыз. Осы пайдаланушы жойылып, бүкіл пайдаланушы деректері жойылады."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Телефон бекітпесін ашуға <xliff:g id="NUMBER">%d</xliff:g> рет дұрыс емес әрекет жасадыңыз. Осы пайдаланушы жойылып, бүкіл пайдаланушы деректері жойылады."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Планшет бекітпесін ашуға <xliff:g id="NUMBER_0">%1$d</xliff:g> рет дұрыс емес әрекет жасадыңыз. Тағы <xliff:g id="NUMBER_1">%2$d</xliff:g> сәтсіз әрекеттен кейін жұмыс профилі жойылып, бүкіл профиль деректері жойылады."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Телефон бекітпесін ашуға <xliff:g id="NUMBER_0">%1$d</xliff:g> рет дұрыс емес әрекет жасадыңыз. Тағы <xliff:g id="NUMBER_1">%2$d</xliff:g> сәтсіз әрекеттен кейін жұмыс профилі жойылып, бүкіл профиль деректері жойылады."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Планшет бекітпесін ашуға <xliff:g id="NUMBER">%d</xliff:g> рет дұрыс емес әрекет жасадыңыз. Жұмыс профилі жойылып, бүкіл профиль деректері жойылады."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Телефон бекітпесін ашуға <xliff:g id="NUMBER">%d</xliff:g> рет дұрыс емес әрекет жасадыңыз. Жұмыс профилі жойылып, бүкіл профиль деректері жойылады."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Бекітпені ашу кескінін <xliff:g id="NUMBER_0">%1$d</xliff:g> рет қате сыздыңыз. After <xliff:g id="NUMBER_1">%2$d</xliff:g> сәтсіз әрекеттен кейін планшетіңізді есептік жазба арқылы ашу өтінішін аласыз.\n\n  <xliff:g id="NUMBER_2">%3$d</xliff:g> секундтан кейін қайта әрекеттеніңіз."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Бекітпені ашу кескінін <xliff:g id="NUMBER_0">%1$d</xliff:g> рет қате сыздыңыз. <xliff:g id="NUMBER_1">%2$d</xliff:g> сәтсіз әрекеттен кейін телефоныңызды есептік жазба арқылы ашу өтінішін аласыз. \n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> секундтан кейін қайта әрекеттеніңіз."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"SIM PIN коды дұрыс емес, құрылғыны ашу үшін қызмет жабдықтаушыға  хабарласаңыз."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">SIM PIN коды дұрыс емес, <xliff:g id="NUMBER_1">%d</xliff:g> әрекет қалды.</item>
-      <item quantity="one">SIM PIN коды дұрыс емес, операторға құрылғы бекітпесін ашуы үшін хабарласуға дейін <xliff:g id="NUMBER_0">%d</xliff:g> әрекет қалды.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM қолданыстан шыққан. Қызмет жабдықтаушыға хабарласыңыз."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">SIM PUK коды дұрыс емес, SIM біржола пайдалануға жарамсыз болуына <xliff:g id="NUMBER_1">%d</xliff:g> әрекет қалды.</item>
-      <item quantity="one">SIM PUK коды дұрыс емес, SIM біржола пайдалануға жарамсыз болуына <xliff:g id="NUMBER_0">%d</xliff:g> әрекет қалды.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"SIM PIN жұмысы орындалмады!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"SIM PUK жұмысы орындалмады!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Код қабылданды!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Қызмет көрсетілмейді."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Енгізу әдісін ауыстыру"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Ұшақ режимі"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Құрылғы қайта іске қосылғаннан кейін өрнекті енгізу қажет"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Құрылғы қайта іске қосылғаннан кейін PIN кодты енгізу қажет"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Құрылғы қайта іске қосылғаннан кейін кілтсөзді енгізу қажет"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Қосымша қауіпсіздік үшін өрнекті енгізу қажет"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Қосымша қауіпсіздік үшін PIN кодты енгізу қажет"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Қосымша қауіпсіздік үшін кілтсөзді енгізу қажет"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Профильдерді ауыстырғанда өрнекті енгізу қажет"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Профильдерді ауыстырғанда PIN кодты енгізу қажет"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Профильдерді ауыстырғанда кілтсөзді енгізу қажет"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Құрылғы әкімшісі құрылғыны құлыптады"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Құрылғы қолмен құлыпталды"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Құрылғы құлпы <xliff:g id="NUMBER_1">%d</xliff:g> сағат бойы ашылмады. Өрнекті растаңыз.</item>
-      <item quantity="one">Құрылғы құлпы <xliff:g id="NUMBER_0">%d</xliff:g> сағат бойы ашылмады. Өрнекті растаңыз.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Құрылғы құлпы <xliff:g id="NUMBER_1">%d</xliff:g> сағат бойы ашылмады. PIN кодын растаңыз.</item>
-      <item quantity="one">Құрылғы құлпы <xliff:g id="NUMBER_0">%d</xliff:g> сағат бойы ашылмады. PIN кодын растаңыз.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Құрылғы құлпы <xliff:g id="NUMBER_1">%d</xliff:g> сағат бойы ашылмады. Құпия сөзді растаңыз.</item>
-      <item quantity="one">Құрылғы құлпы <xliff:g id="NUMBER_0">%d</xliff:g> сағат бойы ашылмады. Құпия сөзді растаңыз.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Анықталмаған"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-km/strings.xml b/packages/Keyguard/res/values-km/strings.xml
deleted file mode 100644
index fce46c7..0000000
--- a/packages/Keyguard/res/values-km/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"ការពារ​គ្រាប់ចុច"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"បញ្ចូល​កូដ PIN"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"បញ្ចូល​លេខ​កូដ PUK  និង​​ PIN ថ្មី​របស់​ស៊ីម"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"លេខ​កូដ PUK ស៊ីម"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"លេខ​កូដ PIN ស៊ីម​ថ្មី"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"ប៉ះ ដើម្បី​បញ្ចូល​ពាក្យ​សម្ងាត់"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"បញ្ចូល​ពាក្យ​សម្ងាត់​ ​ដើម្បី​ដោះ​សោ"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"បញ្ចូល​កូដ PIN ដើម្បី​ដោះ​សោ"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"កូដ PIN មិន​ត្រឹមត្រូវ។"</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"បាន​បញ្ចូល​​ពេញ"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"កំពុង​បញ្ចូល​ថ្ម"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"សាកយ៉ាងឆាប់រហ័ស"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"សាកយឺត"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"ភ្ជាប់​ឧបករណ៍​បញ្ចូល​ថ្ម​។"</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"ចុច​ម៉ឺនុយ ដើម្បី​ដោះ​សោ។"</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"បណ្ដាញ​ជាប់​សោ"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"គ្មាន​ស៊ី​ម​កាត"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"គ្មាន​ស៊ី​ម​កាត​នៅ​ក្នុង​កុំព្យូទ័រ​បន្ទះ​។"</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"គ្មាន​ស៊ីមកាត​ក្នុង​ទូរស័ព្ទ។"</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"បញ្ចូល​​​ស៊ី​ម​កាត​។"</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"បាត់​ស៊ីមកាត ឬ​មិន​អាច​អាន។ បញ្ចូល​ស៊ីម​កាត។"</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"ស៊ីម​កាត​មិន​អាច​ប្រើ​បាន។"</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"បាន​បិទ​ស៊ីម​កាត​របស់​អ្នក​ជា​អចិន្ត្រៃយ៍។\n ទាក់ទង​​ក្រុមហ៊ុន​ផ្ដល់​សេវាកម្ម​ឥត​ខ្សែ​សម្រាប់​ស៊ីម​កាត​ផ្សេង។"</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"ស៊ីម​កាត​​ជាប់​សោ។"</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"ស៊ីម​កាត​ជាប់​កូដ​​ PUK ។"</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"កំពុង​ដោះ​សោ​ស៊ីម​កាត..."</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"ប្រអប់លេខសម្ងាត់"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"ប្រអប់លេខសម្ងាត់ស៊ីម"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"ប្រអប់ PUK ស៊ីម"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"ការ​ជូន​ដំណឹង​បន្ទាប់​កំណត់​សម្រាប់ <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"លុប"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"ភ្លេច​​លំនាំ"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"លំនាំ​មិន​ត្រឹមត្រូវ"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"ពាក្យ​សម្ងាត់​មិន​ត្រឹមត្រូវ"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"កូដ PIN មិន​ត្រឹមត្រូវ"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"ព្យាយាម​ម្ដង​ទៀត​ក្នុង​រយៈ​ពេល <xliff:g id="NUMBER">%d</xliff:g> វិនាទី។"</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"គូរ​លំនាំ​របស់​អ្នក"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"បញ្ចូល​កូដ PIN ស៊ីម​កាត"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"បញ្ចូលលេខកូដសម្ងាត់ស៊ីមសម្រាប់ \"<xliff:g id="CARRIER">%1$s</xliff:g>\""</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"បញ្ចូល​​កូដ PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"បញ្ចូល​ពាក្យ​សម្ងាត់"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"ឥឡូវ​ស៊ីមកាត​ត្រូវ​បាន​បិទ។ បញ្ចូល​កូដ PUK ដើម្បី​បន្ត។ ចំពោះ​ព័ត៌មាន​លម្អិត​ទាក់ទង​ក្រុមហ៊ុន​បញ្ជូន​របស់​អ្នក។"</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"ស៊ីម \"<xliff:g id="CARRIER">%1$s</xliff:g>\" ត្រូវបានបិទដំណើរការឥឡូវនេះ។ បញ្ចូលលេខកូដ PUK ដើម្បីបន្តទំនាក់ទំនងអ្នកផ្តល់សេវាកម្មសម្រាប់ព័ត៌មានលំអិត។"</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"បញ្ចូល​កូដ PIN ដែល​ចង់​បាន"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"បញ្ជាក់​កូដ PIN ដែល​ចង់​បាន"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"កំពុង​ដោះ​សោ​​ស៊ីម​កាត..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"បញ្ចូល​កូដ PIN ដែល​មាន​ពី ៤ ដល់ ៨ លេខ។"</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"កូដ PUK គួរ​តែ​មាន​​ ៨ លេខ ឬ​​ច្រើន​ជាង​នេះ។"</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"បញ្ចូល​កូដ PUK ម្ដង​ទៀត។ ការ​ព្យាយាម​ដដែល​ច្រើន​ដឹង​នឹង​បិទ​ស៊ីម​កាត​ជា​អចិន្ត្រៃយ៍។"</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"កូដ PIN មិន​ដូច​គ្នា"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"ព្យាយាម​លំនាំ​ច្រើន​ពេក"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"អ្នក​បាន​បញ្ចូល​កូដ PIN របស់​អ្នក​មិន​ត្រឹមត្រូវ​ចំនួន <xliff:g id="NUMBER_0">%1$d</xliff:g> ដង។\n\n ព្យាយាម​ម្ដង​ទៀត​ក្នុង​រយៈ​ពេល <xliff:g id="NUMBER_1">%2$d</xliff:g> វិនាទី។"</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"អ្នក​បាន​បញ្ចូល​ពាក្យ​សម្ងាត់​មិន​ត្រឹមត្រូវ <xliff:g id="NUMBER_0">%1$d</xliff:g> ដង។\n\nព្យាយាម​ម្ដង​ទៀត​ក្នុង​រយៈ​ពេល <xliff:g id="NUMBER_1">%2$d</xliff:g> វិនាទី។"</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"អ្នក​បាន​​គូរ​លំនាំ​ដោះ​សោ​របស់​អ្នក​មិន​ត្រឹមត្រូវ​ចំនួន <xliff:g id="NUMBER_0">%1$d</xliff:g> ដង។\n\nព្យាយាម​ម្ដង​ទៀត​ក្នុង​រយៈ​ពេល <xliff:g id="NUMBER_1">%2$d</xliff:g> វិនាទី។"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"អ្នកបានព្យាយាមដោះសោមិនត្រឹមត្រូវលើថេប្លេតរបស់អ្នក <xliff:g id="NUMBER_0">%1$d</xliff:g> ដង។ បន្ទាប់ពីការព្យាយាម <xliff:g id="NUMBER_1">%2$d</xliff:g> ដងទៀត ថេប្លេតនេះនឹងត្រូវបានកំណត់ឡើងវិញ ដែលវានឹងលុបទិន្នន័យរបស់វាទាំងអស់។"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"អ្នកបានព្យាយាមដោះសោមិនត្រឹមត្រូវលើទូរស័ព្ទរបស់អ្នក <xliff:g id="NUMBER_0">%1$d</xliff:g> ដង។ បន្ទាប់ពីការព្យាយាម <xliff:g id="NUMBER_1">%2$d</xliff:g> ដងទៀត ទូរស័ព្ទនេះនឹងត្រូវបានកំណត់ឡើងវិញ ដែលវានឹងលុបទិន្នន័យរបស់វាទាំងអស់។"</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"អ្នកបានព្យាយាមដោះសមិនត្រឹមត្រូវលើថេប្លេតនេះ <xliff:g id="NUMBER">%d</xliff:g> ដង។ ថេប្លេតនេះនឹងត្រូវបានកំណត់ឡើងវិញ ដែលវានឹងលុបទិន្នន័យរបស់វាទាំងអស់។"</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"អ្នកបានព្យាយាមដោះសោមិនត្រឹមត្រូវលើទូរស័ព្ទរបស់អ្នក <xliff:g id="NUMBER">%d</xliff:g> ដង។ ទូរស័ព្ទនេះនឹងត្រូវបានកំណត់ឡើងវិញ ដែលវានឹងលុបទិន្នន័យរបស់វាទាំងអស់។"</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"អ្នកបានព្យាយាមដោះសោមិនត្រឹមត្រូវលើថេប្លេតរបស់អ្នក <xliff:g id="NUMBER_0">%1$d</xliff:g> ដង។ បន្ទាប់ពីការព្យាយាម <xliff:g id="NUMBER_1">%2$d</xliff:g> ដងទៀត អ្នកប្រើនេះនឹងត្រូវបានដកចេញ ដែលវានឹងលុបទិន្នន័យអ្នកប្រើទាំងអស់។"</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"អ្នកបានព្យាយាមដោះសោមិនត្រឹមត្រូវលើទូរស័ព្ទរបស់អ្នក <xliff:g id="NUMBER_0">%1$d</xliff:g> ដង។ បន្ទាប់ពីការព្យាយាម <xliff:g id="NUMBER_1">%2$d</xliff:g> ដងទៀត អ្នកប្រើនេះនឹងត្រូវបានដកចេញ ដែលវានឹងលុបទិន្នន័យអ្នកប្រើទាំងអស់។"</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"អ្នកបានព្យាយាមដោះសោមិនត្រឹមត្រូវលើថេប្លេតរបស់អ្នក <xliff:g id="NUMBER">%d</xliff:g> ដង។ អ្នកប្រើនេះនឹងត្រូវបានដកចេញ ដែលវានឹងលុបទិន្នន័យអ្នកប្រើទាំងអស់។"</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"អ្នកបានព្យាយាមដោះសោមិនត្រឹមត្រូវលើទូរស័ព្ទរបស់អ្នក <xliff:g id="NUMBER">%d</xliff:g> ដង។ អ្នកប្រើនេះនឹងត្រូវបានដកចេញ ដែលវានឹងលុបទិន្នន័យអ្នកប្រើទាំងអស់។"</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"អ្នកបានព្យាយាមដោះសោមិនត្រឹមត្រូវលើថេប្លេតរបស់អ្នក <xliff:g id="NUMBER_0">%1$d</xliff:g> ដង។ បន្ទាប់ពីការព្យាយាម <xliff:g id="NUMBER_1">%2$d</xliff:g> ដងទៀត ប្រវត្តិរូបការងាររបស់អ្នកនឹងត្រូវបានដកចេញ ដែលវានឹងលុបទិន្នន័យប្រវត្តិរូបទាំងអស់។"</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"អ្នកបានព្យាយាមដោះសោមិនត្រឹមត្រូវលើទូរស័ព្ទរបស់អ្នក <xliff:g id="NUMBER_0">%1$d</xliff:g> ដង។ បន្ទាប់ពីការព្យាយាម <xliff:g id="NUMBER_1">%2$d</xliff:g> ដងទៀត ប្រវត្តិរូបការងាររបស់អ្នកនឹងត្រូវបានដកចេញ ដែលវានឹងលុបទិន្នន័យប្រវត្តិរូបទាំងអស់។"</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"អ្នកបានព្យាយាមដោះសោមិនត្រឹមត្រូវលើថេប្លេតរបស់អ្នក <xliff:g id="NUMBER">%d</xliff:g> ដង។ ប្រវត្តិរូបការងាររបស់អ្នកនឹងត្រូវបានដកចេញ ដែលវានឹងលុបទិន្នន័យប្រវត្តិរូបទាំងអស់របស់អ្នក។"</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"អ្នកបានព្យាយាមដោះសោមិនត្រឹមត្រូវលើទូរស័ព្ទរបស់អ្នក <xliff:g id="NUMBER">%d</xliff:g> ដង។ ប្រវត្តិរូបការងាររបស់អ្នកនឹងត្រូវបានដកចេញ ដែលវានឹងលុបទិន្នន័យប្រវត្តិរូបទាំងអស់របស់អ្នក។"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"អ្នក​បាន​គូរ​លំនាំ​ដោះ​សោ​មិន​ត្រឹមត្រូវ <xliff:g id="NUMBER_0">%1$d</xliff:g> ដង។ បន្ទាប់​ពី​ការ​ព្យាយាម <xliff:g id="NUMBER_1">%2$d</xliff:g> ដង​មិន​ជោគជ័យ អ្នក​នឹង​ត្រូវ​បាន​ស្នើ​ឲ្យ​ដោះ​សោ​កុំព្យូទ័រ​បន្ទះ​របស់​អ្នក ដោយ​ប្រើ​គណនី​អ៊ីមែល។\n\n ព្យាយាម​ម្ដង​ទៀត​ក្នុង​រយៈ​ពេល <xliff:g id="NUMBER_2">%3$d</xliff:g> វិនាទី។"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"អ្នក​បាន​គូរ​លំនាំ​ដោះ​​សោ​របស់​អ្នក​មិន​ត្រឹមត្រូវ​ចំនួន <xliff:g id="NUMBER_0">%1$d</xliff:g> ដង។ បន្ទាប់​ពី​ការ​ព្យាយាម​មិន​ជោគជ័យ​​ច្រើនជាង <xliff:g id="NUMBER_1">%2$d</xliff:g> ដង អ្នក​នឹង​ត្រូវ​បាន​​ស្នើ​ឲ្យ​ដោះ​សោ​ទូរស័ព្ទ​របស់​អ្នក​ដោយ​ប្រើ​គណនី​អ៊ីមែល។\n\n ព្យាយាម​ម្ដង​ទៀត​ក្នុង​រយៈ​ពេល <xliff:g id="NUMBER_2">%3$d</xliff:g> វិនាទី។"</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"លេខ​កូដ PIN ស៊ីម​មិន​ត្រឹមត្រូវ អ្នក​ត្រូវ​ទាក់ទង​ក្រុមហ៊ុន​បញ្ជូន​របស់​អ្នក​ឥឡូវ​នេះ ដើម្បី​ដោះ​សោ​ឧបករណ៍​របស់​អ្នក។"</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">លេខកូដសម្ងាត់ស៊ីមមិនត្រឹមត្រូវ អ្នកនៅសល់ការព្យាយាម <xliff:g id="NUMBER_1">%d</xliff:g> ដងទៀត</item>
-      <item quantity="one">លេខកូដសម្ងាត់ស៊ីមមិនត្រឹមត្រូវ អ្នកនៅសល់ការព្យាយាម <xliff:g id="NUMBER_0">%d</xliff:g> ដងទៀត មុនពេលពេលដែលអ្នកត្រូវទាក់ទងទៅអ្នកផ្តល់សេវាកម្មរបស់អ្នកដើម្បីដោះសោឧបករណ៍របស់អ្នក។</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"ស៊ីម​មិន​អាច​ប្រើ​បាន។ ទាក់ទង​ក្រុមហ៊ុន​បញ្ជូន​របស់​អ្នក។"</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">លេខកូដ PUK ស៊ីមមិនត្រឹមត្រូវ អ្នកនៅសល់ការព្យាយាម <xliff:g id="NUMBER_1">%d</xliff:g> ដងទៀត មុនពេលស៊ីមរបស់អ្នកមិនអាចប្រើបានជាអចិន្ត្រៃយ៍។</item>
-      <item quantity="one">លេខកូដ PUK ស៊ីមមិនត្រឹមត្រូវ អ្នកនៅសល់ការព្យាយាម <xliff:g id="NUMBER_0">%d</xliff:g> ដងទៀត មុនពេលស៊ីមរបស់អ្នកមិនអាចប្រើបានជាអចិន្ត្រៃយ៍។</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"បាន​បរាជ័យ​ក្នុង​ការ​ប្រតិបត្តិ​លេខ​កូដ PIN ស៊ីម!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"បាន​បរាជ័យ​ក្នុង​ការ​ប្រតិបត្តិ​​លេខ​កូដ PUK ស៊ីម!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"បាន​ទទួល​យក​លេខ​កូដ​!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"គ្មាន​សេវា​"</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"ប្ដូរ​វិធីសាស្ត្រ​បញ្ចូល"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"របៀបក្នុងយន្តហោះ"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"តម្រូវឲ្យប្រើលំនាំបន្ទាប់ពីឧបករណ៍ចាប់ផ្តើមឡើងវិញ"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"តម្រូវឲ្យបញ្ចូលកូដ PIN បន្ទាប់ពីឧបករណ៍ចាប់ផ្តើមឡើងវិញ"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"តម្រូវឲ្យបញ្ចូលពាក្យសម្ងាត់បន្ទាប់ពីឧបករណ៍ចាប់ផ្តើមឡើងវិញ"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"តម្រូវឲ្យប្រើលំនាំដើម្បីទទួលបានសវុត្ថិភាពបន្ថែម"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"តម្រូវឲ្យបញ្ចូលកូដ PIN ដើម្បីទទួលបានសុវត្ថិភាពបន្ថែម"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"តម្រូវឲ្យបញ្ចូលពាក្យសម្ងាត់ដើម្បីទទួលបានសុវត្ថិភាពបន្ថែម"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"តម្រូវឲ្យប្រើលំនាំនៅពេលដែលអ្នកប្តូរប្រវត្តិរូប"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"តម្រូវឲ្យបញ្ចូលកូដ PIN នៅពេលដែលអ្នកប្តូរប្រវត្តិរូប"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"តម្រូវឲ្យបញ្ចូលពាក្យសម្ងាត់នៅពេលដែលអ្នកប្តូរប្រវត្តិរូប"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"អ្នកគ្រប់គ្រងឧបករណ៍បានចាក់សោឧបករណ៍"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"ឧបករណ៍ត្រូវបានចាក់សោដោយអ្នកប្រើផ្ទាល់"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">ឧបករណ៍មិនបានដោះសោអស់រយៈពេល <xliff:g id="NUMBER_1">%d</xliff:g> ម៉ោងហើយ។ បញ្ជាប់លំនាំ។</item>
-      <item quantity="one">ឧបករណ៍មិនបានដោះសោអស់រយៈពេល <xliff:g id="NUMBER_0">%d</xliff:g> ម៉ោងហើយ។ បញ្ជាក់លំនាំ។</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">ឧបករណ៍មិនបានដោះសោអស់រយៈពេល <xliff:g id="NUMBER_1">%d</xliff:g> ម៉ោងហើយ។ បញ្ជាក់កូដ PIN។</item>
-      <item quantity="one">ឧបករណ៍មិនបានដោះសោអស់រយៈពេល <xliff:g id="NUMBER_0">%d</xliff:g> ម៉ោងហើយ។ បញ្ជាក់កូដ PIN។</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">ឧបករណ៍មិនបានដោះសោអស់រយៈពេល <xliff:g id="NUMBER_1">%d</xliff:g> ម៉ោងហើយ។ បញ្ជាក់ពាក្យសម្ងាត់។</item>
-      <item quantity="one">ឧបករណ៍មិនបានដោះសោអស់រយៈពេល <xliff:g id="NUMBER_0">%d</xliff:g> ម៉ោងហើយ។ បញ្ជាក់ពាក្យសម្ងាត់។</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"មិនអាចសម្គាល់បានទេ"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-kn/strings.xml b/packages/Keyguard/res/values-kn/strings.xml
deleted file mode 100644
index 7bac9c6..0000000
--- a/packages/Keyguard/res/values-kn/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"ಕೀಗಾರ್ಡ್"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"ಪಿನ್‌ ಕೋಡ್‌ ಟೈಪ್‌ ಮಾಡಿ"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"ಸಿಮ್‌ PUK ಮತ್ತು ಹೊಸ ಪಿನ್‌ ಕೋಡ್ ಟೈಪ್ ಮಾಡಿ"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"ಸಿಮ್‌ PUK ಕೋಡ್"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"ಹೊಸ ಸಿಮ್‌ ಪಿನ್‌ ಕೋಡ್"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"ಪಾಸ್‌ವರ್ಡ್‌ ಟೈಪ್ ಮಾಡಲು ಸ್ಪರ್ಶಿಸಿ"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"ಅನ್‌ಲಾಕ್‌ ಮಾಡಲು ಪಾಸ್‌ವರ್ಡ್‌ ಟೈಪ್‌ ಮಾಡಿ"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"ಅನ್‌ಲಾಕ್‌ ಮಾಡಲು ಪಿನ್‌ ಟೈಪ್‌ ಮಾಡಿ"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"ತಪ್ಪಾದ ಪಿನ್‌ ಕೋಡ್."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"ಚಾರ್ಜ್ ಆಗಿದೆ"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"ಚಾರ್ಜ್ ಆಗುತ್ತಿದೆ"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"ವೇಗವಾಗಿ ಚಾರ್ಜ್ ಮಾಡಲಾಗುತ್ತಿದೆ"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"ನಿಧಾನವಾಗಿ ಚಾರ್ಜ್ ಮಾಡಲಾಗುತ್ತಿದೆ"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"ನಿಮ್ಮ ಚಾರ್ಜರ್ ಸಂಪರ್ಕಗೊಳಿಸಿ."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"ಅನ್‌ಲಾಕ್ ಮಾಡಲು ಮೆನು ಕ್ಲಿಕ್ ಮಾಡಿ."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"ನೆಟ್‌ವರ್ಕ್ ಲಾಕ್ ಆಗಿದೆ"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"ಸಿಮ್‌ ಕಾರ್ಡ್ ಇಲ್ಲ"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"ಟ್ಯಾಬ್ಲೆಟ್‌ನಲ್ಲಿ ಯಾವುದೇ ಸಿಮ್‌ ಕಾರ್ಡ್ ಇಲ್ಲ."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"ಪೋನ್‌ನಲ್ಲಿ ಯಾವುದೇ ಸಿಮ್‌ ಕಾರ್ಡ್ ಇಲ್ಲ."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"ಸಿಮ್‌ ಕಾರ್ಡ್ ಸೇರಿಸಿ."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"ಸಿಮ್‌ ಕಾರ್ಡ್ ಕಾಣೆಯಾಗಿದೆ ಅಥವಾ ಓದಲು ಸಾಧ್ಯವಿಲ್ಲ. ಒಂದು ಸಿಮ್‌ ಕಾರ್ಡ್ ಸೇರಿಸಿ."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"ನಿಷ್ಪ್ರಯೋಜಕ ಸಿಮ್‌ ಕಾರ್ಡ್."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"ನಿಮ್ಮ ಸಿಮ್‌ ಕಾರ್ಡ್ ಅನ್ನು ಶಾಶ್ವತವಾಗಿ ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ.\n ಮತ್ತೊಂದು ಸಿಮ್‌ ಕಾರ್ಡ್‌ಗಾಗಿ ನಿಮ್ಮ ವಯರ್‌ಲೆಸ್ ಸೇವೆಯ ಪೂರೈಕೆದಾರರನ್ನು ಸಂಪರ್ಕಿಸಿ."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"ಸಿಮ್‌ ಕಾರ್ಡ್ ಲಾಕ್ ಮಾಡಲಾಗಿದೆ."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"ಸಿಮ್‌ ಕಾರ್ಡ್ ಅನ್ನು PUK-ಲಾಕ್ ಮಾಡಲಾಗಿದೆ."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"ಸಿಮ್‌ ಕಾರ್ಡ್ ಅನ್‌ಲಾಕ್ ಮಾಡಲಾಗುತ್ತಿದೆ…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"ಪಿನ್ ಪ್ರದೇಶ"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"ಸಿಮ್ ಪಿನ್ ಪ್ರದೇಶ"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"ಸಿಮ್ PUK ಪ್ರದೇಶ"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"<xliff:g id="ALARM">%1$s</xliff:g> ಗೆ ಮುಂದಿನ ಅಲಾರಮ್ ಹೊಂದಿಸಲಾಗಿದೆ"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"ಅಳಿಸು"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"ನಮೂದಿಸು"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"ಪ್ಯಾಟರ್ನ್ ಅನ್ನು ಮರೆತಿರುವಿರಿ"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"ತಪ್ಪು ಪ್ಯಾಟರ್ನ್"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"ತಪ್ಪು ಪಾಸ್‌ವರ್ಡ್"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"ತಪ್ಪಾದ ಪಿನ್‌"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"<xliff:g id="NUMBER">%d</xliff:g> ಸೆಕೆಂಡುಗಳಲ್ಲಿ ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"ನಿಮ್ಮ ನಮೂನೆಯನ್ನು ಚಿತ್ರಿಸಿ"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"ಸಿಮ್‌ ಪಿನ್‌ ನಮೂದಿಸಿ"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"\"<xliff:g id="CARRIER">%1$s</xliff:g>\" ಗೆ ಸಿಮ್ ಪಿನ್ ನಮೂದಿಸಿ"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"ಪಿನ್‌ ನಮೂದಿಸಿ"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"ಪಾಸ್‌ವರ್ಡ್ ನಮೂದಿಸಿ"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"ಇದೀಗ ಸಿಮ್‌ ನಿಷ್ಕ್ರಿಯಗೊಂಡಿದೆ. ಮುಂದುವರೆಯಲು PUK ಕೋಡ್ ನಮೂದಿಸಿ. ವಿವರಗಳಿಗಾಗಿ ವಾಹಕವನ್ನು ಸಂಪರ್ಕಿಸಿ."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"ಸಿಮ್  \"<xliff:g id="CARRIER">%1$s</xliff:g>\" ಇದೀಗ ನಿಷ್ಕ್ರಿಯಗೊಂಡಿದೆ. ಮುಂದುವರೆಯಲು PUK ಕೋಡ್ ಅನ್ನು ನಮೂದಿಸಿ. ಮಾಹಿತಿಗಾಗಿ ವಾಹಕವನ್ನು ಸಂಪರ್ಕಿಸಿ."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"ಅಗತ್ಯವಿರುವ ಪಿನ್‌ ಕೋಡ್ ನಮೂದಿಸಿ"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"ಬಯಸಿರುವ ಪಿನ್‌ ಕೋಡ್ ದೃಢೀಕರಿಸಿ"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"ಸಿಮ್‌ ಕಾರ್ಡ್ ಅನ್‍ಲಾಕ್ ಮಾಡಲಾಗುತ್ತಿದೆ…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"4 ರಿಂದ 8 ಸಂಖ್ಯೆಗಳಿರುವ ಪಿನ್‌ ಟೈಪ್ ಮಾಡಿ."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK ಕೋಡ್ 8 ಸಂಖ್ಯೆಗಳು ಅಥವಾ ಅದಕ್ಕಿಂತ ಹೆಚ್ಚಾಗಿರಬೇಕು."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"ಸರಿಯಾದ PUK ಕೋಡ್ ಅನ್ನು ಮರು-ನಮೂದಿಸಿ. ಸತತ ಪ್ರಯತ್ನಗಳು ಸಿಮ್‌ ಅನ್ನು ಶಾಶ್ವತವಾಗಿ ನಿಷ್ಕ್ರಿಯಗೊಳಿಸುತ್ತದೆ."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"ಪಿನ್‌ ಕೋಡ್‍ಗಳು ಹೊಂದಾಣಿಕೆಯಾಗುತ್ತಿಲ್ಲ"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"ಹಲವಾರು ಪ್ಯಾಟರ್ನ್ ಪ್ರಯತ್ನಗಳು"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"ನಿಮ್ಮ ಪಿನ್‌ ಅನ್ನು ನೀವು <xliff:g id="NUMBER_0">%1$d</xliff:g> ಬಾರಿ ತಪ್ಪಾಗಿ ಟೈಪ್ ಮಾಡಿರುವಿರಿ. \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> ಸೆಕೆಂಡುಗಳಲ್ಲಿ ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"ನಿಮ್ಮ ಪಾಸ್‍‍ವರ್ಡ್ ಅನ್ನು ನೀವು <xliff:g id="NUMBER_0">%1$d</xliff:g> ಬಾರಿ ತಪ್ಪಾಗಿ ಟೈಪ್ ಮಾಡಿರುವಿರಿ. \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> ಸೆಕೆಂಡುಗಳಲ್ಲಿ ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"ನಿಮ್ಮ ಅನ್‍‍ಲಾಕ್ ಪ್ಯಾಟರ್ನ್ ಅನ್ನು ನೀವು <xliff:g id="NUMBER_0">%1$d</xliff:g> ಬಾರಿ ತಪ್ಪಾಗಿ ಚಿತ್ರಿಸಿರುವಿರಿ. \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> ಸೆಕೆಂಡುಗಳಲ್ಲಿ ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"ಟ್ಯಾಬ್ಲೆಟ್ ಅನ್ನು ಅನ್‌ಲಾಕ್ ಮಾಡಲು ನೀವು <xliff:g id="NUMBER_0">%1$d</xliff:g> ಬಾರಿ ತಪ್ಪಾಗಿ ಪ್ರಯತ್ನಿಸಿರುವಿರಿ. <xliff:g id="NUMBER_1">%2$d</xliff:g> ಕ್ಕೂ ಹೆಚ್ಚಿನ ವಿಫಲ ಪ್ರಯತ್ನಗಳ ನಂತರ, ಈ ಟ್ಯಾಬ್ಲೆಟ್ ಅನ್ನು ಮರುಹೊಂದಿಸಲಾಗುತ್ತದೆ, ಇದು ಅದರ ಎಲ್ಲ ಡೇಟಾವನ್ನು ಅಳಿಸುತ್ತದೆ."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"ಫೋನ್ ಅನ್ನು ಅನ್‌ಲಾಕ್ ಮಾಡಲು ನೀವು <xliff:g id="NUMBER_0">%1$d</xliff:g> ಬಾರಿ ತಪ್ಪಾಗಿ ಪ್ರಯತ್ನಿಸಿರುವಿರಿ. <xliff:g id="NUMBER_1">%2$d</xliff:g> ಕ್ಕೂ ಹೆಚ್ಚಿನ ವಿಫಲ ಪ್ರಯತ್ನಗಳ ನಂತರ, ಈ ಫೋನ್ ಅನ್ನು ಮರುಹೊಂದಿಸಲಾಗುತ್ತದೆ, ಇದು ಅದರ ಎಲ್ಲ ಡೇಟಾವನ್ನು ಅಳಿಸುತ್ತದೆ."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"ಟ್ಯಾಬ್ಲೆಟ್ ಅನ್ನು ಅನ್‌ಲಾಕ್ ಮಾಡಲು ನೀವು <xliff:g id="NUMBER">%d</xliff:g> ಬಾರಿ ತಪ್ಪಾಗಿ ಪ್ರಯತ್ನಿಸಿರುವಿರಿ. ಈ ಟ್ಯಾಬ್ಲೆಟ್ ಅನ್ನು ಮರುಹೊಂದಿಸಲಾಗುತ್ತದೆ, ಇದು ಅದರ ಎಲ್ಲ ಡೇಟಾವನ್ನು ಅಳಿಸುತ್ತದೆ."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"ಫೋನ್ ಅನ್ನು ಅನ್‌ಲಾಕ್ ಮಾಡಲು ನೀವು <xliff:g id="NUMBER">%d</xliff:g> ಬಾರಿ ತಪ್ಪಾಗಿ ಪ್ರಯತ್ನಿಸಿರುವಿರಿ. ಈ ಫೋನ್ ಅನ್ನು ಮರುಹೊಂದಿಸಲಾಗುತ್ತದೆ, ಇದು ಅದರ ಎಲ್ಲ ಡೇಟಾವನ್ನು ಅಳಿಸುತ್ತದೆ."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"ಟ್ಯಾಬ್ಲೆಟ್ ಅನ್ನು ಅನ್‌ಲಾಕ್ ಮಾಡಲು ನೀವು <xliff:g id="NUMBER_0">%1$d</xliff:g> ಬಾರಿ ತಪ್ಪಾಗಿ ಪ್ರಯತ್ನಿಸಿರುವಿರಿ. <xliff:g id="NUMBER_1">%2$d</xliff:g> ಕ್ಕೂ ಹೆಚ್ಚಿನ ವಿಫಲ ಪ್ರಯತ್ನಗಳ ನಂತರ, ಈ ಬಳಕೆದಾರರನ್ನು ತೆಗೆದುಹಾಕಲಾಗುತ್ತದೆ, ಈ ಮೂಲಕ ಬಳಕೆದಾರರ ಎಲ್ಲ ಡೇಟಾವನ್ನು ಅಳಿಸಲಾಗುತ್ತದೆ."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"ಫೋನ್ ಅನ್ನು ಅನ್‌ಲಾಕ್ ಮಾಡಲು ನೀವು <xliff:g id="NUMBER_0">%1$d</xliff:g> ಬಾರಿ ತಪ್ಪಾಗಿ ಪ್ರಯತ್ನಿಸಿರುವಿರಿ. <xliff:g id="NUMBER_1">%2$d</xliff:g> ಕ್ಕೂ ಹೆಚ್ಚಿನ ವಿಫಲ ಪ್ರಯತ್ನಗಳ ನಂತರ, ಈ ಬಳಕೆದಾರರನ್ನು ತೆಗೆದುಹಾಕಲಾಗುತ್ತದೆ, ಈ ಮೂಲಕ ಬಳಕೆದಾರರ ಎಲ್ಲ ಡೇಟಾವನ್ನು ಅಳಿಸಲಾಗುತ್ತದೆ."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"ಟ್ಯಾಬ್ಲೆಟ್ ಅನ್ನು ಅನ್‌ಲಾಕ್ ಮಾಡಲು ನೀವು <xliff:g id="NUMBER">%d</xliff:g> ಬಾರಿ ತಪ್ಪಾಗಿ ಪ್ರಯತ್ನಿಸಿರುವಿರಿ. ಈ ಬಳಕೆದಾರರನ್ನು ತೆಗೆದುಹಾಕಲಾಗುತ್ತದೆ, ಇದು ಬಳಕೆದಾರರ ಎಲ್ಲ ಡೇಟಾವನ್ನು ಅಳಿಸುತ್ತದೆ."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"ಫೋನ್ ಅನ್ನು ಅನ್‌ಲಾಕ್ ಮಾಡಲು ನೀವು <xliff:g id="NUMBER">%d</xliff:g> ಬಾರಿ ತಪ್ಪಾಗಿ ಪ್ರಯತ್ನಿಸಿರುವಿರಿ. ಈ ಬಳಕೆದಾರರನ್ನು ತೆಗೆದುಹಾಕಲಾಗುತ್ತದೆ, ಇದು ಬಳಕೆದಾರರ ಎಲ್ಲ ಡೇಟಾವನ್ನು ಅಳಿಸುತ್ತದೆ."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"ಟ್ಯಾಬ್ಲೆಟ್ ಅನ್ನು ಅನ್‌ಲಾಕ್ ಮಾಡಲು ನೀವು <xliff:g id="NUMBER_0">%1$d</xliff:g> ಬಾರಿ ತಪ್ಪಾಗಿ ಪ್ರಯತ್ನಿಸಿರುವಿರಿ. <xliff:g id="NUMBER_1">%2$d</xliff:g> ಕ್ಕೂ ಹೆಚ್ಚಿನ ವಿಫಲ ಪ್ರಯತ್ನಗಳ ನಂತರ, ಕೆಲಸದ ಪ್ರೊಫೈಲ್ ಅನ್ನು ತೆಗೆದುಹಾಕಲಾಗುತ್ತದೆ, ಇದು ಎಲ್ಲ ಪ್ರೊಫೈಲ್ ಡೇಟಾವನ್ನು ಅಳಿಸುತ್ತದೆ."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"ಫೋನ್ ಅನ್ನು ಅನ್‌ಲಾಕ್ ಮಾಡಲು ನೀವು <xliff:g id="NUMBER_0">%1$d</xliff:g> ಬಾರಿ ತಪ್ಪಾಗಿ ಪ್ರಯತ್ನಿಸಿರುವಿರಿ. <xliff:g id="NUMBER_1">%2$d</xliff:g> ಕ್ಕೂ ಹೆಚ್ಚಿನ ವಿಫಲ ಪ್ರಯತ್ನಗಳ ನಂತರ, ಕೆಲಸದ ಪ್ರೊಫೈಲ್ ಅನ್ನು ತೆಗೆದುಹಾಕಲಾಗುತ್ತದೆ, ಇದು ಎಲ್ಲ ಪ್ರೊಫೈಲ್ ಡೇಟಾವನ್ನು ಅಳಿಸುತ್ತದೆ."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"ಟ್ಯಾಬ್ಲೆಟ್ ಅನ್ನು ಅನ್‌ಲಾಕ್ ಮಾಡಲು ನೀವು <xliff:g id="NUMBER">%d</xliff:g> ಬಾರಿ ತಪ್ಪಾಗಿ ಪ್ರಯತ್ನಿಸಿರುವಿರಿ. ಕೆಲಸದ ಪ್ರೊಫೈಲ್ ಅನ್ನು ತೆಗೆದುಹಾಕಲಾಗುತ್ತದೆ, ಇದು ಎಲ್ಲ ಪ್ರೊಫೈಲ್ ಡೇಟಾವನ್ನು ಅಳಿಸುತ್ತದೆ."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"ಫೋನ್ ಅನ್ನು ಅನ್‌ಲಾಕ್ ಮಾಡಲು ನೀವು <xliff:g id="NUMBER">%d</xliff:g> ಬಾರಿ ತಪ್ಪಾಗಿ ಪ್ರಯತ್ನಿಸಿರುವಿರಿ. ಕೆಲಸದ ಪ್ರೊಫೈಲ್ ಅನ್ನು ತೆಗೆದುಹಾಕಲಾಗುತ್ತದೆ, ಇದು ಎಲ್ಲ ಪ್ರೊಫೈಲ್ ಡೇಟಾವನ್ನು ಅಳಿಸುತ್ತದೆ."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"ನಿಮ್ಮ ಅನ್‍‍ಲಾಕ್ ಪ್ಯಾಟರ್ನ್ ಅನ್ನು ನೀವು <xliff:g id="NUMBER_0">%1$d</xliff:g> ಬಾರಿ ತಪ್ಪಾಗಿ ಡ್ರಾ ಮಾಡಿರುವಿರಿ. <xliff:g id="NUMBER_1">%2$d</xliff:g> ಹೆಚ್ಚಿನ ವಿಫಲ ಪ್ರಯತ್ನಗಳ ಬಳಿಕ, ನಿಮ್ಮ ಇಮೇಲ್ ಖಾತೆಯನ್ನು ಬಳಸಿಕೊಂಡು ನಿಮ್ಮ ಟ್ಯಾಬ್ಲೆಟ್ ಅನ್‌ಲಾಕ್ ಮಾಡುವಂತೆ ನಿಮ್ಮಲ್ಲಿ ಕೇಳಿಕೊಳ್ಳಲಾಗುತ್ತದೆ.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> ಸೆಕೆಂಡುಗಳಲ್ಲಿ ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"ನಿಮ್ಮ ಅನ್‍‍ಲಾಕ್ ಪ್ಯಾಟರ್ನ್ ಅನ್ನು ನೀವು <xliff:g id="NUMBER_0">%1$d</xliff:g> ಬಾರಿ ತಪ್ಪಾಗಿ ಡ್ರಾ ಮಾಡಿರುವಿರಿ. <xliff:g id="NUMBER_1">%2$d</xliff:g> ಹೆಚ್ಚಿನ ವಿಫಲ ಪ್ರಯತ್ನಗಳ ಬಳಿಕ, ನಿಮ್ಮ ಇಮೇಲ್ ಖಾತೆಯನ್ನು ಬಳಸಿಕೊಂಡು ನಿಮ್ಮ ಫೋನ್ ಅನ್‌ಲಾಕ್ ಮಾಡುವಂತೆ ನಿಮ್ಮಲ್ಲಿ ಕೇಳಿಕೊಳ್ಳಲಾಗುತ್ತದೆ.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> ಸೆಕೆಂಡುಗಳಲ್ಲಿ ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"ಸಿಮ್‌ ಪಿನ್‌ ಕೋಡ್ ತಪ್ಪಾಗಿದೆ, ನಿಮ್ಮ ಸಾಧನವನ್ನು ಅನ್‌ಲಾಕ್ ಮಾಡಲು ನೀವು ಈ ಕೂಡಲೇ ನಿಮ್ಮ ವಾಹಕವನ್ನು ಸಂಪರ್ಕಿಸಬೇಕು."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">ಸಿಮ್‌ ಪಿನ್ ಕೋಡ್‌ ತಪ್ಪಾಗಿದೆ, ನಿಮ್ಮಲ್ಲಿ <xliff:g id="NUMBER_1">%d</xliff:g> ಪ್ರಯತ್ನಗಳು ಬಾಕಿ ಉಳಿದಿವೆ.</item>
-      <item quantity="other">ಸಿಮ್‌ ಪಿನ್ ಕೋಡ್‌ ತಪ್ಪಾಗಿದೆ, ನಿಮ್ಮಲ್ಲಿ <xliff:g id="NUMBER_1">%d</xliff:g> ಪ್ರಯತ್ನಗಳು ಬಾಕಿ ಉಳಿದಿವೆ.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"ಸಿಮ್‌ ನಿಷ್ಪ್ರಯೋಜಕವಾಗಿದೆ. ನಿಮ್ಮ ವಾಹಕವನ್ನು ಸಂಪರ್ಕಿಸಿ."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">ತಪ್ಪಾಗಿರುವ ಸಿಮ್‌ PUK ಕೋಡ್‌, ಸಿಮ್‌ ಶಾಶ್ವತವಾಗಿ ನಿಷ್ಪ್ರಯೋಜಕವಾಗುವುದಕ್ಕೂ ಮೊದಲು ನಿಮ್ಮಲ್ಲಿ <xliff:g id="NUMBER_1">%d</xliff:g> ಪ್ರಯತ್ನಗಳು ಬಾಕಿ ಉಳಿದಿವೆ.</item>
-      <item quantity="other">ತಪ್ಪಾಗಿರುವ ಸಿಮ್‌ PUK ಕೋಡ್‌, ಸಿಮ್‌ ಶಾಶ್ವತವಾಗಿ ನಿಷ್ಪ್ರಯೋಜಕವಾಗುವುದಕ್ಕೂ ಮೊದಲು ನಿಮ್ಮಲ್ಲಿ <xliff:g id="NUMBER_1">%d</xliff:g> ಪ್ರಯತ್ನಗಳು ಬಾಕಿ ಉಳಿದಿವೆ.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"ಸಿಮ್‌ ಪಿನ್‌ ಕಾರ್ಯಾಚರಣೆ ವಿಫಲಗೊಂಡಿದೆ!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"ಸಿಮ್‌ PUK ಕಾರ್ಯಾಚರಣೆ ವಿಫಲಗೊಂಡಿದೆ!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"ಕೋಡ್ ಅಂಗೀಕೃತವಾಗಿದೆ!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"ಯಾವುದೇ ಸೇವೆಯಿಲ್ಲ."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"ಇನ್‌ಪುಟ್‌‌ ವಿಧಾನ ಬದಲಿಸಿ"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"ಏರ್‌ಪ್ಲೇನ್ ಮೋಡ್"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"ಸಾಧನ ಮರುಪ್ರಾರಂಭಗೊಂಡ ನಂತರ ಪ್ಯಾಟರ್ನ್ ಅಗತ್ಯವಿರುತ್ತದೆ"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"ಸಾಧನ ಮರುಪ್ರಾರಂಭಗೊಂಡ ನಂತರ ಪಿನ್ ಅಗತ್ಯವಿರುತ್ತದೆ"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"ಸಾಧನ ಮರುಪ್ರಾರಂಭಗೊಂಡ ನಂತರ ಪಾಸ್‌ವರ್ಡ್ ಅಗತ್ಯವಿರುತ್ತದೆ"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"ಹೆಚ್ಚುವರಿ ಭದ್ರತೆಗೆ ಪ್ಯಾಟರ್ನ್ ಅಗತ್ಯವಿದೆ"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"ಹೆಚ್ಚುವರಿ ಭದ್ರತೆಗೆ ಪಿನ್ ಅಗತ್ಯವಿದೆ"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"ಹೆಚ್ಚುವರಿ ಭದ್ರತೆಗಾಗಿ ಪಾಸ್‌ವರ್ಡ್ ಅಗತ್ಯವಿದೆ"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"ನೀವು ಪ್ರೊಫೈಲ್‌ಗಳನ್ನು ಬದಲಾಯಿಸಿದಾಗ ಪ್ಯಾಟರ್ನ್ ಅಗತ್ಯವಿರುತ್ತದೆ"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"ನೀವು ಪ್ರೊಫೈಲ್‌ಗಳನ್ನು ಬದಲಾಯಿಸಿದಾಗ ಪಿನ್ ಅಗತ್ಯವಿರುತ್ತದೆ"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"ನೀವು ಪ್ರೊಫೈಲ್‌ಗಳನ್ನು ಬದಲಾಯಿಸಿದಾಗ ಪಾಸ್‌ವರ್ಡ್‌ ಅಗತ್ಯವಿರುತ್ತದೆ"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"ಸಾಧನ ನಿರ್ವಾಹಕರು ಸಾಧನವನ್ನು ಲಾಕ್‌ ಮಾಡಿದ್ದಾರೆ"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"ಸಾಧನವನ್ನು ಹಸ್ತಚಾಲಿತವಾಗಿ ಲಾಕ್‌ ಮಾಡಲಾಗಿದೆ"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">ಸಾಧನವನ್ನು <xliff:g id="NUMBER_1">%d</xliff:g> ಗಂಟೆಗಳ ಕಾಲ ಅನ್‌ಲಾಕ್‌ ಮಾಡಲಾಗಿಲ್ಲ. ನಮೂನೆಯನ್ನು ಖಚಿತಪಡಿಸಿ.</item>
-      <item quantity="other">ಸಾಧನವನ್ನು <xliff:g id="NUMBER_1">%d</xliff:g> ಗಂಟೆಗಳ ಕಾಲ ಅನ್‌ಲಾಕ್‌ ಮಾಡಲಾಗಿಲ್ಲ. ನಮೂನೆಯನ್ನು ಖಚಿತಪಡಿಸಿ.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">ಸಾಧನವನ್ನು <xliff:g id="NUMBER_1">%d</xliff:g> ಗಂಟೆಗಳ ಕಾಲ ಅನ್‌ಲಾಕ್‌ ಮಾಡಲಾಗಿಲ್ಲ. ಪಿನ್ ದೃಢೀಕರಿಸಿ.</item>
-      <item quantity="other">ಸಾಧನವನ್ನು <xliff:g id="NUMBER_1">%d</xliff:g> ಗಂಟೆಗಳ ಕಾಲ ಅನ್‌ಲಾಕ್‌ ಮಾಡಲಾಗಿಲ್ಲ. ಪಿನ್ ದೃಢೀಕರಿಸಿ.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">ಸಾಧನವನ್ನು <xliff:g id="NUMBER_1">%d</xliff:g> ಗಂಟೆಗಳ ಕಾಲ ಅನ್‌ಲಾಕ್‌ ಮಾಡಲಾಗಿಲ್ಲ. ಪಾಸ್‌ವರ್ಡ್‌ ಖಚಿತಪಡಿಸಿ.</item>
-      <item quantity="other">ಸಾಧನವನ್ನು <xliff:g id="NUMBER_1">%d</xliff:g> ಗಂಟೆಗಳ ಕಾಲ ಅನ್‌ಲಾಕ್‌ ಮಾಡಲಾಗಿಲ್ಲ. ಪಾಸ್‌ವರ್ಡ್‌ ಖಚಿತಪಡಿಸಿ.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"ಗುರುತಿಸಲಾಗಿಲ್ಲ"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-ko/strings.xml b/packages/Keyguard/res/values-ko/strings.xml
deleted file mode 100644
index 5d40d4d..0000000
--- a/packages/Keyguard/res/values-ko/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"키가드"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"PIN 코드 입력"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"SIM PUK 및 새 PIN 코드 입력"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM PUK 코드"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"새 SIM PIN 코드"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"비밀번호를 입력하려면 터치"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"잠금 해제하려면 비밀번호 입력"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"잠금을 해제하려면 PIN 입력"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"PIN 코드가 잘못되었습니다."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"충전됨"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"충전 중"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"고속 충전"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"저속 충전"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"충전기를 연결하세요."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"잠금해제하려면 메뉴를 누르세요."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"네트워크 잠김"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"SIM 카드가 없습니다."</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"태블릿에 SIM 카드가 없습니다."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"휴대전화에 SIM 카드가 없습니다."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"SIM 카드를 삽입하세요."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM 카드가 없거나 읽을 수 없습니다. SIM 카드를 삽입하세요."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"사용할 수 없는 SIM 카드입니다."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"SIM 카드를 완전히 사용할 수 없게 되었습니다.\n다른 SIM 카드를 사용하려면 무선 서비스 제공업체에 문의하시기 바랍니다."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM 카드가 잠겨 있습니다."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM 카드가 PUK 잠김 상태입니다."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"SIM 카드 잠금해제 중..."</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN 영역"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM PIN 영역"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM PUK 영역"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"다음 알람이 <xliff:g id="ALARM">%1$s</xliff:g>(으)로 설정되었습니다."</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Delete 키"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter 키"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"패턴을 잊음"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"잘못된 패턴"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"잘못된 비밀번호"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"잘못된 PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"<xliff:g id="NUMBER">%d</xliff:g>초 후에 다시 시도해 주세요."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"패턴 그리기"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"SIM PIN 입력"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"\'<xliff:g id="CARRIER">%1$s</xliff:g>\'의 SIM PIN을 입력합니다."</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"PIN 입력"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"비밀번호 입력"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"이제 SIM을 사용할 수 없습니다. 계속하려면 PUK 코드를 입력합니다. 자세한 내용은 이동통신사에 문의하세요."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"이제 SIM \'<xliff:g id="CARRIER">%1$s</xliff:g>\'을(를) 사용할 수 없습니다. 계속하려면 PUK 코드를 입력합니다. 자세한 내용은 이동통신사에 문의하세요."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"원하는 PIN 코드 입력"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"원하는 PIN 코드 확인"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"SIM 카드 잠금해제 중..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"4~8자리 숫자로 된 PIN을 입력하세요."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK 코드는 8자리 이상의 숫자여야 합니다."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"올바른 PUK 코드를 다시 입력하세요. 입력을 반복해서 시도하면 SIM을 영구적으로 사용할 수 없게 됩니다."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN 코드가 일치하지 않음"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"패턴 시도 횟수가 너무 많음"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"PIN을 <xliff:g id="NUMBER_0">%1$d</xliff:g>회 잘못 입력했습니다. \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g>초 후에 다시 시도해 주세요."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"비밀번호를 <xliff:g id="NUMBER_0">%1$d</xliff:g>회 잘못 입력했습니다. \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g>초 후에 다시 시도해 주세요."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"잠금해제 패턴을 <xliff:g id="NUMBER_0">%1$d</xliff:g>회 잘못 그렸습니다. \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g>초 후에 다시 시도해 주세요."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"태블릿 잠금 해제에 <xliff:g id="NUMBER_0">%1$d</xliff:g>번 실패했습니다. <xliff:g id="NUMBER_1">%2$d</xliff:g>번 더 실패하면 이 태블릿은 재설정되며 모든 데이터가 삭제됩니다."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"휴대전화 잠금 해제에 <xliff:g id="NUMBER_0">%1$d</xliff:g>번 실패했습니다. <xliff:g id="NUMBER_1">%2$d</xliff:g>번 더 실패하면 이 휴대전화는 재설정되며 모든 데이터가 삭제됩니다."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"태블릿 잠금 해제에 <xliff:g id="NUMBER">%d</xliff:g>번 실패했습니다. 이 태블릿은 재설정되며 모든 데이터가 삭제됩니다."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"휴대전화 잠금 해제에 <xliff:g id="NUMBER">%d</xliff:g>번 실패했습니다. 이 휴대전화는 재설정되며 모든 데이터가 삭제됩니다."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"태블릿 잠금 해제에 <xliff:g id="NUMBER_0">%1$d</xliff:g>번 실패했습니다. <xliff:g id="NUMBER_1">%2$d</xliff:g>번 더 실패하면 이 사용자는 삭제되며 모든 사용자 데이터가 삭제됩니다."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"휴대전화 잠금 해제에 <xliff:g id="NUMBER_0">%1$d</xliff:g>번 실패했습니다. <xliff:g id="NUMBER_1">%2$d</xliff:g>번 더 실패하면 이 사용자는 삭제되며 모든 사용자 데이터가 삭제됩니다."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"태블릿 잠금 해제에 <xliff:g id="NUMBER">%d</xliff:g>번 실패했습니다. 이 사용자는 삭제되며 모든 사용자 데이터가 삭제됩니다."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"휴대전화 잠금 해제에 <xliff:g id="NUMBER">%d</xliff:g>번 실패했습니다. 이 사용자는 삭제되며 모든 사용자 데이터가 삭제됩니다."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"태블릿 잠금 해제에 <xliff:g id="NUMBER_0">%1$d</xliff:g>번 실패했습니다. <xliff:g id="NUMBER_1">%2$d</xliff:g>번 더 실패하면 직장 프로필이 삭제되고 모든 프로필 데이터가 삭제됩니다."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"휴대전화 잠금 해제에 <xliff:g id="NUMBER_0">%1$d</xliff:g>번 실패했습니다. <xliff:g id="NUMBER_1">%2$d</xliff:g>번 더 실패하면 직장 프로필이 삭제되고 모든 프로필 데이터가 삭제됩니다."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"태블릿 잠금 해제에 <xliff:g id="NUMBER">%d</xliff:g>번 실패했습니다. 직장 프로필이 삭제되며 모든 프로필 데이터가 삭제됩니다."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"휴대전화 잠금 해제에 <xliff:g id="NUMBER">%d</xliff:g>번 실패했습니다. 직장 프로필이 삭제되며 모든 프로필 데이터가 삭제됩니다."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"잠금해제 패턴을 <xliff:g id="NUMBER_0">%1$d</xliff:g>회 잘못 그렸습니다. <xliff:g id="NUMBER_1">%2$d</xliff:g>회 더 실패하면 이메일 계정을 사용하여 태블릿을 잠금해제해야 합니다.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g>초 후에 다시 시도해 주세요."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"잠금해제 패턴을 <xliff:g id="NUMBER_0">%1$d</xliff:g>회 잘못 그렸습니다. <xliff:g id="NUMBER_1">%2$d</xliff:g>회 더 실패하면 이메일 계정을 사용하여 휴대전화를 잠금해제해야 합니다.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g>초 후에 다시 시도해 주세요."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"SIM PIN 코드가 잘못되었습니다. 이동통신사에 문의하여 기기를 잠금 해제해야 합니다."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">SIM PIN 코드가 잘못되었습니다. <xliff:g id="NUMBER_1">%d</xliff:g>번 더 시도할 수 있습니다.</item>
-      <item quantity="one">SIM PIN 코드가 잘못되었습니다. <xliff:g id="NUMBER_0">%d</xliff:g>번 더 실패하면 이동통신사에 문의하여 기기를 잠금 해제해야 합니다.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM을 사용할 수 없습니다. 이동통신사에 문의하세요."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">SIM PUK 코드가 잘못되었습니다. <xliff:g id="NUMBER_1">%d</xliff:g>번 더 실패하면 SIM을 완전히 사용할 수 없게 됩니다.</item>
-      <item quantity="one">SIM PUK 코드가 잘못되었습니다. <xliff:g id="NUMBER_0">%d</xliff:g>번 더 실패하면 SIM을 완전히 사용할 수 없게 됩니다.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"SIM PIN 작업이 실패했습니다."</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"SIM PUK 작업이 실패했습니다."</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"코드 승인 완료"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"서비스 불가"</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"입력 방법 전환"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"비행기 모드"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"기기가 다시 시작되면 패턴이 필요합니다."</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"기기가 다시 시작되면 PIN이 필요합니다."</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"기기가 다시 시작되면 비밀번호가 필요합니다."</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"보안 강화를 위해 패턴이 필요합니다."</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"보안 강화를 위해 PIN이 필요합니다."</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"보안 강화를 위해 비밀번호가 필요합니다."</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"프로필을 전환하려면 패턴이 필요합니다."</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"프로필을 전환하려면 PIN이 필요합니다."</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"프로필을 전환하려면 비밀번호가 필요합니다."</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"기기 관리자가 기기를 잠금 설정함"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"기기가 수동으로 잠금 설정됨"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other"><xliff:g id="NUMBER_1">%d</xliff:g>시간 이상 기기가 잠금 해제되지 않았습니다. 패턴을 확인하세요.</item>
-      <item quantity="one"><xliff:g id="NUMBER_0">%d</xliff:g>시간 이상 기기가 잠금 해제되지 않았습니다. 패턴을 확인하세요.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other"><xliff:g id="NUMBER_1">%d</xliff:g>시간 이상 기기가 잠금 해제되지 않았습니다. PIN을 확인하세요.</item>
-      <item quantity="one"><xliff:g id="NUMBER_0">%d</xliff:g>시간 이상 기기가 잠금 해제되지 않았습니다. PIN을 확인하세요.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other"><xliff:g id="NUMBER_1">%d</xliff:g>시간 이상 기기가 잠금 해제되지 않았습니다. 비밀번호를 확인하세요.</item>
-      <item quantity="one"><xliff:g id="NUMBER_0">%d</xliff:g>시간 이상 기기가 잠금 해제되지 않았습니다. 비밀번호를 확인하세요.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"인식할 수 없습니다."</string>
-</resources>
diff --git a/packages/Keyguard/res/values-ky/strings.xml b/packages/Keyguard/res/values-ky/strings.xml
deleted file mode 100644
index a485528..0000000
--- a/packages/Keyguard/res/values-ky/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Баскычтопту бөгөттөгүч"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"PIN кодду териңиз"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"SIM-картанын PUK-кодун, анан жаңы PIN-кодун териңиз"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM-картанын PUK-коду"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"SIM-картанын жаңы PIN-коду"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Сырсөздү терүү үчүн тийип коюңуз"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Кулпуну ачуу үчүн сырсөздү териңиз"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Кулпуну ачуу үчүн PIN кодду териңиз"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"PIN-код туура эмес."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Дүрмөттөлдү"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Кубатталууда"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Ыкчам кубатталууда"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Жай кубатталууда"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Дүрмөттөөчү түзмөктү туташтырыңыз."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Бөгөттөн чыгаруу үчүн Менюну басыңыз."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Тармак бөгөттөлгөн"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"SIM-карта жок"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Планшетте SIM-карта жок."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Телефондо SIM-карта жок."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"SIM-карта салыңыз."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM-карта жок же ал окулбай калган. SIM-карта салыңыз."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Жараксыз SIM-карта."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Сиздин SIM-картаңыз жарактан чыгып калды.\n Башка SIM-карта алыш үчүн операторуңузга кайрылыңыз."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM-карта бөгөттөлгөн."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM-карта PUK-бөгөттө."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"SIM-карта бөгөттөн чыгарылууда…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN аймагы"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM PIN аймагы"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM PUK аймагы"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Кийинки ойготкуч саат <xliff:g id="ALARM">%1$s</xliff:g> коюлган"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Жок кылуу"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Кирүү"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Үлгү унутулду"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Графикалык ачкыч туура эмес"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Сырсөз туура эмес"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"PIN-код туура эмес"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"<xliff:g id="NUMBER">%d</xliff:g> секундадан кийин кайталаңыз."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Бөгөттөн чыгаруу сүрөтүн тартыңыз"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"SIM-картанын PIN\'ин киргизиңиз"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"\"<xliff:g id="CARRIER">%1$s</xliff:g>\" үчүн SIM PIN киргизиңиз"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"PIN\'ди киргизиңиз"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Сырсөз киргизиңиз"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM-карта азыр жарактан чыкты. Улантыш үчүн, PUK-кодду киргизиңиз. Көбүрөөк маалымат үчүн операторуңузга кайрылыңыз."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"Эми SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" өчүрүлдү. Улантуу үчүн PUK кодун киргизиңиз. Анын чоо-жайын билүү үчүн операторго кайрылыңыз."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Сиз каалаган PIN-кодду териңиз"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Сиз каалаган PIN-кодду ырастаңыз"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"SIM-карта бөгөттөн чыгарылууда…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Узундугу 4төн 8ге чейинки сандан турган PIN-кодду териңиз."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK-код 8 же андан көп сандан турушу керек."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Туура PUK-кодду кайрадан териңиз. Кайталанган аракеттер SIM-картаны биротоло жараксыз кылат."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN-коддор туура келбеди"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Өтө көп үлгү киргизүү аракети болду"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Сиз PIN-кодуңузду <xliff:g id="NUMBER_0">%1$d</xliff:g> жолу туура эмес тердиңиз. \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> секундадан кийин кайталаңыз."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Сиз сырсөзүңүздү <xliff:g id="NUMBER_0">%1$d</xliff:g> жолу туура эмес тердиңиз. \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> секундадан кийин кайталаңыз."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Сиз бөгөттөн чыгаруу үлгүсүн <xliff:g id="NUMBER_0">%1$d</xliff:g> жолу туура эмес көрсөттүңүз. \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> секундадан кийин кайталаңыз."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Планшеттин кулпусун ачууда <xliff:g id="NUMBER_0">%1$d</xliff:g> жолу туура эмес аракет кылдыңыз. Дагы <xliff:g id="NUMBER_1">%2$d</xliff:g> жолу туура эмес аракет кылсаңыз, бул планшет баштапкы абалга келтирилип, андагы бардык дайындар жок болот."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Телефондун кулпусун ачууда <xliff:g id="NUMBER_0">%1$d</xliff:g> жолу туура эмес аракет кылдыңыз. Дагы <xliff:g id="NUMBER_1">%2$d</xliff:g> жолу туура эмес аракет кылсаңыз, бул телефон баштапкы абалга келтирилип, андагы бардык дайындар жок болот."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Планшеттин кулпусун ачууда <xliff:g id="NUMBER">%d</xliff:g> жолу туура эмес аракет кылдыңыз. Бул планшет баштапкы абалга келтирилип, андагы бардык дайындар жок болот."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Телефондун кулпусун ачууда <xliff:g id="NUMBER">%d</xliff:g> жолу туура эмес аракет кылдыңыз. Бул телефон баштапкы абалга келтирилип, андагы бардык дайындар жок болот."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Планшеттин кулпусун ачууда <xliff:g id="NUMBER_0">%1$d</xliff:g> жолу туура эмес аракет кылдыңыз. Дагы <xliff:g id="NUMBER_1">%2$d</xliff:g> жолу туура эмес аракет кылсаңыз, бул колдонуучу чыгарылып салынып, колдонуучунун бардык дайындары жок болот."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Телефондун кулпусун ачууда <xliff:g id="NUMBER_0">%1$d</xliff:g> жолу туура эмес аракет кылдыңыз. Дагы <xliff:g id="NUMBER_1">%2$d</xliff:g> жолу туура эмес аракет кылсаңыз, бул колдонуучу чыгарылып салынып, колдонуучунун бардык дайындары жок болот."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Планшеттин кулпусун ачууда <xliff:g id="NUMBER">%d</xliff:g> жолу туура эмес аракет кылдыңыз. Бул колдонуучу чыгарылып салынып, колдонуучунун бардык дайындары жок болот."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Телефондун кулпусун ачууда <xliff:g id="NUMBER">%d</xliff:g> жолу туура эмес аракет кылдыңыз. Бул колдонуучу чыгарылып салынып, колдонуучунун бардык дайындары жок болот."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Планшетиңиздин кулпусун ачууда <xliff:g id="NUMBER_0">%1$d</xliff:g> жолу туура эмес аракет кылдыңыз. Дагы <xliff:g id="NUMBER_1">%2$d</xliff:g> жолу туура эмес аракет кылсаңыз, жумуш профилиңиз чыгарылып салынып, профилдин бардык дайындары жок болот."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Телефондун кулпусун ачууда <xliff:g id="NUMBER_0">%1$d</xliff:g> жолу туура эмес аракет кылдыңыз. Дагы <xliff:g id="NUMBER_1">%2$d</xliff:g> жолу туура эмес аракет кылсаңыз, жумуш профилиңиз чыгарылып салынып, профилдин бардык дайындары жок болот."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Планшеттин кулпусун ачууда <xliff:g id="NUMBER">%d</xliff:g> жолу туура эмес аракет кылдыңыз. Жумуш профили чыгарылып салынып, андагы бардык дайындар жок болот."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Телефондун кулпусун ачууда <xliff:g id="NUMBER">%d</xliff:g> жолу туура эмес аракет кылдыңыз. Жумуш профили чыгарылып салынып, андагы бардык дайындар жок болот."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Сиз бөгөттөн чыгаруу үлгүсүн <xliff:g id="NUMBER_0">%1$d</xliff:g> жолу туура эмес көрсөттүңүз. Дагы <xliff:g id="NUMBER_1">%2$d</xliff:g> ийгиликсиз аракеттен кийин, планшетиңизди эмейл эсебиңиз аркылуу бөгөттөн чыгаруу талап кылынат.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> секундадан кийин кайра аракеттениңиз."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Сиз бөгөттөн чыгаруу үлгүсүн <xliff:g id="NUMBER_0">%1$d</xliff:g> жолу туура эмес көрсөттүңүз. Дагы <xliff:g id="NUMBER_1">%2$d</xliff:g> ийгиликсиз аракеттен кийин, телефонуңузду эмейл эсебиңиз аркылуу бөгөттөн чыгаруу талап кылынат.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> секундадан кийин кайра аракеттениңиз."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"SIM-карта PIN-коду туура эмес. Эми түзмөктү бөгөттөн чыгарыш үчүн операторуңузга кайрылышыңыз керек."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">SIM PIN-коду туура эмес, сизде <xliff:g id="NUMBER_1">%d</xliff:g> аракет калды.</item>
-      <item quantity="one">SIM PIN-коду туура эмес, сизде <xliff:g id="NUMBER_0">%d</xliff:g> аракет калды. Болбосо, түзмөктүн кулпусун ачуу үчүн операторуңузга кайрылышыңыз керек.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM-карта жараксыз. Операторуңузга кайрылыңыз."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">SIM PUK-коду туура эмес, SIM биротоло жарактан чыгаарынан мурун сизде <xliff:g id="NUMBER_1">%d</xliff:g> аракет калды.</item>
-      <item quantity="one">SIM PUK-коду туура эмес, SIM биротоло жарактан чыгаарынан мурун сизде <xliff:g id="NUMBER_0">%d</xliff:g> аракет калды.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"SIM-картанын PIN-кодун ачуу кыйрады!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"SIM-картанын PUK-кодун ачуу кыйрады!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Код кабыл алынды!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Байланыш жок."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Киргизүү ыкмасын өзгөртүү"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Учак режими"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Түзмөк кайра күйгүзүлгөндөн кийин графикалык ачкыч талап кылынат"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Түзмөк кайра күйгүзүлгөндөн кийин PIN код талап кылынат"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Түзмөк кайра күйгүзүлгөндөн кийин сырсөз талап кылынат"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Коопсуздукту бекемдөө үчүн графикалык ачкыч талап кылынат"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Коопсуздукту бекемдөө үчүн PIN код талап кылынат"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Коопсуздукту бекемдөө үчүн сырсөз талап кылынат"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Профилдерди которуштурганда графикалык ачкыч талап кылынат"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Профилдерди которуштурганда PIN код талап кылынат"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Профилдерди которуштурганда сырсөз талап кылынат"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Түзмөк башкаргычы түзмөктү кулпулап койду"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Түзмөк кол менен кулпуланды"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Түзмөктүн кулпусу <xliff:g id="NUMBER_1">%d</xliff:g> саат бою ачылган жок. Cүрөт үлгүсүн ырастаңыз.</item>
-      <item quantity="one">Түзмөктүн кулпусу <xliff:g id="NUMBER_0">%d</xliff:g> саат бою ачылган жок. Cүрөт үлгүсүн ырастаңыз.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Түзмөктүн кулпусу <xliff:g id="NUMBER_1">%d</xliff:g> саат бою ачылган жок. PIN\'ди ырастаңыз.</item>
-      <item quantity="one">Түзмөктүн кулпусу <xliff:g id="NUMBER_0">%d</xliff:g> саат бою ачылган жок. PIN\'ди ырастаңыз.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Түзмөктүн кулпусу <xliff:g id="NUMBER_1">%d</xliff:g> саат бою ачылган жок. Сырсөздү ырастаңыз.</item>
-      <item quantity="one">Түзмөктүн кулпусу <xliff:g id="NUMBER_0">%d</xliff:g> саат бою ачылган жок. Сырсөздү ырастаңыз.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Таанылган жок"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-lo/strings.xml b/packages/Keyguard/res/values-lo/strings.xml
deleted file mode 100644
index 29a1b56..0000000
--- a/packages/Keyguard/res/values-lo/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Keyguard"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"ພິມລະຫັດ PIN"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"ປະເພດ PUK ຂອງ SIM ແລະລະຫັດ PIN ໃໝ່"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"ລະຫັດ PUK ຂອງ SIM"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"ລະຫັດ PIN ໃໝ່ຂອງ SIM"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"ແຕະເພື່ອພິມລະຫັດຜ່ານ"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"ພິມລະຫັດເພື່ອປົດລັອກ"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"ພິມລະຫັດ PIN ເພື່ອປົດລັອກ"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"ລະຫັດ PIN ບໍ່ຖືກຕ້ອງ."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"ສາກເຕັມແລ້ວ"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"ກຳລັງສາກໄຟ"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"ກຳ​ລັງ​ສາກ​ດ່ວນ"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"ກຳ​ລັງ​ສາກ​ຊ້າໆ"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"ເຊື່ອມຕໍ່ອຸປະກອນສາກຂອງທ່ານ."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"ກົດເມນູເພື່ອປົດລັອກ."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"ເຄືອຂ່າຍຖືກລັອກ"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"ບໍ່ມີຊິມກາດ"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"ບໍ່ມີຊິມກາດໃນແທັບເລັດ."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"ບໍ່ມີຊິມກາດຢູ່ໃນໂທລະສັບ."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"ໃສ່ SIM card."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"ບໍ່ພົບເຫັນຊິມກາດ ຫຼືບໍ່ສາມາດອ່ານຊິມກາດໄດ້. ກະລຸນາໃສ່ຊິມກາດໃໝ່."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"SIM card ບໍ່ສາມາດໃຊ້ໄດ້."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"SIM card ຂອງທ່ານຖືກປິດການນຳໃຊ້ຢ່າງຖາວອນແລ້ວ.\n ຕິດຕໍ່ຜູ່ໃຫ້ບໍລິການລະບົບຂອງທ່ານເພື່ອຂໍ SIM card ໃໝ່."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"ຊິມກາດຖືກລັອກ."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"ຊິມກາດຖືກລັອກດ້ວຍລະຫັດ PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"ກຳລັງປົດລັອກຊິມກາດ..."</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"ພື້ນ​ທີ່ PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"ພື້ນ​ທີ່ PIN ຂອງ SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"ພື້ນ​ທີ່ PUK ຂອງ SIM"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"​ໂມງ​ປຸກ​ຕໍ່​ໄປ​ຖືກ​ຕັ້ງ​ໄວ້​ເວ​ລາ <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"ລຶບ"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"ລືມຮູບແບບປົດລັອກ?"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"ຮູບແບບຜິດ"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"ລະຫັດຜ່ານບໍ່ຖືກຕ້ອງ"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"ລະຫັດ PIN ຜິດ"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"ລອງໃໝ່ໃນອີກ <xliff:g id="NUMBER">%d</xliff:g> ວິນາທີ."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"ແຕ້ມຮູບແບບປົດລັອກຂອງທ່ານ"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"ໃສ່ລະຫັດ PIN ຂອງຊິມ"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"ປ້ອນ SIM PIN ສຳ​ລັບ \"<xliff:g id="CARRIER">%1$s</xliff:g>\" ເຂົ້າ​ໄປ"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"ໃສ່ລະຫັດ PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"ໃສ່ລະຫັດຜ່ານ"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"ຊິມຖືກປິດການນຳໃຊ້ແລ້ວ. ປ້ອນລະຫັດ PUK ເພື່ອດຳເນີນການຕໍ່. ຕິດຕໍ່ຜູ່ໃຫ້ບໍລິການສຳລັບລາຍລະອຽດ."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"ດຽວ​ນີ້ \"<xliff:g id="CARRIER">%1$s</xliff:g>\" SIM ປິດ​ໃຊ້​ງານ. ປ້ອນ​ລະ​ຫັດ PUK ເພື່ອ​ສືບ​ຕໍ່. ຕິດ​ຕໍ່​ບໍ​ລິ​ສັດ​ໃຫ້​ບໍ​ລິ​ການ ເພື່ອ​ຂໍ​ລາຍ​ລະ​ອຽດ."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"ໃສ່ລະຫັດ PIN ທີ່ຕ້ອງການ."</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"ຢືນຢັນລະຫັດ PIN ທີ່ຕ້ອງການ"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"ປົດລັອກ SIM card..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"ພິມລະຫັດ PIN ຄວາມຍາວ 4 ເຖິງ 8 ໂຕເລກ."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"ລະຫັດ PUK ຄວນມີຢ່າງໜ້ອຍ 8 ໂຕເລກ."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"ປ້ອນລະຫັດ PUK ທີ່ຖືກຕ້ອງຄືນໃໝ່. ການພະຍາຍາມໃສ່ຫຼາຍເທື່ອຈະເຮັດໃຫ້ຊິມກາດໃຊ້ບໍ່ໄດ້ຖາວອນ."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"ລະຫັດ PIN ບໍ່ກົງກັນ"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"ແຕ້ມຮູບແບບປົດລັອກຫຼາຍເກີນໄປ"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"ທ່ານພິມລະຫັດ PIN​ ຂອງທ່ານຜິດ <xliff:g id="NUMBER_0">%1$d</xliff:g> ເທື່ອແລ້ວ. \n\nກະລຸນາລອງໃໝ່ໃນອີກ <xliff:g id="NUMBER_1">%2$d</xliff:g> ວິນາທີ."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"ທ່ານພິມລະຫັດຜິດ <xliff:g id="NUMBER_0">%1$d</xliff:g> ເທື່ອແລ້ວ. \n\nລອງໃໝ່ໃນອີກ <xliff:g id="NUMBER_1">%2$d</xliff:g> ວິນາທີ."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"ທ່ານແຕ້ມຮູບແບບປົດລັອກຂອງທ່ານຜິດ <xliff:g id="NUMBER_0">%1$d</xliff:g> ເທື່ອແລ້ວ. \n\nກະລຸນາລອງໃໝ່ໃນອີກ <xliff:g id="NUMBER_1">%2$d</xliff:g> ວິນາທີ."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"ທ່ານ​ພະ​ຍາ​ຍາມ​ປົດ​ລ​ັອກ​ແທັບ​ເລັດ​ບໍ່​ຖືກ​ຕ້ອງ <xliff:g id="NUMBER_0">%1$d</xliff:g> ຄັ້ງ. ຫຼັງ​ຈາກ​ລອງ​ບໍ່​ສຳ​ເລັດ​ອີກ <xliff:g id="NUMBER_1">%2$d</xliff:g> ຄັ້ງ, ແທັບ​ເລັດ​ນີ້​ຈະ​ຖືກ​ຕັ້ງ​ຄ່າ​ໃໝ່, ເຊິ່ງ​ຈະ​ລຶບ​ທຸກ​ຂໍ້​ມູນ​ຂອງ​ມັນ."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"ທ່ານ​ພະ​ຍາ​ຍາມ​ປົດ​ລ​ັອກ​ໂທ​ລະ​ສັບ​ບໍ່​ຖືກ​ຕ້ອງ <xliff:g id="NUMBER_0">%1$d</xliff:g> ຄັ້ງ. ຫຼັງ​ຈາກ​ລອງ​ບໍ່​ສຳ​ເລັດ​ອີກ <xliff:g id="NUMBER_1">%2$d</xliff:g> ຄັ້ງ, ໂທ​ລະ​ສັບ​ນີ້​ຈະ​ຖືກ​ຕັ້ງ​ຄ່າ​ໃໝ່, ເຊິ່ງ​ຈະ​ລຶບ​ທຸກ​ຂໍ້​ມູນຂອງ​ມັນ."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"ທ່ານ​ພະ​ຍາ​ຍາມ​ປົດ​ລ​ັອກ​ແທັບ​ເລັດ​ບໍ່​ຖືກ​ຕ້ອງ <xliff:g id="NUMBER">%d</xliff:g> ຄັ້ງ. ແທັບ​ເລັດ​ນີ້​ຈະ​ຖືກ​ຕັ້ງ​ຄ່າ​ໃໝ່, ເຊິ່ງ​ຈະ​ລຶບ​ທຸກ​ຂໍ້​ມູນ​ຂອງ​ມັນ."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"ທ່ານ​ພະ​ຍາ​ຍາມ​ປົດ​ລ​ັອກ​ໂທ​ລະ​ສັບ​ບໍ່​ຖືກ​ຕ້ອງ <xliff:g id="NUMBER">%d</xliff:g> ຄັ້ງ. ໂທ​ລະ​ສັບ​ນີ້​ຈະ​ຖືກ​ຕັ້ງ​ຄ່າ​ໃໝ່, ເຊິ່ງ​ຈະ​ລຶບ​ທຸກ​ຂໍ້​ມູນ​ຂອງ​ມັນ."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"ທ່ານ​ພະ​ຍາ​ຍາມ​ປົດ​ລ​ັອກ​ແທັບ​ເລັດ​ບໍ່​ຖືກ​ຕ້ອງ <xliff:g id="NUMBER_0">%1$d</xliff:g> ຄັ້ງ. ຫຼັງ​ຈາກ​ລອງ​ບໍ່​ສຳ​ເລັດ​ອີກ <xliff:g id="NUMBER_1">%2$d</xliff:g> ຄັ້ງ, ຜູ້​ໃຊ້​ນີ້​ຈະ​ຖືກ​ເອົາ​ອອກ​ໄປ, ເຊິ່ງ​ຈະ​ລຶບ​ທຸກ​ຂໍ້​ມູນຜູ້​ໃຊ້."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"ທ່ານ​ພະ​ຍາ​ຍາມ​ປົດ​ລ​ັອກ​ໂທ​ລະ​ສັບ​ບໍ່​ຖືກ​ຕ້ອງ <xliff:g id="NUMBER_0">%1$d</xliff:g> ຄັ້ງ. ຫຼັງ​ຈາກ​ລອງ​ບໍ່​ສຳ​ເລັດ​ອີກ <xliff:g id="NUMBER_1">%2$d</xliff:g> ຄັ້ງ, ຜູ້​ໃຊ້​ນີ້ຈະ​ຖືກ​ເອົາ​ອອກ​ໄປ, ເຊິ່ງ​ຈະ​ລຶບ​ທຸກ​ຂໍ້​ມູນຜູ້​ໃຊ້."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"ທ່ານ​ພະ​ຍາ​ຍາມ​ປົດ​ລ​ັອກ​ແທັບ​ເລັດ​ບໍ່​ຖືກ​ຕ້ອງ <xliff:g id="NUMBER">%d</xliff:g> ຄັ້ງ. ຜູ້​ໃຊ້​ນີ້​ຈະ​ຖືກ​ເອົາ​ອອກ​ໄປ, ເຊິ່ງ​ຈະ​ລຶບ​ທຸກ​ຂໍ້​ມູນຜູ້​ໃຊ້."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"ທ່ານ​ພະ​ຍາ​ຍາມ​ປົດ​ລ​ັອກ​ໂທ​ລະ​ສັບ​ບໍ່​ຖືກ​ຕ້ອງ <xliff:g id="NUMBER">%d</xliff:g> ຄັ້ງ. ຜູ້​ໃຊ້​ນີ້​ຈະ​ຖືກ​ເອົາ​ອອກ​ໄປ, ເຊິ່ງ​ຈະ​ລຶບ​ທຸກ​ຂໍ້​ມູນຜູ້​ໃຊ້."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"ທ່ານ​ພະ​ຍາ​ຍາມ​ປົດ​ລ​ັອກ​ແທັບ​ເລັດ​ບໍ່​ຖືກ​ຕ້ອງ <xliff:g id="NUMBER_0">%1$d</xliff:g> ຄັ້ງ. ຫຼັງ​ຈາກ​ລອງ​ບໍ່​ສຳ​ເລັດ​ອີກ <xliff:g id="NUMBER_1">%2$d</xliff:g> ຄັ້ງ, ໂປ​ຣ​ໄຟ​ລ໌​ບ່ອນ​ເຮັດ​ວຽກ​ຈະ​ຖືກ​ເອົາ​ອອກ​ໄປ, ເຊິ່ງ​ຈະ​ລຶບ​ທຸກ​ຂໍ້​ມູນ​ໂປ​ຣ​ໄຟ​ລ໌."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"ທ່ານ​ພະ​ຍາ​ຍາມ​ປົດ​ລ​ັອກ​ໂທ​ລະ​ສັບ​ບໍ່​ຖືກ​ຕ້ອງ <xliff:g id="NUMBER_0">%1$d</xliff:g> ຄັ້ງ. ຫຼັງ​ຈາກ​ລອງ​ບໍ່​ສຳ​ເລັດ​ອີກ <xliff:g id="NUMBER_1">%2$d</xliff:g> ຄັ້ງ, ໂປ​ຣ​ໄຟ​ລ໌​ບ່ອນ​ເຮັດ​ວຽກ​ຈະ​ຖືກ​ເອົາ​ອອກ​ໄປ, ເຊິ່ງ​ຈະ​ລຶບ​ທຸກ​ຂໍ້​ມູນ​ໂປ​ຣ​ໄຟ​ລ໌."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"ທ່ານ​ພະ​ຍາ​ຍາມ​ປົດ​ລ​ັອກ​ແທັບ​ເລັດ​ບໍ່​ຖືກ​ຕ້ອງ <xliff:g id="NUMBER">%d</xliff:g> ຄັ້ງ. ໂປ​ຣ​ໄຟ​ລ໌​ບ່ອນ​ເຮັດ​ວຽກ​ຈະ​ຖືກ​ເອົາ​ອອກ​ໄປ, ເຊິ່ງ​ຈະ​ລຶບ​ທຸກ​ຂໍ້​ມູນ​ໂປ​ຣ​ໄຟ​ລ໌."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"ທ່ານ​ພະ​ຍາ​ຍາມ​ປົດ​ລ​ັອກ​ໂທ​ລະ​ສັບ​ບໍ່​ຖືກ​ຕ້ອງ <xliff:g id="NUMBER">%d</xliff:g> ຄັ້ງ. ໂປ​ຣ​ໄຟ​ລ໌​ບ່ອນ​ເຮັດ​ວຽກ​ຈະ​ຖືກ​ເອົາ​ອອກ​ໄປ, ເຊິ່ງ​ຈະ​ລຶບ​ທຸກ​ຂໍ້​ມູນ​ໂປ​ຣ​ໄຟ​ລ໌."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"ທ່ານແຕ້ມຮູບແບບປົດລັອກຜິດ <xliff:g id="NUMBER_0">%1$d</xliff:g> ເທື່ອແລ້ວ. ຫຼັງຈາກແຕ້ມຜິດອີກ <xliff:g id="NUMBER_1">%2$d</xliff:g> ເທື່ອ, ທ່ານຈະຖືກຖາມໃຫ້ປົດລັອກແທັບເລັດຂອງທ່ານ ດ້ວຍການເຂົ້າສູ່ລະບົບໂດຍໃຊ້ອີເມວຂອງທ່ານ.\n\n ກະລຸນາລອງໃໝ່ອີກຄັ້ງໃນອີກ <xliff:g id="NUMBER_2">%3$d</xliff:g> ວິນາທີ."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"ທ່ານແຕ້ມຮູບແບບປົດລັອກຂອງທ່ານຜິດ <xliff:g id="NUMBER_0">%1$d</xliff:g> ເທື່ອແລ້ວ. ຫຼັງຈາກຄວາມພະຍາຍາມອີກ <xliff:g id="NUMBER_1">%2$d</xliff:g> ເທື່ອ ທ່ານຈະຖືກຖາມໃຫ້ປົດລັອກໂທລະສັບຂອງທ່ານດ້ວຍບັນຊີອີເມວ.\n\n ລອງໃໝ່ອີກຄັ້ງໃນ <xliff:g id="NUMBER_2">%3$d</xliff:g> ວິນາທີ."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"ລະຫັດ PIN ຂອງ SIM ບໍ່ຖືກຕ້ອງທ່ານຕ້ອງຕິດຕໍ່ຫາຜູ່ໃຫ້ບໍລິການ ເພື່ອປົດລັອກອຸປະກອນຂອງທ່ານ."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">ລະຫັດ SIM PIN ບໍ່ຖືກຕ້ອງ, ທ່ານຍັງພະຍາຍາມໄດ້ອີກ <xliff:g id="NUMBER_1">%d</xliff:g> ຄັ້ງ.</item>
-      <item quantity="one">ລະຫັດ PIN ຂອງ SIM ບໍ່ຖືກຕ້ອງ, ທ່ານສາມາດລອງໄດ້ອີກ <xliff:g id="NUMBER_0">%d</xliff:g> ເທື່ອກ່ອນທີ່ທ່ານຈະຕ້ອງຕິດຕໍ່ຫາຜູ່ໃຫ້ບໍລິການຂອງທ່ານ ເພື່ອປົດລັອກອຸປະກອນຂອງທ່ານ.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM ໃຊ້ບໍ່ໄດ້ແລ້ວ. ກະລຸນາຕິດຕໍ່ຫາຜູ່ໃຫ້ບໍລິການຂອງທ່ານ."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">ລະຫັດ PUK ຂອງ SIM ບໍ່ຖືກຕ້ອງ, ທ່ານສາມາດລອງໄດ້ອີກ <xliff:g id="NUMBER_1">%d</xliff:g> ເທື່ອກ່ອນທີ່ SIM ຂອງທ່ານຈະໃຊ້ບໍ່ໄດ້ຢ່າງຖາວອນ.</item>
-      <item quantity="one">ລະຫັດ PUK ຂອງ SIM ບໍ່ຖືກຕ້ອງ, ທ່ານສາມາດລອງໄດ້ອີກ <xliff:g id="NUMBER_0">%d</xliff:g> ເທື່ອກ່ອນທີ່ SIM ຂອງທ່ານຈະໃຊ້ບໍ່ໄດ້ຢ່າງຖາວອນ.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"PIN ຂອງ SIM ເຮັດວຽກລົ້ມເຫຼວ!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"PUK ຂອງ SIM ເຮັດວຽກລົ້ມເຫຼວ!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"ລະ​ຫັດ​ຖືກຕອບຮັບແລ້ວ!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"ບໍ່ມີບໍລິການ"</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"ສະລັບຮູບແບບການປ້ອນຂໍ້ມູນ"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"ໂໝດໃນຍົນ"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"ຈຳເປັນຕ້ອງມີແບບຮູບ ຫຼັງຈາກອຸປະກອນເລີ່ມລະບົບໃໝ່"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"ຈຳເປັນຕ້ອງມີ PIN ຫຼັງຈາກອຸປະກອນເລີ່ມລະບົບໃໝ່"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"ຈຳເປັນຕ້ອງມີລະຫັດຜ່ານ ຫຼັງຈາກອຸປະກອນເລີ່ມລະບົບໃໝ່"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"ຈຳ​ເປັນ​ຕ້ອງ​ມີ​​ແບບຮູບເພື່ອ​ຄວາມ​ປອດ​ໄພ​ເພີ່ມ​ເຕີມ"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"ຈຳ​ເປັນ​ຕ້ອງ​ມີ PIN ​ເພື່ອ​ຄວາມ​ປອດ​ໄພ​ເພີ່ມ​ເຕີມ"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"ຈຳ​ເປັນ​ຕ້ອງ​ມີ​ລະ​ຫັດ​ຜ່ານ​ເພື່ອ​ຄວາມ​ປອດ​ໄພ​ເພີ່ມ​ເຕີມ"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"ຈຳເປັນຕ້ອງມີແບບຮູບ ເມື່ອທ່ານປ່ຽນໂປຣໄຟລ໌"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"ຈຳເປັນຕ້ອງມີ PIN ເມື່ອທ່ານປ່ຽນໂປຣໄຟລ໌"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"ຈຳເປັນຕ້ອງມີລະຫັດຜ່ານ ເມື່ອທ່ານປ່ຽນໂປຣໄຟລ໌"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"ອຸປະກອນຖືກລັອກໂດຍຜູ້ເບິ່ງແຍງລະບົບ"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"ອຸປະກອນຖືກສັ່ງໃຫ້ລັອກ"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">ອຸປະກອນບໍ່ໄດ້ຖືກປົດລັອກເປັນເວລາ <xliff:g id="NUMBER_1">%d</xliff:g> ຊົ່ວໂມງ. ຢືນ​ຢັນ​​ແບບຮູບ​.</item>
-      <item quantity="one">ອຸປະກອນບໍ່ໄດ້ຖືກປົດລັອກເປັນເວລາ <xliff:g id="NUMBER_0">%d</xliff:g> ຊົ່ວໂມງ. ຢືນຢັນແບບຮູບ.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">ອຸປະກອນບໍ່ໄດ້ຖືກປົດລັອກເປັນເວລາ <xliff:g id="NUMBER_1">%d</xliff:g> ຊົ່ວໂມງ. ຢືນ​ຢັນ​ PIN</item>
-      <item quantity="one">ອຸປະກອນບໍ່ໄດ້ຖືກປົດລັອກເປັນເວລາ <xliff:g id="NUMBER_0">%d</xliff:g> ຊົ່ວໂມງ. ຢືນ​ຢັນ​ PIN</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">ອຸປະກອນບໍ່ໄດ້ຖືກປົດລັອກເປັນເວລາ <xliff:g id="NUMBER_1">%d</xliff:g> ຊົ່ວໂມງ. ຢືນຢັນລະຫັດຜ່ານ.</item>
-      <item quantity="one">ອຸປະກອນບໍ່ໄດ້ຖືກປົດລັອກເປັນເວລາ <xliff:g id="NUMBER_0">%d</xliff:g> ຊົ່ວໂມງ. ຢືນຢັນລະຫັດຜ່ານ.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"ບໍ່​ຈົດ​ຈຳ​ໄດ້"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-lt/strings.xml b/packages/Keyguard/res/values-lt/strings.xml
deleted file mode 100644
index fd41efc..0000000
--- a/packages/Keyguard/res/values-lt/strings.xml
+++ /dev/null
@@ -1,142 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Klaviatūros apsauga"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Įveskite PIN kodą"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Įveskite SIM kortelės PUK kodą ir naują PIN kodą"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM kortelės PUK kodas"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Naujas SIM kortelės PIN kodas"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Palieskite, kad įves. slaptaž."</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Jei norite atrakinti, įveskite slaptažodį"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Jei norite atrakinti, įveskite PIN kodą"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Neteisingas PIN kodas."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Įkrauta"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Kraunama"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Greitai kraunama"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Lėtai kraunama"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Prijunkite įkroviklį."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Jei norite atrakinti, paspauskite „Meniu“."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Tinklas užrakintas"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Nėra SIM kortelės"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Planšetiniame kompiuteryje nėra SIM kortelės."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Telefone nėra SIM kortelės."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Įdėkite SIM kortelę."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"Trūksta SIM kortelės arba ji neskaitoma. Įdėkite SIM kortelę."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Negalima naudoti SIM kortelės."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"SIM kortelė visam laikui neleidžiama.\n Jei norite gauti kitą SIM kortelę, susisiekite su belaidžio ryšio paslaugos teikėju."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM kortelė užrakinta."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM kortelė užrakinta PUK kodu."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Atrakinama SIM kortelė…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN kodo sritis"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM kortelės PIN kodo sritis"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM kortelės PUK kodo sritis"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Kitas nustatytas signalas: <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Ištrinti"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Įvesti"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Pamiršau atrakinimo piešinį"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Netinkamas atrakinimo piešinys"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Netinkamas slaptažodis"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Netinkamas PIN kodas"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Bandyti dar kartą po <xliff:g id="NUMBER">%d</xliff:g> sek."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Nupieškite atrakinimo piešinį"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Įveskite SIM PIN kodą"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Įveskite „<xliff:g id="CARRIER">%1$s</xliff:g>“ SIM kortelės PIN kodą"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Įveskite PIN kodą"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Įveskite slaptažodį"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"Dabar SIM neleidžiama. Jei norite tęsti, įveskite PUK kodą. Jei reikia išsamios informacijos, susisiekite su operatoriumi."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"„<xliff:g id="CARRIER">%1$s</xliff:g>“ SIM kortelė išjungta. Jei norite tęsti, įveskite PUK kodą. Jei reikia išsamios informacijos, susisiekite su operatoriumi."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Įveskite pageidaujamą PIN kodą"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Patvirtinkite pageidaujamą PIN kodą"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Atrakinama SIM kortelė…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Įveskite PIN kodą, sudarytą iš 4–8 skaičių."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK kodas turėtų būti mažiausiai 8 skaitmenų."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Pakartotinai įveskite tinkamą PUK kodą. Pakartotinai bandant SIM bus neleidžiama visam laikui."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN kodai neatitinka"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Per daug atrakinimo piešinių bandymų"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"PIN kodą netinkamai įvedėte <xliff:g id="NUMBER_0">%1$d</xliff:g> k. \n\nBandykite dar kartą po <xliff:g id="NUMBER_1">%2$d</xliff:g> sek."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Neteisingai įvedėte slaptažodį <xliff:g id="NUMBER_0">%1$d</xliff:g> k. \n\nBandykite dar kartą po <xliff:g id="NUMBER_1">%2$d</xliff:g> sek."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Netinkamai nupiešėte atrakinimo piešinį <xliff:g id="NUMBER_0">%1$d</xliff:g> k. \n\nBandykite dar kartą po <xliff:g id="NUMBER_1">%2$d</xliff:g> sek."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"<xliff:g id="NUMBER_0">%1$d</xliff:g> kart. nesėkmingai bandėte atrakinti planšetinį kompiuterį. Po dar <xliff:g id="NUMBER_1">%2$d</xliff:g> nesėkming. bandym. šis planšetinis kompiuteris bus nustatytas iš naujo ir visi jo duomenys bus ištrinti."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"<xliff:g id="NUMBER_0">%1$d</xliff:g> kart. nesėkmingai bandėte atrakinti telefoną. Po dar <xliff:g id="NUMBER_1">%2$d</xliff:g> nesėkming. bandym. šis telefonas bus nustatytas iš naujo ir visi jo duomenys bus ištrinti."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"<xliff:g id="NUMBER">%d</xliff:g> kart. nesėkmingai bandėte atrakinti planšetinį kompiuterį. Planšetinis kompiuteris bus nustatytas iš naujo ir visi jo duomenys bus ištrinti."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"<xliff:g id="NUMBER">%d</xliff:g> kart. nesėkmingai bandėte atrakinti telefoną. Telefonas bus nustatytas iš naujo ir visi jo duomenys bus ištrinti."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"<xliff:g id="NUMBER_0">%1$d</xliff:g> kart. nesėkmingai bandėte atrakinti planšetinį kompiuterį. Po dar <xliff:g id="NUMBER_1">%2$d</xliff:g> nesėkming. bandym. šis naudotojas bus pašalintas ir visi naudotojo duomenys bus ištrinti."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"<xliff:g id="NUMBER_0">%1$d</xliff:g> kart. nesėkmingai bandėte atrakinti telefoną. Po dar <xliff:g id="NUMBER_1">%2$d</xliff:g> nesėkming. bandym. šis naudotojas bus pašalintas ir visi naudotojo duomenys bus ištrinti."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"<xliff:g id="NUMBER">%d</xliff:g> kart. nesėkmingai bandėte atrakinti planšetinį kompiuterį. Naudotojas bus pašalintas ir visi naudotojo duomenys bus ištrinti."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"<xliff:g id="NUMBER">%d</xliff:g> kart. nesėkmingai bandėte atrakinti telefoną. Naudotojas bus pašalintas ir visi naudotojo duomenys bus ištrinti."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"<xliff:g id="NUMBER_0">%1$d</xliff:g> kart. nesėkmingai bandėte atrakinti planšetinį kompiuterį. Po dar <xliff:g id="NUMBER_1">%2$d</xliff:g> nesėkming. bandym. darbo profilis bus pašalintas ir visi profilio duomenys bus ištrinti."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"<xliff:g id="NUMBER_0">%1$d</xliff:g> kart. nesėkmingai bandėte atrakinti telefoną. Po dar <xliff:g id="NUMBER_1">%2$d</xliff:g> nesėkming. bandym. darbo profilis bus pašalintas ir visi profilio duomenys bus ištrinti."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"<xliff:g id="NUMBER">%d</xliff:g> kart. nesėkmingai bandėte atrakinti planšetinį kompiuterį. Darbo profilis bus pašalintas ir visi profilio duomenys bus ištrinti."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"<xliff:g id="NUMBER">%d</xliff:g> kart. nesėkmingai bandėte atrakinti telefoną. Darbo profilis bus pašalintas ir visi profilio duomenys bus ištrinti."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Netinkamai nupiešėte atrakinimo piešinį <xliff:g id="NUMBER_0">%1$d</xliff:g> k. Po dar <xliff:g id="NUMBER_1">%2$d</xliff:g> nesėkm. band. būsite paprašyti atrakinti planšetinį kompiuterį naudodami „Google“ prisijungimo duomenis.\n\n Bandykite dar kartą po <xliff:g id="NUMBER_2">%3$d</xliff:g> sek."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Netinkamai nupiešėte atrakinimo piešinį <xliff:g id="NUMBER_0">%1$d</xliff:g> k. Po dar <xliff:g id="NUMBER_1">%2$d</xliff:g> nesėkm. band. būsite paprašyti atrakinti telefoną naudodami „Google“ prisijungimo duomenis.\n\n Bandykite dar kartą po <xliff:g id="NUMBER_2">%3$d</xliff:g> sek."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Netinkamas SIM kortelės PIN kodas. Reikės susisiekti su operatoriumi, kad atrakintų įrenginį."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">Netinkamas SIM kortelės PIN kodas. Liko <xliff:g id="NUMBER_1">%d</xliff:g> bandymas.</item>
-      <item quantity="few">Netinkamas SIM kortelės PIN kodas. Liko <xliff:g id="NUMBER_1">%d</xliff:g> bandymai.</item>
-      <item quantity="many">Netinkamas SIM kortelės PIN kodas. Liko <xliff:g id="NUMBER_1">%d</xliff:g> bandymo.</item>
-      <item quantity="other">Netinkamas SIM kortelės PIN kodas. Liko <xliff:g id="NUMBER_1">%d</xliff:g> bandymų.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"Nebegalima naudoti SIM kortelės. Susisiekite su operatoriumi."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">Netinkamas SIM kortelės PUK kodas. Liko <xliff:g id="NUMBER_1">%d</xliff:g> bandymas. Tada nebegalėsite naudotis SIM kortele.</item>
-      <item quantity="few">Netinkamas SIM kortelės PUK kodas. Liko <xliff:g id="NUMBER_1">%d</xliff:g> bandymai. Tada nebegalėsite naudotis SIM kortele.</item>
-      <item quantity="many">Netinkamas SIM kortelės PUK kodas. Liko <xliff:g id="NUMBER_1">%d</xliff:g> bandymo. Tada nebegalėsite naudotis SIM kortele.</item>
-      <item quantity="other">Netinkamas SIM kortelės PUK kodas. Liko <xliff:g id="NUMBER_1">%d</xliff:g> bandymų. Tada nebegalėsite naudotis SIM kortele.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Nepavyko atlikti SIM kortelės PIN kodo operacijos."</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Nepavyko atlikti SIM kortelės PUK kodo operacijos."</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Kodas priimtas."</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Nėra paslaugos."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Perjungti įvesties metodą"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Lėktuvo režimas"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Iš naujo paleidus įrenginį būtinas atrakinimo piešinys"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Iš naujo paleidus įrenginį būtinas PIN kodas"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Iš naujo paleidus įrenginį būtinas slaptažodis"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Norint užtikrinti papildomą saugumą būtinas atrakinimo piešinys"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Norint užtikrinti papildomą saugumą būtinas PIN kodas"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Norint užtikrinti papildomą saugumą būtinas slaptažodis"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Perjungiant profilius būtinas atrakinimo piešinys"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Perjungiant profilius būtinas PIN kodas"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Perjungiant profilius būtinas slaptažodis"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Įrenginio administratorius užrakino įrenginį"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Įrenginys užrakintas neautomatiškai"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">Įrenginys nebuvo atrakintas <xliff:g id="NUMBER_1">%d</xliff:g> valandą. Patvirtinkite atrakinimo piešinį.</item>
-      <item quantity="few">Įrenginys nebuvo atrakintas <xliff:g id="NUMBER_1">%d</xliff:g> valandas. Patvirtinkite atrakinimo piešinį.</item>
-      <item quantity="many">Įrenginys nebuvo atrakintas <xliff:g id="NUMBER_1">%d</xliff:g> valandos. Patvirtinkite atrakinimo piešinį.</item>
-      <item quantity="other">Įrenginys nebuvo atrakintas <xliff:g id="NUMBER_1">%d</xliff:g> valandų. Patvirtinkite atrakinimo piešinį.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">Įrenginys nebuvo atrakintas <xliff:g id="NUMBER_1">%d</xliff:g> valandą. Patvirtinkite PIN kodą.</item>
-      <item quantity="few">Įrenginys nebuvo atrakintas <xliff:g id="NUMBER_1">%d</xliff:g> valandas. Patvirtinkite PIN kodą.</item>
-      <item quantity="many">Įrenginys nebuvo atrakintas <xliff:g id="NUMBER_1">%d</xliff:g> valandos. Patvirtinkite PIN kodą.</item>
-      <item quantity="other">Įrenginys nebuvo atrakintas <xliff:g id="NUMBER_1">%d</xliff:g> valandų. Patvirtinkite PIN kodą.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">Įrenginys nebuvo atrakintas <xliff:g id="NUMBER_1">%d</xliff:g> valandą. Patvirtinkite slaptažodį.</item>
-      <item quantity="few">Įrenginys nebuvo atrakintas <xliff:g id="NUMBER_1">%d</xliff:g> valandas. Patvirtinkite slaptažodį.</item>
-      <item quantity="many">Įrenginys nebuvo atrakintas <xliff:g id="NUMBER_1">%d</xliff:g> valandos. Patvirtinkite slaptažodį.</item>
-      <item quantity="other">Įrenginys nebuvo atrakintas <xliff:g id="NUMBER_1">%d</xliff:g> valandų. Patvirtinkite slaptažodį.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Neatpažintas"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-lv/strings.xml b/packages/Keyguard/res/values-lv/strings.xml
deleted file mode 100644
index f801d64..0000000
--- a/packages/Keyguard/res/values-lv/strings.xml
+++ /dev/null
@@ -1,137 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Taustiņslēgs"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Ievadiet PIN kodu."</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Ievadiet SIM kartes PUK kodu un jaunu PIN kodu."</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM kartes PUK kods"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Jauns SIM kartes PIN kods"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Pieskarieties, lai ievadītu paroli"</font>"."</string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Ievadiet paroli, lai atbloķētu."</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Lai atbloķētu, ievadiet PIN."</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"PIN kods nav pareizs."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Uzlādēts"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Notiek uzlāde"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Ātrā uzlāde"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Lēnā uzlāde"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Pievienojiet uzlādes ierīci."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Lai atbloķētu, nospiediet vienumu Izvēlne."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Tīkls ir bloķēts."</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Nav SIM kartes."</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Planšetdatorā nav SIM kartes."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Tālrunī nav SIM kartes."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Ievietojiet SIM karti."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"Nav SIM kartes, vai arī to nevar nolasīt. Ievietojiet SIM karti."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"SIM karte nav lietojama."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Jūsu SIM karte ir neatgriezeniski atspējota.\nSazinieties ar savu bezvadu pakalpojumu sniedzēju, lai iegūtu citu SIM karti."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM karte ir bloķēta."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM karte ir bloķēta ar PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Notiek SIM kartes atbloķēšana..."</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN apgabals"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM PIN apgabals"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM PUK apgabals"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Signāls iestatīts uz: <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Dzēšanas taustiņš"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Ievadīšanas taustiņš"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Aizmirsu kombināciju"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Nepareiza kombinācija"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Nepareiza parole"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Nepareizs PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Mēģiniet vēlreiz pēc <xliff:g id="NUMBER">%d</xliff:g> sekundēm."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Norādiet savu kombināciju"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Ievadiet SIM kartes PIN"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Ievadiet SIM kartes “<xliff:g id="CARRIER">%1$s</xliff:g>” PIN kodu"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Ievadiet PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Ievadiet paroli"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM karte ir atspējota. Lai turpinātu, ievadiet PUK kodu. Lai iegūtu detalizētu informāciju, sazinieties ar mobilo sakaru operatoru."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM karte “<xliff:g id="CARRIER">%1$s</xliff:g>” ir atspējota. Lai turpinātu, ievadiet PUK kodu. Lai iegūtu plašāku informāciju, sazinieties ar mobilo sakaru operatoru."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Ievadiet vēlamo PIN kodu."</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Apstipriniet vēlamo PIN."</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Notiek SIM kartes atbloķēšana..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Ievadiet PIN, kas sastāv no 4 līdz 8 cipariem."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK kodam ir jābūt vismaz 8 ciparus garam."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Atkārtoti ievadiet pareizo PUK kodu. Ja vairākas reizes ievadīsiet to nepareizi, SIM karte tiks neatgriezeniski atspējota."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN kodi neatbilst."</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Pārāk daudz kombinācijas mēģinājumu"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Jūs nepareizi ievadījāt PIN <xliff:g id="NUMBER_0">%1$d</xliff:g> reizes.\n\nMēģiniet vēlreiz pēc <xliff:g id="NUMBER_1">%2$d</xliff:g> sekundēm."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Jūs nepareizi ievadījāt paroli <xliff:g id="NUMBER_0">%1$d</xliff:g> reizes.\n\nMēģiniet vēlreiz pēc <xliff:g id="NUMBER_1">%2$d</xliff:g> sekundēm."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Jūs nepareizi norādījāt atbloķēšanas kombināciju <xliff:g id="NUMBER_0">%1$d</xliff:g> reizes.\n\nMēģiniet vēlreiz pēc <xliff:g id="NUMBER_1">%2$d</xliff:g> sekundēm."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Jūs <xliff:g id="NUMBER_0">%1$d</xliff:g> reizes nesekmīgi mēģinājāt atbloķēt planšetdatoru. Pēc vēl <xliff:g id="NUMBER_1">%2$d</xliff:g> nesekmīgiem mēģinājumiem šis planšetdators tiks atiestatīts, kā arī visi planšetdatora dati tiks dzēsti."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Jūs <xliff:g id="NUMBER_0">%1$d</xliff:g> reizes nesekmīgi mēģinājāt atbloķēt tālruni. Pēc vēl <xliff:g id="NUMBER_1">%2$d</xliff:g> nesekmīgiem mēģinājumiem šis tālrunis tiks atiestatīts, kā arī visi tālruņa dati tiks dzēsti."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Jūs <xliff:g id="NUMBER">%d</xliff:g> reizes nesekmīgi mēģinājāt atbloķēt planšetdatoru. Šis planšetdators tiks atiestatīts, kā arī visi planšetdatora dati tiks dzēsti."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Jūs <xliff:g id="NUMBER">%d</xliff:g> reizes nesekmīgi mēģinājāt atbloķēt tālruni. Šis tālrunis tiks atiestatīts, kā arī visi tālruņa dati tiks dzēsti."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Jūs <xliff:g id="NUMBER_0">%1$d</xliff:g> reizes nesekmīgi mēģinājāt atbloķēt planšetdatoru. Pēc vēl <xliff:g id="NUMBER_1">%2$d</xliff:g> nesekmīgiem mēģinājumiem šis lietotājs tiks noņemts, kā arī visi lietotāja dati tiks dzēsti."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Jūs <xliff:g id="NUMBER_0">%1$d</xliff:g> reizes nesekmīgi mēģinājāt atbloķēt tālruni. Pēc vēl <xliff:g id="NUMBER_1">%2$d</xliff:g> nesekmīgiem mēģinājumiem šis lietotājs tiks noņemts, kā arī visi lietotāja dati tiks dzēsti."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Jūs <xliff:g id="NUMBER">%d</xliff:g> reizes nesekmīgi mēģinājāt atbloķēt planšetdatoru. Šis lietotājs tiks noņemts, kā arī visi lietotāja dati tiks dzēsti."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Jūs <xliff:g id="NUMBER">%d</xliff:g> reizes nesekmīgi mēģinājāt atbloķēt tālruni. Šis lietotājs tiks noņemts, kā arī visi lietotāja dati tiks dzēsti."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Jūs <xliff:g id="NUMBER_0">%1$d</xliff:g> reizes nesekmīgi mēģinājāt atbloķēt planšetdatoru. Pēc vēl <xliff:g id="NUMBER_1">%2$d</xliff:g> nesekmīgiem mēģinājumiem darba profils tiks noņemts, kā arī visi profila dati tiks dzēsti."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Jūs <xliff:g id="NUMBER_0">%1$d</xliff:g> reizes nesekmīgi mēģinājāt atbloķēt tālruni. Pēc vēl <xliff:g id="NUMBER_1">%2$d</xliff:g> nesekmīgiem mēģinājumiem darba profils tiks noņemts, kā arī visi profila dati tiks dzēsti."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Jūs <xliff:g id="NUMBER">%d</xliff:g> reizes nesekmīgi mēģinājāt atbloķēt planšetdatoru. Darba profils tiks noņemts, kā arī visi profila dati tiks dzēsti."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Jūs <xliff:g id="NUMBER">%d</xliff:g> reizes nesekmīgi mēģinājāt atbloķēt tālruni. Darba profils tiks noņemts, kā arī visi profila dati tiks dzēsti."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Jūs nepareizi norādījāt atbloķēšanas kombināciju <xliff:g id="NUMBER_0">%1$d</xliff:g> reizes. Pēc vēl <xliff:g id="NUMBER_1">%2$d</xliff:g> neveiksmīgiem mēģinājumiem planšetdators būs jāatbloķē, izmantojot e-pasta kontu.\n\nMēģiniet vēlreiz pēc <xliff:g id="NUMBER_2">%3$d</xliff:g> sekundēm."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Jūs nepareizi norādījāt atbloķēšanas kombināciju <xliff:g id="NUMBER_0">%1$d</xliff:g> reizes. Pēc vēl <xliff:g id="NUMBER_1">%2$d</xliff:g> neveiksmīgiem mēģinājumiem tālrunis būs jāatbloķē, izmantojot e-pasta kontu.\n\nMēģiniet vēlreiz pēc <xliff:g id="NUMBER_2">%3$d</xliff:g> sekundēm."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Nepareizs SIM kartes PIN kods. Lai atbloķētu ierīci, sazinieties ar mobilo sakaru operatoru."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="zero">Nepareizs SIM kartes PIN kods. Varat mēģināt vēl <xliff:g id="NUMBER_1">%d</xliff:g> reizes.</item>
-      <item quantity="one">Nepareizs SIM kartes PIN kods. Varat mēģināt vēl <xliff:g id="NUMBER_1">%d</xliff:g> reizi.</item>
-      <item quantity="other">Nepareizs SIM kartes PIN kods. Varat mēģināt vēl <xliff:g id="NUMBER_1">%d</xliff:g> reizes.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM karte nav izmantojama. Sazinieties ar mobilo sakaru operatoru."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="zero">Nepareizs SIM kartes PUK kods. Varat mēģināt vēl <xliff:g id="NUMBER_1">%d</xliff:g> reizes. Pēdējā mēģinājuma kļūdas gadījumā SIM karte kļūs neizmantojama.</item>
-      <item quantity="one">Nepareizs SIM kartes PUK kods. Varat mēģināt vēl <xliff:g id="NUMBER_1">%d</xliff:g> reizi. Pēdējā mēģinājuma kļūdas gadījumā SIM karte kļūs neizmantojama.</item>
-      <item quantity="other">Nepareizs SIM kartes PUK kods. Varat mēģināt vēl <xliff:g id="NUMBER_1">%d</xliff:g> reizes. Pēdējā mēģinājuma kļūdas gadījumā SIM karte kļūs neizmantojama.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"SIM kartes PIN koda ievadīšana neizdevās."</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"SIM kartes PUK koda ievadīšana neizdevās."</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Kods ir pieņemts!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Nav pakalpojuma."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Pārslēgt ievades metodi"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Lidojuma režīms"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Pēc ierīces restartēšanas ir jāievada atbloķēšanas kombinācija."</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Pēc ierīces restartēšanas ir jāievada PIN kods."</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Pēc ierīces restartēšanas ir jāievada parole."</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Papildu drošībai ir nepieciešama atbloķēšanas kombinācija."</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Papildu drošībai ir nepieciešams PIN kods."</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Papildu drošībai ir nepieciešama parole."</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Pārslēdzot profilus, ir jāievada atbloķēšanas kombinācija."</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Pārslēdzot profilus, ir jāievada PIN kods."</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Pārslēdzot profilus, ir jāievada parole."</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Ierīces administratora bloķēta ierīce"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Ierīce tika bloķēta manuāli"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="zero">Ierīce nav tikusi atbloķēta <xliff:g id="NUMBER_1">%d</xliff:g> stundas. Apstipriniet kombināciju.</item>
-      <item quantity="one">Ierīce nav tikusi atbloķēta <xliff:g id="NUMBER_1">%d</xliff:g> stundu. Apstipriniet kombināciju.</item>
-      <item quantity="other">Ierīce nav tikusi atbloķēta <xliff:g id="NUMBER_1">%d</xliff:g> stundas. Apstipriniet kombināciju.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="zero">Ierīce nav tikusi atbloķēta <xliff:g id="NUMBER_1">%d</xliff:g> stundas. Apstipriniet PIN.</item>
-      <item quantity="one">Ierīce nav tikusi atbloķēta <xliff:g id="NUMBER_1">%d</xliff:g> stundu. Apstipriniet PIN.</item>
-      <item quantity="other">Ierīce nav tikusi atbloķēta <xliff:g id="NUMBER_1">%d</xliff:g> stundas. Apstipriniet PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="zero">Ierīce nav tikusi atbloķēta <xliff:g id="NUMBER_1">%d</xliff:g> stundas. Apstipriniet paroli.</item>
-      <item quantity="one">Ierīce nav tikusi atbloķēta <xliff:g id="NUMBER_1">%d</xliff:g> stundu. Apstipriniet paroli.</item>
-      <item quantity="other">Ierīce nav tikusi atbloķēta <xliff:g id="NUMBER_1">%d</xliff:g> stundas. Apstipriniet paroli.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Nav atpazīts"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-mk/strings.xml b/packages/Keyguard/res/values-mk/strings.xml
deleted file mode 100644
index 9d833f0..0000000
--- a/packages/Keyguard/res/values-mk/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Keyguard"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Впишете PIN-код"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Внеси ПУК и нов PIN код за СИМ картичката"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"ПУК код за СИМ картичка"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Нов PIN код за СИМ картичка"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Допрете за да впишете лозинка"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Впишете ја лозинката за да се отклучи"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Впишете PIN за да се отклучи"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Погрешен PIN код."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Наполнета"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Се полни"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Брзо полнење"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Бавно полнење"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Поврзи го полначот."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Притисни „Мени“ да се отклучи."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Мрежата е заклучена"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Нема СИМ картичка"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Во таблетот нема СИМ картичка."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Во телефонот нема СИМ картичка."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Вметни СИМ картичка."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"Нема СИМ картичка или не може да прочита. Вметни СИМ картичка."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Неупотреблива СИМ картичка."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Вашата СИМ картичка е трајно оневозможена.\nКонтактирајте со вашиот оператор за безжична мрежа за друга СИМ картичка."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"СИМ картичката е заклучена."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"СИМ картичката е заклучена со ПУК."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"СИМ картичката се отклучува..."</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Поле за PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Поле за PIN на СИМ"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Поле за ПУК на СИМ"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Следниот аларм е поставен за <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Копче „Избриши“"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Копче „Внеси“"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Заборавив шема"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Погрешна шема"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Погрешна лозинка"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Погрешен PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Обидете се повторно за <xliff:g id="NUMBER">%d</xliff:g> секунди."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Употреби ја својата шема"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Внеси PIN на СИМ картичка"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Внесете PIN на СИМ за „<xliff:g id="CARRIER">%1$s</xliff:g>“"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Внеси PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Внеси лозинка"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"СИМ картичката е сега оневозможена. Внесете ПУК код за да продолжите. Контактирајте го операторот за детали."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"СИМ-картичката „<xliff:g id="CARRIER">%1$s</xliff:g>“ е сега оневозможена. Внесете ПУК за да продолжите. Контактирајте со давателот на услугата за детали."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Внеси посакуван PIN код"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Потврди го саканиот PIN код"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"СИМ картичката се отклучува..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Внесете PIN кој содржи 4-8 броеви."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"ПУК кодот треба да содржи 8 или повеќе броеви."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Повторно внесете го точниот ПУК код. Повторните обиди трајно ќе ја оневозможат СИМ картичката."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN кодовите не се совпаѓаат"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Премногу обиди со шема"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Погрешно сте го впишале вашиот PIN <xliff:g id="NUMBER_0">%1$d</xliff:g> пати. \n\nОбидете се повторно за <xliff:g id="NUMBER_1">%2$d</xliff:g> секунди."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Погрешно сте ја впишале вашата лозинка <xliff:g id="NUMBER_0">%1$d</xliff:g> пати. \n\nОбидете се повторно за <xliff:g id="NUMBER_1">%2$d</xliff:g> секунди."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Погрешно сте ја употребиле вашата шема за отклучување <xliff:g id="NUMBER_0">%1$d</xliff:g> пати. \n\nОбидете се повторно за <xliff:g id="NUMBER_1">%2$d</xliff:g> секунди."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Неправилно се обидовте да го отклучите таблетот <xliff:g id="NUMBER_0">%1$d</xliff:g> пати. По уште <xliff:g id="NUMBER_1">%2$d</xliff:g> неправилни обиди, таблетот ќе се ресетира, со што ќе се избришат сите негови податоци."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Неправилно се обидовте да го отклучите телефонот <xliff:g id="NUMBER_0">%1$d</xliff:g> пати. По уште <xliff:g id="NUMBER_1">%2$d</xliff:g> неправилни обиди, телефонот ќе се ресетира, со што ќе се избришат сите негови податоци."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Неправилно се обидовте да го отклучите таблетот <xliff:g id="NUMBER">%d</xliff:g> пати. Овој таблет ќе се ресетира, со што ќе се избришат сите негови податоци."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Неправилно се обидовте да го отклучите телефонот <xliff:g id="NUMBER">%d</xliff:g> пати. Овој телефон ќе се ресетира, со што ќе се избришат сите негови податоци."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Неправилно се обидовте да го отклучите таблетот <xliff:g id="NUMBER_0">%1$d</xliff:g> пати. По уште <xliff:g id="NUMBER_1">%2$d</xliff:g> неправилни обиди, корисникот ќе се отстрани, со што ќе се избришат сите податоци на корисникот."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Неправилно се обидовте да го отклучите телефонот <xliff:g id="NUMBER_0">%1$d</xliff:g> пати. По уште <xliff:g id="NUMBER_1">%2$d</xliff:g> неправилни обиди, корисникот ќе се отстрани, со што ќе се избришат сите податоци на корисникот."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Неправилно се обидовте да го отклучите таблетот <xliff:g id="NUMBER">%d</xliff:g> пати. Овој корисник ќе се отстрани, со што ќе се избришат сите негови податоци."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Неправилно се обидовте да го отклучите телефонот <xliff:g id="NUMBER">%d</xliff:g> пати. Овој корисник ќе се отстрани, со што ќе се избришат сите негови податоци."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Неправилно се обидовте да го отклучите таблетот <xliff:g id="NUMBER_0">%1$d</xliff:g> пати. По уште <xliff:g id="NUMBER_1">%2$d</xliff:g> неправилни обиди, работниот профил ќе се отстрани, со што ќе се избришат сите податоци на профилот."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Неправилно се обидовте да го отклучите телефонот <xliff:g id="NUMBER_0">%1$d</xliff:g> пати. По уште <xliff:g id="NUMBER_1">%2$d</xliff:g> неправилни обиди, работниот профил ќе се отстрани, со што ќе се избришат сите податоци на профилот."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Неправилно се обидовте да го отклучите таблетот <xliff:g id="NUMBER">%d</xliff:g> пати. Работниот профил ќе се отстрани, со што ќе се избришат сите податоци на профилот."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Неправилно се обидовте да го отклучите телефонот <xliff:g id="NUMBER">%d</xliff:g> пати. Работниот профил ќе се отстрани, со што ќе се избришат сите податоци на профилот."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Погрешно сте ја употребиле вашата шема на отклучување <xliff:g id="NUMBER_0">%1$d</xliff:g> пати. По <xliff:g id="NUMBER_1">%2$d</xliff:g> неуспешни обиди, ќе побараат од вас да го отклучите таблетот со користење сметка на е-пошта.\n\n Обидете се повторно за <xliff:g id="NUMBER_2">%3$d</xliff:g> секунди."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Погрешно сте ја употребиле вашата шема на отклучување <xliff:g id="NUMBER_0">%1$d</xliff:g> пати. По <xliff:g id="NUMBER_1">%2$d</xliff:g> неуспешни обиди, ќе побараат од вас да го отклучите телефонот со користење сметка на е-пошта.\n\n Обидете се повторно за <xliff:g id="NUMBER_2">%3$d</xliff:g> секунди."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"PIN кодот за СИМ картичката е неточен. Контактирате со вашиот оператор да го отклучи уредот."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">Погрешен PIN-код за СИМ, ви преостанува уште <xliff:g id="NUMBER_1">%d</xliff:g> обид.</item>
-      <item quantity="other">Погрешен PIN-код за СИМ, ви преостануваат уште <xliff:g id="NUMBER_1">%d</xliff:g> обиди.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SMS картичката е неупотреблива. Контактирајте со вашиот оператор."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">Погрешен ПУК-код за СИМ, ви преостанува уште <xliff:g id="NUMBER_1">%d</xliff:g> обид пред СИМ-картичката да стане трајно неупотреблива.</item>
-      <item quantity="other">Погрешен ПУК-код за СИМ, ви преостануваат уште <xliff:g id="NUMBER_1">%d</xliff:g> обиди пред СИМ-картичката да стане трајно неупотреблива.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"СИМ картичката не се отклучи со PIN кодот!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"СИМ картичката не се отклучи со ПУК кодот!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Кодот е прифатен!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Нема услуга."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Префрли метод на внесување"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Режим на работа во авион"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Потребна е шема по рестартирање на уредот"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Потребен е PIN-код по рестартирање на уредот"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Потребна е лозинка по рестартирање на уредот"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Потребна е шема за дополнителна безбедност"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Потребен е PIN-код за дополнителна безбедност"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Потребна е лозинка за дополнителна безбедност"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Потребна е шема кога променувате профили"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Потребен е PIN-код кога променувате профили"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Потребна е лозинка кога променувате профили"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Администраторот на уредот го заклучил уредот"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Уредот е заклучен рачно"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">Уредот не е отклучен за <xliff:g id="NUMBER_1">%d</xliff:g> час. Потврдете ја шемата.</item>
-      <item quantity="other">Уредот не е отклучен за <xliff:g id="NUMBER_1">%d</xliff:g> часа. Потврдете ја шемата.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">Уредот не е отклучен за <xliff:g id="NUMBER_1">%d</xliff:g> час. Потврдете го PIN-кодот.</item>
-      <item quantity="other">Уредот не е отклучен за <xliff:g id="NUMBER_1">%d</xliff:g> часа. Потврдете го PIN-кодот.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">Уредот не е отклучен за <xliff:g id="NUMBER_1">%d</xliff:g> час. Потврдете ја лозинката.</item>
-      <item quantity="other">Уредот не е отклучен за <xliff:g id="NUMBER_1">%d</xliff:g> часа. Потврдете ја лозинката.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Не е препознаено"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-ml/strings.xml b/packages/Keyguard/res/values-ml/strings.xml
deleted file mode 100644
index 5d93cf0..0000000
--- a/packages/Keyguard/res/values-ml/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"കീഗാർഡ്"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"പിൻ കോഡ് ടൈപ്പുചെയ്യുക"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"സിം PUK-യും പുതിയ പിൻ കോഡും ടൈപ്പുചെയ്യുക"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"സിം PUK കോഡ്"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"പുതിയ സിം പിൻ കോഡ്"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"പാസ്‌വേഡ് ടൈപ്പുചെയ്യുന്നതിന് സ്‌പർശിക്കുക"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"അൺലോക്കുചെയ്യുന്നതിന് പാസ്‌വേഡ് ടൈപ്പുചെയ്യുക"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"അൺലോക്കുചെയ്യുന്നതിന് പിൻ ടൈപ്പുചെയ്യുക"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"പിൻ കോഡ് തെറ്റാണ്."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"ചാർജായി"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"ചാർജ്ജുചെയ്യുന്നു"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"വേഗത്തിൽ ചാർജുചെയ്യുന്നു"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"പതുക്കെ ചാർജുചെയ്യുന്നു"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"നിങ്ങളുടെ ചാർജ്ജർ കണക്റ്റുചെയ്യുക."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"അൺലോക്കുചെയ്യാൻ മെനു അമർത്തുക"</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"നെറ്റ്‌വർക്ക് ലോക്കുചെയ്‌തു"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"സിം കാർഡില്ല"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"ടാബ്‌ലെറ്റിൽ സിം കാർഡൊന്നുമില്ല."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"ഫോണിൽ സിം കാർഡൊന്നുമില്ല."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"ഒരു സിം കാർഡ് ചേർക്കുക."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"സിം കാർഡ് കാണുന്നില്ല അല്ലെങ്കിൽ റീഡുചെയ്യാനായില്ല. ഒരു സിം കാർഡ് ചേർക്കുക."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"ഉപയോഗശൂന്യമായ സിം കാർഡ്."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"നിങ്ങളുടെ സിം കാർഡ് ശാശ്വതമായി പ്രവർത്തനരഹിതമാക്കി.\n മറ്റൊരു സിം കാർഡിനായി നിങ്ങളുടെ വയർലെസ് സേവന ദാതാവിനെ ബന്ധപ്പെടുക."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"സിം കാർഡ് ലോക്കുചെയ്‌തു."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"സിം കാർഡ് PUK-ലോക്ക് ചെയ്‌തതാണ്."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"സിം കാർഡ് അൺലോക്കുചെയ്യുന്നു…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN ഏരിയ"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM PIN ഏരിയ"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM PUK ഏരിയ"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"<xliff:g id="ALARM">%1$s</xliff:g>-ന് അടുത്ത അലാറം സജ്ജീകരിച്ചു"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"ഇല്ലാതാക്കുക"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"പാറ്റേൺ മറന്നു"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"പാറ്റേൺ തെറ്റാണ്"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"പാസ്‌വേഡ് തെറ്റാണ്"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"പിൻ തെറ്റാണ്"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"<xliff:g id="NUMBER">%d</xliff:g> സെക്കൻഡിനുള്ളിൽ വീണ്ടും ശ്രമിക്കുക."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"നിങ്ങളുടെ പാറ്റേൺ വരയ്‌ക്കുക"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"സിം പിൻ നൽകുക"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"\"<xliff:g id="CARRIER">%1$s</xliff:g>\" എന്നതിനുള്ള SIM PIN നൽകുക"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"പിൻ നൽകുക"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"പാസ്‌വേഡ് നൽകുക"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"സിം ഇപ്പോൾ പ്രവർത്തനരഹിതമാക്കി. തുടരുന്നതിന് PUK കോഡ് നൽകുക. വിശദാംശങ്ങൾക്ക് കാരിയറെ ബന്ധപ്പെടുക."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" ഇപ്പോൾ പ്രവർത്തനരഹിതമാക്കി. തുടരുന്നതിന് PUK കോഡ് നൽകുക. വിശദാംശങ്ങൾക്ക് കാരിയറിനെ കോൺടാക്‌റ്റുചെയ്യുക."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"താൽപ്പര്യപ്പെട്ട പിൻ കോഡ് നൽകുക"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"താൽപ്പര്യപ്പെട്ട പിൻ കോഡ് സ്ഥിരീകരിക്കുക"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"സിം കാർഡ് അൺലോക്കുചെയ്യുന്നു…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"4 മുതൽ 8 വരെ അക്കങ്ങളുള്ള ഒരു പിൻ നൽകുക."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK കോഡിൽ 8 അല്ലെങ്കിൽ അതിലധികം സംഖ്യകൾ ഉണ്ടായിരിക്കണം."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"ശരിയായ PUK കോഡ് വീണ്ടും നൽകുക. ആവർത്തിച്ചുള്ള ശ്രമങ്ങൾ സിം ശാശ്വതമായി പ്രവർത്തനരഹിതമാക്കും."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"പിൻ കോഡുകൾ പൊരുത്തപ്പെടുന്നില്ല"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"വളരെയധികം പാറ്റേൺ ശ്രമങ്ങൾ"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"നിങ്ങളുടെ പിൻ <xliff:g id="NUMBER_0">%1$d</xliff:g> തവണ തെറ്റായി ടൈപ്പുചെയ്‌തു. \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> സെക്കൻഡിനുള്ളിൽ വീണ്ടും ശ്രമിക്കുക."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"നിങ്ങളുടെ പാസ്‌വേഡ് <xliff:g id="NUMBER_0">%1$d</xliff:g> തവണ തെറ്റായി ടൈപ്പുചെയ്‌തു. \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> സെക്കൻഡിനുള്ളിൽ വീണ്ടും ശ്രമിക്കുക."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"നിങ്ങളുടെ പാറ്റേൺ <xliff:g id="NUMBER_0">%1$d</xliff:g> തവണ തെറ്റായി വരച്ചു. \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> സെക്കൻഡിനുള്ളിൽ വീണ്ടും ശ്രമിക്കുക."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"നിങ്ങളുടെ ടാബ്‌ലെറ്റ് <xliff:g id="NUMBER_0">%1$d</xliff:g> തവണ തെറ്റായി അൺലോക്കുചെയ്യാൻ ശ്രമിച്ചു. <xliff:g id="NUMBER_1">%2$d</xliff:g>-ൽ കൂടുതൽ പരാജയപ്പെട്ട ശ്രമങ്ങൾക്കുശേഷം, ഈ ടാബ്‌ലെറ്റ് പുനഃസജ്ജീകരിക്കുന്നതിനാൽ ഇതിന്റെ എല്ലാ വിവരങ്ങളും ഇല്ലാതാക്കും."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"നിങ്ങളുടെ ഫോൺ <xliff:g id="NUMBER_0">%1$d</xliff:g> തവണ തെറ്റായി അൺലോക്കുചെയ്യാൻ ശ്രമിച്ചു. <xliff:g id="NUMBER_1">%2$d</xliff:g>-ൽ കൂടുതൽ പരാജയപ്പെട്ട ശ്രമങ്ങൾക്കുശേഷം, ഈ ഫോൺ പുനഃസജ്ജീകരിക്കുന്നതിനാൽ ഇതിന്റെ എല്ലാ വിവരങ്ങളും ഇല്ലാതാക്കും."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"നിങ്ങളുടെ ടാബ്‌ലെറ്റ് <xliff:g id="NUMBER">%d</xliff:g> തവണ തെറ്റായി അൺലോക്കുചെയ്യാൻ ശ്രമിച്ചു. ഈ ടാബ്‌ലെറ്റിനെ പുനഃസജ്ജീകരിക്കുന്നതിനാൽ അതിന്റെ എല്ലാ വിവരങ്ങളും ഇല്ലാതാക്കും."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"നിങ്ങളുടെ ഫോൺ <xliff:g id="NUMBER">%d</xliff:g> തവണ തെറ്റായി അൺലോക്കുചെയ്യാൻ ശ്രമിച്ചു. ഈ ഫോണിനെ പുനഃസജ്ജീകരിക്കുന്നതിനാൽ അതിന്റെ എല്ലാ വിവരങ്ങളും ഇല്ലാതാക്കും."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"നിങ്ങളുടെ ടാബ്‌ലെറ്റ് <xliff:g id="NUMBER_0">%1$d</xliff:g> തവണ തെറ്റായി അൺലോക്കുചെയ്യാൻ ശ്രമിച്ചു. <xliff:g id="NUMBER_1">%2$d</xliff:g>-ൽ കൂടുതൽ പരാജയപ്പെട്ട ശ്രമങ്ങൾക്കുശേഷം, ഈ ഉപയോക്താവിനെ നീക്കംചെയ്യും, ഈ ഉപയോക്താവിനെ നീക്കംചെയ്യുന്നതിനാൽ എല്ലാ ഉപയോക്തൃ വിവരങ്ങളും ഇല്ലാതാക്കും."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"നിങ്ങളുടെ ഫോൺ <xliff:g id="NUMBER_0">%1$d</xliff:g> തവണ തെറ്റായി അൺലോക്കുചെയ്യാൻ ശ്രമിച്ചു. <xliff:g id="NUMBER_1">%2$d</xliff:g>-ൽ കൂടുതൽ പരാജയപ്പെട്ട ശ്രമങ്ങൾക്കുശേഷം, ഈ ഉപയോക്താവിനെ നീക്കംചെയ്യുന്നതിനാൽ എല്ലാ ഉപയോക്തൃ വിവരങ്ങളും ഇല്ലാതാക്കും."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"നിങ്ങളുടെ ടാബ്‌ലെറ്റ് <xliff:g id="NUMBER">%d</xliff:g> തവണ തെറ്റായി അൺലോക്കുചെയ്യാൻ ശ്രമിച്ചു. ഈ ഉപയോക്താവിനെ നീക്കംചെയ്യുന്നതിനാൽ എല്ലാ ഉപയോക്തൃ വിവരങ്ങളും ഇല്ലാതാക്കും."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"നിങ്ങളുടെ ഫോൺ <xliff:g id="NUMBER">%d</xliff:g> തവണ തെറ്റായി അൺലോക്കുചെയ്യാൻ ശ്രമിച്ചു. ഈ ഉപയോക്താവിനെ നീക്കംചെയ്യുന്നതിനാൽ എല്ലാ ഉപയോക്തൃ വിവരങ്ങളും ഇല്ലാതാക്കും."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"നിങ്ങളുടെ ടാബ്‌ലെറ്റ് <xliff:g id="NUMBER_0">%1$d</xliff:g> തവണ തെറ്റായി അൺലോക്കുചെയ്യാൻ ശ്രമിച്ചു. <xliff:g id="NUMBER_1">%2$d</xliff:g>-ൽ കൂടുതൽ പരാജയപ്പെട്ട ശ്രമങ്ങൾക്കുശേഷം, ഔദ്യോഗിക പ്രൊഫൈൽ നീക്കംചെയ്യുന്നതിനാൽ എല്ലാ പ്രൊഫൈൽ വിവരങ്ങളും ഇല്ലാതാക്കും."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"നിങ്ങളുടെ ഫോൺ <xliff:g id="NUMBER_0">%1$d</xliff:g> തവണ തെറ്റായി അൺലോക്കുചെയ്യാൻ ശ്രമിച്ചു. <xliff:g id="NUMBER_1">%2$d</xliff:g>-ൽ കൂടുതൽ പരാജയപ്പെട്ട ശ്രമങ്ങൾക്കുശേഷം, ഔദ്യോഗിക പ്രൊഫൈൽ നീക്കംചെയ്യുന്നതിനാൽ എല്ലാ പ്രൊഫൈൽ വിവരങ്ങളും ഇല്ലാതാക്കും."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"നിങ്ങളുടെ ടാബ്‌ലറ്റ് <xliff:g id="NUMBER">%d</xliff:g> തവണ തെറ്റായി അൺലോക്കുചെയ്യാൻ ശ്രമിച്ചു. ഔദ്യോഗിക പ്രൊഫൈൽ നീക്കംചെയ്യുന്നതിനാൽ എല്ലാ പ്രൊഫൈൽ വിവരങ്ങളും ഇല്ലാതാക്കും."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"നിങ്ങളുടെ ഫോൺ <xliff:g id="NUMBER">%d</xliff:g> തവണ തെറ്റായി അൺലോക്കുചെയ്യാൻ ശ്രമിച്ചു. ഔദ്യോഗിക പ്രൊഫൈൽ നീക്കംചെയ്യുന്നതിനാൽ എല്ലാ പ്രൊഫൈൽ വിവരങ്ങളും ഇല്ലാതാക്കും."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"നിങ്ങളുടെ അൺലോക്ക് പാറ്റേൺ <xliff:g id="NUMBER_0">%1$d</xliff:g> തവണ തെറ്റായി വരച്ചു. <xliff:g id="NUMBER_1">%2$d</xliff:g> ശ്രമങ്ങൾ കൂടി വിജയിച്ചില്ലെങ്കിൽ, ഒരു ഇമെയിൽ അക്കൗണ്ട് ഉപയോഗിച്ച് ടാബ്‌ലെറ്റ് അൺലോക്ക് ചെയ്യാൻ നിങ്ങളോട് ആവശ്യപ്പെടും.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> സെക്കൻഡിനുള്ള വീണ്ടും ശ്രമിക്കുക."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"നിങ്ങളുടെ അൺലോക്ക് പാറ്റേൺ <xliff:g id="NUMBER_0">%1$d</xliff:g> തവണ തെറ്റായി വരച്ചു. <xliff:g id="NUMBER_1">%2$d</xliff:g> ശ്രമങ്ങൾ കൂടി വിജയിച്ചില്ലെങ്കിൽ, ഒരു ഇമെയിൽ അക്കൗണ്ട് ഉപയോഗിച്ച് ഫോൺ അൺലോക്ക് ചെയ്യാൻ നിങ്ങളോട് ആവശ്യപ്പെടും.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> സെക്കൻഡിനുള്ള വീണ്ടും ശ്രമിക്കുക."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"സിം പിൻ കോഡ് തെറ്റാണ്, നിങ്ങളുടെ ഉപകരണം അൺലോക്കുചെയ്യാൻ ഇപ്പോൾ നിങ്ങളുടെ കാരിയറുമായി ബന്ധപ്പെടണം."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">SIM PIN കോഡ് തെറ്റാണ്, നിങ്ങൾക്ക് <xliff:g id="NUMBER_1">%d</xliff:g> ശ്രമങ്ങൾ കൂടി ശേഷിക്കുന്നു.</item>
-      <item quantity="one">SIM PIN കോഡ് തെറ്റാണ്, നിങ്ങളുടെ ഉപകരണം അൺലോക്കുചെയ്യാൻ കാരിയറെ ബന്ധപ്പെടേണ്ടതിന് മുമ്പായി <xliff:g id="NUMBER_0">%d</xliff:g> ശ്രമം കൂടി ശേഷിക്കുന്നു.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"സിം ഉപയോഗശൂന്യമാണ്. നിങ്ങളുടെ കാരിയറെ ബന്ധപ്പെടുക."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">SIM PUK കോഡ് തെറ്റാണ്, SIM ശാശ്വതമായി ഉപയോഗശൂന്യമാകുന്നതിന് മുമ്പായി നിങ്ങൾക്ക് <xliff:g id="NUMBER_1">%d</xliff:g> ശ്രമങ്ങൾ കൂടി ശേഷിക്കുന്നു.</item>
-      <item quantity="one">SIM PUK കോഡ് തെറ്റാണ്, SIM ശാശ്വതമായി ഉപയോഗശൂന്യമാകുന്നതിന് മുമ്പായി നിങ്ങൾക്ക് <xliff:g id="NUMBER_0">%d</xliff:g> ശ്രമം കൂടി ശേഷിക്കുന്നു.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"സിം പിൻ പ്രവർത്തനം പരാജയപ്പെട്ടു!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"സിം PUK പ്രവർത്തനം പരാജയപ്പെട്ടു!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"കോഡ് അംഗികരിച്ചു!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"സേവനമൊന്നുമില്ല."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"ഇൻപുട്ട് രീതി മാറുക"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"ഫ്ലൈറ്റ് മോഡ്"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"ഉപകരണം പുനരാരംഭിച്ചതിന് ശേഷം പാറ്റേൺ ആവശ്യമാണ്"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"ഉപകരണം പുനരാരംഭിച്ചതിന് ശേഷം പിൻ ആവശ്യമാണ്"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"ഉപകരണം പുനരാരംഭിച്ചതിന് ശേഷം പാസ്‌വേഡ് ആവശ്യമാണ്"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"അധിക സുരക്ഷയ്ക്ക് പാറ്റേൺ ആവശ്യമാണ്"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"അധിക സുരക്ഷയ്ക്ക് പിൻ ആവശ്യമാണ്"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"അധിക സുരക്ഷയ്ക്ക് പാസ്‌വേഡ് ആവശ്യമാണ്"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"പ്രൊഫൈലുകൾ തമ്മിൽ മാറുമ്പോൾ പാറ്റേൺ ആവശ്യമാണ്"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"പ്രൊഫൈലുകൾ തമ്മിൽ മാറുമ്പോൾ പിൻ ആവശ്യമാണ്"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"പ്രൊഫൈലുകൾ തമ്മിൽ മാറുമ്പോൾ പാസ്‌വേഡ് ആവശ്യമാണ്"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"ഉപകരണത്തെ ഉപകരണ അഡ്മിനിസ്ട്രേറ്റർ ലോക്കുചെയ്തു"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"ഉപകരണം നേരിട്ട് ലോക്കുചെയ്തു"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">ഉപകരണം <xliff:g id="NUMBER_1">%d</xliff:g> മണിക്കൂറായി അൺലോക്ക് ചെയ്തിട്ടില്ല. പാറ്റേൺ സ്ഥിരീകരിക്കുക.</item>
-      <item quantity="one">ഉപകരണം <xliff:g id="NUMBER_0">%d</xliff:g> മണിക്കൂറായി അൺലോക്ക് ചെയ്തിട്ടില്ല. പാറ്റേൺ സ്ഥിരീകരിക്കുക.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">ഉപകരണം <xliff:g id="NUMBER_1">%d</xliff:g> മണിക്കൂറായി അൺലോക്ക് ചെയ്തിട്ടില്ല. PIN സ്ഥിരീകരിക്കുക.</item>
-      <item quantity="one">ഉപകരണം <xliff:g id="NUMBER_0">%d</xliff:g> മണിക്കൂറായി അൺലോക്ക് ചെയ്തിട്ടില്ല. PIN സ്ഥിരീകരിക്കുക.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">ഉപകരണം <xliff:g id="NUMBER_1">%d</xliff:g> മണിക്കൂറായി അൺലോക്ക് ചെയ്തിട്ടില്ല. പാസ്‌വേഡ് സ്ഥിരീകരിക്കുക.</item>
-      <item quantity="one">ഉപകരണം <xliff:g id="NUMBER_0">%d</xliff:g> മണിക്കൂറായി അൺലോക്ക് ചെയ്തിട്ടില്ല. പാസ്‌വേഡ് സ്ഥിരീകരിക്കുക.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"തിരിച്ചറിഞ്ഞില്ല"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-mn/strings.xml b/packages/Keyguard/res/values-mn/strings.xml
deleted file mode 100644
index 8641e31..0000000
--- a/packages/Keyguard/res/values-mn/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Keyguard"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"PIN кодыг бичнэ үү"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"СИМ ПҮК-г бичээд шинэ ПИН код оруулна уу"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"СИМ ПҮК код"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Шинэ СИМ ПИН код"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Нууц үг бичих бол хүрнэ үү"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Тайлах нууц үгийг бичнэ үү"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Тайлах PIN-г оруулна уу"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Буруу PIN код."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Цэнэглэгдэв"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Цэнэглэж байна"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Хурдан цэнэглэх"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Удаан цэнэглэх"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Цэнэглэгчээ холбоно уу."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Тайлх бол цэсийг дарна уу."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Сүлжээ түгжигдсэн"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"SIM карт байхгүй"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Таблет SIM картгүй."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Утсанд SIM карт байхгүй."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"SIM картыг оруулна уу."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM карт байхгүй эсвэл унших боломжгүй. SIM карт оруулна уу."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Ашиглаж болохгүй SIM карт."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Таны SIM карт бүрмөсөн идэвхгүй болов.\n Өөр SIM карт авах бол өөрийн утасгүй үйлчилгээний нийлүүлэгчтэй холбогдоно уу."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM карт түгжигдсэн."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM картны PUK-түгжигдсэн."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"SIM картны түгжээг гаргаж байна…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN талбар"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM PIN талбар"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM PUK талбар"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Дараагийн сэрүүлгийг <xliff:g id="ALARM">%1$s</xliff:g>-д тохируулсан"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Устгах"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Оруулах"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Хээг мартсан"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Буруу хээ"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Нууц үг буруу"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"PIN буруу"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"<xliff:g id="NUMBER">%d</xliff:g> секундын дараа дахин оролдоно уу."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Хээг зурах"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"SIM PIN оруулна уу"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"SIM-н PIN кодыг \"<xliff:g id="CARRIER">%1$s</xliff:g>\"-д оруулна уу."</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"PIN оруулна уу"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Нууц үгээ оруулна уу"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM идэвхгүй байна. Үргэлжлүүлэх бол PUK кодыг оруулна уу. Дэлгэрэнгүй мэдээллийг оператороос асууна ууу"</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\"-ыг одоогоор идэвхгүй болгосон байна. Үргэлжлүүлэхийн тулд PUK кодоо оруулна уу. Дэлгэрэнгүй мэдээлэл авахын тулд оператортай холбоо барина уу."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Хүссэн PIN кодоо оруулна уу"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Хүссэн PIN кодоо дахин оруулна уу"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"SIM картны түгжээг гаргаж байна…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"4-8 тооноос бүтэх PIN-г бичнэ үү."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK код 8-с цөөнгүй тооноос бүтнэ."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Зөв PUK кодыг дахин оруулна уу. Давтан оролдвол SIM нь бүрмөсөн идэвхгүй болгоно."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN кодууд таарахгүй байна"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Хээ оруулах оролдлого хэт олон"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Та PIN кодоо <xliff:g id="NUMBER_0">%1$d</xliff:g> удаа буруу бичив. \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> секундын дараа дахин оролдоно уу."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Та PIN кодоо <xliff:g id="NUMBER_0">%1$d</xliff:g> удаа буруу бичив. \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> секундын дараа дахин оролдоно уу."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Та тайлах хээг <xliff:g id="NUMBER_0">%1$d</xliff:g> удаа буруу зурлаа. \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> секундын дараа дахин оролдоно уу."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Та таблетын түгжээг тайлах оролдлогыг <xliff:g id="NUMBER_0">%1$d</xliff:g> удаа буруу оруулсан байна. <xliff:g id="NUMBER_1">%2$d</xliff:g>-с илүү удаа буруу хийвэл энэ таблетын тохиргоо дахин шинээр хийгдэх бөгөөд улмаар таблетын дээрх бүх мэдээлэл устах болно."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Та утасны түгжээг тайлах оролдлогыг <xliff:g id="NUMBER_0">%1$d</xliff:g> удаа буруу оруулсан байна. <xliff:g id="NUMBER_1">%2$d</xliff:g>-с илүү удаа буруу хийвэл энэ утасны тохиргоо дахин шинээр хийгдэх бөгөөд улмаар утсан дээрх бүх мэдээлэл устах болно."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Та таблетын түгжээг тайлах оролдлогыг <xliff:g id="NUMBER">%d</xliff:g>  удаа буруу оруулсан байна. Энэ таблетын тохиргоо дахин шинээр хийгдэх бөгөөд улмаар таблетан дээрх бүх мэдээлэл устах болно."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Та утасны түгжээг тайлах оролдлогыг <xliff:g id="NUMBER">%d</xliff:g> удаа буруу оруулсан байна. Энэ утасны тохиргоо дахин шинээр хийгдэх бөгөөд улмаар утсан дээрх бүх мэдээлэл устах болно."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Та таблетын түгжээг тайлах оролдлогыг <xliff:g id="NUMBER_0">%1$d</xliff:g> удаа буруу хийсэн байна. <xliff:g id="NUMBER_1">%2$d</xliff:g>-с илүү удаа буруу хийвэл энэ хэрэглэгч устгагдах бөгөөд энэ нь улмаар хэрэглэгчийн бүх мэдээллийг устгах болно."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Та утасны түгжээг тайлах оролдлогыг <xliff:g id="NUMBER_0">%1$d</xliff:g> удаа буруу хийсэн байна. <xliff:g id="NUMBER_1">%2$d</xliff:g>-с илүү удаа буруу хийвэл энэ хэрэглэгч устгагдах бөгөөд энэ нь улмаар хэрэглэгчийн бүх мэдээллийг устгах болно."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Та таблетын түгжээг тайлах оролдлогыг  <xliff:g id="NUMBER">%d</xliff:g> удаа буруу оруулсан байна. Энэ хэрэглэгч устгагдаж, улмаар хэрэглэгчийн бүх мэдээлэл устах болно."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Та утасны түгжээг тайлах оролдлогыг <xliff:g id="NUMBER">%d</xliff:g> удаа буруу оруулсан байна. Энэ хэрэглэгч устгагдаж, улмаар хэрэглэгчийн бүх мэдээлэл устах болно."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Та таблетын түгжээг тайлах оролдлогыг <xliff:g id="NUMBER_0">%1$d</xliff:g> удаа буруу хийсэн байна. <xliff:g id="NUMBER_1">%2$d</xliff:g>-с илүү удаа буруу хийвэл ажлын профайл устгагдах бөгөөд энэ нь улмаар профайлын бүх мэдээллийг устгах болно."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Та утасны түгжээг тайлах оролдлогыг <xliff:g id="NUMBER_0">%1$d</xliff:g> удаа буруу хийсэн байна. <xliff:g id="NUMBER_1">%2$d</xliff:g>-с илүү удаа буруу хийвэл ажлын профайл устгагдах бөгөөд энэ нь улмаар профайлын бүх мэдээллийг устгах болно."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Та таблетын түгжээг тайлах оролдлогыг <xliff:g id="NUMBER">%d</xliff:g> удаа буруу оруулсан байна. Ажлын профайл устгагдаж, улмаар профайлын бүх мэдээлэл устах болно."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Та утасны түгжээг тайлах оролдлогыг <xliff:g id="NUMBER">%d</xliff:g> удаа буруу оруулсан байна. Ажлын профайл устгагдаж, улмаар профайлын бүх мэдээлэл устах болно."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Та тайлах хээг <xliff:g id="NUMBER_0">%1$d</xliff:g> удаа буруу зурлаа. <xliff:g id="NUMBER_1">%2$d</xliff:g> удаа дахин буруу оруулбал, та таблетаа тайлахын тулд имэйл бүртгэл шаардлагатай болно.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> секундын дараа дахин оролдоно уу."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Та тайлах хээг <xliff:g id="NUMBER_0">%1$d</xliff:g> удаа буруу зурлаа. <xliff:g id="NUMBER_1">%2$d</xliff:g> удаа дахин буруу оруулбал, та утсаа тайлахын тулд имэйл бүртгэлээ ашиглах шаардлагатай болно.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> секундын дараа дахин оролдоно уу."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"СИМ ПИН код буруу, та төхөөрөмжийн түгжээг тайлахын тулд оператор компанитай холбоо барих шаардлагатай."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">СИМ-ны ПИН код буруу байна. Та <xliff:g id="NUMBER_1">%d</xliff:g> удаа оролдлого хийх боломжтой байна.</item>
-      <item quantity="one">СИМ-ны ПИН код буруу байна. Танд мобайл оператортойгоо холбогдохгүйгээр төхөөрөмжийн түгжээг тайлахад <xliff:g id="NUMBER_0">%d</xliff:g> оролдлого хийх боломж үлдсэн байна.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"СИМ ашиглах боломжгүй. Өөрийн оператор компанитай холбоо барина уу."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">]СИМ-ны PUK код буруу байна. Таны СИМ хаагдах хүртэл төхөөрөмжийн түгжээг тайлахад <xliff:g id="NUMBER_1">%d</xliff:g> .оролдлого хийх боломж үлдсэн байна.</item>
-      <item quantity="one">СИМ-ны PUK код буруу байна. Таны СИМ хаагдах хүртэл төхөөрөмжийн түгжээг тайлахад <xliff:g id="NUMBER_0">%d</xliff:g> оролдлого хийх боломж үлдсэн байна.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"СИМ ПИН ажиллуулах амжилтгүй боллоо!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"СИМ ПҮК ажиллуулах амжилтгүй боллоо!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Код зөвшөөрөгдлөө!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Үйлчилгээ байхгүй."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Оролтын аргыг солих"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Нислэгийн горим"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Төхөөрөмжийг дахин эхлүүлсний дараа зурган түгжээ оруулах шаардлагатай"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Төхөөрөмжийг дахин эхлүүлсний дараа PIN оруулах шаардлагатай"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Төхөөрөмжийг дахин эхлүүлсний дараа нууц үгээ оруулах шаардлагатай"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Аюулгүй байдлын үүднээс зурган түгжээ оруулах шаардлагатай"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Аюулгүй байдлын үүднээс PIN оруулах шаардлагатай"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Аюулгүй байдлын үүднээс нууц үг оруулах шаардлагатай"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Профайлыг солиход зурган түгжээ оруулах шаардлагатай"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Профайлыг солиход PIN оруулах шаардлагатай"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Профайлыг солиход нууц үг оруулах шаардлагатай"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Төхөөрөмжийн админ төхөөрөмжийг түгжсэн"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Төхөөрөмжийг гараар түгжсэн"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Төхөөрөмжийн түгжээг <xliff:g id="NUMBER_1">%d</xliff:g> цагийн турш тайлаагүй байна. Зурган хээг баталгаажуулна уу.</item>
-      <item quantity="one">Төхөөрөмжийн түгжээг <xliff:g id="NUMBER_0">%d</xliff:g> цагийн турш тайлаагүй байна. Зурган хээг баталгаажуулна уу.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Төхөөрөмжийн түгжээг <xliff:g id="NUMBER_1">%d</xliff:g> цагийн турш тайлаагүй байна. PIN-ээ баталгаажуулна уу.</item>
-      <item quantity="one">Төхөөрөмжийн түгжээг <xliff:g id="NUMBER_0">%d</xliff:g> цагийн турш тайлаагүй байна. PIN-ээ баталгаажуулна уу.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Төхөөрөмжийн түгжээг <xliff:g id="NUMBER_1">%d</xliff:g> цагийн турш тайлаагүй байна. Нууц үгээ баталгаажуулна уу.</item>
-      <item quantity="one">Төхөөрөмжийн түгжээг <xliff:g id="NUMBER_0">%d</xliff:g> цагийн турш тайлаагүй байна. Нууц үгээ баталгаажуулна уу.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Танигдахгүй байна"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-mr/strings.xml b/packages/Keyguard/res/values-mr/strings.xml
deleted file mode 100644
index 8bcaad6..0000000
--- a/packages/Keyguard/res/values-mr/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"कीगार्ड"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"पिन कोड टाइप करा"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"सिम PUK आणि नवीन पिन कोड टाइप करा"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"सिम PUK कोड"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"नवीन सिम पिन कोड"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"संकेतशब्द टाइप करण्यासाठी स्पर्श करा"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"अनलॉक करण्यासाठी संकेतशब्द टाइप करा"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"अनलॉक करण्यासाठी पिन टाइप करा"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"अयोग्य पिन कोड."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"चार्ज झाली"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"चार्ज होत आहे"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"द्रुतपणे चार्ज होत आहे"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"हळूहळू चार्ज होत आहे"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"आपले चार्जर कनेक्ट करा."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"अनलॉक करण्यासाठी मेनू दाबा."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"नेटवर्क लॉक केले"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"सिम कार्ड नाही"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"टॅब्‍लेट मध्‍ये सिम कार्ड नाही."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"फोनमध्‍ये सिम कार्ड नाही."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"एक सिम कार्ड घाला."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"सिम कार्ड गहाळ झाले आहे किंवा ते वाचनीय नाही. एक सिम कार्ड घाला."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"निरूपयोगी सिम कार्ड."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"आपले सिम कार्ड कायमचे अक्षम केले गेले आहे.\n दुसर्‍या सिम कार्डसाठी आपल्‍या वायरलेस सेवा प्रदात्‍यासह संपर्क साधा."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"सिम कार्ड लॉक झाले आहे."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"सिम कार्ड PUK-लॉक केलेले आहे."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"सिम कार्ड अनलॉक करत आहे…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"पिन क्षेत्र"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"सिम पिन क्षेत्र"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"सिम PUK क्षेत्र"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"पुढील अलार्म <xliff:g id="ALARM">%1$s</xliff:g> साठी सेट केला"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"हटवा"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"प्रविष्ट करा"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"नमुना विसरलात"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"चुकीचा नमुना"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"चुकीचा संकेतशब्द"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"चुकीचा पिन"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"<xliff:g id="NUMBER">%d</xliff:g> सेकंदांमध्ये पुन्हा प्रयत्न करा."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"आपला नमुना काढा"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"सिम पिन प्रविष्ट करा"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"\"<xliff:g id="CARRIER">%1$s</xliff:g>\" साठी सिम पिन प्रविष्ट करा"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"पिन प्रविष्ट करा"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"संकेतशब्द प्रविष्ट करा"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"सिम आता अक्षम केले आहे. सुरु ठेवण्यासाठी PUK कोड प्रविष्ट करा. तपशीलांसाठी वाहकाशी संपर्क साधा."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"\"<xliff:g id="CARRIER">%1$s</xliff:g>\" सिम आता अक्षम आहे. सुरु ठेवण्यासाठी PUK कोड प्रविष्ट करा. तपशीलांसाठी वाहकाशी संपर्क साधा."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"इच्छित पिन कोड प्रविष्ट करा"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"इच्छित पिन कोड ची पुष्टी करा"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"सिम कार्ड अनलॉक करत आहे…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"4 ते 8 अंक असलेला पिन टाइप करा."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK कोड 8 अंकी किंवा त्यापेक्षा अधिकचा असावा."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"योग्य PUK कोड पुन्हा-प्रविष्ट करा. परत प्रयत्न करणे सिम कायमचे अक्षम करेल."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"पिन कोड जुळत नाहीत"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"बरेच नमुना प्रयत्न"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"आपण आपला पिन <xliff:g id="NUMBER_0">%1$d</xliff:g> वेळा अयोग्यरितीने टाइप केला आहे. \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> सेकंदांमध्ये पुन्हा प्रयत्न करा."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"आपण आपला संकेतशब्द <xliff:g id="NUMBER_0">%1$d</xliff:g> वेळा अयोग्यरितीने टाइप केला आहे. \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> सेकंदांमध्ये पुन्हा प्रयत्न करा."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"आपण आपला अनलॉक नमुना <xliff:g id="NUMBER_0">%1$d</xliff:g> वेळा अयोग्यरितीने काढला आहे. \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> सेकंदांमध्ये पुन्हा प्रयत्न करा."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"आपण अनलॉक करण्याचा <xliff:g id="NUMBER_0">%1$d</xliff:g> वेळा टॅबलेट चुकीच्या पद्धतीने प्रयत्न केला आहे. आणखी <xliff:g id="NUMBER_1">%2$d</xliff:g> अयशस्वी प्रयत्नांनंतर, हा टॅबलेट रीसेट केला जाईल, जे त्याचा सर्व डेटा हटवेल."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"आपण फोन अनलॉक करण्याचा <xliff:g id="NUMBER_0">%1$d</xliff:g> वेळा चुकीच्या पद्धतीने प्रयत्न केला आहे. आणखी <xliff:g id="NUMBER_1">%2$d</xliff:g> अयशस्वी प्रयत्नांनंतर, हा फोन रीसेट केला जाईल, जे त्याचा सर्व डेटा हटवेल."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"आपण टॅबलेट अनलॉक करण्याचा <xliff:g id="NUMBER">%d</xliff:g> वेळा चुकीच्या पद्धतीने प्रयत्न केला आहे. हा टॅबलेट रीसेट केला जाईल, जो त्याचा सर्व डेटा हटवेल."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"आपण फोन अनलॉक करण्याचा <xliff:g id="NUMBER">%d</xliff:g> वेळा चुकीच्या पद्धतीने प्रयत्न केला आहे. हा फोन रीसेट केला जाईल, जे त्याचा सर्व डेटा हटवेल."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"आपण टॅबलेट अनलॉक करण्याचा <xliff:g id="NUMBER_0">%1$d</xliff:g> वेळा चुकीच्या पद्धतीने प्रयत्न केला आहे. आणखी <xliff:g id="NUMBER_1">%2$d</xliff:g> अयशस्वी प्रयत्नांनंतर, हा वापरकर्ता काढला जाईल, जे सर्व वापरकर्ता डेटा हटवेल."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"आपण फोन अनलॉक करण्याचा <xliff:g id="NUMBER_0">%1$d</xliff:g> वेळा चुकीच्या पद्धतीने प्रयत्न केला आहे. आणखी <xliff:g id="NUMBER_1">%2$d</xliff:g> अयशस्वी प्रयत्नांनंतर, हा वापरकर्ता काढला जाईल, जे सर्व वापरकर्ता डेटा हटवेल."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"आपण टॅबलेट अनलॉक करण्याचा <xliff:g id="NUMBER">%d</xliff:g> वेळा चुकीच्या पद्धतीने प्रयत्न केला आहे. हा वापरकर्ता काढला जाईल, जे सर्व वापरकर्ता डेटा हटवेल."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"आपण फोन अनलॉक करण्याचा <xliff:g id="NUMBER">%d</xliff:g> वेळा चुकीच्या पद्धतीने प्रयत्न केला आहे. हा वापरकर्ता काढला जाईल, जे सर्व वापरकर्ता डेटा हटवेल."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"आपण टॅबलेट अनलॉक करण्याचा <xliff:g id="NUMBER_0">%1$d</xliff:g> वेळा चुकीच्या पद्धतीने प्रयत्न केला आहे. आणखी <xliff:g id="NUMBER_1">%2$d</xliff:g> अयशस्वी प्रयत्नांनंतर, कार्य प्रोफाईल काढले जाईल, जे सर्व प्रोफाईल डेटा हटवेल."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"आपण फोन अनलॉक करण्याचा <xliff:g id="NUMBER_0">%1$d</xliff:g> वेळा चुकीच्या पद्धतीने प्रयत्न केला आहे. आणखी <xliff:g id="NUMBER_1">%2$d</xliff:g> अयशस्वी प्रयत्नांनंतर, कार्य प्रोफाईल काढले जाईल, जे सर्व प्रोफाईल डेटा हटवेल."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"आपण टॅबलेट अनलॉक करण्याचा <xliff:g id="NUMBER">%d</xliff:g> वेळा चुकीच्या पद्धतीने प्रयत्न केला आहे. कार्य प्रोफाईल काढले जाईल, जे सर्व प्रोफाईल डेटा हटवेल."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"आपण फोन अनलॉक करण्याचा <xliff:g id="NUMBER">%d</xliff:g> वेळा चुकीच्या पद्धतीने प्रयत्न केला आहे. कार्य प्रोफाईल काढले जाईल, जे सर्व प्रोफाईल डेटा हटवेल."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"आपण आपला अनलॉक नमुना <xliff:g id="NUMBER_0">%1$d</xliff:g> वेळा अयोग्यपणे काढला आहे. आणखी <xliff:g id="NUMBER_1">%2$d</xliff:g> अयशस्वी प्रयत्नांनंतर, आपल्याला ईमेल खाते वापरून आपला टॅबलेट अनलॉक करण्यास सांगितले जाईल.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> सेकंदांमध्ये पुन्हा प्रयत्न करा."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"आपण आपला अनलॉक नमुना <xliff:g id="NUMBER_0">%1$d</xliff:g> वेळा अयोग्यपणे काढला आहे. आणखी <xliff:g id="NUMBER_1">%2$d</xliff:g> अयशस्वी प्रयत्नांनंतर, आपल्याला ईमेल खाते वापरून आपला फोन अनलॉक करण्यास सांगितले जाईल.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> सेकंदांमध्ये पुन्हा प्रयत्न करा."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"सिम पिन कोड चुकीचा आहे आपण आता आपले डिव्‍हाइस अनलॉक करण्‍यासाठी आपल्‍या वाहकाशी संपर्क साधावा."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">सिम पिन चुकीचा आहे, आपल्याकडे <xliff:g id="NUMBER_1">%d</xliff:g> प्रयत्न उर्वरित आहे.</item>
-      <item quantity="other">सिम पिन चुकीचा आहे, आपल्याकडे <xliff:g id="NUMBER_1">%d</xliff:g> प्रयत्न उर्वरित आहेत.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"सिम निरुपयोगी आहे. आपल्या वाहकाशी संपर्क साधा."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">सिम PUK कोड चुकीचा आहे, सिम कायमचे निरूपयोगी होण्यापूर्वी आपल्याकडे <xliff:g id="NUMBER_1">%d</xliff:g> प्रयत्न उर्वरित आहे.</item>
-      <item quantity="other">सिम PUK कोड चुकीचा आहे, सिम कायमचे निरूपयोगी होण्यापूर्वी आपल्याकडे <xliff:g id="NUMBER_1">%d</xliff:g> प्रयत्न उर्वरित आहेत.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"सिम पिन कार्य अयशस्‍वी झाले!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"सिम PUK कार्य अयशस्‍वी झाले!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"कोड स्‍वीकारला!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"सेवा नाही."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"इनपुट पद्धत स्विच करा"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"विमान मोड"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"डिव्‍हाइस रीस्टार्ट झाल्यावर नमुना आवश्‍यक आहे"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"डिव्‍हाइस रीस्टार्ट झाल्यावर पिन आवश्‍यक आहे"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"डिव्‍हाइस रीस्टार्ट झाल्यावर संकतेशब्द आवश्‍यक आहे"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"अतिरिक्त सुरक्षिततेसाठी नमुना आवश्‍यक आहे"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"अतिरिक्त सुरक्षिततेसाठी पिन आवश्‍यक आहे"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"अतिरिक्त सुरक्षिततेसाठी संकेतशब्द आवश्‍यक आहे"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"आपण प्रोफाईल स्विच करता तेव्‍हा नमुना आवश्‍यक आहे"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"आपण प्रोफाईल स्विच करता तेव्‍हा पिन आवश्‍यक आहे"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"आपण प्रोफाईल स्विच करता तेव्‍हा संकेतशब्द आवश्‍यक आहे"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"डिव्हाइस प्रशासकाने डिव्हाइस लॉक केले"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"डिव्हाइस व्यक्तिचलितरित्या लॉक केले होते"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">डिव्‍हाइस <xliff:g id="NUMBER_1">%d</xliff:g> तासासाठी अनलॉक केले गेले नाही. नमुन्याची पुष्टी करा.</item>
-      <item quantity="other">डिव्‍हाइस <xliff:g id="NUMBER_1">%d</xliff:g> तासांसाठी अनलॉक केले गेले नाही. नमुन्याची पुष्टी करा.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">डिव्‍हाइस <xliff:g id="NUMBER_1">%d</xliff:g> तासासाठी अनलॉक केले गेले नाही. पिन ची पुष्टी करा.</item>
-      <item quantity="other">डिव्‍हाइस <xliff:g id="NUMBER_1">%d</xliff:g> तासांसाठी अनलॉक केले गेले नाही. पिन ची पुष्टी करा.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">डिव्‍हाइस <xliff:g id="NUMBER_1">%d</xliff:g> तासासाठी अनलॉक केले गेले नाही. संकेतशब्दाची पुष्टी करा.</item>
-      <item quantity="other">डिव्‍हाइस <xliff:g id="NUMBER_1">%d</xliff:g> तासांसाठी अनलॉक केले गेले नाही. संकेतशब्दाची पुष्टी करा.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"ओळखले नाही"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-ms/strings.xml b/packages/Keyguard/res/values-ms/strings.xml
deleted file mode 100644
index b7b093f..0000000
--- a/packages/Keyguard/res/values-ms/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Pengawal kekunci"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Taip kod PIN"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Taip PUK SIM dan kod PIN baharu"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"Kod PUK SIM"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Kod PIN SIM baharu"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Sentuh untuk menaip kata laluan"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Taip kata laluan untuk membuka kunci"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Taip PIN untuk membuka kunci"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Kod PIN salah."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Sudah dicas"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Mengecas"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Mengecas dengan cepat"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Mengecas dengan perlahan"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Sambungkan pengecas anda."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Tekan Menu untuk membuka kunci."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Rangkaian dikunci"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Tiada kad SIM"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Tiada kad SIM dalam tablet."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Tiada kad SIM dalam telefon."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Masukkan kad SIM."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"Kad SIM tiada atau tidak boleh dibaca. Sila masukkan kad SIM."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Kad SIM tidak boleh digunakan."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Kad SIM anda telah dilumpuhkan secara kekal.\n Hubungi pembekal perkhidmatan wayarles anda untuk mendapatkan kad SIM lain."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"Kad SIM dikunci."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"Kad SIM dikunci dengan PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Membuka kunci kad SIM..."</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Kawasan PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Kawasan PIN SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Kawasan PUK SIM"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Penggera seterusnya ditetapkan pada <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Padam"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Masuk"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Lupa Corak"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Corak Salah"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Kata Laluan Salah"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"PIN salah"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Cuba lagi dalam <xliff:g id="NUMBER">%d</xliff:g> saat."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Lukiskan corak anda"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Masukkan PIN SIM"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Masukkan PIN SIM untuk \"<xliff:g id="CARRIER">%1$s</xliff:g>\""</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Masukkan PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Masukkan Kata Laluan"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"Kini SIM dilumpuhkan. Masukkan kod PUK untuk meneruskan. Hubungi pembawa untuk butiran."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" kini dilumpuhkan. Masukkan kod PUK untuk meneruskan. Hubungi pembawa untuk mendapatkan maklumat lanjut."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Masukkan kod PIN yang diingini"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Sahkan kod PIN yang diingini"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Membuka kunci kad SIM..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Taipkan PIN yang mengandungi 4 hingga 8 nombor."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"Kod PUK mestilah 8 nombor atau lebih."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Masukkan semula kod PIN yang betul. Percubaan berulang akan melumpuhkan SIM secara kekal."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Kod PIN tidak sepadan"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Terlalu banyak percubaan melukis corak"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Anda telah menaip PIN yang salah sebanyak <xliff:g id="NUMBER_0">%1$d</xliff:g> kali. \n\nCuba lagi dalam <xliff:g id="NUMBER_1">%2$d</xliff:g> saat."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Anda telah menaip kata laluan yang salah sebanyak <xliff:g id="NUMBER_0">%1$d</xliff:g> kali. \n\nCuba lagi dalam <xliff:g id="NUMBER_1">%2$d</xliff:g> saat."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Anda telah tersilap melukis corak buka kunci anda sebanyak <xliff:g id="NUMBER_0">%1$d</xliff:g> kali. \n\nCuba lagi dalam <xliff:g id="NUMBER_1">%2$d</xliff:g> saat."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Anda telah salah membuka kunci tablet sebanyak <xliff:g id="NUMBER_0">%1$d</xliff:g> kali. Selepas <xliff:g id="NUMBER_1">%2$d</xliff:g> lagi percubaan yang gagal, tablet ini akan ditetapkan semula sekali gus memadam semua data."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Anda telah salah membuka kunci telefon sebanyak <xliff:g id="NUMBER_0">%1$d</xliff:g> kali. Selepas <xliff:g id="NUMBER_1">%2$d</xliff:g> lagi percubaan yang gagal, telefon ini akan ditetapkan semula sekali gus memadam semua data."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Anda telah salah membuka kunci tablet sebanyak <xliff:g id="NUMBER">%d</xliff:g> kali. Tablet ini akan ditetapkan semula sekali gus memadam semua datanya."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Anda telah salah membuka kunci telefon sebanyak <xliff:g id="NUMBER">%d</xliff:g> kali. Telefon ini akan ditetapkan semula sekali gus memadam semua datanya."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Anda telah salah membuka kunci tablet sebanyak <xliff:g id="NUMBER_0">%1$d</xliff:g> kali. Selepas <xliff:g id="NUMBER_1">%2$d</xliff:g> lagi percubaan yang gagal, pengguna ini akan dialih keluar sekali gus memadam semua data pengguna."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Anda telah salah membuka kunci telefon sebanyak <xliff:g id="NUMBER_0">%1$d</xliff:g> kali. Selepas <xliff:g id="NUMBER_1">%2$d</xliff:g> lagi percubaan yang gagal, pengguna ini akan dialih keluar sekali gus memadam semua data pengguna."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Anda telah salah membuka kunci tablet sebanyak <xliff:g id="NUMBER">%d</xliff:g> kali. Pengguna ini akan dialih keluar sekali gus memadam semua data pengguna."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Anda telah salah membuka kunci telefon sebanyak <xliff:g id="NUMBER">%d</xliff:g> kali. Pengguna ini akan dialih keluar sekali gus memadam semua data pengguna."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Anda telah salah membuka kunci tablet sebanyak <xliff:g id="NUMBER_0">%1$d</xliff:g> kali. Selepas <xliff:g id="NUMBER_1">%2$d</xliff:g> lagi percubaan yang gagal, profil kerja anda akan dialih keluar sekali gus memadam semua data profil."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Anda telah salah membuka kunci telefon sebanyak <xliff:g id="NUMBER_0">%1$d</xliff:g> kali. Selepas <xliff:g id="NUMBER_1">%2$d</xliff:g> lagi percubaan yang gagal, profil kerja ini akan dialih keluar sekali gus memadam semua data profil."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Anda telah salah membuka kunci tablet sebanyak <xliff:g id="NUMBER">%d</xliff:g> kali. Profil kerja ini akan dialih keluar sekali gu memadam semua data profil."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Anda telah salah membuka kunci telefon sebanyak <xliff:g id="NUMBER">%d</xliff:g> kali. Profil kerja ini akan dialih keluar sekali gus memadam semua data profil."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Anda telah tersilap melukis corak buka kunci sebanyak <xliff:g id="NUMBER_0">%1$d</xliff:g> kali. Selepas <xliff:g id="NUMBER_1">%2$d</xliff:g> lagi percubaan yang tidak berjaya, anda akan diminta membuka kunci tablet anda menggunakan log masuk Google anda.\n\n Cuba lagi dalam <xliff:g id="NUMBER_2">%3$d</xliff:g> saat."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Anda telah tersilap lukis corak buka kunci sebanyak <xliff:g id="NUMBER_0">%1$d</xliff:g> kali. Selepas <xliff:g id="NUMBER_1">%2$d</xliff:g> lagi percubaan yang tidak berjaya, anda akan diminta membuka kunci telefon anda menggunakan log masuk Google anda.\n\n Cuba lagi dalam <xliff:g id="NUMBER_2">%3$d</xliff:g> saat."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Kod PIN SIM tidak betul, jadi anda harus menghubungi pembawa anda untuk membuka kunci peranti."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">Kod PIN SIM salah, anda ada <xliff:g id="NUMBER_1">%d</xliff:g> cubaan lagi.</item>
-      <item quantity="one">Kod PIN SIM tidak betul. Anda ada <xliff:g id="NUMBER_0">%d</xliff:g> cubaan lagi sebelum anda harus menghubungi pembawa anda untuk membuka kunci peranti.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM tidak boleh digunakan. Hubungi pembawa anda."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">Kod PUK SIM tidak betul, anda ada <xliff:g id="NUMBER_1">%d</xliff:g> cubaan lagi sebelum SIM tidak boleh digunakan secara kekal.</item>
-      <item quantity="one">Kod PUK SIM tidak betul, anda ada <xliff:g id="NUMBER_0">%d</xliff:g> cubaan lagi sebelum SIM tidak boleh digunakan secara kekal.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Operasi PIN SIM gagal!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Operasi PUK SIM gagal!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Kod Diterima!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Tiada perkhidmatan."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Tukar kaedah masukan"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Mod Pesawat"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Corak diperlukan setelah peranti dimulakan semula"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"PIN diperlukan setelah peranti dimulakan semula"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Kata laluan diperlukan setelah peranti dimulakan semula"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Corak diperlukan untuk keselamatan tambahan"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"PIN diperlukan untuk keselamatan tambahan"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Kata laluan diperlukan untuk keselamatan tambahan"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Corak diperlukan apabila anda menukar profil"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"PIN diperlukan apabila anda menukar profil"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Kata laluan diperlukan apabila anda menukar profil"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Pentadbir peranti mengunci peranti"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Peranti telah dikunci secara manual"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Peranti tidak dibuka kuncinya selama <xliff:g id="NUMBER_1">%d</xliff:g> jam. Sahkan corak.</item>
-      <item quantity="one">Peranti tidak dibuka kuncinya selama <xliff:g id="NUMBER_0">%d</xliff:g> jam. Sahkan corak.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Peranti tidak dibuka kuncinya selama <xliff:g id="NUMBER_1">%d</xliff:g> jam. Sahkan PIN.</item>
-      <item quantity="one">Peranti tidak dibuka kuncinya selama <xliff:g id="NUMBER_0">%d</xliff:g> jam. Sahkan PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Peranti tidak dibuka kuncinya selama <xliff:g id="NUMBER_1">%d</xliff:g> jam. Sahkan kata laluan.</item>
-      <item quantity="one">Peranti tidak dibuka kuncinya selama <xliff:g id="NUMBER_0">%d</xliff:g> jam. Sahkan kata laluan.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Tidak dicam"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-my/strings.xml b/packages/Keyguard/res/values-my/strings.xml
deleted file mode 100644
index 7a7664e..0000000
--- a/packages/Keyguard/res/values-my/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"သော့ချက် စောင့်ပေးသူ"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"PIN ကုဒ် ရိုက်ထည့်ပါ"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"ဆင်းမ်ကဒ် ပင်နံပါတ် ပြန်ဖွင့်သည့် ကုဒ် နှင့် လျို့ဝှက်နံပါတ်သစ် ရိုက်ထည့်ပါ"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"ဆင်းမ်ကဒ် ပင်နံပါတ် ပြန်ဖွင့်သည့် ကုဒ် နံပါတ်"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"ဆင်းမ်ကဒ် လျို့ဝှက်ပင်နံပါတ် အသစ်သွင်းရန်"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"စကားဝှက် ရိုက်ရန် ထိပါ"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"သော့ဖွင့်ရန် စကားဝှက်ကို ရိုက်ထည့်ပါ"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"သော့ဖွင့်ရန် PIN ကို ရိုက်ထည့်ပါ"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"ပင်နံပါတ်မှားနေပါသည်"</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"အားသွင်းပြီးပါပြီ"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"အားသွင်းနေ"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"လျှင်မြန်စွာ အားသွင်းနေသည်"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"နှေးကွေးစွာ အားသွင်းနေသည်"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"အားသွင်းကြိုးဖြင့် ဆက်သွယ်ပါ"</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"မီနူးကို နှိပ်ခြင်းဖြင့် သော့ဖွင့်ပါ"</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"ကွန်ရက် သော့ကျနေခြင်း"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"ဆင်းမ်ကဒ်မရှိပါ"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"တက်ဘလက်ထဲတွင်း ဆင်းမ်ကဒ် မရှိပါ"</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"ဖုန်းထဲတွင် ဆင်းမ်ကဒ် မရှိပါ"</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"ဆင်းမ်ကဒ်ကို ထည့်ပါ"</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"ဆင်းမ်ကဒ် ပျောက်ဆုံးခြင်း သို့ ဖတ်လို့ မရပါ။ ဆင်းမ်ကဒ်ကို ထည့်ပါ"</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"ဆင်းမ်ကဒ် သုံးလို့ မရပါ"</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"ဆင်းမ်ကဒ် က လုံး၀ ပြန်ဖွင့်လို့ မရတော့ါ.\n နောက် ကဒ် တစ်ခုအတွက် ဝန်ဆောင်မှုပေးသူနှင့် ဆက်သွယ်ပါ"</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"ဆင်းမ်ကဒ် သော့ကျနေပါသည်"</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"ဆင်းမ်ကဒ် ရဲ့ ပင်နံပါတ် ပြန်ဖွင့်သည့် ကုဒ် သော့ကျနေပါသည်"</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"ဆင်းမ်ကဒ် ကို သော့ဖွင့်နေပါသည်"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN နေရာ"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM PIN နေရာ"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM PUK နေရာ"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"<xliff:g id="ALARM">%1$s</xliff:g> အတွက် နောက် သတိပေးရန် သတ်မှတ်ချက်"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"ဖျက်ရန်"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enterခလုတ်"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"ပုံဖော်မှုအား မေ့လျော့ခြင်း"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"ပုံဆွဲအမှား"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"စကားဝှက်အမှား"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"ပင် နံပါတ်အမှား"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"<xliff:g id="NUMBER">%d</xliff:g> စက္ကန့်အကြာတွင် ပြန်ကြိုးစားပါ"</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"သင့်ရဲ့ သော့ဖွင့်သော ပုံစံကို ဆွဲပါ"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"ဆင်းမ်ကဒ် ပင် နံပါတ် ရိုက်ထည့်ပါ"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"\"<xliff:g id="CARRIER">%1$s</xliff:g>\" အတွက် ဆင်းမ် ပင်နံပါတ် ရိုက်ထည့်ပါ။"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"ပင်နံပါတ် ရိုက်ထည့်ပါ"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"လျို့ဝှက်နံပါတ် ရိုက်ထည့်ပါ"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"ဆင်းမ်ကဒ်သည် ယခု ပိတ်သွားပါပြီ ဆက်လက် လုပ်ဆောင်ရန် ပင်နံပါတ် ပြန်ဖွင့်သည့် ကုဒ်ကို ရိုက်ထည့်ပါ။ ပိုမိုသိချင်လျင် ဖုန်းဝန်ဆောင်မှု ပေးသောဌာန အားဆက်သွယ်နိုင်ပါသည်။"</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"ဆင်းမ် \"<xliff:g id="CARRIER">%1$s</xliff:g>\" သည် ယခု အလုပ်မလုပ်တော့ပါ။ ဆက်လက်သွားရန် PUK ကုဒ် ရိုက်ထည့်ပါ၊။အသေးစိတ်သိရရန် ဖုန်းဝန်ဆောင်မှုလုပ်ငန်းအား ဆက်သွယ်ပါ။"</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"လိုချင်သော ပင်နံပါတ်ကို ရိုက်ထည့်ပါ"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"လိုချင်သော ပင်နံပါတ်ကို အတည်ပြုရန်"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"ဆင်းမ်ကဒ် ကို သော့ဖွင့်နေပါသည်"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"ဂဏန်း၄ လုံးမှ ၈ လုံးအထိ ရှိသော ပင်နံပါတ် ရိုက်ထည့်ပါ"</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"ပင်နံပါတ် ပြန်ဖွင့်သည့် ကုဒ်သည် ဂဏန်း ၈ လုံး သို့ ၈လုံး ထက် ကျော်ရပါမည်။"</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"ပင်နံပါတ် ပြန်ဖွင့်သည့် ကုဒ်ကို ပြန်လည် ရိုက်ထည့်ပါ.။ ထပ်ခါ ထပ်ခါ ကြိုးစားခြင်းသည် ဆင်းမ်ကဒ်ကို အသုံးပြုမရအောင် ဖြစ်နေနိုင်ပါသည်။"</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"ပင် နံပါတ် မတူညီပါ"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"မြောက်မြားစွာ ပုံစံဆွဲ သော့ဖွင့်မှု"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"သင် ပင် နံပါတ်ကို အမှားကို <xliff:g id="NUMBER_0">%1$d</xliff:g> ကြိမ် ရိုက်ထည့်ပြီးပါပြီ။ \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> စက္ကန့် အကြာတွင် ပြန်လည်ကြိုးစားပါ"</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"သင်သည် စကားဝှက်ကို  <xliff:g id="NUMBER_0">%1$d</xliff:g> ကြိမ် မှားရိုက်ပြီးပါပြီ။ \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> စက္ကန့်အကြာ ပြန်လည်ကြိုးစားပါ"</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"သင် ပုံစံဆွဲ သော့ဖွင့်ခြင်းကို <xliff:g id="NUMBER_0">%1$d</xliff:g> ကြိမ်မြောက် မအောင်မြင်ပါ။ \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> စက္ကန့်အကြာတွင် ပြန်လည် ကြိုးစားပါ"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"တက်ဘလက်အား သော့ဖွင့်ရန် သင် <xliff:g id="NUMBER_0">%1$d</xliff:g> ကြိမ် ကြိုးစားရာ မမှန်ကန်ခဲ့ပါ။ <xliff:g id="NUMBER_1">%2$d</xliff:g> ကြိမ် ကြိုးစားပြီးနောက် မအောင်မြင်ပါက၊ ဤတက်ဘလက်အား အစမှပြန်စဖွင့်မည်ဖြစ်ပြီး၊ ၎င်း၏ဒေတာအားလုံး ပျက်သွားမည်ဖြစ်သည်။"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"ဖုန်းအား သော့ဖွင့်ရန် သင် <xliff:g id="NUMBER_0">%1$d</xliff:g> ကြိမ် ကြိုးစားရာ မမှန်ကန်ခဲ့ပါ။ <xliff:g id="NUMBER_1">%2$d</xliff:g> ကြိမ် ကြိုးစားပြီးနောက် မအောင်မြင်ပါက၊ ဤဖုန်းအား အစမှပြန်စဖွင့်မည်ဖြစ်ပြီး၊ ၎င်း၏ဒေတာအားလုံး ပျက်သွားမည်ဖြစ်သည်။"</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"တက်ဘလက်အား သော့ဖွင့်ရန် သင် <xliff:g id="NUMBER">%d</xliff:g> ကြိမ် ကြိုးစားရာ မမှန်ကန်ခဲ့ပါ။ ဤဖုန်းအား အစမှပြန်စဖွင့်မည်ဖြစ်ပြီး၊ ၎င်း၏ဒေတာအားလုံး ပျက်သွားမည်ဖြစ်သည်။"</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"ဖုန်းအား သော့ဖွင့်ရန် သင် <xliff:g id="NUMBER">%d</xliff:g> ကြိမ် ကြိုးစားရာ မမှန်ကန်ခဲ့ပါ။ ဤဖုန်းအား အစမှပြန်စဖွင့်မည်ဖြစ်ပြီး၊ ၎င်း၏ဒေတာအားလုံး ပျက်သွားမည်ဖြစ်သည်။"</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"တက်ဘလက်အား သော့ဖွင့်ရန် သင် <xliff:g id="NUMBER_0">%1$d</xliff:g> ကြိမ် ကြိုးစားရာ မမှန်ကန်ခဲ့ပါ။ <xliff:g id="NUMBER_1">%2$d</xliff:g> ကြိမ် ကြိုးစားပြီးနောက် မအောင်မြင်ပါက၊ ဤအသုံးပြုသူအား ဖယ်ထုတ်ခြင်းခံရမည်ဖြစ်ပြီး၊ အသုံးပြုသူဒေတာအားလုံး ပျက်သွားပါမည်။"</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"ဖုန်းအား သော့ဖွင့်ရန် သင် <xliff:g id="NUMBER_0">%1$d</xliff:g> ကြိမ် ကြိုးစားရာ မမှန်ကန်ခဲ့ပါ။ <xliff:g id="NUMBER_1">%2$d</xliff:g> ကြိမ် ကြိုးစားပြီးနောက် မအောင်မြင်ပါက၊ ဤအသုံးပြုသူအား ဖယ်ထုတ်ခြင်းခံရမည်ဖြစ်ပြီး၊ အသုံးပြုသူဒေတာအားလုံး ပျက်သွားပါမည်။"</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"တက်ဘလက်အား သော့ဖွင့်ရန် သင် <xliff:g id="NUMBER">%d</xliff:g> ကြိမ် ကြိုးစားရာ မမှန်ကန်ခဲ့ပါ။ ဤအသုံးပြုသူအား ဖယ်ထုတ်မည်ဖြစ်ပြီး၊ အသုံးပြုသူဒေတာအားလုံး ပျက်သွားမည်ဖြစ်သည်။"</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"ဖုန်းအား သော့ဖွင့်ရန် သင် <xliff:g id="NUMBER">%d</xliff:g> ကြိမ် ကြိုးစားရာ မမှန်ကန်ခဲ့ပါ။ ဤအသုံးပြုသူအား ဖယ်ထုတ်မည်ဖြစ်ပြီး၊ အသုံးပြုသူဒေတာအားလုံး ပျက်သွားမည်ဖြစ်သည်။"</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"တက်ဘလက်အား သော့ဖွင့်ရန် သင် <xliff:g id="NUMBER_0">%1$d</xliff:g> ကြိမ် ကြိုးစားရာ မမှန်ကန်ခဲ့ပါ။ <xliff:g id="NUMBER_1">%2$d</xliff:g> ကြိမ် ကြိုးစားပြီးနောက် မအောင်မြင်ပါက၊ သင့် အလုပ်ပရိုဖိုင်အား ဖယ်ထုတ်ခြင်းခံရမည်ဖြစ်ပြီး၊ ပရိုဖိုင်ဒေတာအားလုံး ပျက်သွားပါမည်။"</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"ဖုန်းအား သော့ဖွင့်ရန် သင် <xliff:g id="NUMBER_0">%1$d</xliff:g> ကြိမ် ကြိုးစားရာ မမှန်ကန်ခဲ့ပါ။ <xliff:g id="NUMBER_1">%2$d</xliff:g> ကြိမ် ကြိုးစားပြီးနောက် မအောင်မြင်ပါက၊ သင့် အလုပ်ပရိုဖိုင်အား ဖယ်ထုတ်ခြင်းခံရမည်ဖြစ်ပြီး၊ ပရိုဖိုင်ဒေတာအားလုံး ပျက်သွားပါမည်။"</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"တက်ဘလက်အား သော့ဖွင့်ရန် သင် <xliff:g id="NUMBER">%d</xliff:g> ကြိမ် ကြိုးစားရာ မမှန်ကန်ခဲ့ပါ။ အလုပ်ပရိုဖိုင် ဖယ်ထုတ်ခံရမည်ဖြစ်ပြီး၊ ပရိုဖိုင်ဒေတာအားလုံး ပျက်သွားမည်ဖြစ်သည်။"</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"ဖုန်းအား သော့ဖွင့်ရန် သင် <xliff:g id="NUMBER">%d</xliff:g> ကြိမ် ကြိုးစားရာ မမှန်ကန်ခဲ့ပါ။ အလုပ်ပရိုဖိုင် ဖယ်ထုတ်ခံရမည်ဖြစ်ပြီး၊ ပရိုဖိုင်ဒေတာအားလုံး ပျက်သွားမည်ဖြစ်သည်။"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"သင် ပုံဖော်၍သော့ဖွင့်ခြင်းကို  <xliff:g id="NUMBER_0">%1$d</xliff:g> အကြိမ် မှန်ကန်စွာ မပြုလုပ်နိုင်ပါ။  နောက်ထပ် <xliff:g id="NUMBER_1">%2$d</xliff:g> အကြိမ် မမှန်ကန်ပါက သင့်တက်ဘလက်အား အီးမေးလ်အသုံးပြု၍ သော့ဖွင့်ရန် တောင်းဆိုပါလိမ့်မည်။ \n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> စက္ကန့်အကြာတွင် ပြန်လည် ကြိုးစားပါ"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"သင် ပုံဖော်၍သော့ဖွင့်ခြင်းကို <xliff:g id="NUMBER_0">%1$d</xliff:g> အကြိမ် မှန်ကန်စွာ မပြုလုပ်နိုင်ပါ။ နောက်ထပ် <xliff:g id="NUMBER_1">%2$d</xliff:g> အကြိမ် မမှန်ကန်ပါက သင့်ဖုန်းအား အီးမေးလ်အသုံးပြု၍ သော့ဖွင့်ရန် တောင်းဆိုပါလိမ့်မည်။ \n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> စက္ကန့်အကြာတွင် ပြန်လည် ကြိုးစားပါ"</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"ဆင်းကဒ် လျှို့ဝှက် အမှတ် မှားယွင်းပါသည်, ဖုန်းလိုင်းဌာနကို ဆက်သွယ်ရမည် ဖြစ်ပါတယ်"</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">ဆင်းမ်ကဒ်၏ ပင်နံပါတ် မှားနေပါသည်၊ သင့်တွင်<xliff:g id="NUMBER_1">%d</xliff:g> ခါ ကြိုးစားခွင့် ကျန်ပါသေးသည်။</item>
-      <item quantity="one">ဆင်းမ်ကဒ်၏ ပင်နံပါတ် မှားနေပါသည်၊ သင့်ကိရိယာကို ဖွင့်ရန်  မိုဘိုင်းဖုန်းဆက်သွယ်ရေးဝန်ဆောင်မှုဌာနသို့ မဆက်သွယ်မီ သင့်တွင် <xliff:g id="NUMBER_0">%d</xliff:g> ခါ ကြိုးစားခွင့် ကျန်ပါသေးသည်။</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"ဆင်းမ်ကဒ်သုံးလို့မရတော့ပါ. ဖုန်းလိုင်းဌာနကို ဆက်သွယ်ပါ"</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">ဆင်းမ်ကဒ်၏ ပင်နံပါတ်ပြန်ဖွင့်သည့် ကုဒ် (PUK) မမှန်ပါ၊ ဆင်းမ်ကဒ်သည် ဆက်လက်အသုံးမပြုနိုင်အောင် မဖြစ်လာခင် သင့်တွင် <xliff:g id="NUMBER_1">%d</xliff:g>ခါ ကြိုးစားခွင့်များကျန်ပါသေးသည်။</item>
-      <item quantity="one">ဆင်းမ်ကဒ်၏ ပင်နံပါတ်ပြန်ဖွင့်သည့် ကုဒ် (PUK) မမှန်ပါ၊ ဆင်းမ်ကဒ်သည် ဆက်လက်အသုံးမပြုနိုင်အောင် မဖြစ်လာခင် သင့်တွင် <xliff:g id="NUMBER_0">%d</xliff:g> ခါ ကြိုးစားခွင့်ကျန်ပါသေးသည်။</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"ဆင်းမ်ကဒ် ပင် လုပ်ဆောင်မှု မအောင်မြင်ပါ"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"ပင်နံပါတ် ပြန်ဖွင့်သည့် ကုဒ် လုပ်ဆောင်မှု မအောင်မြင်ပါ"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"ကုဒ်နံပါတ်ကို လက်ခံလိုက်ပါသည်"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"ဆားဗစ် မရှိပါ"</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"ထည့်သွင်းမှုနည်းလမ်းကို ပြောင်းလဲပါ"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"လေယာဉ်ပေါ်သုံးစနစ်"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"ကိရိယာကို ပြန်ဖွင့်လျှင် ပုံစံ လိုအပ်ပါသည်"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"ကိရိယာကို ပြန်ဖွင့်လျှင် PIN လိုအပ်ပါသည်"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"ကိရိယာကို ပြန်ဖွင့်လျှင် စကားဝှက် လိုအပ်ပါသည်"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"ပိုပြီး လုံခြုံစေရန် ပုံစံ လိုအပ်ပါသည်"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"ပိုပြီး လုံခြုံစေရန် PIN လိုအပ်ပါသည်"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"ပိုပြီး လုံခြုံစေရန် စကားဝှက် လိုအပ်ပါသည်"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"ပရိုဖိုင်များကို သင် ပြောင်းလျှင် ပုံစံ လိုအပါသည်"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"ပရိုဖိုင်များကို သင် ပြောင်းလျှင် PIN လိုအပါသည်"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"ပရိုဖိုင်များကို သင် ပြောင်းလျှင် စကားဝှက် လိုအပါသည်"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"စက်ပစ္စည်းစီမံခန့်ခွဲသူသည် စက်ပစ္စည်းကို လော့ခ်ချထားသည်"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"စက်ပစ္စည်းကို ကိုယ်တိုင်ကိုယ်ကျ လော့ခ်ချထားခဲ့သည်"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">စက်ကိရိယာအား <xliff:g id="NUMBER_1">%d</xliff:g> နာရီကြာ သော့ပိတ်ထား၏။ ပုံစံအား အတည်ပြုပါ။</item>
-      <item quantity="one">စက်ကိရိယာအား <xliff:g id="NUMBER_0">%d</xliff:g> နာရီကြာ သော့ပိတ်ထား၏။ ပုံစံအား အတည်ပြုပါ။</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">စက်ကိရိယာအား <xliff:g id="NUMBER_1">%d</xliff:g> နာရီကြာ သော့ပိတ်ထား၏။ PIN အား အတည်ပြုပါ။</item>
-      <item quantity="one">စက်ကိရိယာအား <xliff:g id="NUMBER_0">%d</xliff:g> နာရီကြာ သော့ပိတ်ထား၏။ PIN အား အတည်ပြုပါ။</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">စက်ကိရိယာအား <xliff:g id="NUMBER_1">%d</xliff:g> နာရီကြာ သော့ပိတ်ထား၏။ စကားဝှက်အား အတည်ပြုပါ။</item>
-      <item quantity="one">စက်ကိရိယာအား <xliff:g id="NUMBER_0">%d</xliff:g> နာရီကြာ သော့ပိတ်ထား၏။ စကားဝှက်အား အတည်ပြုပါ။</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"အသိအမှတ်မပြုပါ"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-nb/strings.xml b/packages/Keyguard/res/values-nb/strings.xml
deleted file mode 100644
index e0035da..0000000
--- a/packages/Keyguard/res/values-nb/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Tastaturlås"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Skriv inn PIN-kode"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Skriv inn PUK-koden for SIM-kortet og en ny PIN-kode"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"PUK-koden for SIM-kortet"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Ny PIN-kode for SIM-kortet"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Trykk for å skrive inn passord"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Skriv inn passord for å låse opp"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Skriv inn PIN-kode for å låse opp"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Feil personlig kode."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Oppladet"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Lader"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Lader raskt"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Lader sakte"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Koble til laderen."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Trykk på Meny for å låse opp."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Nettverk låst"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"SIM-kortet mangler"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Nettbrettet mangler SIM-kort."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Telefonen mangler SIM-kort."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Sett inn et SIM-kort."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM-kort mangler eller er uleselig. Sett inn et SIM-kort."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Ubrukelig SIM-kort."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"SIM-kortet er deaktivert permanent.\nTa kontakt med leverandøren av trådløstjenesten for å få et nytt SIM-kort."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM-kortet er låst."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM-kortet er PUK-låst."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Låser opp SIM-kortet ..."</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN-området"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"PIN-området for SIM-kortet"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"PUK-området for SIM-kortet"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Neste alarm er innstilt for <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Slett"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Har du glemt mønsteret?"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Feil mønster"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Feil passord"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Feil PIN-kode"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Prøv på nytt om <xliff:g id="NUMBER">%d</xliff:g> sekunder."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Tegn mønsteret ditt"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Skriv inn PIN-koden for SIM-kortet"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Skriv inn PIN-koden for SIM-kortet «<xliff:g id="CARRIER">%1$s</xliff:g>»"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Skriv inn PIN-koden"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Skriv inn passordet"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM-kortet er nå deaktivert. Skriv inn PUK-koden for å fortsette. Ta kontakt med operatøren for mer informasjon."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM-kortet «<xliff:g id="CARRIER">%1$s</xliff:g>» er nå deaktivert. Skriv inn PUK-kode for å fortsette. Kontakt operatøren for detaljer."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Tast inn ønsket PIN-kode"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Bekreft ønsket PIN-kode"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Låser opp SIM-kortet ..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Skriv inn en PIN-kode på fire til åtte sifre."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK-koden skal være på åtte eller flere siffer."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Skriv inn den korrekte PUK-koden på nytt. Gjentatte forsøk kommer til å deaktivere SIM-kortet."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN-kodene stemmer ikke overens"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"For mange forsøk på tegning av mønster"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Du har oppgitt feil PIN-kode <xliff:g id="NUMBER_0">%1$d</xliff:g> ganger. \n\nPrøv på nytt om <xliff:g id="NUMBER_1">%2$d</xliff:g> sekunder."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Du har tastet inn passordet ditt feil <xliff:g id="NUMBER_0">%1$d</xliff:g> ganger. \n\nPrøv på nytt om <xliff:g id="NUMBER_1">%2$d</xliff:g> sekunder."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Du har tegnet opplåsningsmønsteret ditt feil <xliff:g id="NUMBER_0">%1$d</xliff:g> ganger. \n\nPrøv på nytt om <xliff:g id="NUMBER_1">%2$d</xliff:g> sekunder."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Du har gjort feil i forsøket på å låse opp nettbrettet <xliff:g id="NUMBER_0">%1$d</xliff:g> ganger. Etter <xliff:g id="NUMBER_1">%2$d</xliff:g> mislykket forsøk til, tilbakestilles nettbrettet, noe som vil slette alle nettbrettets data."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Du har gjort feil i forsøket på å låse opp telefonen <xliff:g id="NUMBER_0">%1$d</xliff:g> ganger. Etter <xliff:g id="NUMBER_1">%2$d</xliff:g> mislykket forsøk til, tilbakestilles telefonen, noe som vil slette alle telefonens data."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Du har gjort feil i forsøket på å låse opp nettbrettet <xliff:g id="NUMBER">%d</xliff:g> ganger. Dette nettbrettet blir nå tilbakestilt, og alle data blir slettet."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Du har gjort feil i forsøket på å låse opp telefonen <xliff:g id="NUMBER">%d</xliff:g> ganger. Denne telefonen blir nå tilbakestilt, og alle data blir slettet.."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Du har gjort feil i forsøket på å låse opp nettbrettet <xliff:g id="NUMBER_0">%1$d</xliff:g> ganger. Etter <xliff:g id="NUMBER_1">%2$d</xliff:g> mislykket forsøk til, fjernes brukeren, noe som vil slette alle brukerdata."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Du har gjort feil i forsøket på å låse opp telefonen <xliff:g id="NUMBER_0">%1$d</xliff:g> ganger. Etter <xliff:g id="NUMBER_1">%2$d</xliff:g> mislykket forsøk til, fjernes brukeren, noe som vil slette alle brukerdata."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Du har gjort feil i forsøket på å låse opp nettbrettet <xliff:g id="NUMBER">%d</xliff:g> ganger. Denne brukeren blir nå fjernet, og alle brukerdata blir slettet."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Du har gjort feil i forsøket på å låse opp telefonen <xliff:g id="NUMBER">%d</xliff:g> ganger. Denne brukeren blir nå fjernet, og aller brukerdata blir slettet."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Du har gjort feil i forsøket på å låse opp nettbrettet <xliff:g id="NUMBER_0">%1$d</xliff:g> ganger. Etter <xliff:g id="NUMBER_1">%2$d</xliff:g> mislykket forsøk til, fjernes arbeidsprofilen, noe som vil slette alle profildata."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Du har gjort feil i forsøket på å låse opp telefonen <xliff:g id="NUMBER_0">%1$d</xliff:g> ganger. Etter <xliff:g id="NUMBER_1">%2$d</xliff:g> mislykket forsøk til, fjernes arbeidsprofilen, noe som vil slette alle profildata."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Du har gjort feil i forsøket på å låse opp nettbrettet <xliff:g id="NUMBER">%d</xliff:g> ganger. Arbeidsprofilen blir fjernet, og alle profildata blir slettet."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Du har gjort feil i forsøket på å låse opp telefonen <xliff:g id="NUMBER">%d</xliff:g> ganger. Arbeidsprofilen blir fjernet, og alle profildata blir slettet."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Du har tegnet opplåsningsmønsteret feil <xliff:g id="NUMBER_0">%1$d</xliff:g> ganger. Etter ytterligere <xliff:g id="NUMBER_1">%2$d</xliff:g> gale forsøk, blir du bedt om å låse opp nettbrettet via en e-postkonto.\n\n Prøv på nytt om <xliff:g id="NUMBER_2">%3$d</xliff:g> sekunder."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Du har tegnet opplåsningsmønsteret feil <xliff:g id="NUMBER_0">%1$d</xliff:g> ganger. Etter ytterligere <xliff:g id="NUMBER_1">%2$d</xliff:g> gale forsøk, blir du bedt om å låse opp telefonen via en e-postkonto.\n\n Prøv på nytt om <xliff:g id="NUMBER_2">%3$d</xliff:g> sekunder."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Feil PIN-kode for SIM-kortet. Du må nå kontakte operatøren din for å låse opp enheten."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">Feil PIN-kode for SIM-kortet. Du har <xliff:g id="NUMBER_1">%d</xliff:g> forsøk igjen.</item>
-      <item quantity="one">Feil PIN-kode for SIM-kortet. Du har <xliff:g id="NUMBER_0">%d</xliff:g> forsøk igjen før du må kontakte operatøren din for å låse opp enheten.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM-kortet er ubrukelig. Kontakt operatøren din."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">Feil PUK-kode for SIM-kortet. Du har <xliff:g id="NUMBER_1">%d</xliff:g> forsøk igjen før SIM-kortet blir permanent ubrukelig.</item>
-      <item quantity="one">Feil PUK-kode for SIM-kortet. Du har <xliff:g id="NUMBER_0">%d</xliff:g> forsøk igjen før SIM-kortet blir permanent ubrukelig.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"PIN-koden for SIM-kortet ble avvist."</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"PUK-koden for SIM-kortet ble avvist."</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Koden er godkjent."</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Ingen tjeneste."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Bytt inndatametode"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Flymodus"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Du må tegne mønsteret etter at enheten har startet på nytt"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Du må skrive inn PIN-koden etter at enheten har startet på nytt"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Du må skrive inn passordet etter at enheten har startet på nytt"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Du må tegne mønsteret for ekstra sikkerhet"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Du må skrive inn PIN-koden for ekstra sikkerhet"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Du må skrive inn passordet for ekstra sikkerhet"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Du må tegne mønsteret når du bytter profil"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Du må skrive inn PIN-koden når du bytter profil"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Du må skrive inn passordet når du bytter profil"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Enhetsadministratoren har låst enheten"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Enheten ble låst manuelt"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Enheten er ikke blitt låst opp de siste <xliff:g id="NUMBER_1">%d</xliff:g> timene. Bekreft mønsteret.</item>
-      <item quantity="one">Enheten er ikke blitt låst opp den siste <xliff:g id="NUMBER_0">%d</xliff:g> timen. Bekreft mønsteret.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Enheten er ikke blitt låst opp de siste <xliff:g id="NUMBER_1">%d</xliff:g> timene. Bekreft PIN-koden.</item>
-      <item quantity="one">Enheten er ikke blitt låst opp den siste <xliff:g id="NUMBER_0">%d</xliff:g> timen. Bekreft PIN-koden.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Enheten er ikke blitt låst opp de siste <xliff:g id="NUMBER_1">%d</xliff:g> timene. Bekreft passordet.</item>
-      <item quantity="one">Enheten er ikke blitt låst opp den siste <xliff:g id="NUMBER_0">%d</xliff:g> timen. Bekreft passordet.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Ikke gjenkjent"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-ne/strings.xml b/packages/Keyguard/res/values-ne/strings.xml
deleted file mode 100644
index 47f5432..0000000
--- a/packages/Keyguard/res/values-ne/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"किगार्ड"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"PIN कोड टाइप गर्नुहोस्"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"SIM PUK र नयाँ PIN कोड टाइप गर्नुहोस्"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM PUK कोड"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"नयाँ SIM PIN कोड"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"पासवर्ड टाइप गर्न छुनुहोस्"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"अनलक गर्न पासवर्ड टाइप गर्नुहोस्।"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"अनलक गर्न PIN कोड टाइप गर्नुहोस्"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"गलत PIN कोड।"</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"चार्ज भयो"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"चार्ज हुँदै"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"छिटो चार्ज हुँदै"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"बिस्तारै चार्ज हुँदै"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"तपाईँको चार्जर जोड्नुहोस्।"</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"अनलक गर्न मेनु थिच्नुहोस्।"</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"नेटवर्क लक गरिएको छ"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"SIM कार्ड छैन"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"ट्याब्लेटमा SIM कार्ड छैन।"</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"फोनमा कुनै SIM कार्ड छैन।"</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"SIM कार्ड भित्र राख्नुहोस्।"</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM कार्ड हराइरहेको छ वा पढ्न योग्य छैन। SIM कार्ड हाल्नुहोस्।"</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"प्रयोग अयोग्य SIM कार्ड।"</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"तपाईँको SIM कार्ड स्थायी रूपमा असक्षम पारिएको छ।\n अर्को SIM कार्डको लागि तपाईँको ताररहित सेवा प्रदायकसँग सम्पर्क गर्नुहोस्।"</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM कार्ड लक गरियो।"</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM कार्ड PUK-लक छ।"</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"SIM कार्ड अनलक हुँदै…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"पीन क्षेत्र"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM पिन क्षेत्र"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM पुक क्षेत्र"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"<xliff:g id="ALARM">%1$s</xliff:g> को लागि अर्को चेतावनी सेट"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"मेट्नुहोस्"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"प्रविष्टि गर्नुहोस्"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"ढाँचा बिर्सनु भयो"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"गलत ढाँचा"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"गलत पासवर्ड"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"गलत PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"<xliff:g id="NUMBER">%d</xliff:g>सेकेन्डमा फेरि प्रयास गर्नुहोस्।"</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"आफ्नो ढाँचा कोर्नुहोस्"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"SIM PIN प्रविष्टि गर्नुहोस्"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"\"<xliff:g id="CARRIER">%1$s</xliff:g>\"का लागि SIM PIN प्रविष्ट गर्नुहोस्"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"PIN प्रविष्टि गर्नुहोस्"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"पासवर्ड प्रविष्टि गर्नुहोस्"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM कार्ड अहिले असक्षम छ। सुचारु गर्नको लागि PUK कोड प्रविष्टि गर्नुहोस्।  विवरणको लागि वाहकलाई सम्पर्क गर्नुहोस्।"</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM \" <xliff:g id="CARRIER">%1$s</xliff:g> \" अहिले अक्षम छ। जारी गर्न PUK कोड प्रविष्ट गर्नुहोस्। विवरणका लागि वाहकलाई सम्पर्क राख्नुहोस्।"</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"इच्छित PIN कोड प्रविष्टि गर्नुहोस्"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"मनपर्दो PIN कोड निश्चित गर्नुहोस्"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"SIM कार्ड अनलक गर्दै…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"४ देखि ८ वाट नम्बर भएको एउटा PIN टाइप गर्नुहोस्।"</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK कोड ८ वटा नम्बर वा सो भन्दा बढी हुनुपर्छ।"</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"PUK कोड पुन:प्रदान गर्नुहोस्। धेरै पुन:प्रयासहरूले SIMलाई स्थायी रूपमा निष्क्रिय गरिदिने छ।"</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN कोडहरू मेल खाएन"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"निकै धेरै ढाँचा कोसिसहरू"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"तपाईँले गलत तरिकाले तपाईँको PIN <xliff:g id="NUMBER_0">%1$d</xliff:g> पटक टाइप गर्नु भएको छ। \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> सेकेन्डमा फेरि प्रयास गर्नुहोस्।"</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"तपाईँले तपाईँक पासवर्ड <xliff:g id="NUMBER_0">%1$d</xliff:g> पटक गलत टाइप गर्नुभएको छ। \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> सेकेन्डमा फेरि प्रयास गर्नुहोस्।"</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"तपाईँले तपाईँको अनलक ढाँचा गलत तरिकाले <xliff:g id="NUMBER_0">%1$d</xliff:g> पटक खिच्नु भएको छ। \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> सेकेन्डमा फेरि कोसिस गर्नुहोस्।"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"तपाईंले गलत तरिकाले ट्याब्लेट अनलक गर्ने प्रयास गर्नु भएको छ<xliff:g id="NUMBER_0">%1$d</xliff:g>पटक।  <xliff:g id="NUMBER_1">%2$d</xliff:g> थप असफल प्रयासहरूपछि, यो ट्याब्लेट रिसेट हुनेछ जसले आफ्नो सम्पूर्ण डेटा मेट्नेछ।"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"तपाईंले गलत तरिकाले फोन अनलक गर्ने प्रयास गर्नु भएको छ <xliff:g id="NUMBER_0">%1$d</xliff:g> पटक। पछि <xliff:g id="NUMBER_1">%2$d</xliff:g> थप असफल प्रयासहरूपछि, यो फोन  रिसेट हुनेछ जसले सम्पूर्ण डेटा मेटाउनेछ।।"</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"तपाईँ गलत तरिकाले ट्याब्लेट अनलक गर्ने प्रयास गर्नु भएको छ <xliff:g id="NUMBER">%d</xliff:g> पटक। यो ट्याब्लेट रिेसेट गरिनेछ जसले सम्पूर्ण डेटा मेट्नेछ।"</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"तपाईंले गलत तरिकाले फोन अनलक गर्ने प्रयास गर्नु भएको छ <xliff:g id="NUMBER">%d</xliff:g> पटक। यो फोन रिसेट गरिनेछ जसले सम्पूर्ण डेटा मेट्नेछ।"</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"तपाईंले गलत तरिकाले  ट्याब्लेट अनलक गर्ने प्रयास गर्नु भएको छ<xliff:g id="NUMBER_0">%1$d</xliff:g> पटक।  <xliff:g id="NUMBER_1">%2$d</xliff:g> थप असफल प्रयासहरूपछि, यो प्रयोगकर्ता हटाइनेछ जसले सम्पूर्ण प्रयोगकर्ता डेटा मेट्नेछ।"</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"तपाईंले गलत तरिकाले फोन अनलक गर्ने प्रयास गर्नु भएको छ <xliff:g id="NUMBER_0">%1$d</xliff:g> पटक। <xliff:g id="NUMBER_1">%2$d</xliff:g> थप असफल प्रयासहरूपछि, यो प्रयोगकर्ता हटाइनेछ जसले  सबै प्रयोगकर्ता डेटा मेट्नेछ।"</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"तपाईंले गलत तरिकाले ट्याब्लेट अनलक गर्ने प्रयास गर्नु भएको छ<xliff:g id="NUMBER">%d</xliff:g> पटक। यो प्रयोगकर्ता हटाइनेछ जसले सम्पूर्ण प्रयोगकर्ता डेटा मेट्नेछ ।"</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"तपाईंले गलत तरिकाले फोन अनलक गर्ने प्रयास गर्नु भएको छ<xliff:g id="NUMBER">%d</xliff:g> पटक। यो प्रयोगकर्ता हटाइनेछ जसले सम्पूर्ण प्रयोगकर्ता डेटा मेट्नेछ।"</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"तपाईँ गलत तरिकाले ट्याब्लेट अनलक गर्ने प्रयास गर्नु भएको छ<xliff:g id="NUMBER_0">%1$d</xliff:g> पटक। <xliff:g id="NUMBER_1">%2$d</xliff:g> थप असफल प्रयासहरूपछि, काम प्रोफाइल हटाइनेछ जसले सबै प्रोफाइल डेटा मेट्नेछ।"</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"तपाईंले गलत तरिकाले फोन अनलक गर्ने प्रयास गर्नु भएको छ <xliff:g id="NUMBER_0">%1$d</xliff:g> पटक। <xliff:g id="NUMBER_1">%2$d</xliff:g> थप असफल प्रयासहरूपछि , काम प्रोफाइल हटाइनेछ जसले सबै प्रोफाइल डेटा मेट्नेछ।"</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"तपाईँ गलत तरिकाले ट्याब्लेट अनलक गर्ने प्रयास गर्नु भएको छ<xliff:g id="NUMBER">%d</xliff:g> पटक। काम प्रोफाइल हटाइनेछ जसले सम्पूर्ण  प्रोफाइल डेटा मेट्नेछ ।"</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"तपाईंले गलत तरिकाले फोन अनलक गर्ने प्रयास गर्नु भएको छ <xliff:g id="NUMBER">%d</xliff:g> पटक। काम प्रोफाइल हटाइनेछ जसले सम्पूर्ण प्रोफाइल डेटा मेट्नेछ।"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"तपाईंले गलत तरिकाले आफ्नो अनलक ढाँचा <xliff:g id="NUMBER_0">%1$d</xliff:g> पटक कोर्नुभयो। <xliff:g id="NUMBER_1">%2$d</xliff:g> विफल प्रयत्नहरू पछि, तपाईंलाई आफ्नो ट्याब्लेट इमेल खाता प्रयोग गरेर अनलक गर्न सोधिने छ।\n\n फेरि प्रयास गर्नुहोस् <xliff:g id="NUMBER_2">%3$d</xliff:g> सेकेन्डहरूमा।"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"तपाईँले आफ्नो अनलक ढाँचा गलत रूपमा <xliff:g id="NUMBER_0">%1$d</xliff:g> पटक तान्नु भएको छ। <xliff:g id="NUMBER_1">%2$d</xliff:g> धेरै असफल प्रयासहरूपछि, तपाईँलाई एउटा इमेल खाताको प्रयोग गरेर तपाईँको फोन अनलक गर्न सोधिने छ।\n\n फेरि <xliff:g id="NUMBER_2">%3$d</xliff:g> सेकेन्डमा प्रयास गर्नुहोस्।"</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"SIM PIN कोड गलत छ। अब तपाईंले अाफ्नो उपकरण खोल्नलाई तपाईंको वाहकसँग सम्पर्क गर्नै पर्दर।"</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other"> गलत SIM PIN कोड, तपाईँ सँग <xliff:g id="NUMBER_1">%d</xliff:g> पटक प्रयास बाँकी छ।</item>
-      <item quantity="one">SIM PIN कोड गलत छ, तपाईँले अाफ्नो यन्त्र खोल्नलाई तपाईँको वाहकसँग सम्पर्क गर्नै पर्न अघि तपाईँसँग <xliff:g id="NUMBER_0">%d</xliff:g> पटक प्रयास बाँकी छ।</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM प्रयोग बिहिन छ। तपाईंको वाहकलाई सम्पर्क गर्नुहोस्।"</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">SIM PUK कोड गलत छ, तपाईंसँग SIM स्थायी रूपमा काम नलाग्ने हुनु अघि <xliff:g id="NUMBER_1">%d</xliff:g> पटक प्रयास बाँकी छ।</item>
-      <item quantity="one">SIM PUK कोड गलत छ, तपाईंसँग SIM स्थायी रूपमा काम नलाग्ने हुनु अघि <xliff:g id="NUMBER_0">%d</xliff:g> पटक प्रयास बाँकी छ।</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"SIM PIN राख्‍ने कार्य बिफल भयो!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"SIM PUK राख्‍ने कार्य बिफल भयो!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"कोड स्वीकृत!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"कुनै सेवा छैन।"</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"इनपुट विधिलाई स्विच गर्नुहोस्"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"हवाइजहाज मोड"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"यन्त्र पुनः सुरू भएपछि ढाँचा आवश्यक"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"यन्त्र पुनः सुरू भएपछि PIN आवश्यक"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"यन्त्र पुनः सुरू भएपछि पासवर्ड आवश्यक"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"अतिरिक्त सुरक्षाको लागि ढाँचा आवश्यक छ"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"अतिरिक्त सुरक्षाको लागि PIN आवश्यक छ"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"अतिरिक्त सुरक्षाको लागि पासवर्ड आवश्यक छ"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"तपाईँले प्रोफाइलहरू स्विच गर्नुहुँदा ढाँचा आवश्यक"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"तपाईँले प्रोफाइलहरू स्विच गर्नुहुँदा PIN आवश्यक"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"तपाईँले प्रोफाइलहरू स्विच गर्नुहुँदा पासवर्ड आवश्यक"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"यन्त्रको प्रशासकले यन्त्रलाई लक गरेको छ"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"यन्त्रलाई म्यानुअल तरिकाले लक गरिएको थियो"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other"> यन्त्र <xliff:g id="NUMBER_1">%d</xliff:g> घन्टा देखि अनलक भएको छैन। ढाँचा पुष्टि गर्नुहोस्।</item>
-      <item quantity="one"> यन्त्र <xliff:g id="NUMBER_0">%d</xliff:g> घन्टा देखि अनलक भएको छैन। ढाँचा पुष्टि गर्नुहोस्। </item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other"> यन्त्र <xliff:g id="NUMBER_1">%d</xliff:g> घन्टा देखि अनलक भएको छैन। PIN पुष्टि गर्नुहोस्।</item>
-      <item quantity="one"> यन्त्र <xliff:g id="NUMBER_0">%d</xliff:g> घन्टा देखि अनलक भएको छैन। PIN पुष्टि गर्नुहोस्।</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other"> यन्त्र <xliff:g id="NUMBER_1">%d</xliff:g> घन्टा देखि अनलक भएको छैन। पासवर्ड पुष्टि गर्नुहोस्।</item>
-      <item quantity="one"> यन्त्र <xliff:g id="NUMBER_0">%d</xliff:g> घन्टा देखि अनलक भएको छैन। पासवर्ड पुष्टि गर्नुहोस्।</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"चिनिएको छैन"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-nl/strings.xml b/packages/Keyguard/res/values-nl/strings.xml
deleted file mode 100644
index fe87df8..0000000
--- a/packages/Keyguard/res/values-nl/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Toetsblokkering"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Pincode typen"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Typ de pukcode voor de simkaart en de nieuwe pincode"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"Pukcode voor simkaart"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Nieuwe pincode voor simkaart"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Raak aan om wachtwoord in te voeren"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Typ het wachtwoord om te ontgrendelen"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Typ pincode om te ontgrendelen"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Onjuiste pincode."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Opgeladen"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Opladen"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Snel opladen"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Langzaam opladen…"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Sluit de oplader aan."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Druk op \'Menu\' om te ontgrendelen."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Netwerk vergrendeld"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Geen simkaart"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Geen simkaart in tablet."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Geen simkaart in telefoon."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Plaats een simkaart."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"De simkaart ontbreekt of kan niet worden gelezen. Plaats een simkaart."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Onbruikbare simkaart."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Je simkaart is permanent uitgeschakeld.\n Neem contact op met je mobiele serviceprovider voor een nieuwe simkaart."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"Simkaart is vergrendeld."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"Simkaart is vergrendeld met pukcode."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Simkaart ontgrendelen…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Gebied voor pincode"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Gebied voor sim-pincode"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Gebied voor sim-pukcode"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Volgende alarm ingesteld voor <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Delete"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Patroon vergeten"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Onjuist patroon"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Onjuist wachtwoord"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Onjuiste pincode"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Probeer het over <xliff:g id="NUMBER">%d</xliff:g> seconden opnieuw."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Teken je patroon"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Geef de pincode van de simkaart op"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Voer de pincode in voor de simkaart van \'<xliff:g id="CARRIER">%1$s</xliff:g>\'"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Pincode opgeven"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Wachtwoord invoeren"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"De simkaart is nu uitgeschakeld. Geef de pukcode op om door te gaan. Neem contact op met de provider voor informatie."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"Simkaart van \'<xliff:g id="CARRIER">%1$s</xliff:g>\' is nu uitgeschakeld. Voer de pukcode in om door te gaan. Neem contact op met je provider voor meer informatie."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Gewenste pincode opgeven"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Gewenste pincode bevestigen"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Simkaart ontgrendelen..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Voer een pincode van 4 tot 8 cijfers in."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"De pukcode is minimaal acht nummers lang."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Geef de juiste pukcode opnieuw op. Bij herhaalde pogingen wordt de simkaart permanent uitgeschakeld."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Pincodes komen niet overeen"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Te veel patroonpogingen"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Je hebt je pincode <xliff:g id="NUMBER_0">%1$d</xliff:g> keer onjuist getypt. \n\nProbeer het opnieuw over <xliff:g id="NUMBER_1">%2$d</xliff:g> seconden."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Je hebt je wachtwoord <xliff:g id="NUMBER_0">%1$d</xliff:g> keer onjuist getypt. \n\nProbeer het opnieuw over <xliff:g id="NUMBER_1">%2$d</xliff:g> seconden."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Je hebt je ontgrendelingspatroon <xliff:g id="NUMBER_0">%1$d</xliff:g> keer onjuist getekend. \n\nProbeer het opnieuw over <xliff:g id="NUMBER_1">%2$d</xliff:g> seconden."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Je hebt <xliff:g id="NUMBER_0">%1$d</xliff:g> mislukte pogingen ondernomen om de tablet te ontgrendelen. Na nog eens <xliff:g id="NUMBER_1">%2$d</xliff:g> mislukte pogingen wordt deze tablet gereset, waardoor alle gegevens worden verwijderd."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Je hebt <xliff:g id="NUMBER_0">%1$d</xliff:g> mislukte pogingen ondernomen om de telefoon te ontgrendelen. Na nog eens <xliff:g id="NUMBER_1">%2$d</xliff:g> mislukte pogingen wordt deze telefoon gereset, waardoor alle gegevens worden verwijderd."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Je hebt <xliff:g id="NUMBER">%d</xliff:g> mislukte pogingen ondernomen om de tablet te ontgrendelen. Deze tablet wordt gereset, waardoor alle gegevens worden verwijderd."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Je hebt <xliff:g id="NUMBER">%d</xliff:g> mislukte pogingen ondernomen om de telefoon te ontgrendelen. Deze telefoon wordt gereset, waardoor alle gegevens worden verwijderd."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Je hebt <xliff:g id="NUMBER_0">%1$d</xliff:g> mislukte pogingen ondernomen om de tablet te ontgrendelen. Na nog eens <xliff:g id="NUMBER_1">%2$d</xliff:g> mislukte pogingen wordt deze gebruiker verwijderd, waardoor alle gebruikersgegevens worden verwijderd."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Je hebt <xliff:g id="NUMBER_0">%1$d</xliff:g> mislukte pogingen ondernomen om de telefoon te ontgrendelen. Na nog eens <xliff:g id="NUMBER_1">%2$d</xliff:g> mislukte pogingen wordt deze gebruiker verwijderd, waardoor alle gebruikersgegevens worden verwijderd."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Je hebt <xliff:g id="NUMBER">%d</xliff:g> mislukte pogingen ondernomen om de tablet te ontgrendelen. Deze gebruiker wordt verwijderd, waardoor alle gebruikersgegevens worden verwijderd."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Je hebt <xliff:g id="NUMBER">%d</xliff:g> mislukte pogingen ondernomen om de telefoon te ontgrendelen. Deze gebruiker wordt verwijderd, waardoor alle gebruikersgegevens worden verwijderd."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Je hebt <xliff:g id="NUMBER_0">%1$d</xliff:g> mislukte pogingen ondernomen om de tablet te ontgrendelen. Na nog eens <xliff:g id="NUMBER_1">%2$d</xliff:g> mislukte pogingen wordt het werkprofiel verwijderd, waardoor alle profielgegevens worden verwijderd."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Je hebt <xliff:g id="NUMBER_0">%1$d</xliff:g> mislukte pogingen ondernomen om de telefoon te ontgrendelen. Na nog eens <xliff:g id="NUMBER_1">%2$d</xliff:g> mislukte pogingen wordt het werkprofiel verwijderd, waardoor alle profielgegevens worden verwijderd."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Je hebt <xliff:g id="NUMBER">%d</xliff:g> mislukte pogingen ondernomen om de tablet te ontgrendelen. Het werkprofiel wordt verwijderd, waardoor alle profielgegevens worden verwijderd."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Je hebt <xliff:g id="NUMBER">%d</xliff:g> mislukte pogingen ondernomen om de telefoon te ontgrendelen. Het werkprofiel wordt verwijderd, waardoor alle profielgegevens worden verwijderd."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Je hebt je ontgrendelingspatroon <xliff:g id="NUMBER_0">%1$d</xliff:g> keer onjuist getekend. Na nog eens <xliff:g id="NUMBER_1">%2$d</xliff:g> mislukte pogingen wordt u gevraagd je tablet te ontgrendelen via een e-mailaccount.\n\n Probeer het over <xliff:g id="NUMBER_2">%3$d</xliff:g> seconden opnieuw."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Je hebt je ontgrendelingspatroon <xliff:g id="NUMBER_0">%1$d</xliff:g> keer onjuist getekend. Na nog eens <xliff:g id="NUMBER_1">%2$d</xliff:g> mislukte pogingen wordt u gevraagd je telefoon te ontgrendelen via een e-mailaccount.\n\n Probeer het over <xliff:g id="NUMBER_2">%3$d</xliff:g> seconden opnieuw."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Onjuiste pincode voor simkaart. U moet nu contact opnemen met je provider om je apparaat te ontgrendelen."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">Onjuiste pincode voor simkaart. Je hebt nog <xliff:g id="NUMBER_1">%d</xliff:g> pogingen over.</item>
-      <item quantity="one">Onjuiste pincode voor simkaart. Je hebt nog <xliff:g id="NUMBER_0">%d</xliff:g> poging over voordat u contact met je provider moet opnemen om je apparaat te ontgrendelen.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"Simkaart is onbruikbaar. Neem contact op met je provider."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">Onjuiste pukcode voor simkaart. Je hebt nog <xliff:g id="NUMBER_1">%d</xliff:g> pogingen over voordat de simkaart definitief onbruikbaar wordt.</item>
-      <item quantity="one">Onjuiste pukcode voor simkaart. Je hebt nog <xliff:g id="NUMBER_0">%d</xliff:g> poging over voordat de simkaart definitief onbruikbaar wordt.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Bewerking met pincode voor simkaart mislukt."</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Bewerking met pukcode voor simkaart is mislukt."</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Code geaccepteerd."</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Geen service"</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Invoermethode schakelen"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Vliegtuigmodus"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Patroon vereist nadat het apparaat opnieuw is opgestart"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Pincode vereist nadat het apparaat opnieuw is opgestart"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Wachtwoord vereist nadat het apparaat opnieuw is opgestart"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Patroon vereist voor extra beveiliging"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Pincode vereist voor extra beveiliging"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Wachtwoord vereist voor extra beveiliging"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Patroon is vereist wanneer je schakelt tussen profielen"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Pincode is vereist wanneer je schakelt tussen profielen"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Wachtwoord is vereist wanneer je schakelt tussen profielen"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Apparaatbeheerder heeft apparaat vergrendeld"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Apparaat is handmatig vergrendeld"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Apparaat is al <xliff:g id="NUMBER_1">%d</xliff:g> uur niet ontgrendeld. Bevestig het patroon.</item>
-      <item quantity="one">Apparaat is al <xliff:g id="NUMBER_0">%d</xliff:g> uur niet ontgrendeld. Bevestig het patroon.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Apparaat is al <xliff:g id="NUMBER_1">%d</xliff:g> uur niet ontgrendeld. Bevestig de pincode.</item>
-      <item quantity="one">Apparaat is al <xliff:g id="NUMBER_0">%d</xliff:g> uur niet ontgrendeld. Bevestig de pincode.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Apparaat is al <xliff:g id="NUMBER_1">%d</xliff:g> uur niet ontgrendeld. Bevestig het wachtwoord.</item>
-      <item quantity="one">Apparaat is al <xliff:g id="NUMBER_0">%d</xliff:g> uur niet ontgrendeld. Bevestig het wachtwoord.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Niet herkend"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-pa/strings.xml b/packages/Keyguard/res/values-pa/strings.xml
deleted file mode 100644
index 16ca29c..0000000
--- a/packages/Keyguard/res/values-pa/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"ਕੀਗਾਰਡ"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"PIN ਕੋਡ ਟਾਈਪ ਕਰੋ"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"SIM PUK ਅਤੇ ਨਵਾਂ PIN ਕੋਡ ਟਾਈਪ ਕਰੋ"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM PUK ਕੋਡ"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"ਨਵਾਂ SIM PIN ਕੋਡ"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"ਪਾਸਵਰਡ ਟਾਈਪ ਕਰਨ ਲਈ ਸਪੱਰਸ਼ ਕਰੋ"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"ਅਨਲੌਕ ਕਰਨ ਲਈ ਪਾਸਵਰਡ ਟਾਈਪ ਕਰੋ"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"ਅਨਲੌਕ ਕਰਨ ਲਈ PIN ਟਾਈਪ ਕਰੋ"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"ਗ਼ਲਤ PIN ਕੋਡ।"</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"ਚਾਰਜ ਹੋਇਆ"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"ਚਾਰਜਿੰਗ"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"ਤੇਜ਼ੀ ਨਾਲ ਚਾਰਜ ਹੋ ਰਿਹਾ ਹੈ"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"ਹੌਲੀ-ਹੌਲੀ ਚਾਰਜ ਹੋ ਰਿਹਾ ਹੈ"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"ਆਪਣਾ ਚਾਰਜਰ ਕਨੈਕਟ ਕਰੋ।"</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"ਅਨਲੌਕ ਕਰਨ ਲਈ ਮੀਨੂ ਦਬਾਓ।"</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"ਨੈੱਟਵਰਕ ਲੌਕ ਕੀਤਾ"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"ਕੋਈ SIM ਕਾਰਡ ਨਹੀਂ"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"ਟੈਬਲੇਟ ਵਿੱਚ ਕੋਈ SIM ਕਾਰਡ ਨਹੀਂ।"</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"ਫੋਨ ਵਿੱਚ ਕੋਈ SIM ਕਾਰਡ ਨਹੀਂ।"</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"ਇੱਕ SIM ਕਾਰਡ ਪਾਓ।"</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM ਕਾਰਡ ਲੁਪਤ ਹੈ ਜਾਂ ਪੜ੍ਹਨਯੋਗ ਨਹੀਂ ਹੈ। ਇੱਕ SIM ਕਾਰਡ ਪਾਓ।"</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"ਨਾਵਰਤਣਯੋਗ SIM ਕਾਰਡ।"</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"ਤੁਹਾਡਾ SIM ਕਾਰਡ ਸਥਾਈ ਤੌਰ ਤੇ ਅਯੋਗ ਬਣਾਇਆ ਗਿਆ ਹੈ।\n ਦੂਜੇ SIM ਕਾਰਡ ਲਈ ਆਪਣੇ ਵਾਇਰਲੈਸ ਸੇਵਾ ਪ੍ਰਦਾਤਾ ਨੂੰ ਸੰਪਰਕ ਕਰੋ।"</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM ਕਾਰਡ ਲੌਕ ਕੀਤਾ ਹੋਇਆ ਹੈ।"</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM ਕਾਰਡ PUK-ਲੌਕਡ ਹੈ।"</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"SIM ਕਾਰਡ ਅਨਲੌਕ ਕਰ ਰਿਹਾ ਹੈ…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN ਖੇਤਰ"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM PIN ਖੇਤਰ"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM PUK ਖੇਤਰ"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"ਅਗਲਾ ਅਲਾਰਮ <xliff:g id="ALARM">%1$s</xliff:g> ਲਈ ਸੈੱਟ ਕੀਤਾ ਗਿਆ"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"ਮਿਟਾਓ"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"ਦਾਖਲ ਕਰੋ"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"ਪੈਟਰਨ ਭੁੱਲ ਗਏ"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"ਗ਼ਲਤ ਪੈਟਰਨ"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"ਗ਼ਲਤ ਪਾਸਵਰਡ"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"ਗ਼ਲਤ PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"<xliff:g id="NUMBER">%d</xliff:g> ਸਕਿੰਟਾਂ ਵਿੱਚ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ।"</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"ਆਪਣਾ ਪੈਟਰਨ ਡ੍ਰਾ ਕਰੋ"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"SIM PIN ਦਾਖਲ ਕਰੋ"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"\"<xliff:g id="CARRIER">%1$s</xliff:g>\" ਲਈ SIM PIN ਦਾਖਲ ਕਰੋ"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"PIN ਦਾਖਲ ਕਰੋ"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"ਪਾਸਵਰਡ ਦਾਖਲ ਕਰੋ"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM ਹੁਣ ਅਸਮਰਥਿਤ ਹੈ। ਜਾਰੀ ਰੱਖਣ ਲਈ PUK ਕੋਡ ਦਾਖਲ ਕਰੋ। ਵੇਰਵਿਆਂ ਲਈ ਕੈਰੀਅਰ ਨੂੰ ਸੰਪਰਕ ਕਰੋ।"</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" ਹੁਣ ਅਸਮਰਥਿਤ ਹੈ। ਜਾਰੀ ਰੱਖਣ ਲਈ PUK ਕੋਡ ਦਾਖਲ ਕਰੋ। ਵੇਰਵਿਆਂ ਲਈ ਕੈਰੀਅਰ ਨੂੰ ਸੰਪਰਕ ਕਰੋ।"</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"ਲੁੜੀਂਦਾ PIN ਕੋਡ ਦਾਖਲ ਕਰੋ"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"ਲੁੜੀਂਦੇ PIN ਕੋਡ ਦੀ ਪੁਸ਼ਟੀ ਕਰੋ"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"SIM ਕਾਰਡ ਅਨਲੌਕ ਕਰ ਰਿਹਾ ਹੈ…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"ਇੱਕ PIN ਟਾਈਪ ਕਰੋ ਜੋ 4 ਤੋਂ 8 ਨੰਬਰਾਂ ਦਾ ਹੈ।"</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK ਕੋਡ 8 ਜਾਂ ਵੱਧ ਸੰਖਿਆਵਾਂ ਦਾ ਹੋਣਾ ਚਾਹੀਦਾ ਹੈ।"</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"ਲਹੀ PUK ਕੋਡ ਮੁੜ-ਦਾਖਲ ਕਰੋ। ਦੁਹਰਾਈਆਂ ਗਈਆਂ ਕੋਸ਼ਿਸ਼ਾਂ SIM ਨੂੰ ਸਥਾਈ ਤੌਰ ਤੇ ਅਸਮਰੱਥ ਬਣਾ ਦੇਵੇਗਾ।"</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN ਕੋਡ ਮੇਲ ਨਹੀਂ ਖਾਂਦੇ"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"ਬਹੁਤ ਜ਼ਿਆਦਾ ਪੈਟਰਨ ਕੋਸ਼ਿਸ਼ਾਂ"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"ਤੁਸੀਂ ਆਪਣਾ PIN <xliff:g id="NUMBER_0">%1$d</xliff:g> ਵਾਰ ਗ਼ਲਤ ਢੰਗ ਨਾਲ ਟਾਈਪ ਕੀਤਾ ਹੈ। \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> ਸਕਿੰਟਾਂ ਵਿੱਚ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ।"</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"ਤੁਸੀਂ <xliff:g id="NUMBER_0">%1$d</xliff:g> ਵਾਰ ਆਪਣਾ ਪਾਸਵਰਡ ਗ਼ਲਤ ਢੰਗ ਨਾਲ ਟਾਈਪ ਕੀਤਾ ਹੈ। \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> ਸਕਿੰਟਾਂ ਵਿੱਚ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ।"</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"ਤੁਸੀਂ <xliff:g id="NUMBER_0">%1$d</xliff:g> ਵਾਰ ਆਪਣਾ ਅਨਲੌਕ ਪੈਟਰਨ ਗ਼ਲਤ ਢੰਗ ਨਾਲ ਡ੍ਰਾ ਕੀਤਾ ਹੈ। \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> ਸਕਿੰਟਾਂ ਵਿੱਚ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ।"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"ਤੁਸੀਂ <xliff:g id="NUMBER_0">%1$d</xliff:g> ਵਾਰ ਗ਼ਲਤ ਢੰਗ ਨਾਲ ਟੈਬਲੇਟ ਨੂੰ ਅਨਲੌਕ ਕਰਨ ਦੀ ਕੋਸ਼ਿਸ਼ ਕੀਤੀ। <xliff:g id="NUMBER_1">%2$d</xliff:g> ਹੋਰ ਅਸਫਲ ਕੋਸ਼ਿਸ਼ਾਂ ਤੋਂ ਬਾਅਦ, ਇਹ ਟੈਬਲੇਟ ਰੀਸੈੱਟ ਕੀਤੀ ਜਾਏਗੀ, ਜੋ ਇਸਦਾ ਸਾਰਾ ਡੈਟਾ ਮਿਟਾ ਦੇਵੇਗਾ।"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"ਤੁਸੀਂ <xliff:g id="NUMBER_0">%1$d</xliff:g> ਵਾਰ ਗ਼ਲਤ ਢੰਗ ਨਾਲ ਫੋਨ ਨੂੰ ਅਨਲੌਕ ਕਰਨ ਦੀ ਕੋਸ਼ਿਸ਼ ਕੀਤੀ। <xliff:g id="NUMBER_1">%2$d</xliff:g> ਹੋਰ ਅਸਫਲ ਕੋਸ਼ਿਸ਼ਾਂ ਤੋਂ ਬਾਅਦ, ਇਹ ਫੋਨ ਰੀਸੈੱਟ ਕੀਤਾ ਜਾਏਗਾ, ਜੋ ਇਸਦਾ ਸਾਰਾ ਡੈਟਾ ਮਿਟਾ ਦੇਵੇਗਾ।"</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"ਤੁਸੀਂ <xliff:g id="NUMBER">%d</xliff:g> ਵਾਰ ਗ਼ਲਤ ਢੰਗ ਨਾਲ ਟੈਬਲੇਟ ਨੂੰ ਅਨਲੌਕ ਕਰਨ ਦੀ ਕੋਸ਼ਿਸ਼ ਕੀਤੀ। ਇਹ ਟੈਬਲੇਟ ਰੀਸੈੱਟ ਕੀਤੀ ਜਾਏਗੀ, ਜੋ ਇਸਦਾ ਸਾਰਾ ਡੈਟਾ ਮਿਟਾ ਦੇਵੇਗੀ।"</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"ਤੁਸੀਂ <xliff:g id="NUMBER">%d</xliff:g> ਵਾਰ ਗ਼ਲਤ ਢੰਗ ਨਾਲ ਫੋਨ ਨੂੰ ਅਨਲੌਕ ਕਰਨ ਦੀ ਕੋਸ਼ਿਸ਼ ਕੀਤੀ। ਇਹ ਫੋਨ ਰੀਸੈੱਟ ਕੀਤਾ ਜਾਏਗਾ, ਜੋ ਇਸਦਾ ਸਾਰਾ ਡੈਟਾ ਮਿਟਾ ਦੇਵੇਗਾ।"</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"ਤੁਸੀਂ <xliff:g id="NUMBER_0">%1$d</xliff:g> ਵਾਰ ਗ਼ਲਤ ਢੰਗ ਨਾਲ ਟੈਬਲੇਟ ਨੂੰ ਅਨਲੌਕ ਕਰਨ ਦੀ ਕੋਸ਼ਿਸ਼ ਕੀਤੀ। <xliff:g id="NUMBER_1">%2$d</xliff:g> ਹੋਰ ਅਸਫਲ ਕੋਸ਼ਿਸ਼ਾਂ ਤੋਂ ਬਾਅਦ, ਇਸ ਉਪਭੋਗਤਾ ਨੂੰ ਹਟਾ ਦਿੱਤਾ ਜਾਏਗਾ, ਜੋ ਸਾਰਾ ਉਪਭੋਗਤਾ ਡੈਟਾ ਮਿਟਾ ਦੇਵੇਗਾ।"</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"ਤੁਸੀਂ  <xliff:g id="NUMBER_0">%1$d</xliff:g> ਵਾਰ ਗ਼ਲਤ ਢੰਗ ਨਾਲ ਫੋਨ ਨੂੰ ਅਨਲੌਕ ਕਰਨ ਦੀ ਕੋਸ਼ਿਸ਼ ਕੀਤੀ। <xliff:g id="NUMBER_1">%2$d</xliff:g> ਹੋਰ ਅਸਫਲ ਕੋਸ਼ਿਸ਼ਾਂ ਤੋਂ ਬਾਅਦ, ਇਸ ਉਪਭੋਗਤਾ ਨੂੰ ਹਟਾ ਦਿੱਤਾ ਜਾਏਗਾ, ਜੋ ਸਾਰਾ ਉਪਭੋਗਤਾ ਡੈਟਾ ਮਿਟਾ ਦੇਵੇਗਾ।"</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"ਤੁਸੀਂ <xliff:g id="NUMBER">%d</xliff:g> ਵਾਰ ਗ਼ਲਤ ਢੰਗ ਨਾਲ ਟੈਬਲੇਟ ਨੂੰ ਅਨਲੌਕ ਕਰਨ ਦੀ ਕੋਸ਼ਿਸ਼ ਕੀਤੀ। ਕੰਮ ਪ੍ਰੋਫਾਈਲ ਹਟਾ ਦਿੱਤੀ ਜਾਏਗੀ, ਜੋ ਸਾਰਾ ਪ੍ਰੋਫਾਈਲ ਡੈਟਾ ਮਿਟਾ ਦੇਵੇਗੀ।"</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"ਤੁਸੀਂ <xliff:g id="NUMBER">%d</xliff:g> ਵਾਰ ਗ਼ਲਤ ਢੰਗ ਨਾਲ ਫੋਨ ਨੂੰ ਅਨਲੌਕ ਕਰਨ ਦੀ ਕੋਸ਼ਿਸ਼ ਕੀਤੀ। ਇਹ ਉਪਭੋਗਤਾ ਹਟਾ ਦਿੱਤਾ ਜਾਏਗਾ, ਜੋ ਇਸਦਾ ਸਾਰਾ ਉਪਭੋਗਤਾ ਡੈਟਾ ਮਿਟਾ ਦੇਵੇਗਾ।"</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"ਤੁਸੀਂ <xliff:g id="NUMBER_0">%1$d</xliff:g> ਵਾਰ ਗ਼ਲਤ ਢੰਗ ਨਾਲ ਟੈਬਲੇਟ ਨੂੰ ਅਨਲੌਕ ਕਰਨ ਦੀ ਕੋਸ਼ਿਸ਼ ਕੀਤੀ। <xliff:g id="NUMBER_1">%2$d</xliff:g> ਹੋਰ ਅਸਫਲ ਕੋਸ਼ਿਸ਼ਾਂ ਤੋਂ ਬਾਅਦ, ਕੰਮ ਪ੍ਰੋਫਾਈਲ ਹਟਾ ਦਿੱਤੀ ਜਾਏਗੀ, ਜੋ ਸਾਰਾ ਪ੍ਰੋਫਾਈਲ ਡੈਟਾ ਮਿਟਾ ਦੇਵੇਗਾ।"</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"ਤੁਸੀਂ <xliff:g id="NUMBER_0">%1$d</xliff:g> ਵਾਰ ਗ਼ਲਤ ਢੰਗ ਨਾਲ ਫੋਨ ਨੂੰ ਅਨਲੌਕ ਕਰਨ ਦੀ ਕੋਸ਼ਿਸ਼ ਕੀਤੀ। <xliff:g id="NUMBER_1">%2$d</xliff:g> ਹੋਰ ਅਸਫਲ ਕੋਸ਼ਿਸ਼ਾਂ ਤੋਂ ਬਾਅਦ, ਕੰਮ ਪ੍ਰੋਫਾਈਲ ਹਟਾ ਦਿੱਤੀ ਜਾਏਗੀ, ਜੋ ਸਾਰਾ ਪ੍ਰੋਫਾਈਲ ਡੈਟਾ ਮਿਟਾ ਦੇਵੇਗਾ।"</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"ਤੁਸੀਂ <xliff:g id="NUMBER">%d</xliff:g> ਵਾਰ ਗ਼ਲਤ ਢੰਗ ਨਾਲ ਟੈਬਲੇਟ ਨੂੰ ਅਨਲੌਕ ਕਰਨ ਦੀ ਕੋਸ਼ਿਸ਼ ਕੀਤੀ। ਕੰਮ ਪ੍ਰੋਫਾਈਲ ਹਟਾ ਦਿੱਤੀ ਜਾਏਗੀ, ਜੋ ਸਾਰਾ ਪ੍ਰੋਫਾਈਲ ਡੈਟਾ ਮਿਟਾ ਦੇਵੇਗੀ।"</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"ਤੁਸੀਂ <xliff:g id="NUMBER">%d</xliff:g> ਵਾਰ ਗ਼ਲਤ ਢੰਗ ਨਾਲ ਫੋਨ ਨੂੰ ਅਨਲੌਕ ਕਰਨ ਦੀ ਕੋਸ਼ਿਸ਼ ਕੀਤੀ। ਕੰਮ ਪ੍ਰੋਫਾਈਲ ਹਟਾ ਦਿੱਤੀ ਜਾਏਗੀ, ਜੋ ਸਾਰਾ ਪ੍ਰੋਫਾਈਲ ਡੈਟਾ ਮਿਟਾ ਦੇਵੇਗੀ।"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"ਤੁਸੀਂ <xliff:g id="NUMBER_0">%1$d</xliff:g> ਵਾਰ ਆਪਣਾ ਅਨਲੌਕ ਪੈਟਰਨ ਗ਼ਲਤ ਢੰਗ ਨਾਲ ਡ੍ਰਾ ਕੀਤਾ ਹੈ। <xliff:g id="NUMBER_1">%2$d</xliff:g> ਹੋਰ ਅਸਫਲ ਕੋਸ਼ਿਸ਼ਾਂ ਤੋਂ ਬਾਅਦ, ਤੁਹਾਨੂੰ ਇੱਕ ਈਮੇਲ ਖਾਤਾ ਵਰਤਦੇ ਹੋਏ ਆਪਣੀ ਟੈਬਲੇਟ ਅਨਲੌਕ ਕਰਨ ਲਈ ਕਿਹਾ ਜਾਏਗਾ।\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> ਸਕਿੰਟਾਂ ਵਿੱਚ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ।"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"ਤੁਸੀਂ <xliff:g id="NUMBER_0">%1$d</xliff:g> ਵਾਰ ਆਪਣਾ ਅਨਲੌਕ ਪੈਟਰਨ ਗ਼ਲਤ ਢੰਗ ਨਾਲ ਡ੍ਰਾ ਕੀਤਾ ਹੈ। <xliff:g id="NUMBER_1">%2$d</xliff:g> ਹੋਰ ਅਸਫਲ ਕੋਸ਼ਿਸ਼ਾਂ ਤੋਂ ਬਾਅਦ, ਤੁਹਾਨੂੰ ਇੱਕ ਈਮੇਲ ਖਾਤਾ ਵਰਤਦੇ ਹੋਏ ਆਪਣਾ ਫੋਨ ਅਨਲੌਕ ਕਰਨ ਲਈ ਕਿਹਾ ਜਾਏਗਾ।\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> ਸਕਿੰਟਾਂ ਵਿੱਚ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ।"</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"ਗ਼ਲਤ SIM PIN ਕੋਡ, ਹੁਣ ਤੁਹਾਨੂੰ ਆਪਣੀ ਡੀਵਾਈਸ ਨੂੰ ਅਨਲੌਕ ਕਰਨ ਲਈ ਆਪਣੇ ਕੈਰੀਅਰ ਨੂੰ ਸੰਪਰਕ ਕਰਨਾ ਪਵੇਗਾ।"</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">ਗ਼ਲਤ SIM PIN ਕੋਡ, ਤੁਹਾਡੇ ਕੋਲ <xliff:g id="NUMBER_1">%d</xliff:g> ਕੋਸ਼ਿਸ਼ਾਂ ਬਾਕੀ ਹਨ।</item>
-      <item quantity="other">ਗ਼ਲਤ SIM PIN ਕੋਡ, ਤੁਹਾਡੇ ਕੋਲ <xliff:g id="NUMBER_1">%d</xliff:g> ਕੋਸ਼ਿਸ਼ਾਂ ਬਾਕੀ ਹਨ।</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM ਨਾਵਰਤਣਯੋਗ ਹੈ। ਆਪਣੇ ਕੈਰੀਅਰ ਨੂੰ ਸੰਪਰਕ ਕਰੋ।"</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">ਗ਼ਲਤ SIM PUK ਕੋਡ, ਇਸਤੋਂ ਪਹਿਲਾਂ ਕਿ SIM ਸਥਾਈ ਤੌਰ ਤੇ ਨਾਵਰਤਣਯੋਗ ਬਣੇ, ਤੁਹਾਡੇ ਕੋਲ <xliff:g id="NUMBER_1">%d</xliff:g> ਕੋਸ਼ਿਸ਼ਾਂ ਬਾਕੀ ਹਨ।</item>
-      <item quantity="other">ਗ਼ਲਤ SIM PUK ਕੋਡ, ਇਸਤੋਂ ਪਹਿਲਾਂ ਕਿ SIM ਸਥਾਈ ਤੌਰ ਤੇ ਨਾਵਰਤਣਯੋਗ ਬਣੇ, ਤੁਹਾਡੇ ਕੋਲ <xliff:g id="NUMBER_1">%d</xliff:g> ਕੋਸ਼ਿਸ਼ਾਂ ਬਾਕੀ ਹਨ।</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"SIM PIN ਓਪਰੇਸ਼ਨ ਅਸਫਲ!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"SIM PUK ਓਪਰੇਸ਼ਨ ਅਸਫਲ!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"ਕੋਡ ਸਵੀਕਾਰ ਕੀਤਾ ਗਿਆ!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"ਕੋਈ ਸੇਵਾ ਨਹੀਂ।"</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"ਇਨਪੁੱਟ ਵਿਧੀ ਸਵਿੱਚ ਕਰੋ"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"ਏਅਰਪਲੇਨ ਮੋਡ"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"ਡੀਵਾਈਸ ਨੂੰ ਮੁੜ-ਚਾਲੂ ਹੋਣ ਤੋਂ ਬਾਅਦ ਪੈਟਰਨ ਦੀ ਲੋੜ ਹੁੰਦੀ ਹੈ"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"ਡੀਵਾਈਸ ਨੂੰ ਮੁੜ-ਚਾਲੂ ਹੋਣ ਤੋਂ ਬਾਅਦ PIN ਦੀ ਲੋੜ ਹੁੰਦੀ ਹੈ"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"ਡੀਵਾਈਸ ਮੁੜ-ਚਾਲੂ ਹੋਣ ਤੋਂ ਬਾਅਦ ਪਾਸਵਰਡ ਦੀ ਲੋੜ ਹੁੰਦੀ ਹੈ"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"ਵਧੀਕ ਸੁਰੱਖਿਆ ਲਈ ਪੈਟਰਨ ਦੀ ਲੋੜ ਹੈ"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"ਵਧੀਕ ਸੁਰੱਖਿਆ ਲਈ PIN ਦੀ ਲੋੜ ਹੈ"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"ਵਧੀਕ ਸੁਰੱਖਿਆ ਲਈ ਪਾਸਵਰਡ ਦੀ ਲੋੜ ਹੈ"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"ਪ੍ਰੋਫਾਈਲਾਂ ਬਦਲਣ ਦੌਰਾਨ ਪੈਟਰਨ ਦੀ ਲੋੜ ਹੁੰਦੀ ਹੈ"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"ਪ੍ਰੋਫਾਈਲਾਂ ਬਦਲਣ ਦੌਰਾਨ PIN ਦੀ ਲੋੜ ਹੁੰਦੀ ਹੈ"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"ਪ੍ਰੋਫਾਈਲਾਂ ਬਦਲਣ ਦੌਰਾਨ ਪਾਸਵਰਡ ਦੀ ਲੋੜ ਹੁੰਦੀ ਹੈ"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"ਡੀਵਾਈਸ ਪ੍ਰਸ਼ਾਸਕ ਨੇ ਡੀਵਾਈਸ ਨੂੰ ਲੌਕ ਕੀਤਾ"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"ਡੀਵਾਈਸ ਨੂੰ ਹੱਥੀਂ ਲੌਕ ਕੀਤਾ ਗਿਆ ਸੀ"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">ਡੀਵਾਈਸ <xliff:g id="NUMBER_1">%d</xliff:g> ਘੰਟਿਆਂ ਤੋਂ ਅਨਲੌਕ ਨਹੀਂ ਕੀਤੀ ਗਈ ਹੈ। ਪੈਟਰਨ ਦੀ ਪੁਸ਼ਟੀ ਕਰੋ।</item>
-      <item quantity="other">ਡੀਵਾਈਸ <xliff:g id="NUMBER_1">%d</xliff:g> ਘੰਟਿਆਂ ਤੋਂ ਅਨਲੌਕ ਨਹੀਂ ਕੀਤੀ ਗਈ ਹੈ। ਪੈਟਰਨ ਦੀ ਪੁਸ਼ਟੀ ਕਰੋ।</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">ਡੀਵਾਈਸ <xliff:g id="NUMBER_1">%d</xliff:g> ਘੰਟਿਆਂ ਤੋਂ ਅਨਲੌਕ ਨਹੀਂ ਕੀਤੀ ਗਈ ਹੈ। PIN ਦੀ ਪੁਸ਼ਟੀ ਕਰੋ।</item>
-      <item quantity="other">ਡੀਵਾਈਸ <xliff:g id="NUMBER_1">%d</xliff:g> ਘੰਟਿਆਂ ਤੋਂ ਅਨਲੌਕ ਨਹੀਂ ਕੀਤੀ ਗਈ ਹੈ। PIN ਦੀ ਪੁਸ਼ਟੀ ਕਰੋ।</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">ਡੀਵਾਈਸ <xliff:g id="NUMBER_1">%d</xliff:g> ਘੰਟਿਆਂ ਤੋਂ ਅਨਲੌਕ ਨਹੀਂ ਕੀਤੀ ਗਈ ਹੈ। ਪਾਸਵਰਡ ਦੀ ਪੁਸ਼ਟੀ ਕਰੋ</item>
-      <item quantity="other">ਡੀਵਾਈਸ <xliff:g id="NUMBER_1">%d</xliff:g> ਘੰਟਿਆਂ ਤੋਂ ਅਨਲੌਕ ਨਹੀਂ ਕੀਤੀ ਗਈ ਹੈ। ਪਾਸਵਰਡ ਦੀ ਪੁਸ਼ਟੀ ਕਰੋ</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"ਪਛਾਣ ਨਹੀਂ ਹੋਈ"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-pl/strings.xml b/packages/Keyguard/res/values-pl/strings.xml
deleted file mode 100644
index f0980da..0000000
--- a/packages/Keyguard/res/values-pl/strings.xml
+++ /dev/null
@@ -1,142 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Blokada klawiszy"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Wpisz kod PIN."</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Wpisz PUK i nowy kod PIN karty SIM"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"Kod PUK karty SIM"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Nowy kod PIN karty SIM"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Dotknij, aby wpisać hasło."</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Wpisz hasło, aby odblokować."</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Wpisz kod PIN, aby odblokować."</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Błędny kod PIN"</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Naładowana"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Ładowanie"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Szybkie ładowanie"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Wolne ładowanie"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Podłącz ładowarkę."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Naciśnij Menu, by odblokować."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Zablokowana sieć"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Brak karty SIM"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Brak karty SIM w tablecie."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Brak karty SIM w telefonie."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Włóż kartę SIM."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"Brak karty SIM lub nie można jej odczytać. Włóż kartę SIM."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Karta SIM bezużyteczna."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Karta SIM jest trwale wyłączona.\n Skontaktuj się z dostawcą usług bezprzewodowych, by otrzymać inną kartę SIM."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"Karta SIM jest zablokowana."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"Karta SIM jest zablokowana za pomocą kodu PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Odblokowuję kartę SIM…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Miejsce na PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Miejsce na PIN do karty SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Miejsce na PUK do karty SIM"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Następny alarm ustawiono na <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Delete"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Nie pamiętam wzoru"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Nieprawidłowy wzór"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Nieprawidłowe hasło"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Nieprawidłowy PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Spróbuj ponownie za <xliff:g id="NUMBER">%d</xliff:g> s."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Narysuj wzór"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Podaj PIN karty SIM"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Wpisz kod PIN karty SIM „<xliff:g id="CARRIER">%1$s</xliff:g>”"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Podaj PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Wpisz hasło"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"Karta SIM została wyłączona. Podaj kod PUK, by przejść dalej. Szczegóły uzyskasz od operatora."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"Karta SIM „<xliff:g id="CARRIER">%1$s</xliff:g>” jest wyłączona. Wpisz kod PUK, by kontynuować. Skontaktuj się z operatorem, by uzyskać więcej informacji."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Podaj wybrany kod PIN"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Potwierdź wybrany kod PIN"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Odblokowuję kartę SIM…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Wpisz PIN o długości od 4 do 8 cyfr."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"Kod PUK musi mieć co najmniej 8 cyfr."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Ponownie podaj poprawny kod PUK. Nieudane próby spowodują trwałe wyłączenie karty SIM."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Kody PIN nie pasują"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Zbyt wiele prób narysowania wzoru"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Wpisałeś nieprawidłowy kod PIN <xliff:g id="NUMBER_0">%1$d</xliff:g> razy. \n\nSpróbuj ponownie za <xliff:g id="NUMBER_1">%2$d</xliff:g> s."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Po raz <xliff:g id="NUMBER_0">%1$d</xliff:g> wpisałeś nieprawidłowe hasło. \n\nSpróbuj ponownie za <xliff:g id="NUMBER_1">%2$d</xliff:g> s."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Narysowałeś nieprawidłowy wzór odblokowania <xliff:g id="NUMBER_0">%1$d</xliff:g> razy. \n\nSpróbuj ponownie za <xliff:g id="NUMBER_1">%2$d</xliff:g> s."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Próbowałeś <xliff:g id="NUMBER_0">%1$d</xliff:g> razy nieprawidłowo odblokować tablet. Po kolejnych <xliff:g id="NUMBER_1">%2$d</xliff:g> nieudanych próbach tablet zostanie zresetowany, co spowoduje skasowanie z niego wszystkich danych."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Próbowałeś <xliff:g id="NUMBER_0">%1$d</xliff:g> razy nieprawidłowo odblokować telefon. Po kolejnych <xliff:g id="NUMBER_1">%2$d</xliff:g> nieudanych próbach telefon zostanie zresetowany, co spowoduje skasowanie z niego wszystkich danych."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Próbowałeś <xliff:g id="NUMBER">%d</xliff:g> razy nieprawidłowo odblokować tablet. Zostanie on zresetowany, co spowoduje skasowanie z niego wszystkich danych."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Próbowałeś <xliff:g id="NUMBER">%d</xliff:g> razy nieprawidłowo odblokować telefon. Zostanie on zresetowany, co spowoduje skasowanie z niego wszystkich danych."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Próbowałeś <xliff:g id="NUMBER_0">%1$d</xliff:g> razy nieprawidłowo odblokować tablet. Po kolejnych <xliff:g id="NUMBER_1">%2$d</xliff:g> nieudanych próbach ten użytkownik zostanie usunięty, co spowoduje skasowanie wszystkich jego danych."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Próbowałeś <xliff:g id="NUMBER_0">%1$d</xliff:g> razy nieprawidłowo odblokować telefon. Po kolejnych <xliff:g id="NUMBER_1">%2$d</xliff:g> nieudanych próbach, ten użytkownik zostanie usunięty, co spowoduje skasowanie wszystkich jego danych."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Próbowałeś <xliff:g id="NUMBER">%d</xliff:g> razy nieprawidłowo odblokować tablet. Ten użytkownik zostanie usunięty, co spowoduje skasowanie wszystkich jego danych."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Próbowałeś <xliff:g id="NUMBER">%d</xliff:g> razy nieprawidłowo odblokować telefon. Ten użytkownik zostanie usunięty, co spowoduje skasowanie wszystkich jego danych."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Próbowałeś <xliff:g id="NUMBER_0">%1$d</xliff:g> razy nieprawidłowo odblokować tablet. Po kolejnych <xliff:g id="NUMBER_1">%2$d</xliff:g> nieudanych próbach profil do pracy zostanie usunięty, co spowoduje skasowanie wszystkich danych tego profilu."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Próbowałeś <xliff:g id="NUMBER_0">%1$d</xliff:g> razy nieprawidłowo odblokować telefon. Po kolejnych <xliff:g id="NUMBER_1">%2$d</xliff:g> nieudanych próbach profil do pracy zostanie usunięty, co spowoduje skasowanie wszystkich danych tego profilu."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Próbowałeś <xliff:g id="NUMBER">%d</xliff:g> razy nieprawidłowo odblokować tablet. Profil do pracy zostanie usunięty, co spowoduje skasowanie wszystkich danych tego profilu."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Próbowałeś <xliff:g id="NUMBER">%d</xliff:g> razy nieprawidłowo odblokować telefon. Profil do pracy zostanie usunięty, co spowoduje skasowanie wszystkich danych tego profilu."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Po raz <xliff:g id="NUMBER_0">%1$d</xliff:g> nieprawidłowo narysowałeś wzór odblokowania. Po kolejnych <xliff:g id="NUMBER_1">%2$d</xliff:g> nieudanych próbach konieczne będzie odblokowanie tabletu przy użyciu danych logowania na konto Google.\n\n Spróbuj ponownie za <xliff:g id="NUMBER_2">%3$d</xliff:g> s."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Po raz <xliff:g id="NUMBER_0">%1$d</xliff:g> nieprawidłowo narysowałeś wzór odblokowania. Po kolejnych <xliff:g id="NUMBER_1">%2$d</xliff:g> nieudanych próbach konieczne będzie odblokowanie telefonu przy użyciu danych logowania na konto Google.\n\n Spróbuj ponownie za <xliff:g id="NUMBER_2">%3$d</xliff:g> s."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Nieprawidłowy kod PIN karty SIM. Musisz teraz skontaktować się z operatorem, by odblokował Twoje urządzenie."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="few">Nieprawidłowy kod PIN karty SIM. Masz jeszcze <xliff:g id="NUMBER_1">%d</xliff:g> próby.</item>
-      <item quantity="many">Nieprawidłowy kod PIN karty SIM. Masz jeszcze <xliff:g id="NUMBER_1">%d</xliff:g> prób.</item>
-      <item quantity="other">Nieprawidłowy kod PIN karty SIM. Masz jeszcze <xliff:g id="NUMBER_1">%d</xliff:g> próby.</item>
-      <item quantity="one">Nieprawidłowy kod PIN karty SIM. Masz jeszcze <xliff:g id="NUMBER_0">%d</xliff:g> próbę, zanim będziesz musiał skontaktować się z operatorem, by odblokować swoje urządzenie.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"Karta SIM została trwale zablokowana. Skontaktuj się z operatorem."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="few">Nieprawidłowy kod PUK karty SIM. Masz jeszcze <xliff:g id="NUMBER_1">%d</xliff:g> próby, zanim karta SIM zostanie trwale zablokowana.</item>
-      <item quantity="many">Nieprawidłowy kod PUK karty SIM. Masz jeszcze <xliff:g id="NUMBER_1">%d</xliff:g> prób, zanim karta SIM zostanie trwale zablokowana.</item>
-      <item quantity="other">Nieprawidłowy kod PUK karty SIM. Masz jeszcze <xliff:g id="NUMBER_1">%d</xliff:g> próby, zanim karta SIM zostanie trwale zablokowana.</item>
-      <item quantity="one">Nieprawidłowy kod PUK karty SIM. Masz jeszcze <xliff:g id="NUMBER_0">%d</xliff:g> próbę, zanim karta SIM zostanie trwale zablokowana.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Operacja z kodem PIN karty SIM nie udała się."</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Operacja z kodem PUK karty SIM nie udała się."</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Kod został zaakceptowany."</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Brak usługi."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Przełącz metodę wprowadzania"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Tryb samolotowy"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Po ponownym uruchomieniu urządzenia wymagany jest wzór"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Po ponownym uruchomieniu urządzenia wymagany jest kod PIN"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Po ponownym uruchomieniu urządzenia wymagane jest hasło"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Dla dodatkowego bezpieczeństwa musisz narysować wzór"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Dla dodatkowego bezpieczeństwa musisz podać kod PIN"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Dla dodatkowego bezpieczeństwa musisz podać hasło"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Po przełączeniu profili wymagany jest wzór"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Po przełączeniu profili wymagany jest kod PIN"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Po przełączeniu profili wymagane jest hasło"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Urządzenie zostało zablokowane przez administratora"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Urządzenie zostało zablokowane ręcznie"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="few">Urządzenie nie zostało odblokowane od <xliff:g id="NUMBER_1">%d</xliff:g> godzin. Potwierdź wzór.</item>
-      <item quantity="many">Urządzenie nie zostało odblokowane od <xliff:g id="NUMBER_1">%d</xliff:g> godzin. Potwierdź wzór.</item>
-      <item quantity="other">Urządzenie nie zostało odblokowane od <xliff:g id="NUMBER_1">%d</xliff:g> godziny. Potwierdź wzór.</item>
-      <item quantity="one">Urządzenie nie zostało odblokowane od <xliff:g id="NUMBER_0">%d</xliff:g> godziny. Potwierdź wzór.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="few">Urządzenie nie zostało odblokowane od <xliff:g id="NUMBER_1">%d</xliff:g> godzin. Potwierdź kod PIN.</item>
-      <item quantity="many">Urządzenie nie zostało odblokowane od <xliff:g id="NUMBER_1">%d</xliff:g> godzin. Potwierdź kod PIN.</item>
-      <item quantity="other">Urządzenie nie zostało odblokowane od <xliff:g id="NUMBER_1">%d</xliff:g> godziny. Potwierdź kod PIN.</item>
-      <item quantity="one">Urządzenie nie zostało odblokowane od <xliff:g id="NUMBER_0">%d</xliff:g> godziny. Potwierdź kod PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="few">Urządzenie nie zostało odblokowane od <xliff:g id="NUMBER_1">%d</xliff:g> godzin. Potwierdź hasło.</item>
-      <item quantity="many">Urządzenie nie zostało odblokowane od <xliff:g id="NUMBER_1">%d</xliff:g> godzin. Potwierdź hasło.</item>
-      <item quantity="other">Urządzenie nie zostało odblokowane od <xliff:g id="NUMBER_1">%d</xliff:g> godziny. Potwierdź hasło.</item>
-      <item quantity="one">Urządzenie nie zostało odblokowane od <xliff:g id="NUMBER_0">%d</xliff:g> godziny. Potwierdź hasło.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Nie rozpoznano odcisku palca."</string>
-</resources>
diff --git a/packages/Keyguard/res/values-pt-rBR/strings.xml b/packages/Keyguard/res/values-pt-rBR/strings.xml
deleted file mode 100644
index 2663337..0000000
--- a/packages/Keyguard/res/values-pt-rBR/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Bloqueio do teclado"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Insira o código PIN"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Digite o PUK do SIM e o novo código PIN."</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"Código PUK do SIM"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Novo código PIN do SIM"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Toque para inserir a senha"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Digite a senha para desbloquear"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Insira o PIN para desbloquear"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Código PIN incorreto."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Carregado"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Carregando"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Carregando rapidamente"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Carregando lentamente"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Conecte seu carregador."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Pressione \"Menu\" para desbloquear."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Rede bloqueada"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Sem cartão SIM"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Não há um cartão SIM no tablet."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Não há um cartão SIM no telefone."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Insira um cartão SIM."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"O cartão SIM não foi inserido ou não é possível lê-lo. Insira um cartão SIM."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Cartão SIM inutilizável."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"O cartão SIM foi desativado permanentemente.\nEntre em contato com seu provedor de serviços sem fio para receber outro cartão SIM."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"O cartão SIM está bloqueado."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"O cartão SIM está bloqueado pelo PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Desbloqueando o cartão SIM…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Área do PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Área do PIN SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Área do PUK SIM"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Próximo alarme definido para <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Excluir"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Esqueci o padrão"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Padrão incorreto"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Senha incorreta"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"PIN incorreto"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Tente novamente em <xliff:g id="NUMBER">%d</xliff:g> segundos."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Desenhe seu padrão"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Digite o PIN do cartão SIM"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Insira o PIN do SIM para \"<xliff:g id="CARRIER">%1$s</xliff:g>\""</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Digite o PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Digite a senha"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"O SIM foi desativado. Insira o código PUK para continuar. Entre em contato com a operadora para obter mais detalhes."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"O SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" foi desativado. Insira o código PUK para continuar. Entre em contato com a operadora para saber mais detalhes."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Digite o código PIN desejado"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Confirme o código PIN desejado"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Desbloqueando o cartão SIM…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Digite um PIN com quatro a oito números."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"O código PUK deve ter 8 números ou mais."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Introduza novamente o código PUK correto. Muitas tentativas malsucedidas desativarão permanentemente o SIM."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Os códigos PIN não coincidem"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Muitas tentativas de padrão"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Você digitou seu PIN incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. \n\nTente novamente em <xliff:g id="NUMBER_1">%2$d</xliff:g> segundos."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Você digitou sua senha incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. \n\nTente novamente em <xliff:g id="NUMBER_1">%2$d</xliff:g> segundos."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Você desenhou sua sequência de desbloqueio incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. \n\nTente novamente em <xliff:g id="NUMBER_1">%2$d</xliff:g> segundos."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Você tentou desbloquear o tablet incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Após mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas malsucedidas, este tablet será redefinido, o que excluirá todos os seus dados."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Você tentou desbloquear o smartphone incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Após mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas malsucedidas, este smartphone será redefinido, o que excluirá todos os seus dados."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Você tentou desbloquear o tablet incorretamente <xliff:g id="NUMBER">%d</xliff:g> vezes. Este tablet será redefinido, o que excluirá todos os seus dados."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Você tentou desbloquear o smartphone incorretamente <xliff:g id="NUMBER">%d</xliff:g> vezes. Este smartphone será redefinido, o que excluirá todos os seus dados."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Você tentou desbloquear o tablet incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Após mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas malsucedidas, este usuário será removido, o que excluirá todos os dados do usuário."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Você tentou desbloquear o smartphone incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Após mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas malsucedidas, este usuário será removido, o que excluirá todos os dados do usuário."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Você tentou desbloquear o tablet incorretamente <xliff:g id="NUMBER">%d</xliff:g> vezes. Este usuário será removido, o que excluirá todos os dados do usuário."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Você tentou desbloquear o smartphone incorretamente <xliff:g id="NUMBER">%d</xliff:g> vezes. Este usuário será removido, o que excluirá todos os dados do usuário."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Você tentou desbloquear o tablet incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Após mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas malsucedidas,o perfil de trabalho será removido, o que excluirá todos os dados do perfil."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Você tentou desbloquear o smartphone incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Após mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas malsucedidas, o perfil de trabalho será removido, o que excluirá todos os dados do perfil."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Você tentou desbloquear o tablet incorretamente <xliff:g id="NUMBER">%d</xliff:g> vezes. O perfil de trabalho será removido, o que excluirá todos os dados do perfil."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Você tentou desbloquear o smartphone incorretamente <xliff:g id="NUMBER">%d</xliff:g> vezes. O perfil de trabalho será removido, o que excluirá todos os dados do perfil."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Você desenhou sua sequência de desbloqueio incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Se fizer mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas incorretas, será solicitado que você use o login do Google para desbloquear seu tablet.\n\n Tente novamente em <xliff:g id="NUMBER_2">%3$d</xliff:g> segundos."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Você desenhou sua sequência de desbloqueio incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Se fizer mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas incorretas, será solicitado que você use o login do Google para desbloquear.\n\n Tente novamente em <xliff:g id="NUMBER_2">%3$d</xliff:g> segundos."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Código PIN do SIM incorreto. Entre em contato com a operadora para desbloquear o dispositivo."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">Código PIN do SIM incorreto. Tentativas restantes: <xliff:g id="NUMBER_1">%d</xliff:g>.</item>
-      <item quantity="other">Código PIN do SIM incorreto. Tentativas restantes: <xliff:g id="NUMBER_1">%d</xliff:g>.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"O SIM está inutilizável. Entre em contato com a operadora."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">Código PUK do SIM incorreto. Tentativas restantes: <xliff:g id="NUMBER_1">%d</xliff:g>. Caso o código correto não seja digitado, o SIM não poderá mais ser usado.</item>
-      <item quantity="other">Código PUK do SIM incorreto. Tentativas restantes: <xliff:g id="NUMBER_1">%d</xliff:g>. Caso o código correto não seja digitado, o SIM não poderá mais ser usado.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Falha na operação de PIN do SIM."</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Falha na operação de PUK do SIM."</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Código aceito."</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Sem serviço."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Alterar o método de entrada"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Modo avião"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"O padrão é exigido após a reinicialização do dispositivo"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"O PIN é exigido após a reinicialização do dispositivo"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"A senha é exigida após a reinicialização do dispositivo"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"O padrão é necessário para aumentar a segurança"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"O PIN é necessário para aumentar a segurança"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"A senha é necessária para aumentar a segurança"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"O padrão é exigido quando você troca de perfil"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"O PIN é exigido quando você troca de perfil"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"A senha é exigida quando você troca de perfil"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"O dispositivo foi bloqueado pelo administrador"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"O dispositivo foi bloqueado manualmente"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">O dispositivo não foi desbloqueado há <xliff:g id="NUMBER_1">%d</xliff:g> horas. Confirme o padrão.</item>
-      <item quantity="other">O dispositivo não foi desbloqueado há <xliff:g id="NUMBER_1">%d</xliff:g> horas. Confirme o padrão.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">O dispositivo não foi desbloqueado há <xliff:g id="NUMBER_1">%d</xliff:g> horas. Confirme o PIN.</item>
-      <item quantity="other">O dispositivo não foi desbloqueado há <xliff:g id="NUMBER_1">%d</xliff:g> horas. Confirme o PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">O dispositivo não foi desbloqueado há <xliff:g id="NUMBER_1">%d</xliff:g> horas. Confirme a senha.</item>
-      <item quantity="other">O dispositivo não foi desbloqueado há <xliff:g id="NUMBER_1">%d</xliff:g> horas. Confirme a senha.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Não reconhecido"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-pt-rPT/strings.xml b/packages/Keyguard/res/values-pt-rPT/strings.xml
deleted file mode 100644
index e417e07..0000000
--- a/packages/Keyguard/res/values-pt-rPT/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Keyguard"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Escreva o código PIN"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Introduzir PUK do cartão SIM e o novo código PIN"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"Código PUK do cartão SIM"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Novo código PIN do cartão SIM"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Toque para escrever a palavra-passe"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Escreva a palavra-passe para desbloquear"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Escreva o PIN para desbloquear"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Código PIN incorreto."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Carregado"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"A carregar"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"A carregar rapidamente"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"A carregar lentamente"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Ligue o carregador."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Prima Menu para desbloquear."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Rede bloqueada"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Nenhum cartão SIM"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Nenhum cartão SIM no tablet."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Nenhum cartão SIM no telemóvel."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Insira um cartão SIM."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"O cartão SIM está em falta ou não é legível. Introduza um cartão SIM."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Cartão SIM inutilizável."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"O cartão SIM foi desativado definitivamente.\n Contacte o seu fornecedor de serviços de rede sem fios para obter outro cartão SIM."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"O cartão SIM está bloqueado."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"O cartão SIM está bloqueado por PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"A desbloquear o cartão SIM..."</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Área do PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Área do PIN do SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Área do PUK do SIM"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Próximo alarme definido para as <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Delete"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Esqueceu-se da Sequência"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Sequência Incorreta"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Palavra-passe Incorreta"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"PIN Incorreto"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Tente novamente dentro de <xliff:g id="NUMBER">%d</xliff:g> segundos."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Desenhe a sua sequência"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Introduzir PIN do cartão SIM"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Introduza o PIN do SIM para \"<xliff:g id="CARRIER">%1$s</xliff:g>\""</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Introduzir PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Introduzir Palavra-passe"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"O SIM está agora desativado. Introduza o código PUK para continuar. Contacte o operador para obter detalhes."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"O SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" está agora desativado. Introduza o código PUK para continuar. Contacte o operador para obter mais detalhes."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Introduza o código PIN pretendido"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Confirme o código PIN pretendido"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"A desbloquear cartão SIM..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Introduza um PIN entre 4 e 8 números."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"O código PUK deve ter 8 ou mais números."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Volte a introduzir o código PUK correto. Demasiadas tentativas consecutivas irão desativar permanentemente o SIM."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Os códigos PIN não correspondem"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Demasiadas tentativas para desenhar sequência"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Escreveu o PIN incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. \n\nTente novamente dentro de <xliff:g id="NUMBER_1">%2$d</xliff:g> segundos."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Escreveu a palavra-passe incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. \n\nTente novamente dentro de <xliff:g id="NUMBER_1">%2$d</xliff:g> segundos."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Desenhou a sua sequência de desbloqueio incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. \n\nTente novamente dentro de <xliff:g id="NUMBER_1">%2$d</xliff:g> segundos."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Tentou desbloquear incorretamente o tablet <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Após mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas sem êxito, este telemóvel será reposto, o que eliminará todos os seus dados."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Tentou desbloquear incorretamente o telemóvel <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Após mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas sem êxito, este telemóvel será reposto, o que eliminará todos os seus dados."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Tentou desbloquear incorretamente o tablet <xliff:g id="NUMBER">%d</xliff:g> vezes. Este telemóvel será reposto, o que eliminará todos os seus dados."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Tentou desbloquear incorretamente o telemóvel <xliff:g id="NUMBER">%d</xliff:g> vezes. Este telemóvel será reposto, o que eliminará todos os seus dados."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Tentou desbloquear incorretamente o tablet <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Após mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas sem êxito, este utilizador será removido, o que eliminará todos os dados respetivos."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Tentou desbloquear incorretamente o telemóvel <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Após mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas sem êxito, este utilizador será removido, o que eliminará todos os dados respetivos."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Tentou desbloquear incorretamente o tablet <xliff:g id="NUMBER">%d</xliff:g> vezes. Este utilizador será removido, o que eliminará todos os dados respetivos."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Tentou desbloquear incorretamente o telemóvel <xliff:g id="NUMBER">%d</xliff:g> vezes. Este utilizador será removido, o que eliminará todos os dados respetivos."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Tentou desbloquear incorretamente o tablet <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Após mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas sem êxito, o perfil de trabalho será removido, o que eliminará todos os dados do perfil."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Tentou desbloquear incorretamente o telemóvel <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Após mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas sem êxito, o perfil de trabalho será removido, o que eliminará todos os dados do perfil."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Tentou desbloquear incorretamente o tablet <xliff:g id="NUMBER">%d</xliff:g> vezes. O perfil de trabalho será removido, o que eliminará todos os dados do perfil."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Tentou desbloquear incorretamente o telemóvel <xliff:g id="NUMBER">%d</xliff:g> vezes. O perfil de trabalho será removido, o que eliminará todos os dados do perfil."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Desenhou a sequência de desbloqueio incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Depois de mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas sem sucesso, ser-lhe-á pedido para desbloquear o tablet através de uma conta de email.\n\n Tente novamente dentro de <xliff:g id="NUMBER_2">%3$d</xliff:g> segundos."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Desenhou a sequência de desbloqueio incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Depois de mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas sem sucesso, ser-lhe-á pedido para desbloquear o telemóvel através de uma conta de email.\n\n Tente novamente dentro de <xliff:g id="NUMBER_2">%3$d</xliff:g> segundos."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Código PIN do cartão SIM incorreto. Tem de contactar o seu operador para desbloquear o dispositivo."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">Código PIN do cartão SIM incorreto. Tem mais <xliff:g id="NUMBER_1">%d</xliff:g> tentativas.</item>
-      <item quantity="one">Código PIN do cartão SIM incorreto. Tem mais <xliff:g id="NUMBER_0">%d</xliff:g> tentativa antes de necessitar de contactar o seu operador para desbloquear o dispositivo.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"Cartão SIM inutilizável. Contacte o seu operador."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">Código PUK do cartão SIM incorreto. Tem mais <xliff:g id="NUMBER_1">%d</xliff:g> tentativas antes de o cartão SIM ficar permanentemente inutilizável.</item>
-      <item quantity="one">Código PUK do cartão SIM incorreto. Tem mais <xliff:g id="NUMBER_0">%d</xliff:g> tentativa antes de o cartão SIM ficar permanentemente inutilizável.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Falha ao introduzir o PIN do cartão SIM!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Falha ao introduzir o PUK do cartão SIM!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Código aceite!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Sem serviço."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Alternar o método de introdução."</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Modo de avião"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"É necessário um padrão após reiniciar o dispositivo"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"É necessário um PIN após reiniciar o dispositivo"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"É necessária uma palavra-passe após reiniciar o dispositivo"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Para segurança adicional, é necessário um padrão"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Para segurança adicional, é necessária um PIN"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Para segurança adicional, é necessária uma palavra-passe"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"É necessário um padrão quando muda de perfil"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"É necessário um PIN quando muda de perfil"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"É necessária uma palavra-passe quando muda de perfil"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"O administrador do dispositivo bloqueou o dispositivo"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"O dispositivo foi bloqueado manualmente"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">O dispositivo não é desbloqueado há <xliff:g id="NUMBER_1">%d</xliff:g> horas. Confirme a sequência.</item>
-      <item quantity="one">O dispositivo não é desbloqueado há <xliff:g id="NUMBER_0">%d</xliff:g> hora. Confirme a sequência.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">O dispositivo não é desbloqueado há <xliff:g id="NUMBER_1">%d</xliff:g> horas. Confirme o PIN.</item>
-      <item quantity="one">O dispositivo não é desbloqueado há <xliff:g id="NUMBER_0">%d</xliff:g> hora. Confirme o PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">O dispositivo não é desbloqueado há <xliff:g id="NUMBER_1">%d</xliff:g> horas. Confirme a palavra-passe.</item>
-      <item quantity="one">O dispositivo não é desbloqueado há <xliff:g id="NUMBER_0">%d</xliff:g> hora. Confirme a palavra-passe.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Não reconhecido"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-pt/strings.xml b/packages/Keyguard/res/values-pt/strings.xml
deleted file mode 100644
index 2663337..0000000
--- a/packages/Keyguard/res/values-pt/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Bloqueio do teclado"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Insira o código PIN"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Digite o PUK do SIM e o novo código PIN."</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"Código PUK do SIM"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Novo código PIN do SIM"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Toque para inserir a senha"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Digite a senha para desbloquear"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Insira o PIN para desbloquear"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Código PIN incorreto."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Carregado"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Carregando"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Carregando rapidamente"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Carregando lentamente"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Conecte seu carregador."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Pressione \"Menu\" para desbloquear."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Rede bloqueada"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Sem cartão SIM"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Não há um cartão SIM no tablet."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Não há um cartão SIM no telefone."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Insira um cartão SIM."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"O cartão SIM não foi inserido ou não é possível lê-lo. Insira um cartão SIM."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Cartão SIM inutilizável."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"O cartão SIM foi desativado permanentemente.\nEntre em contato com seu provedor de serviços sem fio para receber outro cartão SIM."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"O cartão SIM está bloqueado."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"O cartão SIM está bloqueado pelo PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Desbloqueando o cartão SIM…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Área do PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Área do PIN SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Área do PUK SIM"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Próximo alarme definido para <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Excluir"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Esqueci o padrão"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Padrão incorreto"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Senha incorreta"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"PIN incorreto"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Tente novamente em <xliff:g id="NUMBER">%d</xliff:g> segundos."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Desenhe seu padrão"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Digite o PIN do cartão SIM"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Insira o PIN do SIM para \"<xliff:g id="CARRIER">%1$s</xliff:g>\""</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Digite o PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Digite a senha"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"O SIM foi desativado. Insira o código PUK para continuar. Entre em contato com a operadora para obter mais detalhes."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"O SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" foi desativado. Insira o código PUK para continuar. Entre em contato com a operadora para saber mais detalhes."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Digite o código PIN desejado"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Confirme o código PIN desejado"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Desbloqueando o cartão SIM…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Digite um PIN com quatro a oito números."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"O código PUK deve ter 8 números ou mais."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Introduza novamente o código PUK correto. Muitas tentativas malsucedidas desativarão permanentemente o SIM."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Os códigos PIN não coincidem"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Muitas tentativas de padrão"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Você digitou seu PIN incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. \n\nTente novamente em <xliff:g id="NUMBER_1">%2$d</xliff:g> segundos."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Você digitou sua senha incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. \n\nTente novamente em <xliff:g id="NUMBER_1">%2$d</xliff:g> segundos."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Você desenhou sua sequência de desbloqueio incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. \n\nTente novamente em <xliff:g id="NUMBER_1">%2$d</xliff:g> segundos."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Você tentou desbloquear o tablet incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Após mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas malsucedidas, este tablet será redefinido, o que excluirá todos os seus dados."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Você tentou desbloquear o smartphone incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Após mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas malsucedidas, este smartphone será redefinido, o que excluirá todos os seus dados."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Você tentou desbloquear o tablet incorretamente <xliff:g id="NUMBER">%d</xliff:g> vezes. Este tablet será redefinido, o que excluirá todos os seus dados."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Você tentou desbloquear o smartphone incorretamente <xliff:g id="NUMBER">%d</xliff:g> vezes. Este smartphone será redefinido, o que excluirá todos os seus dados."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Você tentou desbloquear o tablet incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Após mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas malsucedidas, este usuário será removido, o que excluirá todos os dados do usuário."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Você tentou desbloquear o smartphone incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Após mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas malsucedidas, este usuário será removido, o que excluirá todos os dados do usuário."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Você tentou desbloquear o tablet incorretamente <xliff:g id="NUMBER">%d</xliff:g> vezes. Este usuário será removido, o que excluirá todos os dados do usuário."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Você tentou desbloquear o smartphone incorretamente <xliff:g id="NUMBER">%d</xliff:g> vezes. Este usuário será removido, o que excluirá todos os dados do usuário."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Você tentou desbloquear o tablet incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Após mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas malsucedidas,o perfil de trabalho será removido, o que excluirá todos os dados do perfil."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Você tentou desbloquear o smartphone incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Após mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas malsucedidas, o perfil de trabalho será removido, o que excluirá todos os dados do perfil."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Você tentou desbloquear o tablet incorretamente <xliff:g id="NUMBER">%d</xliff:g> vezes. O perfil de trabalho será removido, o que excluirá todos os dados do perfil."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Você tentou desbloquear o smartphone incorretamente <xliff:g id="NUMBER">%d</xliff:g> vezes. O perfil de trabalho será removido, o que excluirá todos os dados do perfil."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Você desenhou sua sequência de desbloqueio incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Se fizer mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas incorretas, será solicitado que você use o login do Google para desbloquear seu tablet.\n\n Tente novamente em <xliff:g id="NUMBER_2">%3$d</xliff:g> segundos."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Você desenhou sua sequência de desbloqueio incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Se fizer mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas incorretas, será solicitado que você use o login do Google para desbloquear.\n\n Tente novamente em <xliff:g id="NUMBER_2">%3$d</xliff:g> segundos."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Código PIN do SIM incorreto. Entre em contato com a operadora para desbloquear o dispositivo."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">Código PIN do SIM incorreto. Tentativas restantes: <xliff:g id="NUMBER_1">%d</xliff:g>.</item>
-      <item quantity="other">Código PIN do SIM incorreto. Tentativas restantes: <xliff:g id="NUMBER_1">%d</xliff:g>.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"O SIM está inutilizável. Entre em contato com a operadora."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">Código PUK do SIM incorreto. Tentativas restantes: <xliff:g id="NUMBER_1">%d</xliff:g>. Caso o código correto não seja digitado, o SIM não poderá mais ser usado.</item>
-      <item quantity="other">Código PUK do SIM incorreto. Tentativas restantes: <xliff:g id="NUMBER_1">%d</xliff:g>. Caso o código correto não seja digitado, o SIM não poderá mais ser usado.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Falha na operação de PIN do SIM."</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Falha na operação de PUK do SIM."</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Código aceito."</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Sem serviço."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Alterar o método de entrada"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Modo avião"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"O padrão é exigido após a reinicialização do dispositivo"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"O PIN é exigido após a reinicialização do dispositivo"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"A senha é exigida após a reinicialização do dispositivo"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"O padrão é necessário para aumentar a segurança"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"O PIN é necessário para aumentar a segurança"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"A senha é necessária para aumentar a segurança"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"O padrão é exigido quando você troca de perfil"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"O PIN é exigido quando você troca de perfil"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"A senha é exigida quando você troca de perfil"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"O dispositivo foi bloqueado pelo administrador"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"O dispositivo foi bloqueado manualmente"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">O dispositivo não foi desbloqueado há <xliff:g id="NUMBER_1">%d</xliff:g> horas. Confirme o padrão.</item>
-      <item quantity="other">O dispositivo não foi desbloqueado há <xliff:g id="NUMBER_1">%d</xliff:g> horas. Confirme o padrão.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">O dispositivo não foi desbloqueado há <xliff:g id="NUMBER_1">%d</xliff:g> horas. Confirme o PIN.</item>
-      <item quantity="other">O dispositivo não foi desbloqueado há <xliff:g id="NUMBER_1">%d</xliff:g> horas. Confirme o PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">O dispositivo não foi desbloqueado há <xliff:g id="NUMBER_1">%d</xliff:g> horas. Confirme a senha.</item>
-      <item quantity="other">O dispositivo não foi desbloqueado há <xliff:g id="NUMBER_1">%d</xliff:g> horas. Confirme a senha.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Não reconhecido"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-ro/strings.xml b/packages/Keyguard/res/values-ro/strings.xml
deleted file mode 100644
index 09a066a..0000000
--- a/packages/Keyguard/res/values-ro/strings.xml
+++ /dev/null
@@ -1,137 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Blocarea tastaturii"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Introduceți codul PIN"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Introduceți codul PUK pentru cardul SIM și codul PIN nou"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"Codul PUK pentru cardul SIM"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Codul PIN nou pentru cardul SIM"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Atingeți și introduceți parola"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Introduceți parola pentru a debloca"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Introduceți codul PIN pentru a debloca"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Cod PIN incorect."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Încărcată"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Se încarcă"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Încărcare rapidă"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Se încarcă lent"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Conectați încărcătorul."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Apăsați pe Meniu pentru a debloca."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Rețea blocată"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Fără SIM"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Tableta nu are card SIM."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Telefonul nu are card SIM."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Introduceți un card SIM."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"Cardul SIM lipsește sau nu poate fi citit. Introduceți un card SIM."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Card SIM inutilizabil."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Cardul SIM este dezactivat definitiv.\n Contactați furnizorul de servicii wireless pentru a obține alt card SIM."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"Cardul SIM este blocat."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"Cardul SIM este blocat cu codul PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Se deblochează cardul SIM…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Zona codului PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Zona codului PIN al cardului SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Zona codului PUK al cardului SIM"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Următoarea alarmă este setată la <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Ștergeți"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Model uitat"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Model greșit"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Parolă greșită"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Cod PIN greșit"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Încercați din nou peste <xliff:g id="NUMBER">%d</xliff:g>   secunde."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Desenați modelul"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Introduceți codul PIN al cardului SIM"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Introduceți codul PIN al cardului SIM pentru „<xliff:g id="CARRIER">%1$s</xliff:g>”"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Introduceți codul PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Introduceți parola"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"Cardul SIM este acum dezactivat. Introduceți codul PUK pentru a continua. Contactați operatorul pentru mai multe detalii."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"Cardul SIM „<xliff:g id="CARRIER">%1$s</xliff:g>” este acum dezactivat. Pentru a continua, introduceți codul PUK. Pentru detalii, contactați operatorul."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Introduceți codul PIN dorit"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Confirmați codul PIN dorit"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Se deblochează cardul SIM..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Introduceți un cod PIN format din 4 până la 8 cifre."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"Codul PUK trebuie să aibă minimum 8 cifre."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Reintroduceți codul PUK corect. Încercările repetate vor dezactiva definitiv cardul SIM."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Codurile PIN nu coincid"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Prea multe încercări de desenare a modelului"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Ați introdus incorect codul PIN de <xliff:g id="NUMBER_0">%1$d</xliff:g> ori.\n\nÎncercați din nou peste <xliff:g id="NUMBER_1">%2$d</xliff:g>   secunde."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Ați introdus incorect parola de <xliff:g id="NUMBER_0">%1$d</xliff:g> ori. \n\nÎncercați din nou peste <xliff:g id="NUMBER_1">%2$d</xliff:g>   secunde."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Ați desenat incorect modelul pentru deblocare de <xliff:g id="NUMBER_0">%1$d</xliff:g> ori. \n\nÎncercați din nou peste <xliff:g id="NUMBER_1">%2$d</xliff:g>   secunde."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Ați efectuat <xliff:g id="NUMBER_0">%1$d</xliff:g> încercări incorecte de deblocare a tabletei. După încă <xliff:g id="NUMBER_1">%2$d</xliff:g> încercări nereușite, această tabletă va fi resetată, iar toate datele acesteia vor fi șterse."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Ați efectuat <xliff:g id="NUMBER_0">%1$d</xliff:g> încercări incorecte de deblocare a telefonului. După încă <xliff:g id="NUMBER_1">%2$d</xliff:g> încercări nereușite, acest telefon va fi resetat, iar toate datele acestuia vor fi șterse."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Ați efectuat <xliff:g id="NUMBER">%d</xliff:g> încercări incorecte de deblocare a tabletei. Această tabletă va fi resetată, iar toate datele acesteia vor fi șterse."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Ați efectuat <xliff:g id="NUMBER">%d</xliff:g> încercări incorecte de deblocare a telefonului. Acest telefon va fi resetat, iar toate datele acestuia vor fi șterse."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Ați efectuat <xliff:g id="NUMBER_0">%1$d</xliff:g> încercări incorecte de deblocare a tabletei. După încă <xliff:g id="NUMBER_1">%2$d</xliff:g> încercări nereușite, acest utilizator va fi eliminat, iar toate datele utilizatorului vor fi șterse."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Ați efectuat <xliff:g id="NUMBER_0">%1$d</xliff:g> încercări incorecte de deblocare a telefonului. După încă <xliff:g id="NUMBER_1">%2$d</xliff:g> încercări nereușite, acest utilizator va fi eliminat, iar toate datele utilizatorului vor fi șterse."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Ați efectuat <xliff:g id="NUMBER">%d</xliff:g> încercări incorecte de deblocare a tabletei. Acest utilizator va fi eliminat, iar toate datele utilizatorului vor fi șterse."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Ați efectuat <xliff:g id="NUMBER">%d</xliff:g> încercări incorecte de deblocare a telefonului. Acest utilizator va fi eliminat, iar toate datele utilizatorului vor fi șterse."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Ați efectuat <xliff:g id="NUMBER_0">%1$d</xliff:g> încercări incorecte de deblocare a tabletei. După încă <xliff:g id="NUMBER_1">%2$d</xliff:g> încercări nereușite, profilul de serviciu va fi eliminat, iar toate datele profilului vor fi șterse."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Ați efectuat <xliff:g id="NUMBER_0">%1$d</xliff:g> încercări incorecte de deblocare a telefonului. După încă <xliff:g id="NUMBER_1">%2$d</xliff:g> încercări nereușite, profilul de serviciu va fi eliminat, iar toate datele profilului vor fi șterse."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Ați efectuat <xliff:g id="NUMBER">%d</xliff:g> încercări incorecte de deblocare a tabletei. Profilul de serviciu va fi eliminat, iar toate datele profilului vor fi șterse."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Ați efectuat <xliff:g id="NUMBER">%d</xliff:g> încercări incorecte de deblocare a telefonului. Profilul de serviciu va fi eliminat, iar toate datele profilului vor fi șterse."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Ați desenat incorect modelul pentru deblocare de <xliff:g id="NUMBER_0">%1$d</xliff:g> ori. După încă <xliff:g id="NUMBER_1">%2$d</xliff:g> încercări nereușite, vi se va solicita să deblocați tableta cu ajutorul unui cont de e-mail.\n\n Încercați din nou peste <xliff:g id="NUMBER_2">%3$d</xliff:g>   secunde."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Ați desenat incorect modelul pentru deblocare de <xliff:g id="NUMBER_0">%1$d</xliff:g> ori. După încă <xliff:g id="NUMBER_1">%2$d</xliff:g> încercări nereușite, vi se va solicita să deblocați telefonul cu ajutorul unui cont de e-mail.\n\n Încercați din nou peste <xliff:g id="NUMBER_2">%3$d</xliff:g>   secunde."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Codul PIN pentru cardul SIM este incorect. Contactați operatorul pentru a vă debloca dispozitivul."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="few">Codul PIN pentru cardul SIM este incorect. V-au mai rămas <xliff:g id="NUMBER_1">%d</xliff:g> încercări.</item>
-      <item quantity="other">Codul PIN pentru cardul SIM este incorect. V-au mai rămas <xliff:g id="NUMBER_1">%d</xliff:g> de încercări.</item>
-      <item quantity="one">Codul PIN pentru cardul SIM este incorect. V-a mai rămas <xliff:g id="NUMBER_0">%d</xliff:g> încercare, după care va trebui să contactați operatorul pentru a vă debloca dispozitivul.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"Cardul SIM nu poate fi utilizat. Contactați operatorul."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="few">Codul PUK pentru cardul SIM este incorect. V-au mai rămas <xliff:g id="NUMBER_1">%d</xliff:g> încercări până când cardul SIM va deveni inutilizabil definitiv.</item>
-      <item quantity="other">Codul PUK pentru cardul SIM este incorect. V-au mai rămas <xliff:g id="NUMBER_1">%d</xliff:g> de încercări până când cardul SIM va deveni inutilizabil definitiv.</item>
-      <item quantity="one">Codul PUK pentru cardul SIM este incorect. V-a mai rămas <xliff:g id="NUMBER_0">%d</xliff:g> încercare până când cardul SIM va deveni inutilizabil definitiv.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Deblocarea cu ajutorul codului PIN pentru cardul SIM nu a reușit!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Deblocarea cu ajutorul codului PUK pentru cardul SIM nu a reușit!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Cod acceptat!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Fără serviciu."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Comutați metoda de introducere a textului"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Mod Avion"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Modelul este necesar după repornirea dispozitivului"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Codul PIN este necesar după repornirea dispozitivului"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Parola este necesară după repornirea dispozitivului"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Modelul este necesar pentru securitate suplimentară"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Codul PIN este necesar pentru securitate suplimentară"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Parola este necesară pentru securitate suplimentară"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Modelul este necesar când comutați între profiluri"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Codul PIN este necesar când comutați între profiluri"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Parola este necesară când comutați între profiluri"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Administratorul dispozitivului a blocat dispozitivul"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Dispozitivul a fost blocat manual"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="few">Dispozitivul nu a fost deblocat de <xliff:g id="NUMBER_1">%d</xliff:g> ore. Confirmați modelul.</item>
-      <item quantity="other">Dispozitivul nu a fost deblocat de <xliff:g id="NUMBER_1">%d</xliff:g> de ore. Confirmați modelul.</item>
-      <item quantity="one">Dispozitivul nu a fost deblocat de <xliff:g id="NUMBER_0">%d</xliff:g> oră. Confirmați modelul.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="few">Dispozitivul nu a fost deblocat de <xliff:g id="NUMBER_1">%d</xliff:g> ore. Confirmați codul PIN.</item>
-      <item quantity="other">Dispozitivul nu a fost deblocat de <xliff:g id="NUMBER_1">%d</xliff:g> de ore. Confirmați codul PIN.</item>
-      <item quantity="one">Dispozitivul nu a fost deblocat de <xliff:g id="NUMBER_0">%d</xliff:g> oră. Confirmați codul PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="few">Dispozitivul nu a fost deblocat de <xliff:g id="NUMBER_1">%d</xliff:g> ore. Confirmați parola.</item>
-      <item quantity="other">Dispozitivul nu a fost deblocat de <xliff:g id="NUMBER_1">%d</xliff:g> de ore. Confirmați parola.</item>
-      <item quantity="one">Dispozitivul nu a fost deblocat de <xliff:g id="NUMBER_0">%d</xliff:g> oră. Confirmați parola.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Nu este recunoscută"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-ru/strings.xml b/packages/Keyguard/res/values-ru/strings.xml
deleted file mode 100644
index 7466c66..0000000
--- a/packages/Keyguard/res/values-ru/strings.xml
+++ /dev/null
@@ -1,142 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Keyguard"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Введите PIN-код"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Введите PUK-код и новый PIN-код"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"PUK-код"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Новый PIN-код"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Нажмите для ввода пароля"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Введите пароль"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Введите PIN-код"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Неверный PIN-код."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Батарея заряжена"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Зарядка батареи"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Быстрая зарядка"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Медленная зарядка"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Подключите зарядное устройство."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Для разблокировки нажмите \"Меню\"."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Сеть заблокирована"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Нет SIM-карты"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Нет SIM-карты."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Нет SIM-карты."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Вставьте SIM-карту."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM-карта отсутствует или недоступна. Вставьте SIM-карту."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"SIM-карта непригодна."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"SIM-карта окончательно заблокирована.\nЧтобы получить новую, обратитесь к своему оператору."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM-карта заблокирована"</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"Для разблокировки SIM-карты требуется PUK-код."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Разблокировка SIM-карты…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN-код"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"PIN-код SIM-карты"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"PUK-код SIM-карты"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Будильник сработает в <xliff:g id="ALARM">%1$s</xliff:g>."</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Клавиша удаления"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Клавиша ввода"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Забыли графический ключ?"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Неправильный графический ключ"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Неправильный пароль"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Неправильный PIN-код"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Повторите попытку через <xliff:g id="NUMBER">%d</xliff:g> сек."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Введите графический ключ"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Введите PIN-код SIM-карты"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Введите PIN-код SIM-карты \"<xliff:g id="CARRIER">%1$s</xliff:g>\""</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Введите PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Введите пароль"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM-карта заблокирована. Чтобы продолжить, введите PUK-код. За подробной информацией обратитесь к своему оператору связи."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM-карта \"<xliff:g id="CARRIER">%1$s</xliff:g>\" отключена. Чтобы продолжить работу, введите PUK-код. Чтобы получить дополнительную информацию, свяжитесь с оператором связи."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Введите желаемый PIN-код"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Введите PIN-код ещё раз"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Разблокировка SIM-карты…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Введите PIN-код (от 4 до 8 цифр)."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK-код должен содержать не менее 8 символов."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Введите правильный PUK-код. После нескольких неудачных попыток SIM-карта будет заблокирована."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN-коды не совпадают"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Слишком много попыток ввода графического ключа"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Вы <xliff:g id="NUMBER_0">%1$d</xliff:g> раз неверно указали PIN-код. \n\nПовтор через <xliff:g id="NUMBER_1">%2$d</xliff:g> сек."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Вы <xliff:g id="NUMBER_0">%1$d</xliff:g> раз неверно указали пароль.\n\nПовтор через <xliff:g id="NUMBER_1">%2$d</xliff:g> сек."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Вы <xliff:g id="NUMBER_0">%1$d</xliff:g> раз неверно указали графический ключ.\n\nПовтор через <xliff:g id="NUMBER_1">%2$d</xliff:g> сек."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Количество неудачных попыток разблокировать планшетный ПК: <xliff:g id="NUMBER_0">%1$d</xliff:g>. Количество оставшихся попыток: <xliff:g id="NUMBER_1">%2$d</xliff:g>. Если они также будут неуспешными, настройки планшетного ПК будут сброшены, а все его данные – удалены."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Количество неудачных попыток разблокировать телефон: <xliff:g id="NUMBER_0">%1$d</xliff:g>. Количество оставшихся попыток: <xliff:g id="NUMBER_1">%2$d</xliff:g>. Если они также будут неуспешными, настройки телефона будут сброшены, а все его данные – удалены."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Достигнуто максимальное количество неудачных попыток разблокировать планшетный ПК (<xliff:g id="NUMBER">%d</xliff:g>). Настройки планшетного ПК будут сброшены, а все его данные – удалены."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Достигнуто максимальное количество неудачных попыток разблокировать телефон (<xliff:g id="NUMBER">%d</xliff:g>). Настройки телефона будут сброшены, а все его данные – удалены."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Количество неудачных попыток разблокировать планшетный ПК: <xliff:g id="NUMBER_0">%1$d</xliff:g>. Количество оставшихся попыток: <xliff:g id="NUMBER_1">%2$d</xliff:g>. Если они также будут неуспешными, аккаунт этого пользователя и все его данные будут удалены."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Количество неудачных попыток разблокировать телефон: <xliff:g id="NUMBER_0">%1$d</xliff:g>. Количество оставшихся попыток: <xliff:g id="NUMBER_1">%2$d</xliff:g>. Если они также будут неуспешными, аккаунт этого пользователя и все его данные будут удалены."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Достигнуто максимальное количество неудачных попыток разблокировать планшетный ПК (<xliff:g id="NUMBER">%d</xliff:g>). Аккаунт этого пользователя и все его данные будут удалены."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Достигнуто максимальное количество неудачных попыток разблокировать телефон (<xliff:g id="NUMBER">%d</xliff:g>). Аккаунт этого пользователя и все его данные будут удалены."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Количество неудачных попыток разблокировать планшетный ПК: <xliff:g id="NUMBER_0">%1$d</xliff:g>. Количество оставшихся попыток: <xliff:g id="NUMBER_1">%2$d</xliff:g>. Если они также будут неуспешными, рабочий профиль и все его данные будут удалены."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Количество неудачных попыток разблокировать телефон: <xliff:g id="NUMBER_0">%1$d</xliff:g>. Количество оставшихся попыток: <xliff:g id="NUMBER_1">%2$d</xliff:g>. Если они также будут неуспешными, рабочий профиль и все его данные будут удалены."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Достигнуто максимальное количество неудачных попыток разблокировать планшетный ПК (<xliff:g id="NUMBER">%d</xliff:g>). Рабочий профиль и все его данные будут удалены."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Достигнуто максимальное количество неудачных попыток разблокировать телефон (<xliff:g id="NUMBER">%d</xliff:g>). Рабочий профиль и все его данные будут удалены."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Вы <xliff:g id="NUMBER_0">%1$d</xliff:g> раз неверно указали графический ключ. После <xliff:g id="NUMBER_1">%2$d</xliff:g> неверных попыток для разблокировки планшетного ПК потребуется войти в аккаунт Google.\n\nПовтор через <xliff:g id="NUMBER_2">%3$d</xliff:g> сек."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Вы <xliff:g id="NUMBER_0">%1$d</xliff:g> раз неверно указали графический ключ. После <xliff:g id="NUMBER_1">%2$d</xliff:g> неверных попыток для разблокировки телефона потребуется войти в аккаунт Google.\n\nПовтор через <xliff:g id="NUMBER_2">%3$d</xliff:g> сек."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Неверный PIN-код. Обратитесь к оператору связи, чтобы разблокировать SIM-карту."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">Неверный PIN-код. Осталась <xliff:g id="NUMBER_1">%d</xliff:g> попытка. После этого SIM-карта будет заблокирована и вам придется обратиться к оператору связи.</item>
-      <item quantity="few">Неверный PIN-код. Осталось <xliff:g id="NUMBER_1">%d</xliff:g> попытки. После этого SIM-карта будет заблокирована и вам придется обратиться к оператору связи.</item>
-      <item quantity="many">Неверный PIN-код. Осталось <xliff:g id="NUMBER_1">%d</xliff:g> попыток. После этого SIM-карта будет заблокирована и вам придется обратиться к оператору связи.</item>
-      <item quantity="other">Неверный PIN-код. Осталось <xliff:g id="NUMBER_1">%d</xliff:g> попыток. После этого SIM-карта будет заблокирована и вам придется обратиться к оператору связи.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM-карта заблокирована навсегда. Обратитесь к оператору связи."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">Неверный PUK-код. Осталась <xliff:g id="NUMBER_1">%d</xliff:g> попытка. После этого SIM-карта будет заблокирована навсегда.</item>
-      <item quantity="few">Неверный PUK-код. Осталось <xliff:g id="NUMBER_1">%d</xliff:g> попытки. После этого SIM-карта будет заблокирована навсегда.</item>
-      <item quantity="many">Неверный PUK-код. Осталось <xliff:g id="NUMBER_1">%d</xliff:g> попыток. После этого SIM-карта будет заблокирована навсегда.</item>
-      <item quantity="other">Неверный PUK-код. Осталось <xliff:g id="NUMBER_1">%d</xliff:g> попыток. После этого SIM-карта будет заблокирована навсегда.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Не удалось разблокировать SIM-карту"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Не удалось разблокировать SIM-карту"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Код принят"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Нет сигнала."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Сменить способ ввода"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Режим полета"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"После перезагрузки устройства необходимо ввести графический ключ"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"После перезагрузки устройства необходимо ввести PIN-код"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"После перезагрузки устройства необходимо ввести пароль"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"В качестве дополнительной меры безопасности введите графический ключ"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"В качестве дополнительной меры безопасности введите PIN-код"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"В качестве дополнительной меры безопасности введите пароль"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"После смены профиля необходимо ввести графический ключ"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"После смены профиля необходимо ввести PIN-код"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"После смены профиля необходимо ввести пароль"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Администратор заблокировал устройство"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Устройство было заблокировано вручную"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">Устройство не разблокировали <xliff:g id="NUMBER_1">%d</xliff:g> час. Введите графический ключ ещё раз.</item>
-      <item quantity="few">Устройство не разблокировали <xliff:g id="NUMBER_1">%d</xliff:g> часа. Введите графический ключ ещё раз.</item>
-      <item quantity="many">Устройство не разблокировали <xliff:g id="NUMBER_1">%d</xliff:g> часов. Введите графический ключ ещё раз.</item>
-      <item quantity="other">Устройство не разблокировали <xliff:g id="NUMBER_1">%d</xliff:g> часа. Введите графический ключ ещё раз.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">Устройство не разблокировали <xliff:g id="NUMBER_1">%d</xliff:g> час. Введите PIN-код ещё раз.</item>
-      <item quantity="few">Устройство не разблокировали <xliff:g id="NUMBER_1">%d</xliff:g> часа. Введите PIN-код ещё раз.</item>
-      <item quantity="many">Устройство не разблокировали <xliff:g id="NUMBER_1">%d</xliff:g> часов. Введите PIN-код ещё раз.</item>
-      <item quantity="other">Устройство не разблокировали <xliff:g id="NUMBER_1">%d</xliff:g> часа. Введите PIN-код ещё раз.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">Устройство не разблокировали <xliff:g id="NUMBER_1">%d</xliff:g> час. Введите пароль ещё раз.</item>
-      <item quantity="few">Устройство не разблокировали <xliff:g id="NUMBER_1">%d</xliff:g> часа. Введите пароль ещё раз.</item>
-      <item quantity="many">Устройство не разблокировали <xliff:g id="NUMBER_1">%d</xliff:g> часов. Введите пароль ещё раз.</item>
-      <item quantity="other">Устройство не разблокировали <xliff:g id="NUMBER_1">%d</xliff:g> часа. Введите пароль ещё раз.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Не распознано"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-si/strings.xml b/packages/Keyguard/res/values-si/strings.xml
deleted file mode 100644
index 5f96e8c..0000000
--- a/packages/Keyguard/res/values-si/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"යතුරු ආවරණය"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"PIN කේතය ටයිප් කරන්න"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"SIM PUK සහ නව PIN කේතය ටයිප් කරන්න"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM PUK කේතය"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"නව SIM PIN කේතය"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"මුරපදය ටයිප් කිරීමට ස්පර්ශ කරන්න"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"අගුළු ඇරීමට මුරපදය ටයිප් කරන්න"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"අගුළු හැරීමට PIN එක ටයිප් කරන්න"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"වැරදි PIN කේතයකි."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"අරෝපිතයි"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"ආරෝපණය වෙමින්"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"වේගයෙන් ආරෝපණය"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"සෙමින් ආරෝපණය"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"ඔබගේ ආරෝපකයට සම්බන්ධ කරන්න."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"අගුළු ඇරීමට මෙනුව ඔබන්න."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"ජාල අගුළු දමා ඇත"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"SIM පත නැත"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"ටැබ්ලටයේ SIM පත නොමැත."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"දුරකථනය තුල SIM පතක් නැත."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"SIM පත ඇතුල් කරන්න."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM පත නොමැත හෝ කියවිය නොහැක. SIM පතක් ඇතුල් කරන්න."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"භාවිතා කළ නොහැකි SIM පත."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"ඔබගේ SIM පත ස්ථිරව අබල කර ඇත.\n වෙනත් SIM පතක් සඳහා ඔබගේ නොරැහැන් සේවා සැපයුම්කරු සම්බන්ධ කරගන්න."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM පත අගුළු දමා ඇත."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM පත PUK අගුළු ලා ඇත."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"SIM පත අගුළු හරිමින්..."</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN කොටස"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM PIN කොටස"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM PUK කොටස"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"<xliff:g id="ALARM">%1$s</xliff:g> ට ඊළඟ සීනුව සකස් කර ඇත"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"මකන්න"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"ඇතුල් කරන්න"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"රටාව අමතකයි"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"වැරදි රටාවකි"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"වැරදි මුරපදය"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"PIN එක වැරදියි"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"තත්පර <xliff:g id="NUMBER">%d</xliff:g> ට පසුව නැවත උත්සහ කරන්න."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"ඔබගේ රටාව අඳින්න"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"SIM PIN ඇතුලු කරන්න"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"\"<xliff:g id="CARRIER">%1$s</xliff:g>\" සඳහා SIM PIN ඇතුළත් කරන්න"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"PIN එක ඇතුළු කරන්න"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"මුරපදය ඇතුළු කරන්න"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"දැන් SIM එක අබල කර ඇත. ඉදිරියට යාමට PUK කේතය යොදන්න. විස්තර සඳහා වාහකයා අමතන්න."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" දැන් අබල කර ඇත. දිගටම පවත්වා ගෙන යාමට PUK කේතය ඇතුළත් කරන්න. විස්තර සඳහා වාහකයා සම්බන්ධ කරගන්න."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"අපේක්ෂිත PIN කේතය ඇතුළත් කරන්න"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"අපේක්ෂිත PIN කේතය ස්ථිර කරන්න"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"SIM පත අගුළු අරිමින්..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"අංක 4 සිට 8 අතර වන PIN එකක් ටයිප් කරන්න."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK කේතය සංඛ්‍යා 8 ක් හෝ වැඩි විය යුතුය."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"නිවැරදි PUK කේතය නැවත ඇතුලත් කරන්න. නැවත නැවත උත්සාහ කිරීමෙන් SIM එක ස්ථිරවම අබල කරයි."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN කේත ගැලපී නැත"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"රටා උත්සාහ කිරීම් වැඩිය"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"ඔබ PIN අංකය <xliff:g id="NUMBER_0">%1$d</xliff:g> වාරයක් වැරදියට ටයිප් කොට ඇත.\n\n තත්පර <xliff:g id="NUMBER_1">%2$d</xliff:g> ක් ඇතුළත නැවත උත්සාහ කරන්න."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"<xliff:g id="NUMBER_0">%1$d</xliff:g> වතාවක් ඔබගේ මුරපදය ඔබ වැරදියට ටයිප් කර ඇත. \n\nතත්පර <xliff:g id="NUMBER_1">%2$d</xliff:g> ට පසුව නැවත උත්සහ කරන්න."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"ඔබ <xliff:g id="NUMBER_0">%1$d</xliff:g> වාරයක් අගුළු ඇරීමේ රටාව වැරදියට ඇඳ ඇත. \n\nතත්පර <xliff:g id="NUMBER_1">%2$d</xliff:g> ක් ඇතුළත නැවත උත්සාහ කරන්න."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"ඔබ ඔබගේ ටැබ්ලටය අගුළු හැරීමට <xliff:g id="NUMBER_0">%1$d</xliff:g> වරක් වැරදි වශයෙන් උත්සාහ කර ඇත. අසාර්ථක උත්සාහ <xliff:g id="NUMBER_1">%2$d</xliff:g> කින් පසුව, ටැබ්ලටය නැවත සකස් කෙරෙනු ඇති අතර, එමගින් සියලු දත්ත මකා දැමෙනු ඇත."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"ඔබ ඔබගේ දුරකථනය අගුළු හැරීමට <xliff:g id="NUMBER_0">%1$d</xliff:g> වරක් වැරදි වශයෙන් උත්සාහ කර ඇත. අසාර්ථක උත්සාහ <xliff:g id="NUMBER_1">%2$d</xliff:g> කින් පසුව, දුරකථනය නැවත සකස් කෙරෙනු ඇති අතර, එමගින් සියලු දත්ත මකා දැමෙනු ඇත."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"ඔබ ඔබගේ දුරකථනය අගුළු හැරීමට <xliff:g id="NUMBER">%d</xliff:g> වරක් වැරදි වශයෙන් උත්සාහ කර ඇත. සියලුම දත්ත මකා දමමින්, මෙම ටැබ්ලටය නැවත සැකසෙනු ඇත."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"ඔබ ඔබගේ දුරකථනය අගුළු හැරීමට <xliff:g id="NUMBER">%d</xliff:g> වරක් වැරදි වශයෙන් උත්සාහ කර ඇත. සියලුම දත්ත මකා දමමින්, මෙම දුරකථනය නැවත සැකසෙනු ඇත."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"ඔබ ඔබගේ ටැබ්ලටය අගුළු හැරීමට <xliff:g id="NUMBER_0">%1$d</xliff:g> වරක් වැරදි වශයෙන් උත්සාහ කර ඇත. අසාර්ථක උත්සාහ <xliff:g id="NUMBER_1">%2$d</xliff:g> කින් පසුව, පරිශීලකයා ඉවත් වනු ඇති අතර, එමගින් සියලු පරිශීලක දත්ත මකා දැමෙනු ඇත."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"ඔබ ඔබගේ දුරකථනය අගුළු හැරීමට <xliff:g id="NUMBER_0">%1$d</xliff:g> වරක් වැරදි වශයෙන් උත්සාහ කර ඇත. අසාර්ථක උත්සාහ <xliff:g id="NUMBER_1">%2$d</xliff:g> කින් පසුව, පරිශීලකයා ඉවත් වනු ඇති අතර, එමගින් සියලු පරිශීලක දත්ත මකා දැමෙනු ඇත."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"ඔබ ඔබගේ ටැබ්ලටය අගුළු හැරීමට <xliff:g id="NUMBER">%d</xliff:g> වරක් වැරදි වශයෙන් උත්සාහ කර ඇත. සියලුම පරිශීලක දත්ත මකා දමමින්, මෙම පරිශීලකයා මකා දැමෙනු ඇත."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"ඔබ ඔබගේ දුරකථනය අගුළු හැරීමට <xliff:g id="NUMBER">%d</xliff:g> වරක් වැරදි වශයෙන් උත්සාහ කර ඇත. සියලුම පරිශීලක දත්ත මකා දමමින්, මෙම පරිශීලකයා මකා දැමෙනු ඇත."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"ඔබ ඔබගේ ටැබ්ලටය අගුළු හැරීමට <xliff:g id="NUMBER_0">%1$d</xliff:g> වරක් වැරදි වශයෙන් උත්සාහ කර ඇත. අසාර්ථක උත්සාහ <xliff:g id="NUMBER_1">%2$d</xliff:g> කින් පසුව, කාර්යාල පැතිකඩ ඉවත් වනු ඇති අතර, එමගින් සියලු පැතිකඩ දත්ත මකා දැමෙනු ඇත."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"ඔබ ඔබගේ දුරකථනය අගුළු හැරීමට <xliff:g id="NUMBER_0">%1$d</xliff:g> වරක් වැරදි වශයෙන් උත්සාහ කර ඇත. අසාර්ථක උත්සාහ <xliff:g id="NUMBER_1">%2$d</xliff:g> කින් පසුව, කාර්යාල පැතිකඩ ඉවත් වනු ඇති අතර, එමගින් සියලු පැතිකඩ දත්ත මකා දැමෙනු ඇත."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"ඔබ ඔබගේ ටැබ්ලටය අගුළු හැරීමට <xliff:g id="NUMBER">%d</xliff:g> වරක් වැරදි වශයෙන් උත්සාහ කර ඇත. සියලුම පැතිකඩ දත්ත මකා දමමින්, කාර්යාල පැතිකඩ මකා දැමෙනු ඇත."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"ඔබ ඔබගේ දුරකථනය අගුළු හැරීමට <xliff:g id="NUMBER">%d</xliff:g> වරක් වැරදි වශයෙන් උත්සාහ කර ඇත. සියලුම පැතිකඩ දත්ත මකා දමමින්, කාර්යාල පැතිකඩ මකා දැමෙනු ඇත."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"ඔබ අගුළු ඇරිමේ රටාව <xliff:g id="NUMBER_0">%1$d</xliff:g> වතාවක් වැරදියට ඇඳ ඇත. තවත් අසාර්ථක උත්සාහ <xliff:g id="NUMBER_1">%2$d</xliff:g> කින් පසුව, ඊ-තැපැල් ගිණුම භාවිතා කරමින් ඔබගේ ටැබ්ලටයේ අගුළු ඇරීමට ඔබට පවසනු ඇත.\n\n නැවත තත්පර <xliff:g id="NUMBER_2">%3$d</xliff:g> කින් උත්සාහ කරන්න."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"ඔබ වැරදියට <xliff:g id="NUMBER_0">%1$d</xliff:g> වතාවක් ඔබගේ අගුළු හැරීමේ රටාව ඇඳ ඇත. අසාර්ථක උත්සහ කිරීම් <xliff:g id="NUMBER_1">%2$d</xliff:g> න් පසුව, ඔබගේ ඊ-තැපැල් ලිපිනය භාවිතයෙන් ඔබගේ දුරකථනය අගුළු හැරීමට ඔබගෙන් අසයි.\n\n තත්පර <xliff:g id="NUMBER_2">%3$d</xliff:g> න් පසුව නැවත උත්සහ කරන්න."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"වැරදී SIM PIN කේතයකි, ඔබගේ දුරකතනයේ අඟුල හැරීමට ඔබගේ වාහකයා ඔබ දැන් සම්බන්ධ කරගත යුතුය."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">වැරදි SIM PIN කේතයකි, ඔබට උත්සාහයන් <xliff:g id="NUMBER_1">%d</xliff:g> ක් ඉතිරිව ඇත.</item>
-      <item quantity="other">වැරදි SIM PIN කේතයකි, ඔබට උත්සාහයන් <xliff:g id="NUMBER_1">%d</xliff:g> ක් ඉතිරිව ඇත.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM කාඩ් පත භාවිතා කළ නොහැක. ඔබගේ වාහකය සම්බන්ධ කරගන්න."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">වැරදී SIM PUK කේතයකි, SIM කාඩ් පත ස්ථිරවම පාවිච්චි කළ නොහැකි ලෙසට  පත්වීමට පෙර ඔබට තවත් උත්සාහයන් <xliff:g id="NUMBER_1">%d</xliff:g> ඉතිරිව ඇත.</item>
-      <item quantity="other">වැරදී SIM PUK කේතයකි, SIM කාඩ් පත ස්ථිරවම පාවිච්චි කළ නොහැකි ලෙසට  පත්වීමට පෙර ඔබට තවත් උත්සාහයන් <xliff:g id="NUMBER_1">%d</xliff:g> ඉතිරිව ඇත.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"SIM PIN ක්‍රියාවලිය අපොහොසත් විය!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"SIM PUK ක්‍රියාවලිය අපොහොසත් විය!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"කේතය පිළිගැණුනි!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"සේවාව නැත."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"ආදාන ක්‍රමය මාරු කිරීම"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"ගුවන්යානා ප්‍රකාරය"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"උපාංගය නැවත ආරම්භ වූ පසු රටාව අවශ්‍යයි"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"උපාංගය නැවත ආරම්භ වූ පසු PIN අංකය අවශ්‍යයි"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"උපාංගය නැවත ආරම්භ වූ පසු මුරපදය අවශ්‍යයි"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"අමතර ආරක්ෂාව සඳහා රටාව අවශ්‍යයි"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"අමතර ආරක්ෂාව සඳහා PIN අංකය අවශ්‍යයි"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"අමතර ආරක්ෂාව සඳහා මුරපදය අවශ්‍යයි"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"ඔබ පැතිකඩවල් මාරු කරන විට රටාව අවශ්‍යයි"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"ඔබ පැතිකඩවල් මාරු කරන විට PIN අංකය අවශ්‍යයි"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"ඔබ පැතිකඩවල් මාරු කරන විට මුරපදය අවශ්‍යයි"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"උපාංග පරිපාලක උපාංගය අගුලු දමන ලදී"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"උපාංගය හස්තීයව අගුලු දමන ලදී"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">උපාංගය පැය <xliff:g id="NUMBER_1">%d</xliff:g>කට අගුලු හැර නැත. රටාව තහවුරු කරන්න.</item>
-      <item quantity="other">උපාංගය පැය <xliff:g id="NUMBER_1">%d</xliff:g>කට අගුලු හැර නැත. රටාව තහවුරු කරන්න.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">උපාංගය පැය <xliff:g id="NUMBER_1">%d</xliff:g>කට අගුලු හැර නැත. PIN අංකය තහවුරු කරන්න.</item>
-      <item quantity="other">උපාංගය පැය <xliff:g id="NUMBER_1">%d</xliff:g>කට අගුලු හැර නැත. PIN අංකය තහවුරු කරන්න.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">උපාංගය පැය <xliff:g id="NUMBER_1">%d</xliff:g>කට අගුලු හැර නැත. මුරපදය තහවුරු කරන්න.</item>
-      <item quantity="other">උපාංගය පැය <xliff:g id="NUMBER_1">%d</xliff:g>කට අගුලු හැර නැත. මුරපදය තහවුරු කරන්න.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"අඳුනාගත නොහැක"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-sk/strings.xml b/packages/Keyguard/res/values-sk/strings.xml
deleted file mode 100644
index 82a4f1d4..0000000
--- a/packages/Keyguard/res/values-sk/strings.xml
+++ /dev/null
@@ -1,142 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Zámka klávesnice"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Zadajte kód PIN"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Zadajte kód PUK SIM karty a nový kód PIN"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"Kód PUK SIM karty"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Nový kód PIN SIM karty"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Dotknutím zadajte heslo"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Zadajte heslo na odomknutie"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Zadajte kód PIN na odomknutie"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Nesprávny kód PIN."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Batéria je nabitá"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Nabíja sa"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Rýchle nabíjanie"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Pomalé nabíjanie"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Pripojte nabíjačku."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Telefón odomknete stlačením tlačidla Menu."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Sieť je zablokovaná"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Nie je vložená SIM karta"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"V tablete nie je žiadna SIM karta."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"V telefóne nie je žiadna SIM karta."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Vložte SIM kartu."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM karta chýba alebo sa z nej nedá čítať. Vložte SIM kartu."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"SIM karta je nepoužiteľná."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Vaša SIM karta bola natrvalo zakázaná.\nAk chcete získať inú SIM kartu, kontaktujte svojho poskytovateľa bezdrôtových služieb."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM karta je uzamknutá."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM karta je uzamknutá pomocou kódu PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Prebieha odomykanie SIM karty..."</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Oblasť kódu PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Oblasť kódu PIN SIM karty"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Oblasť kódu PUK SIM karty"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Nasledujúci budík je nastavený na <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Odstrániť"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Nepamätám si vzor"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Nesprávny vzor"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Nesprávne heslo"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Nesprávny kód PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Skúste to znova o <xliff:g id="NUMBER">%d</xliff:g> s."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Nakreslite svoj vzor"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Zadajte kód PIN SIM karty"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Zadajte kód PIN pre SIM kartu operátora <xliff:g id="CARRIER">%1$s</xliff:g>"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Zadajte kód PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Zadajte heslo"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM karta je teraz zakázaná. Ak chcete pokračovať, zadajte kód PUK. Podrobné informácie získate od operátora."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM karta operátora <xliff:g id="CARRIER">%1$s</xliff:g> bola zakázaná. Ak chcete pokračovať, zadajte kód PUK. Podrobnosti získate od svojho operátora."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Zadajte požadovaný kód PIN"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Potvrďte požadovaný kód PIN"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Prebieha odomykanie SIM karty..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Zadajte kód PIN s dĺžkou 4 až 8 číslic."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"Kód PUK musí obsahovať 8 alebo viac číslic."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Znova zadajte správny kód PUK. Opakované pokusy zakážu SIM kartu natrvalo."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Kódy PIN sa nezhodujú"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Príliš veľa pokusov o nakreslenie vzoru"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"<xliff:g id="NUMBER_0">%1$d</xliff:g>-krát ste zadali nesprávny kód PIN. \n\nSkúste to znova o <xliff:g id="NUMBER_1">%2$d</xliff:g> s."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"<xliff:g id="NUMBER_0">%1$d</xliff:g>-krát ste zadali nesprávne heslo. \n\nSkúste to znova o <xliff:g id="NUMBER_1">%2$d</xliff:g> s."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"<xliff:g id="NUMBER_0">%1$d</xliff:g>-krát ste použili nesprávny bezpečnostný vzor. \n\nSkúste to znova o <xliff:g id="NUMBER_1">%2$d</xliff:g> s."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Telefón ste sa pokúsili <xliff:g id="NUMBER_0">%1$d</xliff:g>-krát nesprávne odomknúť. Po ďalších neúspešných pokusoch (počet: <xliff:g id="NUMBER_1">%2$d</xliff:g>) bude tento tablet obnovený a všetky údaje, ktoré sú v ňom uložené, budú odstránené."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Telefón ste sa pokúsili <xliff:g id="NUMBER_0">%1$d</xliff:g>-krát nesprávne odomknúť. Po ďalších neúspešných pokusoch (počet: <xliff:g id="NUMBER_1">%2$d</xliff:g> ) bude tento telefón obnovený a všetky údaje, ktoré sú v ňom uložené, budú odstránené."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Tablet ste sa pokúsili <xliff:g id="NUMBER">%d</xliff:g>-krát nesprávne odomknúť. Tablet bude obnovený a všetky údaje, ktoré sú v ňom uložené, budú odstránené."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Telefón ste sa pokúsili <xliff:g id="NUMBER">%d</xliff:g>-krát nesprávne odomknúť. Telefón bude obnovený a všetky údaje, ktoré sú v ňom uložené, budú odstránené."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Tablet ste sa pokúsili <xliff:g id="NUMBER_0">%1$d</xliff:g>-krát nesprávne odomknúť. Po ďalších neúspešných pokusoch (počet: <xliff:g id="NUMBER_1">%2$d</xliff:g> ) bude tento používateľ odstránený a spolu s ním všetky jeho údaje."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Telefón ste sa pokúsili <xliff:g id="NUMBER_0">%1$d</xliff:g>-krát nesprávne odomknúť. Po ďalších neúspešných pokusoch (počet: <xliff:g id="NUMBER_1">%2$d</xliff:g>) bude tento používateľ odstránený a spolu s ním všetky jeho údaje."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Tablet ste sa pokúsili <xliff:g id="NUMBER">%d</xliff:g>-krát nesprávne odomknúť. Používateľ bude odstránený a spolu s ním všetky jeho údaje."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Telefón ste sa pokúsili <xliff:g id="NUMBER">%d</xliff:g>-krát nesprávne odomknúť. Používateľ bude odstránený a spolu s ním všetky jeho údaje."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Tablet ste sa pokúsili <xliff:g id="NUMBER_0">%1$d</xliff:g>-krát nesprávne odomknúť. Po ďalších neúspešných pokusoch (počet: <xliff:g id="NUMBER_1">%2$d</xliff:g>) bude pracovný profil odstránený a spolu s ním všetky údaje profilu."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Telefón ste sa pokúsili <xliff:g id="NUMBER_0">%1$d</xliff:g>-krát nesprávne odomknúť. Po ďalších neúspešných pokusoch (počet: <xliff:g id="NUMBER_1">%2$d</xliff:g>) bude pracovný profil odstránený a spolu s ním všetky údaje profilu."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Tablet ste sa pokúsili <xliff:g id="NUMBER">%d</xliff:g>-krát nesprávne odomknúť. Pracovný profil bude odstránený spolu so všetkými údajmi."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Telefón ste sa pokúsili <xliff:g id="NUMBER">%d</xliff:g>-krát nesprávne odomknúť. Pracovný profil bude odstránený spolu so všetkými údajmi."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"<xliff:g id="NUMBER_0">%1$d</xliff:g>-krát ste nesprávne nakreslili svoj bezpečnostný vzor. Po ďalších <xliff:g id="NUMBER_1">%2$d</xliff:g> neúspešných pokusoch sa zobrazí výzva na odomknutie tabletu pomocou e-mailového účtu.\n\n Skúste to znova o <xliff:g id="NUMBER_2">%3$d</xliff:g> s."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"<xliff:g id="NUMBER_0">%1$d</xliff:g>-krát ste nesprávne nakreslili svoj bezpečnostný vzor. Po <xliff:g id="NUMBER_1">%2$d</xliff:g> ďalších neúspešných pokusoch sa zobrazí výzva na odomknutie telefónu pomocou e-mailového účtu.\n\n Skúste to znova o <xliff:g id="NUMBER_2">%3$d</xliff:g> s."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Nesprávny kód PIN SIM karty. Teraz musíte kontaktovať svojho operátora, aby vám odomkol zariadenie."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="few">Nesprávny kód PIN SIM karty. Zostávajú vám <xliff:g id="NUMBER_1">%d</xliff:g> pokusy.</item>
-      <item quantity="many">Nesprávny kód PIN SIM karty. Zostáva vám <xliff:g id="NUMBER_1">%d</xliff:g> pokusu.</item>
-      <item quantity="other">Nesprávny kód PIN SIM karty. Zostáva vám <xliff:g id="NUMBER_1">%d</xliff:g> pokusov.</item>
-      <item quantity="one">Nesprávny kód PIN SIM karty. Zostáva vám <xliff:g id="NUMBER_0">%d</xliff:g> pokus, potom budete musieť kontaktovať svojho operátora, aby vám odomkol zariadenie.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM karta je nepoužiteľná. Kontaktujte svojho operátora."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="few">Nesprávny kód PUK SIM karty. Zostávajú vám <xliff:g id="NUMBER_1">%d</xliff:g> pokusy, potom sa SIM karta natrvalo zablokuje.</item>
-      <item quantity="many">Nesprávny kód PUK SIM karty. Zostáva vám <xliff:g id="NUMBER_1">%d</xliff:g> pokusu, potom sa SIM karta natrvalo zablokuje.</item>
-      <item quantity="other">Nesprávny kód PUK SIM karty. Zostáva vám <xliff:g id="NUMBER_1">%d</xliff:g> pokusov, potom sa SIM karta natrvalo zablokuje.</item>
-      <item quantity="one">Nesprávny kód PUK SIM karty. Zostáva vám <xliff:g id="NUMBER_0">%d</xliff:g> pokus, potom sa SIM karta natrvalo zablokuje.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Operácia kódu PIN SIM karty zlyhala!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Operácia kódu PUK SIM karty zlyhala!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Kód bol prijatý!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Žiadny signál"</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Prepnúť metódu vstupu"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Režim v lietadle"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Po reštartovaní zariadenia musíte zadať bezpečnostný vzor"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Po reštartovaní zariadenia musíte zadať kód PIN"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Po reštartovaní zariadenia musíte zadať heslo"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Na ďalšie zabezpečenie musíte zadať bezpečnostný vzor"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Na ďalšie zabezpečenie musíte zadať kód PIN"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Na ďalšie zabezpečenie musíte zadať heslo"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Po prepnutí profilov musíte zadať bezpečnostný vzor"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Po prepnutí profilov musíte zadať kód PIN"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Po prepnutí profilov musíte zadať heslo"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Zariadenie uzamkol správca"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Zariadenie bolo uzamknuté ručne"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="few">Zariadenie nebolo odomknuté <xliff:g id="NUMBER_1">%d</xliff:g> hodiny. Potvrďte vzor.</item>
-      <item quantity="many">Zariadenie nebolo odomknuté <xliff:g id="NUMBER_1">%d</xliff:g> hodiny. Potvrďte vzor.</item>
-      <item quantity="other">Zariadenie nebolo odomknuté <xliff:g id="NUMBER_1">%d</xliff:g> hodín. Potvrďte vzor.</item>
-      <item quantity="one">Zariadenie nebolo odomknuté <xliff:g id="NUMBER_0">%d</xliff:g> hodinu. Potvrďte vzor.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="few">Zariadenie nebolo odomknuté <xliff:g id="NUMBER_1">%d</xliff:g> hodiny. Potvrďte kód PIN.</item>
-      <item quantity="many">Zariadenie nebolo odomknuté <xliff:g id="NUMBER_1">%d</xliff:g> hodiny. Potvrďte kód PIN.</item>
-      <item quantity="other">Zariadenie nebolo odomknuté <xliff:g id="NUMBER_1">%d</xliff:g> hodín. Potvrďte kód PIN.</item>
-      <item quantity="one">Zariadenie nebolo odomknuté <xliff:g id="NUMBER_0">%d</xliff:g> hodinu. Potvrďte kód PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="few">Zariadenie nebolo odomknuté <xliff:g id="NUMBER_1">%d</xliff:g> hodiny. Potvrďte heslo.</item>
-      <item quantity="many">Zariadenie nebolo odomknuté <xliff:g id="NUMBER_1">%d</xliff:g> hodiny. Potvrďte heslo.</item>
-      <item quantity="other">Zariadenie nebolo odomknuté <xliff:g id="NUMBER_1">%d</xliff:g> hodín. Potvrďte heslo.</item>
-      <item quantity="one">Zariadenie nebolo odomknuté <xliff:g id="NUMBER_0">%d</xliff:g> hodinu. Potvrďte heslo.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Nebol rozpoznaný"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-sl/strings.xml b/packages/Keyguard/res/values-sl/strings.xml
deleted file mode 100644
index 9100bd3..0000000
--- a/packages/Keyguard/res/values-sl/strings.xml
+++ /dev/null
@@ -1,142 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Keyguard"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Vnesite kodo PIN"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Vnesite kodo PUK in novo kodo PIN kartice SIM"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"Koda PUK kartice SIM"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Nova koda PIN kartice SIM"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Dotaknite se za vnos gesla"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Vnesite geslo za odklepanje"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Vnesite PIN za odklepanje"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Napačna koda PIN."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Napolnjeno"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Polnjenje"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Hitro polnjenje"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Počasno polnjenje"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Priključite napajalnik."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Če želite odkleniti, pritisnite meni."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Omrežje je zaklenjeno"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Ni kartice SIM"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"V tabličnem računalniku ni kartice SIM."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"V telefonu ni kartice SIM."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Vstavite kartico SIM."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"Kartice SIM ni ali je ni mogoče prebrati. Vstavite jo."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Neuporabna kartica SIM."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Kartica SIM je trajno onemogočena.\n Obrnite se na operaterja za drugo."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"Kartica SIM je zaklenjena."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"Kartica SIM je zaklenjena s kodo PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Odklepanje kartice SIM …"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Območje za kodo PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Območje za kodo PIN za SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Območje za kodo PUK za SIM"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Naslednji alarm je nastavljen za <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Tipka Delete"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Tipka Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Pozabljen vzorec"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Napačen vzorec"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Napačno geslo"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Napačen PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Čez <xliff:g id="NUMBER">%d</xliff:g> sekund poskusite znova."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Narišite vzorec"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Vnesite PIN za kartico SIM"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Vnesite kodo PIN kartice SIM za »<xliff:g id="CARRIER">%1$s</xliff:g>«"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Vnesite PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Vnesite geslo"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"Kartica SIM je onemogočena. Če želite nadaljevati, vnesite kodo PUK. Za dodatne informacije se obrnite na operaterja."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"Kartica SIM »<xliff:g id="CARRIER">%1$s</xliff:g>« je onemogočena. Če želite nadaljevati, vnesite kodo PUK. Za podrobnosti se obrnite na operaterja."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Vnesite želeno kodo PIN"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Potrdite želeno kodo PIN"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Odklepanje kartice SIM ..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Vnesite PIN, ki vsebuje od štiri do osem številk."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"Koda PUK mora vsebovati 8 ali več števk."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Vnovič vnesite pravilno kodo PUK. Večkratni poskusi bodo trajno onemogočili kartico SIM."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Kodi PIN se ne ujemata"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Preveč poskusov vzorca"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"PIN ste <xliff:g id="NUMBER_0">%1$d</xliff:g>-krat vnesli napačno. \n\nZnova poskusite čez <xliff:g id="NUMBER_1">%2$d</xliff:g> s."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Geslo ste <xliff:g id="NUMBER_0">%1$d</xliff:g>-krat vnesli napačno. \n\nZnova poskusite čez <xliff:g id="NUMBER_1">%2$d</xliff:g> s."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Vzorec za odklepanje ste nepravilno narisali <xliff:g id="NUMBER_0">%1$d</xliff:g>-krat. \n\nPoskusite znova čez <xliff:g id="NUMBER_1">%2$d</xliff:g> s."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Tablični računalnik ste neuspešno poskusili odkleniti <xliff:g id="NUMBER_0">%1$d</xliff:g>-krat. Če ga neuspešno poskusite odkleniti še <xliff:g id="NUMBER_1">%2$d</xliff:g>-krat, bo ponastavljen, zaradi česar bodo izbrisani vsi podatki v njem."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Telefon ste neuspešno poskusili odkleniti <xliff:g id="NUMBER_0">%1$d</xliff:g>-krat. Če ga neuspešno poskusite odkleniti še <xliff:g id="NUMBER_1">%2$d</xliff:g>-krat, bo ponastavljen, zaradi česar bodo izbrisani vsi podatki v njem."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Tablični računalnik ste neuspešno poskusili odkleniti <xliff:g id="NUMBER">%d</xliff:g>-krat, zato bo ponastavljen, vsi podatki v njem pa bodo izbrisani."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Telefon ste neuspešno poskusili odkleniti <xliff:g id="NUMBER">%d</xliff:g>-krat, zato bo ponastavljen, vsi podatki v njem pa bodo izbrisani."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Tablični računalnik ste neuspešno poskusili odkleniti <xliff:g id="NUMBER_0">%1$d</xliff:g>-krat. Če ga neuspešno poskusite odkleniti še <xliff:g id="NUMBER_1">%2$d</xliff:g>-krat, bo ta uporabnik odstranjen, zaradi česar bodo izbrisani vsi podatki uporabnika."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Telefon ste neuspešno poskusili odkleniti <xliff:g id="NUMBER_0">%1$d</xliff:g>-krat. Če ga neuspešno poskusite odkleniti še <xliff:g id="NUMBER_1">%2$d</xliff:g>-krat, bo ta uporabnik odstranjen, zaradi česar bodo izbrisani vsi podatki uporabnika."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Tablični računalnik ste neuspešno poskusili odkleniti <xliff:g id="NUMBER">%d</xliff:g>-krat. Ta uporabnik bo odstranjen, zaradi česar bodo izbrisani vsi podatki uporabnika."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Telefon ste neuspešno poskusili odkleniti <xliff:g id="NUMBER">%d</xliff:g>-krat. Ta uporabnik bo odstranjen, zaradi česar bodo izbrisani vsi podatki uporabnika."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Tablični računalnik ste neuspešno poskusili odkleniti <xliff:g id="NUMBER_0">%1$d</xliff:g>-krat. Če ga neuspešno poskusite odkleniti še <xliff:g id="NUMBER_1">%2$d</xliff:g>-krat, bo delovni profil odstranjen, zaradi česar bodo izbrisani vsi podatki profila."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Telefon ste neuspešno poskusili odkleniti <xliff:g id="NUMBER_0">%1$d</xliff:g>-krat. Če ga neuspešno poskusite odkleniti še <xliff:g id="NUMBER_1">%2$d</xliff:g>-krat, bo delovni profil odstranjen, zaradi česar bodo izbrisani vsi podatki profila."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Tablični računalnik ste neuspešno poskusili odkleniti <xliff:g id="NUMBER">%d</xliff:g>-krat. Delovni profil bo odstranjen, zaradi česar bodo izbrisani vsi podatki profila."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Telefon ste neuspešno poskusili odkleniti <xliff:g id="NUMBER">%d</xliff:g>-krat. Delovni profil bo odstranjen, zaradi česar bodo izbrisani vsi podatki profila."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Vzorec za odklepanje ste <xliff:g id="NUMBER_0">%1$d</xliff:g>-krat napačno vnesli. Po nadaljnjih <xliff:g id="NUMBER_1">%2$d</xliff:g> neuspešnih poskusih boste pozvani, da tablični računalnik odklenete z e-poštnim računom.\n\nPoskusite znova čez <xliff:g id="NUMBER_2">%3$d</xliff:g> s."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Vzorec za odklepanje ste <xliff:g id="NUMBER_0">%1$d</xliff:g>-krat napačno vnesli. Po nadaljnjih <xliff:g id="NUMBER_1">%2$d</xliff:g> neuspešnih poskusih boste pozvani, da odklenete telefon z Googlovimi podatki za prijavo.\n\nPoskusite znova čez <xliff:g id="NUMBER_2">%3$d</xliff:g> s."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Napačna koda PIN kartice SIM. Zdaj se boste morali za odklenitev naprave obrniti na operaterja."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">Napačna koda PIN kartice SIM. Na voljo imate še <xliff:g id="NUMBER_1">%d</xliff:g> poskus.</item>
-      <item quantity="two">Napačna koda PIN kartice SIM. Na voljo imate še <xliff:g id="NUMBER_1">%d</xliff:g> poskusa.</item>
-      <item quantity="few">Napačna koda PIN kartice SIM. Na voljo imate še <xliff:g id="NUMBER_1">%d</xliff:g> poskuse.</item>
-      <item quantity="other">Napačna koda PIN kartice SIM. Na voljo imate še <xliff:g id="NUMBER_1">%d</xliff:g> poskusov.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"Kartica SIM ni več uporabna. Obrnite se na operaterja."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">Napačna koda PUK kartice SIM. Na voljo imate še <xliff:g id="NUMBER_1">%d</xliff:g> poskus. Potem bo kartica SIM postala trajno neuporabna.</item>
-      <item quantity="two">Napačna koda PUK kartice SIM. Na voljo imate še <xliff:g id="NUMBER_1">%d</xliff:g> poskusa. Potem bo kartica SIM postala trajno neuporabna.</item>
-      <item quantity="few">Napačna koda PUK kartice SIM. Na voljo imate še <xliff:g id="NUMBER_1">%d</xliff:g> poskuse. Potem bo kartica SIM postala trajno neuporabna.</item>
-      <item quantity="other">Napačna koda PUK kartice SIM. Na voljo imate še <xliff:g id="NUMBER_1">%d</xliff:g> poskusov. Potem bo kartica SIM postala trajno neuporabna.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Postopek za odklepanje s kodo PIN kartice SIM ni uspel."</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Postopek za odklepanje s kodo PUK kartice SIM ni uspel."</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Koda je sprejeta."</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Ni storitve."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Preklop načina vnosa"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Način za letalo"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Po vnovičnem zagonu naprave je treba vnesti vzorec"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Po vnovičnem zagonu naprave je treba vnesti kodo PIN"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Po vnovičnem zagonu naprave je treba vnesti geslo"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Zaradi dodatne varnosti morate vnesti vzorec"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Zaradi dodatne varnosti morate vnesti kodo PIN"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Zaradi dodatne varnosti morate vnesti geslo"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Po preklopu profilov je treba vnesti vzorec"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Po preklopu profilov je treba vnesti kodo PIN"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Po preklopu profilov je treba vnesti geslo"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Skrbnik naprave je zaklenil napravo"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Naprava je bila ročno zaklenjena"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">Naprava ni bila odklenjena <xliff:g id="NUMBER_1">%d</xliff:g> uro. Potrdite vzorec.</item>
-      <item quantity="two">Naprava ni bila odklenjena <xliff:g id="NUMBER_1">%d</xliff:g> uri. Potrdite vzorec.</item>
-      <item quantity="few">Naprava ni bila odklenjena <xliff:g id="NUMBER_1">%d</xliff:g> ure. Potrdite vzorec.</item>
-      <item quantity="other">Naprava ni bila odklenjena <xliff:g id="NUMBER_1">%d</xliff:g> ur. Potrdite vzorec.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">Naprava ni bila odklenjena <xliff:g id="NUMBER_1">%d</xliff:g> uro. Potrdite kodo PIN.</item>
-      <item quantity="two">Naprava ni bila odklenjena <xliff:g id="NUMBER_1">%d</xliff:g> uri. Potrdite kodo PIN.</item>
-      <item quantity="few">Naprava ni bila odklenjena <xliff:g id="NUMBER_1">%d</xliff:g> ure. Potrdite kodo PIN.</item>
-      <item quantity="other">Naprava ni bila odklenjena <xliff:g id="NUMBER_1">%d</xliff:g> ur. Potrdite kodo PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">Naprava ni bila odklenjena <xliff:g id="NUMBER_1">%d</xliff:g> uro. Potrdite geslo.</item>
-      <item quantity="two">Naprava ni bila odklenjena <xliff:g id="NUMBER_1">%d</xliff:g> uri. Potrdite geslo.</item>
-      <item quantity="few">Naprava ni bila odklenjena <xliff:g id="NUMBER_1">%d</xliff:g> ure. Potrdite geslo.</item>
-      <item quantity="other">Naprava ni bila odklenjena <xliff:g id="NUMBER_1">%d</xliff:g> ur. Potrdite geslo.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Ni prepoznano"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-sq/strings.xml b/packages/Keyguard/res/values-sq/strings.xml
deleted file mode 100644
index 31d31b7..0000000
--- a/packages/Keyguard/res/values-sq/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Mbrojtësi i tasteve"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Shkruaj kodin PIN"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Shkruaj PUK-un dhe PIN-in e ri"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"Kodi PUK i kartës SIM"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"PIN-i i ri i kartës SIM"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Prek për të shkruar fjalëkalimin"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Shkruaj fjalëkalimin për të shkyçur"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Shkruaj PIN-in për ta shkyçur"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Kodi PIN është i pasaktë."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"I ngarkuar"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Po ngarkohet"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Po ngarkon me shpejtësi"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Po ngarkon me ngadalë"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Lidh ngarkuesin."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Shtyp menynë për ta shkyçur."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Rrjeti është i kyçur"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Nuk ka kartë SIM"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Nuk ka kartë SIM në tablet."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Në telefon nuk ka kartë SIM."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Fut një kartë SIM."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"Karta SIM mungon ose është e palexueshme. Fut një kartë të re SIM."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Kartë SIM është e papërdorshme."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Karta jote SIM është çaktivizuar përgjithmonë.\n Kontakto operatorin tënd të shërbimit valor për një tjetër kartë SIM."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"Karta SIM është e kyçur."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"Karta SIM është e kyçur me PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Po shkyç kartën SIM…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Zona PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Zona PIN e kartës SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Zona e PUK-ut të kartës SIM"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Alarmi tjetër i caktuar: <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Fshi"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Harrova motivin"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Motivi është i gabuar"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Fjalëkalim i gabuar"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"PIN-i është i gabuar"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Provo sërish për <xliff:g id="NUMBER">%d</xliff:g> sekonda."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Vizato motivin tënd"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Fut PIN-in e kartës SIM"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Fut PIN-in e kartës SIM për \"<xliff:g id="CARRIER">%1$s</xliff:g>\""</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Fut PIN-in"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Fut fjalëkalimin"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"Karta SIM tani është e çaktivizuar. Fut kodin PUK për të vazhduar. Kontakto operatorin për detaje."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"Karta SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" tani është e çaktivizuar. Fut kodin PUK për të vazhduar. Kontakto operatorin për detaje."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Fut kodin e dëshiruar të PIN-it"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Konfirmo kodin e dëshiruar PIN"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Po shkyç kartën SIM…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Shkruaj një PIN me 4 deri në 8 numra."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"Kodi PUK duhet të jetë me 8 numra ose më shumë."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Fut kodin e saktë PUK. Provat e përsëritura do ta çaktivizojnë përgjithmonë kartën SIM."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Kodet PIN nuk përputhen"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Shumë tentativa për motivin"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"E ke shkruar <xliff:g id="NUMBER_0">%1$d</xliff:g> herë gabimisht PIN-in tënd.\n\n Provo sërish për <xliff:g id="NUMBER_1">%2$d</xliff:g> sekonda."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"E ke shkruar <xliff:g id="NUMBER_0">%1$d</xliff:g> herë gabimisht fjalëkalimin.\n\nProvo sërish për <xliff:g id="NUMBER_1">%2$d</xliff:g> sekonda."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Ke tentuar <xliff:g id="NUMBER_0">%1$d</xliff:g> herë pa sukses për të vizatuar motivin tënd. \n\nProvo sërish për <xliff:g id="NUMBER_1">%2$d</xliff:g> sekonda."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Ke tentuar <xliff:g id="NUMBER_0">%1$d</xliff:g> herë pa sukses për ta shkyçur tabletin. Pas <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativave të tjera të pasuksesshme, tableti do të rivendoset si në gjendjen e fabrikës dhe kjo do t\'i fshijë të gjitha të dhënat."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Ke tentuar <xliff:g id="NUMBER_0">%1$d</xliff:g> herë gabimisht për ta shkyçur telefonin. Pas <xliff:g id="NUMBER_1">%2$d</xliff:g> përpjekjeve të tjera të pasuksesshme, telefoni do të rivendoset dhe të gjitha të dhënat do të fshihen."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Ke tentuar <xliff:g id="NUMBER">%d</xliff:g> herë pa sukses për ta shkyçur tabletin tënd. Ky tablet do të rivendoset dhe të gjitha të dhënat në të, do të fshihen."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Ke tentuar <xliff:g id="NUMBER">%d</xliff:g> herë pa sukses për ta shkyçur telefonin tënd. Ky telefon do të rivendoset dhe të gjitha të dhënat në të, do të fshihen."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Ke tentuar <xliff:g id="NUMBER_0">%1$d</xliff:g> herë pa sukses për ta shkyçur telefonin. Pas <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativave të tjera të pasuksesshme, përdoruesi do të hiqet dhe të gjitha të dhënat e përdoruesit në të, do të fshihen."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Ke tentuar <xliff:g id="NUMBER_0">%1$d</xliff:g> herë pa sukses për ta shkyçur telefonin. Pas <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativave të tjera të pasuksesshme, përdoruesi do të hiqet dhe të gjitha të dhënat e përdoruesit në të, do të fshihen."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Ke tentuar <xliff:g id="NUMBER">%d</xliff:g> herë pa sukses për ta shkyçur tabletin. Ky përdorues do të hiqet dhe kjo do t fshijë të gjitha të dhënat e përdoruesit."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Ke tentuar <xliff:g id="NUMBER">%d</xliff:g> herë pa sukses për ta shkyçur telefonin. Ky përdorues do të hiqet dhe kjo do t\'i fshijë të gjitha të dhënat e përdoruesit."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Ke tentuar <xliff:g id="NUMBER_0">%1$d</xliff:g> herë pa sukses për ta shkyçur tabletin. Pas <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativave të tjera të pasuksesshme, profili i punës do të hiqet dhe të gjitha të dhënat në të do të fshihen."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Ke tentuar <xliff:g id="NUMBER_0">%1$d</xliff:g> herë pa sukses për ta shkyçur telefonin. Pas <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativave të tjera të pasuksesshme, profili i punës do të hiqet dhe të gjitha të dhënat në të do të fshihen."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Ke tentuar <xliff:g id="NUMBER">%d</xliff:g> herë pa sukses për ta shkyçur tabletin. Profili i punës do të hiqet të gjitha të dhënat në të, do të fshihen."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Ke tentuar <xliff:g id="NUMBER">%d</xliff:g> herë pa sukses për ta shkyçur telefonin. Profili i punës do të hiqet të gjitha të dhënat në të, do të fshihen."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"E ke vizatuar gabimisht motivin tënd të shkyçjes <xliff:g id="NUMBER_0">%1$d</xliff:g> herë. Pas <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativave të tjera të pasuksesshme do të të kërkohet ta shkyçësh tabletin duke përdorur një llogari mail-i.\n\n Provo sërish për <xliff:g id="NUMBER_2">%3$d</xliff:g> sekonda."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Ke vizatuar <xliff:g id="NUMBER_0">%1$d</xliff:g> herë pa sukses motivin tënd. Pas <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativave të tjera të pasuksesshme, do të të duhet ta shkyçësh telefonin duke përdorur një llogari mail-i.\n\n Provo sërish për <xliff:g id="NUMBER_2">%3$d</xliff:g> sekonda."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"PIN-i i kartës SIM është i pasaktë. Tani duhet të kontaktosh operatorin për ta shkyçur pajisjen tënde."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">PIN-i i kartës SIM është i pasaktë. Të kanë mbetur edhe <xliff:g id="NUMBER_1">%d</xliff:g> tentativa.</item>
-      <item quantity="one">PIN-i i kartës SIM është i pasaktë. Të ka mbetur edhe <xliff:g id="NUMBER_0">%d</xliff:g> tentativë para se të kontaktosh me operatorin tënd celular për ta shkyçur pajisjen.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"Karta SIM është e papërdorshme. Kontakto operatorin."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">PUK-u i kartës SIM është i pasaktë. Të kanë mbetur edhe <xliff:g id="NUMBER_1">%d</xliff:g> tentativa para se karta SIM të bëhet e papërdorshme përgjithmonë.</item>
-      <item quantity="one">PUK-u i kartës SIM është i pasaktë. Të ka mbetur edhe <xliff:g id="NUMBER_0">%d</xliff:g> tentativë para se karta SIM të bëhet e papërdorshme përgjithmonë.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Përpjekja për shkyçje të kartës përmes PIN-it dështoi!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Operacioni i PUK-ut të kartës SIM dështoi!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Kodi u pranua!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Nuk ka shërbim."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Ndërro metodën e hyrjes"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Modaliteti i aeroplanit"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Kërkohet motivi pas rinisjes së pajisjes"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Kërkohet kodi PIN pas rinisjes së pajisjes"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Kërkohet fjalëkalimi pas rinisjes së pajisjes"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Kërkohet motivi për më shumë siguri"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Kërkohet kodi PIN për më shumë siguri"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Kërkohet fjalëkalimi për më shumë siguri"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Kërkohet motivi kur ndryshon profilet"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Kërkohet kodi PIN kur ndryshon profilet"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Kërkohet fjalëkalimi kur ndryshon profilet"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Administratori i pajisjes e kyçi pajisjen"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Pajisja është kyçur manualisht"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Pajisja nuk është shkyçur për <xliff:g id="NUMBER_1">%d</xliff:g> orë. Konfirmo motivin.</item>
-      <item quantity="one">Pajisja nuk është shkyçur për <xliff:g id="NUMBER_0">%d</xliff:g> orë. Konfirmo motivin.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Pajisja nuk është shkyçur për <xliff:g id="NUMBER_1">%d</xliff:g> orë. Konfirmo PIN-in.</item>
-      <item quantity="one">Pajisja nuk është shkyçur për <xliff:g id="NUMBER_0">%d</xliff:g> orë. Konfirmo PIN-in.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Pajisja nuk është shkyçur për <xliff:g id="NUMBER_1">%d</xliff:g> orë. Konfirmo fjalëkalimin.</item>
-      <item quantity="one">Pajisja nuk është shkyçur për <xliff:g id="NUMBER_0">%d</xliff:g> orë. Konfirmo fjalëkalimin.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Nuk njihet"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-sr/strings.xml b/packages/Keyguard/res/values-sr/strings.xml
deleted file mode 100644
index 23c0b50..0000000
--- a/packages/Keyguard/res/values-sr/strings.xml
+++ /dev/null
@@ -1,137 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Заштита тастера"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Унесите PIN кôд"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Унесите SIM PUK кôд и нови PIN кôд"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM PUK кôд"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Нови SIM PIN кôд"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Додирните да бисте унели лозинку"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Откуцајте лозинку да бисте откључали"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Унесите PIN за откључавање"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"PIN кôд је нетачан."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Напуњено"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Пуњење"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Брзо се пуни"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Споро се пуни"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Повежите пуњач."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Притисните Мени да бисте откључали."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Мрежа је закључана"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Нема SIM картице"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"У таблету нема SIM картице."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"У телефону нема SIM картице."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Уметните SIM картицу."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM картица недостаје или не може да се прочита. Уметните SIM картицу."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"SIM картица је неупотребљива."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"SIM картица је трајно онемогућена.\n Обратите се добављачу услуге бежичне мреже да бисте добили другу SIM картицу."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM картица је закључана."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM картица је закључана PUK кодом."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Откључавање SIM картице…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Област за PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Област за PIN за SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Област за PUK за SIM"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Следећи аларм је подешен за <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Избриши"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Заборављени шаблон"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Погрешан шаблон"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Погрешна лозинка"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Погрешан PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Пробајте поново за <xliff:g id="NUMBER">%d</xliff:g> секунде(и)."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Нацртајте шаблон"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Унесите PIN SIM картице"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Унесите PIN за SIM „<xliff:g id="CARRIER">%1$s</xliff:g>“"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Унесите PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Унесите лозинку"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM картица је сада онемогућена. Унесите PUK кôд да бисте наставили. За детаље контактирајте оператера."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM „<xliff:g id="CARRIER">%1$s</xliff:g>“ је сада онемогућен. Унесите PUK кôд да бисте наставили. Контактирајте оператера за детаље."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Унесите жељени PIN кôд"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Потврдите жељени PIN кôд"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Откључавање SIM картице…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Унесите PIN који има од 4 до 8 бројева."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK кôд треба да има 8 или више бројева."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Поново унесите исправни PUK кôд. Поновљени покушаји ће трајно онемогућити SIM."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN кодови се не подударају"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Превише покушаја уноса шаблона"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Унели сте нетачни PIN <xliff:g id="NUMBER_0">%1$d</xliff:g> пута. \n\nПробајте поново за <xliff:g id="NUMBER_1">%2$d</xliff:g> секунде(и)."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Унели сте нетачну лозинку <xliff:g id="NUMBER_0">%1$d</xliff:g> пута. \n\nПробајте поново за <xliff:g id="NUMBER_1">%2$d</xliff:g> секунде(и)."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Нацртали сте шаблон за откључавање нетачно <xliff:g id="NUMBER_0">%1$d</xliff:g> пута. \n\nПробајте поново за <xliff:g id="NUMBER_1">%2$d</xliff:g> секунде(и)."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Погрешно сте покушали да откључате таблет <xliff:g id="NUMBER_0">%1$d</xliff:g> пут(а). Имате још <xliff:g id="NUMBER_1">%2$d</xliff:g> покушај(а), након чега се таблет ресетује и сви подаци са њега бришу."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Погрешно сте покушали да откључате телефон <xliff:g id="NUMBER_0">%1$d</xliff:g> пут(а). Имате још <xliff:g id="NUMBER_1">%2$d</xliff:g> покушај(а), након чега се телефон ресетује и сви подаци са њега бришу."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Погрешно сте покушали да откључате таблет <xliff:g id="NUMBER">%d</xliff:g> пут(а). Таблет ће бити ресетован и сви подаци са њега ће бити избрисани."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Погрешно сте покушали да откључате телефон <xliff:g id="NUMBER">%d</xliff:g> пут(а). Телефон ће бити ресетован и сви подаци са њега ће бити избрисани."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Погрешно сте покушали да откључате таблет <xliff:g id="NUMBER_0">%1$d</xliff:g> пут(а). Имате још <xliff:g id="NUMBER_1">%2$d</xliff:g> покушај(а), након чега се овај корисник уклања и сви подаци корисника бришу."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Погрешно сте покушали да откључате телефон <xliff:g id="NUMBER_0">%1$d</xliff:g> пут(а). Имате још <xliff:g id="NUMBER_1">%2$d</xliff:g> покушај(а), након чега се овај корисник уклања и сви подаци корисника бришу."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Погрешно сте покушали да откључате таблет <xliff:g id="NUMBER">%d</xliff:g> пут(а). Овај корисник ће бити уклоњен и сви подаци корисника ће бити избрисани."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Погрешно сте покушали да откључате телефон <xliff:g id="NUMBER">%d</xliff:g> пут(а). Овај корисник ће бити уклоњен и сви подаци корисника ће бити избрисани."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Погрешно сте покушали да откључате таблет <xliff:g id="NUMBER_0">%1$d</xliff:g> пут(а). Имате још <xliff:g id="NUMBER_1">%2$d</xliff:g> покушај(а), након чега се пословни профил уклања и сви подаци са профила бришу."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Погрешно сте покушали да откључате телефон <xliff:g id="NUMBER_0">%1$d</xliff:g> пут(а). Имате још <xliff:g id="NUMBER_1">%2$d</xliff:g> покушај(а), након чега се пословни профил уклања и сви подаци са профила бришу."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Погрешно сте покушали да откључате таблет <xliff:g id="NUMBER">%d</xliff:g> пут(а). Пословни профил ће бити уклоњен и сви подаци са њега ће бити избрисани."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Погрешно сте покушали да откључате телефон <xliff:g id="NUMBER">%d</xliff:g> пут(а). Пословни профил ће бити уклоњен и сви подаци са њега ће бити избрисани."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Нацртали сте шаблон за откључавање нетачно <xliff:g id="NUMBER_0">%1$d</xliff:g> пута. После још <xliff:g id="NUMBER_1">%2$d</xliff:g> неуспешна(их) покушаја, од вас ће бити затражено да откључате таблет помоћу налога е-поште.\n\nПробајте поново за <xliff:g id="NUMBER_2">%3$d</xliff:g> секунде(и)."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Нацртали сте шаблон за откључавање нетачно <xliff:g id="NUMBER_0">%1$d</xliff:g> пута. После још <xliff:g id="NUMBER_1">%2$d</xliff:g> неуспешна(их) покушаја, од вас ће бити затражено да откључате телефон помоћу налога е-поште.\n\nПробајте поново за <xliff:g id="NUMBER_2">%3$d</xliff:g> секунде(и)."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Нетачан SIM PIN кôд. Сада морате да контактирате мобилног оператера да бисте откључали уређај."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">Нетачан SIM PIN кôд. Имате још <xliff:g id="NUMBER_1">%d</xliff:g> покушај.</item>
-      <item quantity="few">Нетачан SIM PIN кôд. Имате још <xliff:g id="NUMBER_1">%d</xliff:g> покушаја.</item>
-      <item quantity="other">Нетачан SIM PIN кôд. Имате још <xliff:g id="NUMBER_1">%d</xliff:g> покушаја.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM картица је неупотребљива. Контактирајте мобилног оператера."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">Нетачан SIM PUK кôд. Имате још <xliff:g id="NUMBER_1">%d</xliff:g> покушај пре него што SIM картица постане трајно неупотребљива.</item>
-      <item quantity="few">Нетачан SIM PUK кôд. Имате још <xliff:g id="NUMBER_1">%d</xliff:g> покушаја пре него што SIM картица постане трајно неупотребљива.</item>
-      <item quantity="other">Нетачан SIM PUK кôд. Имате још <xliff:g id="NUMBER_1">%d</xliff:g> покушаја пре него што SIM картица постане трајно неупотребљива.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Радња са SIM PIN кодом није успела!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Радња са SIM PUK кодом није успела!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Кôд је прихваћен!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Офлајн сте."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Промени метод уноса"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Режим рада у авиону"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Треба да унесете шаблон када се уређај поново покрене"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Треба да унесете PIN када се уређај поново покрене"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Треба да унесте лозинку када се уређај поново покрене"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Треба да унесете шаблон ради додатне безбедности"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Треба да унесете PIN ради додатне безбедности"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Треба да унесете лозинку ради додатне безбедности"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Треба да унесете шаблон када прелазите са једног профила на други"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Треба да унесете PIN када прелазите са једног профила на други"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Треба да унесете лозинку када прелазите са једног профила на други"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Администратор уређаја је закључао уређај"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Уређај је ручно закључан"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">Нисте откључали уређај <xliff:g id="NUMBER_1">%d</xliff:g> сат. Потврдите шаблон.</item>
-      <item quantity="few">Нисте откључали уређај <xliff:g id="NUMBER_1">%d</xliff:g> сата. Потврдите шаблон.</item>
-      <item quantity="other">Нисте откључали уређај <xliff:g id="NUMBER_1">%d</xliff:g> сати. Потврдите шаблон.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">Нисте откључали уређај <xliff:g id="NUMBER_1">%d</xliff:g> сат. Потврдите PIN.</item>
-      <item quantity="few">Нисте откључали уређај <xliff:g id="NUMBER_1">%d</xliff:g> сата. Потврдите PIN.</item>
-      <item quantity="other">Нисте откључали уређај <xliff:g id="NUMBER_1">%d</xliff:g> сати. Потврдите PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">Нисте откључали уређај <xliff:g id="NUMBER_1">%d</xliff:g> сат. Потврдите лозинку.</item>
-      <item quantity="few">Нисте откључали уређај <xliff:g id="NUMBER_1">%d</xliff:g> сата. Потврдите лозинку.</item>
-      <item quantity="other">Нисте откључали уређај <xliff:g id="NUMBER_1">%d</xliff:g> сати. Потврдите лозинку.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Није препознат"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-sv/strings.xml b/packages/Keyguard/res/values-sv/strings.xml
deleted file mode 100644
index 4a1d67b..0000000
--- a/packages/Keyguard/res/values-sv/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Keyguard"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Ange PIN-kod"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Ange PUK-koden och en ny pinkod för SIM-kortet"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"PUK-kod för SIM-kortet"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Ny pinkod för SIM-kort"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Tryck om du vill ange lösenord"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Ange lösenord för att låsa upp"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Ange PIN-kod för att låsa upp"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Fel PIN-kod."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Batteriet har laddats"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Laddar"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Laddas snabbt"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Laddas långsamt"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Anslut din laddare."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Tryck på Meny för att låsa upp."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Nätverk låst"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Inget SIM-kort"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Inget SIM-kort i surfplattan."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Inget SIM-kort i mobilen."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Sätt i ett SIM-kort."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM-kort saknas eller kan inte läsas. Sätt i ett SIM-kort."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Oanvändbart SIM-kort."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"SIM-kortet har inaktiverats permanent.\n Beställ ett nytt SIM-kort från din operatör."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM-kortet är låst."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM-kortet är PUK-låst."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Låser upp SIM-kort …"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Pinkodsområde"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Pinkodsområde för SIM-kort"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"PUK-kodsområde för SIM-kort"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Nästa alarm är inställt på <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Delete"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Retur"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Har du glömt ditt grafiska lösenord?"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Fel grafiskt lösenord"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Fel lösenord"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Fel PIN-kod"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Försök igen om <xliff:g id="NUMBER">%d</xliff:g> sekunder."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Rita ditt grafiska lösenord"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Ange PIN-kod för SIM-kortet"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Ange pinkod för SIM-kortet för <xliff:g id="CARRIER">%1$s</xliff:g>"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Ange PIN-kod"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Ange lösenord"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM-kortet är nu inaktiverat. Ange PUK-koden om du vill fortsätta. Kontakta operatören om du vill få mer information."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM-kortet för <xliff:g id="CARRIER">%1$s</xliff:g> har inaktiverats. Ange PUK-kod om du vill fortsätta. Kontakta operatören om du vill veta mer."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Ange önskad PIN-kod"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Bekräfta önskad PIN-kod"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Låser upp SIM-kort …"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Ange en PIN-kod med 4 till 8 siffror."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK-koden ska vara minst åtta siffror."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Ange rätt PUK-kod igen. Om försöken upprepas inaktiveras SIM-kortet permanent."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN-koderna stämmer inte överens"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"För många försök med grafiskt lösenord"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Du har angett fel lösenord <xliff:g id="NUMBER_0">%1$d</xliff:g> gånger. \n\nFörsök igen om <xliff:g id="NUMBER_1">%2$d</xliff:g> sekunder."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Du har angett fel lösenord <xliff:g id="NUMBER_0">%1$d</xliff:g> gånger. \n\nFörsök igen om <xliff:g id="NUMBER_1">%2$d</xliff:g> sekunder."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Du har ritat ditt grafiska lösenord fel <xliff:g id="NUMBER_0">%1$d</xliff:g> gånger. \n\nFörsök igen om <xliff:g id="NUMBER_1">%2$d</xliff:g> sekunder."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Du har försökt låsa upp surfplattan på ett felaktigt sätt <xliff:g id="NUMBER_0">%1$d</xliff:g> gånger. Efter <xliff:g id="NUMBER_1">%2$d</xliff:g> misslyckade försök till återställs surfplattan och all data raderas."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Du har försökt låsa upp mobilen på ett felaktigt sätt <xliff:g id="NUMBER_0">%1$d</xliff:g> gånger. Efter <xliff:g id="NUMBER_1">%2$d</xliff:g> misslyckade försök till återställs mobilen och all data raderas."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Du har försökt låsa upp surfplattan på ett felaktigt sätt <xliff:g id="NUMBER">%d</xliff:g> gånger. Surfplattan återställs och all data raderas."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Du har försökt låsa upp mobilen på ett felaktigt sätt <xliff:g id="NUMBER">%d</xliff:g> gånger. Mobilen återställs och all data raderas."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Du har försökt låsa upp surfplattan på ett felaktigt sätt <xliff:g id="NUMBER_0">%1$d</xliff:g> gånger. Efter <xliff:g id="NUMBER_1">%2$d</xliff:g> misslyckade försök till tas användaren bort och all användardata raderas."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Du har försökt låsa upp mobilen på ett felaktigt sätt <xliff:g id="NUMBER_0">%1$d</xliff:g> gånger. Efter <xliff:g id="NUMBER_1">%2$d</xliff:g> misslyckade försök till tas användaren bort och all användardata raderas."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Du har försökt låsa upp surfplattan på ett felaktigt sätt <xliff:g id="NUMBER">%d</xliff:g> gånger. Användaren tas bort och all användardata raderas."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Du har försökt låsa upp mobilen på ett felaktigt sätt <xliff:g id="NUMBER">%d</xliff:g> gånger. Användaren tas bort och all användardata raderas."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Du har försökt låsa upp surfplattan på ett felaktigt sätt <xliff:g id="NUMBER_0">%1$d</xliff:g> gånger. Efter <xliff:g id="NUMBER_1">%2$d</xliff:g> misslyckade försök till tas jobbprofilen bort och all profildata raderas."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Du har försökt låsa upp mobilen på ett felaktigt sätt <xliff:g id="NUMBER_0">%1$d</xliff:g> gånger. Efter <xliff:g id="NUMBER_1">%2$d</xliff:g> misslyckade försök till tas jobbprofilen bort och all profildata raderas."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Du har försökt låsa upp surfplattan på ett felaktigt sätt <xliff:g id="NUMBER">%d</xliff:g> gånger. Jobbprofilen tas bort och all profildata raderas."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Du har försökt låsa upp mobilen på ett felaktigt sätt <xliff:g id="NUMBER">%d</xliff:g> gånger. Jobbprofilen tas bort och all profildata raderas."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Du har ritat ditt grafiska lösenord fel <xliff:g id="NUMBER_0">%1$d</xliff:g> gånger. Efter ytterligare <xliff:g id="NUMBER_1">%2$d</xliff:g> försök ombeds du låsa upp surfplattan med ett e-postkonto.\n\n Försök igen om <xliff:g id="NUMBER_2">%3$d</xliff:g> sekunder."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Du har ritat ditt grafiska lösenord fel <xliff:g id="NUMBER_0">%1$d</xliff:g> gånger. Efter ytterligare <xliff:g id="NUMBER_1">%2$d</xliff:g> försök ombeds du låsa upp mobilen med hjälp av ett e-postkonto.\n\n Försök igen om <xliff:g id="NUMBER_2">%3$d</xliff:g> sekunder."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Du angav fel pinkod för SIM-kortet och måste nu kontakta operatören för att låsa upp enheten."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">Du angav fel pinkod för SIM-kortet. <xliff:g id="NUMBER_1">%d</xliff:g> försök återstår.</item>
-      <item quantity="one">Du angav fel pinkod för SIM-kortet. <xliff:g id="NUMBER_0">%d</xliff:g> försök återstår innan du måste kontakta operatören för att låsa upp enheten.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM-kortet är obrukbart. Kontakta operatören."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">Du angav fel PUK-kod för SIM-kortet. <xliff:g id="NUMBER_1">%d</xliff:g> försök återstår innan SIM-kortet blir obrukbart.</item>
-      <item quantity="one">Du angav fel PUK-kod för SIM-kortet. <xliff:g id="NUMBER_0">%d</xliff:g> försök återstår innan SIM-kortet blir obrukbart.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Det gick inte att låsa upp med pinkoden för SIM-kortet."</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Det gick inte att låsa upp med PUK-koden för SIM-kortet."</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Koden godkändes!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Ingen tjänst."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Byt inmatningsmetod"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Flygplansläge"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Du måste ange grafiskt lösenord när du startat om enheten"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Du måste ange pinkod när du startat om enheten"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Du måste ange lösenord när du startat om enheten"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Du måste ange grafiskt lösenord för ytterligare säkerhet"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Du måste ange pinkod för ytterligare säkerhet"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Du måste ange lösenord för ytterligare säkerhet"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Du måste ange grafiskt lösenord när du byter profil"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Du måste ange pinkod när du byter profil"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Du måste ange lösenord när du byter profil"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Enhetsadministratören har låst enheten"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Enheten har låsts manuellt"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Enheten har inte låsts upp på <xliff:g id="NUMBER_1">%d</xliff:g> timmar. Bekräfta det grafiska lösenordet.</item>
-      <item quantity="one">Enheten har inte låsts upp på <xliff:g id="NUMBER_0">%d</xliff:g> timme. Bekräfta det grafiska lösenordet.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Enheten har inte låsts upp på <xliff:g id="NUMBER_1">%d</xliff:g> timmar. Bekräfta pinkoden.</item>
-      <item quantity="one">Enheten har inte låsts upp på <xliff:g id="NUMBER_0">%d</xliff:g> timme. Bekräfta pinkoden.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Enheten har inte låsts upp på <xliff:g id="NUMBER_1">%d</xliff:g> timmar. Bekräfta lösenordet.</item>
-      <item quantity="one">Enheten har inte låsts upp på <xliff:g id="NUMBER_0">%d</xliff:g> timme. Bekräfta lösenordet.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Identifierades inte"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-sw/strings.xml b/packages/Keyguard/res/values-sw/strings.xml
deleted file mode 100644
index c2e7ac9..0000000
--- a/packages/Keyguard/res/values-sw/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Kilinda vitufe"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Ingiza msimbo wa PIN"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Chapa PUK ya SIM na msimbo mpya wa PIN"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"Msimbo wa PUK ya SIM"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Msimbo mpya wa PIN ya SIM"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Gusa kuingiza nenosiri "</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Charaza nenosiri ili kufungua"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Ingiza PIN ili kufungua"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Msimbo wa PIN usio sahihi."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Betri imejaa"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Inachaji"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Inachaji kwa kasi"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Inachaji pole pole"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Unganisha chaja yako."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Bonyeza Menyu ili kufungua."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Mtandao umefungwa"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Hakuna SIM kadi"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Hakuna SIM kadi katika kompyuta ndogo."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Hakuna SIM kadi kwenye simu."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Weka SIM kadi."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM kadi haiko au haisomeki. Weka SIM kadi."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"SIM kadi isiyotumika."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"SIM kadi yako imefungwa kabisa.\n Wasiliana na mtoa huduma wako wa pasi waya ili upate SIM kadi nyingine."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM kadi imefungwa."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM kadi imefungwa na PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Inafungua SIM kadi..."</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Eneo la PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Eneo la PIN ya SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Eneo la PUK ya SIM"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Kengele inayofuata imewekwa ilie saa <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Futa"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Umesahau Ruwaza"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Mchoro huo si sahihi"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Nenosiri Lisilo sahihi"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Nambari ya PIN si sahihi"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Jaribu tena baada ya sekunde <xliff:g id="NUMBER">%d</xliff:g>."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Chora ruwaza yako"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Ingiza PIN ya SIM"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Weka PIN ya SIM ya \"<xliff:g id="CARRIER">%1$s</xliff:g>\""</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Ingiza PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Weka Nenosiri"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM sasa imelemazwa. Ingiza msimbo wa PUK ili kuendelea. Wasiliana na mtoa huduma kwa maelezo."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" sasa imezimwa. Weka msimbo wa PUK ili uendelee. Wasiliana na mtoa huduma kwa maelezo."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Ingiza msimbo wa PIN unaopendelewa"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Thibitisha msimbo wa PIN unaopendelewa"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Inafungua SIM kadi..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Charaza PIN iliyo na tarakimu kati ya 4 na 8."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"Msimbo wa PUK unafaa kuwa na nambari 8 au zaidi."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Ingiza upya msimbo sahihi wa PUK. Majaribio yanayorudiwa yatalemaza SIM kabisa."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Misimbo ya PIN haifanani"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Majaribio mengi mno ya mchoro"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Umeingiza nenosiri lako kwa makosa mara <xliff:g id="NUMBER_0">%1$d</xliff:g>. \n\n Jaribu tena baada ya sekunde <xliff:g id="NUMBER_1">%2$d</xliff:g>."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Umeingiza nenosiri lako kwa makosa mara <xliff:g id="NUMBER_0">%1$d</xliff:g>. \n\n Jaribu tena baada ya sekunde <xliff:g id="NUMBER_1">%2$d</xliff:g>."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Umechora ruwaza yako ya kufunga kwa makosa mara <xliff:g id="NUMBER_0">%1$d</xliff:g>. \n\n Jaribu tena baada ya sekunde <xliff:g id="NUMBER_1">%2$d</xliff:g>."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Umekosea majaribio ya kufungua kompyuta kibao mara <xliff:g id="NUMBER_0">%1$d</xliff:g>. Ukikosea majaribio mengine <xliff:g id="NUMBER_1">%2$d</xliff:g>, kompyuta hii kibao itarejeshwa katika hali iliyotoka nayo kiwandani, hatua itakayofuta data yake yote."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Umekosea majaribio ya kufungua simu mara <xliff:g id="NUMBER_0">%1$d</xliff:g>. Ukikosea majaribio mengine <xliff:g id="NUMBER_1">%2$d</xliff:g>, simu hii itawekwa upya, hatua itakayofuta data yake yote."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Umekosea majaribio ya kufungua kompyuta kibao mara <xliff:g id="NUMBER">%d</xliff:g>. Kompyuta hii kibao itarejeshwa katika hali iliyotoka nayo kiwandani, hatua itakayofuta data yake yote."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Umekosea majaribio ya kufungua simu mara <xliff:g id="NUMBER">%d</xliff:g>. Simu hii itarejeshwa katika hali iliyotoka nayo kiwandani, hatua itakayofuta data yake yote."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Umekosea majaribio ya kufungua kompyuta kibao mara <xliff:g id="NUMBER_0">%1$d</xliff:g>. Ukikosea majaribio mengine <xliff:g id="NUMBER_1">%2$d</xliff:g>, mtumiaji huyu ataondolewa, hatua itakayofuta data yote ya mtumiaji."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Umekosea majaribio ya kufungua simu mara <xliff:g id="NUMBER_0">%1$d</xliff:g>. Ukikosea majaribio mengine <xliff:g id="NUMBER_1">%2$d</xliff:g>, wasifu wa kazini utaondolewa, hatua itakayofuta data yote ya wasifu."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Umekosea majaribio ya kufungua kompyuta kibao mara <xliff:g id="NUMBER">%d</xliff:g>. Mtumiaji huyu ataondolewa, hatua itakayofuta data yote ya mtumiaji."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Umekosea majaribio ya kufungua simu mara <xliff:g id="NUMBER">%d</xliff:g>. Mtumiaji huyu ataondolewa, hatua itakayofuta data yote ya mtumiaji."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Umekosea majaribio ya kufungua kompyuta kibao mara <xliff:g id="NUMBER_0">%1$d</xliff:g>. Ukikosea majaribio mengine <xliff:g id="NUMBER_1">%2$d</xliff:g>, wasifu wa kazini utaondolewa, hatua itakayofuta data yote ya wasifu."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Umekosea majaribio ya kufungua simu mara <xliff:g id="NUMBER_0">%1$d</xliff:g>. Ukikosea majaribio mengine <xliff:g id="NUMBER_1">%2$d</xliff:g>, wasifu wa kazini utaondolewa, hatua itakayofuta data yote ya wasifu."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Umekosea majaribio ya kufungua kompyuta kibao mara <xliff:g id="NUMBER">%d</xliff:g>. Wasifu wa kazini utaondolewa, hatua itakayofuta data yote ya wasifu."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Umekosea majaribio ya kufungua simu mara <xliff:g id="NUMBER">%d</xliff:g>. Wasifu wa kazini utaondolewa, hatua itakayofuta data yote ya wasifu."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Umekosea katika kuweka mchoro wako wa kufungua mara <xliff:g id="NUMBER_0">%1$d</xliff:g>. Baada ya majaribio <xliff:g id="NUMBER_1">%2$d</xliff:g> bila kufaulu, utaombwa kufungua kompyuta yako ndogo kwa kutumia akaunti yako ya barua pepe.\n\n Jaribu tena baada ya sekunde <xliff:g id="NUMBER_2">%3$d</xliff:g>."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Umekosea kuchora mchoro wako wa kufungua mara <xliff:g id="NUMBER_0">%1$d</xliff:g>. Baada ya majaribio <xliff:g id="NUMBER_1">%2$d</xliff:g> yasiyofaulu, utaombwa kufungua simu yako kwa kutumia akaunti ya barua pepe.\n\n Jaribu tena baada ya sekunde <xliff:g id="NUMBER_2">%3$d</xliff:g>."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Msimbo wa PIN ya SIM usiosahihi sasa lazima uwasiliane na mtoa huduma wako ili ufungue kifaa chako."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">Msimbo wa PIN ya SIM si sahihi, umebakisha majaribio <xliff:g id="NUMBER_1">%d</xliff:g>.</item>
-      <item quantity="one">Msimbo wa PIN ya SIM si sahihi, umebakisha majaribio <xliff:g id="NUMBER_0">%d</xliff:g> kabla ya kulazimika kuwasiliana na mtoa huduma wako ili afungue kifaa chako.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM haiwezi kutumika. Wasiliana na mtoa huduma wako."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">Msimbo wa PUK ya SIM si sahihi, umebakisha majaribio <xliff:g id="NUMBER_1">%d</xliff:g> kabla SIM haijafungwa kabisa.</item>
-      <item quantity="one">Msimbo wa PUK ya  SIM si sahihi, umebakisha majaribio <xliff:g id="NUMBER_0">%d</xliff:g> kabla SIM haijfungwa kabisa.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Utendakazi wa PIN ya SIM umeshindwa!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Utendakazi wa PUK ya SIM umeshindwa!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Msimbo Umekubaliwa!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Hakuna huduma."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Badilisha mbinu ya kuingiza data"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Hali ya ndegeni"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Mchoro unahitajika baada ya kuanzisha kifaa upya"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"PIN inahitajika baada ya kifaa kuanzishwa upya"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Nenosiri linahitajika baada ya kuanzisha kifaa upya"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Mchoro unatakikana ili kuongeza usalama"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"PIN inatakikana ili kuongeza usalama"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Nenosiri linatakikana ili kuongeza usalama"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Mchoro unahitajika unapobadili wasifu"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"PIN inahitajika unapobadili wasifu"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Nenosiri linahitajika unapobadili wasifu"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Msimamizi wa kifaa amekifunga"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Umefunga kifaa mwenyewe"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Kifaa hakijafunguliwa kwa saa <xliff:g id="NUMBER_1">%d</xliff:g>. Thibitisha mchoro.</item>
-      <item quantity="one">Kifaa hakijafunguliwa kwa saa <xliff:g id="NUMBER_0">%d</xliff:g>. Thibitisha mchoro.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Kifaa hakijafunguliwa kwa saa <xliff:g id="NUMBER_1">%d</xliff:g>. Thibitisha PIN.</item>
-      <item quantity="one">Kifaa hakijafunguliwa kwa saa <xliff:g id="NUMBER_0">%d</xliff:g>. Thibitisha PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Kifaa hakijafunguliwa kwa saa <xliff:g id="NUMBER_1">%d</xliff:g>. Thibitisha nenosiri.</item>
-      <item quantity="one">Kifaa hakijafunguliwa kwa saa <xliff:g id="NUMBER_0">%d</xliff:g>. Thibitisha nenosiri.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Haitambuliwi"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-ta/strings.xml b/packages/Keyguard/res/values-ta/strings.xml
deleted file mode 100644
index c80ddce..0000000
--- a/packages/Keyguard/res/values-ta/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"விசைப்பாதுகாப்பு"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"பின் குறியீட்டை உள்ளிடவும்"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"சிம் PUK மற்றும் புதிய பின் குறியீட்டைத் தட்டச்சு செய்யவும்"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"சிம் PUK குறியீடு"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"புதிய சிம் பின் குறியீடு"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"கடவுச்சொல்லை உள்ளிட, தொடவும்"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"திறக்க, கடவுச்சொல்லை உள்ளிடவும்"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"திறக்க, பின்னை உள்ளிடவும்"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"தவறான பின் குறியீடு."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"சார்ஜ் செய்யப்பட்டது"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"சார்ஜாகிறது"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"வேகமாக சார்ஜாகிறது"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"மெதுவாக சார்ஜாகிறது"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"உங்கள் சார்ஜரை இணைக்கவும்."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"திறக்க, மெனுவை அழுத்தவும்."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"பிணையம் பூட்டப்பட்டது"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"சிம் கார்டு இல்லை"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"டேப்லெட்டில் சிம் கார்டு இல்லை."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"தொலைபேசியில் சிம் கார்டு இல்லை."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"சிம் கார்டைச் செருகவும்."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"சிம் கார்டு இல்லை அல்லது படிக்கக்கூடியதாக இல்லை. சிம் கார்டைச் செருகவும்."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"சிம் கார்டைப் பயன்படுத்த முடியாது."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"உங்கள் சிம் கார்டு நிரந்தரமாக முடக்கப்பட்டது.\n மற்றொரு சிம் கார்டிற்காக உங்கள் வயர்லெஸ் சேவை வழங்குநரைத் தொடர்புகொள்ளவும்."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"சிம் கார்டு பூட்டப்பட்டுள்ளது."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"சிம் கார்டு PUK ஆல் பூட்டப்பட்டது."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"சிம் கார்டின் தடையைநீக்குகிறது..."</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN பகுதி"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"சிம் PIN பகுதி"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"சிம் PUK பகுதி"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"அடுத்த அலாரம் <xliff:g id="ALARM">%1$s</xliff:g>க்கு அமைக்கப்பட்டது"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"நீக்கு"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"உள்ளிடு"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"வடிவத்தை மறந்துவிட்டீர்களா"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"தவறான வடிவம்"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"தவறான கடவுச்சொல்"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"தவறான பின்"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"<xliff:g id="NUMBER">%d</xliff:g> வினாடிகள் கழித்து முயற்சிக்கவும்."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"வடிவத்தை வரையவும்"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"சிம் பின்னை உள்ளிடவும்"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"\"<xliff:g id="CARRIER">%1$s</xliff:g>\"க்கான சிம் பின்னை உள்ளிடவும்"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"பின்னை உள்ளிடுக"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"கடவுச்சொல்லை உள்ளிடவும்"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"சிம் தற்போது முடக்கப்பட்டுள்ளது. தொடர்வதற்கு PUK குறியீட்டை உள்ளிடவும். விவரங்களுக்கு மொபைல் நிறுவனங்களைத் தொடர்புகொள்ளவும்."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"\"<xliff:g id="CARRIER">%1$s</xliff:g>\" சிம் இப்போது முடக்கத்தில் உள்ளது. தொடர, PUK குறியீட்டை உள்ளிடவும். விவரங்களுக்கு, மொபைல் நிறுவனத்தைத் தொடர்புகொள்ளவும்."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"விரும்பிய பின் குறியீட்டை உள்ளிடவும்"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"விரும்பிய பின் குறியீட்டை உறுதிப்படுத்தவும்"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"சிம் கார்டின் தடையைநீக்குகிறது..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"4 இலிருந்து 8 எண்கள் வரையுள்ள பின்னை உள்ளிடவும்."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK குறியீட்டில் 8 எண்கள் அல்லது அதற்கு மேல் இருக்க வேண்டும்."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"சரியான PUK குறியீட்டை மீண்டும் உள்ளிடவும். தொடர் முயற்சிகள் சிம் ஐ நிரந்தரமாக முடக்கிவிடும்."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"பின் குறியீடுகள் பொருந்தவில்லை"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"அதிகமான வடிவ முயற்சிகள்"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"உங்கள் பின்னை <xliff:g id="NUMBER_0">%1$d</xliff:g> முறை தவறாக உள்ளிட்டீர்கள். \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> வினாடிகள் கழித்து முயற்சிக்கவும்."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"உங்கள் கடவுச்சொல்லை <xliff:g id="NUMBER_0">%1$d</xliff:g> முறை தவறாக உள்ளிட்டீர்கள். \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> வினாடிகள் கழித்து முயற்சிக்கவும்."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"திறப்பதற்கான வடிவத்தை <xliff:g id="NUMBER_0">%1$d</xliff:g> முறை தவறாக வரைந்துள்ளீர்கள். \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> வினாடிகளில் மீண்டும் முயற்சிக்கவும்."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"டேப்லெட்டைத் திறக்க, <xliff:g id="NUMBER_0">%1$d</xliff:g> முறை தவறாக முயற்சித்துள்ளீர்கள். இன்னும் <xliff:g id="NUMBER_1">%2$d</xliff:g> முறை தவறாக முயற்சித்தால், டேப்லெட் மீட்டமைக்கப்படும், அத்துடன் இதன் எல்லா தரவும் நீக்கப்படும்."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"மொபைலைத் திறக்க, <xliff:g id="NUMBER_0">%1$d</xliff:g> முறை தவறாக முயற்சித்துள்ளீர்கள். இன்னும் <xliff:g id="NUMBER_1">%2$d</xliff:g> முறை தவறாக முயற்சித்தால் மொபைல் மீட்டமைக்கப்படும், அத்துடன் இதன் எல்லா தரவும் நீக்கப்படும்."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"டேப்லெட்டைத் திறக்க, <xliff:g id="NUMBER">%d</xliff:g> முறை தவறாக முயற்சித்துள்ளீர்கள். டேப்லெட் மீட்டமைக்கப்படும், அத்துடன் இதன் எல்லா தரவும் நீக்கப்படும்."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"மொபைலைத் திறக்க, <xliff:g id="NUMBER">%d</xliff:g> முறை தவறாக முயற்சித்துள்ளீர்கள். மொபைல் மீட்டமைக்கப்படும், அத்துடன் இதன் எல்லா தரவும் நீக்கப்படும்."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"டேப்லெட்டைத் திறக்க, <xliff:g id="NUMBER_0">%1$d</xliff:g> முறை தவறாக முயற்சித்துள்ளீர்கள். இன்னும் <xliff:g id="NUMBER_1">%2$d</xliff:g> முறை தவறாக முயற்சித்தால் இந்தப் பயனர் அகற்றப்படுவார், அத்துடன் அவரின் எல்லா தரவும் நீக்கப்படும்."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"மொபைலைத் திறக்க, <xliff:g id="NUMBER_0">%1$d</xliff:g> முறை தவறாக முயற்சித்துள்ளீர்கள். இன்னும் <xliff:g id="NUMBER_1">%2$d</xliff:g> முறை தவறாக முயற்சித்தால் இந்தப் பயனர் அகற்றப்படுவார், அத்துடன் அவரின் எல்லா தரவும் நீக்கப்படும்."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"டேப்லெட்டைத் திறக்க, <xliff:g id="NUMBER">%d</xliff:g> முறை தவறாக முயற்சித்துள்ளீர்கள். இவர் அகற்றப்படுவார், அத்துடன் அவரின் எல்லா தரவும் நீக்கப்படும்."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"மொபைலைத் திறக்க, <xliff:g id="NUMBER">%d</xliff:g> முறை தவறாக முயற்சித்துள்ளீர்கள். இவர் அகற்றப்படுவார், அத்துடன் அவரின் எல்லா தரவும் நீக்கப்படும்."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"டேப்லெட்டைத் திறக்க, <xliff:g id="NUMBER_0">%1$d</xliff:g> முறை தவறாக முயற்சித்துள்ளீர்கள். இன்னும் <xliff:g id="NUMBER_1">%2$d</xliff:g> முறை தவறாக முயற்சித்தால், பணி சுயவிவரம் அகற்றப்படும், அத்துடன் சுயவிவரத்தின் எல்லா தரவும் நீக்கப்படும்."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"மொபைலைத் திறக்க <xliff:g id="NUMBER_0">%1$d</xliff:g> முறை தவறாக முயற்சித்துள்ளீர்கள். இன்னும் <xliff:g id="NUMBER_1">%2$d</xliff:g> முறை தவறாக முயற்சித்தால் பணி சுயவிவரம் அகற்றப்படும், அத்துடன் சுயவிவரத்தின் எல்லா தரவும் நீக்கப்படும்."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"டேப்லெட்டைத் திறக்க, <xliff:g id="NUMBER">%d</xliff:g> முறை தவறாக முயற்சித்துள்ளீர்கள். பணி சுயவிவரம் அகற்றப்படும், அத்துடன் சுயவிவரத்தின் எல்லா தரவும் நீக்கப்படும்."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"மொபைலைத் திறக்க, <xliff:g id="NUMBER">%d</xliff:g> முறை தவறாக முயற்சித்துள்ளீர்கள். பணி சுயவிவரம் அகற்றப்படும், அத்துடன் சுயவிவரத்தின் எல்லா தரவும் நீக்கப்படும்."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"திறப்பதற்கான வடிவத்தை <xliff:g id="NUMBER_0">%1$d</xliff:g> முறை தவறாக வரைந்துள்ளீர்கள். மேலும் <xliff:g id="NUMBER_1">%2$d</xliff:g> தோல்வி முயற்சிகளுக்குப் பிறகு, மின்னஞ்சல் கணக்கைப் பயன்படுத்தி உங்கள் டேப்லெட்டைத் திறக்க கேட்கப்படுவீர்கள்.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> வினாடிகளில் மீண்டும் முயற்சிக்கவும்."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"திறப்பதற்கான வடிவத்தை <xliff:g id="NUMBER_0">%1$d</xliff:g> முறை தவறாக வரைந்துள்ளீர்கள். மேலும் <xliff:g id="NUMBER_1">%2$d</xliff:g> தோல்வி முயற்சிகளுக்குப் பிறகு, மின்னஞ்சல் கணக்கைப் பயன்படுத்தி உங்கள் மொபைலைத் திறக்கக் கேட்கப்படுவீர்கள்.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> வினாடிகள் கழித்து முயற்சிக்கவும்."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"சிம் பின் குறியீடு தவறானது, உங்கள் சாதனத்தின் தடையை நீக்க, உங்கள் மொபைல் நிறுவனத்தைத் தொடர்புகொள்ள வேண்டும்."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">சிம்மின் பின் குறியீடு தவறானது, உங்களிடம் <xliff:g id="NUMBER_1">%d</xliff:g> முயற்சிகள் மீதமுள்ளன.</item>
-      <item quantity="one">சிம்மின் பின் குறியீடு தவறானது, மேலும் <xliff:g id="NUMBER_0">%d</xliff:g> முயற்சிக்குப் பின்னர், சாதனத்தைத் திறக்க, கண்டிப்பாக உங்கள் மொபைல் நிறுவனத்தைத் தொடர்புகொள்ள வேண்டும்.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"சிம் பயன்பாட்டிற்கு உகந்தது அல்ல. உங்கள் மொபைல் நிறுவனத்தைத் தொடர்புகொள்ளவும்."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">சிம் PUK குறியீடு தவறானது, நிரந்தரமாக சிம் முடக்கப்படும் முன், நீங்கள் <xliff:g id="NUMBER_1">%d</xliff:g> முறை முயற்சிக்கலாம்.</item>
-      <item quantity="one">சிம்மின் PUK குறியீடு தவறானது, நிரந்தரமாக சிம் முடக்கப்படும் முன், நீங்கள் <xliff:g id="NUMBER_0">%d</xliff:g> முறை முயற்சிக்கலாம்.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"சிம் பின் செயல்பாடு தோல்வி!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"சிம் PUK செயல்பாடு தோல்வி!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"குறியீடு ஏற்கப்பட்டது!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"சேவை இல்லை."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"உள்ளீட்டு முறையை மாற்று"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"விமானப் பயன்முறை"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"சாதனத்தை மீண்டும் தொடங்கியதும் வடிவத்தை வரைய வேண்டும்"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"சாதனத்தை மீண்டும் தொடங்கியதும் பின்னை உள்ளிட வேண்டும்"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"சாதனத்தை மீண்டும் தொடங்கியதும் கடவுச்சொல்லை உள்ளிட வேண்டும்"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"கூடுதல் பாதுகாப்பிற்கு வடிவத்தை வரைய வேண்டும்"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"கூடுதல் பாதுகாப்பிற்குப் பின்னை உள்ளிட வேண்டும்"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"கூடுதல் பாதுகாப்பிற்குக் கடவுச்சொல்லை உள்ளிட வேண்டும்"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"சுயவிவரங்களுக்கு இடையே மாறும் போது, வடிவத்தை வரைய வேண்டும்"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"சுயவிவரங்களுக்கு இடையே மாறும் போது, பின்னை உள்ளிட வேண்டும்"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"சுயவிவரங்களுக்கு இடையே மாறும் போது, கடவுச்சொல்லை உள்ளிட வேண்டும்"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"சாதன நிர்வாகி சாதனத்தைப் பூட்டியுள்ளார்"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"பயனர் சாதனத்தைப் பூட்டியுள்ளார்"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other"><xliff:g id="NUMBER_1">%d</xliff:g> மணிநேரமாகச் சாதனம் திறக்கப்படவில்லை. வடிவத்தை உறுதிப்படுத்தவும்.</item>
-      <item quantity="one"><xliff:g id="NUMBER_0">%d</xliff:g> மணிநேரமாகச் சாதனம் திறக்கப்படவில்லை. வடிவத்தை உறுதிப்படுத்தவும்.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other"><xliff:g id="NUMBER_1">%d</xliff:g> மணிநேரமாகச் சாதனம் திறக்கப்படவில்லை. பின்னை உறுதிப்படுத்தவும்.</item>
-      <item quantity="one"><xliff:g id="NUMBER_0">%d</xliff:g> மணிநேரமாகச் சாதனம் திறக்கப்படவில்லை. பின்னை உறுதிப்படுத்தவும்.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other"><xliff:g id="NUMBER_1">%d</xliff:g> மணிநேரமாகச் சாதனம் திறக்கப்படவில்லை. கடவுச்சொல்லை உறுதிப்படுத்தவும்.</item>
-      <item quantity="one"><xliff:g id="NUMBER_0">%d</xliff:g> மணிநேரமாகச் சாதனம் திறக்கப்படவில்லை. கடவுச்சொல்லை உறுதிப்படுத்தவும்.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"அறியப்படவில்லை"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-te/strings.xml b/packages/Keyguard/res/values-te/strings.xml
deleted file mode 100644
index a72a85b..0000000
--- a/packages/Keyguard/res/values-te/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"కీగార్డ్"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"పిన్‌ కోడ్‌ను టైప్ చేయండి"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"సిమ్ PUK మరియు కొత్త పిన్ కోడ్‌ను టైప్ చేయండి"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"సిమ్ PUK కోడ్"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"కొత్త సిమ్ పిన్ కోడ్"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"పాస్‌వర్డ్‌ను టైప్ చేయడానికి తాకండి"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"అన్‌లాక్ చేయడానికి పాస్‌వర్డ్‌ను టైప్ చేయండి"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"అన్‌లాక్ చేయడానికి పిన్‌ను టైప్ చేయండి"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"చెల్లని పిన్‌ కోడ్."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"ఛార్జ్ అయింది"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"ఛార్జ్ అవుతోంది"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"వేగంగా ఛార్జ్ అవుతోంది"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"నెమ్మదిగా ఛార్జ్ అవుతోంది"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"మీ ఛార్జర్‌ను కనెక్ట్ చేయండి."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"అన్‌లాక్ చేయడానికి మెను నొక్కండి."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"నెట్‌వర్క్ లాక్ చేయబడింది"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"సిమ్ కార్డు లేదు"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"టాబ్లెట్‌లో సిమ్ కార్డు లేదు."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"ఫోన్‌లో సిమ్ కార్డు లేదు."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"సిమ్ కార్డును చొప్పించండి."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"సిమ్ కార్డు లేదు లేదా చదవగలిగేలా లేదు. సిమ్ కార్డును చొప్పించండి."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"నిరుపయోగ సిమ్ కార్డు."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"మీ సిమ్ కార్డు శాశ్వతంగా నిలిపివేయబడింది.\n మరో సిమ్ కార్డు కోసం మీ వైర్‌లెస్ సేవా ప్రదాతను సంప్రదించండి."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"సిమ్ కార్డు లాక్ చేయబడింది."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"సిమ్ కార్డు PUK లాక్ చేయబడింది."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"సిమ్ కార్డును అన్‌లాక్ చేస్తోంది…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN ప్రాంతం"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM PIN ప్రాంతం"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM PUK ప్రాంతం"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"తదుపరి అలారం <xliff:g id="ALARM">%1$s</xliff:g>కి సెట్ చేయబడింది"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"తొలగించు"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"నమూనాను మర్చిపోయాను"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"నమూనా తప్పు"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"పాస్‌వర్డ్ తప్పు"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"పిన్‌ తప్పు"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"<xliff:g id="NUMBER">%d</xliff:g> సెకన్లలో మళ్లీ ప్రయత్నించండి."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"మీ నమూనాను గీయండి"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"సిమ్ పిన్‌ను నమోదు చేయండి"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"\"<xliff:g id="CARRIER">%1$s</xliff:g>\" కోసం SIM PIN నమోదు చేయండి"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"పిన్‌ను నమోదు చేయండి"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"పాస్‌వర్డ్‌ని నమోదు చేయండి"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"సిమ్ ఇప్పుడు నిలిపివేయబడింది. కొనసాగడానికి PUK కోడ్‌ను నమోదు చేయండి. వివరాల కోసం క్యారియర్‌ను సంప్రదించండి."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" ఇప్పుడు నిలిపివేయబడింది. కొనసాగించడానికి PUK కోడ్‌ను నమోదు చేయండి. వివరాల కోసం క్యారియర్‌ను సంప్రదించండి."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"కోరుకునే పిన్‌ కోడ్‌ను నమోదు చేయండి"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"కావల్సిన పిన్‌ కోడ్‌ను నిర్ధారించండి"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"సిమ్ కార్డు‌ను అన్‌లాక్ చేస్తోంది…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"4 నుండి 8 సంఖ్యలు ఉండే పిన్‌ను టైప్ చేయండి."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK కోడ్ 8 లేదా అంతకంటే ఎక్కువ సంఖ్యలు ఉండాలి."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"సరైన PUK కోడ్‌ను మళ్లీ నమోదు చేయండి. పునరావృత ప్రయత్నాల వలన సిమ్ శాశ్వతంగా నిలిపివేయబడుతుంది."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"పిన్‌ కోడ్‌లు సరిపోలలేదు"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"చాలా ఎక్కువ నమూనా ప్రయత్నాలు చేసారు"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"మీరు మీ పిన్‌ను <xliff:g id="NUMBER_0">%1$d</xliff:g> సార్లు తప్పుగా టైప్ చేసారు. \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> సెకన్లలో మళ్లీ ప్రయత్నించండి."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"మీరు మీ పాస్‌వర్డ్‌ను <xliff:g id="NUMBER_0">%1$d</xliff:g> సార్లు తప్పుగా టైప్ చేసారు. \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> సెకన్లలో మళ్లీ ప్రయత్నించండి."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"మీరు మీ అన్‌లాక్ నమూనాను <xliff:g id="NUMBER_0">%1$d</xliff:g> సార్లు తప్పుగా గీసారు. \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> సెకన్లలో మళ్లీ ప్రయత్నించండి."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"మీరు టాబ్లెట్‌ను అన్‌లాక్ చేయడానికి <xliff:g id="NUMBER_0">%1$d</xliff:g> సార్లు చెల్లని ప్రయత్నాలు చేశారు. మరో <xliff:g id="NUMBER_1">%2$d</xliff:g> ప్రయత్నాలు విఫలమైతే, ఈ టాబ్లెట్ రీసెట్ చేయబడుతుంది, ఇందువల్ల ఇందులోని మొత్తం డేటా తొలగించబడుతుంది."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"మీరు ఫోన్‌ను అన్‌లాక్ చేయడానికి <xliff:g id="NUMBER_0">%1$d</xliff:g> సార్లు చెల్లని ప్రయత్నాలు చేశారు. మరో <xliff:g id="NUMBER_1">%2$d</xliff:g> ప్రయత్నాలు విఫలమైతే, ఈ ఫోన్ రీసెట్ చేయబడుతుంది, ఇందువల్ల ఇందులోని మొత్తం డేటా తొలగించబడుతుంది."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"మీరు టాబ్లెట్‌ను అన్‌లాక్ చేయడానికి <xliff:g id="NUMBER">%d</xliff:g> సార్లు చెల్లని ప్రయత్నాలు చేశారు. ఈ టాబ్లెట్ రీసెట్ చేయబడుతుంది, ఇందువల్ల ఇందులోని మొత్తం డేటా తొలగించబడుతుంది."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"మీరు ఫోన్‌ను అన్‌లాక్ చేయడానికి <xliff:g id="NUMBER">%d</xliff:g> సార్లు చెల్లని ప్రయత్నాలు చేశారు. ఈ ఫోన్ రీసెట్ చేయబడుతుంది, ఇందువల్ల ఇందులోని మొత్తం డేటా తొలగించబడుతుంది."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"మీరు టాబ్లెట్‌ను అన్‌లాక్ చేయడానికి <xliff:g id="NUMBER_0">%1$d</xliff:g> సార్లు చెల్లని ప్రయత్నాలు చేశారు. మరో <xliff:g id="NUMBER_1">%2$d</xliff:g> ప్రయత్నాలు విఫలమైతే, ఈ వినియోగదారు తీసివేయబడతారు, ఇందువల్ల మొత్తం వినియోగదారు డేటా తొలగించబడుతుంది."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"మీరు ఫోన్‌ను అన్‌లాక్ చేయడానికి <xliff:g id="NUMBER_0">%1$d</xliff:g> సార్లు చెల్లని ప్రయత్నాలు చేశారు. మరో <xliff:g id="NUMBER_1">%2$d</xliff:g> ప్రయత్నాలు విఫలమైతే, ఈ వినియోగదారు తీసివేయబడతారు, ఇందువల్ల మొత్తం వినియోగదారు డేటా తొలగించబడుతుంది."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"మీరు టాబ్లెట్‌ను అన్‌లాక్ చేయడానికి <xliff:g id="NUMBER">%d</xliff:g> సార్లు చెల్లని ప్రయత్నాలు చేశారు. ఈ వినియోగదారు తీసివేయబడతారు, ఇందువల్ల మొత్తం వినియోగదారు డేటా తొలగించబడుతుంది."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"మీరు ఫోన్‌ను అన్‌లాక్ చేయడానికి <xliff:g id="NUMBER">%d</xliff:g> సార్లు చెల్లని ప్రయత్నాలు చేశారు. ఈ వినియోగదారు తీసివేయబడతారు, ఇందువల్ల మొత్తం వినియోగదారు డేటా తొలగించబడుతుంది."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"మీరు టాబ్లెట్‌ను అన్‌లాక్ చేయడానికి <xliff:g id="NUMBER_0">%1$d</xliff:g> సార్లు చెల్లని ప్రయత్నాలు చేశారు. మరో <xliff:g id="NUMBER_1">%2$d</xliff:g> ప్రయత్నాలు విఫలమైతే, కార్యాలయ ప్రొఫైల్ తీసివేయబడుతుంది, ఇందువల్ల మొత్తం ప్రొఫైల్ డేటా తొలగించబడుతుంది."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"మీరు ఫోన్‌ను అన్‌లాక్ చేయడానికి <xliff:g id="NUMBER_0">%1$d</xliff:g> సార్లు చెల్లని ప్రయత్నాలు చేశారు. మరో <xliff:g id="NUMBER_1">%2$d</xliff:g> ప్రయత్నాలు విఫలమైతే, కార్యాలయ ప్రొఫైల్ తీసివేయబడుతుంది, ఇందువల్ల మొత్తం ప్రొఫైల్ డేటా తొలగించబడుతుంది."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"మీరు టాబ్లెట్‌ను అన్‌లాక్ చేయడానికి <xliff:g id="NUMBER">%d</xliff:g> సార్లు చెల్లని ప్రయత్నాలు చేశారు. కార్యాలయ ప్రొఫైల్ తీసివేయబడుతుంది, ఇందువల్ల మొత్తం ప్రొఫైల్ డేటా తొలగించబడుతుంది."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"మీరు ఫోన్‌ను అన్‌లాక్ చేయడానికి <xliff:g id="NUMBER">%d</xliff:g> సార్లు చెల్లని ప్రయత్నాలు చేశారు. కార్యాలయ ప్రొఫైల్ తీసివేయబడుతుంది, ఇందువల్ల మొత్తం ప్రొఫైల్ డేటా తొలగించబడుతుంది."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"మీరు మీ అన్‌లాక్ నమూనాను <xliff:g id="NUMBER_0">%1$d</xliff:g> సార్లు తప్పుగా గీసారు. మరో <xliff:g id="NUMBER_1">%2$d</xliff:g> విఫల ప్రయత్నాల తర్వాత, ఇమెయిల్ ఖాతాను ఉపయోగించి మీ టాబ్లెట్‌ను అన్‌లాక్ చేయాల్సిందిగా మిమ్మల్ని అడుగుతారు.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> సెకన్లలో మళ్లీ ప్రయత్నించండి."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"మీరు మీ అన్‌లాక్ నమూనాను <xliff:g id="NUMBER_0">%1$d</xliff:g> సార్లు తప్పుగా గీసారు. మరో <xliff:g id="NUMBER_1">%2$d</xliff:g> విఫల ప్రయత్నాల తర్వాత, ఇమెయిల్ ఖాతాను ఉపయోగించి మీ ఫోన్‌ను అన్‌లాక్ చేయాల్సిందిగా మిమ్మల్ని అడుగుతారు.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> సెకన్లలో మళ్లీ ప్రయత్నించండి."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"సిమ్ పిన్ కోడ్ చెల్లదు, మీరు ఇప్పుడు మీ పరికరాన్ని అన్‌లాక్ చేయడానికి తప్పనిసరిగా మీ క్యారియర్‌ను సంప్రదించండి."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">SIM PIN కోడ్ చెల్లదు, మీకు <xliff:g id="NUMBER_1">%d</xliff:g> ప్రయత్నాలు మిగిలి ఉన్నాయి.</item>
-      <item quantity="one">SIM PIN కోడ్ చెల్లదు, మీరు మీ పరికరాన్ని అన్‌లాక్ చేయడానికి తప్పనిసరిగా మీ క్యారియర్‌ను సంప్రదించడానికి ముందు మీకు <xliff:g id="NUMBER_0">%d</xliff:g> ప్రయత్నం మిగిలి ఉంది.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"సిమ్ నిరుపయోగమైనది. మీ క్యారియర్‌ను సంప్రదించండి."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">SIM PUK కోడ్ చెల్లదు, SIM శాశ్వతంగా నిరుపయోగం కాకుండా ఉండటానికి మీకు <xliff:g id="NUMBER_1">%d</xliff:g> ప్రయత్నాలు మిగిలి ఉన్నాయి.</item>
-      <item quantity="one">SIM PUK కోడ్ చెల్లదు, SIM శాశ్వతంగా నిరుపయోగం కాకుండా ఉండటానికి మీకు <xliff:g id="NUMBER_0">%d</xliff:g> ప్రయత్నం మిగిలి ఉంది.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"సిమ్ పిన్ చర్య విఫలమైంది!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"సిమ్ PUK చర్య విఫలమైంది!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"కోడ్ ఆమోదించబడింది!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"సేవ లేదు."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"ఇన్‌పుట్ పద్ధతిని మారుస్తుంది"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"ఎయిర్‌ప్లైన్ మోడ్"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"పరికరాన్ని పునఃప్రారంభించిన తర్వాత నమూనా నమోదు చేయడం ఆవశ్యకం"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"పరికరాన్ని పునఃప్రారంభించిన తర్వాత PIN నమోదు చేయడం ఆవశ్యకం"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"పరికరాన్ని పునఃప్రారంభించిన తర్వాత పాస్‌వర్డ్ నమోదు చేయడం ఆవశ్యకం"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"అదనపు భద్రత కోసం నమూనా నమోదు చేయడం ఆవశ్యకం"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"అదనపు భద్రత కోసం PIN నమోదు చేయడం ఆవశ్యకం"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"అదనపు భద్రత కోసం పాస్‌వర్డ్ నమోదు చేయడం ఆవశ్యకం"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"మీరు ప్రొఫైల్‌లు మారినప్పుడు నమూనా నమోదు చేయడం ఆవశ్యకం"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"మీరు ప్రొఫైల్‌లు మారినప్పుడు PIN నమోదు చేయడం ఆవశ్యకం"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"మీరు ప్రొఫైల్‌లు మారినప్పుడు పాస్‌వర్డ్ నమోదు చేయడం ఆవశ్యకం"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"పరికర నిర్వాహకులు పరికరాన్ని లాక్ చేసారు"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"పరికరం మాన్యువల్‌గా లాక్ చేయబడింది"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">పరికరం <xliff:g id="NUMBER_1">%d</xliff:g> గంటల పాటు అన్‌లాక్ చేయబడలేదు. నమూనాను నిర్ధారించండి.</item>
-      <item quantity="one">పరికరం <xliff:g id="NUMBER_0">%d</xliff:g> గంట పాటు అన్‌లాక్ చేయబడలేదు. నమూనాను నిర్ధారించండి.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">పరికరం <xliff:g id="NUMBER_1">%d</xliff:g> గంటల పాటు అన్‌లాక్ చేయబడలేదు. PINను నిర్ధారించండి.</item>
-      <item quantity="one">పరికరం <xliff:g id="NUMBER_0">%d</xliff:g> గంట పాటు అన్‌లాక్ చేయబడలేదు. PINను నిర్ధారించండి.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">పరికరం <xliff:g id="NUMBER_1">%d</xliff:g> గంటల పాటు అన్‌లాక్ చేయబడలేదు. పాస్‌వర్డ్‌ని నిర్ధారించండి.</item>
-      <item quantity="one">పరికరం <xliff:g id="NUMBER_0">%d</xliff:g> గంట పాటు అన్‌లాక్ చేయబడలేదు. పాస్‌వర్డ్‌ని నిర్ధారించండి.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"గుర్తించలేదు"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-th/strings.xml b/packages/Keyguard/res/values-th/strings.xml
deleted file mode 100644
index e094d35..0000000
--- a/packages/Keyguard/res/values-th/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"การล็อกปุ่มกด"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"พิมพ์รหัส PIN"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"พิมพ์ PUK และรหัส PIN ใหม่"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"รหัส PUK ของซิม"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"รหัส PIN ของซิมใหม่"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"แตะเพื่อพิมพ์รหัสผ่าน"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"พิมพ์รหัสผ่านเพื่อปลดล็อก"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"พิมพ์ PIN เพื่อปลดล็อก"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"รหัส PIN ไม่ถูกต้อง"</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"ชาร์จแล้ว"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"กำลังชาร์จ"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"กำลังชาร์จเร็ว"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"กำลังชาร์จอย่างช้าๆ"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"เสียบที่ชาร์จของคุณ"</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"กด \"เมนู\" เพื่อปลดล็อก"</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"เครือข่ายล็อก"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"ไม่มีซิมการ์ด"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"ไม่มีซิมการ์ดในแท็บเล็ต"</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"ไม่มีซิมการ์ดในโทรศัพท์"</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"ใส่ซิมการ์ด"</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"ไม่มีหรือไม่สามารถอ่านซิมการ์ดได้ โปรดใส่ซิมการ์ด"</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"ซิมการ์ดใช้ไม่ได้"</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"ซิมการ์ดของคุณถูกปิดใช้งานอย่างถาวร\nติดต่อผู้ให้บริการระบบไร้สายของคุณเพื่อรับซิมการ์ดใหม่"</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"ซิมการ์ดถูกล็อก"</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"ซิมการ์ดถูกล็อกด้วย PUK"</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"กำลังปลดล็อกซิมการ์ด…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"พื้นที่ PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"พื้นที่ PIN ของซิม"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"พื้นที่ PUK ของซิม"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"ตั้งเวลาปลุกครั้งถัดไปไว้ที่ <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"ลบ"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"ป้อน"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"ลืมรูปแบบใช่หรือไม่"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"รูปแบบไม่ถูกต้อง"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"รหัสผ่านไม่ถูกต้อง"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"PIN ไม่ถูกต้อง"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"ลองอีกครั้งในอีก <xliff:g id="NUMBER">%d</xliff:g> วินาที"</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"วาดรูปแบบของคุณ"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"ป้อน PIN ของซิม"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"ป้อน PIN ของซิมสำหรับ \"<xliff:g id="CARRIER">%1$s</xliff:g>\""</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"ป้อน PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"ป้อนรหัสผ่าน"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"ซิมการ์ดถูกปิดใช้งานแล้วในตอนนี้ ป้อนรหัส PUK เพื่อดำเนินการต่อ โปรดติดต่อผู้ให้บริการสำหรับรายละเอียด"</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"ปิดใช้ซิม \"<xliff:g id="CARRIER">%1$s</xliff:g>\" แล้ว โปรดป้อนรหัส PUK เพื่อดำเนินการต่อ โปรดสอบถามรายละเอียดจากผู้ให้บริการ"</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"ป้อนรหัส PIN ที่ต้องการ"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"ยืนยันรหัส PIN ที่ต้องการ"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"กำลังปลดล็อกซิมการ์ด…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"พิมพ์ PIN ซึ่งเป็นเลข 4 ถึง 8 หลัก"</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"รหัส PUK ต้องเป็นตัวเลขอย่างน้อย 8 หลัก"</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"ใส่รหัส PUK ที่ถูกต้องอีกครั้ง การพยายามซ้ำหลายครั้งจะทำให้ซิมการ์ดถูกปิดใช้งานอย่างถาวร"</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"รหัส PIN ไม่ตรง"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"ลองหลายรูปแบบมากเกินไป"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"คุณพิมพ์ PIN ไม่ถูกต้องไป <xliff:g id="NUMBER_0">%1$d</xliff:g> ครั้งแล้ว \n\nโปรดลองอีกครั้งใน <xliff:g id="NUMBER_1">%2$d</xliff:g> วินาที"</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"คุณพิมพ์รหัสผ่านไม่ถูกต้องไป <xliff:g id="NUMBER_0">%1$d</xliff:g> ครั้งแล้ว \n\nโปรดลองอีกครั้งใน <xliff:g id="NUMBER_1">%2$d</xliff:g> วินาที"</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"คุณวาดรูปแบบการปลดล็อกไม่ถูกต้องไป <xliff:g id="NUMBER_0">%1$d</xliff:g> ครั้งแล้ว \n\nโปรดลองอีกครั้งใน <xliff:g id="NUMBER_1">%2$d</xliff:g> วินาที"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"คุณปลดล็อกแท็บเล็ตไม่ถูกต้อง <xliff:g id="NUMBER_0">%1$d</xliff:g> ครั้ง หากพยายามไม่สำเร็จอีก <xliff:g id="NUMBER_1">%2$d</xliff:g> ครั้ง ระบบจะรีเซ็ตแท็บเล็ตเครื่องนี้ ซึ่งจะเป็นการลบข้อมูลทั้งหมดในเครื่อง"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"คุณปลดล็อกโทรศัพท์ไม่ถูกต้อง <xliff:g id="NUMBER_0">%1$d</xliff:g> ครั้ง หากพยายามไม่สำเร็จอีก <xliff:g id="NUMBER_1">%2$d</xliff:g> ครั้ง ระบบจะรีเซ็ตโทรศัพท์เครื่องนี้ ซึ่งจะเป็นการลบข้อมูลทั้งหมดในเครื่อง"</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"คุณปลดล็อกแท็บเล็ตไม่ถูกต้อง <xliff:g id="NUMBER">%d</xliff:g> ครั้ง ระบบจะรีเซ็ตแท็บเล็ตเครื่องนี้ ซึ่งจะเป็นการลบข้อมูลทั้งหมดในเครื่อง"</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"คุณปลดล็อกโทรศัพท์ไม่ถูกต้อง <xliff:g id="NUMBER">%d</xliff:g> ครั้ง ระบบจะรีเซ็ตโทรศัพท์เครื่องนี้ ซึ่งจะเป็นการลบข้อมูลทั้งหมดในเครื่อง"</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"คุณปลดล็อกแท็บเล็ตไม่ถูกต้อง <xliff:g id="NUMBER_0">%1$d</xliff:g> ครั้ง หากพยายามไม่สำเร็จอีก <xliff:g id="NUMBER_1">%2$d</xliff:g> ครั้ง ระบบจะนำผู้ใช้รายนี้ออก ซึ่งจะเป็นการลบข้อมูลผู้ใช้ทั้งหมด"</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"คุณปลดล็อกโทรศัพท์ไม่ถูกต้อง <xliff:g id="NUMBER_0">%1$d</xliff:g> ครั้ง หากพยายามไม่สำเร็จอีก <xliff:g id="NUMBER_1">%2$d</xliff:g> ครั้ง ระบบจะนำผู้ใช้รายนี้ออก ซึ่งจะเป็นการลบข้อมูลผู้ใช้ทั้งหมด"</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"คุณปลดล็อกแท็บเล็ตไม่ถูกต้อง <xliff:g id="NUMBER">%d</xliff:g> ครั้ง ระบบจะนำผู้ใช้รายนี้ออก ซึ่งจะเป็นการลบข้อมูลผู้ใช้ทั้งหมด"</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"คุณปลดล็อกโทรศัพท์ไม่ถูกต้อง <xliff:g id="NUMBER">%d</xliff:g> ครั้ง ระบบจะนำผู้ใช้รายนี้ออก ซึ่งจะเป็นการลบข้อมูลผู้ใช้ทั้งหมด"</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"คุณปลดล็อกแท็บเล็ตไม่ถูกต้อง <xliff:g id="NUMBER_0">%1$d</xliff:g> ครั้ง หากพยายามไม่สำเร็จอีก <xliff:g id="NUMBER_1">%2$d</xliff:g> ครั้ง ระบบจะนำโปรไฟล์งานออก ซึ่งจะเป็นการลบข้อมูลโปรไฟล์ทั้งหมด"</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"คุณปลดล็อกโทรศัพท์ไม่ถูกต้อง <xliff:g id="NUMBER_0">%1$d</xliff:g> ครั้ง หากพยายามไม่สำเร็จอีก <xliff:g id="NUMBER_1">%2$d</xliff:g> ครั้ง ระบบจะนำโปรไฟล์งานออก ซึ่งจะเป็นการลบข้อมูลโปรไฟล์ทั้งหมด"</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"คุณปลดล็อกแท็บเล็ตไม่ถูกต้อง <xliff:g id="NUMBER">%d</xliff:g> ครั้ง ระบบจะนำโปรไฟล์งานออก ซึ่งจะเป็นการลบข้อมูลโปรไฟล์ทั้งหมด"</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"คุณปลดล็อกโทรศัพท์ไม่ถูกต้อง <xliff:g id="NUMBER">%d</xliff:g> ครั้ง ระบบจะนำโปรไฟล์งานออก ซึ่งจะเป็นการลบข้อมูลโปรไฟล์ทั้งหมด"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"คุณวาดรูปแบบการปลดล็อกไม่ถูกต้อง <xliff:g id="NUMBER_0">%1$d</xliff:g> ครั้งแล้ว หากทำไม่สำเร็จอีก <xliff:g id="NUMBER_1">%2$d</xliff:g> ครั้ง ระบบจะขอให้คุณปลดล็อกแท็บเล็ตโดยใช้บัญชีอีเมล\n\n โปรดลองอีกครั้งใน <xliff:g id="NUMBER_2">%3$d</xliff:g> วินาที"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"คุณวาดรูปแบบการปลดล็อกไม่ถูกต้อง <xliff:g id="NUMBER_0">%1$d</xliff:g> ครั้งแล้ว หากทำไม่สำเร็จอีก <xliff:g id="NUMBER_1">%2$d</xliff:g> ครั้ง ระบบจะขอให้คุณปลดล็อกโทรศัพท์โดยใช้ับัญชีอีเมล\n\n โปรดลองอีกครั้งในอีก <xliff:g id="NUMBER_2">%3$d</xliff:g> วินาที"</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"รหัส PIN ของซิมไม่ถูกต้อง ตอนนี้คุณต้องติดต่อผู้ให้บริการเพื่อปลดล็อกอุปกรณ์ของคุณ"</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">รหัส PIN ของซิมไม่ถูกต้อง คุณพยายามได้อีก <xliff:g id="NUMBER_1">%d</xliff:g> ครั้ง</item>
-      <item quantity="one">รหัส PIN ของซิมไม่ถูกต้อง คุณพยายามได้อีก <xliff:g id="NUMBER_0">%d</xliff:g> ครั้งก่อนที่จะต้องติดต่อผู้ให้บริการเพื่อปลดล็อกอุปกรณ์ของคุณ</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"ซิมไม่สามารถใช้งานได้ ติดต่อผู้ให้บริการของคุณ"</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">รหัส PUK ของซิมไม่ถูกต้อง คุณพยายามได้อีก <xliff:g id="NUMBER_1">%d</xliff:g> ครั้งก่อนที่ซิมจะไม่สามารถใช้งานได้อย่างถาวร</item>
-      <item quantity="one">รหัส PUK ของซิมไม่ถูกต้อง คุณพยายามได้อีก <xliff:g id="NUMBER_0">%d</xliff:g> ครั้งก่อนที่ซิมจะไม่สามารถใช้งานได้อย่างถาวร</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"การปลดล็อกด้วย PIN ของซิมล้มเหลว!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"การปลดล็อกด้วย PUK ของซิมล้มเหลว!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"รหัสได้รับการยอมรับ!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"ไม่มีบริการ"</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"สลับวิธีการป้อนข้อมูล"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"โหมดบนเครื่องบิน"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"ต้องใช้รูปแบบหลังจากอุปกรณ์รีสตาร์ท"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"ต้องระบุ PIN หลังจากอุปกรณ์รีสตาร์ท"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"ต้องป้อนรหัสผ่านหลังจากอุปกรณ์รีสตาร์ท"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"ต้องใช้รูปแบบเพื่อความปลอดภัยเพิ่มเติม"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"ต้องระบุ PIN เพื่อความปลอดภัยเพิ่มเติม"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"ต้องป้อนรหัสผ่านเพื่อความปลอดภัยเพิ่มเติม"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"ต้องใช้รูปแบบเมื่อคุณเปลี่ยนโปรไฟล์"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"ต้องระบุ PIN เมื่อคุณเปลี่ยนโปรไฟล์"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"ต้องป้อนรหัสผ่านเมื่อคุณเปลี่ยนโปรไฟล์"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"ผู้ดูแลอุปกรณ์ล็อกอุปกรณ์ไว้"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"มีผู้ล็อกอุปกรณ์ด้วยตัวเอง"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">ไม่มีการปลดล็อกอุปกรณ์เป็นเวลา <xliff:g id="NUMBER_1">%d</xliff:g> ชั่วโมง ยืนยันรูปแบบ</item>
-      <item quantity="one">ไม่มีการปลดล็อกอุปกรณ์เป็นเวลา <xliff:g id="NUMBER_0">%d</xliff:g> ชั่วโมง ยืนยันรูปแบบ </item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">ไม่มีการปลดล็อกอุปกรณ์เป็นเวลา <xliff:g id="NUMBER_1">%d</xliff:g> ชั่วโมง ยืนยัน PIN</item>
-      <item quantity="one">ไม่มีการปลดล็อกอุปกรณ์เป็นเวลา <xliff:g id="NUMBER_0">%d</xliff:g> ชั่วโมง ยืนยัน PIN</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">ไม่มีการปลดล็อกอุปกรณ์เป็นเวลา <xliff:g id="NUMBER_1">%d</xliff:g> ชั่วโมง ยืนยันรหัสผ่าน</item>
-      <item quantity="one">ไม่มีการปลดล็อกอุปกรณ์เป็นเวลา <xliff:g id="NUMBER_0">%d</xliff:g> ชั่วโมง ยืนยันรหัสผ่าน</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"ไม่รู้จัก"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-tl/strings.xml b/packages/Keyguard/res/values-tl/strings.xml
deleted file mode 100644
index 73492e2..0000000
--- a/packages/Keyguard/res/values-tl/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Keyguard"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"I-type ang PIN code"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"I-type ang SIM PUK at bagong PIN code"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"PUK code ng SIM"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Bagong PIN code ng SIM"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Pindutin upang i-type password"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"I-type ang password upang i-unlock"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"I-type ang PIN upang i-unlock"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Maling PIN code."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Na-charge"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Nagtsa-charge"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Mabilis na nagcha-charge"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Dahan-dahang nagcha-charge"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Ikonekta ang iyong charger."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Pindutin ang Menu upang i-unlock."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Naka-lock ang network"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Walang SIM card"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Walang SIM card sa tablet."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Walang SIM card sa telepono."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Maglagay ng SIM card."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"Wala o hindi nababasa ang SIM card. Maglagay ng SIM card."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Hindi nagagamit na SIM card."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Ang iyong SIM card ay permanenteng naka-disable.\n Makipag-ugnay sa iyong wireless service provider para sa isa pang SIM card."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"Naka-lock ang SIM card."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"Naka-lock ang SIM card gamit ang PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Ina-unlock ang SIM card…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Lugar ng PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Lugar ng PIN ng SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Lugar ng PUK ng SIM"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Nakatakda ang susunod na alarm para sa <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"I-delete"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Nakalimutan ang Pattern"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Maling Pattern"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Maling Password"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Maling PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Subukang muli sa loob ng <xliff:g id="NUMBER">%d</xliff:g> (na) segundo."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Iguhit ang iyong pattern"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Ilagay ang SIM PIN"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Ilagay ang PIN ng SIM para sa \"<xliff:g id="CARRIER">%1$s</xliff:g>\""</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Ilagay ang PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Ilagay ang Password"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"Hindi na pinagana ang SIM ngayon. Maglagay ng PUK code upang magpatuloy. Makipag-ugnay sa carrier para sa mga detalye."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"Naka-disable na ngayon ang SIM na \"<xliff:g id="CARRIER">%1$s</xliff:g>.\" Ilagay ang PUK code upang magpatuloy. Makipag-ugnayan sa carrier upang malaman ang mga detalye."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Ilagay ang ninanais na PIN code"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Kumpirmahin ang ninanais na PIN code"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Ina-unlock ang SIM card…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Mag-type ng PIN na 4 hanggang 8 numero."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"Dapat ay 8 numero o higit pa ang PUK code."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Muling ilagay ang tamang PUK code. Permanenteng hindi pagaganahin ang SIM ng mga paulit-ulit na pagtatangka."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Hindi tumutugma ang mga PIN code"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Masyadong maraming pagtatangka sa pattern"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Na-type mo nang hindi tama ang iyong PIN nang <xliff:g id="NUMBER_0">%1$d</xliff:g> (na) beses. \n\nSubukang muli sa loob ng <xliff:g id="NUMBER_1">%2$d</xliff:g> (na) segundo."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Na-type mo nang hindi tama ang iyong password nang <xliff:g id="NUMBER_0">%1$d</xliff:g> (na) beses. \n\nSubukang muli sa loob ng <xliff:g id="NUMBER_1">%2$d</xliff:g> (na) segundo."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Naguhit mo nang hindi tama ang iyong pattern sa pag-unlock nang <xliff:g id="NUMBER_0">%1$d</xliff:g> (na) beses. \n\nSubukang muli sa loob ng <xliff:g id="NUMBER_1">%2$d</xliff:g> (na) segundo."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"<xliff:g id="NUMBER_0">%1$d</xliff:g> (na) beses mo nang sinubukang i-unlock ang tablet gamit ang maling password. Pagkatapos ng <xliff:g id="NUMBER_1">%2$d</xliff:g> pang hindi matagumpay na pagsubok, ire-reset ang tablet na ito, na magiging dahilan upang ma-delete ang lahat ng data nito."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"<xliff:g id="NUMBER_0">%1$d</xliff:g> (na) beses mo nang sinubukang i-unlock ang telepono gamit ang maling password. Pagkatapos ng <xliff:g id="NUMBER_1">%2$d</xliff:g> pang hindi matagumpay na pagsubok, ire-reset ang teleponong ito, na magiging dahilan upang ma-delete ang lahat ng data nito."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"<xliff:g id="NUMBER">%d</xliff:g> (na) beses mo nang sinubukang i-unlock ang tablet gamit ang maling password. Ire-reset ang tablet na ito, na magiging dahilan upang ma-delete ang lahat ng data nito."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"<xliff:g id="NUMBER">%d</xliff:g> (na) beses mo nang sinubukang i-unlock ang telepono gamit ang maling password. Ire-reset ang teleponong ito, na magiging dahilan upang ma-delete ang lahat ng data nito."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"<xliff:g id="NUMBER_0">%1$d</xliff:g> (na) beses mo nang sinubukang i-unlock ang tablet gamit ang maling password. Pagkatapos ng <xliff:g id="NUMBER_1">%2$d</xliff:g> pang hindi matagumpay na pagsubok, aalisin ang user na ito, na magiging dahilan upang ma-delete ang lahat ng data ng user."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"<xliff:g id="NUMBER_0">%1$d</xliff:g> (na) beses mo nang sinubukang i-unlock ang telepono gamit ang maling password. Pagkatapos ng <xliff:g id="NUMBER_1">%2$d</xliff:g> pang hindi matagumpay na pagsubok, aalisin ang user na ito, na magiging dahilan upang ma-delete ang lahat ng data ng user."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"<xliff:g id="NUMBER">%d</xliff:g> (na) beses mo nang sinubukang i-unlock ang tablet gamit ang maling password. Aalisin ang user na ito, na magiging dahilan upang ma-delete ang lahat ng data ng user."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"<xliff:g id="NUMBER">%d</xliff:g> (na) beses mo nang sinubukang i-unlock ang telepono gamit ang maling password. Aalisin ang user na ito, na magiging dahilan upang ma-delete ang lahat ng data ng user."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"<xliff:g id="NUMBER_0">%1$d</xliff:g> (na) beses mo nang sinubukang i-unlock ang tablet gamit ang maling password. Pagkatapos ng <xliff:g id="NUMBER_1">%2$d</xliff:g> pang hindi matagumpay na pagsubok, aalisin ang profile sa trabaho, na magiging dahilan upang ma-delete ang lahat ng data sa profile."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"<xliff:g id="NUMBER_0">%1$d</xliff:g> (na) beses mo nang sinubukang i-unlock ang telepono gamit ang maling passowrd. Pagkatapos ng <xliff:g id="NUMBER_1">%2$d</xliff:g> pang hindi matagumpay na pagsubok, aalisin ang profile sa trabaho, na magiging dahilan upang ma-delete ang lahat ng data sa profile."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"<xliff:g id="NUMBER">%d</xliff:g> (na) beses mo nang sinubukang i-unlock ang tablet gamit ang maling password. Aalisin ang profile sa trabaho, na magiging dahilan upang ma-delete ang lahat ng data sa profile."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"<xliff:g id="NUMBER">%d</xliff:g> (na) beses mo nang sinubukang i-unlock ang telepono gamit ang maling password. Aalisin ang profile sa trabaho, na magiging dahilan upang ma-delete ang lahat ng data sa profile."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Naguhit mo nang hindi tama ang iyong pattern sa pag-unlock nang <xliff:g id="NUMBER_0">%1$d</xliff:g> (na) beses. Pagkatapos ng <xliff:g id="NUMBER_1">%2$d</xliff:g> pang hindi matagumpay na pagtatangka, hihilingin sa iyong i-unlock ang tablet mo gamit ang isang email account.\n\n Subukang muli sa loob ng <xliff:g id="NUMBER_2">%3$d</xliff:g> (na) segundo."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Naguhit mo nang hindi tama ang iyong pattern sa pag-unlock nang <xliff:g id="NUMBER_0">%1$d</xliff:g> (na) beses. Pagkatapos ng <xliff:g id="NUMBER_1">%2$d</xliff:g> pang hindi matagumpay na pagtatangka, hihilingin sa iyong i-unlock ang telepono mo gamit ang isang email account.\n\n Subukang muli sa loob ng <xliff:g id="NUMBER_2">%3$d</xliff:g> (na) segundo."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Maling PIN code ng SIM, dapat ka nang makipag-ugnay sa iyong carrier upang i-unlock ang iyong device."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">Maling PIN code ng SIM, mayroon kang <xliff:g id="NUMBER_1">%d</xliff:g> natitirang pagsubok.</item>
-      <item quantity="other">Maling PIN code ng SIM, mayroon kang <xliff:g id="NUMBER_1">%d</xliff:g> na natitirang pagsubok.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"Hindi magagamit ang SIM. Makipag-ugnay sa iyong carrier."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">Maling PUK code ng SIM, mayroon kang <xliff:g id="NUMBER_1">%d</xliff:g> natitirang pagsubok bago tuluyang hindi magamit ang SIM.</item>
-      <item quantity="other">Maling PUK code ng SIM, mayroon kang <xliff:g id="NUMBER_1">%d</xliff:g> na natitirang pagsubok bago tuluyang hindi magamit ang SIM.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Nabigo ang operasyon ng SIM PIN!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Nabigo ang operasyon ng SIM PUK!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Tinanggap ang Code!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Walang serbisyo."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Magpalit ng pamamaraan ng pag-input"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Airplane mode"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Kinakailangan ang pattern pagkatapos mag-restart ng device"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Kinakailangan ang PIN pagkatapos mag-restart ng device"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Kinakailangan ang password pagkatapos mag-restart ng device"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Kinakailangan ang pattern para sa karagdagang seguridad"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Kinakailangan ang PIN para sa karagdagang seguridad"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Kinakailangan ang password para sa karagdagang seguridad"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Kinakailangan ang pattern kapag nagpalit ka ng profile"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Kinakailangan ang PIN kapag nagpalit ka ng profile"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Kinakailangan ang password kapag nagpalit ka ng profile"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Ang device ay na-lock na ng administrator ng device"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Manual na na-lock ang device"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">Hindi na-unlock ang device sa loob ng <xliff:g id="NUMBER_1">%d</xliff:g> oras.. Kumpirmahin ang pattern.</item>
-      <item quantity="other">Hindi na-unlock ang device sa loob ng <xliff:g id="NUMBER_1">%d</xliff:g> na oras. Kumpirmahin ang pattern.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">Hindi na-unlock ang device sa loob ng <xliff:g id="NUMBER_1">%d</xliff:g> oras. Kumpirmahin ang PIN.</item>
-      <item quantity="other">Hindi na-unlock ang device sa loob ng <xliff:g id="NUMBER_1">%d</xliff:g> na oras. Kumpirmahin ang PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">Hindi na-unlock ang device sa loob ng <xliff:g id="NUMBER_1">%d</xliff:g> oras. Kumpirmahin ang password.</item>
-      <item quantity="other">Hindi na-unlock ang device sa loob ng <xliff:g id="NUMBER_1">%d</xliff:g> na oras. Kumpirmahin ang password.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Hindi nakilala"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-tr/strings.xml b/packages/Keyguard/res/values-tr/strings.xml
deleted file mode 100644
index 3ef0705..0000000
--- a/packages/Keyguard/res/values-tr/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Keyguard"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"PIN kodunu yazın"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"SIM PUK kodunu ve yeni bir PIN kodu yazın."</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM PUK kodu"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Yeni SIM PIN kodu"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Şifre yazmak için dokunun"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Kilidi açmak için şifreyi yazın"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Kilidi açmak için PIN kodunu yazın"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Yanlış PIN kodu."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Şarj oldu"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Şarj oluyor"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Hızlı şarj oluyor"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Yavaş şarj oluyor"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Şarj cihazınızı takın."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Kilidi açmak için Menü\'ye basın."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Ağ kilitli"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"SIM kart yok"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Tablette SIM kart yok."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Telefonda SIM kart yok."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"SIM kart takın."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM kart yok veya okunamıyor. Bir SIM kart takın."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Kullanılamayan SIM kart"</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"SIM kartınız kalıcı olarak devre dışı bırakıldı.\n Başka bir SIM kart için kablosuz servis sağlayıcınıza başvurun."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM kart kilitli."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM kart PUK kilidi devrede."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"SIM kart kilidi açılıyor…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN alanı"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM PIN alanı"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM PUK alanı"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Sonraki alarm <xliff:g id="ALARM">%1$s</xliff:g> için ayarlandı"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Sil"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Giriş"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Deseni Unuttunuz mu?"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Yanlış Desen"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Yanlış Şifre"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Yanlış PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"<xliff:g id="NUMBER">%d</xliff:g> saniye içinde tekrar deneyin."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Deseninizi çizin"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"SIM PIN kodunu girin"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"\"<xliff:g id="CARRIER">%1$s</xliff:g>\" için SIM PIN\'ini girin"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"PIN\'i girin"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Şifreyi Girin"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM kart artık devre dışı bırakıldı. Devam etmek için PUK kodunu girin. Ayrıntılı bilgi için operatörle bağlantı kurun."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"\"<xliff:g id="CARRIER">%1$s</xliff:g>\" SIM artık devre dışı. Devam etmek için PUK kodunu girin. Ayrıntılar için operatör ile iletişim kurun."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"İstenen PIN kodunu girin"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"İstenen PIN kodunu onaylayın"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"SIM kart kilidi açılıyor…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"4-8 rakamdan oluşan bir PIN girin."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK kodu 8 veya daha çok basamaklı bir sayı olmalıdır."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Doğru PUK kodunu tekrar girin. Çok sayıda deneme yapılırsa SIM kart kalıcı olarak devre dışı bırakılır."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN kodları eşleşmiyor"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Çok fazla sayıda desen denemesi yapıldı"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"PIN kodunuzu <xliff:g id="NUMBER_0">%1$d</xliff:g> kez yanlış girdiniz. \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> saniye içinde tekrar deneyin."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Şifrenizi <xliff:g id="NUMBER_0">%1$d</xliff:g> kez yanlış yazdınız. \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> saniye içinde tekrar deneyin."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Kilit açma deseninizi <xliff:g id="NUMBER_0">%1$d</xliff:g> kez yanlış çizdiniz. \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> saniye içinde tekrar deneyin."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Tabletin kilidini <xliff:g id="NUMBER_0">%1$d</xliff:g> kez hatalı bir şekilde açmayı denediniz. <xliff:g id="NUMBER_1">%2$d</xliff:g> başarısız deneme daha yaparsanız bu tablet sıfırlanacak ve tüm verileri silinecektir."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Telefonun kilidini <xliff:g id="NUMBER_0">%1$d</xliff:g> kez hatalı bir şekilde açmayı denediniz. <xliff:g id="NUMBER_1">%2$d</xliff:g> başarısız deneme daha yaparsanız bu telefon sıfırlanacak ve tüm verileri silinecektir."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Tabletin kilidini <xliff:g id="NUMBER">%d</xliff:g> kez hatalı bir şekilde açmayı denediniz. Bu tablet sıfırlanacak ve tüm verileri silinecektir."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Telefonun kilidini <xliff:g id="NUMBER">%d</xliff:g> kez hatalı bir şekilde açmayı denediniz. Bu telefon sıfırlanacak ve tüm verileri silinecektir."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Tabletin kilidini <xliff:g id="NUMBER_0">%1$d</xliff:g> kez hatalı bir şekilde açmayı denediniz. <xliff:g id="NUMBER_1">%2$d</xliff:g> başarısız deneme daha yaparsanız bu kullanıcı kaldırılacak ve tüm kullanıcı verileri silinecektir."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Telefonun kilidini <xliff:g id="NUMBER_0">%1$d</xliff:g> kez hatalı bir şekilde açmayı denediniz. <xliff:g id="NUMBER_1">%2$d</xliff:g> başarısız deneme daha yaparsanız bu kullanıcı kaldırılacak ve tüm kullanıcı verileri silinecektir."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Tabletin kilidini <xliff:g id="NUMBER">%d</xliff:g> kez hatalı bir şekilde açmayı denediniz. Bu kullanıcı kaldırılacak ve tüm kullanıcı verileri silinecektir."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Telefonun kilidini <xliff:g id="NUMBER">%d</xliff:g> kez hatalı bir şekilde açmayı denediniz. Bu kullanıcı kaldırılacak ve tüm kullanıcı verileri silinecektir."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Tabletin kilidini <xliff:g id="NUMBER_0">%1$d</xliff:g> kez hatalı bir şekilde açmayı denediniz. <xliff:g id="NUMBER_1">%2$d</xliff:g> başarısız deneme daha yaparsanız iş profili kaldırılacak ve tüm profil verileri silinecektir."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Telefonun kilidini <xliff:g id="NUMBER_0">%1$d</xliff:g> kez hatalı bir şekilde açmayı denediniz. <xliff:g id="NUMBER_1">%2$d</xliff:g> başarısız deneme daha yaparsanız iş profili kaldırılacak ve tüm profil verileri silinecektir."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Tabletin kilidini <xliff:g id="NUMBER">%d</xliff:g> kez hatalı bir şekilde açmayı denediniz. İş profili kaldırılacak ve tüm profil verileri silinecektir."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Telefonun kilidini <xliff:g id="NUMBER">%d</xliff:g> kez hatalı bir şekilde açmayı denediniz. İş profili kaldırılacak ve tüm profil verileri silinecektir."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Kilit açma deseninizi <xliff:g id="NUMBER_0">%1$d</xliff:g> kez yanlış çizdiniz. <xliff:g id="NUMBER_1">%2$d</xliff:g> başarısız denemeden sonra, tabletinizi bir e-posta hesabı kullanarak açmanız istenir.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> saniye içinde tekrar deneyin."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Kilit açma deseninizi <xliff:g id="NUMBER_0">%1$d</xliff:g> kez yanlış çizdiniz. <xliff:g id="NUMBER_1">%2$d</xliff:g> başarısız denemeden sonra telefonunuzu bir e-posta hesabı kullanarak açmanız istenir.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> saniye içinde tekrar deneyin."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Yanlış SIM PIN kodu. Cihazınızın kilidini açmak için artık operatörünüzle bağlantı kurmanız gerekiyor."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">Yanlış SIM PIN kodu, <xliff:g id="NUMBER_1">%d</xliff:g> deneme hakkınız kaldı.</item>
-      <item quantity="one">Yanlış SIM PIN kodu. Cihazınızın kilidini açmak için operatörünüzle bağlantı kurmak zorunda kalmadan önce <xliff:g id="NUMBER_0">%d</xliff:g> deneme hakkınız kaldı.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM kullanılamaz. Operatörünüzle bağlantı kurun."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">Yanlış SIM PUK kodu, SIM kalıcı olarak kullanılmaz hale gelmeden önce <xliff:g id="NUMBER_1">%d</xliff:g> deneme hakkınız kaldı.</item>
-      <item quantity="one">Yanlış SIM PUK kodu, SIM kalıcı olarak kullanılmaz hale gelmeden önce <xliff:g id="NUMBER_0">%d</xliff:g> deneme hakkınız kaldı.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"SIM PIN işlemi başarısız oldu!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"SIM PUK işlemi başarısız oldu!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Kod Kabul Edildi!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Hizmet yok."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Giriş yöntemini değiştir"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Uçak modu"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Cihaz yeniden başladıktan sonra desen gerekir"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Cihaz yeniden başladıktan sonra PIN gerekir"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Cihaz yeniden başladıktan sonra şifre gerekir"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Ek güvenlik için desen gerekir"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Ek güvenlik için PIN gerekir"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Ek güvenlik için şifre gerekir"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Profil değiştirdiğinizde desen gerekir"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Profil değiştirdiğinizde PIN gerekir"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Profil değiştirdiğinizde şifre gerekir"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Cihaz yöneticisi cihazı kilitledi"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Cihazın manuel olarak kilitlendi"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Cihazın kilidi son <xliff:g id="NUMBER_1">%d</xliff:g> saattir açılmadı. Deseni doğrulayın.</item>
-      <item quantity="one">Cihazın kilidi son <xliff:g id="NUMBER_0">%d</xliff:g> saattir açılmadı. Deseni doğrulayın.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Cihazın kilidi son <xliff:g id="NUMBER_1">%d</xliff:g> saattir açılmadı. PIN\'i doğrulayın.</item>
-      <item quantity="one">Cihazın kilidi son <xliff:g id="NUMBER_0">%d</xliff:g> saattir açılmadı. PIN\'i doğrulayın.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Cihazın kilidi son <xliff:g id="NUMBER_1">%d</xliff:g> saattir açılmadı. Şifreyi doğrulayın.</item>
-      <item quantity="one">Cihazın kilidi son <xliff:g id="NUMBER_0">%d</xliff:g> saattir açılmadı. Şifreyi doğrulayın.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Tanınmadı"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-uk/strings.xml b/packages/Keyguard/res/values-uk/strings.xml
deleted file mode 100644
index a508689..0000000
--- a/packages/Keyguard/res/values-uk/strings.xml
+++ /dev/null
@@ -1,142 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Keyguard"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Введіть PIN-код"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Введіть PUK-код і новий PIN-код SIM-карти"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"PUK-код SIM-карти"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Новий PIN-код SIM-карти"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Торкніться, щоб ввести пароль"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Введіть пароль, щоб розблокувати"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Введіть PIN-код, щоб розблокувати"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Неправильний PIN-код."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Заряджено"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Заряджається"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Швидке заряджання"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Повільне заряджання"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Підключіть зарядний пристрій."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Натисніть Меню, щоб розблокувати."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Мережу заблоковано"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Відсутня SIM-карта"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"У планшетному ПК немає SIM-карти."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"У телефоні немає SIM-карти."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Вставте SIM-карту."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM-карта відсутня або не доступна для читання. Вставте SIM-карту."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Непридатна SIM-карта."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Вашу SIM-карту вимкнено назавжди.\n Зверніться до свого постачальника послуг бездротового зв’язку, щоб отримати іншу SIM-карту."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM-карту заблоковано."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM-карту заблоковано PUK-кодом."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Розблокування SIM-карти…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN-код"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"PIN-код SIM-карти"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"PUK-код SIM-карти"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Наступний сигнал: <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Delete"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Не пам’ятаю ключ"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Неправильний ключ"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Неправильний пароль"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Неправильний PIN-код"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Повторіть спробу через <xliff:g id="NUMBER">%d</xliff:g> с."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Намалюйте ключ"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Введіть PIN-код SIM-карти"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Введіть PIN-код SIM-карти для оператора \"<xliff:g id="CARRIER">%1$s</xliff:g>\""</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Введіть PIN-код"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Введіть пароль"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"Зараз SIM-карту вимкнено. Введіть PUK-код, щоб продовжити. Зв’яжіться з оператором, щоб дізнатися більше."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM-карту \"<xliff:g id="CARRIER">%1$s</xliff:g>\" вимкнено. Щоб продовжити, введіть PUK-код. Щоб дізнатися більше, зв’яжіться з оператором."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Введіть потрібний PIN-код"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Підтвердьте потрібний PIN-код"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Розблокування SIM-карти…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Введіть PIN-код із 4–8 цифр."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK-код має складатися зі щонайменше 8 цифр."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Повторно введіть правильний PUK-код. Численні спроби назавжди вимкнуть SIM-карту."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN-коди не збігаються"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Забагато спроб намалювати ключ"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"PIN-код неправильно введено стільки разів: <xliff:g id="NUMBER_0">%1$d</xliff:g>. \n\nПовторіть спробу через <xliff:g id="NUMBER_1">%2$d</xliff:g> с."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Пароль неправильно введено стільки разів: <xliff:g id="NUMBER_0">%1$d</xliff:g>. \n\nПовторіть спробу через <xliff:g id="NUMBER_1">%2$d</xliff:g> с."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Ключ розблокування неправильно намальовано стільки разів: <xliff:g id="NUMBER_0">%1$d</xliff:g>. \n\nПовторіть спробу через <xliff:g id="NUMBER_1">%2$d</xliff:g> с."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Кількість невдалих спроб розблокувати планшет: <xliff:g id="NUMBER_0">%1$d</xliff:g>. Залишилося спроб: <xliff:g id="NUMBER_1">%2$d</xliff:g> У разі невдачі буде скинуто налаштування планшета й видалено всі його дані."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Кількість невдалих спроб розблокувати телефон: <xliff:g id="NUMBER_0">%1$d</xliff:g>. Залишилося спроб: <xliff:g id="NUMBER_1">%2$d</xliff:g> У разі невдачі буде скинуто налаштування телефона й видалено всі його дані."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Кількість невдалих спроб розблокувати планшет: <xliff:g id="NUMBER">%d</xliff:g>. Буде скинуто налаштування цього планшета й видалено всі його дані."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Кількість невдалих спроб розблокувати телефон: <xliff:g id="NUMBER">%d</xliff:g>. Буде скинуто налаштування цього телефона й видалено всі його дані."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Кількість невдалих спроб розблокувати планшет: <xliff:g id="NUMBER_0">%1$d</xliff:g>. Залишилося спроб: <xliff:g id="NUMBER_1">%2$d</xliff:g>. У разі невдачі буде видалено цього користувача й усі його дані."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Кількість невдалих спроб розблокувати телефон: <xliff:g id="NUMBER_0">%1$d</xliff:g>. Залишилося спроб: <xliff:g id="NUMBER_1">%2$d</xliff:g>. У разі невдачі буде видалено цього користувача й усі його дані."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Кількість невдалих спроб розблокувати планшет: <xliff:g id="NUMBER">%d</xliff:g>. Буде видалено цього користувача й усі його дані."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Кількість невдалих спроб розблокувати телефон: <xliff:g id="NUMBER">%d</xliff:g>. Буде видалено цього користувача й усі його дані."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Кількість невдалих спроб розблокувати планшет: <xliff:g id="NUMBER_0">%1$d</xliff:g>. Залишилося спроб: <xliff:g id="NUMBER_1">%2$d</xliff:g>. У разі невдачі буде видалено робочий профіль і всі його дані."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Кількість невдалих спроб розблокувати телефон: <xliff:g id="NUMBER_0">%1$d</xliff:g>. Залишилося спроб: <xliff:g id="NUMBER_1">%2$d</xliff:g>. У разі невдачі буде видалено робочий профіль і всі його дані."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Кількість невдалих спроб розблокувати планшет: <xliff:g id="NUMBER">%d</xliff:g>. Буде видалено робочий профіль і всі його дані."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Кількість невдалих спроб розблокувати телефон: <xliff:g id="NUMBER">%d</xliff:g>. Буде видалено робочий профіль і всі його дані."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Ключ розблокування неправильно намальовано стільки разів: <xliff:g id="NUMBER_0">%1$d</xliff:g>. У вас є ще стільки спроб: <xliff:g id="NUMBER_1">%2$d</xliff:g>. У разі невдачі з’явиться запит розблокувати планшетний ПК за допомогою облікового запису електронної пошти.\n\n Повторіть спробу через <xliff:g id="NUMBER_2">%3$d</xliff:g> сек."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Ключ розблокування неправильно намальовано стільки разів: <xliff:g id="NUMBER_0">%1$d</xliff:g>. У вас є ще стільки спроб: <xliff:g id="NUMBER_1">%2$d</xliff:g>. У разі невдачі з’явиться запит розблокувати телефон за допомогою облікового запису електронної пошти.\n\n Повторіть спробу через <xliff:g id="NUMBER_2">%3$d</xliff:g> сек."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Неправильний PIN-код SIM-карти. Зв’яжіться зі своїм оператором, щоб розблокувати пристрій."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">Неправильний PIN-код SIM-карти. У вас залишилась <xliff:g id="NUMBER_1">%d</xliff:g> спроба.</item>
-      <item quantity="few">Неправильний PIN-код SIM-карти. У вас залишилося <xliff:g id="NUMBER_1">%d</xliff:g> спроби.</item>
-      <item quantity="many">Неправильний PIN-код SIM-карти. У вас залишилося <xliff:g id="NUMBER_1">%d</xliff:g> спроб.</item>
-      <item quantity="other">Неправильний PIN-код SIM-карти. У вас залишилося <xliff:g id="NUMBER_1">%d</xliff:g> спроби.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM-карту заблоковано. Зв’яжіться з оператором."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">Неправильний PUK-код SIM-карти. У вас залишилася <xliff:g id="NUMBER_1">%d</xliff:g> спроба. Після цього SIM-карту буде назавжди заблоковано.</item>
-      <item quantity="few">Неправильний PUK-код SIM-карти. У вас залишилося <xliff:g id="NUMBER_1">%d</xliff:g> спроби. Після цього SIM-карту буде назавжди заблоковано.</item>
-      <item quantity="many">Неправильний PUK-код SIM-карти. У вас залишилося <xliff:g id="NUMBER_1">%d</xliff:g> спроб. Після цього SIM-карту буде назавжди заблоковано.</item>
-      <item quantity="other">Неправильний PUK-код SIM-карти. У вас залишилося <xliff:g id="NUMBER_1">%d</xliff:g> спроби. Після цього SIM-карту буде назавжди заблоковано.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Помилка введення PIN-коду SIM-карти."</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Помилка введення PUK-коду SIM-карти."</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Код прийнято."</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Зв’язку немає."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Змінити метод введення"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Режим польоту"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Після перезавантаження пристрою потрібно ввести ключ"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Після перезавантаження пристрою потрібно ввести PIN-код"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Після перезавантаження пристрою потрібно ввести пароль"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Для додаткового захисту потрібно ввести ключ"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Для додаткового захисту потрібно ввести PIN-код"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Для додаткового захисту потрібно ввести пароль"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Під час переходу в інший профіль потрібно ввести ключ"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Під час переходу в інший профіль потрібно ввести PIN-код"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Під час переходу в інший профіль потрібно ввести пароль"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Адміністратор заблокував пристрій"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Пристрій заблоковано вручну"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">Ви не розблоковували пристрій <xliff:g id="NUMBER_1">%d</xliff:g> годину. Підтвердьте ключ.</item>
-      <item quantity="few">Ви не розблоковували пристрій <xliff:g id="NUMBER_1">%d</xliff:g> години. Підтвердьте ключ.</item>
-      <item quantity="many">Ви не розблоковували пристрій <xliff:g id="NUMBER_1">%d</xliff:g> годин. Підтвердьте ключ.</item>
-      <item quantity="other">Ви не розблоковували пристрій <xliff:g id="NUMBER_1">%d</xliff:g> години. Підтвердьте ключ.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">Ви не розблоковували пристрій <xliff:g id="NUMBER_1">%d</xliff:g> годину. Підтвердьте PIN-код.</item>
-      <item quantity="few">Ви не розблоковували пристрій <xliff:g id="NUMBER_1">%d</xliff:g> години. Підтвердьте PIN-код.</item>
-      <item quantity="many">Ви не розблоковували пристрій <xliff:g id="NUMBER_1">%d</xliff:g> годин. Підтвердьте PIN-код.</item>
-      <item quantity="other">Ви не розблоковували пристрій <xliff:g id="NUMBER_1">%d</xliff:g> години. Підтвердьте PIN-код.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">Ви не розблоковували пристрій <xliff:g id="NUMBER_1">%d</xliff:g> годину. Підтвердьте пароль.</item>
-      <item quantity="few">Ви не розблоковували пристрій <xliff:g id="NUMBER_1">%d</xliff:g> години. Підтвердьте пароль.</item>
-      <item quantity="many">Ви не розблоковували пристрій <xliff:g id="NUMBER_1">%d</xliff:g> годин. Підтвердьте пароль.</item>
-      <item quantity="other">Ви не розблоковували пристрій <xliff:g id="NUMBER_1">%d</xliff:g> години. Підтвердьте пароль.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Не розпізнано"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-ur/strings.xml b/packages/Keyguard/res/values-ur/strings.xml
deleted file mode 100644
index 1070d58..0000000
--- a/packages/Keyguard/res/values-ur/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"کی گارڈ"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"‏PIN کوڈ ٹائپ کریں"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"‏SIM PUK اور نیا PIN کوڈ ٹائپ کریں"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"‏SIM PUK کوڈ"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"‏نیا SIM PIN کوڈ"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"پاس ورڈ ٹائپ کرنے کیلئے ٹچ کریں"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"غیر مقفل کرنے کیلئے پاس ورڈ ٹائپ کریں"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"‏غیر مقفل کرنے کیلئے PIN ٹائپ کریں"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"‏غلط PIN کوڈ۔"</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"چارج ہو گیا"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"چارج ہو رہی ہے"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"تیزی سے چارج ہو رہا ہے"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"آہستہ چارج ہو رہا ہے"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"اپنا چارجر مربوط کریں۔"</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"غیر مقفل کرنے کیلئے مینو کو دبائیں۔"</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"نیٹ ورک مقفل ہو گیا"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"‏کوئی SIM کارڈ نہیں ہے"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"‏ٹیبلیٹ میں کوئی SIM کارڈ نہیں ہے۔"</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"‏فون میں کوئی SIM کارڈ نہيں ہے۔"</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"‏ایک SIM کارڈ داخل کریں۔"</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"‏SIM کارڈ غائب ہے یا پڑھنے لائق نہیں ہے۔ ایک SIM کارڈ داخل کریں۔"</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"‏ناقابل استعمال SIM کارڈ۔"</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"‏آپ کا SIM کارڈ مستقل طور پر غیر فعال کر دیا گیا ہے۔\n کسی دوسرے SIM کارڈ کیلئے اپنے وائرلیس سروس فراہم کنندہ سے رابطہ کریں۔"</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"‏SIM کارڈ مقفل ہے۔"</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"‏SIM کارڈ PUK-مقفل ہے۔"</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"‏SIM کارڈ غیر مقفل کیا جا رہا ہے…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"‏PIN کا علاقہ"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"‏SIM PIN کا علاقہ"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"‏SIM PUK کا علاقہ"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"اگلا الارم <xliff:g id="ALARM">%1$s</xliff:g> کیلئے سیٹ ہے"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"حذف کریں"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"پیٹرن بھول گئے"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"غلط پیٹرن"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"غلط پاس ورڈ"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"‏غلط PIN"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"<xliff:g id="NUMBER">%d</xliff:g> سیکنڈ میں دوبارہ کوشش کریں۔"</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"اپنا پیٹرن ڈرا کریں"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"‏SIM PIN درج کریں"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"‏\"<xliff:g id="CARRIER">%1$s</xliff:g>\" کیلئے SIM PIN درج کریں"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"‏PIN درج کریں"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"پاس ورڈ درج کریں"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"‏SIM اب غیر فعال ہوگیا ہے۔ جاری رکھنے کیلئے PUK کوڈ درج کریں۔ تفصیلات کیلئے کیریئر سے رابطہ کریں۔"</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"‏SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\"‎ اب غیر فعال ہے۔ جاری رکھنے کیلئے PUK کوڈ درج کریں۔ تفصیلات کیلئے کیریئر سے رابطہ کریں۔"</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"‏پسندیدہ PIN کوڈ درج کریں"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"‏پسندیدہ PIN کوڈ کی توثیق کریں"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"‏SIM کارڈ غیر مقفل کیا جا رہا ہے…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"‏ایسا PIN ٹائپ کریں جو 4 تا 8 نمبرز کا ہو۔"</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"‏PUK کوڈ 8 یا زیادہ نمبرز کا ہونا چاہیے۔"</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"‏صحیح PUK کوڈ دوبارہ درج کریں۔ بار بار کی کوششیں SIM کو مستقل طور پر غیر فعال کر دیں گی۔"</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"‏PIN کوڈز مماثل نہیں ہیں"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"پیٹرن کی بہت ساری کوششیں"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"‏آپ نے <xliff:g id="NUMBER_0">%1$d</xliff:g> بار اپنا PIN غلط طریقے سے ٹائپ کیا ہے۔ \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> سیکنڈ میں دوبارہ کوشش کریں۔"</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"آپ نے اپنا پاس ورڈ <xliff:g id="NUMBER_0">%1$d</xliff:g> بار غلط طریقے سے ٹائپ کیا ہے۔ \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> سیکنڈ میں دوبارہ کوشش کریں۔"</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"آپ نے اپنا غیر مقفل کرنے کا پیٹرن <xliff:g id="NUMBER_0">%1$d</xliff:g> بار غلط طریقے سے ڈرا کیا ہے۔ \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> سیکنڈ میں دوبارہ کوشش کریں۔"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"آپ نے ٹیبلیٹ کو غیر مقفل کرنے کیلئے <xliff:g id="NUMBER_0">%1$d</xliff:g> بار غلط طریقے سے کوشش کی ہے۔ <xliff:g id="NUMBER_1">%2$d</xliff:g> مزید ناکام کوششوں کے بعد، اس ٹیبلیٹ کو دوبارہ ترتیب دے دیا جائے گا، جس سے اس کا سبھی ڈیٹا حذف ہو جائے گا۔"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"آپ نے فون کو غیر مقفل کرنے کیلئے <xliff:g id="NUMBER_0">%1$d</xliff:g> بار غلط طریقے سے کوشش کی ہے۔ <xliff:g id="NUMBER_1">%2$d</xliff:g> مزید ناکام کوششوں کے بعد، اس فون کو دوبارہ ترتیب دے دیا جائے گا، جس سے اس کا سبھی ڈیٹا حذف ہو جائے گا۔"</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"آپ نے ٹیبلیٹ کو غیر مقفل کرنے کیلئے <xliff:g id="NUMBER">%d</xliff:g> بار غلط طریقے سے کوشش کی ہے۔ اس ٹیبلیٹ کو دوبارہ ترتیب دے دیا جائے گا، جس سے اس کا سبھی ڈیٹا حذف ہو جائے گا۔"</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"آپ نے فون کو غیر مقفل کرنے کیلئے <xliff:g id="NUMBER">%d</xliff:g> بار غلط طریقے سے کوشش کی ہے۔ اس فون کو دوبارہ ترتیب دے دیا جائے گا، جس سے اس کا سبھی ڈیٹا حذف ہو جائے گا۔"</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"آپ نے ٹیبلیٹ کو غیر مقفل کرنے کیلئے <xliff:g id="NUMBER_0">%1$d</xliff:g> بار غلط طریقے سے کوشش کی ہے۔ <xliff:g id="NUMBER_1">%2$d</xliff:g> مزید ناکام کوششوں کے بعد، اس صارف کو ہٹا دیا جائے گا، جس سے صارف کا سبھی ڈیٹا حذف ہو جائے گا۔"</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"آپ نے فون کو غیر مقفل کرنے کیلئے <xliff:g id="NUMBER_0">%1$d</xliff:g> بار غلط طریقے سے کوشش کی ہے۔ <xliff:g id="NUMBER_1">%2$d</xliff:g> مزید ناکام کوششوں کے بعد، اس صارف کو ہٹا دیا جائے گا، جس سے صارف کا سبھی ڈیٹا حذف ہو جائے گا۔"</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"آپ نے ٹیبلیٹ کو غیر مقفل کرنے کیلئے <xliff:g id="NUMBER">%d</xliff:g> بار غلط طریقے سے کوشش کی ہے۔ اس صارف کو ہٹا دیا جائے گا، جس سے صارف کا سبھی ڈیٹا حذف ہو جائے گا۔"</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"آپ نے فون کو غیر مقفل کرنے کیلئے <xliff:g id="NUMBER">%d</xliff:g> بار غلط طریقے سے کوشش کی ہے۔ اس صارف کو ہٹا دیا جائے گا، جس سے صارف کا سبھی ڈیٹا حذف ہو جائے گا۔"</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"آپ نے ٹیبلیٹ کو غیر مقفل کرنے کیلئے <xliff:g id="NUMBER_0">%1$d</xliff:g> بار غلط طریقے سے کوشش کی ہے۔ <xliff:g id="NUMBER_1">%2$d</xliff:g> مزید ناکام کوششوں کے بعد، دفتری پروفائل ہٹا دیا جائے گا، جس سے پروفائل کا سبھی ڈیٹا حذف ہو جائے گا۔"</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"آپ نے فون کو غیر مقفل کرنے کیلئے <xliff:g id="NUMBER_0">%1$d</xliff:g> بار غلط طریقے سے کوشش کی ہے۔ <xliff:g id="NUMBER_1">%2$d</xliff:g> مزید ناکام کوششوں کے بعد، دفتری پروفائل ہٹا دیا جائے گا، جس سے پروفائل کا سبھی ڈیٹا حذف ہو جائے گا۔"</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"آپ نے ٹیبلیٹ کو غیر مقفل کرنے کیلئے <xliff:g id="NUMBER">%d</xliff:g> بار غلط طریقے سے کوشش کی ہے۔ دفتری پروفائل ہٹا دیا جائے گا، جس سے پروفائل کا سبھی ڈیٹا حذف ہو جائے گا۔"</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"آپ نے فون کو غیر مقفل کرنے کیلئے <xliff:g id="NUMBER">%d</xliff:g> بار غلط طریقے سے کوشش کی ہے۔ دفتری پروفائل ہٹا دیا جائے گا، جس سے پروفائل کا سبھی ڈیٹا حذف ہو جائے گا۔"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"آپ نے اپنا غیر مقفل کرنے کا پیٹرن <xliff:g id="NUMBER_0">%1$d</xliff:g> بار غلط طریقے سے ڈرا کیا ہے۔ <xliff:g id="NUMBER_1">%2$d</xliff:g> مزید ناکام کوششوں کے بعد، آپ سے ایک ای میل اکاؤنٹ استعمال کرکے اپنا ٹیبلیٹ غیر مقفل کرنے کو کہا جائے گا۔\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> سیکنڈ میں دوبارہ کوشش کریں۔"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"آپ نے اپنا غیر مقفل کرنے کا پیٹرن <xliff:g id="NUMBER_0">%1$d</xliff:g> بار غلط طریقے سے ڈرا کیا ہے۔ <xliff:g id="NUMBER_1">%2$d</xliff:g> مزید ناکام کوششوں کے بعد، آپ سے ایک ای میل اکاؤنٹ استعمال کرکے اپنا فون غیر مقفل کرنے کو کہا جائے گا۔\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> سیکنڈ میں دوبارہ کوشش کریں۔"</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"‏غلط SIM PIN کوڈ اب آپ کو اپنا آلہ غیر مقفل کرنے کیلئے لازمی طور پر اپنے کیریئر سے رابطہ کرنا چاہئے۔"</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">‏غلط SIM PIN کوڈ، آپ کے پاس <xliff:g id="NUMBER_1">%d</xliff:g> کوششیں بچی ہیں۔</item>
-      <item quantity="one">‏غلط SIM PIN کوڈ، آپ کے پاس <xliff:g id="NUMBER_0">%d</xliff:g> کوشش بچی ہے، اس کے بعد آپ کو اپنا آلہ غیر مقفل کرنے کیلئے اپنے کریئر سے رابطہ کرنا ہوگا۔</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"‏SIM ناقابل استعمال ہے۔ اپنے کیریئر رابطہ کریں۔"</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">‏غلط SIM PUK کوڈ، آپ کے پاس <xliff:g id="NUMBER_1">%d</xliff:g> کوششیں بچی ہیں، اس کے بعد SIM مستقل طور پر ناقابل استعمال ہو جائے گا۔</item>
-      <item quantity="one">‏SIM کا غلط PUK کوڈ، آپ ک پاس <xliff:g id="NUMBER_0">%d</xliff:g> کوشش بچی ہے، اس کے بعد SIM مستقل طور پر ناقابل استعمال ہو جائے گا۔</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"‏SIM PIN کارروائی ناکام ہو گئی!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"‏SIM PUK کارروائی ناکام ہو گئی!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"کوڈ قبول کر لیا گیا!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"کوئی سروس نہیں ہے۔"</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"اندراج کا طریقہ سوئچ کریں"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"ہوائی جہاز وضع"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"آلہ دوبارہ چالو ہونے کے بعد پیٹرن درکار ہوتا ہے"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"‏آلہ دوبارہ چالو ہونے کے بعد PIN درکار ہوتا ہے"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"آلہ دوبارہ چالو ہونے کے بعد پاس ورڈ درکار ہوتا ہے"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"اضافی سیکیورٹی کیلئے پیٹرن درکار ہے"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"‏اضافی سیکیورٹی کیلئے PIN درکار ہے"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"اضافی سیکیورٹی کیلئے پاسورڈ درکار ہے"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"جب آپ پروفائل سوئچ کرتے ہیں تو پیٹرن درکار ہوتا ہے"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"‏جب آپ پروفائل سوئچ کرتے ہیں تو PIN درکار ہوتا ہے"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"جب آپ پروفائل سوئچ کرتے ہیں تو پاسورڈ درکار ہوتا ہے"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"آلہ کے منتظم نے آلہ مقفل کر دیا"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"آلہ کو دستی طور پر مقفل کیا گیا تھا"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">آلہ <xliff:g id="NUMBER_1">%d</xliff:g> گھنٹے سے غیر مقفل نہیں کیا گیا۔ پیٹرن کی تصدیق کریں۔</item>
-      <item quantity="one">آلہ <xliff:g id="NUMBER_0">%d</xliff:g> گھنٹے سے غیر مقفل نہیں کیا گیا۔ پیٹرن کی تصدیق کریں۔</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">‏آلہ <xliff:g id="NUMBER_1">%d</xliff:g> گھنٹے سے غیر مقفل نہیں کیا گیا۔ PIN کی تصدیق کریں۔</item>
-      <item quantity="one">‏آلہ <xliff:g id="NUMBER_0">%d</xliff:g> گھنٹے سے غیر مقفل نہیں کیا گیا۔ PIN کی تصدیق کریں۔</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">آلہ <xliff:g id="NUMBER_1">%d</xliff:g> گھنٹے سے غیر مقفل نہیں کیا گیا۔ پاسورڈ کی تصدیق کریں۔</item>
-      <item quantity="one">آلہ <xliff:g id="NUMBER_0">%d</xliff:g> گھنٹے سے غیر مقفل نہیں کیا گیا۔ پاسورڈ کی تصدیق کریں۔</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"تسلیم شدہ نہیں ہے"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-uz/strings.xml b/packages/Keyguard/res/values-uz/strings.xml
deleted file mode 100644
index a9df331..0000000
--- a/packages/Keyguard/res/values-uz/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Keyguard"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"PIN-kodni kiriting"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"SIM karta PUK kodi va yangi PIN kodni tering"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM karta PUK kodi"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Yangi SIM karta PIN kodi"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Parolni kiritish uchun bosing"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Qulfni ochish uchun parolni kiriting"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Qulfni ochish uchun PIN-kodni kiriting"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Noto‘g‘ri PIN-kod."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Batareya quvvati to‘ldi"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Quvvat olmoqda"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Tezkor quvvat olmoqda"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Sekin quvvat olmoqda"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Zaryadlagichni ulang."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Qulfni ochish uchun \"Menyu\"ga bosing."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Tarmoq qulflangan"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"SIM karta yo‘q"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"SIM karta yo‘q."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"SIM karta yo‘q."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Telefonga SIM kartani joylashtiring."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM karta qo‘yilmagan yoki o‘qib bo‘lmayapti. SIM kartani joylashtiring."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"SIM kartadan foydalanib bo‘lmaydi."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"SIM kartangiz butunlay o‘chirilgan.\n Boshqa SIM karta olish uchun aloqa operatori bilan bog‘laning."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM karta qulflangan."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM karta PUK kod bilan qulflangan."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"SIM karta qulfi ochilmoqda…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN-kod maydoni"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM karta PIN kodi maydoni"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM karta PUK kodi maydoni"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Signal <xliff:g id="ALARM">%1$s</xliff:g> da chalinadi."</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"O‘chirish"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Kiritish"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Grafik kalit esimdan chiqdi"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Grafik kalit noto‘g‘ri"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Parol noto‘g‘ri"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"PIN-kod noto‘g‘ri"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"<xliff:g id="NUMBER">%d</xliff:g> soniyadan so‘ng qayta urinib ko‘ring."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Chizmali parolni chizing"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"SIM kartaning PIN kodini kiriting"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"“<xliff:g id="CARRIER">%1$s</xliff:g>” SIM kartasi uchun PIN kodni kiriting"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"PIN kodni tering"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Parol kiriting"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM karta hozir o‘chirilgan. Davom etish uchun PUK kodni kiriting. To‘liqroq ma’lumot olish uchun tarmoq operatori bilan bog‘laning."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"“<xliff:g id="CARRIER">%1$s</xliff:g>” SIM kartasi o‘chirib qo‘yildi. Davom etish uchun PUK kodni kiriting. Tafsilotlar uchun aloqa operatoringizga murojaat qiling."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"So‘ralgan PIN kodni kiriting"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"So‘ralgan PIN kodni tasdiqlang"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"SIM karta qulfi ochilmoqda…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"4 tadan 8 ta raqamgacha bo‘lgan PIN kodni kiriting."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK kod kamida 8 ta raqam bo‘lishi shart."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"To‘g‘ri PUK kodni qayta kiriting. Qayta-qayta urinishlar SIM kartani butunlay o‘chirib qo‘yadi."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN-kod mos kelmadi"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Grafik kalit juda ko‘p marta chizildi"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Siz PIN-kodni <xliff:g id="NUMBER_0">%1$d</xliff:g> marta noto‘g‘ri kiritdingiz. \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> soniyadan so‘ng qayta urinib ko‘ring."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Siz parolni <xliff:g id="NUMBER_0">%1$d</xliff:g> marta noto‘g‘ri kiritdingiz. \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> soniyadan so‘ng qayta urinib ko‘ring."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Siz grafik kalitni <xliff:g id="NUMBER_0">%1$d</xliff:g> marta noto‘g‘ri kiritdingiz. \n\n<xliff:g id="NUMBER_1">%2$d</xliff:g> soniyadan so‘ng qayta urinib ko‘ring."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Siz planshetni qulfdan chiqarish uchun <xliff:g id="NUMBER_0">%1$d</xliff:g> marta noto‘g‘ri urinish qildingiz. Agar yana <xliff:g id="NUMBER_1">%2$d</xliff:g> marta muvaffaqiyatsiz urinish qilsangiz, ushbu planshetda zavod sozlamalari qayta tiklanadi va undagi barcha ma’lumotlar ham o‘chib ketadi."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Siz telefonni qulfdan chiqarish uchun <xliff:g id="NUMBER_0">%1$d</xliff:g> marta noto‘g‘ri urinish qildingiz. Agar yana <xliff:g id="NUMBER_1">%2$d</xliff:g> marta muvaffaqiyatsiz urinish qilsangiz, ushbu telefonda zavod sozlamalari qayta tiklanadi va undagi barcha ma’lumotlar ham o‘chib ketadi."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Siz planshetni qulfdan chiqarish uchun <xliff:g id="NUMBER">%d</xliff:g> marta noto‘g‘ri urinish qildingiz. Endi, ushbu planshetda zavod sozlamalari qayta tiklanadi va undagi barcha ma’lumotlar ham o‘chib ketadi."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Siz telefonni qulfdan chiqarish uchun <xliff:g id="NUMBER">%d</xliff:g> marta noto‘g‘ri urinish qildingiz. Endi, ushbu telefonda zavod sozlamalari qayta tiklanadi va undagi barcha ma’lumotlar ham o‘chib ketadi."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Siz planshetni qulfdan chiqarish uchun <xliff:g id="NUMBER_0">%1$d</xliff:g> marta noto‘g‘ri urinish qildingiz. Agar yana <xliff:g id="NUMBER_1">%2$d</xliff:g> marta muvaffaqiyatsiz urinish qilsangiz, ushbu foydalanuvchi o‘chirib tashlanadi va undagi barcha foydalanuvchi ma’lumotlari ham o‘chib ketadi."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Siz telefonni qulfdan chiqarish uchun <xliff:g id="NUMBER_0">%1$d</xliff:g> marta noto‘g‘ri urinish qildingiz. Agar yana <xliff:g id="NUMBER_1">%2$d</xliff:g> marta muvaffaqiyatsiz urinish qilsangiz, ushbu foydalanuvchi o‘chirib tashlanadi va undagi barcha foydalanuvchi ma’lumotlari ham o‘chib ketadi."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Siz planshetni qulfdan chiqarish uchun <xliff:g id="NUMBER">%d</xliff:g> marta noto‘g‘ri urinish qildingiz. Endi, ushbu foydalanuvchi o‘chirib tashlanadi va undagi barcha foydalanuvchi ma’lumotlari ham o‘chib ketadi."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Siz telefonni qulfdan chiqarish uchun <xliff:g id="NUMBER">%d</xliff:g> marta noto‘g‘ri urinish qildingiz. Endi, ushbu foydalanuvchi o‘chirib tashlanadi va undagi barcha foydalanuvchi ma’lumotlari ham o‘chib ketadi."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Siz planshetni qulfdan chiqarish uchun <xliff:g id="NUMBER_0">%1$d</xliff:g> marta noto‘g‘ri urinish qildingiz. Agar yana <xliff:g id="NUMBER_1">%2$d</xliff:g> marta muvaffaqiyatsiz urinish qilsangiz, ishchi profil o‘chirib tashlanadi va undagi barcha profil ma’lumotlari ham o‘chib ketadi."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Siz telefonni qulfdan chiqarish uchun <xliff:g id="NUMBER_0">%1$d</xliff:g> marta noto‘g‘ri urinish qildingiz. Agar yana <xliff:g id="NUMBER_1">%2$d</xliff:g> marta muvaffaqiyatsiz urinish qilsangiz, ishchi profil o‘chirib tashlanadi va undagi barcha profil ma’lumotlari ham o‘chib ketadi."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Siz planshetni qulfdan chiqarish uchun <xliff:g id="NUMBER">%d</xliff:g> marta noto‘g‘ri urinish qildingiz. Endi, ishchi profil o‘chirib tashlanadi va undagi barcha ma’lumotlar ham o‘chib ketadi."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Siz telefonni qulfdan chiqarish uchun <xliff:g id="NUMBER">%d</xliff:g> marta noto‘g‘ri urinish qildingiz. Endi, ishchi profil o‘chirib tashlanadi va undagi barcha ma’lumotlar ham o‘chib ketadi."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Siz grafik kalitni  <xliff:g id="NUMBER_0">%1$d</xliff:g> marta noto‘g‘ri kiritdingiz. <xliff:g id="NUMBER_1">%2$d</xliff:g> marta muvaffaqiyatsiz urinishdan so‘ng, sizdan e-pochtangizdan foydalanib, planshet qulfini ochishingiz so‘raladi.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> soniyadan so‘ng yana urinib ko‘ring."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Siz grafik kalitni <xliff:g id="NUMBER_0">%1$d</xliff:g> marta noto‘g‘ri chizdingiz. <xliff:g id="NUMBER_1">%2$d</xliff:g> marta muvaffaqiyatsiz urinishdan so‘ng, sizdan e-pochtangizdan foydalanib, telefon qulfini ochishingiz so‘raladi.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> soniyadan so‘ng yana urinib ko‘ring."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"SIM karta PIN kodi noto‘g‘ri. Qurilma qulfini ochish uchun aloqa operatoringiz bilan bog‘laning."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">SIM kartaning PIN kodi noto‘g‘ri. Sizda yana <xliff:g id="NUMBER_1">%d</xliff:g> ta urinish qoldi.</item>
-      <item quantity="one">SIM kartaning PIN kodi noto‘g‘ri. Qurilmani qulfdan chiqarish uchun sizda yana <xliff:g id="NUMBER_0">%d</xliff:g> ta urinish qoldi.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM kartadan foydalanib bo‘lmaydi. Aloqa operatoringiz bilan bog‘laning."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">SIM kartaning PUK kodi noto‘g‘ri kiritildi. Yana <xliff:g id="NUMBER_1">%d</xliff:g> ta muvaffaqiyatsiz urinishdan so‘ng SIM karta butunlay ishdan chiqadi.</item>
-      <item quantity="one">SIM kartaning PUK kodi noto‘g‘ri kiritildi. Yana <xliff:g id="NUMBER_0">%d</xliff:g> ta muvaffaqiyatsiz urinishdan so‘ng SIM karta butunlay ishdan chiqadi.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"SIM karta PIN jarayoni amalga oshmadi!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"SIM karta PUK jarayoni amalga oshmadi!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Kod qabul qilindi!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Aloqa yo‘q."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Matn kiritish usulini o‘zgartirish"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Parvoz rejimi"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Qurilma o‘chirib yoqilgandan so‘ng grafik kalit talab qilinadi"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Qurilma o‘chirib yoqilgandan so‘ng PIN kod talab qilinadi"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Qurilma o‘chirib yoqilgandan so‘ng parol talab qilinadi"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Qo‘shimcha xavfsizlik chorasi sifatida grafik kalit talab qilinadi"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Qo‘shimcha xavfsizlik chorasi sifatida PIN kod talab qilinadi"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Qo‘shimcha xavfsizlik chorasi sifatida parol talab qilinadi"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Profilni amlashtirishda grafik kalit talab qilinadi"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Profilni amlashtirishda PIN kod talab qilinadi"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Profilni amlashtirishda parol talab qilinadi"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Qurilma administrator tomonidan qulflangan"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Qurilma qo‘lda qulflangan"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Qurilma <xliff:g id="NUMBER_1">%d</xliff:g> soatdan beri qulfdan chiqarilgani yo‘q. Grafik kalitni yana bir marta chizing.</item>
-      <item quantity="one">Qurilma <xliff:g id="NUMBER_0">%d</xliff:g> soatdan beri qulfdan chiqarilgani yo‘q. Grafik kalitni yana bir marta chizing.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Qurilma <xliff:g id="NUMBER_1">%d</xliff:g> soatdan beri qulfdan chiqarilgani yo‘q. PIN-kodni yana bir marta kiriting.</item>
-      <item quantity="one">Qurilma <xliff:g id="NUMBER_0">%d</xliff:g> soatdan beri qulfdan chiqarilgani yo‘q. PIN-kodni yana bir marta kiriting.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Qurilma <xliff:g id="NUMBER_1">%d</xliff:g> soatdan beri qulfdan chiqarilgani yo‘q. Parolni yana bir marta kiriting.</item>
-      <item quantity="one">Qurilma <xliff:g id="NUMBER_0">%d</xliff:g> soatdan beri qulfdan chiqarilgani yo‘q. Parolni yana bir marta kiriting.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Aniqlanmadi"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-vi/strings.xml b/packages/Keyguard/res/values-vi/strings.xml
deleted file mode 100644
index c6d2bd8..0000000
--- a/packages/Keyguard/res/values-vi/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Khóa bàn phím"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Nhập mã PIN"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Nhập mã PIN mới và mã PUK của SIM"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"Mã PUK của SIM"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Mã PIN mới của SIM"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Chạm để nhập mật khẩu"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Nhập mật khẩu để mở khóa"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Nhập mã PIN để mở khóa"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Mã PIN không chính xác."</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Đã sạc đầy"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Đang sạc"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Đang sạc nhanh"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Đang sạc chậm"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Kết nối bộ sạc của bạn."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Nhấn vào Menu để mở khóa."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Mạng đã bị khóa"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Không có thẻ SIM nào"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Không có thẻ SIM nào trong máy tính bảng."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Không có thẻ SIM nào trong điện thoại."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Vui lòng lắp thẻ SIM."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"Thẻ SIM bị thiếu hoặc không thể đọc được. Vui lòng lắp thẻ SIM."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Thẻ SIM không sử dụng được."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"Thẻ SIM của bạn đã bị vô hiệu hóa vĩnh viễn.\n Hãy liên hệ với nhà cung cấp dịch vụ không dây của bạn để lấy thẻ SIM khác."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"Thẻ SIM đã bị khóa."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"Thẻ SIM đã bị khóa PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Đang mở khóa thẻ SIM…"</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Khu vực mã PIN"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Khu vực mã PIN của SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Khu vực PUK của SIM"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Báo thức tiếp theo được đặt cho <xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Xóa"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Đã quên hình"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Hình sai"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Mật khẩu sai"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"PIN sai"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Hãy thử lại sau <xliff:g id="NUMBER">%d</xliff:g> giây."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Vẽ hình của bạn"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Nhập PIN của SIM"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Nhập mã PIN của SIM dành cho \"<xliff:g id="CARRIER">%1$s</xliff:g>\""</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Nhập PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Nhập mật khẩu"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM hiện bị vô hiệu hóa. Nhập mã PUK để tiếp tục. Liên hệ với nhà cung cấp dịch vụ để biết chi tiết."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"Hiện tại, SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" đang tắt. Hãy nhập mã PUK để tiếp tục. Liên hệ với nhà cung cấp dịch vụ để biết chi tiết."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Nhập mã PIN mong muốn"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Xác nhận mã PIN mong muốn"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Đang mở khóa thẻ SIM…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Nhập mã PIN có từ 4 đến 8 số."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"Mã PUK phải có từ 8 số trở lên."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Hãy nhập lại mã PUK chính xác. Nhiều lần lặp lại sẽ vô hiệu hóa vĩnh viễn thẻ SIM."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Mã PIN không khớp"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Quá nhiều lần nhập hình"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Bạn đã <xliff:g id="NUMBER_0">%1$d</xliff:g> lần nhập sai mã PIN. \n\nHãy thử lại sau <xliff:g id="NUMBER_1">%2$d</xliff:g> giây."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Bạn đã <xliff:g id="NUMBER_0">%1$d</xliff:g> lần nhập sai mật khẩu. \n\nHãy thử lại sau <xliff:g id="NUMBER_1">%2$d</xliff:g> giây."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Bạn đã <xliff:g id="NUMBER_0">%1$d</xliff:g> lần vẽ không chính xác hình mở khóa. \n\nHãy thử lại sau <xliff:g id="NUMBER_1">%2$d</xliff:g> giây."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Bạn đã mở khóa máy tính bảng sai <xliff:g id="NUMBER_0">%1$d</xliff:g> lần. Sau <xliff:g id="NUMBER_1">%2$d</xliff:g> lần mở khóa không thành công nữa, máy tính bảng này sẽ được đặt lại, tức là tất cả dữ liệu của máy tính bảng sẽ bị xóa."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Bạn đã mở khóa điện thoại sai <xliff:g id="NUMBER_0">%1$d</xliff:g> lần. Sau <xliff:g id="NUMBER_1">%2$d</xliff:g> lần mở khóa không thành công nữa, điện thoại này sẽ được đặt lại, tức là tất cả dữ liệu của điện thoại sẽ bị xóa."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Bạn đã mở khóa máy tính bảng sai <xliff:g id="NUMBER">%d</xliff:g> lần. Máy tính bảng này sẽ được đặt lại, tức là tất cả dữ liệu của máy tính bảng sẽ bị xóa."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Bạn đã mở khóa điện thoại sai <xliff:g id="NUMBER">%d</xliff:g> lần. Điện thoại này sẽ được đặt lại, tức là tất cả dữ liệu của điện thoại sẽ bị xóa."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Bạn đã mở khóa máy tính bảng sai <xliff:g id="NUMBER_0">%1$d</xliff:g> lần. Sau <xliff:g id="NUMBER_1">%2$d</xliff:g> lần mở khóa không thành công nữa, người dùng này sẽ bị xóa, tức là tất cả dữ liệu người dùng sẽ bị xóa."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Bạn đã mở khóa điện thoại sai <xliff:g id="NUMBER_0">%1$d</xliff:g> lần. Sau <xliff:g id="NUMBER_1">%2$d</xliff:g> lần mở khóa không thành công nữa, người dùng này sẽ bị xóa, tức là tất cả dữ liệu người dùng sẽ bị xóa."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Bạn đã mở khóa máy tính bảng sai <xliff:g id="NUMBER">%d</xliff:g> lần. Người dùng này sẽ bị xóa, tức là tất cả dữ liệu người dùng sẽ bị xóa."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Bạn đã mở khóa điện thoại sai <xliff:g id="NUMBER">%d</xliff:g> lần. Người dùng này sẽ bị xóa, tức là tất cả dữ liệu người dùng sẽ bị xóa."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Bạn đã mở khóa máy tính bảng sai <xliff:g id="NUMBER_0">%1$d</xliff:g> lần. Sau <xliff:g id="NUMBER_1">%2$d</xliff:g> lần mở khóa không thành công nữa, hồ sơ công việc sẽ bị xóa, tức là tất cả dữ liệu hồ sơ sẽ bị xóa."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Bạn đã mở khóa điện thoại sai <xliff:g id="NUMBER_0">%1$d</xliff:g> lần. Sau <xliff:g id="NUMBER_1">%2$d</xliff:g> lần mở khóa không thành công nữa, hồ sơ công việc sẽ bị xóa, tức là tất cả dữ liệu hồ sơ sẽ bị xóa."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Bạn đã mở khóa máy tính bảng sai <xliff:g id="NUMBER">%d</xliff:g> lần. Hồ sơ công việc sẽ bị xóa, tức là tất cả dữ liệu hồ sơ sẽ bị xóa."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Bạn đã mở khóa điện thoại sai <xliff:g id="NUMBER">%d</xliff:g> lần. Hồ sơ công việc sẽ bị xóa, tức là tất cả dữ liệu hồ sơ sẽ bị xóa."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Bạn đã <xliff:g id="NUMBER_0">%1$d</xliff:g> lần vẽ không chính xác hình mở khóa của mình. Sau <xliff:g id="NUMBER_1">%2$d</xliff:g> lần thử không thành công nữa, bạn sẽ được yêu cầu mở khóa máy tính bảng bằng tài khoản email.\n\n Vui lòng thử lại sau <xliff:g id="NUMBER_2">%3$d</xliff:g> giây."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Bạn đã <xliff:g id="NUMBER_0">%1$d</xliff:g> lần vẽ không chính xác hình mở khóa của mình. Sau <xliff:g id="NUMBER_1">%2$d</xliff:g> lần thử không thành công nữa, bạn sẽ được yêu cầu mở khóa điện thoại bằng tài khoản email.\n\n Vui lòng thử lại sau <xliff:g id="NUMBER_2">%3$d</xliff:g> giây."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Mã PIN của SIM không chính xác, bây giờ bạn phải liên hệ với nhà cung cấp dịch vụ để mở khóa thiết bị của bạn."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">Mã PIN của SIM không chính xác, bạn còn  <xliff:g id="NUMBER_1">%d</xliff:g> lần thử.</item>
-      <item quantity="one">Mã PIN của SIM không chính xác, bạn còn  <xliff:g id="NUMBER_0">%d</xliff:g> lần thử trước khi bạn phải liên hệ với nhà cung cấp dịch vụ để mở khóa thiết bị của mình.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM không thể sử dụng được. Liên hệ với nhà cung cấp dịch vụ của bạn."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">Mã PUK của SIM không chính xác, bạn còn  <xliff:g id="NUMBER_1">%d</xliff:g> lần thử trước khi SIM vĩnh viễn không sử dụng được.</item>
-      <item quantity="one">Mã PUK của SIM không chính xác, bạn còn  <xliff:g id="NUMBER_0">%d</xliff:g> lần thử trước khi SIM vĩnh viễn không thể sử dụng được.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Thao tác mã PIN của SIM không thành công!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Thao tác mã PUK của SIM không thành công!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Mã được chấp nhận!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Không có dịch vụ."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Chuyển phương thức nhập"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Chế độ trên máy bay"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Yêu cầu hình mở khóa sau khi thiết bị khởi động lại"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Yêu cầu mã PIN sau khi thiết bị khởi động lại"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Yêu cầu mật khẩu sau khi thiết bị khởi động lại"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Cần có hình mở khóa để bảo mật thêm"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Cần có mã PIN để bảo mật thêm"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Cần có mật khẩu để bảo mật thêm"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Yêu cầu hình mở khóa khi bạn chuyển đổi hồ sơ"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Yêu cầu mã PIN khi bạn chuyển đổi hồ sơ"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Yêu cầu mật khẩu khi bạn chuyển đổi hồ sơ"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Quản trị viên thiết bị đã khóa thiết bị"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Thiết bị đã bị khóa theo cách thủ công"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">Thiết bị đã không được mở khóa trong <xliff:g id="NUMBER_1">%d</xliff:g> giờ. Xác nhận hình.</item>
-      <item quantity="one">Thiết bị đã không được mở khóa trong <xliff:g id="NUMBER_0">%d</xliff:g> giờ. Xác nhận hình.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">Thiết bị đã không được mở khóa trong <xliff:g id="NUMBER_1">%d</xliff:g> giờ. Xác nhận mã PIN.</item>
-      <item quantity="one">Thiết bị đã không được mở khóa trong <xliff:g id="NUMBER_0">%d</xliff:g> giờ. Xác nhận mã PIN.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">Thiết bị đã không được mở khóa trong <xliff:g id="NUMBER_1">%d</xliff:g> giờ. Xác nhận mật khẩu.</item>
-      <item quantity="one">Thiết bị đã không được mở khóa trong <xliff:g id="NUMBER_0">%d</xliff:g> giờ. Xác nhận mật khẩu.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Không nhận dạng được"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-zh-rCN/strings.xml b/packages/Keyguard/res/values-zh-rCN/strings.xml
deleted file mode 100644
index e15950f..0000000
--- a/packages/Keyguard/res/values-zh-rCN/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Keyguard"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"输入PIN码"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"请输入SIM卡PUK码和新的PIN码"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM卡PUK码"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"新SIM卡PIN码"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"触摸可输入密码"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"输入密码以解锁"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"输入PIN码进行解锁"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"PIN码有误。"</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"已充满"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"正在充电"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"正在快速充电"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"正在慢速充电"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"请连接充电器。"</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"按“菜单”键解锁。"</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"网络已锁定"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"没有 SIM 卡"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"平板电脑中没有SIM卡。"</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"手机中没有SIM卡。"</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"请插入SIM卡。"</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM卡缺失或无法读取,请插入SIM卡。"</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"SIM卡无法使用。"</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"您的SIM卡已永久停用。\n请与您的无线服务提供商联系,以便重新获取一张SIM卡。"</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM卡已被锁定。"</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM卡已被PUK码锁定。"</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"正在解锁SIM卡..."</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN 码区域"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM 卡 PIN 码区域"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM 卡 PUK 码区域"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"下次闹钟时间已设置为<xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Delete"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"忘记了图案"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"图案错误"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"密码错误"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"PIN码有误"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"请在 <xliff:g id="NUMBER">%d</xliff:g> 秒后重试。"</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"绘制您的图案"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"输入SIM卡PIN码"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"输入“<xliff:g id="CARRIER">%1$s</xliff:g>”的 SIM 卡 PIN 码"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"输入PIN码"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"输入密码"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM卡已被停用,需要输入PUK码才能继续使用。有关详情,请联系您的运营商。"</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM 卡“<xliff:g id="CARRIER">%1$s</xliff:g>”现已停用,需要输入 PUK 码才能继续使用。要了解详情,请联系您的运营商。"</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"请输入所需的PIN码"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"请确认所需的PIN码"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"正在解锁SIM卡..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"请输入4至8位数的PIN码。"</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK码应至少包含8位数字。"</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"请重新输入正确的PUK码。如果尝试错误次数过多,SIM卡将永久停用。"</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN码不匹配"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"图案尝试次数过多"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"您已经<xliff:g id="NUMBER_0">%1$d</xliff:g>次输错了PIN码。\n\n请在<xliff:g id="NUMBER_1">%2$d</xliff:g>秒后重试。"</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"您已连续 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次输错密码。\n\n请在 <xliff:g id="NUMBER_1">%2$d</xliff:g> 秒后重试。"</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"您已连续 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次画错解锁图案。\n\n请在 <xliff:g id="NUMBER_1">%2$d</xliff:g> 秒后重试。"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"您已经 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次错误地尝试解锁平板电脑。如果再尝试 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次后仍不成功,平板电脑将会被重置,这会删除其中的所有数据。"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"您已经 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次错误地尝试解锁手机。如果再尝试 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次后仍不成功,手机将会被重置,这会删除其中的所有数据。"</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"您已经 <xliff:g id="NUMBER">%d</xliff:g> 次错误地尝试解锁平板电脑。平板电脑将会被重置,这会删除其中的所有数据。"</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"您已经 <xliff:g id="NUMBER">%d</xliff:g> 次错误地尝试解锁手机。手机将会被重置,这会删除其中的所有数据。"</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"您已经 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次错误地尝试解锁平板电脑。如果再尝试 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次后仍不成功,系统将移除此用户,这会删除所有的用户数据。"</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"您已经 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次错误地尝试解锁手机。如果再尝试 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次后仍不成功,系统将移除此用户,这会删除所有的用户数据。"</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"您已经 <xliff:g id="NUMBER">%d</xliff:g> 次错误地尝试解锁平板电脑。系统将移除此用户,这会删除所有的用户数据。"</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"您已经 <xliff:g id="NUMBER">%d</xliff:g> 次错误地尝试解锁手机。系统将移除此用户,这会删除所有的用户数据。"</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"您已经 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次错误地尝试解锁平板电脑。如果再尝试 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次后仍不成功,系统将移除此工作资料,这会删除所有的工作资料数据。"</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"您已经 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次错误地尝试解锁手机。如果再尝试 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次后仍不成功,系统将移除此工作资料,这会删除所有的工作资料数据。"</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"您已经 <xliff:g id="NUMBER">%d</xliff:g> 次错误地尝试解锁平板电脑。系统将移除此工作资料,这会删除所有的工作资料数据。"</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"您已经 <xliff:g id="NUMBER">%d</xliff:g> 次错误地尝试解锁手机。系统将移除此工作资料,这会删除所有的工作资料数据。"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"您已连续 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次画错解锁图案。如果再尝试 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次后仍不成功,系统就会要求您使用自己的电子邮件帐号解锁平板电脑。\n\n请在 <xliff:g id="NUMBER_2">%3$d</xliff:g> 秒后重试。"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"您已连续 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次画错解锁图案。如果再尝试 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次后仍不成功,系统就会要求您使用自己的电子邮件帐号解锁手机。\n\n请在 <xliff:g id="NUMBER_2">%3$d</xliff:g> 秒后重试。"</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"SIM卡PIN码不正确,您现在必须联系运营商为您解锁设备。"</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">SIM 卡 PIN 码不正确,您还可尝试 <xliff:g id="NUMBER_1">%d</xliff:g> 次。</item>
-      <item quantity="one">SIM 卡 PIN 码不正确,您还可尝试 <xliff:g id="NUMBER_0">%d</xliff:g> 次。如果仍不正确,则需要联系运营商帮您解锁设备。</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM卡无法使用,请与您的运营商联系。"</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">SIM 卡 PUK 码不正确,您还可尝试 <xliff:g id="NUMBER_1">%d</xliff:g> 次。如果仍不正确,SIM 卡将永远无法使用。</item>
-      <item quantity="one">SIM 卡 PUK 码不正确,您还可尝试 <xliff:g id="NUMBER_0">%d</xliff:g> 次。如果仍不正确,SIM 卡将永远无法使用。</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"SIM卡PIN码操作失败!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"SIM卡PUK码操作失败!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"代码正确!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"无服务。"</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"切换输入法"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"飞行模式"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"重启设备后需要绘制解锁图案"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"重启设备后需要输入 PIN 码"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"重启设备后需要输入密码"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"需要绘制解锁图案以进一步确保安全"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"需要输入 PIN 码以进一步确保安全"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"需要输入密码以进一步确保安全"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"切换资料后需要绘制解锁图案"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"切换资料后需要输入 PIN 码"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"切换资料后需要输入密码"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"设备管理员已锁定此设备"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"此设备已手动锁定"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">设备已保持锁定状态达 <xliff:g id="NUMBER_1">%d</xliff:g> 小时。请确认解锁图案。</item>
-      <item quantity="one">设备已保持锁定状态达 <xliff:g id="NUMBER_0">%d</xliff:g> 小时。请确认解锁图案。</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">设备已保持锁定状态达 <xliff:g id="NUMBER_1">%d</xliff:g> 小时。请确认 PIN 码。</item>
-      <item quantity="one">设备已保持锁定状态达 <xliff:g id="NUMBER_0">%d</xliff:g> 小时。请确认 PIN 码。</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">设备已保持锁定状态达 <xliff:g id="NUMBER_1">%d</xliff:g> 小时。请确认密码。</item>
-      <item quantity="one">设备已保持锁定状态达 <xliff:g id="NUMBER_0">%d</xliff:g> 小时。请确认密码。</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"无法识别"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-zh-rHK/strings.xml b/packages/Keyguard/res/values-zh-rHK/strings.xml
deleted file mode 100644
index 5b1903b..0000000
--- a/packages/Keyguard/res/values-zh-rHK/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"鍵盤鎖"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"輸入 PIN 碼"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"請輸入 SIM PUK 碼和新 PIN 碼"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM PUK 碼"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"新 SIM PIN 碼"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"輕觸即可輸入密碼"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"輸入密碼即可解鎖"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"輸入 PIN 碼即可解鎖"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"PIN 碼不正確。"</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"充電完成"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"充電中"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"正在快速充電"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"正在慢速充電"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"請連接充電器。"</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"按選單鍵解鎖。"</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"網絡已鎖定"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"找不到 SIM 卡"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"平板電腦中沒有 SIM 卡。"</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"手機中沒有 SIM 卡。"</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"請插入 SIM 卡。"</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"找不到 SIM 卡或無法讀取 SIM 卡,請插入 SIM 卡。"</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"SIM 卡無法使用。"</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"您的 SIM 卡已被永久停用。\n請與您的無線服務供應商聯絡,以取得另一張 SIM 卡。"</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM 卡處於鎖定狀態。"</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM 卡處於 PUK 鎖定狀態。"</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"正在解開上鎖的 SIM 卡..."</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN 區域"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM PIN 區域"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM PUK 區域"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"已設定下一個鬧鐘時間:<xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"刪除"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter 鍵"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"忘記圖案"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"圖形不對"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"密碼錯誤"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"PIN 錯誤"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"請在 <xliff:g id="NUMBER">%d</xliff:g> 秒後再試一次。"</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"畫出圖案"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"輸入 SIM 卡 PIN 碼"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"輸入「<xliff:g id="CARRIER">%1$s</xliff:g>」的 SIM PIN"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"輸入 PIN 碼"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"輸入密碼"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM 卡現已停用,請輸入 PUK 碼以繼續。詳情請與流動網絡供應商聯絡。"</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM「<xliff:g id="CARRIER">%1$s</xliff:g>」目前被停用。輸入 PUK 碼以繼續。要瞭解詳情,請聯絡流動網絡供應商。"</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"輸入所需的 PIN 碼"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"確認所需的 PIN 碼"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"正在解開上鎖的 SIM 卡..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"請輸入一個 4 至 8 位數的 PIN 碼。"</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK 碼應由 8 個或以上數字組成。"</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"請重新輸入正確的 PUK 碼。如果嘗試輸入的次數過多,SIM 卡將永久停用。"</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN 碼不符"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"圖案嘗試次數過多"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"您已輸入錯誤的 PIN 碼 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次。\n\n請在 <xliff:g id="NUMBER_1">%2$d</xliff:g> 秒後再試一次。"</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"您已輸入錯誤的密碼 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次。\n\n請在 <xliff:g id="NUMBER_1">%2$d</xliff:g> 秒後再試一次。"</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"您已畫錯解鎖圖案 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次。\n\n請在 <xliff:g id="NUMBER_1">%2$d</xliff:g> 秒後再試一次。"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"您已 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次錯誤解鎖平板電腦。如再解鎖失敗 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次,平板電腦將被重設,平板電腦的所有資料將因此被刪除。"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"您已 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次錯誤解鎖手機。如再解鎖失敗 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次,手機將被重設,手機的所有資料將因此被刪除。"</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"您已 <xliff:g id="NUMBER">%d</xliff:g> 次錯誤解鎖手機。平板電腦將被重設,平板電腦的所有資料將因此被刪除。"</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"您已 <xliff:g id="NUMBER">%d</xliff:g> 次錯誤解鎖手機。手機將被重設,手機的所有資料將因此被刪除。"</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"您已 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次錯誤解鎖平板電腦。如再解鎖失敗 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次,該使用者將被移除,所有使用者資料將因此被刪除。"</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"您已 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次錯誤解鎖手機。如再解鎖失敗 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次,該使用者將被移除,所有使用者資料將因此被刪除。"</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"您已 <xliff:g id="NUMBER">%d</xliff:g> 次錯誤解鎖平板電腦。該使用者將被移除,所有使用者資料將因此被刪除。"</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"您已 <xliff:g id="NUMBER">%d</xliff:g> 次錯誤解鎖手機。該使用者將被移除,所有使用者資料將因此被刪除。"</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"您已 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次錯誤解鎖平板電腦。如再解鎖失敗 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次,該工作設定檔將被移除,所有設定檔資料將因此被刪除。"</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"您已 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次錯誤解鎖手機。如再解鎖失敗 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次,該工作設定檔將被移除,所有設定檔資料將因此被刪除。"</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"您已 <xliff:g id="NUMBER">%d</xliff:g> 次錯誤解鎖平板電腦。該工作設定檔將被移除,所有設定檔資料將因此被刪除。"</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"您已 <xliff:g id="NUMBER">%d</xliff:g> 次錯誤解鎖手機。該工作設定檔將被移除,所有設定檔資料將因此被刪除。"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"您已畫錯解鎖圖案 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次,如果再嘗試 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次仍未成功,系統會要求您透過電郵帳戶解開上鎖的平板電腦。\n\n請在 <xliff:g id="NUMBER_2">%3$d</xliff:g> 秒後再試一次。"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"您已畫錯解鎖圖案 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次,如果再嘗試 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次仍未成功,系統會要求您透過電郵帳戶解開上鎖的手機。\n\n請在 <xliff:g id="NUMBER_2">%3$d</xliff:g> 秒後再試一次。"</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"SIM PIN 碼不正確,您現在必須聯絡流動網絡供應商為您的裝置解鎖。"</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">SIM PIN 碼不正確,您還有 <xliff:g id="NUMBER_1">%d</xliff:g> 次機會輸入。</item>
-      <item quantity="one">SIM PIN 碼不正確,您還有 <xliff:g id="NUMBER_0">%d</xliff:g> 次機會輸入。如果仍然輸入錯誤,您必須聯絡流動網絡供應商為您的裝置解鎖。</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM 無法使用,請聯絡您的流動網絡供應商。"</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">SIM PUK 碼不正確,您還有 <xliff:g id="NUMBER_1">%d</xliff:g> 次機會輸入。如果仍然輸入錯誤,SIM 卡將永久無法使用。</item>
-      <item quantity="one">SIM PUK 碼不正確,您還有 <xliff:g id="NUMBER_0">%d</xliff:g> 次機會輸入。如果仍然輸入錯誤,SIM 卡將永久無法使用。</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"SIM PIN 碼操作失敗!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"SIM PUK 碼操作失敗!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"密碼正確!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"沒有服務。"</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"切換輸入法"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"飛航模式"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"裝置重新啟動後,請輸入上鎖圖形"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"裝置重新啟動後,需要輸入 PIN 才能使用"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"裝置重新啟動後,需要輸入密碼才能使用"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"輸入上鎖圖形以增強安全性"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"請先輸入 PIN,才能提高安全性"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"請先輸入密碼,才能提高安全性"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"切換設定檔前,請先輸入上鎖圖形"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"請先輸入 PIN,才能切換設定檔"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"請先輸入密碼,才能切換設定檔"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"裝置管理員已鎖定裝置"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"已手動鎖定裝置"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">裝置在 <xliff:g id="NUMBER_1">%d</xliff:g> 小時後尚未解鎖,請確認圖案。</item>
-      <item quantity="one">裝置在 <xliff:g id="NUMBER_0">%d</xliff:g> 小時後尚未解鎖,請確認圖案。</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">裝置在 <xliff:g id="NUMBER_1">%d</xliff:g> 小時後尚未解鎖,請確認 PIN。</item>
-      <item quantity="one">裝置在 <xliff:g id="NUMBER_0">%d</xliff:g> 小時後尚未解鎖,請確認 PIN。</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">裝置在 <xliff:g id="NUMBER_1">%d</xliff:g> 小時後尚未解鎖,請確認密碼。</item>
-      <item quantity="one">裝置在 <xliff:g id="NUMBER_0">%d</xliff:g> 小時後尚未解鎖,請確認密碼。</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"未能辨別"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-zh-rTW/strings.xml b/packages/Keyguard/res/values-zh-rTW/strings.xml
deleted file mode 100644
index 388f8e1..0000000
--- a/packages/Keyguard/res/values-zh-rTW/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"鍵盤鎖"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"輸入 PIN 碼"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"輸入 SIM 卡 PUK 碼和新 PIN 碼"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM 卡 PUK 碼"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"新增 SIM 卡 PIN 碼"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"輕觸即可輸入密碼"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"輸入密碼即可解鎖"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"輸入 PIN 即可解鎖"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"PIN 碼不正確。"</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"充電完成"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"充電中"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"快速充電中"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"慢速充電中"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"連接充電器。"</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"按選單鍵解鎖。"</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"網路已鎖定"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"找不到 SIM 卡"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"平板電腦中沒有 SIM 卡。"</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"手機中沒有 SIM 卡。"</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"插入 SIM 卡。"</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"找不到或無法讀取 SIM 卡。請插入 SIM 卡。"</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"SIM 卡無法使用。"</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"您的 SIM 卡已遭永久停用。\n請與您的無線網路服務供應商聯絡,以取得別張 SIM 卡。"</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM 卡處於鎖定狀態。"</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM 卡處於 PUK 鎖定狀態"</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"正在解除 SIM 卡鎖定..."</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"PIN 區"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"SIM 卡 PIN 區"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"SIM 卡 PUK 區"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"已設定下一個鬧鐘時間:<xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Delete 鍵"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter 鍵"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"忘記圖案"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"圖案錯誤"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"密碼錯誤"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"PIN 錯誤"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"請在 <xliff:g id="NUMBER">%d</xliff:g> 秒後再試一次。"</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"畫出圖案"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"輸入 SIM PIN"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"輸入「<xliff:g id="CARRIER">%1$s</xliff:g>」的 SIM 卡 PIN"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"輸入 PIN"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"輸入密碼"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM 卡已遭停用,必須輸入 PUK 碼才能繼續使用。詳情請洽您的行動通訊業者。"</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"SIM 卡「<xliff:g id="CARRIER">%1$s</xliff:g>」現已遭到停用,輸入 PUK 碼即可繼續使用。如需瞭解詳情,請與行動通訊業者聯絡。"</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"輸入所需的 PIN 碼"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"確認所需的 PIN 碼"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"正在解除 SIM 卡鎖定..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"請輸入 4 到 8 碼的 PIN。"</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK 碼至少必須為 8 碼。"</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"重新輸入正確的 PUK 碼。如果錯誤次數過多,SIM 卡將會永久停用。"</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN 碼不符"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"圖案嘗試次數過多"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"您的 PIN 已輸錯 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次。\n\n請在 <xliff:g id="NUMBER_1">%2$d</xliff:g> 秒後再試一次。"</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"您的密碼已輸錯 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次。\n\n請在 <xliff:g id="NUMBER_1">%2$d</xliff:g> 秒後再試一次。"</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"您的解鎖圖案已畫錯 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次。\n\n請在 <xliff:g id="NUMBER_1">%2$d</xliff:g> 秒後再試一次。"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"您嘗試解鎖平板電腦已失敗 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次,目前還剩 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次機會。如果失敗次數超過限制,這台平板電腦將會重設,其中的所有資料也會一併遭到刪除。"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"您嘗試解鎖手機已失敗 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次,目前還剩 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次機會。如果失敗次數超過限制,系統會重設您的手機,其中的所有資料也會一併遭到刪除。"</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"您嘗試解鎖平板電腦已失敗 <xliff:g id="NUMBER">%d</xliff:g> 次。這台平板電腦將會重設,其中的所有資料也會一併遭到刪除。"</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"您嘗試解鎖手機已失敗 <xliff:g id="NUMBER">%d</xliff:g> 次。系統會重設您的手機,其中的所有資料也會一併遭到刪除。"</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"您嘗試解鎖平板電腦已失敗 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次,目前還剩 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次機會。如果失敗次數超過限制,這位使用者將遭到移除,對方的所有使用者資料也會一併遭到刪除。"</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"您嘗試解鎖手機已失敗 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次,目前還剩 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次機會。如果失敗次數超過限制,這位使用者將遭到移除,對方的所有使用者資料也會一併遭到刪除。"</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"您嘗試解鎖平板電腦已失敗 <xliff:g id="NUMBER">%d</xliff:g> 次。這位使用者將遭到移除,對方的所有使用者資料也會一併遭到刪除。"</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"您嘗試解鎖手機已失敗 <xliff:g id="NUMBER">%d</xliff:g> 次。這位使用者將遭到移除,對方的所有使用者資料也會一併遭到刪除。"</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"您嘗試解鎖平板電腦已失敗 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次,目前還剩 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次機會。如果失敗次數超過限制,您的 Work 設定檔將遭到移除,所有設定檔資料也會一併遭到刪除。"</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"您嘗試解鎖手機已失敗 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次,目前還剩 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次機會。如果失敗次數超過限制,您的 Work 設定檔將遭到移除,所有設定檔資料也會一併遭到刪除。"</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"您嘗試解鎖平板電腦已失敗 <xliff:g id="NUMBER">%d</xliff:g> 次。您的 Work 設定檔將遭到移除,所有設定檔資料也會一併遭到刪除。"</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"您嘗試解鎖手機已失敗 <xliff:g id="NUMBER">%d</xliff:g> 次。您的 Work 設定檔將遭到移除,所有設定檔資料也會一併遭到刪除。"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"您的解鎖圖案已畫錯 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次,如果再嘗試 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次仍未成功,系統就會要求您透過電子郵件帳戶解除平板電腦的鎖定狀態。\n\n請在 <xliff:g id="NUMBER_2">%3$d</xliff:g> 秒後再試一次。"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"您的解鎖圖案已畫錯 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次,如果再嘗試 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次仍未成功,系統就會要求您透過電子郵件帳戶解除手機的鎖定狀態。\n\n請在 <xliff:g id="NUMBER_2">%3$d</xliff:g> 秒後再試一次。"</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"SIM 卡的 PIN 碼輸入錯誤,您現在必須請行動通訊業者為裝置解鎖。"</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="other">SIM 卡的 PIN 碼輸入錯誤,您還可以再試 <xliff:g id="NUMBER_1">%d</xliff:g> 次。</item>
-      <item quantity="one">SIM 卡的 PIN 碼輸入錯誤,您還可以再試 <xliff:g id="NUMBER_0">%d</xliff:g> 次。如果仍然失敗,就必須請行動通訊業者為裝置解鎖。</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM 卡無法使用,請與您的行動通訊業者聯絡。"</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="other">SIM 卡的 PUK 碼輸入錯誤,您還可以再試 <xliff:g id="NUMBER_1">%d</xliff:g> 次。如果仍然失敗,SIM 卡將永久無法使用。</item>
-      <item quantity="one">SIM 卡的 PUK 碼輸入錯誤,您還可以再試 <xliff:g id="NUMBER_0">%d</xliff:g> 次。如果仍然失敗,SIM 卡將永久無法使用。</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"SIM 卡 PIN 碼操作失敗!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"SIM 卡 PUK 碼操作失敗!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"密碼正確!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"沒有服務。"</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"切換輸入法"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"飛航模式"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"裝置重新啟動後需要畫出解鎖圖案"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"裝置重新啟動後需要輸入 PIN 碼"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"裝置重新啟動後需要輸入密碼"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"請畫出解鎖圖案,以進一步確保資訊安全"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"請輸入 PIN 碼,以進一步確保資訊安全"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"請輸入密碼,以進一步確保資訊安全"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"切換設定檔時需要畫出解鎖圖案"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"切換設定檔時需要輸入 PIN 碼"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"切換設定檔時需要輸入密碼"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"裝置管理員已鎖定裝置"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"裝置已手動鎖定"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="other">裝置已有 <xliff:g id="NUMBER_1">%d</xliff:g> 小時未解鎖。請確認圖案。</item>
-      <item quantity="one">裝置已有 <xliff:g id="NUMBER_0">%d</xliff:g> 小時未解鎖。請確認圖案。</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="other">裝置已有 <xliff:g id="NUMBER_1">%d</xliff:g> 小時未解鎖。請確認 PIN 碼。</item>
-      <item quantity="one">裝置已有 <xliff:g id="NUMBER_0">%d</xliff:g> 小時未解鎖。請確認 PIN 碼。</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="other">裝置已有 <xliff:g id="NUMBER_1">%d</xliff:g> 小時未解鎖。請確認密碼。</item>
-      <item quantity="one">裝置已有 <xliff:g id="NUMBER_0">%d</xliff:g> 小時未解鎖。請確認密碼。</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"無法識別"</string>
-</resources>
diff --git a/packages/Keyguard/res/values-zu/strings.xml b/packages/Keyguard/res/values-zu/strings.xml
deleted file mode 100644
index a9b6263..0000000
--- a/packages/Keyguard/res/values-zu/strings.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="719438068451601849">"Ukhiye wokugada"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Faka ikhodi ye-PIN"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"Thayipha i-PUK ye-SIM nekhodi yephinikhodi entsha"</string>
-    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"Ikhodi ye-PUK ye-SIM"</string>
-    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"Ikhodi entsha yephinikhodi ye-SIM"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Thinta ukubhala iphasiwedi"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Bhala iphasiwedi ukuze kuvuleke"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Faka i-PIN ukuvula"</string>
-    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Ikhodi ye-PIN engalungile!"</string>
-    <string name="keyguard_charged" msgid="3272223906073492454">"Kushajiwe"</string>
-    <string name="keyguard_plugged_in" msgid="9087497435553252863">"Iyashaja"</string>
-    <string name="keyguard_plugged_in_charging_fast" msgid="6671162730167305479">"Ishaja ngokushesha"</string>
-    <string name="keyguard_plugged_in_charging_slowly" msgid="1964714661071163229">"Ishaja kancane"</string>
-    <string name="keyguard_low_battery" msgid="8143808018719173859">"Xhuma ishaja yakho."</string>
-    <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"Chofoza imenyu ukuze uvule."</string>
-    <string name="keyguard_network_locked_message" msgid="9169717779058037168">"Inethiwekhi ikhiyiwe"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"Alikho ikhadi le-SIM"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"Alikho ikhadi le-SIM kuthebulethi."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"Alikho ikhadi le-SIM kufoni."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"Faka ikhadi le-SIM."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"Ikhadi le-SIM alitholakali noma alifundeki. Faka ikhadi le-SIM."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"Ikhadi le-SIM elingasebenziseki."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"I-SIM khadi yakho ikhutshazwe unomphela.\n Xhumana nomhlinzeki wakho wokuxhumana okungenazintambo ukuze uthole enye i-SIM khadi."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"Ikhadi le-SIM likhiyiwe."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"Ikhadi le-SIM likhiywe nge-PUK."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"Ivula ikhadi le-SIM..."</string>
-    <string name="keyguard_accessibility_pin_area" msgid="7903959476607833485">"Indawo yephinikhodi"</string>
-    <string name="keyguard_accessibility_sim_pin_area" msgid="3887780775111719336">"Indawo yephinikhodi ye-SIM"</string>
-    <string name="keyguard_accessibility_sim_puk_area" msgid="1880823406954996207">"Indawo ye-SIM PUK"</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"I-alamu elandelayo esethelwe i-<xliff:g id="ALARM">%1$s</xliff:g>"</string>
-    <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Susa"</string>
-    <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Faka"</string>
-    <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Ukhohlwe iphethini?"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Iphatheni engalungile"</string>
-    <string name="kg_wrong_password" msgid="2333281762128113157">"Iphasiwedi engalungile"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"Iphinikhodi engalungile"</string>
-    <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Zama futhi emasekhondini angu-<xliff:g id="NUMBER">%d</xliff:g>."</string>
-    <string name="kg_pattern_instructions" msgid="398978611683075868">"Dweba iphethini"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Faka iphinikhodi ye-SIM"</string>
-    <string name="kg_sim_pin_instructions_multi" msgid="7818515973197201434">"Faka i-PIN ye-SIM ye-\"<xliff:g id="CARRIER">%1$s</xliff:g>\""</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Faka iphinikhodi"</string>
-    <string name="kg_password_instructions" msgid="5753646556186936819">"Faka iphasiwedi"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"I-SIM manje ikhutshaziwe. Faka ikhodi ye-PUK ukuze uqhubeke. Xhumana nenkampani yenethiwekhi ngemininingwane."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="363822494559783025">"I-SIM ye-\"<xliff:g id="CARRIER">%1$s</xliff:g>\" manje ikhutshaziwe. Faka ikhodi ye-PUK ukuze uqhubeke. Xhumana nenkampani yenethiwekhi ukuze uthole imininingwane."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Faka iphinikhodi oyithandayo"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Qiniseka iphinikhodi oyithandayo"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"Ivula ikhadi le-SIM..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Thayipha iphinikhodi enezinombolo ezingu-4 kuya kwezingu-8."</string>
-    <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"Ikhodi ye-PUK kufanele ibe yizinombolo ezingu-8 noma eziningi."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Faka kabusha ikhodi ye-PUK elungile. Imizamo ephindiwe izokhubaza unaphakade i-SIM."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Iphinikhodi ayifani"</string>
-    <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"Kunemizamo eminingi kakhulu yephathini"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"Ubhale iphinikhodi ykho ngendlela engafanele izikhathi ezingu-<xliff:g id="NUMBER_0">%1$d</xliff:g>. \n\nZama futhi emasekhondini angu-<xliff:g id="NUMBER_1">%2$d</xliff:g>."</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"Ubhale iphasiwedi yakho ngendlela engafanele <xliff:g id="NUMBER_0">%1$d</xliff:g> izikhathi. \n\nZama futhi emasekhondini angu-<xliff:g id="NUMBER_1">%2$d</xliff:g>."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"Udwebe iphathini yakho yokuvula ngendlela engafanele-<xliff:g id="NUMBER_0">%1$d</xliff:g>. \n\n Zama futhi emasekhondini angu-<xliff:g id="NUMBER_1">%2$d</xliff:g>"</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="8774056606869646621">"Uzame ngokungalungile ukuvula ithebulethi izikhathi ezingu-<xliff:g id="NUMBER_0">%1$d</xliff:g>. Ngemuva kwemizamo engaphezulu kwengu-<xliff:g id="NUMBER_1">%2$d</xliff:g> engaphumelelanga, le thebulethi izosethwa kabusha, okuzosusa yonke idatha yayo."</string>
-    <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="1843331751334128428">"Uzame ngokungalungile ukuvula ifoni izikhathi ezingu-<xliff:g id="NUMBER_0">%1$d</xliff:g>. Ngemuva kwemizamo engaphezulu kwengu-<xliff:g id="NUMBER_1">%2$d</xliff:g> engaphumelelanga, le foni izosethwa kabusha, okuzosusa yonke idatha yayo."</string>
-    <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="258925501999698032">"Uzame ngokungalungile ukuvula ithebulethi izikhathi ezingu-<xliff:g id="NUMBER">%d</xliff:g>. Le thebulethi izosethwa kabusha, okuzosusa yonke idatha yayo."</string>
-    <string name="kg_failed_attempts_now_wiping" product="default" msgid="7154028908459817066">"Uzame ngokungalungile ukuvula ifoni izikhathi ezingu-<xliff:g id="NUMBER">%d</xliff:g>. Le foni izosethwa kabusha, okuzosusa yonke idatha yayo."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="6159955099372112688">"Uzame ngokungalungile ukuvula ithebulethi izikhathi ezingu-<xliff:g id="NUMBER_0">%1$d</xliff:g>. Ngemuva kwemizamo engaphezulu kwengu-<xliff:g id="NUMBER_1">%2$d</xliff:g> engaphumelelanga, lo msebenzisi uzosuswa, okuzosusa yonke idatha yomsebenzisi."</string>
-    <string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="6945823186629369880">"Uzame ngokungalungile ukuvula ifoni izikhathi ezingu-<xliff:g id="NUMBER_0">%1$d</xliff:g>. Ngemuva kwemizamo engaphezulu kwengu-<xliff:g id="NUMBER_1">%2$d</xliff:g> engaphumelelanga, lo msebenzisi uzosuswa, okuzosusa yonke idatha yomsebenzisi."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="3963486905355778734">"Uzame ngokungalungile ukuvula ithebulethi izikhathi ezingu-<xliff:g id="NUMBER">%d</xliff:g>. Lo msebenzisi uzosuswa, okuzosusa yonke idatha yomsebenzisi."</string>
-    <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="7729009752252111673">"Uzame ngokungalungile ukuvula ifoni izikhathi ezingu-<xliff:g id="NUMBER">%d</xliff:g>. Lo msebenzisi uzosuswa, okuzosusa yonke idatha yomsebenzisi."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="4621778507387853694">"Uzame ngokungalungile ukuvula ithebulethi izikhathi ezingu-<xliff:g id="NUMBER_0">%1$d</xliff:g>. Ngemuva kwemizamo engaphezulu kwengu-<xliff:g id="NUMBER_1">%2$d</xliff:g> engaphumelelanga, iphrofayela yomsebenzi izosuswa, okuzosusa yonke idatha yephrofayela."</string>
-    <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="6853071165802933545">"Uzame ngokungalungile ukuvula ifoni izikhathi ezingu-<xliff:g id="NUMBER_0">%1$d</xliff:g>. Ngemuva kwemizamo engaphezulu kwengu-<xliff:g id="NUMBER_1">%2$d</xliff:g> engaphumelelanga, iphrofayela yomsebenzi, izosuswa, okuzosusa yonke idatha yephrofayela."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4686386497449912146">"Uzame ngokungalungile ukuvula ithebulethi izikhathi ezingu-<xliff:g id="NUMBER">%d</xliff:g>. Iphrofayela yomsebenzi izosuswa, okuzosusa yonke idatha yephrofayela."</string>
-    <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="4951507352869831265">"Uzame ngokungalungile ukuvula ifoni izikhathi ezingu-<xliff:g id="NUMBER">%d</xliff:g>. Iphrofayela yomsebenzi izosuswa, okuzosusa yonke idatha yephrofayela."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"Udwebe ngokungalungile iphathini yakho yokuvula izikhathi ezingu-<xliff:g id="NUMBER_0">%1$d</xliff:g>. Emva <xliff:g id="NUMBER_1">%2$d</xliff:g> kweminye imizamo engaphumelelanga, uzocelwa ukuvula ithebhulethi yakho usebenzisa ukungena ngemvume kwi-Google.\n\n Sicela uzame futhi emuva kwamasekhondi angu-<xliff:g id="NUMBER_2">%3$d</xliff:g>"</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"Ukulayisha ungenisa iphathini yakho yokuvula ngendlela engalungile izikhathi ezi-<xliff:g id="NUMBER_0">%1$d</xliff:g> Emva kweminye imizamo engu-<xliff:g id="NUMBER_1">%2$d</xliff:g>, uzocelwa ukuvula ifoni yakho usebenzisa ukungena ngemvume ku-Google\n\n Zame futhi emumva kwengu- <xliff:g id="NUMBER_2">%3$d</xliff:g> amasekhondi."</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"Ikhodi yephinikhodi ye-SIM engalungile manje kumele uxhumane nenkampini yenethiwekhi yakho ukuvula idivayisi yakho."</string>
-    <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
-      <item quantity="one">Ikhodi engalungile yephinikhodi ye-SIM, unemizamo engu-<xliff:g id="NUMBER_1">%d</xliff:g> esele.</item>
-      <item quantity="other">Ikhodi engalungile yephinikhodi ye-SIM, unemizamo engu-<xliff:g id="NUMBER_1">%d</xliff:g> esele.</item>
-    </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"I-SIM ayisebenziseki. Xhumana nemkampini yenethiwekhi yakho."</string>
-    <plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
-      <item quantity="one">Ikhodi ye-PUK ye-SIM engalungile, unemizamo engu-<xliff:g id="NUMBER_1">%d</xliff:g> esele ngaphambi kokuthi i-SIM ingasasebenziseki unaphakade.</item>
-      <item quantity="other">Ikhodi ye-PUK ye-SIM engalungile, unemizamo engu-<xliff:g id="NUMBER_1">%d</xliff:g> esele ngaphambi kokuthi i-SIM ingasasebenziseki unaphakade.</item>
-    </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"Umsebenzi wephinikhodi ye-SIM wehlulekile!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"Umsebenzi we-PUK ye-SIM wehlulekile!"</string>
-    <string name="kg_pin_accepted" msgid="1448241673570020097">"Ikhodi yamukelwe!"</string>
-    <string name="keyguard_carrier_default" msgid="8700650403054042153">"Ayikho isevisi."</string>
-    <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Shintsha indlela yokufaka"</string>
-    <string name="airplane_mode" msgid="3122107900897202805">"Isimo sendiza"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Iphethini iyadingeka ngemuva kokuqala kabusha kwedivayisi"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Iphinikhodi iyadingeka ngemuva kokuqala kabusha kwedivayisi"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Iphasiwedi iyadingeka ngemuva kokuqala kabusha kwedivayisi"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Kudingeka iphethini  ngokuvikeleka okungeziwe"</string>
-    <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Kudingeka iphinikhodi ngokuvikeleka okungeziwe"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Iphasiwedi idingelwa ukuvikela okungeziwe"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Iphethini iyadingeka uma ushintsha amaphrofayela"</string>
-    <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Kudingeka iphinikhodi uma ushintsha amaphrofayela"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Iphasiwedi iyadingeka uma ushintsha amaphrofayela"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Umlawuli wedivayisi ukhiye idivayisi"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Idivayisi ikhiywe ngokwenza"</string>
-    <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">Idivayisi ayikavulwa ngamahora angu-<xliff:g id="NUMBER_1">%d</xliff:g>. Qinisekisa iphethini.</item>
-      <item quantity="other">Idivayisi ayikavulwa ngamahora angu-<xliff:g id="NUMBER_1">%d</xliff:g>. Qinisekisa iphethini.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
-      <item quantity="one">Idivayisi ayikavulwa ngamahora angu-<xliff:g id="NUMBER_1">%d</xliff:g>. Qinisekisa iphinikhodi.</item>
-      <item quantity="other">Idivayisi ayikavulwa ngamahora angu-<xliff:g id="NUMBER_1">%d</xliff:g>. Qinisekisa iphinikhodi.</item>
-    </plurals>
-    <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5132693663364913675">
-      <item quantity="one">Idivayisi ayikavulwa ngamahora angu-<xliff:g id="NUMBER_1">%d</xliff:g>. Qinisekisa iphasiwedi.</item>
-      <item quantity="other">Idivayisi ayikavulwa ngamahora angu-<xliff:g id="NUMBER_1">%d</xliff:g>. Qinisekisa iphasiwedi.</item>
-    </plurals>
-    <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Akubonwa"</string>
-</resources>
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 00193ed..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/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 30eb974..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/core/res/res/values-ldrtl/dimens.xml b/packages/SettingsLib/res/color/batterymeter_bolt_color.xml
similarity index 69%
copy from core/res/res/values-ldrtl/dimens.xml
copy to packages/SettingsLib/res/color/batterymeter_bolt_color.xml
index 807c042..34de548 100644
--- a/core/res/res/values-ldrtl/dimens.xml
+++ b/packages/SettingsLib/res/color/batterymeter_bolt_color.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!-- 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.
@@ -13,8 +13,6 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-
-<resources>
-    <item type="dimen" format="integer" name="time_picker_column_start_material">1</item>
-    <item type="dimen" format="integer" name="time_picker_column_end_material">0</item>
-</resources>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:alpha="0.3" android:color="?android:attr/colorForeground" />
+</selector>
\ No newline at end of file
diff --git a/core/res/res/values-ldrtl/dimens.xml b/packages/SettingsLib/res/color/batterymeter_charge_color.xml
similarity index 69%
copy from core/res/res/values-ldrtl/dimens.xml
copy to packages/SettingsLib/res/color/batterymeter_charge_color.xml
index 807c042..15944c3 100644
--- a/core/res/res/values-ldrtl/dimens.xml
+++ b/packages/SettingsLib/res/color/batterymeter_charge_color.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!-- 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.
@@ -13,8 +13,6 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-
-<resources>
-    <item type="dimen" format="integer" name="time_picker_column_start_material">1</item>
-    <item type="dimen" format="integer" name="time_picker_column_end_material">0</item>
-</resources>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:color="?android:attr/colorForeground" />
+</selector>
\ No newline at end of file
diff --git a/core/res/res/values-ldrtl/dimens.xml b/packages/SettingsLib/res/color/batterymeter_frame_color.xml
similarity index 69%
copy from core/res/res/values-ldrtl/dimens.xml
copy to packages/SettingsLib/res/color/batterymeter_frame_color.xml
index 807c042..34de548 100644
--- a/core/res/res/values-ldrtl/dimens.xml
+++ b/packages/SettingsLib/res/color/batterymeter_frame_color.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!-- 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.
@@ -13,8 +13,6 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-
-<resources>
-    <item type="dimen" format="integer" name="time_picker_column_start_material">1</item>
-    <item type="dimen" format="integer" name="time_picker_column_end_material">0</item>
-</resources>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:alpha="0.3" android:color="?android:attr/colorForeground" />
+</selector>
\ No newline at end of file
diff --git a/core/res/res/values-ldrtl/dimens.xml b/packages/SettingsLib/res/color/dark_mode_icon_color_dual_tone_background.xml
similarity index 69%
rename from core/res/res/values-ldrtl/dimens.xml
rename to packages/SettingsLib/res/color/dark_mode_icon_color_dual_tone_background.xml
index 807c042..c8a80ac 100644
--- a/core/res/res/values-ldrtl/dimens.xml
+++ b/packages/SettingsLib/res/color/dark_mode_icon_color_dual_tone_background.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!-- 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.
@@ -13,8 +13,6 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-
-<resources>
-    <item type="dimen" format="integer" name="time_picker_column_start_material">1</item>
-    <item type="dimen" format="integer" name="time_picker_column_end_material">0</item>
-</resources>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:alpha="0.24" android:color="?android:attr/colorBackground" />
+</selector>
\ No newline at end of file
diff --git a/core/res/res/values-ldrtl/dimens.xml b/packages/SettingsLib/res/color/dark_mode_icon_color_dual_tone_fill.xml
similarity index 69%
copy from core/res/res/values-ldrtl/dimens.xml
copy to packages/SettingsLib/res/color/dark_mode_icon_color_dual_tone_fill.xml
index 807c042..8dcfdbb 100644
--- a/core/res/res/values-ldrtl/dimens.xml
+++ b/packages/SettingsLib/res/color/dark_mode_icon_color_dual_tone_fill.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!-- 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.
@@ -13,8 +13,6 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-
-<resources>
-    <item type="dimen" format="integer" name="time_picker_column_start_material">1</item>
-    <item type="dimen" format="integer" name="time_picker_column_end_material">0</item>
-</resources>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:alpha="0.47" android:color="?android:attr/colorBackground" />
+</selector>
\ No newline at end of file
diff --git a/core/res/res/values-ldrtl/dimens.xml b/packages/SettingsLib/res/color/light_mode_icon_color_dual_tone_background.xml
similarity index 69%
copy from core/res/res/values-ldrtl/dimens.xml
copy to packages/SettingsLib/res/color/light_mode_icon_color_dual_tone_background.xml
index 807c042..34de548 100644
--- a/core/res/res/values-ldrtl/dimens.xml
+++ b/packages/SettingsLib/res/color/light_mode_icon_color_dual_tone_background.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!-- 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.
@@ -13,8 +13,6 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-
-<resources>
-    <item type="dimen" format="integer" name="time_picker_column_start_material">1</item>
-    <item type="dimen" format="integer" name="time_picker_column_end_material">0</item>
-</resources>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:alpha="0.3" android:color="?android:attr/colorForeground" />
+</selector>
\ No newline at end of file
diff --git a/core/res/res/values-ldrtl/dimens.xml b/packages/SettingsLib/res/color/light_mode_icon_color_dual_tone_fill.xml
similarity index 69%
copy from core/res/res/values-ldrtl/dimens.xml
copy to packages/SettingsLib/res/color/light_mode_icon_color_dual_tone_fill.xml
index 807c042..15944c3 100644
--- a/core/res/res/values-ldrtl/dimens.xml
+++ b/packages/SettingsLib/res/color/light_mode_icon_color_dual_tone_fill.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!-- 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.
@@ -13,8 +13,6 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-
-<resources>
-    <item type="dimen" format="integer" name="time_picker_column_start_material">1</item>
-    <item type="dimen" format="integer" name="time_picker_column_end_material">0</item>
-</resources>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:color="?android:attr/colorForeground" />
+</selector>
\ No newline at end of file
diff --git a/packages/SettingsLib/res/values-bn/arrays.xml b/packages/SettingsLib/res/values-bn/arrays.xml
index 01ba2cd..b40bfd4 100644
--- a/packages/SettingsLib/res/values-bn/arrays.xml
+++ b/packages/SettingsLib/res/values-bn/arrays.xml
@@ -58,14 +58,22 @@
     <item msgid="3878793616631049349">"শুধুমাত্র DRM সামগ্রীর জন্য HDCP চেক করা ব্যবহার করুন"</item>
     <item msgid="45075631231212732">"সর্বদা HDCP পরীক্ষণ ব্যবহার করুন"</item>
   </string-array>
-    <!-- no translation found for bluetooth_a2dp_codec_titles:2 (686685526567131661) -->
-    <!-- no translation found for bluetooth_a2dp_codec_titles:3 (8910200421843557332) -->
-    <!-- no translation found for bluetooth_a2dp_codec_titles:4 (8434403964359457768) -->
-    <!-- no translation found for bluetooth_a2dp_codec_titles:5 (6751080638867012696) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:2 (6839647709301342559) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:3 (2279916056363477395) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:4 (6641171061200063516) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:5 (7950781694447359344) -->
+  <string-array name="bluetooth_a2dp_codec_titles">
+    <item msgid="7065842274271279580">"সিস্টেমের নির্বাচন ব্যবহার করুন (ডিফল্ট)"</item>
+    <item msgid="7539690996561263909">"SBC"</item>
+    <item msgid="686685526567131661">"AAC"</item>
+    <item msgid="8910200421843557332">"aptX"</item>
+    <item msgid="8434403964359457768">"aptX HD"</item>
+    <item msgid="6751080638867012696">"LDAC"</item>
+  </string-array>
+  <string-array name="bluetooth_a2dp_codec_summaries">
+    <item msgid="5062108632402595000">"সিস্টেমের নির্বাচন ব্যবহার করুন (ডিফল্ট)"</item>
+    <item msgid="6898329690939802290">"SBC"</item>
+    <item msgid="6839647709301342559">"AAC"</item>
+    <item msgid="2279916056363477395">"aptX"</item>
+    <item msgid="6641171061200063516">"aptX HD"</item>
+    <item msgid="7950781694447359344">"LDAC"</item>
+  </string-array>
   <string-array name="bluetooth_a2dp_codec_sample_rate_titles">
     <item msgid="3093023430402746802">"সিস্টেমের নির্বাচন ব্যবহার করুন (ডিফল্ট)"</item>
     <item msgid="8895532488906185219">"৪৪.১ kHz"</item>
@@ -102,10 +110,16 @@
     <item msgid="8900559293912978337">"মোনো"</item>
     <item msgid="8883739882299884241">"স্টিরিও"</item>
   </string-array>
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_titles:0 (7158319962230727476) -->
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_titles:2 (8860982705384396512) -->
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_summaries:0 (6398189564246596868) -->
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_summaries:2 (4681409244565426925) -->
+  <string-array name="bluetooth_a2dp_codec_ldac_playback_quality_titles">
+    <item msgid="7158319962230727476">"অডিও গুণমানের জন্য অপ্টিমাইজ করা হয়েছে (৯৯০kbps/৯০৯kbps)"</item>
+    <item msgid="2921767058740704969">"সন্তুলিত গুণমানের অডিও এবং সংযোগ (660kbps/606kbps)"</item>
+    <item msgid="8860982705384396512">"সংযোগের গুণমানের জন্য অপটিমাইজ করা হয়েছে (৩৩০kbps/৩০৩kbps)"</item>
+  </string-array>
+  <string-array name="bluetooth_a2dp_codec_ldac_playback_quality_summaries">
+    <item msgid="6398189564246596868">"অডিও গুণমানের জন্য অপ্টিমাইজ করা হয়েছে"</item>
+    <item msgid="4327143584633311908">"সন্তুলিত গুণমানের অডিও এবং সংযোগ"</item>
+    <item msgid="4681409244565426925">"সংযোগের গুণমানের জন্য অপটিমাইজ করা হয়েছে"</item>
+  </string-array>
   <string-array name="select_logd_size_titles">
     <item msgid="8665206199209698501">"বন্ধ আছে"</item>
     <item msgid="1593289376502312923">"৬৪K"</item>
diff --git a/packages/SettingsLib/res/values-bn/strings.xml b/packages/SettingsLib/res/values-bn/strings.xml
index 8350bb7..820fb40 100644
--- a/packages/SettingsLib/res/values-bn/strings.xml
+++ b/packages/SettingsLib/res/values-bn/strings.xml
@@ -53,7 +53,7 @@
     <string name="bluetooth_profile_pbap_summary" msgid="6605229608108852198">"পরিচিতি শেয়ার করার কাজে ব্যবহার করুন"</string>
     <string name="bluetooth_profile_pan_nap" msgid="8429049285027482959">"ইন্টারনেট সংযোগ শেয়ার করা হচ্ছে"</string>
     <string name="bluetooth_profile_map" msgid="5465271250454324383">"বার্তা অ্যাক্সেস"</string>
-    <string name="bluetooth_profile_sap" msgid="5764222021851283125">"SIM -এর অ্যাক্সেস"</string>
+    <string name="bluetooth_profile_sap" msgid="5764222021851283125">"সিম -এর অ্যাক্সেস"</string>
     <string name="bluetooth_a2dp_profile_summary_connected" msgid="963376081347721598">"মিডিয়া অডিওতে সংযুক্ত রয়েছে"</string>
     <string name="bluetooth_headset_profile_summary_connected" msgid="7661070206715520671">"ফোন অডিওতে সংযুক্ত"</string>
     <string name="bluetooth_opp_profile_summary_connected" msgid="2611913495968309066">"ফাইল স্থানান্তর সার্ভারের সঙ্গে সংযুক্ত"</string>
@@ -65,7 +65,7 @@
     <string name="bluetooth_pan_nap_profile_summary_connected" msgid="1561383706411975199">"ডিভাইসের সাথে স্থানীয় ইন্টারনেট সংযোগ ভাগ করছে"</string>
     <string name="bluetooth_pan_profile_summary_use_for" msgid="5664884523822068653">"ইন্টারনেট অ্যাক্সেসের জন্য ব্যবহার করুন"</string>
     <string name="bluetooth_map_profile_summary_use_for" msgid="5154200119919927434">"মানচিত্রের জন্য ব্যবহার করুন"</string>
-    <string name="bluetooth_sap_profile_summary_use_for" msgid="7085362712786907993">"SIM -এর অ্যাক্সেসের জন্য ব্যবহার করুন"</string>
+    <string name="bluetooth_sap_profile_summary_use_for" msgid="7085362712786907993">"সিম -এর অ্যাক্সেসের জন্য ব্যবহার করুন"</string>
     <string name="bluetooth_a2dp_profile_summary_use_for" msgid="4630849022250168427">"মিডিয়া অডিওয়ের জন্য ব্যবহার করুন"</string>
     <string name="bluetooth_headset_profile_summary_use_for" msgid="8705753622443862627">"ফোন অডিওয়ের জন্য ব্যবহার করুন"</string>
     <string name="bluetooth_opp_profile_summary_use_for" msgid="1255674547144769756">"ফাইল স্থানান্তরের জন্য ব্যবহার করুন"</string>
@@ -124,8 +124,8 @@
     <string name="tts_engine_settings_button" msgid="1030512042040722285">"ইঞ্জিন সেটিংস লঞ্চ করুন"</string>
     <string name="tts_engine_preference_section_title" msgid="448294500990971413">"পছন্দের ইঞ্জিন"</string>
     <string name="tts_general_section_title" msgid="4402572014604490502">"সাধারণ"</string>
-    <string name="tts_reset_speech_pitch_title" msgid="5789394019544785915">"ভাষ্য়ের শব্দ মাত্রাকে পুনরায় সেট করুন"</string>
-    <string name="tts_reset_speech_pitch_summary" msgid="8700539616245004418">"ডিফল্ট হিসাবে যে মাত্রায় পাঠ্য উচ্চারিত হয়, সেই শব্দ মাত্রাকে পুনরায় সেট করুন৷"</string>
+    <string name="tts_reset_speech_pitch_title" msgid="5789394019544785915">"ভাষ্য়ের শব্দ মাত্রাকে আবার সেট করুন"</string>
+    <string name="tts_reset_speech_pitch_summary" msgid="8700539616245004418">"ডিফল্ট হিসাবে যে মাত্রায় পাঠ্য উচ্চারিত হয়, সেই শব্দ মাত্রাকে আবার সেট করুন৷"</string>
   <string-array name="tts_rate_entries">
     <item msgid="6695494874362656215">"অত্যন্ত ধীরে"</item>
     <item msgid="4795095314303559268">"ধীর"</item>
diff --git a/packages/SettingsLib/res/values-bs/arrays.xml b/packages/SettingsLib/res/values-bs/arrays.xml
index f27f265..1c3d3bf 100644
--- a/packages/SettingsLib/res/values-bs/arrays.xml
+++ b/packages/SettingsLib/res/values-bs/arrays.xml
@@ -111,9 +111,9 @@
     <item msgid="8883739882299884241">"Stereo"</item>
   </string-array>
   <string-array name="bluetooth_a2dp_codec_ldac_playback_quality_titles">
-    <item msgid="7158319962230727476">"Optimizirano za kvalitet zvuka (990kbps/909kbps)"</item>
+    <item msgid="7158319962230727476">"Optimizirano za kvalitet zvuka (990 kbps/909 kbps)"</item>
     <item msgid="2921767058740704969">"Uravnotežen kvalitet zvuka i veze (660kbps/606kbps)"</item>
-    <item msgid="8860982705384396512">"Optimizirano za kvalitet veze (330kbps/303kbps)"</item>
+    <item msgid="8860982705384396512">"Optimizirano za kvalitet veze (330 kbps/303 kbps)"</item>
   </string-array>
   <string-array name="bluetooth_a2dp_codec_ldac_playback_quality_summaries">
     <item msgid="6398189564246596868">"Optimizirano za kvalitet zvuka"</item>
diff --git a/packages/SettingsLib/res/values-da/strings.xml b/packages/SettingsLib/res/values-da/strings.xml
index 2d36397..8071c83 100644
--- a/packages/SettingsLib/res/values-da/strings.xml
+++ b/packages/SettingsLib/res/values-da/strings.xml
@@ -202,7 +202,7 @@
     <string name="adb_keys_warning_message" msgid="5659849457135841625">"Vil du ophæve adgangen til USB-fejlfinding for alle computere, du tidligere har godkendt?"</string>
     <string name="dev_settings_warning_title" msgid="7244607768088540165">"Vil du tillade udviklingsindstillinger?"</string>
     <string name="dev_settings_warning_message" msgid="2298337781139097964">"Disse indstillinger er kun beregnet til brug i forbindelse med udvikling. De kan forårsage, at din enhed og dens applikationer går ned eller ikke fungerer korrekt."</string>
-    <string name="verify_apps_over_usb_title" msgid="4177086489869041953">"Kontrollér apps via USB"</string>
+    <string name="verify_apps_over_usb_title" msgid="4177086489869041953">"Verificer apps via USB"</string>
     <string name="verify_apps_over_usb_summary" msgid="9164096969924529200">"Kontrollér apps, der er installeret via ADB/ADT, for skadelig adfærd."</string>
     <string name="bluetooth_disable_absolute_volume_summary" msgid="6031284410786545957">"Deaktiverer funktionen til absolut lydstyrke via Bluetooth i tilfælde af problemer med lydstyrken på eksterne enheder, f.eks. uacceptabel høj lyd eller manglende kontrol."</string>
     <string name="enable_terminal_title" msgid="95572094356054120">"Lokal terminal"</string>
diff --git a/packages/SettingsLib/res/values-es/arrays.xml b/packages/SettingsLib/res/values-es/arrays.xml
index 3493c08..d5155c9 100644
--- a/packages/SettingsLib/res/values-es/arrays.xml
+++ b/packages/SettingsLib/res/values-es/arrays.xml
@@ -58,14 +58,22 @@
     <item msgid="3878793616631049349">"Utilizar comprobación de HDCP solo para contenido DRM"</item>
     <item msgid="45075631231212732">"Utilizar siempre comprobación de HDCP"</item>
   </string-array>
-    <!-- no translation found for bluetooth_a2dp_codec_titles:2 (686685526567131661) -->
-    <!-- no translation found for bluetooth_a2dp_codec_titles:3 (8910200421843557332) -->
-    <!-- no translation found for bluetooth_a2dp_codec_titles:4 (8434403964359457768) -->
-    <!-- no translation found for bluetooth_a2dp_codec_titles:5 (6751080638867012696) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:2 (6839647709301342559) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:3 (2279916056363477395) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:4 (6641171061200063516) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:5 (7950781694447359344) -->
+  <string-array name="bluetooth_a2dp_codec_titles">
+    <item msgid="7065842274271279580">"Usar preferencia del sistema (predeter.)"</item>
+    <item msgid="7539690996561263909">"SBC"</item>
+    <item msgid="686685526567131661">"AAC"</item>
+    <item msgid="8910200421843557332">"aptX"</item>
+    <item msgid="8434403964359457768">"aptX HD"</item>
+    <item msgid="6751080638867012696">"LDAC"</item>
+  </string-array>
+  <string-array name="bluetooth_a2dp_codec_summaries">
+    <item msgid="5062108632402595000">"Usar preferencia del sistema (predeter.)"</item>
+    <item msgid="6898329690939802290">"SBC"</item>
+    <item msgid="6839647709301342559">"AAC"</item>
+    <item msgid="2279916056363477395">"aptX"</item>
+    <item msgid="6641171061200063516">"aptX HD"</item>
+    <item msgid="7950781694447359344">"LDAC"</item>
+  </string-array>
   <string-array name="bluetooth_a2dp_codec_sample_rate_titles">
     <item msgid="3093023430402746802">"Usar preferencia del sistema (predeter.)"</item>
     <item msgid="8895532488906185219">"44,1 kHz"</item>
@@ -102,10 +110,16 @@
     <item msgid="8900559293912978337">"Mono"</item>
     <item msgid="8883739882299884241">"Estéreo"</item>
   </string-array>
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_titles:0 (7158319962230727476) -->
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_titles:2 (8860982705384396512) -->
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_summaries:0 (6398189564246596868) -->
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_summaries:2 (4681409244565426925) -->
+  <string-array name="bluetooth_a2dp_codec_ldac_playback_quality_titles">
+    <item msgid="7158319962230727476">"Optimizado para la calidad del audio (990 kbps/909 kbps)"</item>
+    <item msgid="2921767058740704969">"Equilibrar la calidad del audio y de la conexión (660/606&amp;nbsp;kbps)"</item>
+    <item msgid="8860982705384396512">"Optimizado para la calidad de la conexión (330 kbps/303 kbps)"</item>
+  </string-array>
+  <string-array name="bluetooth_a2dp_codec_ldac_playback_quality_summaries">
+    <item msgid="6398189564246596868">"Se ha optimizado para la calidad del audio"</item>
+    <item msgid="4327143584633311908">"Equilibrar la calidad del audio y la de la conexión"</item>
+    <item msgid="4681409244565426925">"Se ha optimizado para la calidad de la conexión"</item>
+  </string-array>
   <string-array name="select_logd_size_titles">
     <item msgid="8665206199209698501">"No"</item>
     <item msgid="1593289376502312923">"64 K"</item>
diff --git a/packages/SettingsLib/res/values-eu/arrays.xml b/packages/SettingsLib/res/values-eu/arrays.xml
index 4148a4e..e4bcf482 100644
--- a/packages/SettingsLib/res/values-eu/arrays.xml
+++ b/packages/SettingsLib/res/values-eu/arrays.xml
@@ -111,9 +111,9 @@
     <item msgid="8883739882299884241">"Estereoa"</item>
   </string-array>
   <string-array name="bluetooth_a2dp_codec_ldac_playback_quality_titles">
-    <item msgid="7158319962230727476">"Audioaren kalitatea areagotzeko optimizatua (990 kb/s / 909 kb/s)"</item>
-    <item msgid="2921767058740704969">"Orekatu audioaren eta konexioaren kalitateak (660 kbps / 606 kbps)"</item>
-    <item msgid="8860982705384396512">"Konexioaren kalitatea areagotzeko optimizatua (330 kb/s / 303 kb/s)"</item>
+    <item msgid="7158319962230727476">"Audioaren kalitatea areagotzeko optimizatua (990 Kb/s / 909 Kb/s)"</item>
+    <item msgid="2921767058740704969">"Audioaren eta konexioaren kalitate orekatua (660 Kb/s / 606 Kb/s)"</item>
+    <item msgid="8860982705384396512">"Konexioaren kalitatea areagotzeko optimizatua (330 Kb/s / 303 Kb/s)"</item>
   </string-array>
   <string-array name="bluetooth_a2dp_codec_ldac_playback_quality_summaries">
     <item msgid="6398189564246596868">"Audioaren kalitatea areagotzeko optimizatua"</item>
diff --git a/packages/SettingsLib/res/values-gu/arrays.xml b/packages/SettingsLib/res/values-gu/arrays.xml
index e871198..6eb4321 100644
--- a/packages/SettingsLib/res/values-gu/arrays.xml
+++ b/packages/SettingsLib/res/values-gu/arrays.xml
@@ -58,14 +58,22 @@
     <item msgid="3878793616631049349">"ફક્ત DRM સામગ્રી માટે HDCP તપાસનો ઉપયોગ કરો"</item>
     <item msgid="45075631231212732">"હંમેશા HDCP તપાસનો ઉપયોગ કરો"</item>
   </string-array>
-    <!-- no translation found for bluetooth_a2dp_codec_titles:2 (686685526567131661) -->
-    <!-- no translation found for bluetooth_a2dp_codec_titles:3 (8910200421843557332) -->
-    <!-- no translation found for bluetooth_a2dp_codec_titles:4 (8434403964359457768) -->
-    <!-- no translation found for bluetooth_a2dp_codec_titles:5 (6751080638867012696) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:2 (6839647709301342559) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:3 (2279916056363477395) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:4 (6641171061200063516) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:5 (7950781694447359344) -->
+  <string-array name="bluetooth_a2dp_codec_titles">
+    <item msgid="7065842274271279580">"સિસ્ટમ પસંદગીનો ઉપયોગ કરો (ડિફૉલ્ટ)"</item>
+    <item msgid="7539690996561263909">"SBC"</item>
+    <item msgid="686685526567131661">"AAC"</item>
+    <item msgid="8910200421843557332">"aptX"</item>
+    <item msgid="8434403964359457768">"aptX HD"</item>
+    <item msgid="6751080638867012696">"LDAC"</item>
+  </string-array>
+  <string-array name="bluetooth_a2dp_codec_summaries">
+    <item msgid="5062108632402595000">"સિસ્ટમ પસંદગીનો ઉપયોગ કરો (ડિફૉલ્ટ)"</item>
+    <item msgid="6898329690939802290">"SBC"</item>
+    <item msgid="6839647709301342559">"AAC"</item>
+    <item msgid="2279916056363477395">"aptX"</item>
+    <item msgid="6641171061200063516">"aptX HD"</item>
+    <item msgid="7950781694447359344">"LDAC"</item>
+  </string-array>
   <string-array name="bluetooth_a2dp_codec_sample_rate_titles">
     <item msgid="3093023430402746802">"સિસ્ટમ પસંદગીનો ઉપયોગ કરો (ડિફૉલ્ટ)"</item>
     <item msgid="8895532488906185219">"44.1 kHz"</item>
@@ -102,10 +110,16 @@
     <item msgid="8900559293912978337">"મૉનો"</item>
     <item msgid="8883739882299884241">"સ્ટીરિઓ"</item>
   </string-array>
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_titles:0 (7158319962230727476) -->
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_titles:2 (8860982705384396512) -->
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_summaries:0 (6398189564246596868) -->
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_summaries:2 (4681409244565426925) -->
+  <string-array name="bluetooth_a2dp_codec_ldac_playback_quality_titles">
+    <item msgid="7158319962230727476">"ઑડિઓની ગુણવત્તા (990 kbps/909 kbps) માટે ઓપ્ટિમાઇઝ કર્યું"</item>
+    <item msgid="2921767058740704969">"સંતુલિત ઑડિઓ અને કનેક્શનની ગુણવત્તા (660kbps/606kbps)"</item>
+    <item msgid="8860982705384396512">"કનેક્શનની ગુણવત્તા (330 kbps/303 kbps) માટે ઓપ્ટિમાઇઝ કર્યું"</item>
+  </string-array>
+  <string-array name="bluetooth_a2dp_codec_ldac_playback_quality_summaries">
+    <item msgid="6398189564246596868">"ઑડિઓની ગુણવત્તા માટે ઓપ્ટિમાઇઝ કર્યું"</item>
+    <item msgid="4327143584633311908">"સંતુલિત ઑડિઓ અને કનેક્શનની ગુણવત્તા"</item>
+    <item msgid="4681409244565426925">"કનેક્શનની ગુણવત્તા માટે ઓપ્ટિમાઇઝ કર્યું"</item>
+  </string-array>
   <string-array name="select_logd_size_titles">
     <item msgid="8665206199209698501">"બંધ"</item>
     <item msgid="1593289376502312923">"64K"</item>
diff --git a/packages/SettingsLib/res/values-hy/arrays.xml b/packages/SettingsLib/res/values-hy/arrays.xml
index 88f6e78..8925f32 100644
--- a/packages/SettingsLib/res/values-hy/arrays.xml
+++ b/packages/SettingsLib/res/values-hy/arrays.xml
@@ -111,12 +111,12 @@
     <item msgid="8883739882299884241">"Ստերեո"</item>
   </string-array>
   <string-array name="bluetooth_a2dp_codec_ldac_playback_quality_titles">
-    <item msgid="7158319962230727476">"Օպտիմալացված ձայնի որակ համար (990 կբ/վ / 909 կբ/վ)"</item>
+    <item msgid="7158319962230727476">"Օպտիմալացված ձայնի որակի համար (990 կբ/վ / 909 կբ/վ)"</item>
     <item msgid="2921767058740704969">"Ձայնի և կապի հավասարակշռված որակ (660 կբ/վ / 606 կբ/վ)"</item>
     <item msgid="8860982705384396512">"Օպտիմալացված կապի որակի համար (330 կբ/վ / 303 կբ/վ)"</item>
   </string-array>
   <string-array name="bluetooth_a2dp_codec_ldac_playback_quality_summaries">
-    <item msgid="6398189564246596868">"Օպտիմալացված ձայնի որակ համար"</item>
+    <item msgid="6398189564246596868">"Օպտիմալացված ձայնի որակի համար"</item>
     <item msgid="4327143584633311908">"Ձայնի և կապի հավասարակշռված որակ"</item>
     <item msgid="4681409244565426925">"Օպտիմալացված կապի որակի համար"</item>
   </string-array>
diff --git a/packages/SettingsLib/res/values-in/strings.xml b/packages/SettingsLib/res/values-in/strings.xml
index 12d61fe..186b79c 100644
--- a/packages/SettingsLib/res/values-in/strings.xml
+++ b/packages/SettingsLib/res/values-in/strings.xml
@@ -140,10 +140,10 @@
     <string name="choose_profile" msgid="8229363046053568878">"Pilih Profil"</string>
     <string name="category_personal" msgid="1299663247844969448">"Pribadi"</string>
     <string name="category_work" msgid="8699184680584175622">"Kantor"</string>
-    <string name="development_settings_title" msgid="215179176067683667">"Opsi pengembang"</string>
-    <string name="development_settings_enable" msgid="542530994778109538">"Aktifkan opsi pengembang"</string>
+    <string name="development_settings_title" msgid="215179176067683667">"Opsi developer"</string>
+    <string name="development_settings_enable" msgid="542530994778109538">"Aktifkan opsi developer"</string>
     <string name="development_settings_summary" msgid="1815795401632854041">"Menyetel opsi untuk pengembangan apl"</string>
-    <string name="development_settings_not_available" msgid="4308569041701535607">"Opsi pengembang tidak tersedia untuk pengguna ini"</string>
+    <string name="development_settings_not_available" msgid="4308569041701535607">"Opsi developer tidak tersedia untuk pengguna ini"</string>
     <string name="vpn_settings_not_available" msgid="956841430176985598">"Setelan VPN tidak tersedia untuk pengguna ini"</string>
     <string name="tethering_settings_not_available" msgid="6765770438438291012">"Setelan Penambatan tidak tersedia untuk pengguna ini"</string>
     <string name="apn_settings_not_available" msgid="7873729032165324000">"Setelan Nama Titik Akses tidak tersedia untuk pengguna ini"</string>
diff --git a/packages/SettingsLib/res/values-kn/arrays.xml b/packages/SettingsLib/res/values-kn/arrays.xml
index 73851a4..c729b42 100644
--- a/packages/SettingsLib/res/values-kn/arrays.xml
+++ b/packages/SettingsLib/res/values-kn/arrays.xml
@@ -58,14 +58,22 @@
     <item msgid="3878793616631049349">"DRM ವಿಷಯಗಳಿಗೆ ಮಾತ್ರ HDCP ಪರೀಕ್ಷಿಸುವಿಕೆಯನ್ನು ಬಳಸು"</item>
     <item msgid="45075631231212732">"HDCP ಪರಿಶೀಲನೆಯನ್ನು ಯಾವಾಗಲೂ ಬಳಸು"</item>
   </string-array>
-    <!-- no translation found for bluetooth_a2dp_codec_titles:2 (686685526567131661) -->
-    <!-- no translation found for bluetooth_a2dp_codec_titles:3 (8910200421843557332) -->
-    <!-- no translation found for bluetooth_a2dp_codec_titles:4 (8434403964359457768) -->
-    <!-- no translation found for bluetooth_a2dp_codec_titles:5 (6751080638867012696) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:2 (6839647709301342559) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:3 (2279916056363477395) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:4 (6641171061200063516) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:5 (7950781694447359344) -->
+  <string-array name="bluetooth_a2dp_codec_titles">
+    <item msgid="7065842274271279580">"ಸಿಸ್ಟಂ ಆಯ್ಕೆಯನ್ನು ಬಳಸಿ (ಡಿಫಾಲ್ಟ್)"</item>
+    <item msgid="7539690996561263909">"SBC"</item>
+    <item msgid="686685526567131661">"AAC"</item>
+    <item msgid="8910200421843557332">"aptX"</item>
+    <item msgid="8434403964359457768">"aptX HD"</item>
+    <item msgid="6751080638867012696">"LDAC"</item>
+  </string-array>
+  <string-array name="bluetooth_a2dp_codec_summaries">
+    <item msgid="5062108632402595000">"ಸಿಸ್ಟಂ ಆಯ್ಕೆಯನ್ನು ಬಳಸಿ (ಡಿಫಾಲ್ಟ್)"</item>
+    <item msgid="6898329690939802290">"SBC"</item>
+    <item msgid="6839647709301342559">"AAC"</item>
+    <item msgid="2279916056363477395">"aptX"</item>
+    <item msgid="6641171061200063516">"aptX HD"</item>
+    <item msgid="7950781694447359344">"LDAC"</item>
+  </string-array>
   <string-array name="bluetooth_a2dp_codec_sample_rate_titles">
     <item msgid="3093023430402746802">"ಸಿಸ್ಟಂ ಆಯ್ಕೆಯನ್ನು ಬಳಸಿ (ಡಿಫಾಲ್ಟ್)"</item>
     <item msgid="8895532488906185219">"44.1 kHz"</item>
@@ -102,10 +110,16 @@
     <item msgid="8900559293912978337">"ಮೊನೊ"</item>
     <item msgid="8883739882299884241">"ಸ್ಟೀರಿಯೊ"</item>
   </string-array>
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_titles:0 (7158319962230727476) -->
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_titles:2 (8860982705384396512) -->
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_summaries:0 (6398189564246596868) -->
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_summaries:2 (4681409244565426925) -->
+  <string-array name="bluetooth_a2dp_codec_ldac_playback_quality_titles">
+    <item msgid="7158319962230727476">"ಆಡಿಯೋ ಗುಣಮಟ್ಟಕ್ಕಾಗಿ (990kbps/909kbps) ಆಪ್ಟಿಮೈಸ್ ಮಾಡಲಾಗಿದೆ"</item>
+    <item msgid="2921767058740704969">"ಸಂತುಲಿತ ಆಡಿಯೊ ಮತ್ತು ಸಂಪರ್ಕದ ಗುಣಮಟ್ಟ (660kbps/606kbps)"</item>
+    <item msgid="8860982705384396512">"ಸಂಪರ್ಕದ ಗುಣಮಟ್ಟಕ್ಕಾಗಿ (330kbps/303kbps) ಆಪ್ಟಿಮೈಸ್ ಮಾಡಲಾಗಿದೆ"</item>
+  </string-array>
+  <string-array name="bluetooth_a2dp_codec_ldac_playback_quality_summaries">
+    <item msgid="6398189564246596868">"ಆಡಿಯೊ ಗುಣಮಟ್ಟಕ್ಕಾಗಿ ಆಪ್ಟಿಮೈಸ್‌ ಮಾಡಲಾಗಿದೆ"</item>
+    <item msgid="4327143584633311908">"ಸಂತುಲಿತ ಆಡಿಯೊ ಮತ್ತು ಸಂಪರ್ಕದ ಗುಣಮಟ್ಟ"</item>
+    <item msgid="4681409244565426925">"ಸಂಪರ್ಕ ಗುಣಮಟ್ಟಕ್ಕಾಗಿ ಆಪ್ಟಿಮೈಸ್ ಮಾಡಲಾಗಿದೆ"</item>
+  </string-array>
   <string-array name="select_logd_size_titles">
     <item msgid="8665206199209698501">"ಆಫ್"</item>
     <item msgid="1593289376502312923">"64K"</item>
diff --git a/packages/SettingsLib/res/values-ky/arrays.xml b/packages/SettingsLib/res/values-ky/arrays.xml
index f00ebe5..4d1a685 100644
--- a/packages/SettingsLib/res/values-ky/arrays.xml
+++ b/packages/SettingsLib/res/values-ky/arrays.xml
@@ -111,14 +111,14 @@
     <item msgid="8883739882299884241">"Стерео"</item>
   </string-array>
   <string-array name="bluetooth_a2dp_codec_ldac_playback_quality_titles">
-    <item msgid="7158319962230727476">"Аудио сапаты үчүн оптималдаштырылды (990кб/сек./909кб/сек.)"</item>
+    <item msgid="7158319962230727476">"Аудионун сапатын оптималдаштыруу (990кб/сек./909кб/сек.)"</item>
     <item msgid="2921767058740704969">"Теңделген аудио жана туташуу сапаты (660кб/сек./606кб/сек.)"</item>
-    <item msgid="8860982705384396512">"Туташуу сапаты үчүн оптималдаштырылды (330кб/сек./303кб/сек.)"</item>
+    <item msgid="8860982705384396512">"Туташуунун сапатын оптималдаштыруу (330кб/сек./303кб/сек.)"</item>
   </string-array>
   <string-array name="bluetooth_a2dp_codec_ldac_playback_quality_summaries">
-    <item msgid="6398189564246596868">"Аудио сапаты үчүн оптималдаштырылды"</item>
+    <item msgid="6398189564246596868">"Аудионун сапатын оптималдаштыруу"</item>
     <item msgid="4327143584633311908">"Теңделген аудио жана туташуу сапаты"</item>
-    <item msgid="4681409244565426925">"Туташуу сапаты үчүн оптималдаштырылды"</item>
+    <item msgid="4681409244565426925">"Туташуунун сапатын оптималдаштыруу"</item>
   </string-array>
   <string-array name="select_logd_size_titles">
     <item msgid="8665206199209698501">"Өчүк"</item>
diff --git a/packages/SettingsLib/res/values-ml/arrays.xml b/packages/SettingsLib/res/values-ml/arrays.xml
index bb05b8c..e79a567 100644
--- a/packages/SettingsLib/res/values-ml/arrays.xml
+++ b/packages/SettingsLib/res/values-ml/arrays.xml
@@ -58,14 +58,22 @@
     <item msgid="3878793616631049349">"DRM ഉള്ളടക്കത്തിനുമാത്രമായി HDCP പരിശോധന ഉപയോഗിക്കുക"</item>
     <item msgid="45075631231212732">"എല്ലായ്‌പ്പോഴും HDCP പരിശോധന ഉപയോഗിക്കുക"</item>
   </string-array>
-    <!-- no translation found for bluetooth_a2dp_codec_titles:2 (686685526567131661) -->
-    <!-- no translation found for bluetooth_a2dp_codec_titles:3 (8910200421843557332) -->
-    <!-- no translation found for bluetooth_a2dp_codec_titles:4 (8434403964359457768) -->
-    <!-- no translation found for bluetooth_a2dp_codec_titles:5 (6751080638867012696) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:2 (6839647709301342559) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:3 (2279916056363477395) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:4 (6641171061200063516) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:5 (7950781694447359344) -->
+  <string-array name="bluetooth_a2dp_codec_titles">
+    <item msgid="7065842274271279580">"സിസ്റ്റം സെലക്ഷൻ ഉപയോഗിക്കൂ ‌(ഡിഫോൾട്ട്)"</item>
+    <item msgid="7539690996561263909">"SBC"</item>
+    <item msgid="686685526567131661">"AAC"</item>
+    <item msgid="8910200421843557332">"aptX"</item>
+    <item msgid="8434403964359457768">"aptX HD"</item>
+    <item msgid="6751080638867012696">"LDAC"</item>
+  </string-array>
+  <string-array name="bluetooth_a2dp_codec_summaries">
+    <item msgid="5062108632402595000">"സിസ്റ്റം സെലക്ഷൻ ഉപയോഗിക്കൂ ‌(ഡിഫോൾട്ട്)"</item>
+    <item msgid="6898329690939802290">"SBC"</item>
+    <item msgid="6839647709301342559">"AAC"</item>
+    <item msgid="2279916056363477395">"aptX"</item>
+    <item msgid="6641171061200063516">"aptX HD"</item>
+    <item msgid="7950781694447359344">"LDAC"</item>
+  </string-array>
   <string-array name="bluetooth_a2dp_codec_sample_rate_titles">
     <item msgid="3093023430402746802">"സിസ്റ്റം സെലക്ഷൻ ഉപയോഗിക്കൂ ‌(ഡിഫോൾട്ട്)"</item>
     <item msgid="8895532488906185219">"44.1 kHz"</item>
@@ -102,10 +110,16 @@
     <item msgid="8900559293912978337">"മോണോ"</item>
     <item msgid="8883739882299884241">"സ്റ്റീരിയോ"</item>
   </string-array>
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_titles:0 (7158319962230727476) -->
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_titles:2 (8860982705384396512) -->
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_summaries:0 (6398189564246596868) -->
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_summaries:2 (4681409244565426925) -->
+  <string-array name="bluetooth_a2dp_codec_ldac_playback_quality_titles">
+    <item msgid="7158319962230727476">"ശബ്‌ദനിലവാരമുയർത്താൻ ഒപ്‌റ്റിമൈസ് ചെയ്‌തു (990kbps/909kbps)"</item>
+    <item msgid="2921767058740704969">"സന്തുലിതമായ ‌ഓഡിയോ/കണക്ഷൻ നിലവാരം (660kbps/606kbps)"</item>
+    <item msgid="8860982705384396512">"കണക്ഷൻ നിലവാരമുയർത്താൻ ഒപ്‌റ്റിമൈസ് ചെയ്‌തു (330kbps/303kbps)"</item>
+  </string-array>
+  <string-array name="bluetooth_a2dp_codec_ldac_playback_quality_summaries">
+    <item msgid="6398189564246596868">"ശബ്‌ദനിലവാരമുയർത്താൻ ഒപ്‌റ്റിമൈസ് ചെയ്‌തു"</item>
+    <item msgid="4327143584633311908">"സന്തുലിതമായ ‌ഓഡിയോ/കണക്ഷൻ നിലവാരം"</item>
+    <item msgid="4681409244565426925">"കണക്ഷൻ നിലവാരമുയർത്താൻ ഒപ്‌റ്റിമൈസ് ചെയ്‌തു"</item>
+  </string-array>
   <string-array name="select_logd_size_titles">
     <item msgid="8665206199209698501">"ഓഫ്"</item>
     <item msgid="1593289376502312923">"64K"</item>
diff --git a/packages/SettingsLib/res/values-mr/arrays.xml b/packages/SettingsLib/res/values-mr/arrays.xml
index 751b7be..e83b1f9 100644
--- a/packages/SettingsLib/res/values-mr/arrays.xml
+++ b/packages/SettingsLib/res/values-mr/arrays.xml
@@ -58,14 +58,22 @@
     <item msgid="3878793616631049349">"केवळ DRM सामग्रीसाठी HDCP तपासणी वापरा"</item>
     <item msgid="45075631231212732">"नेहमी HDCP तपासणी वापरा"</item>
   </string-array>
-    <!-- no translation found for bluetooth_a2dp_codec_titles:2 (686685526567131661) -->
-    <!-- no translation found for bluetooth_a2dp_codec_titles:3 (8910200421843557332) -->
-    <!-- no translation found for bluetooth_a2dp_codec_titles:4 (8434403964359457768) -->
-    <!-- no translation found for bluetooth_a2dp_codec_titles:5 (6751080638867012696) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:2 (6839647709301342559) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:3 (2279916056363477395) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:4 (6641171061200063516) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:5 (7950781694447359344) -->
+  <string-array name="bluetooth_a2dp_codec_titles">
+    <item msgid="7065842274271279580">"प्रणाली निवड वापरा (डीफॉल्ट)"</item>
+    <item msgid="7539690996561263909">"SBC"</item>
+    <item msgid="686685526567131661">"AAC"</item>
+    <item msgid="8910200421843557332">"aptX"</item>
+    <item msgid="8434403964359457768">"aptX HD"</item>
+    <item msgid="6751080638867012696">"LDAC"</item>
+  </string-array>
+  <string-array name="bluetooth_a2dp_codec_summaries">
+    <item msgid="5062108632402595000">"प्रणाली निवड वापरा (डीफॉल्ट)"</item>
+    <item msgid="6898329690939802290">"SBC"</item>
+    <item msgid="6839647709301342559">"AAC"</item>
+    <item msgid="2279916056363477395">"aptX"</item>
+    <item msgid="6641171061200063516">"aptX HD"</item>
+    <item msgid="7950781694447359344">"LDAC"</item>
+  </string-array>
   <string-array name="bluetooth_a2dp_codec_sample_rate_titles">
     <item msgid="3093023430402746802">"प्रणाली निवड वापरा (डीफॉल्ट)"</item>
     <item msgid="8895532488906185219">"44.1 kHz"</item>
@@ -102,10 +110,16 @@
     <item msgid="8900559293912978337">"मोनो"</item>
     <item msgid="8883739882299884241">"स्टिरिओ"</item>
   </string-array>
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_titles:0 (7158319962230727476) -->
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_titles:2 (8860982705384396512) -->
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_summaries:0 (6398189564246596868) -->
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_summaries:2 (4681409244565426925) -->
+  <string-array name="bluetooth_a2dp_codec_ldac_playback_quality_titles">
+    <item msgid="7158319962230727476">"ऑडिओ गुणवत्ता (990kbps/909kbps) साठी ऑप्टिमाइझ केली"</item>
+    <item msgid="2921767058740704969">"संतुलित ऑडिओ आणि कनेक्शन गुणवत्ता (660kbps/606kbps)"</item>
+    <item msgid="8860982705384396512">"कनेक्शन गुणवत्ता (330kbps/303kbps) साठी ऑप्टिमाइझ केली"</item>
+  </string-array>
+  <string-array name="bluetooth_a2dp_codec_ldac_playback_quality_summaries">
+    <item msgid="6398189564246596868">"ऑडिओ गुणवत्तेसाठी ऑप्टिमाइझ केले"</item>
+    <item msgid="4327143584633311908">"संतुलित ऑडिओ आणि कनेक्शन गुणवत्ता"</item>
+    <item msgid="4681409244565426925">"कनेक्शन गुणवत्तेसाठी ऑप्टिमाइझ केले"</item>
+  </string-array>
   <string-array name="select_logd_size_titles">
     <item msgid="8665206199209698501">"बंद"</item>
     <item msgid="1593289376502312923">"64K"</item>
diff --git a/packages/SettingsLib/res/values-ne/arrays.xml b/packages/SettingsLib/res/values-ne/arrays.xml
index 46a758e..cee130b 100644
--- a/packages/SettingsLib/res/values-ne/arrays.xml
+++ b/packages/SettingsLib/res/values-ne/arrays.xml
@@ -58,14 +58,22 @@
     <item msgid="3878793616631049349">"DRM सामग्रीको लागि मात्र HDCP जाँचको प्रयोग गर्नुहोस्"</item>
     <item msgid="45075631231212732">"सधैँ HDCP जाँच प्रयोग गर्नुहोस्"</item>
   </string-array>
-    <!-- no translation found for bluetooth_a2dp_codec_titles:2 (686685526567131661) -->
-    <!-- no translation found for bluetooth_a2dp_codec_titles:3 (8910200421843557332) -->
-    <!-- no translation found for bluetooth_a2dp_codec_titles:4 (8434403964359457768) -->
-    <!-- no translation found for bluetooth_a2dp_codec_titles:5 (6751080638867012696) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:2 (6839647709301342559) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:3 (2279916056363477395) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:4 (6641171061200063516) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:5 (7950781694447359344) -->
+  <string-array name="bluetooth_a2dp_codec_titles">
+    <item msgid="7065842274271279580">"प्रणालीको चयन प्रयोग गर्नुहोस् (पूर्वनिर्धारित)"</item>
+    <item msgid="7539690996561263909">"SBC"</item>
+    <item msgid="686685526567131661">"AAC"</item>
+    <item msgid="8910200421843557332">"aptX"</item>
+    <item msgid="8434403964359457768">"aptX HD"</item>
+    <item msgid="6751080638867012696">"LDAC"</item>
+  </string-array>
+  <string-array name="bluetooth_a2dp_codec_summaries">
+    <item msgid="5062108632402595000">"प्रणालीको चयन प्रयोग गर्नुहोस् (पूर्वनिर्धारित)"</item>
+    <item msgid="6898329690939802290">"SBC"</item>
+    <item msgid="6839647709301342559">"AAC"</item>
+    <item msgid="2279916056363477395">"aptX"</item>
+    <item msgid="6641171061200063516">"aptX HD"</item>
+    <item msgid="7950781694447359344">"LDAC"</item>
+  </string-array>
   <string-array name="bluetooth_a2dp_codec_sample_rate_titles">
     <item msgid="3093023430402746802">"प्रणालीको चयन प्रयोग गर्नुहोस् (पूर्वनिर्धारित)"</item>
     <item msgid="8895532488906185219">"४४.१ kHz"</item>
@@ -102,10 +110,16 @@
     <item msgid="8900559293912978337">"मोनो"</item>
     <item msgid="8883739882299884241">"स्टेरियो"</item>
   </string-array>
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_titles:0 (7158319962230727476) -->
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_titles:2 (8860982705384396512) -->
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_summaries:0 (6398189564246596868) -->
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_summaries:2 (4681409244565426925) -->
+  <string-array name="bluetooth_a2dp_codec_ldac_playback_quality_titles">
+    <item msgid="7158319962230727476">"अडियोको गुणस्तर सुधार्न अनुकूलन गरिएको (990kbps/909kbps)"</item>
+    <item msgid="2921767058740704969">"सन्तुलित अडियो र जडान गुणस्तर (६६०kbps/६०६kbps)"</item>
+    <item msgid="8860982705384396512">"जडानको गुणस्तर सुधार्न अनुकूलन गरिएको (330kbps/303kbps)"</item>
+  </string-array>
+  <string-array name="bluetooth_a2dp_codec_ldac_playback_quality_summaries">
+    <item msgid="6398189564246596868">"अडियोको गुणस्तर सुधार्न अनुकूलन गरिएको"</item>
+    <item msgid="4327143584633311908">"सन्तुलित अडियो र जडान गुणस्तर"</item>
+    <item msgid="4681409244565426925">"जडानको गुणस्तर सुधार्न अनुकूलन गरिएको"</item>
+  </string-array>
   <string-array name="select_logd_size_titles">
     <item msgid="8665206199209698501">"निष्क्रिय गर्नुहोस्"</item>
     <item msgid="1593289376502312923">"६४के"</item>
diff --git a/packages/SettingsLib/res/values-ne/strings.xml b/packages/SettingsLib/res/values-ne/strings.xml
index c6c7fd3..8df60f3 100644
--- a/packages/SettingsLib/res/values-ne/strings.xml
+++ b/packages/SettingsLib/res/values-ne/strings.xml
@@ -199,7 +199,7 @@
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Wi-Fi सक्रिय हुँदा पनि मोबाइल डेटा सधैँ सक्रिय राख्नुहोस् (द्रूत नेटवर्क स्विच गर्नको लागि)।"</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"USB डिबग गर्न लागि अनुमति दिने हो?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"युएसबी डिबगिङ विकास प्रयोजनका लागि मात्र निर्मित हुन्छ। यसलाई तपाईँको कम्प्युटर र तपाईँको उपकरणका बीच डेटा प्रतिलिपि गर्न, बिना सूचना तपाईँको उपकरणमा अनुप्रयोगहरू स्थापना गर्न र लग डेटा पढ्नका लागि प्रयोग गर्नुहोस्।"</string>
-    <string name="adb_keys_warning_message" msgid="5659849457135841625">"तपाईँ पहिले नै अधिकृत गर्नुभएका सबै कम्प्यूटरबाट USB डिबग गर्नको लागि पहुँच रद्द गर्ने हो?"</string>
+    <string name="adb_keys_warning_message" msgid="5659849457135841625">"तपाईं पहिले नै अधिकृत गर्नुभएका सबै कम्प्यूटरबाट USB डिबग गर्नको लागि पहुँच रद्द गर्ने हो?"</string>
     <string name="dev_settings_warning_title" msgid="7244607768088540165">"विकास सेटिङहरू अनुमति दिने हो?"</string>
     <string name="dev_settings_warning_message" msgid="2298337781139097964">"यी सेटिङहरू केवल विकास प्रयोगको लागि विचार गरिएको हो। तिनीहरूले तपाईंको उपकरण र अनुप्रयोगहरूलाई विच्छेदन गर्न वा दुर्व्यवहार गर्न सक्दछ।"</string>
     <string name="verify_apps_over_usb_title" msgid="4177086489869041953">"USB मा अनुप्रयोगहरू रुजु गर्नुहोस्"</string>
diff --git a/packages/SettingsLib/res/values-ur/arrays.xml b/packages/SettingsLib/res/values-ur/arrays.xml
index 1f94398..7ad1d17 100644
--- a/packages/SettingsLib/res/values-ur/arrays.xml
+++ b/packages/SettingsLib/res/values-ur/arrays.xml
@@ -58,14 +58,22 @@
     <item msgid="3878793616631049349">"‏HDCP چیکنگ صرف DRM مواد کیلئے استعمال کریں"</item>
     <item msgid="45075631231212732">"‏ہمیشہ HDCP چیکنگ استعمال کریں"</item>
   </string-array>
-    <!-- no translation found for bluetooth_a2dp_codec_titles:2 (686685526567131661) -->
-    <!-- no translation found for bluetooth_a2dp_codec_titles:3 (8910200421843557332) -->
-    <!-- no translation found for bluetooth_a2dp_codec_titles:4 (8434403964359457768) -->
-    <!-- no translation found for bluetooth_a2dp_codec_titles:5 (6751080638867012696) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:2 (6839647709301342559) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:3 (2279916056363477395) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:4 (6641171061200063516) -->
-    <!-- no translation found for bluetooth_a2dp_codec_summaries:5 (7950781694447359344) -->
+  <string-array name="bluetooth_a2dp_codec_titles">
+    <item msgid="7065842274271279580">"سسٹم انتخاب کا استعمال کریں (ڈیفالٹ)"</item>
+    <item msgid="7539690996561263909">"SBC"</item>
+    <item msgid="686685526567131661">"AAC"</item>
+    <item msgid="8910200421843557332">"aptX"</item>
+    <item msgid="8434403964359457768">"aptX HD"</item>
+    <item msgid="6751080638867012696">"LDAC"</item>
+  </string-array>
+  <string-array name="bluetooth_a2dp_codec_summaries">
+    <item msgid="5062108632402595000">"سسٹم انتخاب کا استعمال کریں (ڈیفالٹ)"</item>
+    <item msgid="6898329690939802290">"SBC"</item>
+    <item msgid="6839647709301342559">"AAC"</item>
+    <item msgid="2279916056363477395">"aptX"</item>
+    <item msgid="6641171061200063516">"aptX HD"</item>
+    <item msgid="7950781694447359344">"LDAC"</item>
+  </string-array>
   <string-array name="bluetooth_a2dp_codec_sample_rate_titles">
     <item msgid="3093023430402746802">"سسٹم انتخاب کا استعمال کریں (ڈیفالٹ)"</item>
     <item msgid="8895532488906185219">"44.1 kHz"</item>
@@ -102,10 +110,16 @@
     <item msgid="8900559293912978337">"مونو"</item>
     <item msgid="8883739882299884241">"اسٹیریو"</item>
   </string-array>
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_titles:0 (7158319962230727476) -->
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_titles:2 (8860982705384396512) -->
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_summaries:0 (6398189564246596868) -->
-    <!-- no translation found for bluetooth_a2dp_codec_ldac_playback_quality_summaries:2 (4681409244565426925) -->
+  <string-array name="bluetooth_a2dp_codec_ldac_playback_quality_titles">
+    <item msgid="7158319962230727476">"‏آڈیو کے معیار کیلئے بہتر بنایا گيا (990kbps/909kbps)"</item>
+    <item msgid="2921767058740704969">"‏متوازن آڈیو اور کنکشن کا معیار (660kbps/606kbps)"</item>
+    <item msgid="8860982705384396512">"‏کنکشن کے معیار کیلئے بہتر بنایا گيا (330kbps/303kbps)"</item>
+  </string-array>
+  <string-array name="bluetooth_a2dp_codec_ldac_playback_quality_summaries">
+    <item msgid="6398189564246596868">"آڈیو کے معیار کیلئے بہتر بنایا گيا"</item>
+    <item msgid="4327143584633311908">"متوازن آڈیو اور کنکشن کا معیار"</item>
+    <item msgid="4681409244565426925">"کنکشن کے معیار کیلئے بہتر بنایا گيا"</item>
+  </string-array>
   <string-array name="select_logd_size_titles">
     <item msgid="8665206199209698501">"آف"</item>
     <item msgid="1593289376502312923">"64K"</item>
diff --git a/packages/SettingsLib/res/values/arrays.xml b/packages/SettingsLib/res/values/arrays.xml
index 7bbca5e..eb64b3a 100644
--- a/packages/SettingsLib/res/values/arrays.xml
+++ b/packages/SettingsLib/res/values/arrays.xml
@@ -520,4 +520,37 @@
         <item>7</item>
     </integer-array>
 
+    <!-- BatteryMeterView parameters -->
+    <array name="batterymeter_color_levels">
+        <item>15</item>
+        <item>100</item>
+    </array>
+    <array name="batterymeter_color_values">
+        <item>@*android:color/battery_saver_mode_color</item>
+        <item>@android:color/white</item>
+    </array>
+    <array name="batterymeter_bolt_points">
+        <item>73</item> <item>0</item>
+        <item>392</item><item>0</item>
+        <item>201</item><item>259</item>
+        <item>442</item><item>259</item>
+        <item>4</item>  <item>703</item>
+        <item>157</item><item>334</item>
+        <item>0</item>  <item>334</item>
+    </array>
+    <array name="batterymeter_plus_points">
+        <item>3</item><item>0</item>
+        <item>5</item><item>0</item>
+        <item>5</item><item>3</item>
+        <item>8</item><item>3</item>
+        <item>8</item><item>5</item>
+        <item>5</item><item>5</item>
+        <item>5</item><item>8</item>
+        <item>3</item><item>8</item>
+        <item>3</item><item>5</item>
+        <item>0</item><item>5</item>
+        <item>0</item><item>3</item>
+        <item>3</item><item>3</item>
+    </array>
+
 </resources>
diff --git a/packages/SettingsLib/res/values/dimens.xml b/packages/SettingsLib/res/values/dimens.xml
index 2e8b30f..aa36617 100644
--- a/packages/SettingsLib/res/values/dimens.xml
+++ b/packages/SettingsLib/res/values/dimens.xml
@@ -57,4 +57,15 @@
     <dimen name="drawer_width">300dp</dimen>
     <dimen name="drawer_item_top_bottom_margin">4dp</dimen>
     <dimen name="drawer_spacer_height">32dp</dimen>
+
+    <dimen name="battery_height">14.5dp</dimen>
+    <dimen name="battery_width">9.5dp</dimen>
+
+    <!-- Margin on the right side of the system icon group on Keyguard. -->
+    <fraction name="battery_button_height_fraction">10.5%</fraction>
+
+    <!-- Fraction value to smooth the edges of the battery icon. The path will be inset by this
+         fraction of a pixel.-->
+    <fraction name="battery_subpixel_smoothing_left">0%</fraction>
+    <fraction name="battery_subpixel_smoothing_right">0%</fraction>
 </resources>
diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml
index 0129632..5475b32 100644
--- a/packages/SettingsLib/res/values/strings.xml
+++ b/packages/SettingsLib/res/values/strings.xml
@@ -900,4 +900,7 @@
     <string name="retail_demo_reset_next">Next</string>
     <!-- Title for carrier demo mode factory reset confirmation dialog. [CHAR LIMIT=40] -->
     <string name="retail_demo_reset_title">Password required</string>
+
+    <!-- Glyph to be overlaid atop the battery when the level is extremely low. Do not translate. -->
+    <string name="battery_meter_very_low_overlay_symbol">!</string>
 </resources>
diff --git a/packages/SettingsLib/src/com/android/settingslib/RestrictedPreferenceHelper.java b/packages/SettingsLib/src/com/android/settingslib/RestrictedPreferenceHelper.java
index d0aba22..8e3a6c5 100644
--- a/packages/SettingsLib/src/com/android/settingslib/RestrictedPreferenceHelper.java
+++ b/packages/SettingsLib/src/com/android/settingslib/RestrictedPreferenceHelper.java
@@ -22,6 +22,7 @@
 import android.os.UserHandle;
 import android.support.v7.preference.Preference;
 import android.support.v7.preference.PreferenceViewHolder;
+import android.text.TextUtils;
 import android.util.AttributeSet;
 import android.util.TypedValue;
 import android.view.View;
@@ -88,11 +89,13 @@
         if (mUseAdminDisabledSummary) {
             final TextView summaryView = (TextView) holder.findViewById(android.R.id.summary);
             if (summaryView != null) {
+                final CharSequence disabledText = summaryView.getContext().getText(
+                        R.string.disabled_by_admin_summary_text);
                 if (mDisabledByAdmin) {
-                    summaryView.setText(R.string.disabled_by_admin_summary_text);
-                    summaryView.setVisibility(View.VISIBLE);
-                } else {
-                    summaryView.setVisibility(View.GONE);
+                    summaryView.setText(disabledText);
+                } else if (TextUtils.equals(disabledText, summaryView.getText())) {
+                    // It's previously set to disabled text, clear it.
+                    summaryView.setText(null);
                 }
             }
         }
diff --git a/packages/SettingsLib/src/com/android/settingslib/SuggestionParser.java b/packages/SettingsLib/src/com/android/settingslib/SuggestionParser.java
index 13bbc33..4b0ab59 100644
--- a/packages/SettingsLib/src/com/android/settingslib/SuggestionParser.java
+++ b/packages/SettingsLib/src/com/android/settingslib/SuggestionParser.java
@@ -94,16 +94,27 @@
 
     private static final long MILLIS_IN_DAY = 24 * 60 * 60 * 1000;
 
+    // Default dismiss control for smart suggestions.
+    private static final String DEFAULT_SMART_DISMISS_CONTROL = "0,10";
+
     private final Context mContext;
     private final List<SuggestionCategory> mSuggestionList;
     private final ArrayMap<Pair<String, String>, Tile> mAddCache = new ArrayMap<>();
     private final SharedPreferences mSharedPrefs;
+    private final String mSmartDismissControl;
 
-    public SuggestionParser(Context context, SharedPreferences sharedPrefs, int orderXml) {
+
+    public SuggestionParser(
+        Context context, SharedPreferences sharedPrefs, int orderXml, String smartDismissControl) {
         mContext = context;
         mSuggestionList = (List<SuggestionCategory>) new SuggestionOrderInflater(mContext)
                 .parse(orderXml);
         mSharedPrefs = sharedPrefs;
+        mSmartDismissControl = smartDismissControl;
+    }
+
+    public SuggestionParser(Context context, SharedPreferences sharedPrefs, int orderXml) {
+       this(context, sharedPrefs, orderXml, DEFAULT_SMART_DISMISS_CONTROL);
     }
 
     @VisibleForTesting
@@ -111,26 +122,35 @@
         mContext = context;
         mSuggestionList = new ArrayList<SuggestionCategory>();
         mSharedPrefs = sharedPrefs;
+        mSmartDismissControl = DEFAULT_SMART_DISMISS_CONTROL;
         Log.wtf(TAG, "Only use this constructor for testing");
     }
 
     public List<Tile> getSuggestions() {
+        return getSuggestions(false);
+    }
+
+    public List<Tile> getSuggestions(boolean isSmartSuggestionEnabled) {
         List<Tile> suggestions = new ArrayList<>();
         final int N = mSuggestionList.size();
         for (int i = 0; i < N; i++) {
-            readSuggestions(mSuggestionList.get(i), suggestions);
+            readSuggestions(mSuggestionList.get(i), suggestions, isSmartSuggestionEnabled);
         }
         return suggestions;
     }
 
+    public boolean dismissSuggestion(Tile suggestion) {
+        return dismissSuggestion(suggestion, false);
+    }
+
     /**
      * Dismisses a suggestion, returns true if the suggestion has no more dismisses left and should
      * be disabled.
      */
-    public boolean dismissSuggestion(Tile suggestion) {
+    public boolean dismissSuggestion(Tile suggestion, boolean isSmartSuggestionEnabled) {
         String keyBase = suggestion.intent.getComponent().flattenToShortString();
         int index = mSharedPrefs.getInt(keyBase + DISMISS_INDEX, 0);
-        String dismissControl = suggestion.metaData.getString(META_DATA_DISMISS_CONTROL);
+        String dismissControl = getDismissControl(suggestion, isSmartSuggestionEnabled);
         if (dismissControl == null || parseDismissString(dismissControl).length == index) {
             return true;
         }
@@ -141,20 +161,23 @@
     }
 
     @VisibleForTesting
-    public void filterSuggestions(List<Tile> suggestions, int countBefore) {
+    public void filterSuggestions(
+        List<Tile> suggestions, int countBefore, boolean isSmartSuggestionEnabled) {
         for (int i = countBefore; i < suggestions.size(); i++) {
             if (!isAvailable(suggestions.get(i)) ||
                     !isSupported(suggestions.get(i)) ||
                     !satisifesRequiredUserType(suggestions.get(i)) ||
                     !satisfiesRequiredAccount(suggestions.get(i)) ||
                     !satisfiesConnectivity(suggestions.get(i)) ||
-                    isDismissed(suggestions.get(i))) {
+                    isDismissed(suggestions.get(i), isSmartSuggestionEnabled)) {
                 suggestions.remove(i--);
             }
         }
     }
 
-    private void readSuggestions(SuggestionCategory category, List<Tile> suggestions) {
+    @VisibleForTesting
+    void readSuggestions(
+        SuggestionCategory category, List<Tile> suggestions, boolean isSmartSuggestionEnabled) {
         int countBefore = suggestions.size();
         Intent intent = new Intent(Intent.ACTION_MAIN);
         intent.addCategory(category.category);
@@ -163,7 +186,7 @@
         }
         TileUtils.getTilesForIntent(mContext, new UserHandle(UserHandle.myUserId()), intent,
                 mAddCache, null, suggestions, true, false);
-        filterSuggestions(suggestions, countBefore);
+        filterSuggestions(suggestions, countBefore, isSmartSuggestionEnabled);
         if (!category.multiple && suggestions.size() > (countBefore + 1)) {
             // If there are too many, remove them all and only re-add the one with the highest
             // priority.
@@ -288,12 +311,11 @@
         Settings.Secure.putInt(mContext.getContentResolver(), name, 1);
     }
 
-    private boolean isDismissed(Tile suggestion) {
-        Object dismissObj = suggestion.metaData.get(META_DATA_DISMISS_CONTROL);
-        if (dismissObj == null) {
+    private boolean isDismissed(Tile suggestion, boolean isSmartSuggestionEnabled) {
+        String dismissControl = getDismissControl(suggestion, isSmartSuggestionEnabled);
+        if (dismissControl == null) {
             return false;
         }
-        String dismissControl = String.valueOf(dismissObj);
         String keyBase = suggestion.intent.getComponent().flattenToShortString();
         if (!mSharedPrefs.contains(keyBase + SETUP_TIME)) {
             mSharedPrefs.edit()
@@ -333,7 +355,16 @@
         return dismisses;
     }
 
-    private static class SuggestionCategory {
+    private String getDismissControl(Tile suggestion, boolean isSmartSuggestionEnabled) {
+        if (isSmartSuggestionEnabled) {
+            return mSmartDismissControl;
+        } else {
+            return suggestion.metaData.getString(META_DATA_DISMISS_CONTROL);
+        }
+    }
+
+    @VisibleForTesting
+    static class SuggestionCategory {
         public String category;
         public String pkg;
         public boolean multiple;
diff --git a/packages/SettingsLib/src/com/android/settingslib/Utils.java b/packages/SettingsLib/src/com/android/settingslib/Utils.java
index ae6ada2a..8653523 100644
--- a/packages/SettingsLib/src/com/android/settingslib/Utils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/Utils.java
@@ -6,8 +6,8 @@
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
 import android.content.pm.PackageManager.NameNotFoundException;
-import android.content.pm.UserInfo;
 import android.content.pm.Signature;
+import android.content.pm.UserInfo;
 import android.content.res.ColorStateList;
 import android.content.res.Resources;
 import android.content.res.TypedArray;
@@ -215,6 +215,13 @@
         return colorAccent;
     }
 
+    public static Drawable getDrawable(Context context, int attr) {
+        TypedArray ta = context.obtainStyledAttributes(new int[]{attr});
+        Drawable drawable = ta.getDrawable(0);
+        ta.recycle();
+        return drawable;
+    }
+
     /**
      * Determine whether a package is a "system package", in which case certain things (like
      * disabling notifications or disabling the package altogether) should be disallowed.
diff --git a/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java b/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java
index 561d924..1f03b51 100644
--- a/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java
+++ b/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java
@@ -1504,4 +1504,20 @@
             return isMusicApp;
         }
     };
+
+    public static final AppFilter FILTER_OTHER_APPS = new AppFilter() {
+        @Override
+        public void init() {
+        }
+
+        @Override
+        public boolean filterApp(AppEntry entry) {
+            boolean isCategorized;
+            synchronized(entry) {
+                isCategorized = entry.info.category == ApplicationInfo.CATEGORY_AUDIO ||
+                    entry.info.category == ApplicationInfo.CATEGORY_GAME;
+            }
+            return !isCategorized;
+        }
+    };
 }
diff --git a/packages/SettingsLib/src/com/android/settingslib/applications/PackageManagerWrapper.java b/packages/SettingsLib/src/com/android/settingslib/applications/PackageManagerWrapper.java
new file mode 100644
index 0000000..caa7929
--- /dev/null
+++ b/packages/SettingsLib/src/com/android/settingslib/applications/PackageManagerWrapper.java
@@ -0,0 +1,126 @@
+/*
+ * 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.settingslib.applications;
+
+import android.content.ComponentName;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.pm.ResolveInfo;
+import android.graphics.drawable.Drawable;
+import android.os.UserHandle;
+
+import java.util.List;
+
+/**
+ * This interface replicates a subset of the android.content.pm.PackageManager (PM). The interface
+ * exists so that we can use a thin wrapper around the PM in production code and a mock in tests.
+ * We cannot directly mock or shadow the PM, because some of the methods we rely on are newer than
+ * the API version supported by Robolectric.
+ */
+public interface PackageManagerWrapper {
+
+    /**
+     * Returns the real {@code PackageManager} object.
+     */
+    PackageManager getPackageManager();
+
+    /**
+     * Calls {@code PackageManager.getInstalledApplicationsAsUser()}.
+     *
+     * @see android.content.pm.PackageManager#getInstalledApplicationsAsUser
+     */
+    List<ApplicationInfo> getInstalledApplicationsAsUser(int flags, int userId);
+
+    /**
+     * Calls {@code PackageManager.hasSystemFeature()}.
+     *
+     * @see android.content.pm.PackageManager#hasSystemFeature
+     */
+    boolean hasSystemFeature(String name);
+
+    /**
+     * Calls {@code PackageManager.queryIntentActivitiesAsUser()}.
+     *
+     * @see android.content.pm.PackageManager#queryIntentActivitiesAsUser
+     */
+    List<ResolveInfo> queryIntentActivitiesAsUser(Intent intent, int flags, int userId);
+
+    /**
+     * Calls {@code PackageManager.getInstallReason()}.
+     *
+     * @see android.content.pm.PackageManager#getInstallReason
+     */
+    int getInstallReason(String packageName, UserHandle user);
+
+    /**
+     * Calls {@code PackageManager.getApplicationInfoAsUser}
+     */
+    ApplicationInfo getApplicationInfoAsUser(String packageName, int i, int userId)
+            throws PackageManager.NameNotFoundException;
+
+    /**
+     * Calls {@code PackageManager.setDefaultBrowserPackageNameAsUser}
+     */
+    boolean setDefaultBrowserPackageNameAsUser(String packageName, int userId);
+
+    /**
+     * Calls {@code PackageManager.getDefaultBrowserPackageNameAsUser}
+     */
+    String getDefaultBrowserPackageNameAsUser(int userId);
+
+    /**
+     * Calls {@code PackageManager.getHomeActivities}
+     */
+    ComponentName getHomeActivities(List<ResolveInfo> homeActivities);
+
+    /**
+     * Calls {@code PackageManager.queryIntentServicesAsUser}
+     */
+    List<ResolveInfo> queryIntentServicesAsUser(Intent intent, int i, int user);
+
+    /**
+     * Calls {@code PackageManager.replacePreferredActivity}
+     */
+    void replacePreferredActivity(IntentFilter homeFilter, int matchCategoryEmpty,
+            ComponentName[] componentNames, ComponentName component);
+
+    /**
+     * Gets information about a particular package from the package manager.
+     * @param packageName The name of the package we would like information about.
+     * @param i additional options flags. see javadoc for {@link PackageManager#getPackageInfo(String, int)}
+     * @return The PackageInfo for the requested package
+     * @throws NameNotFoundException
+     */
+    PackageInfo getPackageInfo(String packageName, int i) throws NameNotFoundException;
+
+    /**
+     * Retrieves the icon associated with this particular set of ApplicationInfo
+     * @param info The ApplicationInfo to retrieve the icon for
+     * @return The icon as a drawable.
+     */
+    Drawable getUserBadgedIcon(ApplicationInfo info);
+
+    /**
+     * Retrieves the label associated with the particular set of ApplicationInfo
+     * @param app The ApplicationInfo to retrieve the label for
+     * @return the label as a CharSequence
+     */
+    CharSequence loadLabel(ApplicationInfo app);
+}
diff --git a/packages/SettingsLib/src/com/android/settingslib/applications/PackageManagerWrapperImpl.java b/packages/SettingsLib/src/com/android/settingslib/applications/PackageManagerWrapperImpl.java
new file mode 100644
index 0000000..9b2cd7c
--- /dev/null
+++ b/packages/SettingsLib/src/com/android/settingslib/applications/PackageManagerWrapperImpl.java
@@ -0,0 +1,116 @@
+/*
+ * 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.settingslib.applications;
+
+import android.content.ComponentName;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.pm.ResolveInfo;
+import android.graphics.drawable.Drawable;
+import android.os.UserHandle;
+
+import java.util.List;
+
+/**
+ * A thin wrapper class that simplifies testing by putting a mockable layer between the application
+ * and the PackageManager. This class only provides access to the minimum number of functions from
+ * the PackageManager needed for DeletionHelper to work.
+ */
+public class PackageManagerWrapperImpl implements PackageManagerWrapper {
+
+    private final PackageManager mPm;
+
+    public PackageManagerWrapperImpl(PackageManager pm) {
+        mPm = pm;
+    }
+
+    @Override
+    public PackageManager getPackageManager() {
+        return mPm;
+    }
+
+    @Override
+    public List<ApplicationInfo> getInstalledApplicationsAsUser(int flags, int userId) {
+        return mPm.getInstalledApplicationsAsUser(flags, userId);
+    }
+
+    @Override
+    public boolean hasSystemFeature(String name) {
+        return mPm.hasSystemFeature(name);
+    }
+
+    @Override
+    public List<ResolveInfo> queryIntentActivitiesAsUser(Intent intent, int flags, int userId) {
+        return mPm.queryIntentActivitiesAsUser(intent, flags, userId);
+    }
+
+    @Override
+    public int getInstallReason(String packageName, UserHandle user) {
+        return mPm.getInstallReason(packageName, user);
+    }
+
+    @Override
+    public ApplicationInfo getApplicationInfoAsUser(String packageName, int i, int userId)
+            throws PackageManager.NameNotFoundException {
+        return mPm.getApplicationInfoAsUser(packageName, i, userId);
+    }
+
+    @Override
+    public boolean setDefaultBrowserPackageNameAsUser(String packageName, int userId) {
+        return mPm.setDefaultBrowserPackageNameAsUser(packageName, userId);
+    }
+
+    @Override
+    public String getDefaultBrowserPackageNameAsUser(int userId) {
+        return mPm.getDefaultBrowserPackageNameAsUser(userId);
+    }
+
+    @Override
+    public ComponentName getHomeActivities(List<ResolveInfo> homeActivities) {
+        return mPm.getHomeActivities(homeActivities);
+    }
+
+    @Override
+    public List<ResolveInfo> queryIntentServicesAsUser(Intent intent, int i, int user) {
+        return mPm.queryIntentServicesAsUser(intent, i, user);
+    }
+
+    @Override
+    public void replacePreferredActivity(IntentFilter homeFilter, int matchCategoryEmpty,
+            ComponentName[] componentNames, ComponentName component) {
+        mPm.replacePreferredActivity(homeFilter, matchCategoryEmpty, componentNames, component);
+    }
+
+    @Override
+    public PackageInfo getPackageInfo(String packageName, int i) throws NameNotFoundException {
+        return mPm.getPackageInfo(packageName, i);
+    }
+
+    @Override
+    public Drawable getUserBadgedIcon(ApplicationInfo info) {
+        return mPm.getUserBadgedIcon(mPm.loadUnbadgedItemIcon(info, info),
+                new UserHandle(UserHandle.getUserId(info.uid)));
+    }
+
+    @Override
+    public CharSequence loadLabel(ApplicationInfo app) {
+        return app.loadLabel(mPm);
+    }
+}
diff --git a/packages/SettingsLib/src/com/android/settingslib/applications/StorageStatsSource.java b/packages/SettingsLib/src/com/android/settingslib/applications/StorageStatsSource.java
new file mode 100644
index 0000000..acb0650
--- /dev/null
+++ b/packages/SettingsLib/src/com/android/settingslib/applications/StorageStatsSource.java
@@ -0,0 +1,117 @@
+/*
+ * 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.settingslib.applications;
+
+import android.app.usage.StorageStats;
+import android.app.usage.StorageStatsManager;
+import android.content.Context;
+import android.os.UserHandle;
+
+/**
+ * StorageStatsSource wraps the StorageStatsManager for testability purposes.
+ */
+public class StorageStatsSource {
+    private StorageStatsManager mStorageStatsManager;
+
+    public StorageStatsSource(Context context) {
+        mStorageStatsManager = context.getSystemService(StorageStatsManager.class);
+    }
+
+    public StorageStatsSource.ExternalStorageStats getExternalStorageStats(String volumeUuid, UserHandle user) {
+        return new StorageStatsSource.ExternalStorageStats(
+                mStorageStatsManager.queryExternalStatsForUser(volumeUuid, user));
+    }
+
+    public StorageStatsSource.AppStorageStats getStatsForUid(String volumeUuid, int uid) {
+        return new StorageStatsSource.AppStorageStatsImpl(mStorageStatsManager.queryStatsForUid(volumeUuid, uid));
+    }
+
+    /**
+     * Static class that provides methods for querying the amount of external storage available as
+     * well as breaking it up into several media types.
+     */
+    public static class ExternalStorageStats {
+        public long totalBytes;
+        public long audioBytes;
+        public long videoBytes;
+        public long imageBytes;
+
+        /**
+         * Convenience method for testing.
+         */
+        public ExternalStorageStats(long totalBytes, long audioBytes, long videoBytes,
+                long imageBytes) {
+            this.totalBytes = totalBytes;
+            this.audioBytes = audioBytes;
+            this.videoBytes = videoBytes;
+            this.imageBytes = imageBytes;
+        }
+
+        /**
+         * Creates an ExternalStorageStats from the system version of ExternalStorageStats. They are
+         * identical other than the utility method created for test purposes.
+         * @param stats The stats to copy to wrap.
+         */
+        public ExternalStorageStats(android.app.usage.ExternalStorageStats stats) {
+            totalBytes = stats.getTotalBytes();
+            audioBytes = stats.getAudioBytes();
+            videoBytes = stats.getVideoBytes();
+            imageBytes = stats.getImageBytes();
+        }
+    }
+
+    /**
+     * Interface that exists to simplify testing. The platform {@link StorageStats} is too new and
+     * robolectric cannot see it. It simply wraps a StorageStats object and forwards method calls
+     * to the real object
+     */
+    public interface AppStorageStats {
+        long getCodeBytes();
+        long getDataBytes();
+        long getCacheBytes();
+        long getTotalBytes();
+    }
+
+    /**
+     * Simple implementation of AppStorageStats that will allow you to query the StorageStats object
+     * passed in for storage information about an app.
+     */
+    public static class AppStorageStatsImpl implements
+            StorageStatsSource.AppStorageStats {
+        private StorageStats mStats;
+
+        public AppStorageStatsImpl(StorageStats stats) {
+            mStats = stats;
+        }
+
+        public long getCodeBytes() {
+            return mStats.getCodeBytes();
+        }
+
+        public long getDataBytes() {
+            return mStats.getDataBytes();
+        }
+
+        public long getCacheBytes() {
+            return mStats.getCacheBytes();
+        }
+
+        public long getTotalBytes() {
+            return mStats.getCacheBytes() + mStats.getCodeBytes() + mStats.getDataBytes();
+        }
+    }
+}
\ No newline at end of file
diff --git a/packages/SettingsLib/src/com/android/settingslib/drawable/UserIconDrawable.java b/packages/SettingsLib/src/com/android/settingslib/drawable/UserIconDrawable.java
index 32478a7..7f469b5 100644
--- a/packages/SettingsLib/src/com/android/settingslib/drawable/UserIconDrawable.java
+++ b/packages/SettingsLib/src/com/android/settingslib/drawable/UserIconDrawable.java
@@ -34,6 +34,7 @@
 import android.graphics.Rect;
 import android.graphics.RectF;
 import android.graphics.Shader;
+import android.graphics.drawable.BitmapDrawable;
 import android.graphics.drawable.Drawable;
 
 import com.android.settingslib.R;
@@ -273,6 +274,11 @@
         super.invalidateSelf();
     }
 
+    @Override
+    public ConstantState getConstantState() {
+        return new BitmapDrawable(mBitmap).getConstantState();
+    }
+
     /**
      * This 'bakes' the current state of this icon into a bitmap and removes/recycles the source
      * bitmap/drawable. Use this when no more changes will be made and an intrinsic size is set.
diff --git a/packages/SettingsLib/src/com/android/settingslib/drawer/CategoryKey.java b/packages/SettingsLib/src/com/android/settingslib/drawer/CategoryKey.java
index 7e3f67b..d6bde81 100644
--- a/packages/SettingsLib/src/com/android/settingslib/drawer/CategoryKey.java
+++ b/packages/SettingsLib/src/com/android/settingslib/drawer/CategoryKey.java
@@ -36,7 +36,6 @@
     public static final String CATEGORY_SECURITY = "com.android.settings.category.ia.security";
     public static final String CATEGORY_ACCOUNT = "com.android.settings.category.ia.accounts";
     public static final String CATEGORY_SYSTEM = "com.android.settings.category.ia.system";
-    public static final String CATEGORY_SYSTEM_INPUT = "com.android.settings.category.ia.input";
     public static final String CATEGORY_SYSTEM_LANGUAGE =
             "com.android.settings.category.ia.language";
     public static final String CATEGORY_SYSTEM_DEVELOPMENT =
diff --git a/packages/SettingsLib/src/com/android/settingslib/drawer/SettingsDrawerActivity.java b/packages/SettingsLib/src/com/android/settingslib/drawer/SettingsDrawerActivity.java
index 6010621..9ad0b3e 100644
--- a/packages/SettingsLib/src/com/android/settingslib/drawer/SettingsDrawerActivity.java
+++ b/packages/SettingsLib/src/com/android/settingslib/drawer/SettingsDrawerActivity.java
@@ -322,6 +322,7 @@
         }
     }
 
+    @Deprecated
     public boolean openTile(Tile tile) {
         closeDrawer();
         if (tile == null) {
diff --git a/packages/SystemUI/src/com/android/systemui/BatteryMeterDrawable.java b/packages/SettingsLib/src/com/android/settingslib/graph/BatteryMeterDrawableBase.java
similarity index 77%
rename from packages/SystemUI/src/com/android/systemui/BatteryMeterDrawable.java
rename to packages/SettingsLib/src/com/android/settingslib/graph/BatteryMeterDrawableBase.java
index 5a6afca..fd2e7ca 100755
--- a/packages/SystemUI/src/com/android/systemui/BatteryMeterDrawable.java
+++ b/packages/SettingsLib/src/com/android/settingslib/graph/BatteryMeterDrawableBase.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 The Android Open Source Project
+ * 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.
@@ -14,14 +14,13 @@
  * limitations under the License.
  */
 
-package com.android.systemui;
+package com.android.settingslib.graph;
 
 import android.animation.ArgbEvaluator;
 import android.annotation.Nullable;
 import android.content.Context;
 import android.content.res.Resources;
 import android.content.res.TypedArray;
-import android.database.ContentObserver;
 import android.graphics.Canvas;
 import android.graphics.Color;
 import android.graphics.ColorFilter;
@@ -30,18 +29,21 @@
 import android.graphics.RectF;
 import android.graphics.Typeface;
 import android.graphics.drawable.Drawable;
-import android.net.Uri;
-import android.os.Handler;
 import android.provider.Settings;
+import com.android.settingslib.R;
+import com.android.settingslib.Utils;
 
-import com.android.systemui.statusbar.policy.BatteryController;
-
-public class BatteryMeterDrawable extends Drawable implements
-        BatteryController.BatteryStateChangeCallback {
+public class BatteryMeterDrawableBase extends Drawable {
 
     private static final float ASPECT_RATIO = 9.5f / 14.5f;
-    public static final String TAG = BatteryMeterDrawable.class.getSimpleName();
-    public static final String SHOW_PERCENT_SETTING = "status_bar_show_battery_percent";
+    public static final String TAG = BatteryMeterDrawableBase.class.getSimpleName();
+
+    protected final Context mContext;
+
+    private int mLevel = -1;
+    private boolean mPluggedIn;
+    private boolean mPowerSaveEnabled;
+    private boolean mShowPercent;
 
     private static final boolean SINGLE_DIGIT_PERCENT = false;
 
@@ -53,7 +55,6 @@
     private final int mIntrinsicWidth;
     private final int mIntrinsicHeight;
 
-    private boolean mShowPercent;
     private float mButtonHeightFraction;
     private float mSubpixelSmoothingLeft;
     private float mSubpixelSmoothingRight;
@@ -82,39 +83,27 @@
     private final Path mClipPath = new Path();
     private final Path mTextPath = new Path();
 
-    private BatteryController mBatteryController;
-    private boolean mPowerSaveEnabled;
-
     private int mDarkModeBackgroundColor;
     private int mDarkModeFillColor;
 
     private int mLightModeBackgroundColor;
     private int mLightModeFillColor;
 
-    private final SettingObserver mSettingObserver;
-
-    private final Context mContext;
-
-    private int mLevel = -1;
-    private boolean mPluggedIn;
-    private boolean mListening;
-
-    public BatteryMeterDrawable(Context context, int frameColor) {
+    public BatteryMeterDrawableBase(Context context, int frameColor) {
         mContext = context;
-        mSettingObserver = new SettingObserver(new Handler(mContext.getMainLooper()));
         final Resources res = context.getResources();
         TypedArray levels = res.obtainTypedArray(R.array.batterymeter_color_levels);
         TypedArray colors = res.obtainTypedArray(R.array.batterymeter_color_values);
 
         final int N = levels.length();
-        mColors = new int[2*N];
-        for (int i=0; i<N; i++) {
-            mColors[2*i] = levels.getInt(i, 0);
-            mColors[2*i+1] = colors.getColor(i, 0);
+        mColors = new int[2 * N];
+        for (int i = 0; i < N; i++) {
+            mColors[2 * i] = levels.getInt(i, 0);
+            mColors[2 * i + 1] = colors.getColor(i, 0);
         }
         levels.recycle();
         colors.recycle();
-        updateShowPercent();
+
         mWarningString = context.getString(R.string.battery_meter_very_low_overlay_symbol);
         mCriticalLevel = mContext.getResources().getInteger(
                 com.android.internal.R.integer.config_criticalBatteryWarningLevel);
@@ -142,26 +131,30 @@
         mTextPaint.setTextAlign(Paint.Align.CENTER);
 
         mWarningTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
-        mWarningTextPaint.setColor(mColors[1]);
         font = Typeface.create("sans-serif", Typeface.BOLD);
         mWarningTextPaint.setTypeface(font);
         mWarningTextPaint.setTextAlign(Paint.Align.CENTER);
+        if (mColors.length > 1) {
+            mWarningTextPaint.setColor(mColors[1]);
+        }
 
-        mChargeColor = context.getColor(R.color.batterymeter_charge_color);
+        mChargeColor = Utils.getDefaultColor(mContext, R.color.batterymeter_charge_color);
 
         mBoltPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
-        mBoltPaint.setColor(context.getColor(R.color.batterymeter_bolt_color));
-        mBoltPoints = loadBoltPoints(res);
+        mBoltPaint.setColor(Utils.getDefaultColor(mContext, R.color.batterymeter_bolt_color));
+        mBoltPoints = loadPoints(res, R.array.batterymeter_bolt_points);
 
         mPlusPaint = new Paint(mBoltPaint);
-        mPlusPoints = loadPlusPoints(res);
+        mPlusPoints = loadPoints(res, R.array.batterymeter_plus_points);
 
         mDarkModeBackgroundColor =
-                context.getColor(R.color.dark_mode_icon_color_dual_tone_background);
-        mDarkModeFillColor = context.getColor(R.color.dark_mode_icon_color_dual_tone_fill);
+                Utils.getDefaultColor(mContext, R.color.dark_mode_icon_color_dual_tone_background);
+        mDarkModeFillColor =
+                Utils.getDefaultColor(mContext, R.color.dark_mode_icon_color_dual_tone_fill);
         mLightModeBackgroundColor =
-                context.getColor(R.color.light_mode_icon_color_dual_tone_background);
-        mLightModeFillColor = context.getColor(R.color.light_mode_icon_color_dual_tone_fill);
+                Utils.getDefaultColor(mContext, R.color.light_mode_icon_color_dual_tone_background);
+        mLightModeFillColor =
+                Utils.getDefaultColor(mContext, R.color.light_mode_icon_color_dual_tone_fill);
 
         mIntrinsicWidth = context.getResources().getDimensionPixelSize(R.dimen.battery_width);
         mIntrinsicHeight = context.getResources().getDimensionPixelSize(R.dimen.battery_height);
@@ -177,50 +170,34 @@
         return mIntrinsicWidth;
     }
 
-    public void startListening() {
-        mListening = true;
-        mContext.getContentResolver().registerContentObserver(
-                Settings.System.getUriFor(SHOW_PERCENT_SETTING), false, mSettingObserver);
-        updateShowPercent();
-        mBatteryController.addCallback(this);
-    }
-
-    public void stopListening() {
-        mListening = false;
-        mContext.getContentResolver().unregisterContentObserver(mSettingObserver);
-        mBatteryController.removeCallback(this);
-    }
-
-    public void disableShowPercent() {
-        mShowPercent = false;
+    public void setShowPercent(boolean show) {
+        mShowPercent = show;
         postInvalidate();
     }
 
-    private void postInvalidate() {
+    public void setPluggedIn(boolean val) {
+        mPluggedIn = val;
+        postInvalidate();
+    }
+
+    public void setBatteryLevel(int val) {
+        mLevel = val;
+        postInvalidate();
+    }
+
+    public void setPowerSave(boolean val) {
+        mPowerSaveEnabled = val;
+        postInvalidate();
+    }
+
+    // an approximation of View.postInvalidate()
+    protected void postInvalidate() {
+        unscheduleSelf(this::invalidateSelf);
         scheduleSelf(this::invalidateSelf, 0);
     }
 
-    public void setBatteryController(BatteryController batteryController) {
-        mBatteryController = batteryController;
-        mPowerSaveEnabled = mBatteryController.isPowerSave();
-    }
-
-    @Override
-    public void onBatteryLevelChanged(int level, boolean pluggedIn, boolean charging) {
-        mLevel = level;
-        mPluggedIn = pluggedIn;
-
-        postInvalidate();
-    }
-
-    @Override
-    public void onPowerSaveChanged(boolean isPowerSave) {
-        mPowerSaveEnabled = isPowerSave;
-        invalidateSelf();
-    }
-
-    private static float[] loadBoltPoints(Resources res) {
-        final int[] pts = res.getIntArray(R.array.batterymeter_bolt_points);
+    private static float[] loadPoints(Resources res, int pointArrayRes) {
+        final int[] pts = res.getIntArray(pointArrayRes);
         int maxX = 0, maxY = 0;
         for (int i = 0; i < pts.length; i += 2) {
             maxX = Math.max(maxX, pts[i]);
@@ -228,23 +205,8 @@
         }
         final float[] ptsF = new float[pts.length];
         for (int i = 0; i < pts.length; i += 2) {
-            ptsF[i] = (float)pts[i] / maxX;
-            ptsF[i + 1] = (float)pts[i + 1] / maxY;
-        }
-        return ptsF;
-    }
-
-    private static float[] loadPlusPoints(Resources res) {
-        final int[] pts = res.getIntArray(R.array.batterymeter_plus_points);
-        int maxX = 0, maxY = 0;
-        for (int i = 0; i < pts.length; i += 2) {
-            maxX = Math.max(maxX, pts[i]);
-            maxY = Math.max(maxY, pts[i + 1]);
-        }
-        final float[] ptsF = new float[pts.length];
-        for (int i = 0; i < pts.length; i += 2) {
-            ptsF[i] = (float)pts[i] / maxX;
-            ptsF[i + 1] = (float)pts[i + 1] / maxY;
+            ptsF[i] = (float) pts[i] / maxX;
+            ptsF[i + 1] = (float) pts[i + 1] / maxY;
         }
         return ptsF;
     }
@@ -258,25 +220,19 @@
         mWarningTextHeight = -mWarningTextPaint.getFontMetrics().ascent;
     }
 
-    private void updateShowPercent() {
-        mShowPercent = 0 != Settings.System.getInt(mContext.getContentResolver(),
-                SHOW_PERCENT_SETTING, 0);
-    }
-
     private int getColorForLevel(int percent) {
-
         // If we are in power save mode, always use the normal color.
         if (mPowerSaveEnabled) {
-            return mColors[mColors.length-1];
+            return mColors[mColors.length - 1];
         }
         int thresh, color = 0;
-        for (int i=0; i<mColors.length; i+=2) {
+        for (int i = 0; i < mColors.length; i += 2) {
             thresh = mColors[i];
-            color = mColors[i+1];
+            color = mColors[i + 1];
             if (percent <= thresh) {
 
                 // Respect tinting for "normal" level
-                if (i == mColors.length-2) {
+                if (i == mColors.length - 2) {
                     return mIconTint;
                 } else {
                     return color;
@@ -453,7 +409,7 @@
                     (SINGLE_DIGIT_PERCENT ? 0.75f
                             : (mLevel == 100 ? 0.38f : 0.5f)));
             mTextHeight = -mTextPaint.getFontMetrics().ascent;
-            pctText = String.valueOf(SINGLE_DIGIT_PERCENT ? (level/10) : level);
+            pctText = String.valueOf(SINGLE_DIGIT_PERCENT ? (level / 10) : level);
             pctX = mWidth * 0.5f;
             pctY = (mHeight + mTextHeight) * 0.47f;
             pctOpaque = levelTop > pctY;
@@ -471,7 +427,7 @@
         // draw the battery shape, clipped to charging level
         mFrame.top = levelTop;
         mClipPath.reset();
-        mClipPath.addRect(mFrame,  Path.Direction.CCW);
+        mClipPath.addRect(mFrame, Path.Direction.CCW);
         mShapePath.op(mClipPath, Path.Op.INTERSECT);
         c.drawPath(mShapePath, mBatteryPaint);
 
@@ -498,7 +454,6 @@
         mFramePaint.setColorFilter(colorFilter);
         mBatteryPaint.setColorFilter(colorFilter);
         mWarningTextPaint.setColorFilter(colorFilter);
-        mTextPaint.setColorFilter(colorFilter);
         mBoltPaint.setColorFilter(colorFilter);
         mPlusPaint.setColorFilter(colorFilter);
     }
@@ -507,18 +462,4 @@
     public int getOpacity() {
         return 0;
     }
-
-    private final class SettingObserver extends ContentObserver {
-        public SettingObserver(Handler handler) {
-            super(handler);
-        }
-
-        @Override
-        public void onChange(boolean selfChange, Uri uri) {
-            super.onChange(selfChange, uri);
-            updateShowPercent();
-            postInvalidate();
-        }
-    }
-
 }
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java
index 06ea445..82e69d8 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java
@@ -222,21 +222,21 @@
         if (isActive() && !other.isActive()) return -1;
         if (!isActive() && other.isActive()) return 1;
 
-        // Higher scores go before lower scores
-        if (mRankingScore != other.mRankingScore) {
-            return (mRankingScore > other.mRankingScore) ? -1 : 1;
-        }
-
         // Reachable one goes before unreachable one.
         if (mRssi != Integer.MAX_VALUE && other.mRssi == Integer.MAX_VALUE) return -1;
         if (mRssi == Integer.MAX_VALUE && other.mRssi != Integer.MAX_VALUE) return 1;
 
-        // Configured one goes before unconfigured one.
+        // Configured (saved) one goes before unconfigured one.
         if (networkId != WifiConfiguration.INVALID_NETWORK_ID
                 && other.networkId == WifiConfiguration.INVALID_NETWORK_ID) return -1;
         if (networkId == WifiConfiguration.INVALID_NETWORK_ID
                 && other.networkId != WifiConfiguration.INVALID_NETWORK_ID) return 1;
 
+        // Higher scores go before lower scores
+        if (mRankingScore != other.mRankingScore) {
+            return (mRankingScore > other.mRankingScore) ? -1 : 1;
+        }
+
         // Sort by signal strength, bucketed by level
         int difference = WifiManager.calculateSignalLevel(other.mRssi, SIGNAL_LEVELS)
                 - WifiManager.calculateSignalLevel(mRssi, SIGNAL_LEVELS);
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java
index c617994..9ac4d2d 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java
@@ -41,7 +41,6 @@
 import android.os.Looper;
 import android.os.Message;
 import android.provider.Settings;
-import android.support.annotation.WorkerThread;
 import android.util.ArraySet;
 import android.util.Log;
 import android.util.SparseArray;
@@ -211,7 +210,7 @@
 
         mNetworkScoreManager = networkScoreManager;
 
-        mScoreCache = new WifiNetworkScoreCache(context, new CacheListener(mWorkHandler) {
+        mScoreCache = new WifiNetworkScoreCache(context, new CacheListener(mMainHandler) {
             @Override
             public void networkCacheUpdated(List<ScoredNetwork> networks) {
                 if (Log.isLoggable(TAG, Log.VERBOSE)) {
@@ -282,12 +281,7 @@
      * then forceUpdate() must be called to populate getAccessPoints().
      */
     public void startTracking() {
-        mWorkHandler.post(new Runnable() {
-            @Override
-            public void run() {
-                registerScoreCache();
-            }
-        });
+        registerScoreCache();
 
         mContext.getContentResolver().registerContentObserver(
                 Settings.Global.getUriFor(Settings.Global.NETWORK_SCORING_UI_ENABLED),
@@ -305,7 +299,6 @@
         }
     }
 
-    @WorkerThread
     private void registerScoreCache() {
         mNetworkScoreManager.registerNetworkScoreCache(
                 NetworkKey.TYPE_WIFI,
@@ -341,20 +334,17 @@
         }
         pauseScanning();
 
-        mWorkHandler.post(new Runnable() {
-            @Override
-            public void run() {
-                unregisterAndClearScoreCache();
-            }
-        });
+        unregisterAndClearScoreCache();
+
         mContext.getContentResolver().unregisterContentObserver(mObserver);
     }
 
-    @WorkerThread
     private void unregisterAndClearScoreCache() {
-        mRequestedScores.clear();
         mNetworkScoreManager.unregisterNetworkScoreCache(NetworkKey.TYPE_WIFI, mScoreCache);
         mScoreCache.clearScores();
+
+        // Clear the scores on the work handler to avoid concurrent modification exceptions
+        mWorkHandler.post(() -> mRequestedScores.clear());
     }
 
     /**
@@ -520,7 +510,7 @@
                 }
 
                 NetworkKey key = NetworkKey.createFromScanResult(result);
-                if (!mRequestedScores.contains(key)) {
+                if (key != null && !mRequestedScores.contains(key)) {
                     scoresToRequest.add(key);
                 }
 
diff --git a/packages/SettingsLib/tests/integ/src/com/android/settingslib/applications/ApplicationsStateTest.java b/packages/SettingsLib/tests/integ/src/com/android/settingslib/applications/ApplicationsStateTest.java
index 8a6ae86..80e1cbf 100644
--- a/packages/SettingsLib/tests/integ/src/com/android/settingslib/applications/ApplicationsStateTest.java
+++ b/packages/SettingsLib/tests/integ/src/com/android/settingslib/applications/ApplicationsStateTest.java
@@ -86,4 +86,25 @@
 
         assertThat(ApplicationsState.FILTER_AUDIO.filterApp(mEntry)).isFalse();
     }
+
+    @Test
+    public void testOtherAppsRejectsAudio() {
+        mEntry.info.category = ApplicationInfo.CATEGORY_AUDIO;
+
+        assertThat(ApplicationsState.FILTER_OTHER_APPS.filterApp(mEntry)).isFalse();
+    }
+
+    @Test
+    public void testOtherAppsRejectsGame() {
+        mEntry.info.category = ApplicationInfo.CATEGORY_GAME;
+
+        assertThat(ApplicationsState.FILTER_OTHER_APPS.filterApp(mEntry)).isFalse();
+    }
+
+    @Test
+    public void testOtherAppsAcceptsDefaultCategory() {
+        mEntry.info.category = ApplicationInfo.CATEGORY_UNDEFINED;
+
+        assertThat(ApplicationsState.FILTER_OTHER_APPS.filterApp(mEntry)).isTrue();
+    }
 }
diff --git a/packages/SettingsLib/tests/integ/src/com/android/settingslib/graph/BatteryMeterDrawableBaseTest.java b/packages/SettingsLib/tests/integ/src/com/android/settingslib/graph/BatteryMeterDrawableBaseTest.java
new file mode 100644
index 0000000..4de2c12
--- /dev/null
+++ b/packages/SettingsLib/tests/integ/src/com/android/settingslib/graph/BatteryMeterDrawableBaseTest.java
@@ -0,0 +1,71 @@
+package com.android.settingslib.graph;
+
+import android.content.Context;
+import android.content.res.Resources;
+import android.graphics.Canvas;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
+import com.android.settingslib.R;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static com.google.common.truth.Truth.assertThat;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyFloat;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+
+@SmallTest
+@RunWith(AndroidJUnit4.class)
+public class BatteryMeterDrawableBaseTest {
+    private Context mContext;
+    private Resources mResources;
+    private BatteryMeterDrawableBase mBatteryDrawable;
+
+    @Before
+    public void setUp() throws Exception {
+        mContext = InstrumentationRegistry.getTargetContext();
+        mResources = mContext.getResources();
+        mBatteryDrawable = new BatteryMeterDrawableBase(mContext, 0);
+    }
+
+    @Test
+    public void testGetIntrinsicSize() {
+        assertThat(mBatteryDrawable.getIntrinsicWidth()).
+                isEqualTo(mResources.getDimensionPixelSize(R.dimen.battery_width));
+        assertThat(mBatteryDrawable.getIntrinsicHeight()).
+                isEqualTo(mResources.getDimensionPixelSize(R.dimen.battery_height));
+    }
+
+    @Test
+    public void testDrawNothingBeforeOnBatteryLevelChanged() {
+        final Canvas canvas = mock(Canvas.class);
+        mBatteryDrawable.draw(canvas);
+        verify(canvas, never()).drawPath(any(), any());
+        verify(canvas, never()).drawText(anyString(), anyFloat(), anyFloat(), any());
+    }
+
+    @Test
+    public void testDrawingForTypicalValues() {
+        final Canvas canvas = mock(Canvas.class);
+        final int levels[] = { 0, 1, 5, 10, 25, 50, 75, 90, 95, 99, 100 };
+        final boolean bools[] = { false, true };
+        for (int l : levels) {
+            for (boolean plugged : bools) {
+                for (boolean saver : bools) {
+                    for (boolean percent : bools) {
+                        mBatteryDrawable.setBatteryLevel(l);
+                        mBatteryDrawable.setPowerSave(saver);
+                        mBatteryDrawable.setPluggedIn(plugged);
+                        mBatteryDrawable.setShowPercent(percent);
+                        mBatteryDrawable.draw(canvas);
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java b/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
index 08736c7..0f220aa 100644
--- a/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
+++ b/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
@@ -72,7 +72,7 @@
 public class WifiTrackerTest {
 
     private static final String TAG = "WifiTrackerTest";
-    private static final int LATCH_TIMEOUT = 2000;
+    private static final int LATCH_TIMEOUT = 4000;
 
     private static final String SSID_1 = "ssid1";
     private static final String BSSID_1 = "00:00:00:00:00:00";
@@ -226,7 +226,7 @@
 
         mAccessPointsChangedLatch = new CountDownLatch(1);
         sendScanResultsAndProcess(tracker);
-        mAccessPointsChangedLatch.await(LATCH_TIMEOUT, TimeUnit.MILLISECONDS);
+        assertTrue(mAccessPointsChangedLatch.await(LATCH_TIMEOUT, TimeUnit.MILLISECONDS));
 
         return tracker;
     }
@@ -242,7 +242,8 @@
                     true,
                     mockWifiManager,
                     mockConnectivityManager,
-                        mockNetworkScoreManager, mMainLooper
+                    mockNetworkScoreManager,
+                    mMainLooper
                 );
 
         return tracker;
@@ -257,7 +258,7 @@
                 latch.countDown();
             }
         });
-        latch.await(LATCH_TIMEOUT, TimeUnit.MILLISECONDS);
+        assertTrue("Latch timed out", latch.await(LATCH_TIMEOUT, TimeUnit.MILLISECONDS));
     }
 
     private void sendScanResultsAndProcess(WifiTracker tracker) throws InterruptedException {
@@ -265,7 +266,8 @@
         Intent i = new Intent(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION);
         tracker.mReceiver.onReceive(mContext, i);
 
-        mAccessPointsChangedLatch.await(LATCH_TIMEOUT, TimeUnit.MILLISECONDS);
+        assertTrue("Latch timed out",
+                mAccessPointsChangedLatch.await(LATCH_TIMEOUT, TimeUnit.MILLISECONDS));
     }
 
     private void updateScores() {
@@ -348,7 +350,7 @@
         // Test unregister
         tracker.stopTracking();
 
-        latch.await(LATCH_TIMEOUT, TimeUnit.MILLISECONDS);
+        assertTrue("Latch timed out", latch.await(LATCH_TIMEOUT, TimeUnit.MILLISECONDS));
         verify(mockNetworkScoreManager)
                 .unregisterNetworkScoreCache(NetworkKey.TYPE_WIFI, scoreCache);
     }
@@ -359,12 +361,15 @@
         WifiTracker tracker =  createTrackerAndInjectInitialScanResults();
 
         tracker.stopTracking();
+        android.util.Log.d("WifiTrackerTest", "Clearing previously captured requested keys");
         mRequestedKeys.clear();
 
-        mRequestScoresLatch = new CountDownLatch(2);
+        mRequestScoresLatch = new CountDownLatch(1);
         startTracking(tracker);
-        mRequestScoresLatch.await(LATCH_TIMEOUT, TimeUnit.MILLISECONDS);
+        assertTrue("Latch timed out",
+                mRequestScoresLatch.await(LATCH_TIMEOUT, TimeUnit.MILLISECONDS));
 
+        android.util.Log.d("WifiTrackerTest", "requested keys: " + mRequestedKeys);
         assertTrue(mRequestedKeys.contains(NETWORK_KEY_1));
         assertTrue(mRequestedKeys.contains(NETWORK_KEY_2));
     }
@@ -379,6 +384,8 @@
     }
 
     private void updateScoresAndWaitForAccessPointsChangedCallback() throws InterruptedException {
+        // Updating scores can happen together or one after the other, so the latch countdown is set
+        // to 2.
         mAccessPointsChangedLatch = new CountDownLatch(2);
         updateScores();
         mAccessPointsChangedLatch.await(LATCH_TIMEOUT, TimeUnit.MILLISECONDS);
@@ -462,6 +469,8 @@
 
     @Test
     public void scoresShouldBeRequestedForNewScanResultOnly()  throws InterruptedException {
+        // Scores can be requested together or serially depending on how the scan results are
+        // processed.
         mRequestScoresLatch = new CountDownLatch(2);
         WifiTracker tracker = createTrackerAndInjectInitialScanResults();
         mRequestScoresLatch.await(LATCH_TIMEOUT, TimeUnit.MILLISECONDS);
@@ -484,9 +493,24 @@
 
         mRequestScoresLatch = new CountDownLatch(1);
         sendScanResultsAndProcess(tracker);
-        mRequestScoresLatch.await(LATCH_TIMEOUT, TimeUnit.MILLISECONDS);
+        assertTrue(mRequestScoresLatch.await(LATCH_TIMEOUT, TimeUnit.MILLISECONDS));
 
         assertEquals(1, mRequestedKeys.size());
         assertTrue(mRequestedKeys.contains(new NetworkKey(new WifiKey('"' + ssid + '"', bssid))));
     }
+
+    @Test
+    public void scoreCacheAndListenerShouldBeUnregisteredWhenStopTrackingIsCalled() throws Exception
+    {
+        WifiTracker tracker =  createTrackerAndInjectInitialScanResults();
+        WifiNetworkScoreCache cache = mScoreCacheCaptor.getValue();
+
+        tracker.stopTracking();
+        verify(mockNetworkScoreManager).unregisterNetworkScoreCache(NetworkKey.TYPE_WIFI, cache);
+
+        // Verify listener is unregistered so updating a score does not throw an error by posting
+        // a message to the dead work handler
+        mWorkerThread.quit();
+        updateScores();
+    }
 }
diff --git a/packages/SettingsLib/tests/robotests/Android.mk b/packages/SettingsLib/tests/robotests/Android.mk
index 7a89884a..596d614 100644
--- a/packages/SettingsLib/tests/robotests/Android.mk
+++ b/packages/SettingsLib/tests/robotests/Android.mk
@@ -43,6 +43,12 @@
 LOCAL_SRC_FILES := \
     $(call all-java-files-under, src)
 
+LOCAL_JAR_EXCLUDE_FILES := none
+
+LOCAL_RESOURCE_DIR := \
+    $(LOCAL_PATH)/res
+
+
 include frameworks/base/packages/SettingsLib/common.mk
 
 include $(BUILD_PACKAGE)
diff --git a/packages/SettingsLib/tests/robotests/res/xml/suggestion_ordering.xml b/packages/SettingsLib/tests/robotests/res/xml/suggestion_ordering.xml
new file mode 100644
index 0000000..1eeafba
--- /dev/null
+++ b/packages/SettingsLib/tests/robotests/res/xml/suggestion_ordering.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 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.
+-->
+
+<optional-steps>
+    <step category="com.android.settings.suggested.category.LOCK_SCREEN" />
+    <step category="com.android.settings.suggested.category.EMAIL" />
+    <step category="com.android.settings.suggested.category.PARTNER_ACCOUNT"
+        multiple="true" />
+    <step category="com.android.settings.suggested.category.HOTWORD" />
+    <step category="com.android.settings.suggested.category.DEFAULT"
+        multiple="true" />
+    <step category="com.android.settings.suggested.category.SETTINGS_ONLY"
+        multiple="true" />
+</optional-steps>
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedLockUtilsTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedLockUtilsTest.java
index 025bbc2..2958740 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedLockUtilsTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedLockUtilsTest.java
@@ -22,14 +22,11 @@
 import android.content.pm.UserInfo;
 import android.os.UserManager;
 
-import com.android.internal.util.ArrayUtils;
-
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
-import org.robolectric.RobolectricTestRunner;
 import org.robolectric.annotation.Config;
 
 import java.util.Arrays;
@@ -38,10 +35,9 @@
 import static android.app.admin.DevicePolicyManager.KEYGUARD_DISABLE_REMOTE_INPUT;
 import static com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;
 import static com.google.common.truth.Truth.assertThat;
-import static org.mockito.Matchers.eq;
 import static org.mockito.Mockito.when;
 
-@RunWith(RobolectricTestRunner.class)
+@RunWith(SettingLibRobolectricTestRunner.class)
 @Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
 public class RestrictedLockUtilsTest {
 
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedPreferenceHelperTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedPreferenceHelperTest.java
new file mode 100644
index 0000000..43e238b
--- /dev/null
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedPreferenceHelperTest.java
@@ -0,0 +1,91 @@
+/*
+ * 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.settingslib;
+
+
+import android.content.Context;
+import android.support.v7.preference.Preference;
+import android.support.v7.preference.PreferenceViewHolder;
+import android.view.View;
+import android.widget.TextView;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.annotation.Config;
+
+import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+@RunWith(SettingLibRobolectricTestRunner.class)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+public class RestrictedPreferenceHelperTest {
+
+
+    @Mock
+    private Context mContext;
+    @Mock
+    private Preference mPreference;
+
+    private PreferenceViewHolder mViewHolder;
+    private RestrictedPreferenceHelper mHelper;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        mViewHolder = new PreferenceViewHolder(mock(View.class));
+        mHelper = new RestrictedPreferenceHelper(mContext, mPreference, null);
+    }
+
+    @Test
+    public void bindPreference_disabled_shouldDisplayDisabledSummary() {
+        final TextView summaryView = mock(TextView.class, RETURNS_DEEP_STUBS);
+        when(mViewHolder.itemView.findViewById(android.R.id.summary))
+                .thenReturn(summaryView);
+        when(summaryView.getContext().getText(R.string.disabled_by_admin_summary_text))
+                .thenReturn("test");
+
+        mHelper.useAdminDisabledSummary(true);
+        mHelper.setDisabledByAdmin(new RestrictedLockUtils.EnforcedAdmin());
+        mHelper.onBindViewHolder(mViewHolder);
+
+        verify(summaryView).setText("test");
+        verify(summaryView, never()).setVisibility(View.GONE);
+    }
+
+    @Test
+    public void bindPreference_notDisabled_shouldNotHideSummary() {
+        final TextView summaryView = mock(TextView.class, RETURNS_DEEP_STUBS);
+        when(mViewHolder.itemView.findViewById(android.R.id.summary))
+                .thenReturn(summaryView);
+        when(summaryView.getContext().getText(R.string.disabled_by_admin_summary_text))
+                .thenReturn("test");
+        when(summaryView.getText()).thenReturn("test");
+
+        mHelper.useAdminDisabledSummary(true);
+        mHelper.setDisabledByAdmin(null);
+        mHelper.onBindViewHolder(mViewHolder);
+
+        verify(summaryView).setText(null);
+        verify(summaryView, never()).setVisibility(View.GONE);
+    }
+}
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/SettingLibRobolectricTestRunner.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/SettingLibRobolectricTestRunner.java
new file mode 100644
index 0000000..11c925e
--- /dev/null
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/SettingLibRobolectricTestRunner.java
@@ -0,0 +1,48 @@
+/*
+ * 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.settingslib;
+
+import org.junit.runners.model.InitializationError;
+import org.robolectric.RobolectricTestRunner;
+import org.robolectric.annotation.Config;
+import org.robolectric.manifest.AndroidManifest;
+import org.robolectric.res.Fs;
+import org.robolectric.res.ResourcePath;
+
+import java.util.List;
+
+public class SettingLibRobolectricTestRunner extends RobolectricTestRunner {
+
+    public SettingLibRobolectricTestRunner(Class<?> testClass) throws InitializationError {
+        super(testClass);
+    }
+
+    @Override
+    protected AndroidManifest getAppManifest(Config config) {
+        // Using the manifest file's relative path, we can figure out the application directory.
+        final String appRoot = "frameworks/base/packages/SettingsLib";
+        final String manifestPath = appRoot + "/AndroidManifest.xml";
+        final String resDir = appRoot + "/tests/robotests/res";
+        final String assetsDir = appRoot + config.assetDir();
+
+        final AndroidManifest manifest = new AndroidManifest(Fs.fileFromPath(manifestPath),
+                Fs.fileFromPath(resDir), Fs.fileFromPath(assetsDir));
+
+        manifest.setPackageName("com.android.settingslib");
+        return manifest;
+    }
+
+}
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/SuggestionParserTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/SuggestionParserTest.java
new file mode 100644
index 0000000..7729dec
--- /dev/null
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/SuggestionParserTest.java
@@ -0,0 +1,128 @@
+/*
+ * 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.settingslib;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.os.Bundle;
+import android.preference.PreferenceManager;
+
+import com.android.settingslib.drawer.Tile;
+import com.android.settingslib.drawer.TileUtilsTest;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.RuntimeEnvironment;
+import org.robolectric.annotation.Config;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import static com.google.common.truth.Truth.assertThat;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyInt;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.when;
+
+@RunWith(SettingLibRobolectricTestRunner.class)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+public class SuggestionParserTest {
+
+    @Mock
+    private PackageManager mPackageManager;
+    private Context mContext;
+    private SuggestionParser mSuggestionParser;
+    private SuggestionParser.SuggestionCategory mSuggestioCategory;
+    private List<Tile> mSuggestionsBeforeDismiss;
+    private List<Tile> mSuggestionsAfterDismiss;
+    private SharedPreferences mPrefs;
+    private Tile mSuggestion;
+    private List<ResolveInfo> mInfo;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        mContext = spy(RuntimeEnvironment.application);
+        when(mContext.getPackageManager()).thenReturn(mPackageManager);
+        mPrefs = PreferenceManager.getDefaultSharedPreferences(mContext);
+        mSuggestion = new Tile();
+        mSuggestion.intent = new Intent("action");
+        mSuggestion.intent.setComponent(new ComponentName("pkg", "cls"));
+        mSuggestion.metaData = new Bundle();
+        mSuggestionParser = new SuggestionParser(
+            mContext, mPrefs, R.xml.suggestion_ordering, "0,0");
+        mSuggestioCategory = new SuggestionParser.SuggestionCategory();
+        mSuggestioCategory.category = "category1";
+        mSuggestioCategory.multiple = true;
+        mInfo = new ArrayList<>();
+        ResolveInfo info1 = TileUtilsTest.newInfo(true, "category1");
+        info1.activityInfo.packageName = "pkg";
+        ResolveInfo info2 = TileUtilsTest.newInfo(true, "category1");
+        info2.activityInfo.packageName = "pkg2";
+        mInfo.add(info1);
+        mInfo.add(info2);
+        when(mPackageManager.queryIntentActivitiesAsUser(
+            any(Intent.class), anyInt(), anyInt())).thenReturn(mInfo);
+    }
+
+    @Test
+    public void testDismissSuggestion_withoutSmartSuggestion() {
+        assertThat(mSuggestionParser.dismissSuggestion(mSuggestion, false)).isTrue();
+    }
+
+    @Test
+    public void testDismissSuggestion_withSmartSuggestion() {
+        assertThat(mSuggestionParser.dismissSuggestion(mSuggestion, true)).isFalse();
+    }
+
+    @Test
+    public void testGetSuggestions_withoutSmartSuggestions() {
+        readAndDismissSuggestion(false);
+        mSuggestionParser.readSuggestions(mSuggestioCategory, mSuggestionsAfterDismiss, false);
+        assertThat(mSuggestionsBeforeDismiss.size()).isEqualTo(2);
+        assertThat(mSuggestionsAfterDismiss.size()).isEqualTo(1);
+        assertThat(mSuggestionsBeforeDismiss.get(1)).isEqualTo(mSuggestionsAfterDismiss.get(0));
+    }
+
+    @Test
+    public void testGetSuggestions_withSmartSuggestions() {
+        readAndDismissSuggestion(true);
+        assertThat(mSuggestionsBeforeDismiss.size()).isEqualTo(2);
+        assertThat(mSuggestionsAfterDismiss.size()).isEqualTo(2);
+        assertThat(mSuggestionsBeforeDismiss).isEqualTo(mSuggestionsAfterDismiss);
+    }
+
+    private void readAndDismissSuggestion(boolean isSmartSuggestionEnabled) {
+        mSuggestionsBeforeDismiss = new ArrayList<Tile>();
+        mSuggestionsAfterDismiss = new ArrayList<Tile>();
+        mSuggestionParser.readSuggestions(
+            mSuggestioCategory, mSuggestionsBeforeDismiss, isSmartSuggestionEnabled);
+        if (mSuggestionParser.dismissSuggestion(
+            mSuggestionsBeforeDismiss.get(0), isSmartSuggestionEnabled)) {
+            mInfo.remove(0);
+        }
+        mSuggestionParser.readSuggestions(
+            mSuggestioCategory, mSuggestionsAfterDismiss, isSmartSuggestionEnabled);
+    }
+}
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawable/UserIconDrawableTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawable/UserIconDrawableTest.java
new file mode 100644
index 0000000..a21390a
--- /dev/null
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawable/UserIconDrawableTest.java
@@ -0,0 +1,48 @@
+/*
+ * 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.settingslib.drawable;
+
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+
+import com.android.settingslib.R;
+import com.android.settingslib.SettingLibRobolectricTestRunner;
+import com.android.settingslib.TestConfig;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.robolectric.RuntimeEnvironment;
+import org.robolectric.annotation.Config;
+
+import static com.google.common.truth.Truth.assertThat;
+
+@RunWith(SettingLibRobolectricTestRunner.class)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+public class UserIconDrawableTest {
+
+    private UserIconDrawable mDrawable;
+
+    @Test
+    public void getConstantState_shouldNotBeNull() {
+        final Bitmap b = BitmapFactory.decodeResource(
+                RuntimeEnvironment.application.getResources(),
+                R.drawable.home);
+        mDrawable = new UserIconDrawable(100 /* size */).setIcon(b).bake();
+
+        assertThat(mDrawable.getConstantState()).isNotNull();
+    }
+}
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/CategoryKeyTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/CategoryKeyTest.java
index b209f4e..40353e7 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/CategoryKeyTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/CategoryKeyTest.java
@@ -56,12 +56,11 @@
         allKeys.add(CategoryKey.CATEGORY_SECURITY);
         allKeys.add(CategoryKey.CATEGORY_ACCOUNT);
         allKeys.add(CategoryKey.CATEGORY_SYSTEM);
-        allKeys.add(CategoryKey.CATEGORY_SYSTEM_INPUT);
         allKeys.add(CategoryKey.CATEGORY_SYSTEM_LANGUAGE);
         allKeys.add(CategoryKey.CATEGORY_SYSTEM_DEVELOPMENT);
         // DO NOT REMOVE ANYTHING ABOVE
 
-        assertThat(allKeys.size()).isEqualTo(14);
+        assertThat(allKeys.size()).isEqualTo(13);
     }
 
 }
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/TileUtilsTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/TileUtilsTest.java
index 021a96c..1683901 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/TileUtilsTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/TileUtilsTest.java
@@ -40,6 +40,7 @@
 
 import com.android.settingslib.SuggestionParser;
 import com.android.settingslib.TestConfig;
+import com.android.settingslib.drawer.TileUtilsTest;
 import static org.mockito.Mockito.atLeastOnce;
 
 import org.junit.Before;
@@ -179,7 +180,7 @@
 
         assertThat(outTiles.size()).isEqualTo(1);
         SuggestionParser parser = new SuggestionParser(mContext, null);
-        parser.filterSuggestions(outTiles, 0);
+        parser.filterSuggestions(outTiles, 0, false);
         assertThat(outTiles.size()).isEqualTo(0);
     }
 
@@ -303,16 +304,16 @@
         assertThat(outTiles.get(0).summary).isEqualTo("dynamic-summary");
     }
 
-    private ResolveInfo newInfo(boolean systemApp, String category) {
+    public static ResolveInfo newInfo(boolean systemApp, String category) {
         return newInfo(systemApp, category, null);
     }
 
-    private ResolveInfo newInfo(boolean systemApp, String category, String keyHint) {
+    private static ResolveInfo newInfo(boolean systemApp, String category, String keyHint) {
         return newInfo(systemApp, category, keyHint, null, null);
     }
 
-    private ResolveInfo newInfo(boolean systemApp, String category, String keyHint, String iconUri,
-            String summaryUri) {
+    private static ResolveInfo newInfo(boolean systemApp, String category, String keyHint,
+        String iconUri, String summaryUri) {
         ResolveInfo info = new ResolveInfo();
         info.system = systemApp;
         info.activityInfo = new ActivityInfo();
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index 7206127..136f17e 100644
--- a/packages/SettingsProvider/res/values/defaults.xml
+++ b/packages/SettingsProvider/res/values/defaults.xml
@@ -38,7 +38,7 @@
 
     <bool name="def_bluetooth_on">true</bool>
     <bool name="def_wifi_display_on">false</bool>
-    <bool name="def_install_non_market_apps">false</bool>
+    <bool name="def_install_non_market_apps">true</bool>
     <bool name="def_package_verifier_enable">true</bool>
     <!-- Comma-separated list of location providers.
          Network location is off by default because it requires
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
index 8bbc8c9..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,
@@ -1399,9 +1402,6 @@
                 Settings.Secure.NIGHT_DISPLAY_CUSTOM_END_TIME,
                 SecureSettingsProto.NIGHT_DISPLAY_CUSTOM_END_TIME);
         dumpSetting(s, p,
-                Settings.Secure.BRIGHTNESS_USE_TWILIGHT,
-                SecureSettingsProto.BRIGHTNESS_USE_TWILIGHT);
-        dumpSetting(s, p,
                 Settings.Secure.ENABLED_VR_LISTENERS,
                 SecureSettingsProto.ENABLED_VR_LISTENERS);
         dumpSetting(s, p,
@@ -1429,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 8be9243..d5787e6 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 = 137;
+            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;
                 }
 
@@ -3187,6 +3168,23 @@
 
                     currentVersion = 137;
                 }
+                if (currentVersion == 137) {
+                    // Version 138: Settings.Secure#INSTALL_NON_MARKET_APPS is deprecated and its
+                    // default value set to 1. The user can no longer change the value of this
+                    // setting through the UI.
+                    final SettingsState secureSetting = getSecureSettingsLocked(userId);
+                    if (!mUserManager.hasUserRestriction(
+                            UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES, UserHandle.of(userId))) {
+                        secureSetting.insertSettingLocked(Settings.Secure.INSTALL_NON_MARKET_APPS,
+                                "1", null, true, SettingsState.SYSTEM_PACKAGE_NAME);
+                    }
+                    currentVersion = 138;
+                }
+
+                if (currentVersion == 138) {
+                    // Version 139: Removed.
+                    currentVersion = 139;
+                }
 
                 if (currentVersion != newVersion) {
                     Slog.wtf("SettingsProvider", "warning: upgrading settings database to version "
diff --git a/packages/SettingsProvider/test/src/com/android/providers/settings/InstallNonMarketAppsDeprecationTest.java b/packages/SettingsProvider/test/src/com/android/providers/settings/InstallNonMarketAppsDeprecationTest.java
new file mode 100644
index 0000000..51e4373
--- /dev/null
+++ b/packages/SettingsProvider/test/src/com/android/providers/settings/InstallNonMarketAppsDeprecationTest.java
@@ -0,0 +1,146 @@
+/*
+ * 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.providers.settings;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertFalse;
+import static junit.framework.Assert.assertTrue;
+
+import android.content.Context;
+import android.content.pm.UserInfo;
+import android.os.SystemClock;
+import android.os.UserManager;
+import android.provider.Settings;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.filters.LargeTest;
+import android.util.Log;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.BufferedReader;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.List;
+
+@LargeTest
+public class InstallNonMarketAppsDeprecationTest extends BaseSettingsProviderTest {
+
+    private static final String TAG = InstallNonMarketAppsDeprecationTest.class.getSimpleName();
+    private static final long USER_RESTRICTION_CHANGE_TIMEOUT = 5000;
+
+    private UserManager mUm;
+    private boolean mHasUserRestriction;
+    private List<UserInfo> mCurrentUsers;
+
+    private String waitTillValueChanges(String errorMessage, String oldValue) {
+        boolean interrupted = false;
+        final long startTime = SystemClock.uptimeMillis();
+        String newValue = getSetting(SETTING_TYPE_SECURE, Settings.Secure.INSTALL_NON_MARKET_APPS);
+        while (newValue.equals(oldValue) && SystemClock.uptimeMillis() <= (startTime
+                + USER_RESTRICTION_CHANGE_TIMEOUT)) {
+            try {
+                Thread.sleep(1000);
+            } catch (InterruptedException exc) {
+                interrupted = true;
+            }
+            newValue = getSetting(SETTING_TYPE_SECURE, Settings.Secure.INSTALL_NON_MARKET_APPS);
+        }
+        if (interrupted) {
+            Thread.currentThread().interrupt();
+        }
+        assertFalse(errorMessage, oldValue.equals(newValue));
+        return newValue;
+    }
+
+    private String getSecureSettingForUserViaShell(int userId) throws IOException {
+        StringBuilder sb = new StringBuilder("settings get --user ");
+        sb.append(userId + " secure ");
+        sb.append(Settings.Secure.INSTALL_NON_MARKET_APPS);
+        BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(
+                InstrumentationRegistry.getInstrumentation().getUiAutomation().executeShellCommand(
+                        sb.toString()).getFileDescriptor())));
+        String line = reader.readLine();
+        return line.trim();
+    }
+
+    @Before
+    public void setUp() {
+        mUm = (UserManager) getContext().getSystemService(Context.USER_SERVICE);
+        mHasUserRestriction = mUm.hasUserRestriction(UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES);
+        mCurrentUsers = mUm.getUsers();
+    }
+
+    @Test
+    public void testValueDefaults() throws Exception {
+        if (mHasUserRestriction) {
+            // Default values don't apply when user restriction is set. Pass.
+            Log.w(TAG, "User restriction for unknown sources set. Skipping testValueDefaults test");
+            return;
+        }
+        String value = getSetting(SETTING_TYPE_SECURE, Settings.Secure.INSTALL_NON_MARKET_APPS);
+        assertEquals("install_non_market_apps should be 1", value, "1");
+
+        setSettingViaShell(SETTING_TYPE_SECURE, Settings.Secure.INSTALL_NON_MARKET_APPS, "0",
+                false);
+        resetSettingsViaShell(SETTING_TYPE_SECURE, Settings.RESET_MODE_TRUSTED_DEFAULTS);
+
+        value = getSetting(SETTING_TYPE_SECURE, Settings.Secure.INSTALL_NON_MARKET_APPS);
+        assertEquals("install_non_market_apps not reset to 1", value, "1");
+    }
+
+    @Test
+    public void testValueForNewUser() throws Exception {
+        UserInfo newUser = mUm.createUser("TEST_USER", 0);
+        String value = getSecureSettingForUserViaShell(newUser.id);
+        assertEquals("install_non_market_apps should be 1 for a new user", value, "1");
+    }
+
+    @Test
+    public void testValueRespectsUserRestriction() {
+        String value = getSetting(SETTING_TYPE_SECURE, Settings.Secure.INSTALL_NON_MARKET_APPS);
+        assertEquals(value, mHasUserRestriction ? "0" : "1");
+
+        mUm.setUserRestriction(UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES, !mHasUserRestriction);
+        value = waitTillValueChanges(
+                "Changing user restriction did not change the value of install_non_market_apps",
+                value);
+        assertTrue("Invalid value", value.equals("1") || value.equals("0"));
+
+        mUm.setUserRestriction(UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES, mHasUserRestriction);
+        value = waitTillValueChanges(
+                "Changing user restriction did not change the value of install_non_market_apps",
+                value);
+        assertTrue("Invalid value", value.equals("1") || value.equals("0"));
+    }
+
+    @After
+    public void tearDown() {
+        if (mUm.hasUserRestriction(UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES)
+                != mHasUserRestriction) {
+            mUm.setUserRestriction(UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES,
+                    mHasUserRestriction);
+        }
+        mUm.getUsers().forEach(user -> {
+            if (!mCurrentUsers.contains(user)) {
+                mUm.removeUser(user.id);
+            }
+        });
+    }
+}
diff --git a/packages/Shell/AndroidManifest.xml b/packages/Shell/AndroidManifest.xml
index d4c7c7a..2e115ab 100644
--- a/packages/Shell/AndroidManifest.xml
+++ b/packages/Shell/AndroidManifest.xml
@@ -154,8 +154,8 @@
             android:name=".BugreportReceiver"
             android:permission="android.permission.DUMP">
             <intent-filter>
-                <action android:name="android.intent.action.BUGREPORT_STARTED" />
-                <action android:name="android.intent.action.BUGREPORT_FINISHED" />
+                <action android:name="com.android.internal.intent.action.BUGREPORT_STARTED" />
+                <action android:name="com.android.internal.intent.action.BUGREPORT_FINISHED" />
             </intent-filter>
         </receiver>
 
@@ -163,7 +163,7 @@
             android:name=".RemoteBugreportReceiver"
             android:permission="android.permission.DUMP">
             <intent-filter>
-                <action android:name="android.intent.action.REMOTE_BUGREPORT_FINISHED" />
+                <action android:name="com.android.internal.intent.action.REMOTE_BUGREPORT_FINISHED" />
             </intent-filter>
         </receiver>
 
diff --git a/packages/Shell/src/com/android/shell/BugreportProgressService.java b/packages/Shell/src/com/android/shell/BugreportProgressService.java
index 26568cc..12d0c03 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;
@@ -132,10 +133,12 @@
     private static final String AUTHORITY = "com.android.shell";
 
     // External intents sent by dumpstate.
-    static final String INTENT_BUGREPORT_STARTED = "android.intent.action.BUGREPORT_STARTED";
-    static final String INTENT_BUGREPORT_FINISHED = "android.intent.action.BUGREPORT_FINISHED";
+    static final String INTENT_BUGREPORT_STARTED =
+            "com.android.internal.intent.action.BUGREPORT_STARTED";
+    static final String INTENT_BUGREPORT_FINISHED =
+            "com.android.internal.intent.action.BUGREPORT_FINISHED";
     static final String INTENT_REMOTE_BUGREPORT_FINISHED =
-            "android.intent.action.REMOTE_BUGREPORT_FINISHED";
+            "com.android.internal.intent.action.REMOTE_BUGREPORT_FINISHED";
 
     // Internal intents used on notification actions.
     static final String INTENT_BUGREPORT_CANCEL = "android.intent.action.BUGREPORT_CANCEL";
@@ -579,6 +582,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);
     }
 
@@ -849,15 +862,19 @@
             .append(SystemProperties.get("ro.build.description"))
             .append("\nSerial number: ")
             .append(SystemProperties.get("ro.serialno"));
+        int descriptionLength = 0;
         if (!TextUtils.isEmpty(info.description)) {
             messageBody.append("\nDescription: ").append(info.description);
+            descriptionLength = info.description.length();
         }
         intent.putExtra(Intent.EXTRA_TEXT, messageBody.toString());
         final ClipData clipData = new ClipData(null, new String[] { mimeType },
                 new ClipData.Item(null, null, null, bugreportUri));
+        Log.d(TAG, "share intent: bureportUri=" + bugreportUri);
         final ArrayList<Uri> attachments = Lists.newArrayList(bugreportUri);
         for (File screenshot : info.screenshotFiles) {
             final Uri screenshotUri = getUri(context, screenshot);
+            Log.d(TAG, "share intent: screenshotUri=" + screenshotUri);
             clipData.addItem(new ClipData.Item(null, null, null, screenshotUri));
             attachments.add(screenshotUri);
         }
@@ -876,6 +893,10 @@
             // default profile.
         }
 
+        // Log what was sent to the intent
+        Log.d(TAG, "share intent: EXTRA_SUBJECT=" + subject + ", EXTRA_TEXT=" + messageBody.length()
+                + " chars, description=" + descriptionLength + " chars");
+
         return intent;
     }
 
@@ -1255,14 +1276,17 @@
             return;
         }
         if (title != null && !title.equals(info.title)) {
+            Log.d(TAG, "updating bugreport title: " + title);
             MetricsLogger.action(this, MetricsEvent.ACTION_BUGREPORT_DETAILS_TITLE_CHANGED);
         }
         info.title = title;
         if (description != null && !description.equals(info.description)) {
+            Log.d(TAG, "updating bugreport description: " + description.length() + " chars");
             MetricsLogger.action(this, MetricsEvent.ACTION_BUGREPORT_DETAILS_DESCRIPTION_CHANGED);
         }
         info.description = description;
         if (name != null && !name.equals(info.name)) {
+            Log.d(TAG, "updating bugreport name: " + name);
             MetricsLogger.action(this, MetricsEvent.ACTION_BUGREPORT_DETAILS_NAME_CHANGED);
             info.name = name;
             updateProgress(info);
@@ -1673,17 +1697,34 @@
         public String toString() {
             final float percent = ((float) progress * 100 / max);
             final float realPercent = ((float) realProgress * 100 / realMax);
-            return "\tid: " + id + ", pid: " + pid + ", name: " + name + ", finished: " + finished
-                    + "\n\ttitle: " + title
-                    + "\n\tdescription: " + description
-                    + "\n\tfile: " + bugreportFile
-                    + "\n\tscreenshots: " + screenshotFiles
-                    + "\n\tprogress: " + progress + "/" + max + " (" + percent + ")"
-                    + "\n\treal progress: " + realProgress + "/" + realMax + " (" + realPercent
-                    + ")"
-                    + "\n\tlast_update: " + getFormattedLastUpdate()
-                    + "\n\taddingDetailsToZip: " + addingDetailsToZip + " addedDetailsToZip: "
-                    + addedDetailsToZip;
+
+            final StringBuilder builder = new StringBuilder()
+                    .append("\tid: ").append(id)
+                    .append(", pid: ").append(pid)
+                    .append(", name: ").append(name)
+                    .append(", finished: ").append(finished)
+                    .append("\n\ttitle: ").append(title)
+                    .append("\n\tdescription: ");
+            if (description == null) {
+                builder.append("null");
+            } else {
+                if (TextUtils.getTrimmedLength(description) == 0) {
+                    builder.append("empty ");
+                }
+                builder.append("(").append(description.length()).append(" chars)");
+            }
+
+            return builder
+                .append("\n\tfile: ").append(bugreportFile)
+                .append("\n\tscreenshots: ").append(screenshotFiles)
+                .append("\n\tprogress: ").append(progress).append("/").append(max)
+                .append(" (").append(percent).append(")")
+                .append("\n\treal progress: ").append(realProgress).append("/").append(realMax)
+                .append(" (").append(realPercent).append(")")
+                .append("\n\tlast_update: ").append(getFormattedLastUpdate())
+                .append("\n\taddingDetailsToZip: ").append(addingDetailsToZip)
+                .append(" addedDetailsToZip: ").append(addedDetailsToZip)
+                .toString();
         }
 
         // Parcelable contract
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/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
index 4b8734f..b2e2a2c 100644
--- a/packages/SystemUI/AndroidManifest.xml
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -559,6 +559,16 @@
             </intent-filter>
         </receiver>
 
+        <provider
+            android:name="android.support.v4.content.FileProvider"
+            android:authorities="com.android.systemui.fileprovider"
+            android:exported="false"
+            android:grantUriPermissions="true">
+            <meta-data
+                android:name="android.support.FILE_PROVIDER_PATHS"
+                android:resource="@xml/fileprovider" />
+        </provider>
+
         <receiver
             android:name=".statusbar.KeyboardShortcutsReceiver">
             <intent-filter>
diff --git a/packages/SystemUI/plugin/Android.mk b/packages/SystemUI/plugin/Android.mk
index 86527db..05ee6b2 100644
--- a/packages/SystemUI/plugin/Android.mk
+++ b/packages/SystemUI/plugin/Android.mk
@@ -27,3 +27,13 @@
 LOCAL_JAR_EXCLUDE_FILES := none
 
 include $(BUILD_STATIC_JAVA_LIBRARY)
+
+include $(CLEAR_VARS)
+
+# Dummy to generate .toc files.
+LOCAL_PACKAGE_NAME := PluginDummyLib
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+
+LOCAL_JAVA_LIBRARIES := SystemUIPluginLib
+
+include $(BUILD_PACKAGE)
diff --git a/packages/SystemUI/plugin/ExamplePlugin/src/com/android/systemui/plugin/testoverlayplugin/SampleOverlayPlugin.java b/packages/SystemUI/plugin/ExamplePlugin/src/com/android/systemui/plugin/testoverlayplugin/SampleOverlayPlugin.java
index a2f84dc..79a0c35 100644
--- a/packages/SystemUI/plugin/ExamplePlugin/src/com/android/systemui/plugin/testoverlayplugin/SampleOverlayPlugin.java
+++ b/packages/SystemUI/plugin/ExamplePlugin/src/com/android/systemui/plugin/testoverlayplugin/SampleOverlayPlugin.java
@@ -15,25 +15,27 @@
 package com.android.systemui.plugin.testoverlayplugin;
 
 import android.content.Context;
+import android.graphics.Rect;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 
+import android.view.ViewTreeObserver.InternalInsetsInfo;
+import android.view.ViewTreeObserver.OnComputeInternalInsetsListener;
 import com.android.systemui.plugins.OverlayPlugin;
+import com.android.systemui.plugins.annotations.Requires;
 
+@Requires(target = OverlayPlugin.class, version = OverlayPlugin.VERSION)
 public class SampleOverlayPlugin implements OverlayPlugin {
     private static final String TAG = "SampleOverlayPlugin";
     private Context mPluginContext;
 
     private View mStatusBarView;
     private View mNavBarView;
-
-    @Override
-    public int getVersion() {
-        Log.d(TAG, "getVersion " + VERSION);
-        return VERSION;
-    }
+    private boolean mInputSetup;
+    private boolean mCollapseDesired;
+    private float mStatusBarHeight;
 
     @Override
     public void onCreate(Context sysuiContext, Context pluginContext) {
@@ -43,6 +45,10 @@
 
     @Override
     public void onDestroy() {
+        if (mInputSetup) {
+            mStatusBarView.getViewTreeObserver().removeOnComputeInternalInsetsListener(
+                    onComputeInternalInsetsListener);
+        }
         Log.d(TAG, "onDestroy");
         if (mStatusBarView != null) {
             mStatusBarView.post(
@@ -57,6 +63,9 @@
     public void setup(View statusBar, View navBar) {
         Log.d(TAG, "Setup");
 
+        int id = mPluginContext.getResources().getIdentifier("status_bar_height", "dimen",
+                "android");
+        mStatusBarHeight = mPluginContext.getResources().getDimension(id);
         if (statusBar instanceof ViewGroup) {
             mStatusBarView = LayoutInflater.from(mPluginContext)
                     .inflate(R.layout.colored_overlay, (ViewGroup) statusBar, false);
@@ -68,4 +77,28 @@
             ((ViewGroup) navBar).addView(mNavBarView);
         }
     }
+
+    @Override
+    public void setCollapseDesired(boolean collapseDesired) {
+        mCollapseDesired = collapseDesired;
+    }
+
+    @Override
+    public boolean holdStatusBarOpen() {
+        if (!mInputSetup) {
+            mInputSetup = true;
+            mStatusBarView.getViewTreeObserver().addOnComputeInternalInsetsListener(
+                    onComputeInternalInsetsListener);
+        }
+        return true;
+    }
+
+    final OnComputeInternalInsetsListener onComputeInternalInsetsListener = inoutInfo -> {
+        inoutInfo.setTouchableInsets(InternalInsetsInfo.TOUCHABLE_INSETS_REGION);
+        if (mCollapseDesired) {
+            inoutInfo.touchableRegion.set(new Rect(0, 0, 50000, (int) mStatusBarHeight));
+        } else {
+            inoutInfo.touchableRegion.set(new Rect(0, 0, 50000, 50000));
+        }
+    };
 }
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..97dbafd 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/IntentButtonProvider.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/IntentButtonProvider.java
@@ -14,6 +14,8 @@
 
 package com.android.systemui.plugins;
 
+import com.android.systemui.plugins.annotations.ProvidesInterface;
+
 import android.content.Intent;
 import android.graphics.drawable.Drawable;
 
@@ -21,6 +23,7 @@
  * An Intent Button represents a triggerable element in SysUI that consists of an
  * Icon and an intent to trigger when it is activated (clicked, swiped, etc.).
  */
+@ProvidesInterface(version = IntentButtonProvider.VERSION)
 public interface IntentButtonProvider extends Plugin {
 
     public static final int VERSION = 1;
@@ -32,6 +35,7 @@
             public boolean isVisible = true;
             public CharSequence contentDescription = null;
             public Drawable drawable;
+            public boolean tint = true;
         }
 
         public IconState getIcon();
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/OverlayPlugin.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/OverlayPlugin.java
index 91a2604..61aa60b 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/OverlayPlugin.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/OverlayPlugin.java
@@ -13,12 +13,25 @@
  */
 package com.android.systemui.plugins;
 
+import com.android.systemui.plugins.annotations.ProvidesInterface;
+
 import android.view.View;
 
+@ProvidesInterface(action = OverlayPlugin.ACTION, version = OverlayPlugin.VERSION)
 public interface OverlayPlugin extends Plugin {
 
     String ACTION = "com.android.systemui.action.PLUGIN_OVERLAY";
-    int VERSION = 1;
+    int VERSION = 2;
 
     void setup(View statusBar, View navBar);
+
+    default boolean holdStatusBarOpen() {
+        return false;
+    }
+
+    /**
+     * Only called if the plugin has returned true to holdStatusBarOpen().
+     */
+    default void setCollapseDesired(boolean collapseDesired) {
+    }
 }
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/Plugin.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/Plugin.java
index e75ecb7..bb93367 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/Plugin.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/Plugin.java
@@ -13,6 +13,8 @@
  */
 package com.android.systemui.plugins;
 
+import com.android.systemui.plugins.annotations.Requires;
+
 import android.content.Context;
 
 /**
@@ -111,18 +113,13 @@
 public interface Plugin {
 
     /**
-     * Should be implemented as the following directly referencing the version constant
-     * from the plugin interface being implemented, this will allow recompiles to automatically
-     * pick up the current version.
-     * <pre class="prettyprint">
-     * {@literal
-     * public int getVersion() {
-     *     return VERSION;
-     * }
-     * }
-     * @return
+     * @deprecated
+     * @see Requires
      */
-    int getVersion();
+    default int getVersion() {
+        // Default of -1 indicates the plugin supports the new Requires model.
+        return -1;
+    }
 
     default void onCreate(Context sysuiContext, Context pluginContext) {
     }
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/annotations/Dependencies.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/annotations/Dependencies.java
new file mode 100644
index 0000000..dbbf047
--- /dev/null
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/annotations/Dependencies.java
@@ -0,0 +1,27 @@
+/*
+ * 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.plugins.annotations;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * Used for repeated @DependsOn internally, not for plugin
+ * use.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Dependencies {
+    DependsOn[] value();
+}
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/annotations/DependsOn.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/annotations/DependsOn.java
new file mode 100644
index 0000000..b81d673
--- /dev/null
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/annotations/DependsOn.java
@@ -0,0 +1,32 @@
+/*
+ * 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.plugins.annotations;
+
+import java.lang.annotation.Repeatable;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * Used to indicate that an interface in the plugin library needs another
+ * interface to function properly. When this is added, it will be enforced
+ * that all plugins that @Requires the annotated interface also @Requires
+ * the specified class as well.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Repeatable(value = Dependencies.class)
+public @interface DependsOn {
+    Class<?> target();
+
+}
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/annotations/ProvidesInterface.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/annotations/ProvidesInterface.java
new file mode 100644
index 0000000..d0e14b8
--- /dev/null
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/annotations/ProvidesInterface.java
@@ -0,0 +1,30 @@
+/*
+ * 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.plugins.annotations;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * Should be added to all interfaces in plugin lib to specify their
+ * current version and optionally their action to implement the plugin.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ProvidesInterface {
+    int version();
+
+    String action() default "";
+
+}
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/annotations/Requirements.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/annotations/Requirements.java
new file mode 100644
index 0000000..9cfa279
--- /dev/null
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/annotations/Requirements.java
@@ -0,0 +1,27 @@
+/*
+ * 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.plugins.annotations;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * Used for repeated @Requires internally, not for plugin
+ * use.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Requirements {
+    Requires[] value();
+}
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/annotations/Requires.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/annotations/Requires.java
new file mode 100644
index 0000000..e1b1303
--- /dev/null
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/annotations/Requires.java
@@ -0,0 +1,33 @@
+/*
+ * 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.plugins.annotations;
+
+import java.lang.annotation.Repeatable;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * Used to annotate which interfaces a given plugin depends on.
+ *
+ * At minimum all plugins should have at least one @Requires annotation
+ * for the plugin interface that they are implementing. They will also
+ * need an @Requires for each class that the plugin interface @DependsOn.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Repeatable(value = Requirements.class)
+public @interface Requires {
+    Class<?> target();
+    int version();
+}
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/doze/DozeProvider.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/doze/DozeProvider.java
index 688df46..0688481 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/doze/DozeProvider.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/doze/DozeProvider.java
@@ -20,10 +20,12 @@
 import android.content.Context;
 
 import com.android.systemui.plugins.Plugin;
+import com.android.systemui.plugins.annotations.ProvidesInterface;
 
 /**
  * Provides a {@link DozeUi}.
  */
+@ProvidesInterface(action = DozeProvider.ACTION, version = DozeProvider.VERSION)
 public interface DozeProvider extends Plugin {
 
     String ACTION = "com.android.systemui.action.PLUGIN_DOZE";
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QS.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QS.java
index e21a282..b7467eb 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QS.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QS.java
@@ -14,29 +14,32 @@
 
 package com.android.systemui.plugins.qs;
 
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.app.PendingIntent;
+import com.android.systemui.plugins.FragmentBase;
+import com.android.systemui.plugins.annotations.DependsOn;
+import com.android.systemui.plugins.annotations.ProvidesInterface;
+import com.android.systemui.plugins.qs.QS.Callback;
+import com.android.systemui.plugins.qs.QS.DetailAdapter;
+import com.android.systemui.plugins.qs.QS.HeightListener;
+
 import android.content.Context;
 import android.content.Intent;
 import android.util.AttributeSet;
 import android.view.View;
 import android.view.ViewGroup;
-import android.widget.FrameLayout;
 import android.widget.RelativeLayout;
 
-import com.android.systemui.plugins.FragmentBase;
-
 /**
  * Fragment that contains QS in the notification shade.  Most of the interface is for
  * handling the expand/collapsing of the view interaction.
  */
+@ProvidesInterface(action = QS.ACTION, version = QS.VERSION)
+@DependsOn(target = HeightListener.class)
+@DependsOn(target = Callback.class)
+@DependsOn(target = DetailAdapter.class)
 public interface QS extends FragmentBase {
 
     public static final String ACTION = "com.android.systemui.action.PLUGIN_QS";
 
-    // This should be incremented any time this class or ActivityStarter or BaseStatusBarHeader
-    // change in incompatible ways.
     public static final int VERSION = 5;
 
     String TAG = "QS";
@@ -64,17 +67,23 @@
 
     public abstract void setContainer(ViewGroup container);
 
+    @ProvidesInterface(version = HeightListener.VERSION)
     public interface HeightListener {
+        public static final int VERSION = 1;
         void onQsHeightChanged();
     }
 
+    @ProvidesInterface(version = Callback.VERSION)
     public interface Callback {
+        public static final int VERSION = 1;
         void onShowingDetail(DetailAdapter detail, int x, int y);
         void onToggleStateChanged(boolean state);
         void onScanStateChanged(boolean state);
     }
 
+    @ProvidesInterface(version = DetailAdapter.VERSION)
     public interface DetailAdapter {
+        public static final int VERSION = 1;
         CharSequence getTitle();
         Boolean getToggleState();
         default boolean getToggleEnabled() {
@@ -92,7 +101,9 @@
         default boolean hasHeader() { return true; }
     }
 
+    @ProvidesInterface(version = BaseStatusBarHeader.VERSION)
     public abstract static class BaseStatusBarHeader extends RelativeLayout {
+        public static final int VERSION = 1;
 
         public BaseStatusBarHeader(Context context, AttributeSet attrs) {
             super(context, attrs);
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/NotificationMenuRowProvider.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/NotificationMenuRowProvider.java
index 93ba39c..529c421 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/NotificationMenuRowProvider.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/NotificationMenuRowProvider.java
@@ -10,7 +10,10 @@
 import java.util.ArrayList;
 
 import com.android.systemui.plugins.Plugin;
+import com.android.systemui.plugins.annotations.ProvidesInterface;
 
+@ProvidesInterface(action = NotificationMenuRowProvider.ACTION,
+        version = NotificationMenuRowProvider.VERSION)
 public interface NotificationMenuRowProvider extends Plugin {
 
     public static final String ACTION = "com.android.systemui.action.PLUGIN_NOTIFICATION_MENU_ROW";
@@ -39,7 +42,9 @@
 
         public View getContentView();
 
-        public boolean handleCloseControls();
+        public boolean handleCloseControls(boolean save);
+
+        public boolean willBeRemoved();
     }
 
     public interface SnoozeGutsContent extends GutsContent {
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/phone/NavBarButtonProvider.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/phone/NavBarButtonProvider.java
index d54e33f..5243228 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/phone/NavBarButtonProvider.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/phone/NavBarButtonProvider.java
@@ -14,14 +14,15 @@
 
 package com.android.systemui.plugins.statusbar.phone;
 
-import android.annotation.DrawableRes;
 import android.annotation.Nullable;
 import android.graphics.drawable.Drawable;
 import android.view.View;
 import android.view.ViewGroup;
 
 import com.android.systemui.plugins.Plugin;
+import com.android.systemui.plugins.annotations.ProvidesInterface;
 
+@ProvidesInterface(action = NavBarButtonProvider.ACTION, version = NavBarButtonProvider.VERSION)
 public interface NavBarButtonProvider extends Plugin {
 
     public static final String ACTION = "com.android.systemui.action.PLUGIN_NAV_BUTTON";
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/phone/NavGesture.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/phone/NavGesture.java
index 0728482..ddee89e 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/phone/NavGesture.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/phone/NavGesture.java
@@ -17,7 +17,9 @@
 import android.view.MotionEvent;
 
 import com.android.systemui.plugins.Plugin;
+import com.android.systemui.plugins.annotations.ProvidesInterface;
 
+@ProvidesInterface(action = NavGesture.ACTION, version = NavBarButtonProvider.VERSION)
 public interface NavGesture extends Plugin {
 
     public static final String ACTION = "com.android.systemui.action.PLUGIN_NAV_GESTURE";
@@ -32,6 +34,8 @@
         public boolean onInterceptTouchEvent(MotionEvent event);
 
         public void setBarState(boolean vertical, boolean isRtl);
+
+        public default void destroy() { }
     }
 
 }
diff --git a/packages/SystemUI/proguard.flags b/packages/SystemUI/proguard.flags
index 6d76798..8cc2ce2 100644
--- a/packages/SystemUI/proguard.flags
+++ b/packages/SystemUI/proguard.flags
@@ -38,5 +38,5 @@
 -keep class ** extends android.support.v14.preference.PreferenceFragment
 -keep class com.android.systemui.tuner.*
 -keep class com.android.systemui.plugins.** {
-    public protected **;
+    public protected *;
 }
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/SystemUI/res-keyguard/values-af/strings.xml b/packages/SystemUI/res-keyguard/values-af/strings.xml
new file mode 100644
index 0000000..ef6d58f
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-af/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Knoppie vir wissel van invoermetode."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-am/strings.xml b/packages/SystemUI/res-keyguard/values-am/strings.xml
new file mode 100644
index 0000000..99de8ef
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-am/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"የግቤት ስልት አዝራር ቀይር"</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-ar/strings.xml b/packages/SystemUI/res-keyguard/values-ar/strings.xml
new file mode 100644
index 0000000..28c3f25
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-ar/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"زر تبديل طريقة الإدخال."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-az/strings.xml b/packages/SystemUI/res-keyguard/values-az/strings.xml
new file mode 100644
index 0000000..0e8ddfa
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-az/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Daxiletmə metodu düyməsinə keç"</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-b+sr+Latn/strings.xml b/packages/SystemUI/res-keyguard/values-b+sr+Latn/strings.xml
new file mode 100644
index 0000000..bb027e3
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-b+sr+Latn/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Dugme Promeni metod unosa."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-be/strings.xml b/packages/SystemUI/res-keyguard/values-be/strings.xml
new file mode 100644
index 0000000..c960e4a
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-be/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Кнопка пераключэння метаду ўводу."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-bg/strings.xml b/packages/SystemUI/res-keyguard/values-bg/strings.xml
new file mode 100644
index 0000000..1777805
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-bg/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Бутон за превключване на метода на въвеждане."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-bn/strings.xml b/packages/SystemUI/res-keyguard/values-bn/strings.xml
new file mode 100644
index 0000000..1c9cbb1
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-bn/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"ইনপুট পদ্ধতির বোতাম পরিবর্তন করুন৷"</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-bs/strings.xml b/packages/SystemUI/res-keyguard/values-bs/strings.xml
new file mode 100644
index 0000000..65acca1
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-bs/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Promijeni dugme za način unosa."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-ca/strings.xml b/packages/SystemUI/res-keyguard/values-ca/strings.xml
new file mode 100644
index 0000000..fab2335
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-ca/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Botó de canvi del mètode d\'entrada."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-cs/strings.xml b/packages/SystemUI/res-keyguard/values-cs/strings.xml
new file mode 100644
index 0000000..d383f70
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-cs/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Tlačítko přepnutí metody zadávání"</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-da/strings.xml b/packages/SystemUI/res-keyguard/values-da/strings.xml
new file mode 100644
index 0000000..7148d5f
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-da/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Skift indtastningsmetode-knappen."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-de/strings.xml b/packages/SystemUI/res-keyguard/values-de/strings.xml
new file mode 100644
index 0000000..4003cc8
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-de/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Schaltfläche zum Ändern der Eingabemethode"</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-el/strings.xml b/packages/SystemUI/res-keyguard/values-el/strings.xml
new file mode 100644
index 0000000..5f88df5
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-el/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Κουμπί εναλλαγής μεθόδου εισόδου"</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-en-rAU/strings.xml b/packages/SystemUI/res-keyguard/values-en-rAU/strings.xml
new file mode 100644
index 0000000..d324941
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-en-rAU/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Switch input method button."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-en-rGB/strings.xml b/packages/SystemUI/res-keyguard/values-en-rGB/strings.xml
new file mode 100644
index 0000000..d324941
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-en-rGB/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Switch input method button."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-en-rIN/strings.xml b/packages/SystemUI/res-keyguard/values-en-rIN/strings.xml
new file mode 100644
index 0000000..d324941
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-en-rIN/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Switch input method button."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-es-rUS/strings.xml b/packages/SystemUI/res-keyguard/values-es-rUS/strings.xml
new file mode 100644
index 0000000..347a676
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-es-rUS/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Botón Cambiar método de entrada"</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-es/strings.xml b/packages/SystemUI/res-keyguard/values-es/strings.xml
new file mode 100644
index 0000000..347a676
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-es/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Botón Cambiar método de entrada"</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-et/strings.xml b/packages/SystemUI/res-keyguard/values-et/strings.xml
new file mode 100644
index 0000000..4595504
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-et/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Sisestusmeetodi vahetamise nupp."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-eu/strings.xml b/packages/SystemUI/res-keyguard/values-eu/strings.xml
new file mode 100644
index 0000000..79f001f
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-eu/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Idazketa-metodoa aldatzeko botoia."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-fa/strings.xml b/packages/SystemUI/res-keyguard/values-fa/strings.xml
new file mode 100644
index 0000000..f730352
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-fa/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"کلید تغییر روش ورود متن."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-fi/strings.xml b/packages/SystemUI/res-keyguard/values-fi/strings.xml
new file mode 100644
index 0000000..2c3876f
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-fi/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Syöttötavan vaihtopainike."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-fr-rCA/strings.xml b/packages/SystemUI/res-keyguard/values-fr-rCA/strings.xml
new file mode 100644
index 0000000..5a535f7
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-fr-rCA/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Bouton \"Changer le mode de saisie\""</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-fr/strings.xml b/packages/SystemUI/res-keyguard/values-fr/strings.xml
new file mode 100644
index 0000000..5a535f7
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-fr/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Bouton \"Changer le mode de saisie\""</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-gl/strings.xml b/packages/SystemUI/res-keyguard/values-gl/strings.xml
new file mode 100644
index 0000000..858ac79
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-gl/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Cambiar o botón do método de entrada."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-gu/strings.xml b/packages/SystemUI/res-keyguard/values-gu/strings.xml
new file mode 100644
index 0000000..37cd1ab
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-gu/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"ઇનપુટ પદ્ધતિ બટન સ્વિચ કરો."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
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/SystemUI/res-keyguard/values-hi/strings.xml b/packages/SystemUI/res-keyguard/values-hi/strings.xml
new file mode 100644
index 0000000..cbd7715
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-hi/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"इनपुट पद्धति‍ बटन स्विच करें."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-hr/strings.xml b/packages/SystemUI/res-keyguard/values-hr/strings.xml
new file mode 100644
index 0000000..85330d0
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-hr/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Gumb za promjenu načina unosa."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-hu/strings.xml b/packages/SystemUI/res-keyguard/values-hu/strings.xml
new file mode 100644
index 0000000..fea195e
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-hu/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Beviteli mód váltása gomb."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-hy/strings.xml b/packages/SystemUI/res-keyguard/values-hy/strings.xml
new file mode 100644
index 0000000..bed77a9
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-hy/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Միացնել մուտքագրման եղանակի կոճակը:"</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-in/strings.xml b/packages/SystemUI/res-keyguard/values-in/strings.xml
new file mode 100644
index 0000000..ea98d73
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-in/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Tombol beralih metode masukan."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-is/strings.xml b/packages/SystemUI/res-keyguard/values-is/strings.xml
new file mode 100644
index 0000000..faa92ce
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-is/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Hnappur til að skipta um innsláttaraðferð."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-it/strings.xml b/packages/SystemUI/res-keyguard/values-it/strings.xml
new file mode 100644
index 0000000..ebd15cd
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-it/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Pulsante per cambiare metodo di immissione."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-iw/strings.xml b/packages/SystemUI/res-keyguard/values-iw/strings.xml
new file mode 100644
index 0000000..7d0d2b8
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-iw/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"לחצן החלפת שיטת קלט."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-ja/strings.xml b/packages/SystemUI/res-keyguard/values-ja/strings.xml
new file mode 100644
index 0000000..5e0178b
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-ja/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"入力方法の切り替えボタン。"</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-ka/strings.xml b/packages/SystemUI/res-keyguard/values-ka/strings.xml
new file mode 100644
index 0000000..00c4592
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-ka/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"შეყვანის მეთოდის გადართვის ღილაკი."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-kk/strings.xml b/packages/SystemUI/res-keyguard/values-kk/strings.xml
new file mode 100644
index 0000000..dd2622f
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-kk/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Енгізу әдісі түймесін ауыстыру."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-km/strings.xml b/packages/SystemUI/res-keyguard/values-km/strings.xml
new file mode 100644
index 0000000..c9f38b1
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-km/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"ប្ដូរ​ប៊ូតុង​វិធីសាស្ត្រ​បញ្ចូល។"</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-kn/strings.xml b/packages/SystemUI/res-keyguard/values-kn/strings.xml
new file mode 100644
index 0000000..429a835
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-kn/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"ಇನ್‌ಪುಟ್ ವಿಧಾನ ಬದಲಿಸು ಬಟನ್."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-ko/strings.xml b/packages/SystemUI/res-keyguard/values-ko/strings.xml
new file mode 100644
index 0000000..dfdcaf6
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-ko/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"입력 방법 버튼을 전환합니다."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-ky/strings.xml b/packages/SystemUI/res-keyguard/values-ky/strings.xml
new file mode 100644
index 0000000..3ab2348
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-ky/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Киргизүү ыкмасын которуу баскычы."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
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/SystemUI/res-keyguard/values-lo/strings.xml b/packages/SystemUI/res-keyguard/values-lo/strings.xml
new file mode 100644
index 0000000..0810c2c
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-lo/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"ປຸ່ມສະລັບຮູບແບບການປ້ອນຂໍ້ມູນ."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-lt/strings.xml b/packages/SystemUI/res-keyguard/values-lt/strings.xml
new file mode 100644
index 0000000..7db550f
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-lt/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Perjungti įvesties metodo mygtuką."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-lv/strings.xml b/packages/SystemUI/res-keyguard/values-lv/strings.xml
new file mode 100644
index 0000000..99709a1
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-lv/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Ievades metodes maiņas poga."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
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/SystemUI/res-keyguard/values-mk/strings.xml b/packages/SystemUI/res-keyguard/values-mk/strings.xml
new file mode 100644
index 0000000..c9fcb29
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-mk/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Копче за префрање метод на внес."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-ml/strings.xml b/packages/SystemUI/res-keyguard/values-ml/strings.xml
new file mode 100644
index 0000000..cce277f
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-ml/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"ടൈപ്പുചെയ്യൽ രീതി ബട്ടൺ മാറുക."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-mn/strings.xml b/packages/SystemUI/res-keyguard/values-mn/strings.xml
new file mode 100644
index 0000000..202dcb0
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-mn/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Оруулах аргыг сэлгэх товч."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-mr/strings.xml b/packages/SystemUI/res-keyguard/values-mr/strings.xml
new file mode 100644
index 0000000..8648768
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-mr/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"इनपुट पद्धत स्‍विच करा बटण."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-ms/strings.xml b/packages/SystemUI/res-keyguard/values-ms/strings.xml
new file mode 100644
index 0000000..efb529e
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-ms/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Butang tukar kaedah input."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
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/SystemUI/res-keyguard/values-my/strings.xml b/packages/SystemUI/res-keyguard/values-my/strings.xml
new file mode 100644
index 0000000..364a647
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-my/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"ထည့်သွင်းခြင်းခလုတ်အား ပြောင်းခြင်း"</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-nb/strings.xml b/packages/SystemUI/res-keyguard/values-nb/strings.xml
new file mode 100644
index 0000000..507b2a3
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-nb/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Bytt knapp for inndatametode."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-ne/strings.xml b/packages/SystemUI/res-keyguard/values-ne/strings.xml
new file mode 100644
index 0000000..b73db1d
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-ne/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"इनपुट विधि बटन स्विच गर्नुहोस्।"</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-nl/strings.xml b/packages/SystemUI/res-keyguard/values-nl/strings.xml
new file mode 100644
index 0000000..5a16a77
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-nl/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Knop voor wijzigen invoermethode."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-pa/strings.xml b/packages/SystemUI/res-keyguard/values-pa/strings.xml
new file mode 100644
index 0000000..00e472c
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-pa/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"ਇਨਪੁਟ ਵਿਧੀ ਬਟਨ ਸਵਿਚ ਕਰੋ।"</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-pl/strings.xml b/packages/SystemUI/res-keyguard/values-pl/strings.xml
new file mode 100644
index 0000000..1b8f6f0
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-pl/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Przycisk przełączania metody wprowadzania."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
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/SystemUI/res-keyguard/values-pt-rBR/strings.xml b/packages/SystemUI/res-keyguard/values-pt-rBR/strings.xml
new file mode 100644
index 0000000..f274be3
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-pt-rBR/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Alterar botão do método de entrada."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-pt-rPT/strings.xml b/packages/SystemUI/res-keyguard/values-pt-rPT/strings.xml
new file mode 100644
index 0000000..bb724ba
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-pt-rPT/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Alternar botão de método de introdução."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-pt/strings.xml b/packages/SystemUI/res-keyguard/values-pt/strings.xml
new file mode 100644
index 0000000..f274be3
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-pt/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Alterar botão do método de entrada."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-ro/strings.xml b/packages/SystemUI/res-keyguard/values-ro/strings.xml
new file mode 100644
index 0000000..5b19f8c
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-ro/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Buton pentru comutarea metodei de introducere."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-ru/strings.xml b/packages/SystemUI/res-keyguard/values-ru/strings.xml
new file mode 100644
index 0000000..0ebb831
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-ru/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Кнопка переключения способа ввода."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-si/strings.xml b/packages/SystemUI/res-keyguard/values-si/strings.xml
new file mode 100644
index 0000000..f217d4b
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-si/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"ආදාන ක්‍රමය මාරු කිරීමේ බොත්තම."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-sk/strings.xml b/packages/SystemUI/res-keyguard/values-sk/strings.xml
new file mode 100644
index 0000000..88ee590
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-sk/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Tlačidlo prepnutia metódy vstupu."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-sl/strings.xml b/packages/SystemUI/res-keyguard/values-sl/strings.xml
new file mode 100644
index 0000000..98689a5
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-sl/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Gumb za preklop načina vnosa."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-sq/strings.xml b/packages/SystemUI/res-keyguard/values-sq/strings.xml
new file mode 100644
index 0000000..3bf8912
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-sq/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Butoni i metodës së ndërrimit të hyrjeve."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-sr/strings.xml b/packages/SystemUI/res-keyguard/values-sr/strings.xml
new file mode 100644
index 0000000..be91a69
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-sr/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Дугме Промени метод уноса."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-sv/strings.xml b/packages/SystemUI/res-keyguard/values-sv/strings.xml
new file mode 100644
index 0000000..2334132
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-sv/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Knapp för byte av inmatningsmetod."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-sw/strings.xml b/packages/SystemUI/res-keyguard/values-sw/strings.xml
new file mode 100644
index 0000000..01ce3c3
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-sw/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Swichi kitufe cha mbinu ingizi."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
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/SystemUI/res-keyguard/values-ta/strings.xml b/packages/SystemUI/res-keyguard/values-ta/strings.xml
new file mode 100644
index 0000000..9c25e5d
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-ta/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"உள்ளீட்டு முறையை மாற்றும் பொத்தான்."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-te/strings.xml b/packages/SystemUI/res-keyguard/values-te/strings.xml
new file mode 100644
index 0000000..eb47024
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-te/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"ఇన్‌పుట్ పద్ధతి మార్చే బటన్."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-th/strings.xml b/packages/SystemUI/res-keyguard/values-th/strings.xml
new file mode 100644
index 0000000..0f55a44
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-th/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"ปุ่มสลับวิธีการป้อนข้อมูล"</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-tl/strings.xml b/packages/SystemUI/res-keyguard/values-tl/strings.xml
new file mode 100644
index 0000000..c587b94
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-tl/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Ilipat ang button na pamamaraan ng pag-input."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-tr/strings.xml b/packages/SystemUI/res-keyguard/values-tr/strings.xml
new file mode 100644
index 0000000..3e2bd22
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-tr/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Giriş yöntemini değiştirme düğmesi."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-uk/strings.xml b/packages/SystemUI/res-keyguard/values-uk/strings.xml
new file mode 100644
index 0000000..b1c82ce
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-uk/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Кнопка перемикання методу введення."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-ur/strings.xml b/packages/SystemUI/res-keyguard/values-ur/strings.xml
new file mode 100644
index 0000000..959a2bd
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-ur/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"اندراج کا طریقہ سوئچ کرنے کا بٹن۔"</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-uz/strings.xml b/packages/SystemUI/res-keyguard/values-uz/strings.xml
new file mode 100644
index 0000000..6391e2b
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-uz/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Kiritish uslubi tugmasini almashtirish."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-vi/strings.xml b/packages/SystemUI/res-keyguard/values-vi/strings.xml
new file mode 100644
index 0000000..e2d0d22
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-vi/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Nút chuyển phương thức nhập."</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-zh-rCN/strings.xml b/packages/SystemUI/res-keyguard/values-zh-rCN/strings.xml
new file mode 100644
index 0000000..68624b1
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-zh-rCN/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"输入法切换按钮。"</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-zh-rHK/strings.xml b/packages/SystemUI/res-keyguard/values-zh-rHK/strings.xml
new file mode 100644
index 0000000..94c9a2d
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-zh-rHK/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"切換輸入法按鈕。"</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-zh-rTW/strings.xml b/packages/SystemUI/res-keyguard/values-zh-rTW/strings.xml
new file mode 100644
index 0000000..94c9a2d
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-zh-rTW/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"切換輸入法按鈕。"</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
diff --git a/packages/SystemUI/res-keyguard/values-zu/strings.xml b/packages/SystemUI/res-keyguard/values-zu/strings.xml
new file mode 100644
index 0000000..6bd709e
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/values-zu/strings.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for app_name (3171996292755059205) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_code (3420548423949593123) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_code (670683628782925409) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_puk_prompt (3747778500166059332) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_prompt (8188243197504453830) -->
+    <skip />
+    <!-- no translation found for keyguard_password_entry_touch_hint (5790410752696806482) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_password_code (595980919238127672) -->
+    <skip />
+    <!-- no translation found for keyguard_password_enter_pin_password_code (7504123374204446086) -->
+    <skip />
+    <!-- no translation found for keyguard_password_wrong_pin_code (6535018036285012028) -->
+    <skip />
+    <!-- no translation found for keyguard_charged (2222329688813033109) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in (89308975354638682) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_fast (8869226755413795173) -->
+    <skip />
+    <!-- no translation found for keyguard_plugged_in_charging_slowly (6637043106038550407) -->
+    <skip />
+    <!-- no translation found for keyguard_low_battery (9218432555787624490) -->
+    <skip />
+    <!-- no translation found for keyguard_instructions_when_pattern_disabled (8566679946700751371) -->
+    <skip />
+    <!-- no translation found for keyguard_network_locked_message (6743537524631420759) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message_short (6327533369959764518) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (4550152848200783542) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_message (6585414237800161146) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions (7350295932015220392) -->
+    <skip />
+    <!-- no translation found for keyguard_missing_sim_instructions_long (589889372883904477) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_message_short (654102080186420706) -->
+    <skip />
+    <!-- no translation found for keyguard_permanent_disabled_sim_instructions (4683178224791318347) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_locked_message (953766009432168127) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_puk_locked_message (1772789643694942073) -->
+    <skip />
+    <!-- no translation found for keyguard_sim_unlock_progress_dialog_message (3586601150825821675) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_pin_area (703175752097279029) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_pin_area (912702510825058921) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_sim_puk_area (136979425761438705) -->
+    <skip />
+    <!-- no translation found for keyguard_accessibility_next_alarm (5835196989158584991) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_delete (6883116827512721630) -->
+    <skip />
+    <!-- no translation found for keyboardview_keycode_enter (4505833604411016668) -->
+    <skip />
+    <!-- no translation found for kg_forgot_pattern_button_text (534245177645252620) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pattern (7620081431514773802) -->
+    <skip />
+    <!-- no translation found for kg_wrong_password (4580683060277329277) -->
+    <skip />
+    <!-- no translation found for kg_wrong_pin (4785660766909463466) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_attempts_countdown (527455490371878356) -->
+    <skip />
+    <!-- no translation found for kg_pattern_instructions (5547646893001491340) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions (1795013002231184046) -->
+    <skip />
+    <!-- no translation found for kg_sim_pin_instructions_multi (1586316574649150223) -->
+    <skip />
+    <!-- no translation found for kg_pin_instructions (4069609316644030034) -->
+    <skip />
+    <!-- no translation found for kg_password_instructions (136952397352976538) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint (2288964170039899277) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_puk_hint_multi (1373131883510840794) -->
+    <skip />
+    <!-- no translation found for kg_puk_enter_pin_hint (3137789674920391087) -->
+    <skip />
+    <!-- no translation found for kg_enter_confirm_pin_hint (3089485999116759671) -->
+    <skip />
+    <!-- no translation found for kg_sim_unlock_progress_dialog_message (4471738151810900114) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_pin_hint (3057533256729513335) -->
+    <skip />
+    <!-- no translation found for kg_invalid_sim_puk_hint (6003602401368264144) -->
+    <skip />
+    <!-- no translation found for kg_invalid_puk (5399287873762592502) -->
+    <skip />
+    <!-- no translation found for kg_invalid_confirm_pin_hint (5672736555427444330) -->
+    <skip />
+    <!-- no translation found for kg_login_too_many_attempts (6604574268387867255) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pin_attempts_dialog_message (8637788033282252027) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_password_attempts_dialog_message (7724148763268377734) -->
+    <skip />
+    <!-- no translation found for kg_too_many_failed_pattern_attempts_dialog_message (4820967667848302092) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (1629351522209932316) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_wipe (3921998703529189931) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (4694232971224663735) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_wiping (2365964340830006961) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (1365418870560228936) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_user (2151286957817486128) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (5464020754932560928) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_user (6171564974118059) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (9154513795928824239) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_erase_profile (2162434417489128282) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8966727588974691544) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_now_erasing_profile (8476407539834855) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (956706236554092172) -->
+    <skip />
+    <!-- no translation found for kg_failed_attempts_almost_at_login (8364140853305528449) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code_pukked (3389829202093674267) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_pin_code (4314341367727055967) -->
+    <!-- no translation found for kg_password_wrong_puk_code_dead (3329017604125179374) -->
+    <skip />
+    <!-- no translation found for kg_password_wrong_puk_code (2287504898931957513) -->
+    <!-- no translation found for kg_password_pin_failed (8769990811451236223) -->
+    <skip />
+    <!-- no translation found for kg_password_puk_failed (1331621440873439974) -->
+    <skip />
+    <!-- no translation found for kg_pin_accepted (7637293533973802143) -->
+    <skip />
+    <!-- no translation found for keyguard_carrier_default (4274828292998453695) -->
+    <skip />
+    <string name="accessibility_ime_switch_button" msgid="2695096475319405612">"Vula indlela yokungena yenkinobho"</string>
+    <!-- no translation found for airplane_mode (3807209033737676010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pattern (7246972020562621506) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_pin (6303592361322290145) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_restart_password (6984641181515902406) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pattern (5304487696073914063) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_pin (8851462864335757813) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_timeout_password (6563904839641583441) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pattern (3398054847288438444) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_pin (7426368139226961699) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_switch_profiles_password (8383831046318421845) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_device_admin (2438626748767361010) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (8236951765212462286) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_time_pattern (71299470072448533) -->
+    <!-- no translation found for kg_prompt_reason_time_pin (34586942088144385) -->
+    <!-- no translation found for kg_prompt_reason_time_password (257297696215346527) -->
+    <!-- no translation found for fingerprint_not_recognized (348813995267914625) -->
+    <skip />
+</resources>
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/drawable-hdpi/ic_sysbar_accessibility_button.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_accessibility_button.png
new file mode 100644
index 0000000..0615668
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_accessibility_button.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_accessibility_button_dark.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_accessibility_button_dark.png
new file mode 100644
index 0000000..839e5ed
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_accessibility_button_dark.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_accessibility_button.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_accessibility_button.png
new file mode 100644
index 0000000..1480c865
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_accessibility_button.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_accessibility_button_dark.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_accessibility_button_dark.png
new file mode 100644
index 0000000..66e11fb
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_accessibility_button_dark.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_accessibility_button.png b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_accessibility_button.png
new file mode 100644
index 0000000..d2fe0c3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_accessibility_button.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_accessibility_button_dark.png b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_accessibility_button_dark.png
new file mode 100644
index 0000000..5923269
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_accessibility_button_dark.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_accessibility_button.png b/packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_accessibility_button.png
new file mode 100644
index 0000000..d0196e5
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_accessibility_button.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_accessibility_button_dark.png b/packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_accessibility_button_dark.png
new file mode 100644
index 0000000..d3a2b39
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_accessibility_button_dark.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxxhdpi/ic_sysbar_accessibility_button.png b/packages/SystemUI/res/drawable-xxxhdpi/ic_sysbar_accessibility_button.png
new file mode 100644
index 0000000..726643c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xxxhdpi/ic_sysbar_accessibility_button.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxxhdpi/ic_sysbar_accessibility_button_dark.png b/packages/SystemUI/res/drawable-xxxhdpi/ic_sysbar_accessibility_button_dark.png
new file mode 100644
index 0000000..31078f6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xxxhdpi/ic_sysbar_accessibility_button_dark.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable/ic_data_saver.xml b/packages/SystemUI/res/drawable/ic_data_saver.xml
index 9c3bd3a..64bbff0 100644
--- a/packages/SystemUI/res/drawable/ic_data_saver.xml
+++ b/packages/SystemUI/res/drawable/ic_data_saver.xml
@@ -23,7 +23,7 @@
         android:fillColor="#FFFFFFFF"
         android:pathData="M12.0,19.0c-3.9,0.0 -7.0,-3.1 -7.0,-7.0c0.0,-3.5 2.6,-6.4 6.0,-6.9L11.0,2.0C5.9,2.5 2.0,6.8 2.0,12.0c0.0,5.5 4.5,10.0 10.0,10.0c3.3,0.0 6.2,-1.6 8.1,-4.1l-2.6,-1.5C16.2,18.0 14.2,19.0 12.0,19.0z"/>
     <path
-        android:fillColor="#4DFFFFFF"
+        android:fillColor="#54FFFFFF"
         android:pathData="M13.0,2.0l0.0,3.0c3.4,0.5 6.0,3.4 6.0,6.9c0.0,0.9 -0.2,1.8 -0.5,2.5l2.6,1.5c0.6,-1.2 0.9,-2.6 0.9,-4.1C22.0,6.8 18.0,2.6 13.0,2.0z"/>
     <path
         android:fillColor="#FFFFFFFF"
diff --git a/packages/SystemUI/res/drawable/ic_data_saver_off.xml b/packages/SystemUI/res/drawable/ic_data_saver_off.xml
index 918c61c..3001ad9 100644
--- a/packages/SystemUI/res/drawable/ic_data_saver_off.xml
+++ b/packages/SystemUI/res/drawable/ic_data_saver_off.xml
@@ -20,9 +20,9 @@
         android:viewportHeight="24.0"
         android:tint="?android:attr/colorControlNormal">
     <path
-        android:fillColor="#4DFFFFFF"
+        android:fillColor="#FFFFFFFF"
         android:pathData="M12.0,19.0c-3.9,0.0 -7.0,-3.1 -7.0,-7.0c0.0,-3.5 2.6,-6.4 6.0,-6.9L11.0,2.0C5.9,2.5 2.0,6.8 2.0,12.0c0.0,5.5 4.5,10.0 10.0,10.0c3.3,0.0 6.2,-1.6 8.1,-4.1l-2.6,-1.5C16.2,18.0 14.2,19.0 12.0,19.0z"/>
     <path
-        android:fillColor="#4DFFFFFF"
+        android:fillColor="#FFFFFFFF"
         android:pathData="M13.0,2.0l0.0,3.0c3.4,0.5 6.0,3.4 6.0,6.9c0.0,0.9 -0.2,1.8 -0.5,2.5l2.6,1.5c0.6,-1.2 0.9,-2.6 0.9,-4.1C22.0,6.8 18.0,2.6 13.0,2.0z"/>
 </vector>
diff --git a/packages/SystemUI/res/drawable/ic_remove_circle.xml b/packages/SystemUI/res/drawable/ic_remove_circle.xml
new file mode 100644
index 0000000..439cc78
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_remove_circle.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2015 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="48dp"
+    android:width="48dp"
+    android:tint="#db4437"
+    android:viewportHeight="48"
+    android:viewportWidth="48" >
+    <path android:fillColor="@android:color/white"
+       android:pathData="M24,4C12.95,4,4,12.95,4,24
+                         s8.95,20,20,20,20-8.95,20-20
+                         S35.05,4,24,4zm10,22H14v-4h20v4z"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/pip_dismiss_background.xml b/packages/SystemUI/res/drawable/pip_dismiss_background.xml
index 3a75296..8f50231 100644
--- a/packages/SystemUI/res/drawable/pip_dismiss_background.xml
+++ b/packages/SystemUI/res/drawable/pip_dismiss_background.xml
@@ -1,22 +1,22 @@
 <!--
-Copyright (C) 2016 The Android Open Source Project
+     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
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
 
-         http://www.apache.org/licenses/LICENSE-2.0
+          http://www.apache.org/licenses/LICENSE-2.0
 
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
 -->
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
-    android:shape="oval">
-    <corners
-        android:radius="100dp" />
-    <solid
-        android:color="#66000000" />
+    android:shape="rectangle">
+    <gradient
+        android:startColor="#B3000000"
+        android:endColor="#00000000"
+        android:angle="90"/>
 </shape>
\ No newline at end of file
diff --git a/packages/SystemUI/res/drawable/recents_grid_task_view_focus_frame_background.xml b/packages/SystemUI/res/drawable/recents_grid_task_view_focus_frame_background.xml
index ea03a50..4987f9b 100644
--- a/packages/SystemUI/res/drawable/recents_grid_task_view_focus_frame_background.xml
+++ b/packages/SystemUI/res/drawable/recents_grid_task_view_focus_frame_background.xml
@@ -15,5 +15,5 @@
 -->
 <shape xmlns:android="http://schemas.android.com/apk/res/android">
   <solid android:color="#61FFFFFF" />
-  <corners android:radius="@dimen/recents_grid_task_view_rounded_corners_radius"/>
+  <corners android:radius="@dimen/recents_grid_task_view_focused_frame_rounded_corners_radius"/>
 </shape>
\ No newline at end of file
diff --git a/packages/SystemUI/res/layout/battery_percentage_view.xml b/packages/SystemUI/res/layout/battery_percentage_view.xml
new file mode 100644
index 0000000..acae9f5
--- /dev/null
+++ b/packages/SystemUI/res/layout/battery_percentage_view.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ 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
+  -->
+
+<!-- Loaded into BatteryMeterView as necessary -->
+<TextView
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@+id/battery_percentage_view"
+        android:layout_width="wrap_content"
+        android:layout_height="match_parent"
+        android:singleLine="true"
+        android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock"
+        android:textColor="?android:attr/textColorPrimary"
+        android:gravity="center_vertical|start"
+        android:paddingStart="4dp"
+        />
diff --git a/packages/SystemUI/res/layout/divider.xml b/packages/SystemUI/res/layout/divider.xml
index 9581437..f1f0df0 100644
--- a/packages/SystemUI/res/layout/divider.xml
+++ b/packages/SystemUI/res/layout/divider.xml
@@ -16,5 +16,6 @@
 <View xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="72dp"
     android:layout_height="1dp"
+    android:layout_marginTop="8dp"
     android:background="?android:attr/colorForeground"
     android:alpha="?android:attr/disabledAlpha" />
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/layout/menu_ime.xml b/packages/SystemUI/res/layout/menu_ime.xml
index 5e85ba0..6bd79a4 100644
--- a/packages/SystemUI/res/layout/menu_ime.xml
+++ b/packages/SystemUI/res/layout/menu_ime.xml
@@ -39,4 +39,13 @@
         android:contentDescription="@string/accessibility_ime_switch_button"
         android:scaleType="centerInside"
         />
+    <com.android.systemui.statusbar.policy.KeyButtonView
+        android:id="@+id/accessibility_button"
+        android:layout_width="@dimen/navigation_extra_key_width"
+        android:layout_height="match_parent"
+        android:layout_marginEnd="2dp"
+        android:visibility="invisible"
+        android:contentDescription="@string/accessibility_accessibility_button"
+        android:scaleType="centerInside"
+    />
 </FrameLayout>
diff --git a/packages/SystemUI/res/layout/notification_guts_importance_text.xml b/packages/SystemUI/res/layout/notification_guts_importance_text.xml
deleted file mode 100644
index 5df4e0a..0000000
--- a/packages/SystemUI/res/layout/notification_guts_importance_text.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-    Copyright 2016, 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="@dimen/notification_inline_importance_height"
-    android:paddingTop="4dp"
-    android:orientation="vertical">
-    <TextView
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:ellipsize="end"
-        android:textAlignment="viewStart"
-        android:singleLine="true"
-        android:text="@string/high_importance"
-        android:textAppearance="@style/TextAppearance.NotificationGuts.Primary" />
-    <TextView
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:ellipsize="end"
-        android:textAlignment="viewStart"
-        android:singleLine="true"
-        android:text="@string/notification_importance_high"
-        android:textAppearance="@style/TextAppearance.NotificationGuts.Secondary" />
-</LinearLayout>
diff --git a/packages/SystemUI/res/layout/notification_info.xml b/packages/SystemUI/res/layout/notification_info.xml
index 9770ecc..31bd8b9 100644
--- a/packages/SystemUI/res/layout/notification_info.xml
+++ b/packages/SystemUI/res/layout/notification_info.xml
@@ -28,89 +28,73 @@
         android:background="@color/notification_guts_bg_color"
         android:theme="@*android:style/Theme.DeviceDefault.Light">
 
-    <!-- header -->
-    <RelativeLayout
+    <!-- Package Info -->
+    <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:paddingTop="20dp"
-        android:paddingEnd="8dp"
-        android:paddingBottom="15dp"
-        android:id="@+id/notification_guts_header">
+        android:orientation="horizontal"
+        android:paddingTop="16dp"
+        android:paddingBottom="16dp" >
+        <ImageView
+            android:id="@+id/pkgicon"
+            android:layout_width="18dp"
+            android:layout_height="18dp"
+            android:layout_marginEnd="6dp"
+            android:contentDescription="@null"
+            android:scaleType="fitCenter" />
         <TextView
             android:id="@+id/pkgname"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_alignParentStart="true"
             style="@style/TextAppearance.NotificationGuts.Secondary" />
         <TextView
+            android:id="@+id/pkg_group_divider"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="2dp"
+            android:layout_marginEnd="2dp"
+            android:text="@string/notification_header_divider_symbol_with_spaces"/>
+        <TextView
+            android:id="@+id/group_name"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            style="@style/TextAppearance.NotificationGuts.Secondary" />
+    </LinearLayout>
+
+    <!-- Channel Info -->
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:paddingBottom="8dp"
+        android:orientation="horizontal">
+        <TextView
             android:id="@+id/channel_name"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_alignParentStart="true"
             android:layout_below="@id/pkgname"
             style="@style/TextAppearance.NotificationGuts.Header" />
         <Switch
             android:id="@+id/channel_enabled_switch"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_alignParentRight="true"
-            android:layout_centerVertical="true"
+            android:layout_gravity="end"
+            android:layout_weight="1"
             android:background="@null" />
-    </RelativeLayout>
-    <!-- Importance radio buttons -->
-    <LinearLayout
-        android:id="@+id/importance"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal">
-        <RadioGroup
-            android:id="@+id/importance_buttons"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:paddingEnd="@*android:dimen/notification_content_margin_end">
-            <RadioButton
-                android:id="@+id/high_importance"
-                android:layout_width="wrap_content"
-                android:layout_height="@dimen/notification_inline_importance_height"
-                style="@style/TextAppearance.NotificationGuts.Radio"
-                android:buttonTint="@color/notification_guts_buttons" />
-            <RadioButton
-                android:id="@+id/default_importance"
-                android:layout_width="wrap_content"
-                android:layout_height="@dimen/notification_inline_importance_height"
-                style="@style/TextAppearance.NotificationGuts.Radio"
-                android:buttonTint="@color/notification_guts_buttons" />
-            <RadioButton
-                android:id="@+id/low_importance"
-                android:layout_width="wrap_content"
-                android:layout_height="@dimen/notification_inline_importance_height"
-                style="@style/TextAppearance.NotificationGuts.Radio"
-                android:buttonTint="@color/notification_guts_buttons" />
-            <RadioButton
-                android:id="@+id/min_importance"
-                android:layout_width="wrap_content"
-                android:layout_height="@dimen/notification_inline_importance_height"
-                style="@style/TextAppearance.NotificationGuts.Radio"
-                android:buttonTint="@color/notification_guts_buttons" />
-        </RadioGroup>
-        <LinearLayout
-            android:id="@+id/importance_buttons_text"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="vertical">
-            <include layout="@layout/notification_guts_importance_text"/>
-            <include layout="@layout/notification_guts_importance_text"/>
-            <include layout="@layout/notification_guts_importance_text"/>
-            <include layout="@layout/notification_guts_importance_text"/>
-        </LinearLayout>
     </LinearLayout>
-    <!-- Channel Disabled Text -->
+
+    <!-- Secondary Text - only one shows at a time -->
     <TextView
         android:id="@+id/channel_disabled"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:text="@string/notification_channel_disabled"
+        style="@style/TextAppearance.NotificationGuts.SecondaryWarning" />
+    <TextView
+        android:id="@+id/num_channels_desc"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
         style="@style/TextAppearance.NotificationGuts.Secondary" />
+
     <!-- Settings and Done buttons -->
     <LinearLayout
         android:layout_width="match_parent"
diff --git a/packages/SystemUI/res/layout/pip_dismiss_view.xml b/packages/SystemUI/res/layout/pip_dismiss_view.xml
index 141e610..f02a56c 100644
--- a/packages/SystemUI/res/layout/pip_dismiss_view.xml
+++ b/packages/SystemUI/res/layout/pip_dismiss_view.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 The Android Open Source Project
+<!--
+     Copyright (C) 2016 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.
@@ -13,12 +14,44 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<FrameLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/pip_dismiss_view"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@drawable/pip_dismiss_background"
-    android:foreground="@drawable/pip_dismiss"
-    android:alpha="0"
-    android:forceHasOverlappingRendering="false" />
+    android:alpha="0">
+
+    <!-- The height of the below view needs to be animated from a window
+         so it needs to be in a container to resize smoothly -->
+    <View
+        android:id="@+id/gradient_view"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_gravity="bottom"
+        android:background="@drawable/pip_dismiss_background" />
+
+    <LinearLayout
+        android:id="@+id/pip_dismiss_container"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="bottom|center_horizontal"
+        android:orientation="horizontal"
+        android:paddingBottom="32dp" >
+
+        <ImageView
+            android:id="@+id/pip_dismiss_icon"
+            android:layout_width="24dp"
+            android:layout_height="24dp"
+            android:padding="2dp"
+            android:src="@drawable/pip_dismiss"
+            android:tint="#FFFFFFFF" />
+
+        <TextView
+            android:id="@+id/pip_dismiss_text"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/pip_phone_close"
+            android:textColor="#FFFFFFFF"
+            android:textSize="16sp" />
+    </LinearLayout>
+
+</FrameLayout>
\ No newline at end of file
diff --git a/packages/SystemUI/res/layout/pip_menu_activity.xml b/packages/SystemUI/res/layout/pip_menu_activity.xml
index cf65f4a..0f5ca9b 100644
--- a/packages/SystemUI/res/layout/pip_menu_activity.xml
+++ b/packages/SystemUI/res/layout/pip_menu_activity.xml
@@ -27,7 +27,7 @@
         android:layout_height="48dp"
         android:layout_gravity="top|end"
         android:padding="10dp"
-        android:contentDescription="@string/pip_phone_dismiss"
+        android:contentDescription="@string/pip_phone_close"
         android:src="@drawable/ic_close_white"
         android:background="?android:selectableItemBackgroundBorderless" />
 
diff --git a/packages/SystemUI/res/layout/preference_widget_radiobutton.xml b/packages/SystemUI/res/layout/preference_widget_radiobutton.xml
new file mode 100644
index 0000000..b3ec43d
--- /dev/null
+++ b/packages/SystemUI/res/layout/preference_widget_radiobutton.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2006 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.
+-->
+
+<!-- Layout used by CheckBoxPreference for the checkbox style. This is inflated
+     inside android.R.layout.preference. -->
+<RadioButton xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@android:id/checkbox"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:layout_gravity="center"
+    android:focusable="false"
+    android:clickable="false" />
diff --git a/packages/SystemUI/res/layout/qs_page_indicator.xml b/packages/SystemUI/res/layout/qs_page_indicator.xml
index 02bd31a..583753a 100644
--- a/packages/SystemUI/res/layout/qs_page_indicator.xml
+++ b/packages/SystemUI/res/layout/qs_page_indicator.xml
@@ -20,9 +20,8 @@
     android:layout_width="match_parent"
     android:layout_height="48dp"
     android:layout_gravity="center"
-    android:layout_marginTop="40dp"
     android:layout_marginBottom="24dp"
     android:focusable="true"
     android:gravity="center"
     android:importantForAccessibility="yes"
-    android:visibility="gone"/>
\ No newline at end of file
+    android:visibility="gone"/>
diff --git a/packages/SystemUI/res/layout/qs_paged_tile_layout.xml b/packages/SystemUI/res/layout/qs_paged_tile_layout.xml
index 8ff1d1e..00427cb 100644
--- a/packages/SystemUI/res/layout/qs_paged_tile_layout.xml
+++ b/packages/SystemUI/res/layout/qs_paged_tile_layout.xml
@@ -19,6 +19,7 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
+    android:paddingBottom="24dp"
     android:clipChildren="false"
     android:clipToPadding="false">
 
diff --git a/packages/SystemUI/res/layout/qs_tile_label.xml b/packages/SystemUI/res/layout/qs_tile_label.xml
index a093b87..8d1f9e4 100644
--- a/packages/SystemUI/res/layout/qs_tile_label.xml
+++ b/packages/SystemUI/res/layout/qs_tile_label.xml
@@ -16,10 +16,12 @@
 -->
 <LinearLayout
         xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="wrap_content"
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:orientation="horizontal"
-        android:paddingTop="16dp">
+        android:gravity="center_horizontal"
+        android:paddingTop="8dp"
+        android:paddingBottom="8dp">
      <TextView android:id="@+id/tile_label"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
diff --git a/packages/SystemUI/res/layout/quick_settings_brightness_dialog.xml b/packages/SystemUI/res/layout/quick_settings_brightness_dialog.xml
index 6988c76..080f553 100644
--- a/packages/SystemUI/res/layout/quick_settings_brightness_dialog.xml
+++ b/packages/SystemUI/res/layout/quick_settings_brightness_dialog.xml
@@ -17,7 +17,6 @@
     xmlns:systemui="http://schemas.android.com/apk/res-auto"
     android:layout_height="48dp"
     android:layout_width="match_parent"
-    android:layout_marginBottom="24dp"
     android:paddingLeft="16dp"
     android:paddingRight="16dp"
     style="@style/BrightnessDialogContainer">
diff --git a/packages/SystemUI/res/layout/quick_status_bar_expanded_header.xml b/packages/SystemUI/res/layout/quick_status_bar_expanded_header.xml
index 174776c..78d4bdd 100644
--- a/packages/SystemUI/res/layout/quick_status_bar_expanded_header.xml
+++ b/packages/SystemUI/res/layout/quick_status_bar_expanded_header.xml
@@ -2,23 +2,22 @@
 <!--
 ** Copyright 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 
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
 **
-**     http://www.apache.org/licenses/LICENSE-2.0 
+**     http://www.apache.org/licenses/LICENSE-2.0
 **
-** Unless required by applicable law or agreed to in writing, software 
-** distributed under the License is distributed on an "AS IS" BASIS, 
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
-** See the License for the specific language governing permissions and 
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
 ** limitations under the License.
 -->
 
 <!-- Extends RelativeLayout -->
 <com.android.systemui.statusbar.phone.QuickStatusBarHeader
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:systemui="http://schemas.android.com/apk/res-auto"
     android:id="@+id/header"
     android:layout_width="match_parent"
     android:layout_height="@dimen/status_bar_header_height"
@@ -29,8 +28,7 @@
     android:clipToPadding="false"
     android:paddingTop="0dp"
     android:paddingEnd="0dp"
-    android:paddingStart="0dp"
-    >
+    android:paddingStart="0dp">
 
     <LinearLayout
         android:layout_width="wrap_content"
@@ -87,16 +85,6 @@
 
                 <include layout="@layout/system_icons" />
             </FrameLayout>
-
-            <TextView
-                android:id="@+id/battery_level"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center_vertical"
-                android:layout_marginStart="@dimen/header_battery_margin_expanded"
-                android:importantForAccessibility="noHideDescendants"
-                android:textColor="?android:attr/textColorPrimary"
-                android:textSize="@dimen/battery_level_text_size"/>
         </LinearLayout>
 
         <com.android.systemui.statusbar.AlphaOptimizedFrameLayout
@@ -190,8 +178,7 @@
         android:layout_alignParentBottom="true"
         android:alpha="0"
         android:background="@color/qs_detail_progress_track"
-        android:src="@drawable/indeterminate_anim"
-        />
+        android:src="@drawable/indeterminate_anim"/>
 
     <TextView
         android:id="@+id/header_debug_info"
@@ -203,7 +190,6 @@
         android:textColor="#00A040"
         android:textSize="11dp"
         android:textStyle="bold"
-        android:visibility="invisible"
-        />
+        android:visibility="invisible"/>
 
 </com.android.systemui.statusbar.phone.QuickStatusBarHeader>
diff --git a/packages/SystemUI/res/layout/status_bar.xml b/packages/SystemUI/res/layout/status_bar.xml
index 63af3e0..c6452c0 100644
--- a/packages/SystemUI/res/layout/status_bar.xml
+++ b/packages/SystemUI/res/layout/status_bar.xml
@@ -21,6 +21,8 @@
 <com.android.systemui.statusbar.phone.PhoneStatusBarView
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
+    android:layout_width="match_parent"
+    android:layout_height="@dimen/status_bar_height"
     android:id="@+id/status_bar"
     android:background="@drawable/system_bar_background"
     android:orientation="vertical"
diff --git a/packages/SystemUI/res/layout/status_bar_expanded.xml b/packages/SystemUI/res/layout/status_bar_expanded.xml
index f09657f..0852020 100644
--- a/packages/SystemUI/res/layout/status_bar_expanded.xml
+++ b/packages/SystemUI/res/layout/status_bar_expanded.xml
@@ -3,28 +3,27 @@
 **
 ** Copyright 2006, The Android Open Source Project
 **
-** Licensed under the Apache License, Version 2.0 (the "License"); 
-** you may not use this file except in compliance with the License. 
-** You may obtain a copy of the License at 
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
 **
-**     http://www.apache.org/licenses/LICENSE-2.0 
+**     http://www.apache.org/licenses/LICENSE-2.0
 **
-** Unless required by applicable law or agreed to in writing, software 
-** distributed under the License is distributed on an "AS IS" BASIS, 
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
-** See the License for the specific language governing permissions and 
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
 ** limitations under the License.
 */
 -->
 
-<com.android.systemui.statusbar.phone.NotificationPanelView 
+<com.android.systemui.statusbar.phone.NotificationPanelView
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:systemui="http://schemas.android.com/apk/res-auto"
     android:id="@+id/notification_panel"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@android:color/transparent"
-    >
+    android:background="@android:color/transparent" >
 
     <include
         layout="@layout/keyguard_status_view"
@@ -77,8 +76,8 @@
     </com.android.systemui.statusbar.phone.NotificationsQuickSettingsContainer>
 
     <include
-            layout="@layout/keyguard_bottom_area"
-            android:visibility="gone" />
+        layout="@layout/keyguard_bottom_area"
+        android:visibility="gone" />
 
     <com.android.systemui.statusbar.AlphaOptimizedView
         android:id="@+id/qs_navbar_scrim"
@@ -88,4 +87,4 @@
         android:visibility="invisible"
         android:background="@drawable/qs_navbar_scrim" />
 
-</com.android.systemui.statusbar.phone.NotificationPanelView><!-- end of sliding panel -->
+</com.android.systemui.statusbar.phone.NotificationPanelView>
diff --git a/packages/SystemUI/res/layout/super_status_bar.xml b/packages/SystemUI/res/layout/super_status_bar.xml
index 285a8ec..51eefb6 100644
--- a/packages/SystemUI/res/layout/super_status_bar.xml
+++ b/packages/SystemUI/res/layout/super_status_bar.xml
@@ -48,6 +48,7 @@
         android:layout_height="match_parent"
         android:importantForAccessibility="no"
         sysui:ignoreRightInset="true"
+        sysui:scrimColor="@color/scrim_behind_color"
         />
 
     <com.android.systemui.statusbar.AlphaOptimizedView
@@ -58,9 +59,10 @@
         sysui:ignoreRightInset="true"
         android:importantForAccessibility="no"/>
 
-    <include layout="@layout/status_bar"
+    <FrameLayout
+        android:id="@+id/status_bar_container"
         android:layout_width="match_parent"
-        android:layout_height="@dimen/status_bar_height" />
+        android:layout_height="wrap_content" />
 
     <include layout="@layout/brightness_mirror" />
 
@@ -72,7 +74,7 @@
     <include layout="@layout/status_bar_expanded"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:visibility="gone" />
+        android:visibility="invisible" />
 
     <com.android.systemui.statusbar.ScrimView android:id="@+id/scrim_in_front"
         android:layout_width="match_parent"
diff --git a/packages/SystemUI/res/layout/system_icons.xml b/packages/SystemUI/res/layout/system_icons.xml
index 3a33992..bfa92ad 100644
--- a/packages/SystemUI/res/layout/system_icons.xml
+++ b/packages/SystemUI/res/layout/system_icons.xml
@@ -31,9 +31,8 @@
         android:layout_height="wrap_content"
         android:layout_marginStart="@dimen/signal_cluster_margin_start"/>
 
-    <!-- battery must be padded below to match assets -->
     <com.android.systemui.BatteryMeterView android:id="@+id/battery"
-        android:layout_height="@dimen/status_bar_battery_icon_height"
-        android:layout_width="@dimen/status_bar_battery_icon_width"
-        android:layout_marginBottom="@dimen/battery_margin_bottom"/>
+        android:layout_height="match_parent"
+        android:layout_width="wrap_content"
+        />
 </LinearLayout>
\ No newline at end of file
diff --git a/packages/SystemUI/res/values-af/strings.xml b/packages/SystemUI/res/values-af/strings.xml
index e491257..0e351f5 100644
--- a/packages/SystemUI/res/values-af/strings.xml
+++ b/packages/SystemUI/res/values-af/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Terug"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Tuis"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Kieslys"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Toeganklikheid"</string>
     <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,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Maak toe"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Aanporboodskap vir wagwoord"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Opletberigte"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Skermkiekies"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Sekuriteit"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Gebruikerstatus"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Algemene boodskappe"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Berging"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-am/strings.xml b/packages/SystemUI/res/values-am/strings.xml
index d1aefcf..c5fac77 100644
--- a/packages/SystemUI/res/values-am/strings.xml
+++ b/packages/SystemUI/res/values-am/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"ተመለስ"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"መነሻ"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"ምናሌ"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"ተደራሽነት"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"አጠቃላይ ዕይታ"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"ፈልግ"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"ካሜራ"</string>
@@ -671,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"አሰናብት"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"የይለፍ ቃል ጠይቅ"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"ማንቂያዎች"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"ቅጽበታዊ ገጽ እይታዎች"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"ደህንነት"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"የተጠቃሚ ሁኔታ"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"አጠቃላይ መልዕክቶች"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"ማከማቻ"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ar/strings.xml b/packages/SystemUI/res/values-ar/strings.xml
index 77da13c..2ac6b5f 100644
--- a/packages/SystemUI/res/values-ar/strings.xml
+++ b/packages/SystemUI/res/values-ar/strings.xml
@@ -87,6 +87,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"رجوع"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"الرئيسية"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"القائمة"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"إمكانية الوصول"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"النظرة عامة"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"بحث"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"الكاميرا"</string>
@@ -679,7 +680,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"تجاهل"</string>
+    <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>
@@ -690,7 +691,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"طلب إدخال كلمة المرور"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"التنبيهات"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"لقطات الشاشة"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"الأمان"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"حالة المستخدمين"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"رسائل عامة"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"سعة التخزين"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-az/strings.xml b/packages/SystemUI/res/values-az/strings.xml
index c55e94c..77705b1 100644
--- a/packages/SystemUI/res/values-az/strings.xml
+++ b/packages/SystemUI/res/values-az/strings.xml
@@ -83,6 +83,7 @@
     <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>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Əlçatımlılıq"</string>
     <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,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Yığışdırın"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Parol üçün bildiriş"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Siqnallar"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Skrinşotlar"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Təhlükəsizlik"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"İstifadəçi statusu"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Ümumi Mesajlar"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Yaddaş"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-b+sr+Latn/strings.xml b/packages/SystemUI/res/values-b+sr+Latn/strings.xml
index cc5ab4c..9ea5f4c 100644
--- a/packages/SystemUI/res/values-b+sr+Latn/strings.xml
+++ b/packages/SystemUI/res/values-b+sr+Latn/strings.xml
@@ -84,6 +84,7 @@
     <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>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Pristupačnost"</string>
     <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,7 +674,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Odbaci"</string>
+    <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>
@@ -684,7 +685,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Upit za lozinku"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Obaveštenja"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Snimci ekrana"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Bezbednost"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Status korisnika"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Opšte poruke"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Memorijski prostor"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-be/strings.xml b/packages/SystemUI/res/values-be/strings.xml
index d084152..8f9c916 100644
--- a/packages/SystemUI/res/values-be/strings.xml
+++ b/packages/SystemUI/res/values-be/strings.xml
@@ -85,6 +85,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Назад"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"На Галоўную старонку"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Меню"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Спецыяльныя магчымасці"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"Агляд"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Пошук"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
@@ -677,7 +678,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Адхіліць"</string>
+    <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>
@@ -688,7 +689,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Запыт пароля"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Абвесткi"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Здымкі экрана"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Бяспека"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Статус карыстальніка"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Агульныя паведамленні"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Захоўванне"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml
index 08a8142..58c02f1 100644
--- a/packages/SystemUI/res/values-bg/strings.xml
+++ b/packages/SystemUI/res/values-bg/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Назад"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Начало"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Меню"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Достъпност"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"Общ преглед"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Търсене"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
@@ -671,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Отхвърляне"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Подкана за парола"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Сигнали"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Екранни снимки"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Сигурност"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Състояние на потребителя"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Общи съобщения"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Хранилище"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-bn/strings.xml b/packages/SystemUI/res/values-bn/strings.xml
index 90aa1f5..36b2e5c 100644
--- a/packages/SystemUI/res/values-bn/strings.xml
+++ b/packages/SystemUI/res/values-bn/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"ফিরুন"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"হোম"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"মেনু"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"অ্যাক্সেসযোগ্যতা"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"এক নজরে"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"অনুসন্ধান করুন"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"ক্যামেরা"</string>
@@ -156,7 +157,7 @@
     <string name="accessibility_cell_data_off" msgid="8000803571751407635">"সেলুলার ডেটা বন্ধ আছে"</string>
     <string name="accessibility_bluetooth_tether" msgid="4102784498140271969">"ব্লুটুথ টিথারিং৷"</string>
     <string name="accessibility_airplane_mode" msgid="834748999790763092">"বিমান মোড৷"</string>
-    <string name="accessibility_no_sims" msgid="3957997018324995781">"কোনো SIM কার্ড নেই।"</string>
+    <string name="accessibility_no_sims" msgid="3957997018324995781">"কোনো সিম কার্ড নেই।"</string>
     <string name="accessibility_carrier_network_change_mode" msgid="4017301580441304305">"পরিষেবা প্রদানকারীর নেটওয়ার্ক পরিবর্তিত হচ্ছে।"</string>
     <string name="accessibility_battery_details" msgid="7645516654955025422">"ব্যাটারির বিশদ বিবরণ খুলুন"</string>
     <string name="accessibility_battery_level" msgid="7451474187113371965">"<xliff:g id="NUMBER">%d</xliff:g> শতাংশ ব্যাটারি রয়েছে৷"</string>
@@ -526,24 +527,15 @@
     <string name="notification_importance_high" msgid="3316555356062640222">"শব্দ করে ও স্ক্রীনে ভেসে ওঠে"</string>
     <string name="notification_more_settings" msgid="816306283396553571">"আরো সেটিংস"</string>
     <string name="notification_done" msgid="5279426047273930175">"সম্পন্ন"</string>
-    <!-- no translation found for notification_menu_accessibility (2046162834248888553) -->
-    <skip />
-    <!-- no translation found for notification_menu_gear_description (2204480013726775108) -->
-    <skip />
-    <!-- no translation found for notification_menu_snooze_description (3653669438131034525) -->
-    <skip />
-    <!-- no translation found for snooze_option_15_min (1068727451405610715) -->
-    <skip />
-    <!-- no translation found for snooze_option_30_min (867081342535195788) -->
-    <skip />
-    <!-- no translation found for snooze_option_1_hour (1098086401880077154) -->
-    <skip />
-    <!-- no translation found for snooze_option_dont_snooze (655446566007801922) -->
-    <skip />
-    <!-- no translation found for snooze_undo (6074877317002985129) -->
-    <skip />
-    <!-- no translation found for snoozed_for_time (2390718332980204462) -->
-    <skip />
+    <string name="notification_menu_accessibility" msgid="2046162834248888553">"<xliff:g id="APP_NAME">%1$s</xliff:g> <xliff:g id="MENU_DESCRIPTION">%2$s</xliff:g>"</string>
+    <string name="notification_menu_gear_description" msgid="2204480013726775108">"বিজ্ঞপ্তির নিয়ন্ত্রণগুলি"</string>
+    <string name="notification_menu_snooze_description" msgid="3653669438131034525">"বিজ্ঞপ্তি মনে করিয়ে দেওয়ার বিকল্পগুলি"</string>
+    <string name="snooze_option_15_min" msgid="1068727451405610715">"১৫ মিনিট"</string>
+    <string name="snooze_option_30_min" msgid="867081342535195788">"৩০ মিনিট"</string>
+    <string name="snooze_option_1_hour" msgid="1098086401880077154">"১ ঘণ্টা"</string>
+    <string name="snooze_option_dont_snooze" msgid="655446566007801922">"মনে করানো হবে না"</string>
+    <string name="snooze_undo" msgid="6074877317002985129">"পূর্বাবস্থায় ফিরুন"</string>
+    <string name="snoozed_for_time" msgid="2390718332980204462">"<xliff:g id="TIME_AMOUNT">%1$s</xliff:g> পরে আবার মনে করানো হবে"</string>
     <string name="battery_panel_title" msgid="7944156115535366613">"ব্যাটারির ব্যবহার"</string>
     <string name="battery_detail_charging_summary" msgid="1279095653533044008">"চার্জ করার সময় ব্যাটারি সেভার উপলব্ধ নয়"</string>
     <string name="battery_detail_switch_title" msgid="6285872470260795421">"ব্যাটারি সেভার"</string>
@@ -605,24 +597,23 @@
     <string name="switch_bar_on" msgid="1142437840752794229">"চালু আছে"</string>
     <string name="switch_bar_off" msgid="8803270596930432874">"বন্ধ আছে"</string>
     <string name="nav_bar" msgid="1993221402773877607">"নেভিগেশন দন্ড"</string>
-    <!-- no translation found for nav_bar_layout (3664072994198772020) -->
-    <skip />
-    <!-- no translation found for nav_bar_left (731491280511316123) -->
-    <skip />
-    <!-- no translation found for nav_bar_right (2523774879720231974) -->
-    <skip />
-    <!-- no translation found for nav_bar_button_type (6947806619897153791) -->
-    <skip />
-    <!-- no translation found for nav_bar_default (8587114043070993007) -->
-    <skip />
-    <!-- no translation found for nav_bar_buttons:0 (1545641631806817203) -->
-    <!-- no translation found for nav_bar_buttons:1 (5742013440802239414) -->
-    <!-- no translation found for nav_bar_buttons:2 (8748101184830239843) -->
-    <!-- no translation found for nav_bar_buttons:3 (8175437057325747277) -->
-    <!-- no translation found for nav_bar_layouts:0 (4967898371682516967) -->
-    <!-- no translation found for nav_bar_layouts:1 (6210279084134579668) -->
-    <!-- no translation found for nav_bar_layouts:2 (89143234390889289) -->
-    <!-- no translation found for nav_bar_layouts:3 (7715533883382410603) -->
+    <string name="nav_bar_layout" msgid="3664072994198772020">"লেআউট"</string>
+    <string name="nav_bar_left" msgid="731491280511316123">"বাঁ"</string>
+    <string name="nav_bar_right" msgid="2523774879720231974">"ডান"</string>
+    <string name="nav_bar_button_type" msgid="6947806619897153791">"বোতামের ধরণ"</string>
+    <string name="nav_bar_default" msgid="8587114043070993007">"(ডিফল্ট)"</string>
+  <string-array name="nav_bar_buttons">
+    <item msgid="1545641631806817203">"ক্লিপবোর্ড"</item>
+    <item msgid="5742013440802239414">"কীকোড"</item>
+    <item msgid="8748101184830239843">"মেনু / কীবোর্ড স্যুইচার"</item>
+    <item msgid="8175437057325747277">"কোনো কিছুই নয়"</item>
+  </string-array>
+  <string-array name="nav_bar_layouts">
+    <item msgid="4967898371682516967">"ভাগ করা (ডিফল্ট)"</item>
+    <item msgid="6210279084134579668">"কেন্দ্রস্থ"</item>
+    <item msgid="89143234390889289">"বাঁ দিকে সারিবদ্ধ"</item>
+    <item msgid="7715533883382410603">"ডান দিকে সারিবদ্ধ"</item>
+  </string-array>
     <string name="menu_ime" msgid="4943221416525250684">"মেনু / কীবোর্ড স্যুইচার"</string>
     <string name="save" msgid="2311877285724540644">"সংরক্ষণ করুন"</string>
     <string name="reset" msgid="2448168080964209908">"পুনরায় সেট করুন"</string>
@@ -630,8 +621,7 @@
     <string name="clipboard" msgid="1313879395099896312">"ক্লিপবোর্ড"</string>
     <string name="accessibility_key" msgid="5701989859305675896">"কাস্টম নেভিগেশান বোতাম"</string>
     <string name="keycode" msgid="7335281375728356499">"কীকোড"</string>
-    <!-- no translation found for icon (8732339849035837289) -->
-    <skip />
+    <string name="icon" msgid="8732339849035837289">"আইকন"</string>
     <string name="drag_to_add_tiles" msgid="7058945779098711293">"টাইলগুলি যোগ করার জন্য টেনে আনুন"</string>
     <string name="drag_to_remove_tiles" msgid="3361212377437088062">"সরানোর জন্য এখানে টেনে আনুন"</string>
     <string name="qs_edit" msgid="2232596095725105230">"সম্পাদনা করুন"</string>
@@ -682,28 +672,17 @@
     <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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"খারিজ করুন"</string>
+    <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>
-    <!-- no translation found for lockscreen_left (6806490081187499505) -->
-    <skip />
-    <!-- no translation found for lockscreen_right (6093496261656102989) -->
-    <skip />
-    <!-- no translation found for lockscreen_customize (1288691376862981950) -->
-    <skip />
-    <!-- no translation found for lockscreen_shortcut (3734369277470360642) -->
-    <skip />
-    <!-- no translation found for lockscreen_unlock (4934466194763269051) -->
-    <skip />
-    <!-- no translation found for notification_channel_alerts (4496839309318519037) -->
-    <skip />
-    <!-- no translation found for notification_channel_screenshot (6314080179230000938) -->
-    <skip />
-    <!-- no translation found for notification_channel_security (7345516133431326347) -->
-    <skip />
-    <!-- no translation found for notification_channel_user_status (1436913581465146650) -->
-    <skip />
-    <!-- no translation found for notification_channel_storage (3077205683020695313) -->
-    <skip />
+    <string name="lockscreen_left" msgid="6806490081187499505">"বাঁ"</string>
+    <string name="lockscreen_right" msgid="6093496261656102989">"ডান"</string>
+    <string name="lockscreen_customize" msgid="1288691376862981950">"কাস্টমাইজ করার শর্টকাট"</string>
+    <string name="lockscreen_shortcut" msgid="3734369277470360642">"শর্টকাট"</string>
+    <string name="lockscreen_unlock" msgid="4934466194763269051">"পাসওয়ার্ড জানতে চান"</string>
+    <string name="notification_channel_alerts" msgid="4496839309318519037">"সতর্কতাগুলি"</string>
+    <string name="notification_channel_screenshot" msgid="6314080179230000938">"স্ক্রীনশটস"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"সাধারণ বার্তাগুলি"</string>
+    <string name="notification_channel_storage" msgid="3077205683020695313">"সঞ্চয়স্থান"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-bs/strings.xml b/packages/SystemUI/res/values-bs/strings.xml
index e44e4bb..b678025 100644
--- a/packages/SystemUI/res/values-bs/strings.xml
+++ b/packages/SystemUI/res/values-bs/strings.xml
@@ -84,6 +84,7 @@
     <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>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Pristupačnost"</string>
     <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>
@@ -448,7 +449,7 @@
     <string name="accessibility_volume_collapse" msgid="3609549593031810875">"Skupi"</string>
     <string name="screen_pinning_title" msgid="3273740381976175811">"Ekran je prikačen"</string>
     <string name="screen_pinning_description" msgid="8909878447196419623">"Ekran ostaje prikazan ovako dok ga ne otkačite. Da ga otkačite, dodirnite i držite dugme Nazad."</string>
-    <string name="screen_pinning_description_accessible" msgid="426190689254018656">"Ekran ostaje prikzan ovako dok ga ne otkačite. Da ga otkačite, dodirnite i držite dugme Pregled."</string>
+    <string name="screen_pinning_description_accessible" msgid="426190689254018656">"Ekran ostaje prikazan ovako dok ga ne otkačite. Da ga otkačite, dodirnite i držite dugme Pregled."</string>
     <string name="screen_pinning_positive" msgid="3783985798366751226">"Jasno mi je"</string>
     <string name="screen_pinning_negative" msgid="3741602308343880268">"Ne, hvala"</string>
     <string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Želite li sakriti <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
@@ -608,7 +609,7 @@
   <string-array name="nav_bar_buttons">
     <item msgid="1545641631806817203">"Međumemorija"</item>
     <item msgid="5742013440802239414">"Kôd tipke"</item>
-    <item msgid="8748101184830239843">"Meni / Prebacivač tastature"</item>
+    <item msgid="8748101184830239843">"Prebacivač Meni / Tastatura"</item>
     <item msgid="8175437057325747277">"Nema"</item>
   </string-array>
   <string-array name="nav_bar_layouts">
@@ -675,7 +676,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Odbaci"</string>
+    <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>
@@ -686,7 +687,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Traži lozinku"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Upozorenja"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Snimci ekrana"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Sigurnost"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Status korisnika"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Općenite poruke"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Pohrana"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ca/strings.xml b/packages/SystemUI/res/values-ca/strings.xml
index b5cf3e4..9f29fa8 100644
--- a/packages/SystemUI/res/values-ca/strings.xml
+++ b/packages/SystemUI/res/values-ca/strings.xml
@@ -83,6 +83,7 @@
     <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>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Accessibilitat"</string>
     <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,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Ignora"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Sol·licita la contrasenya"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Alertes"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Captures de pantalla"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Seguretat"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Estat de l\'usuari"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Missatges generals"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Emmagatzematge"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml
index f9ec15e..54b146d 100644
--- a/packages/SystemUI/res/values-cs/strings.xml
+++ b/packages/SystemUI/res/values-cs/strings.xml
@@ -85,6 +85,7 @@
     <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>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Přístupnost"</string>
     <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,7 +678,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Zrušit"</string>
+    <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>
@@ -688,7 +689,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Výzva k zadání hesla"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Upozornění"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Snímky obrazovek"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Zabezpečení"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Status uživatele"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Všeobecné zprávy"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Úložiště"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index 206478c..b2b7fa3 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -83,6 +83,7 @@
     <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>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Hjælpefunktioner"</string>
     <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,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Afvis"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Spørg om adgangskode"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Underretninger"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Screenshots"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Sikkerhed"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Brugerstatus"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Generelle meddelelser"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Lagerplads"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml
index a317fa0..111991d 100644
--- a/packages/SystemUI/res/values-de/strings.xml
+++ b/packages/SystemUI/res/values-de/strings.xml
@@ -83,6 +83,7 @@
     <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>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Bedienungshilfen"</string>
     <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,7 +674,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Schließen"</string>
+    <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>
@@ -684,7 +685,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Zur Passworteingabe auffordern"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Warnmeldungen"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Screenshots"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Sicherheit"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Nutzerstatus"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Nachrichten"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Speicher"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-el/strings.xml b/packages/SystemUI/res/values-el/strings.xml
index 08c5822..567aa05 100644
--- a/packages/SystemUI/res/values-el/strings.xml
+++ b/packages/SystemUI/res/values-el/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Πίσω"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Αρχική οθόνη"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Μενού"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Προσβασιμότητα"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"Επισκόπηση"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Αναζήτηση"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Φωτογραφική μηχανή"</string>
@@ -671,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Παράβλεψη"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Προτροπή για κωδικό πρόσβασης"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Ειδοποιήσεις"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Στιγμιότυπα οθόνης"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Ασφάλεια"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Κατάσταση χρήστη"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Γενικά μηνύματα"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Αποθηκευτικός χώρος"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-en-rAU/strings.xml b/packages/SystemUI/res/values-en-rAU/strings.xml
index 822c2df..25fdb81 100644
--- a/packages/SystemUI/res/values-en-rAU/strings.xml
+++ b/packages/SystemUI/res/values-en-rAU/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Back"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Home"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Accessibility"</string>
     <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,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Dismiss"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Prompt for password"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Alerts"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Screenshots"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Security"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"User status"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"General Messages"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Storage"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-en-rGB/strings.xml b/packages/SystemUI/res/values-en-rGB/strings.xml
index 822c2df..25fdb81 100644
--- a/packages/SystemUI/res/values-en-rGB/strings.xml
+++ b/packages/SystemUI/res/values-en-rGB/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Back"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Home"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Accessibility"</string>
     <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,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Dismiss"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Prompt for password"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Alerts"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Screenshots"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Security"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"User status"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"General Messages"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Storage"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-en-rIN/strings.xml b/packages/SystemUI/res/values-en-rIN/strings.xml
index 822c2df..25fdb81 100644
--- a/packages/SystemUI/res/values-en-rIN/strings.xml
+++ b/packages/SystemUI/res/values-en-rIN/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Back"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Home"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Accessibility"</string>
     <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,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Dismiss"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Prompt for password"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Alerts"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Screenshots"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Security"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"User status"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"General Messages"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Storage"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml
index 37019b1..94efa8b 100644
--- a/packages/SystemUI/res/values-es-rUS/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/strings.xml
@@ -83,6 +83,7 @@
     <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>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Accesibilidad"</string>
     <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,7 +674,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Descartar"</string>
+    <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>
@@ -684,7 +685,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Solicitar contraseña"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Alertas"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Capturas de pantalla"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Seguridad"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Estado del usuario"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Mensajes generales"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Almacenamiento"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-es/strings.xml b/packages/SystemUI/res/values-es/strings.xml
index 75cd169..6e0cdaa 100644
--- a/packages/SystemUI/res/values-es/strings.xml
+++ b/packages/SystemUI/res/values-es/strings.xml
@@ -83,6 +83,7 @@
     <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>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Accesibilidad"</string>
     <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>
@@ -528,24 +529,15 @@
     <string name="notification_importance_high" msgid="3316555356062640222">"Emitir sonido y mostrar en pantalla"</string>
     <string name="notification_more_settings" msgid="816306283396553571">"Más ajustes"</string>
     <string name="notification_done" msgid="5279426047273930175">"Listo"</string>
-    <!-- no translation found for notification_menu_accessibility (2046162834248888553) -->
-    <skip />
-    <!-- no translation found for notification_menu_gear_description (2204480013726775108) -->
-    <skip />
-    <!-- no translation found for notification_menu_snooze_description (3653669438131034525) -->
-    <skip />
-    <!-- no translation found for snooze_option_15_min (1068727451405610715) -->
-    <skip />
-    <!-- no translation found for snooze_option_30_min (867081342535195788) -->
-    <skip />
-    <!-- no translation found for snooze_option_1_hour (1098086401880077154) -->
-    <skip />
-    <!-- no translation found for snooze_option_dont_snooze (655446566007801922) -->
-    <skip />
-    <!-- no translation found for snooze_undo (6074877317002985129) -->
-    <skip />
-    <!-- no translation found for snoozed_for_time (2390718332980204462) -->
-    <skip />
+    <string name="notification_menu_accessibility" msgid="2046162834248888553">"<xliff:g id="MENU_DESCRIPTION">%2$s</xliff:g> de <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+    <string name="notification_menu_gear_description" msgid="2204480013726775108">"Controles de las notificaciones"</string>
+    <string name="notification_menu_snooze_description" msgid="3653669438131034525">"Opciones para posponer las notificaciones"</string>
+    <string name="snooze_option_15_min" msgid="1068727451405610715">"15 minutos"</string>
+    <string name="snooze_option_30_min" msgid="867081342535195788">"30 minutos"</string>
+    <string name="snooze_option_1_hour" msgid="1098086401880077154">"1 hora"</string>
+    <string name="snooze_option_dont_snooze" msgid="655446566007801922">"No posponer"</string>
+    <string name="snooze_undo" msgid="6074877317002985129">"DESHACER"</string>
+    <string name="snoozed_for_time" msgid="2390718332980204462">"Volverá a mostrarse en <xliff:g id="TIME_AMOUNT">%1$s</xliff:g>"</string>
     <string name="battery_panel_title" msgid="7944156115535366613">"Uso de la batería"</string>
     <string name="battery_detail_charging_summary" msgid="1279095653533044008">"Ahorro de batería no disponible mientras se carga el dispositivo"</string>
     <string name="battery_detail_switch_title" msgid="6285872470260795421">"Ahorro de batería"</string>
@@ -607,24 +599,23 @@
     <string name="switch_bar_on" msgid="1142437840752794229">"Sí"</string>
     <string name="switch_bar_off" msgid="8803270596930432874">"No"</string>
     <string name="nav_bar" msgid="1993221402773877607">"Barra de navegación"</string>
-    <!-- no translation found for nav_bar_layout (3664072994198772020) -->
-    <skip />
-    <!-- no translation found for nav_bar_left (731491280511316123) -->
-    <skip />
-    <!-- no translation found for nav_bar_right (2523774879720231974) -->
-    <skip />
-    <!-- no translation found for nav_bar_button_type (6947806619897153791) -->
-    <skip />
-    <!-- no translation found for nav_bar_default (8587114043070993007) -->
-    <skip />
-    <!-- no translation found for nav_bar_buttons:0 (1545641631806817203) -->
-    <!-- no translation found for nav_bar_buttons:1 (5742013440802239414) -->
-    <!-- no translation found for nav_bar_buttons:2 (8748101184830239843) -->
-    <!-- no translation found for nav_bar_buttons:3 (8175437057325747277) -->
-    <!-- no translation found for nav_bar_layouts:0 (4967898371682516967) -->
-    <!-- no translation found for nav_bar_layouts:1 (6210279084134579668) -->
-    <!-- no translation found for nav_bar_layouts:2 (89143234390889289) -->
-    <!-- no translation found for nav_bar_layouts:3 (7715533883382410603) -->
+    <string name="nav_bar_layout" msgid="3664072994198772020">"Diseño"</string>
+    <string name="nav_bar_left" msgid="731491280511316123">"Izquierda"</string>
+    <string name="nav_bar_right" msgid="2523774879720231974">"Derecha"</string>
+    <string name="nav_bar_button_type" msgid="6947806619897153791">"Tipo de botón"</string>
+    <string name="nav_bar_default" msgid="8587114043070993007">"(predeterminada)"</string>
+  <string-array name="nav_bar_buttons">
+    <item msgid="1545641631806817203">"Portapapeles"</item>
+    <item msgid="5742013440802239414">"Código de teclado"</item>
+    <item msgid="8748101184830239843">"Menú/Cambio de teclado"</item>
+    <item msgid="8175437057325747277">"Ninguno"</item>
+  </string-array>
+  <string-array name="nav_bar_layouts">
+    <item msgid="4967898371682516967">"Dividida (predeterminada)"</item>
+    <item msgid="6210279084134579668">"Centrada"</item>
+    <item msgid="89143234390889289">"Alineada a la izquierda"</item>
+    <item msgid="7715533883382410603">"Alineada a la derecha"</item>
+  </string-array>
     <string name="menu_ime" msgid="4943221416525250684">"Menú/Cambio de teclado"</string>
     <string name="save" msgid="2311877285724540644">"Guardar"</string>
     <string name="reset" msgid="2448168080964209908">"Restablecer"</string>
@@ -632,8 +623,7 @@
     <string name="clipboard" msgid="1313879395099896312">"Portapapeles"</string>
     <string name="accessibility_key" msgid="5701989859305675896">"Botón de navegación personalizada"</string>
     <string name="keycode" msgid="7335281375728356499">"Código de teclado"</string>
-    <!-- no translation found for icon (8732339849035837289) -->
-    <skip />
+    <string name="icon" msgid="8732339849035837289">"Icono"</string>
     <string name="drag_to_add_tiles" msgid="7058945779098711293">"Arrastra para añadir funciones"</string>
     <string name="drag_to_remove_tiles" msgid="3361212377437088062">"Arrastra aquí para quitar una función"</string>
     <string name="qs_edit" msgid="2232596095725105230">"Editar"</string>
@@ -684,28 +674,17 @@
     <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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Rechazar"</string>
+    <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>
-    <!-- no translation found for lockscreen_left (6806490081187499505) -->
-    <skip />
-    <!-- no translation found for lockscreen_right (6093496261656102989) -->
-    <skip />
-    <!-- no translation found for lockscreen_customize (1288691376862981950) -->
-    <skip />
-    <!-- no translation found for lockscreen_shortcut (3734369277470360642) -->
-    <skip />
-    <!-- no translation found for lockscreen_unlock (4934466194763269051) -->
-    <skip />
-    <!-- no translation found for notification_channel_alerts (4496839309318519037) -->
-    <skip />
-    <!-- no translation found for notification_channel_screenshot (6314080179230000938) -->
-    <skip />
-    <!-- no translation found for notification_channel_security (7345516133431326347) -->
-    <skip />
-    <!-- no translation found for notification_channel_user_status (1436913581465146650) -->
-    <skip />
-    <!-- no translation found for notification_channel_storage (3077205683020695313) -->
-    <skip />
+    <string name="lockscreen_left" msgid="6806490081187499505">"Izquierda"</string>
+    <string name="lockscreen_right" msgid="6093496261656102989">"Derecha"</string>
+    <string name="lockscreen_customize" msgid="1288691376862981950">"Personalizar el acceso directo"</string>
+    <string name="lockscreen_shortcut" msgid="3734369277470360642">"Acceso directo"</string>
+    <string name="lockscreen_unlock" msgid="4934466194763269051">"Solicitar contraseña"</string>
+    <string name="notification_channel_alerts" msgid="4496839309318519037">"Alertas"</string>
+    <string name="notification_channel_screenshot" msgid="6314080179230000938">"Capturas de pantalla"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Mensajes generales"</string>
+    <string name="notification_channel_storage" msgid="3077205683020695313">"Almacenamiento"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-et/strings.xml b/packages/SystemUI/res/values-et/strings.xml
index 03613bd..dc01393 100644
--- a/packages/SystemUI/res/values-et/strings.xml
+++ b/packages/SystemUI/res/values-et/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Tagasi"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Kodu"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menüü"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Juurdepääsetavus"</string>
     <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,7 +674,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Loobu"</string>
+    <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>
@@ -684,7 +685,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Parooli viip"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Teatised"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Ekraanipildid"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Turvalisus"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Kasutaja olek"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Üldised sõnumid"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Salvestusruum"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-eu/strings.xml b/packages/SystemUI/res/values-eu/strings.xml
index 115c848..df17eae 100644
--- a/packages/SystemUI/res/values-eu/strings.xml
+++ b/packages/SystemUI/res/values-eu/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Atzera"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Hasiera"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menua"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Erabilerraztasuna"</string>
     <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,7 +674,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Baztertu"</string>
+    <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>
@@ -681,10 +682,9 @@
     <string name="lockscreen_right" msgid="6093496261656102989">"Eskuinaldea"</string>
     <string name="lockscreen_customize" msgid="1288691376862981950">"Pertsonalizatu lasterbidea"</string>
     <string name="lockscreen_shortcut" msgid="3734369277470360642">"Lasterbidea"</string>
-    <string name="lockscreen_unlock" msgid="4934466194763269051">"Eskatu pasahizta"</string>
+    <string name="lockscreen_unlock" msgid="4934466194763269051">"Eskatu pasahitza"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Abisuak"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Pantaila-argazkiak"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Segurtasuna"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Erabiltzailearen egoera"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Mezu orokorrak"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Memoria"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-fa/strings.xml b/packages/SystemUI/res/values-fa/strings.xml
index 78af4b8..63da9dc 100644
--- a/packages/SystemUI/res/values-fa/strings.xml
+++ b/packages/SystemUI/res/values-fa/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"برگشت"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"صفحهٔ اصلی"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"منو"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"دسترس‌پذیری"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"نمای کلی"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"جستجو"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"دوربین"</string>
@@ -671,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"نپذیرفتن"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"درخواست وارد کردن گذرواژه"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"هشدارها"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"عکس‌های صفحه‌نمایش"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"امنیت"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"وضعیت کاربر"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"پیام‌های عمومی"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"فضای ذخیره‌سازی"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-fi/strings.xml b/packages/SystemUI/res/values-fi/strings.xml
index bc840a8..35ec9e2 100644
--- a/packages/SystemUI/res/values-fi/strings.xml
+++ b/packages/SystemUI/res/values-fi/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Takaisin"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Aloituspainike"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Valikko"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Esteettömyys"</string>
     <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,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Ohita"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Kysy salasanaa"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Ilmoitukset"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Kuvakaappaukset"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Tietosuoja"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Käyttäjätila"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Yleiset viestit"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Tallennustila"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-fr-rCA/strings.xml b/packages/SystemUI/res/values-fr-rCA/strings.xml
index f69a85b..75ddcad 100644
--- a/packages/SystemUI/res/values-fr-rCA/strings.xml
+++ b/packages/SystemUI/res/values-fr-rCA/strings.xml
@@ -83,6 +83,7 @@
     <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>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Accessibilité"</string>
     <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,7 +674,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Ignorer"</string>
+    <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>
@@ -684,7 +685,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>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Sécurité"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"État de l\'utilisateur"</string>
+    <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 4a2f23f..a78d8af 100644
--- a/packages/SystemUI/res/values-fr/strings.xml
+++ b/packages/SystemUI/res/values-fr/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Retour"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Accueil"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Accessibilité"</string>
     <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,7 +674,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Ignorer"</string>
+    <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>
@@ -684,7 +685,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">"Captures d\'écran"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Sécurité"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"État de l\'utilisateur"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Nouveaux messages"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Espace de stockage"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-gl/strings.xml b/packages/SystemUI/res/values-gl/strings.xml
index e65f3b0..190a68b 100644
--- a/packages/SystemUI/res/values-gl/strings.xml
+++ b/packages/SystemUI/res/values-gl/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Volver"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Inicio"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menú"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Accesibilidade"</string>
     <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,7 +674,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Ignorar"</string>
+    <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>
@@ -684,7 +685,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Solicitude de contrasinal"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Alertas"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Capturas de pantalla"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Seguranza"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Estado do usuario"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Mensaxes xerais"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Almacenamento"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-gu/strings.xml b/packages/SystemUI/res/values-gu/strings.xml
index b120c7d..003ddec 100644
--- a/packages/SystemUI/res/values-gu/strings.xml
+++ b/packages/SystemUI/res/values-gu/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"પાછળ"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"હોમ"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"મેનુ"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"ઍક્સેસિબિલિટી"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"વિહંગાવલોકન"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"શોધો"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"કૅમેરો"</string>
@@ -526,24 +527,15 @@
     <string name="notification_importance_high" msgid="3316555356062640222">"અવાજ કરો અને સ્ક્રીન પર બતાવો"</string>
     <string name="notification_more_settings" msgid="816306283396553571">"વધુ સેટિંગ્સ"</string>
     <string name="notification_done" msgid="5279426047273930175">"થઈ ગયું"</string>
-    <!-- no translation found for notification_menu_accessibility (2046162834248888553) -->
-    <skip />
-    <!-- no translation found for notification_menu_gear_description (2204480013726775108) -->
-    <skip />
-    <!-- no translation found for notification_menu_snooze_description (3653669438131034525) -->
-    <skip />
-    <!-- no translation found for snooze_option_15_min (1068727451405610715) -->
-    <skip />
-    <!-- no translation found for snooze_option_30_min (867081342535195788) -->
-    <skip />
-    <!-- no translation found for snooze_option_1_hour (1098086401880077154) -->
-    <skip />
-    <!-- no translation found for snooze_option_dont_snooze (655446566007801922) -->
-    <skip />
-    <!-- no translation found for snooze_undo (6074877317002985129) -->
-    <skip />
-    <!-- no translation found for snoozed_for_time (2390718332980204462) -->
-    <skip />
+    <string name="notification_menu_accessibility" msgid="2046162834248888553">"<xliff:g id="APP_NAME">%1$s</xliff:g> <xliff:g id="MENU_DESCRIPTION">%2$s</xliff:g>"</string>
+    <string name="notification_menu_gear_description" msgid="2204480013726775108">"સૂચના નિયંત્રણો"</string>
+    <string name="notification_menu_snooze_description" msgid="3653669438131034525">"સૂચના સ્નૂઝ કરવાના વિકલ્પો"</string>
+    <string name="snooze_option_15_min" msgid="1068727451405610715">"15 મિનિટ"</string>
+    <string name="snooze_option_30_min" msgid="867081342535195788">"30 મિનિટ"</string>
+    <string name="snooze_option_1_hour" msgid="1098086401880077154">"1 કલાક"</string>
+    <string name="snooze_option_dont_snooze" msgid="655446566007801922">"સ્નૂઝ કરશો નહીં"</string>
+    <string name="snooze_undo" msgid="6074877317002985129">"પૂર્વવત્ કરો"</string>
+    <string name="snoozed_for_time" msgid="2390718332980204462">"<xliff:g id="TIME_AMOUNT">%1$s</xliff:g> માટે સ્નૂઝ કરો"</string>
     <string name="battery_panel_title" msgid="7944156115535366613">"બૅટરી વપરાશ"</string>
     <string name="battery_detail_charging_summary" msgid="1279095653533044008">"ચાર્જિંગ દરમિયાન બૅટરી બચતકર્તા ઉપલબ્ધ નથી"</string>
     <string name="battery_detail_switch_title" msgid="6285872470260795421">"બૅટરી બચતકર્તા"</string>
@@ -605,24 +597,23 @@
     <string name="switch_bar_on" msgid="1142437840752794229">"ચાલુ"</string>
     <string name="switch_bar_off" msgid="8803270596930432874">"બંધ"</string>
     <string name="nav_bar" msgid="1993221402773877607">"નેવિગેશન બાર"</string>
-    <!-- no translation found for nav_bar_layout (3664072994198772020) -->
-    <skip />
-    <!-- no translation found for nav_bar_left (731491280511316123) -->
-    <skip />
-    <!-- no translation found for nav_bar_right (2523774879720231974) -->
-    <skip />
-    <!-- no translation found for nav_bar_button_type (6947806619897153791) -->
-    <skip />
-    <!-- no translation found for nav_bar_default (8587114043070993007) -->
-    <skip />
-    <!-- no translation found for nav_bar_buttons:0 (1545641631806817203) -->
-    <!-- no translation found for nav_bar_buttons:1 (5742013440802239414) -->
-    <!-- no translation found for nav_bar_buttons:2 (8748101184830239843) -->
-    <!-- no translation found for nav_bar_buttons:3 (8175437057325747277) -->
-    <!-- no translation found for nav_bar_layouts:0 (4967898371682516967) -->
-    <!-- no translation found for nav_bar_layouts:1 (6210279084134579668) -->
-    <!-- no translation found for nav_bar_layouts:2 (89143234390889289) -->
-    <!-- no translation found for nav_bar_layouts:3 (7715533883382410603) -->
+    <string name="nav_bar_layout" msgid="3664072994198772020">"લેઆઉટ"</string>
+    <string name="nav_bar_left" msgid="731491280511316123">"ડાબે"</string>
+    <string name="nav_bar_right" msgid="2523774879720231974">"જમણે"</string>
+    <string name="nav_bar_button_type" msgid="6947806619897153791">"બટનનો પ્રકાર"</string>
+    <string name="nav_bar_default" msgid="8587114043070993007">"(ડિફૉલ્ટ)"</string>
+  <string-array name="nav_bar_buttons">
+    <item msgid="1545641631806817203">"ક્લિપબોર્ડ"</item>
+    <item msgid="5742013440802239414">"કીકોડ"</item>
+    <item msgid="8748101184830239843">"મેનૂ / કીબોર્ડ સ્વિચર"</item>
+    <item msgid="8175437057325747277">"કોઈ નહીં"</item>
+  </string-array>
+  <string-array name="nav_bar_layouts">
+    <item msgid="4967898371682516967">"વિભાજીત (ડિફૉલ્ટ)"</item>
+    <item msgid="6210279084134579668">"કેન્દ્રિત"</item>
+    <item msgid="89143234390889289">"ડાબે-સંરેખિત"</item>
+    <item msgid="7715533883382410603">"જમણે-સંરેખિત"</item>
+  </string-array>
     <string name="menu_ime" msgid="4943221416525250684">"મેનૂ / કીબોર્ડ સ્વિચર"</string>
     <string name="save" msgid="2311877285724540644">"સાચવો"</string>
     <string name="reset" msgid="2448168080964209908">"ફરીથી સેટ કરો"</string>
@@ -630,8 +621,7 @@
     <string name="clipboard" msgid="1313879395099896312">"ક્લિપબોર્ડ"</string>
     <string name="accessibility_key" msgid="5701989859305675896">"કસ્ટમ નેવિગેશન બટન"</string>
     <string name="keycode" msgid="7335281375728356499">"કીકોડ"</string>
-    <!-- no translation found for icon (8732339849035837289) -->
-    <skip />
+    <string name="icon" msgid="8732339849035837289">"આઇકન"</string>
     <string name="drag_to_add_tiles" msgid="7058945779098711293">"ટાઇલ્સ ઉમેરવા માટે ખેંચો"</string>
     <string name="drag_to_remove_tiles" msgid="3361212377437088062">"દૂર કરવા માટે અહીં ખેંચો"</string>
     <string name="qs_edit" msgid="2232596095725105230">"સંપાદિત કરો"</string>
@@ -682,28 +672,17 @@
     <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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"છોડી દો"</string>
+    <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>
-    <!-- no translation found for lockscreen_left (6806490081187499505) -->
-    <skip />
-    <!-- no translation found for lockscreen_right (6093496261656102989) -->
-    <skip />
-    <!-- no translation found for lockscreen_customize (1288691376862981950) -->
-    <skip />
-    <!-- no translation found for lockscreen_shortcut (3734369277470360642) -->
-    <skip />
-    <!-- no translation found for lockscreen_unlock (4934466194763269051) -->
-    <skip />
-    <!-- no translation found for notification_channel_alerts (4496839309318519037) -->
-    <skip />
-    <!-- no translation found for notification_channel_screenshot (6314080179230000938) -->
-    <skip />
-    <!-- no translation found for notification_channel_security (7345516133431326347) -->
-    <skip />
-    <!-- no translation found for notification_channel_user_status (1436913581465146650) -->
-    <skip />
-    <!-- no translation found for notification_channel_storage (3077205683020695313) -->
-    <skip />
+    <string name="lockscreen_left" msgid="6806490081187499505">"ડાબે"</string>
+    <string name="lockscreen_right" msgid="6093496261656102989">"જમણે"</string>
+    <string name="lockscreen_customize" msgid="1288691376862981950">"શૉર્ટકટ કસ્ટમાઇઝ કરો"</string>
+    <string name="lockscreen_shortcut" msgid="3734369277470360642">"શૉર્ટકટ"</string>
+    <string name="lockscreen_unlock" msgid="4934466194763269051">"પાસવર્ડ માટેનો સંકેત આપો"</string>
+    <string name="notification_channel_alerts" msgid="4496839309318519037">"ચેતવણીઓ"</string>
+    <string name="notification_channel_screenshot" msgid="6314080179230000938">"સ્ક્રીનશૉટ"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"સામાન્ય સંદેશા"</string>
+    <string name="notification_channel_storage" msgid="3077205683020695313">"સ્ટોરેજ"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-hi/strings.xml b/packages/SystemUI/res/values-hi/strings.xml
index 7676691..dd9e4c9 100644
--- a/packages/SystemUI/res/values-hi/strings.xml
+++ b/packages/SystemUI/res/values-hi/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"वापस जाएं"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"होम"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"मेनू"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"एक्सेस-योग्यता"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"अवलोकन"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"खोजें"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"कैमरा"</string>
@@ -532,7 +533,7 @@
     <string name="snooze_option_15_min" msgid="1068727451405610715">"15 मिनट"</string>
     <string name="snooze_option_30_min" msgid="867081342535195788">"30 मिनट"</string>
     <string name="snooze_option_1_hour" msgid="1098086401880077154">"1 घंटा"</string>
-    <string name="snooze_option_dont_snooze" msgid="655446566007801922">"यद नहीं दिलाएं"</string>
+    <string name="snooze_option_dont_snooze" msgid="655446566007801922">"याद नहीं दिलाएं"</string>
     <string name="snooze_undo" msgid="6074877317002985129">"पहले जैसा करें"</string>
     <string name="snoozed_for_time" msgid="2390718332980204462">"<xliff:g id="TIME_AMOUNT">%1$s</xliff:g> के लिए याद दिलाया गया"</string>
     <string name="battery_panel_title" msgid="7944156115535366613">"बैटरी उपयोग"</string>
@@ -671,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"खारिज करें"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"पासवर्ड के लिए संकेत दें"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"सूचनाएं"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"स्‍क्रीनशॉट"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"सुरक्षा"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"उपयोगकर्ता स्थिति"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"सामान्य संदेश"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"जगह"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-hr/strings.xml b/packages/SystemUI/res/values-hr/strings.xml
index 07c725b..2547a2c 100644
--- a/packages/SystemUI/res/values-hr/strings.xml
+++ b/packages/SystemUI/res/values-hr/strings.xml
@@ -84,6 +84,7 @@
     <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>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Pristupačnost"</string>
     <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,7 +674,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Odbaci"</string>
+    <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>
@@ -684,7 +685,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Upit za zaporku"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Upozorenja"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Snimke zaslona"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Sigurnost"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Status korisnika"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Općenite poruke"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Pohrana"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-hu/strings.xml b/packages/SystemUI/res/values-hu/strings.xml
index 029e76b..0c12c9c 100644
--- a/packages/SystemUI/res/values-hu/strings.xml
+++ b/packages/SystemUI/res/values-hu/strings.xml
@@ -83,6 +83,7 @@
     <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>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Kisegítő lehetőségek"</string>
     <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,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Elvetés"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Jelszókérés"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Értesítések"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Képernyőképek"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Biztonság"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Felhasználói állapot"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Általános üzenetek"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Tárhely"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-hy/strings.xml b/packages/SystemUI/res/values-hy/strings.xml
index 761bee1..de8abfc 100644
--- a/packages/SystemUI/res/values-hy/strings.xml
+++ b/packages/SystemUI/res/values-hy/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Հետ"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Տուն"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Ցանկ"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Մատչելիություն"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"Համատեսք"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Որոնել"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Ֆոտոխցիկ"</string>
@@ -534,7 +535,7 @@
     <string name="snooze_option_1_hour" msgid="1098086401880077154">"1 ժամ"</string>
     <string name="snooze_option_dont_snooze" msgid="655446566007801922">"Չհետաձգել"</string>
     <string name="snooze_undo" msgid="6074877317002985129">"ՀԵՏԱՐԿԵԼ"</string>
-    <string name="snoozed_for_time" msgid="2390718332980204462">"Հետաձգվել է հետևյալ ժամանակով՝ <xliff:g id="TIME_AMOUNT">%1$s</xliff:g>"</string>
+    <string name="snoozed_for_time" msgid="2390718332980204462">"Հետաձգվել է <xliff:g id="TIME_AMOUNT">%1$s</xliff:g>ով"</string>
     <string name="battery_panel_title" msgid="7944156115535366613">"Մարտկոցի օգտագործում"</string>
     <string name="battery_detail_charging_summary" msgid="1279095653533044008">"Մարտկոցի տնտեսումը լիցքավորման ժամանակ հասանելի չէ"</string>
     <string name="battery_detail_switch_title" msgid="6285872470260795421">"Մարտկոցի տնտեսում"</string>
@@ -608,7 +609,7 @@
     <item msgid="8175437057325747277">"Չկան"</item>
   </string-array>
   <string-array name="nav_bar_layouts">
-    <item msgid="4967898371682516967">"Բաժանվածծ (կանխադրված)"</item>
+    <item msgid="4967898371682516967">"Բաժանված (կանխադրված)"</item>
     <item msgid="6210279084134579668">"Կենտրոնում"</item>
     <item msgid="89143234390889289">"Հավասարեցված ձախ"</item>
     <item msgid="7715533883382410603">"Հավասարեցված աջ"</item>
@@ -671,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Փակել"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Պահանջել գաղտնաբառ"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Ծանուցումներ"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Էկրանի պատկերներ"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Անվտանգություն"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Օգտվողի կարգավիճակը"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Ընդհանուր հաղորդագրություններ"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Հիշողություն"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-in/strings.xml b/packages/SystemUI/res/values-in/strings.xml
index 24a7b538..2ccfd7c 100644
--- a/packages/SystemUI/res/values-in/strings.xml
+++ b/packages/SystemUI/res/values-in/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Kembali"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Utama"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Aksesibilitas"</string>
     <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,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Tutup"</string>
+    <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>
@@ -680,9 +681,8 @@
     <string name="lockscreen_customize" msgid="1288691376862981950">"Sesuaikan pintasan"</string>
     <string name="lockscreen_shortcut" msgid="3734369277470360642">"Pintasan"</string>
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Minta sandi"</string>
-    <string name="notification_channel_alerts" msgid="4496839309318519037">"Lansiran"</string>
+    <string name="notification_channel_alerts" msgid="4496839309318519037">"Notifikasi"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Screenshot"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Keamanan"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Status pengguna"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Pesan Umum"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Penyimpanan"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-is/strings.xml b/packages/SystemUI/res/values-is/strings.xml
index 5f46b92..6bde28d 100644
--- a/packages/SystemUI/res/values-is/strings.xml
+++ b/packages/SystemUI/res/values-is/strings.xml
@@ -83,6 +83,7 @@
     <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>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Aðgengi"</string>
     <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,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Hunsa"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Beiðni um aðgangsorð"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Tilkynningar"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Skjámyndir"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Öryggi"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Staða notanda"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Almenn skilaboð"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Geymslurými"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-it/strings.xml b/packages/SystemUI/res/values-it/strings.xml
index 2441b7f..e9f560a 100644
--- a/packages/SystemUI/res/values-it/strings.xml
+++ b/packages/SystemUI/res/values-it/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Indietro"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Home"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Accessibilità"</string>
     <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,7 +674,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Ignora"</string>
+    <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>
@@ -684,7 +685,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Richiedi password"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Avvisi"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Screenshot"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Sicurezza"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Stato utente"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Messaggi generali"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Spazio di archiviazione"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-iw/strings.xml b/packages/SystemUI/res/values-iw/strings.xml
index 280b9aa..246f46d 100644
--- a/packages/SystemUI/res/values-iw/strings.xml
+++ b/packages/SystemUI/res/values-iw/strings.xml
@@ -85,6 +85,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"הקודם"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"בית"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"תפריט"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"נגישות"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"סקירה"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"חפש"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"מצלמה"</string>
@@ -675,7 +676,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"סגור"</string>
+    <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>
@@ -686,7 +687,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"בקש סיסמה"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"התראות"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"צילומי מסך"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"אבטחה"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"סטטוס המשתמש"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"הודעות כלליות"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"אחסון"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index 015545e..addf67c 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"戻る"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"ホーム"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"メニュー"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"ユーザー補助機能"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"最近"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"検索"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"カメラ"</string>
@@ -673,7 +674,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"閉じる"</string>
+    <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>
@@ -684,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>
-    <string name="notification_channel_security" msgid="7345516133431326347">"セキュリティ"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"ユーザー ステータス"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"一般メッセージ"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"ストレージ"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ka/strings.xml b/packages/SystemUI/res/values-ka/strings.xml
index c75d83d..a939744 100644
--- a/packages/SystemUI/res/values-ka/strings.xml
+++ b/packages/SystemUI/res/values-ka/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"უკან"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"საწყისი"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"მენიუ"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"მარტივი წვდომა"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"მიმოხილვა"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"ძიება"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"კამერა"</string>
@@ -671,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"დახურვა"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"პაროლის მოთხოვნა"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"გაფრთხილებები"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"ეკრანის ანაბეჭდები"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"უსაფრთხოება"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"მომხმარებლის სტატუსი"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"ზოგადი შეტყობინებები"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"მეხსიერება"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-kk/strings.xml b/packages/SystemUI/res/values-kk/strings.xml
index d86fcf9..c0bf680 100644
--- a/packages/SystemUI/res/values-kk/strings.xml
+++ b/packages/SystemUI/res/values-kk/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Артқа"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Үй"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Mәзір"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Арнайы мүмкіндіктер"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"Шолу"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Іздеу"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
@@ -671,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Қабылдамау"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Құпия сөзді сұрау"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Дабылдар"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Скриншоттар"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Қауіпсіздік"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Пайдаланушы күйі"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Жалпы хабарлар"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Жад"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-km/strings.xml b/packages/SystemUI/res/values-km/strings.xml
index cfbba6e..88ad6d8 100644
--- a/packages/SystemUI/res/values-km/strings.xml
+++ b/packages/SystemUI/res/values-km/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"ថយក្រោយ"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"គេហ​ទំព័រ"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"ម៉ឺនុយ"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"ភាព​ងាយស្រួល"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"ទិដ្ឋភាព"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"ស្វែងរក"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"ម៉ាស៊ីន​ថត"</string>
@@ -602,16 +603,16 @@
     <string name="nav_bar_button_type" msgid="6947806619897153791">"ប្រភេទ​ប៊ូតុង"</string>
     <string name="nav_bar_default" msgid="8587114043070993007">"(លំនាំដើម)"</string>
   <string-array name="nav_bar_buttons">
-    <item msgid="1545641631806817203">"ក្ដារ​តម្បៀត​ខ្ទាស់"</item>
+    <item msgid="1545641631806817203">"អង្គចងចាំ"</item>
     <item msgid="5742013440802239414">"លេខកូដ​គ្រាប់ចុច"</item>
-    <item msgid="8748101184830239843">"កម្មវិធី​ប្តូរក្តារ​ចុច / ម៉ឺនុយ"</item>
+    <item msgid="8748101184830239843">"ម៉ឺនុយ / កម្មវិធី​ប្តូរក្តារ​ចុច"</item>
     <item msgid="8175437057325747277">"គ្មាន"</item>
   </string-array>
   <string-array name="nav_bar_layouts">
     <item msgid="4967898371682516967">"បំបែក (លំនាំដើម)"</item>
     <item msgid="6210279084134579668">"ដាក់​នៅ​កណ្តាល"</item>
-    <item msgid="89143234390889289">"តម្រឹម​ខាងឆ្វេង"</item>
-    <item msgid="7715533883382410603">"តម្រឹម​ខាងស្ដាំ"</item>
+    <item msgid="89143234390889289">"តម្រឹម​ឆ្វេង"</item>
+    <item msgid="7715533883382410603">"តម្រឹមស្ដាំ"</item>
   </string-array>
     <string name="menu_ime" msgid="4943221416525250684">"កម្មវិធីប្តូរក្តារចុច / ម៉ឺនុយ"</string>
     <string name="save" msgid="2311877285724540644">"រក្សាទុក"</string>
@@ -671,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"បដិសេធ"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"ជំរុញ​ឲ្យ​បញ្ចូល​ពាក្យ​សម្ងាត់"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"ការ​ជូនដំណឹង"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"រូបថត​អេក្រង់"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"សុវត្ថិភាព"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"ស្ថានភាព​អ្នកប្រើ"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"សារ​ទូទៅ"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"ទំហំផ្ទុក"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-kn/strings.xml b/packages/SystemUI/res/values-kn/strings.xml
index 70a8809..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>
@@ -526,24 +528,15 @@
     <string name="notification_importance_high" msgid="3316555356062640222">"ಪರದೆಯ ಮೇಲೆ ಧ್ವನಿಮಾಡಿ ಮತ್ತು ಪಾಪ್ ಮಾಡಿ"</string>
     <string name="notification_more_settings" msgid="816306283396553571">"ಹೆಚ್ಚಿನ ಸೆಟ್ಟಿಂಗ್‌ಗಳು"</string>
     <string name="notification_done" msgid="5279426047273930175">"ಮುಗಿದಿದೆ"</string>
-    <!-- no translation found for notification_menu_accessibility (2046162834248888553) -->
-    <skip />
-    <!-- no translation found for notification_menu_gear_description (2204480013726775108) -->
-    <skip />
-    <!-- no translation found for notification_menu_snooze_description (3653669438131034525) -->
-    <skip />
-    <!-- no translation found for snooze_option_15_min (1068727451405610715) -->
-    <skip />
-    <!-- no translation found for snooze_option_30_min (867081342535195788) -->
-    <skip />
-    <!-- no translation found for snooze_option_1_hour (1098086401880077154) -->
-    <skip />
-    <!-- no translation found for snooze_option_dont_snooze (655446566007801922) -->
-    <skip />
-    <!-- no translation found for snooze_undo (6074877317002985129) -->
-    <skip />
-    <!-- no translation found for snoozed_for_time (2390718332980204462) -->
-    <skip />
+    <string name="notification_menu_accessibility" msgid="2046162834248888553">"<xliff:g id="APP_NAME">%1$s</xliff:g> <xliff:g id="MENU_DESCRIPTION">%2$s</xliff:g>"</string>
+    <string name="notification_menu_gear_description" msgid="2204480013726775108">"ಅಧಿಸೂಚನೆ ನಿಯಂತ್ರಣಗಳು"</string>
+    <string name="notification_menu_snooze_description" msgid="3653669438131034525">"ಅಧಿಸೂಚನೆ ಸ್ನೂಜ್ ಆಯ್ಕೆಗಳು"</string>
+    <string name="snooze_option_15_min" msgid="1068727451405610715">"15 ನಿಮಿಷಗಳು"</string>
+    <string name="snooze_option_30_min" msgid="867081342535195788">"30 ನಿಮಿಷಗಳು"</string>
+    <string name="snooze_option_1_hour" msgid="1098086401880077154">"1 ಗಂಟೆ"</string>
+    <string name="snooze_option_dont_snooze" msgid="655446566007801922">"ಸ್ನೂಜ್‌ ಮಾಡಬೇಡಿ"</string>
+    <string name="snooze_undo" msgid="6074877317002985129">"ರದ್ದುಮಾಡಿ"</string>
+    <string name="snoozed_for_time" msgid="2390718332980204462">"<xliff:g id="TIME_AMOUNT">%1$s</xliff:g> ಗೆ ಸ್ನೂಜ್ ಮಾಡಲಾಗಿದೆ"</string>
     <string name="battery_panel_title" msgid="7944156115535366613">"ಬ್ಯಾಟರಿ ಬಳಕೆ"</string>
     <string name="battery_detail_charging_summary" msgid="1279095653533044008">"ಚಾರ್ಜಿಂಗ್ ಸಮಯದಲ್ಲಿ ಬ್ಯಾಟರಿ ಸೇವರ್‌‌ ಲಭ್ಯವಿರುವುದಿಲ್ಲ"</string>
     <string name="battery_detail_switch_title" msgid="6285872470260795421">"ಬ್ಯಾಟರಿ ಸೇವರ್‌‌"</string>
@@ -605,24 +598,23 @@
     <string name="switch_bar_on" msgid="1142437840752794229">"ಆನ್"</string>
     <string name="switch_bar_off" msgid="8803270596930432874">"ಆಫ್"</string>
     <string name="nav_bar" msgid="1993221402773877607">"ನ್ಯಾವಿಗೇಷನ್ ಬಾರ್"</string>
-    <!-- no translation found for nav_bar_layout (3664072994198772020) -->
-    <skip />
-    <!-- no translation found for nav_bar_left (731491280511316123) -->
-    <skip />
-    <!-- no translation found for nav_bar_right (2523774879720231974) -->
-    <skip />
-    <!-- no translation found for nav_bar_button_type (6947806619897153791) -->
-    <skip />
-    <!-- no translation found for nav_bar_default (8587114043070993007) -->
-    <skip />
-    <!-- no translation found for nav_bar_buttons:0 (1545641631806817203) -->
-    <!-- no translation found for nav_bar_buttons:1 (5742013440802239414) -->
-    <!-- no translation found for nav_bar_buttons:2 (8748101184830239843) -->
-    <!-- no translation found for nav_bar_buttons:3 (8175437057325747277) -->
-    <!-- no translation found for nav_bar_layouts:0 (4967898371682516967) -->
-    <!-- no translation found for nav_bar_layouts:1 (6210279084134579668) -->
-    <!-- no translation found for nav_bar_layouts:2 (89143234390889289) -->
-    <!-- no translation found for nav_bar_layouts:3 (7715533883382410603) -->
+    <string name="nav_bar_layout" msgid="3664072994198772020">"ಲೇಔಟ್"</string>
+    <string name="nav_bar_left" msgid="731491280511316123">"ಎಡ"</string>
+    <string name="nav_bar_right" msgid="2523774879720231974">"ಬಲ"</string>
+    <string name="nav_bar_button_type" msgid="6947806619897153791">"ಬಟನ್ ವಿಧ"</string>
+    <string name="nav_bar_default" msgid="8587114043070993007">"(ಡಿಫಾಲ್ಟ್‌)"</string>
+  <string-array name="nav_bar_buttons">
+    <item msgid="1545641631806817203">"ಕ್ಲಿಪ್‌ಬೋರ್ಡ್"</item>
+    <item msgid="5742013440802239414">"ಕೀಕೋಡ್"</item>
+    <item msgid="8748101184830239843">"ಮೆನು / ಕೀಬೋರ್ಡ್ ಬದಲಾಯಿಸುವಿಕೆ"</item>
+    <item msgid="8175437057325747277">"ಯಾವುದೂ ಅಲ್ಲ"</item>
+  </string-array>
+  <string-array name="nav_bar_layouts">
+    <item msgid="4967898371682516967">"ವಿಭಜಿಸಲಾಗಿದೆ (ಡಿಫಾಲ್ಟ್‌)"</item>
+    <item msgid="6210279084134579668">"ಕೇಂದ್ರೀಕೃತ"</item>
+    <item msgid="89143234390889289">"ಎಡಕ್ಕೆ ಹೊಂದಿಸಿರುವುದು"</item>
+    <item msgid="7715533883382410603">"ಬಲಕ್ಕೆ ಹೊಂದಿಸಿರುವುದು"</item>
+  </string-array>
     <string name="menu_ime" msgid="4943221416525250684">"ಮೆನು / ಕೀಬೋರ್ಡ್ ಬದಲಾಯಿಸುವಿಕೆ"</string>
     <string name="save" msgid="2311877285724540644">"ಉಳಿಸು"</string>
     <string name="reset" msgid="2448168080964209908">"ಮರುಹೊಂದಿಸು"</string>
@@ -630,8 +622,7 @@
     <string name="clipboard" msgid="1313879395099896312">"ಕ್ಲಿಪ್‌ಬೋರ್ಡ್"</string>
     <string name="accessibility_key" msgid="5701989859305675896">"ಕಸ್ಟಮ್ ನ್ಯಾವಿಗೇಷನ್ ಬಟನ್"</string>
     <string name="keycode" msgid="7335281375728356499">"ಕೀಕೋಡ್"</string>
-    <!-- no translation found for icon (8732339849035837289) -->
-    <skip />
+    <string name="icon" msgid="8732339849035837289">"ಐಕಾನ್‌"</string>
     <string name="drag_to_add_tiles" msgid="7058945779098711293">"ಟೈಲ್‌ಗಳನ್ನು ಸೇರಿಸಲು ಡ್ರ್ಯಾಗ್ ಮಾಡಿ"</string>
     <string name="drag_to_remove_tiles" msgid="3361212377437088062">"ತೆಗೆದುಹಾಕಲು ಇಲ್ಲಿ ಡ್ರ್ಯಾಗ್‌ ಮಾಡಿ"</string>
     <string name="qs_edit" msgid="2232596095725105230">"ಎಡಿಟ್"</string>
@@ -682,28 +673,17 @@
     <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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"ವಜಾಗೊಳಿಸಿ"</string>
+    <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>
-    <!-- no translation found for lockscreen_left (6806490081187499505) -->
-    <skip />
-    <!-- no translation found for lockscreen_right (6093496261656102989) -->
-    <skip />
-    <!-- no translation found for lockscreen_customize (1288691376862981950) -->
-    <skip />
-    <!-- no translation found for lockscreen_shortcut (3734369277470360642) -->
-    <skip />
-    <!-- no translation found for lockscreen_unlock (4934466194763269051) -->
-    <skip />
-    <!-- no translation found for notification_channel_alerts (4496839309318519037) -->
-    <skip />
-    <!-- no translation found for notification_channel_screenshot (6314080179230000938) -->
-    <skip />
-    <!-- no translation found for notification_channel_security (7345516133431326347) -->
-    <skip />
-    <!-- no translation found for notification_channel_user_status (1436913581465146650) -->
-    <skip />
-    <!-- no translation found for notification_channel_storage (3077205683020695313) -->
-    <skip />
+    <string name="lockscreen_left" msgid="6806490081187499505">"ಎಡ"</string>
+    <string name="lockscreen_right" msgid="6093496261656102989">"ಬಲ"</string>
+    <string name="lockscreen_customize" msgid="1288691376862981950">"ಶಾರ್ಟ್‌ಕಟ್ ಕಸ್ಟಮೈಸ್ ಮಾಡಿ"</string>
+    <string name="lockscreen_shortcut" msgid="3734369277470360642">"ಶಾರ್ಟ್‌ಕಟ್"</string>
+    <string name="lockscreen_unlock" msgid="4934466194763269051">"ಪಾಸ್‌ವರ್ಡ್‌ ಕೇಳಿ"</string>
+    <string name="notification_channel_alerts" msgid="4496839309318519037">"ಎಚ್ಚರಿಕೆಗಳು"</string>
+    <string name="notification_channel_screenshot" msgid="6314080179230000938">"ಸ್ಕ್ರೀನ್‌ಶಾಟ್‌ಗಳು"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"ಸಾಮಾನ್ಯ ಸಂದೇಶಗಳು"</string>
+    <string name="notification_channel_storage" msgid="3077205683020695313">"ಸಂಗ್ರಹಣೆ"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index 4b59ad2..bc01b9e 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"뒤로"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"홈"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"메뉴"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"접근성"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"최근 사용"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"검색"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"카메라"</string>
@@ -673,7 +674,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"닫기"</string>
+    <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>
@@ -684,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>
-    <string name="notification_channel_security" msgid="7345516133431326347">"보안"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"사용자 상태"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"일반 메시지"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"저장소"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ky/strings.xml b/packages/SystemUI/res/values-ky/strings.xml
index 53b1098..c1bc826 100644
--- a/packages/SystemUI/res/values-ky/strings.xml
+++ b/packages/SystemUI/res/values-ky/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Артка"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Үйгө"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Меню"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Атайын мүмкүнчүлүктөр"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"Көз жүгүртүү"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Издөө"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
@@ -620,7 +621,7 @@
     <string name="clipboard" msgid="1313879395099896312">"Алмашуу буфери"</string>
     <string name="accessibility_key" msgid="5701989859305675896">"Ыңгайлаштырылган чабыттоо баскычы"</string>
     <string name="keycode" msgid="7335281375728356499">"Баскыч коду"</string>
-    <string name="icon" msgid="8732339849035837289">"Сөлөкөт"</string>
+    <string name="icon" msgid="8732339849035837289">"Сүрөтчө"</string>
     <string name="drag_to_add_tiles" msgid="7058945779098711293">"Керектүү нерселерди сүйрөп кошуңуз"</string>
     <string name="drag_to_remove_tiles" msgid="3361212377437088062">"Алып салуу үчүн бул жерге сүйрөңүз"</string>
     <string name="qs_edit" msgid="2232596095725105230">"Түзөтүү"</string>
@@ -671,18 +672,17 @@
     <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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Этибарга албоо"</string>
+    <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>
     <string name="lockscreen_left" msgid="6806490081187499505">"Сол жакта"</string>
     <string name="lockscreen_right" msgid="6093496261656102989">"Оң жакта"</string>
-    <string name="lockscreen_customize" msgid="1288691376862981950">"Кыска жолду ыңгайлаштыруу"</string>
+    <string name="lockscreen_customize" msgid="1288691376862981950">"Кыска жолду тууралоо"</string>
     <string name="lockscreen_shortcut" msgid="3734369277470360642">"Кыска жол"</string>
-    <string name="lockscreen_unlock" msgid="4934466194763269051">"Сырсөз үчүн ишарат"</string>
-    <string name="notification_channel_alerts" msgid="4496839309318519037">"Айгай кабарлар"</string>
+    <string name="lockscreen_unlock" msgid="4934466194763269051">"Сырсөздү суроо"</string>
+    <string name="notification_channel_alerts" msgid="4496839309318519037">"Эскертүүлөр"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Скриншоттор"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Коопсуздук"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Колдонуучунун абалы"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Жалпы билдирүүлөр"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Сактагыч"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-lo/strings.xml b/packages/SystemUI/res/values-lo/strings.xml
index aea7812..7111805 100644
--- a/packages/SystemUI/res/values-lo/strings.xml
+++ b/packages/SystemUI/res/values-lo/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"ກັບຄືນ"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"ໜ້າທຳອິດ"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"ເມນູ"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"​ການ​ຊ່ວຍ​ເຂົ້າ​ເຖິງ"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"​ພາບ​ຮວມ"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"ຊອກຫາ"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"ກ້ອງ"</string>
@@ -671,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"ປິດໄວ້"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"ຖາມຫາລະຫັດຜ່ານ"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"ການເຕືອນ"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"ຮູບຖ່າຍໜ້າຈໍ"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"ຄວາມປອດໄພ"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"ສະຖານະຜູ້ໃຊ້"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"ຂໍ້ຄວາມທົ່ວໄປ"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"ບ່ອນເກັບຂໍ້ມູນ"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-lt/strings.xml b/packages/SystemUI/res/values-lt/strings.xml
index 83f4d15..57db34a 100644
--- a/packages/SystemUI/res/values-lt/strings.xml
+++ b/packages/SystemUI/res/values-lt/strings.xml
@@ -85,6 +85,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Atgal"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Pagrindinis"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Meniu"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Pritaikymas neįgaliesiems"</string>
     <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,7 +676,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Atsisakyti"</string>
+    <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>
@@ -686,7 +687,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Paraginti įvesti slaptažodį"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Įspėjimai"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Ekrano kopijos"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Sauga"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Naudotojų būsena"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Bendrieji pranešimai"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Saugykla"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-lv/strings.xml b/packages/SystemUI/res/values-lv/strings.xml
index 09581e8..3725060 100644
--- a/packages/SystemUI/res/values-lv/strings.xml
+++ b/packages/SystemUI/res/values-lv/strings.xml
@@ -84,6 +84,7 @@
     <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>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Pieejamība"</string>
     <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,7 +674,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Noraidīt"</string>
+    <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>
@@ -684,7 +685,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Pieprasīt paroli"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Brīdinājumi"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Ekrānuzņēmumi"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Drošība"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Lietotāju statuss"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Vispārīgi ziņojumi"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Krātuve"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-mk/strings.xml b/packages/SystemUI/res/values-mk/strings.xml
index 6db8e58..624cafc 100644
--- a/packages/SystemUI/res/values-mk/strings.xml
+++ b/packages/SystemUI/res/values-mk/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Назад"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Почетна страница"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Мени"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Пристапност"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"Краток преглед"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Пребарај"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
@@ -671,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Отфрли"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Побарај лозинка"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Предупредувања"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Слики од екранот"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Безбедност"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Кориснички статус"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Општи пораки"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Меморија"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ml/strings.xml b/packages/SystemUI/res/values-ml/strings.xml
index 0cdd351..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>
@@ -526,24 +528,15 @@
     <string name="notification_importance_high" msgid="3316555356062640222">"ശബ്ദമുണ്ടാക്കുക, സ്ക്രീനിൽ കാണിക്കുക"</string>
     <string name="notification_more_settings" msgid="816306283396553571">"കൂടുതൽ ക്രമീകരണം"</string>
     <string name="notification_done" msgid="5279426047273930175">"പൂർത്തിയായി"</string>
-    <!-- no translation found for notification_menu_accessibility (2046162834248888553) -->
-    <skip />
-    <!-- no translation found for notification_menu_gear_description (2204480013726775108) -->
-    <skip />
-    <!-- no translation found for notification_menu_snooze_description (3653669438131034525) -->
-    <skip />
-    <!-- no translation found for snooze_option_15_min (1068727451405610715) -->
-    <skip />
-    <!-- no translation found for snooze_option_30_min (867081342535195788) -->
-    <skip />
-    <!-- no translation found for snooze_option_1_hour (1098086401880077154) -->
-    <skip />
-    <!-- no translation found for snooze_option_dont_snooze (655446566007801922) -->
-    <skip />
-    <!-- no translation found for snooze_undo (6074877317002985129) -->
-    <skip />
-    <!-- no translation found for snoozed_for_time (2390718332980204462) -->
-    <skip />
+    <string name="notification_menu_accessibility" msgid="2046162834248888553">"<xliff:g id="APP_NAME">%1$s</xliff:g> <xliff:g id="MENU_DESCRIPTION">%2$s</xliff:g>"</string>
+    <string name="notification_menu_gear_description" msgid="2204480013726775108">"അറിയിപ്പ് നിയന്ത്രണങ്ങൾ"</string>
+    <string name="notification_menu_snooze_description" msgid="3653669438131034525">"അറിയിപ്പ് സ്‌നൂസ് ഓപ്ഷനുകൾ"</string>
+    <string name="snooze_option_15_min" msgid="1068727451405610715">"15 മിനിറ്റ്"</string>
+    <string name="snooze_option_30_min" msgid="867081342535195788">"30 മിനിറ്റ്"</string>
+    <string name="snooze_option_1_hour" msgid="1098086401880077154">"ഒരു മണിക്കൂർ"</string>
+    <string name="snooze_option_dont_snooze" msgid="655446566007801922">"സ്‌നൂസ് ‌ചെയ്യരുത്"</string>
+    <string name="snooze_undo" msgid="6074877317002985129">"പഴയപടിയാക്കുക"</string>
+    <string name="snoozed_for_time" msgid="2390718332980204462">"<xliff:g id="TIME_AMOUNT">%1$s</xliff:g> സമയത്തേക്ക് സ്‌നൂസ് ‌ചെയ്‌തു"</string>
     <string name="battery_panel_title" msgid="7944156115535366613">"ബാറ്ററി ഉപയോഗം"</string>
     <string name="battery_detail_charging_summary" msgid="1279095653533044008">"ചാർജുചെയ്യുന്ന സമയത്ത് ബാറ്ററി സേവർ ലഭ്യമല്ല"</string>
     <string name="battery_detail_switch_title" msgid="6285872470260795421">"ബാറ്ററി സേവർ"</string>
@@ -605,24 +598,23 @@
     <string name="switch_bar_on" msgid="1142437840752794229">"ഓൺ"</string>
     <string name="switch_bar_off" msgid="8803270596930432874">"ഓഫ്"</string>
     <string name="nav_bar" msgid="1993221402773877607">"നാവിഗേഷൻ ബാർ"</string>
-    <!-- no translation found for nav_bar_layout (3664072994198772020) -->
-    <skip />
-    <!-- no translation found for nav_bar_left (731491280511316123) -->
-    <skip />
-    <!-- no translation found for nav_bar_right (2523774879720231974) -->
-    <skip />
-    <!-- no translation found for nav_bar_button_type (6947806619897153791) -->
-    <skip />
-    <!-- no translation found for nav_bar_default (8587114043070993007) -->
-    <skip />
-    <!-- no translation found for nav_bar_buttons:0 (1545641631806817203) -->
-    <!-- no translation found for nav_bar_buttons:1 (5742013440802239414) -->
-    <!-- no translation found for nav_bar_buttons:2 (8748101184830239843) -->
-    <!-- no translation found for nav_bar_buttons:3 (8175437057325747277) -->
-    <!-- no translation found for nav_bar_layouts:0 (4967898371682516967) -->
-    <!-- no translation found for nav_bar_layouts:1 (6210279084134579668) -->
-    <!-- no translation found for nav_bar_layouts:2 (89143234390889289) -->
-    <!-- no translation found for nav_bar_layouts:3 (7715533883382410603) -->
+    <string name="nav_bar_layout" msgid="3664072994198772020">"ലേ‌ഔട്ട്"</string>
+    <string name="nav_bar_left" msgid="731491280511316123">"ഇടത്"</string>
+    <string name="nav_bar_right" msgid="2523774879720231974">"വലത്"</string>
+    <string name="nav_bar_button_type" msgid="6947806619897153791">"ബട്ടൺ തരം"</string>
+    <string name="nav_bar_default" msgid="8587114043070993007">"(ഡിഫോൾട്ട്)"</string>
+  <string-array name="nav_bar_buttons">
+    <item msgid="1545641631806817203">"ക്ലിപ്പ്ബോർഡ്"</item>
+    <item msgid="5742013440802239414">"കീകോഡ്"</item>
+    <item msgid="8748101184830239843">"മെനു / കീബോർഡ് സ്വിച്ചർ"</item>
+    <item msgid="8175437057325747277">"ഒന്നുമില്ല"</item>
+  </string-array>
+  <string-array name="nav_bar_layouts">
+    <item msgid="4967898371682516967">"വിഭജിച്ചത് (ഡിഫോൾട്ട്)"</item>
+    <item msgid="6210279084134579668">"മധ്യഭാഗത്ത് വിന്യസിച്ചത്"</item>
+    <item msgid="89143234390889289">"ഇടതുവശത്ത് വിന്യസിച്ചത്"</item>
+    <item msgid="7715533883382410603">"വലതുവശത്ത് വിന്യസിച്ചത്"</item>
+  </string-array>
     <string name="menu_ime" msgid="4943221416525250684">"മെനു / കീബോർഡ് സ്വിച്ചർ"</string>
     <string name="save" msgid="2311877285724540644">"സംരക്ഷിക്കുക"</string>
     <string name="reset" msgid="2448168080964209908">"പുനഃസജ്ജമാക്കുക"</string>
@@ -630,8 +622,7 @@
     <string name="clipboard" msgid="1313879395099896312">"ക്ലിപ്പ്ബോർഡ്"</string>
     <string name="accessibility_key" msgid="5701989859305675896">"ഇഷ്ടാനുസൃത നാവിഗേഷൻ ബട്ടൺ"</string>
     <string name="keycode" msgid="7335281375728356499">"കീകോഡ്"</string>
-    <!-- no translation found for icon (8732339849035837289) -->
-    <skip />
+    <string name="icon" msgid="8732339849035837289">"ഐക്കൺ"</string>
     <string name="drag_to_add_tiles" msgid="7058945779098711293">"ടൈലുകൾ ചേർക്കുന്നതിന് വലിച്ചിടുക"</string>
     <string name="drag_to_remove_tiles" msgid="3361212377437088062">"നീക്കംചെയ്യുന്നതിന് ഇവിടെ വലിച്ചിടുക"</string>
     <string name="qs_edit" msgid="2232596095725105230">"എഡിറ്റുചെയ്യുക"</string>
@@ -682,28 +673,17 @@
     <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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"നിരസിക്കുക"</string>
+    <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>
-    <!-- no translation found for lockscreen_left (6806490081187499505) -->
-    <skip />
-    <!-- no translation found for lockscreen_right (6093496261656102989) -->
-    <skip />
-    <!-- no translation found for lockscreen_customize (1288691376862981950) -->
-    <skip />
-    <!-- no translation found for lockscreen_shortcut (3734369277470360642) -->
-    <skip />
-    <!-- no translation found for lockscreen_unlock (4934466194763269051) -->
-    <skip />
-    <!-- no translation found for notification_channel_alerts (4496839309318519037) -->
-    <skip />
-    <!-- no translation found for notification_channel_screenshot (6314080179230000938) -->
-    <skip />
-    <!-- no translation found for notification_channel_security (7345516133431326347) -->
-    <skip />
-    <!-- no translation found for notification_channel_user_status (1436913581465146650) -->
-    <skip />
-    <!-- no translation found for notification_channel_storage (3077205683020695313) -->
-    <skip />
+    <string name="lockscreen_left" msgid="6806490081187499505">"ഇടത്"</string>
+    <string name="lockscreen_right" msgid="6093496261656102989">"വലത്"</string>
+    <string name="lockscreen_customize" msgid="1288691376862981950">"കുറുക്കുവഴി ഇഷ്‌ടാനുസൃതമാക്കുക"</string>
+    <string name="lockscreen_shortcut" msgid="3734369277470360642">"കുറുക്കുവഴി"</string>
+    <string name="lockscreen_unlock" msgid="4934466194763269051">"പാസ്‌വേഡ് ആവശ്യപ്പെടുക"</string>
+    <string name="notification_channel_alerts" msgid="4496839309318519037">"അലേർട്ടുകൾ"</string>
+    <string name="notification_channel_screenshot" msgid="6314080179230000938">"സ്‌ക്രീൻഷോട്ടുകൾ"</string>
+    <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 d184f84..5e02cce 100644
--- a/packages/SystemUI/res/values-mn/strings.xml
+++ b/packages/SystemUI/res/values-mn/strings.xml
@@ -81,6 +81,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Буцах"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Гэрийн"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Цэс"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Хүртээмж"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"Тойм"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Хайх"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Камер"</string>
@@ -671,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Хаах"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Нууц үг шаардах"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Сануулга"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Дэлгэцийн зураг дарах"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Аюулгүй байдал"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Хэрэглэгчийн төлөв"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Энгийн зурвас"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Хадгалах сан"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-mr/strings.xml b/packages/SystemUI/res/values-mr/strings.xml
index f26f1e5..14eaf28 100644
--- a/packages/SystemUI/res/values-mr/strings.xml
+++ b/packages/SystemUI/res/values-mr/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"परत"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"मुख्‍यपृष्‍ठ"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"मेनू"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"प्रवेशयोग्यता"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"विहंगावलोकन"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"शोधा"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"कॅमेरा"</string>
@@ -526,24 +527,15 @@
     <string name="notification_importance_high" msgid="3316555356062640222">"ध्वनी करा आणि स्क्रीनवर पॉप करा"</string>
     <string name="notification_more_settings" msgid="816306283396553571">"अधिक सेटिंग्ज"</string>
     <string name="notification_done" msgid="5279426047273930175">"पूर्ण झाले"</string>
-    <!-- no translation found for notification_menu_accessibility (2046162834248888553) -->
-    <skip />
-    <!-- no translation found for notification_menu_gear_description (2204480013726775108) -->
-    <skip />
-    <!-- no translation found for notification_menu_snooze_description (3653669438131034525) -->
-    <skip />
-    <!-- no translation found for snooze_option_15_min (1068727451405610715) -->
-    <skip />
-    <!-- no translation found for snooze_option_30_min (867081342535195788) -->
-    <skip />
-    <!-- no translation found for snooze_option_1_hour (1098086401880077154) -->
-    <skip />
-    <!-- no translation found for snooze_option_dont_snooze (655446566007801922) -->
-    <skip />
-    <!-- no translation found for snooze_undo (6074877317002985129) -->
-    <skip />
-    <!-- no translation found for snoozed_for_time (2390718332980204462) -->
-    <skip />
+    <string name="notification_menu_accessibility" msgid="2046162834248888553">"<xliff:g id="APP_NAME">%1$s</xliff:g> <xliff:g id="MENU_DESCRIPTION">%2$s</xliff:g>"</string>
+    <string name="notification_menu_gear_description" msgid="2204480013726775108">"सूचना नियंत्रणे"</string>
+    <string name="notification_menu_snooze_description" msgid="3653669438131034525">"सूचना स्नूझ पर्याय"</string>
+    <string name="snooze_option_15_min" msgid="1068727451405610715">"15 मिनिटे"</string>
+    <string name="snooze_option_30_min" msgid="867081342535195788">"30 मिनिटे"</string>
+    <string name="snooze_option_1_hour" msgid="1098086401880077154">"1 तास"</string>
+    <string name="snooze_option_dont_snooze" msgid="655446566007801922">"स्नूझ करू नका"</string>
+    <string name="snooze_undo" msgid="6074877317002985129">"पूर्ववत करा"</string>
+    <string name="snoozed_for_time" msgid="2390718332980204462">"<xliff:g id="TIME_AMOUNT">%1$s</xliff:g> साठी स्नूझ करा"</string>
     <string name="battery_panel_title" msgid="7944156115535366613">"बॅटरी वापर"</string>
     <string name="battery_detail_charging_summary" msgid="1279095653533044008">"चार्ज करताना बॅटरी बचतकर्ता उपलब्ध नाही"</string>
     <string name="battery_detail_switch_title" msgid="6285872470260795421">"बॅटरी बचतकर्ता"</string>
@@ -605,24 +597,23 @@
     <string name="switch_bar_on" msgid="1142437840752794229">"चालू"</string>
     <string name="switch_bar_off" msgid="8803270596930432874">"बंद"</string>
     <string name="nav_bar" msgid="1993221402773877607">"नॅव्हिगेशन बार"</string>
-    <!-- no translation found for nav_bar_layout (3664072994198772020) -->
-    <skip />
-    <!-- no translation found for nav_bar_left (731491280511316123) -->
-    <skip />
-    <!-- no translation found for nav_bar_right (2523774879720231974) -->
-    <skip />
-    <!-- no translation found for nav_bar_button_type (6947806619897153791) -->
-    <skip />
-    <!-- no translation found for nav_bar_default (8587114043070993007) -->
-    <skip />
-    <!-- no translation found for nav_bar_buttons:0 (1545641631806817203) -->
-    <!-- no translation found for nav_bar_buttons:1 (5742013440802239414) -->
-    <!-- no translation found for nav_bar_buttons:2 (8748101184830239843) -->
-    <!-- no translation found for nav_bar_buttons:3 (8175437057325747277) -->
-    <!-- no translation found for nav_bar_layouts:0 (4967898371682516967) -->
-    <!-- no translation found for nav_bar_layouts:1 (6210279084134579668) -->
-    <!-- no translation found for nav_bar_layouts:2 (89143234390889289) -->
-    <!-- no translation found for nav_bar_layouts:3 (7715533883382410603) -->
+    <string name="nav_bar_layout" msgid="3664072994198772020">"लेआउट"</string>
+    <string name="nav_bar_left" msgid="731491280511316123">"डावा"</string>
+    <string name="nav_bar_right" msgid="2523774879720231974">"उजवा"</string>
+    <string name="nav_bar_button_type" msgid="6947806619897153791">"बटणाचा प्रकार"</string>
+    <string name="nav_bar_default" msgid="8587114043070993007">"(डीफॉल्ट)"</string>
+  <string-array name="nav_bar_buttons">
+    <item msgid="1545641631806817203">"क्लिपबोर्ड"</item>
+    <item msgid="5742013440802239414">"कीकोड"</item>
+    <item msgid="8748101184830239843">"मेनू / कीबोर्ड स्विचर"</item>
+    <item msgid="8175437057325747277">"काहीही नाही"</item>
+  </string-array>
+  <string-array name="nav_bar_layouts">
+    <item msgid="4967898371682516967">"विभाजित (डीफॉल्ट)"</item>
+    <item msgid="6210279084134579668">"मध्यवर्ती"</item>
+    <item msgid="89143234390889289">"डावे-संरेखित"</item>
+    <item msgid="7715533883382410603">"उजवे-संरेखित"</item>
+  </string-array>
     <string name="menu_ime" msgid="4943221416525250684">"मेनू / कीबोर्ड स्विचर"</string>
     <string name="save" msgid="2311877285724540644">"जतन करा"</string>
     <string name="reset" msgid="2448168080964209908">"रीसेट करा"</string>
@@ -630,8 +621,7 @@
     <string name="clipboard" msgid="1313879395099896312">"क्लिपबोर्ड"</string>
     <string name="accessibility_key" msgid="5701989859305675896">"सानुकूल नेव्हिगेशन बटण"</string>
     <string name="keycode" msgid="7335281375728356499">"कीकोड"</string>
-    <!-- no translation found for icon (8732339849035837289) -->
-    <skip />
+    <string name="icon" msgid="8732339849035837289">"चिन्ह"</string>
     <string name="drag_to_add_tiles" msgid="7058945779098711293">"टाइल जोडण्यासाठी ड्रॅग करा"</string>
     <string name="drag_to_remove_tiles" msgid="3361212377437088062">"काढण्यासाठी येथे ड्रॅग करा"</string>
     <string name="qs_edit" msgid="2232596095725105230">"संपादित करा"</string>
@@ -682,28 +672,17 @@
     <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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"डिसमिस करा"</string>
+    <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>
-    <!-- no translation found for lockscreen_left (6806490081187499505) -->
-    <skip />
-    <!-- no translation found for lockscreen_right (6093496261656102989) -->
-    <skip />
-    <!-- no translation found for lockscreen_customize (1288691376862981950) -->
-    <skip />
-    <!-- no translation found for lockscreen_shortcut (3734369277470360642) -->
-    <skip />
-    <!-- no translation found for lockscreen_unlock (4934466194763269051) -->
-    <skip />
-    <!-- no translation found for notification_channel_alerts (4496839309318519037) -->
-    <skip />
-    <!-- no translation found for notification_channel_screenshot (6314080179230000938) -->
-    <skip />
-    <!-- no translation found for notification_channel_security (7345516133431326347) -->
-    <skip />
-    <!-- no translation found for notification_channel_user_status (1436913581465146650) -->
-    <skip />
-    <!-- no translation found for notification_channel_storage (3077205683020695313) -->
-    <skip />
+    <string name="lockscreen_left" msgid="6806490081187499505">"डावा"</string>
+    <string name="lockscreen_right" msgid="6093496261656102989">"उजवा"</string>
+    <string name="lockscreen_customize" msgid="1288691376862981950">"शॉर्टकट सानुकूल करा"</string>
+    <string name="lockscreen_shortcut" msgid="3734369277470360642">"शॉर्टकट"</string>
+    <string name="lockscreen_unlock" msgid="4934466194763269051">"संकेतशब्दासाठी संकेत"</string>
+    <string name="notification_channel_alerts" msgid="4496839309318519037">"सूचना"</string>
+    <string name="notification_channel_screenshot" msgid="6314080179230000938">"स्क्रीनशॉट"</string>
+    <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 18fa6d0..5be0afd 100644
--- a/packages/SystemUI/res/values-ms/strings.xml
+++ b/packages/SystemUI/res/values-ms/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Kembali"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Rumah"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Kebolehaksesan"</string>
     <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,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Ketepikan"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Gesa untuk kata laluan"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Makluman"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Tangkapan skrin"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Keselamatan"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Status pengguna"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Mesej Am"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Storan"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-my/strings.xml b/packages/SystemUI/res/values-my/strings.xml
index 1c4a83e..8e2e0a4 100644
--- a/packages/SystemUI/res/values-my/strings.xml
+++ b/packages/SystemUI/res/values-my/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"နောက်သို့"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"ပင်မစာမျက်နှာ"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"မီနူး"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"အများသုံးစွဲနိုင်မှု"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"ခြုံကြည့်မှု။"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"ရှာဖွေရန်"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"ကင်မရာ"</string>
@@ -671,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"ပယ်ရန်"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"စကားဝှက်ကို မေးရန်"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"သတိပေးချက်များ"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"မျက်နှာပြင်ဓာတ်ပုံများ"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"လုံခြုံရေး"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"အသုံးပြုသူ အခြေအနေ"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"အထွေထွေ မက်ဆေ့ဂျ်များ"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"သိုလှောင်မှုများ"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-nb/strings.xml b/packages/SystemUI/res/values-nb/strings.xml
index d546e92..701b295 100644
--- a/packages/SystemUI/res/values-nb/strings.xml
+++ b/packages/SystemUI/res/values-nb/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Tilbake"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Startside"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Meny"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Tilgjengelighet"</string>
     <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>
@@ -528,7 +529,7 @@
     <string name="notification_done" msgid="5279426047273930175">"Ferdig"</string>
     <string name="notification_menu_accessibility" msgid="2046162834248888553">"<xliff:g id="APP_NAME">%1$s</xliff:g> <xliff:g id="MENU_DESCRIPTION">%2$s</xliff:g>"</string>
     <string name="notification_menu_gear_description" msgid="2204480013726775108">"varselinnstillinger"</string>
-    <string name="notification_menu_snooze_description" msgid="3653669438131034525">"utsettelsesalternativer for varsler"</string>
+    <string name="notification_menu_snooze_description" msgid="3653669438131034525">"slumrealternativer for varsler"</string>
     <string name="snooze_option_15_min" msgid="1068727451405610715">"15 minutter"</string>
     <string name="snooze_option_30_min" msgid="867081342535195788">"30 minutter"</string>
     <string name="snooze_option_1_hour" msgid="1098086401880077154">"1 time"</string>
@@ -671,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Avvis"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Påminnelse for passord"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Varsler"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Skjermdumper"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Sikkerhet"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Brukerstatus"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Generelle meldinger"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Lagring"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ne/strings.xml b/packages/SystemUI/res/values-ne/strings.xml
index 4f65f63..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>
@@ -526,24 +528,15 @@
     <string name="notification_importance_high" msgid="3316555356062640222">"आवाज निकाल्ने र स्क्रिनमा पपअप देखाउने"</string>
     <string name="notification_more_settings" msgid="816306283396553571">"थप सेटिङहरू"</string>
     <string name="notification_done" msgid="5279426047273930175">"सम्पन्‍न भयो"</string>
-    <!-- no translation found for notification_menu_accessibility (2046162834248888553) -->
-    <skip />
-    <!-- no translation found for notification_menu_gear_description (2204480013726775108) -->
-    <skip />
-    <!-- no translation found for notification_menu_snooze_description (3653669438131034525) -->
-    <skip />
-    <!-- no translation found for snooze_option_15_min (1068727451405610715) -->
-    <skip />
-    <!-- no translation found for snooze_option_30_min (867081342535195788) -->
-    <skip />
-    <!-- no translation found for snooze_option_1_hour (1098086401880077154) -->
-    <skip />
-    <!-- no translation found for snooze_option_dont_snooze (655446566007801922) -->
-    <skip />
-    <!-- no translation found for snooze_undo (6074877317002985129) -->
-    <skip />
-    <!-- no translation found for snoozed_for_time (2390718332980204462) -->
-    <skip />
+    <string name="notification_menu_accessibility" msgid="2046162834248888553">"<xliff:g id="APP_NAME">%1$s</xliff:g> <xliff:g id="MENU_DESCRIPTION">%2$s</xliff:g>"</string>
+    <string name="notification_menu_gear_description" msgid="2204480013726775108">"सूचना सम्बन्धी नियन्त्रणहरू"</string>
+    <string name="notification_menu_snooze_description" msgid="3653669438131034525">"सूचना स्नुज गर्ने विकल्पहरू"</string>
+    <string name="snooze_option_15_min" msgid="1068727451405610715">"१५ मिनेट"</string>
+    <string name="snooze_option_30_min" msgid="867081342535195788">"३० मिनेट"</string>
+    <string name="snooze_option_1_hour" msgid="1098086401880077154">"१ घण्टा"</string>
+    <string name="snooze_option_dont_snooze" msgid="655446566007801922">"स्नुज नगर्नुहोस्"</string>
+    <string name="snooze_undo" msgid="6074877317002985129">"अनडू गर्नुहोस्"</string>
+    <string name="snoozed_for_time" msgid="2390718332980204462">"<xliff:g id="TIME_AMOUNT">%1$s</xliff:g> का लागि स्नुज गरियो"</string>
     <string name="battery_panel_title" msgid="7944156115535366613">"ब्याट्री उपयोग"</string>
     <string name="battery_detail_charging_summary" msgid="1279095653533044008">"चार्ज गर्ने समयमा ब्याट्री सेभर उपलब्ध छैन"</string>
     <string name="battery_detail_switch_title" msgid="6285872470260795421">"ब्याट्री सेभर"</string>
@@ -605,24 +598,23 @@
     <string name="switch_bar_on" msgid="1142437840752794229">"सक्रिय गर्नुहोस्"</string>
     <string name="switch_bar_off" msgid="8803270596930432874">"निष्क्रिय"</string>
     <string name="nav_bar" msgid="1993221402773877607">"नेभिगेशन पट्टी"</string>
-    <!-- no translation found for nav_bar_layout (3664072994198772020) -->
-    <skip />
-    <!-- no translation found for nav_bar_left (731491280511316123) -->
-    <skip />
-    <!-- no translation found for nav_bar_right (2523774879720231974) -->
-    <skip />
-    <!-- no translation found for nav_bar_button_type (6947806619897153791) -->
-    <skip />
-    <!-- no translation found for nav_bar_default (8587114043070993007) -->
-    <skip />
-    <!-- no translation found for nav_bar_buttons:0 (1545641631806817203) -->
-    <!-- no translation found for nav_bar_buttons:1 (5742013440802239414) -->
-    <!-- no translation found for nav_bar_buttons:2 (8748101184830239843) -->
-    <!-- no translation found for nav_bar_buttons:3 (8175437057325747277) -->
-    <!-- no translation found for nav_bar_layouts:0 (4967898371682516967) -->
-    <!-- no translation found for nav_bar_layouts:1 (6210279084134579668) -->
-    <!-- no translation found for nav_bar_layouts:2 (89143234390889289) -->
-    <!-- no translation found for nav_bar_layouts:3 (7715533883382410603) -->
+    <string name="nav_bar_layout" msgid="3664072994198772020">"लेआउट"</string>
+    <string name="nav_bar_left" msgid="731491280511316123">"बायाँ"</string>
+    <string name="nav_bar_right" msgid="2523774879720231974">"दायाँ"</string>
+    <string name="nav_bar_button_type" msgid="6947806619897153791">"बटनको प्रकार"</string>
+    <string name="nav_bar_default" msgid="8587114043070993007">"(पूर्वनिर्धारित)"</string>
+  <string-array name="nav_bar_buttons">
+    <item msgid="1545641631806817203">"क्लिपबोर्ड"</item>
+    <item msgid="5742013440802239414">"किकोड"</item>
+    <item msgid="8748101184830239843">"मेनु / किबोर्ड परिवर्तक"</item>
+    <item msgid="8175437057325747277">"कुनै पनि होइन"</item>
+  </string-array>
+  <string-array name="nav_bar_layouts">
+    <item msgid="4967898371682516967">"विभाजित (पूर्वनिर्धारित)"</item>
+    <item msgid="6210279084134579668">"मध्य भागमा"</item>
+    <item msgid="89143234390889289">"बायाँतिर पङ्क्तिबद्ध"</item>
+    <item msgid="7715533883382410603">"दायाँतिर पङ्क्तिबद्ध"</item>
+  </string-array>
     <string name="menu_ime" msgid="4943221416525250684">"मेनु / किबोर्ड स्विचर"</string>
     <string name="save" msgid="2311877285724540644">"सुरक्षित गर्नुहोस्"</string>
     <string name="reset" msgid="2448168080964209908">"पुनःसेट गर्नु"</string>
@@ -630,8 +622,7 @@
     <string name="clipboard" msgid="1313879395099896312">"क्लिपबोर्ड"</string>
     <string name="accessibility_key" msgid="5701989859305675896">"अनुकूलनको नेभिगेशन बटन"</string>
     <string name="keycode" msgid="7335281375728356499">"Keycode"</string>
-    <!-- no translation found for icon (8732339849035837289) -->
-    <skip />
+    <string name="icon" msgid="8732339849035837289">"आइकन"</string>
     <string name="drag_to_add_tiles" msgid="7058945779098711293">"टाइलहरू थप्न तान्नुहोस्"</string>
     <string name="drag_to_remove_tiles" msgid="3361212377437088062">"हटाउनका लागि यहाँ तान्नुहोस्"</string>
     <string name="qs_edit" msgid="2232596095725105230">"सम्पादन गर्नुहोस्"</string>
@@ -682,28 +673,17 @@
     <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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"खारेज गर्नुहोस्"</string>
+    <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>
-    <!-- no translation found for lockscreen_left (6806490081187499505) -->
-    <skip />
-    <!-- no translation found for lockscreen_right (6093496261656102989) -->
-    <skip />
-    <!-- no translation found for lockscreen_customize (1288691376862981950) -->
-    <skip />
-    <!-- no translation found for lockscreen_shortcut (3734369277470360642) -->
-    <skip />
-    <!-- no translation found for lockscreen_unlock (4934466194763269051) -->
-    <skip />
-    <!-- no translation found for notification_channel_alerts (4496839309318519037) -->
-    <skip />
-    <!-- no translation found for notification_channel_screenshot (6314080179230000938) -->
-    <skip />
-    <!-- no translation found for notification_channel_security (7345516133431326347) -->
-    <skip />
-    <!-- no translation found for notification_channel_user_status (1436913581465146650) -->
-    <skip />
-    <!-- no translation found for notification_channel_storage (3077205683020695313) -->
-    <skip />
+    <string name="lockscreen_left" msgid="6806490081187499505">"बायाँ"</string>
+    <string name="lockscreen_right" msgid="6093496261656102989">"दायाँ"</string>
+    <string name="lockscreen_customize" msgid="1288691376862981950">"सर्टकट आफू अनुकूल पार्नुहोस्"</string>
+    <string name="lockscreen_shortcut" msgid="3734369277470360642">"सर्टकट"</string>
+    <string name="lockscreen_unlock" msgid="4934466194763269051">"पासवर्ड माग्ने"</string>
+    <string name="notification_channel_alerts" msgid="4496839309318519037">"अलर्टहरू"</string>
+    <string name="notification_channel_screenshot" msgid="6314080179230000938">"स्क्रिनशटहरू"</string>
+    <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 dbb7771..041b7b4 100644
--- a/packages/SystemUI/res/values-nl/strings.xml
+++ b/packages/SystemUI/res/values-nl/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Terug"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Homepage"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Toegankelijkheid"</string>
     <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,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Sluiten"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Wachtwoordprompt"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Meldingen"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Screenshots"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Beveiliging"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Gebruikersstatus"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Algemene berichten"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Opslag"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-pa/strings.xml b/packages/SystemUI/res/values-pa/strings.xml
index 008f55aa..f409687 100644
--- a/packages/SystemUI/res/values-pa/strings.xml
+++ b/packages/SystemUI/res/values-pa/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"ਪਿੱਛੇ"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"ਘਰ"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"ਮੀਨੂ"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"ਪਹੁੰਚਯੋਗਤਾ"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"ਰੂਪ-ਰੇਖਾ"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"ਖੋਜੋ"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"ਕੈਮਰਾ"</string>
@@ -533,7 +534,7 @@
     <string name="snooze_option_30_min" msgid="867081342535195788">"30 ਮਿੰਟ"</string>
     <string name="snooze_option_1_hour" msgid="1098086401880077154">"1 ਘੰਟਾ"</string>
     <string name="snooze_option_dont_snooze" msgid="655446566007801922">"ਸਨੂਜ਼ ਨਾ ਕਰੋ"</string>
-    <string name="snooze_undo" msgid="6074877317002985129">"ਪਹਿਲਾਂ ਵਰਗਾ ਕਰੋ"</string>
+    <string name="snooze_undo" msgid="6074877317002985129">"ਅਣਕੀਤਾ ਕਰੋ"</string>
     <string name="snoozed_for_time" msgid="2390718332980204462">"<xliff:g id="TIME_AMOUNT">%1$s</xliff:g> ਲਈ ਸਨੂਜ਼ ਕੀਤਾ ਗਿਆ"</string>
     <string name="battery_panel_title" msgid="7944156115535366613">"ਬੈਟਰੀ ਵਰਤੋਂ"</string>
     <string name="battery_detail_charging_summary" msgid="1279095653533044008">"ਬੈਟਰੀ ਸੇਵਰ ਚਾਰਜਿੰਗ ਦੌਰਾਨ ਉਪਲਬਧ ਨਹੀਂ ਹੈ"</string>
@@ -603,7 +604,7 @@
     <string name="nav_bar_default" msgid="8587114043070993007">"(ਪੂਰਵ-ਨਿਰਧਾਰਤ)"</string>
   <string-array name="nav_bar_buttons">
     <item msgid="1545641631806817203">"ਕਲਿੱਪਬੋਰਡ"</item>
-    <item msgid="5742013440802239414">"ਕੀਕੋਡ"</item>
+    <item msgid="5742013440802239414">"ਕੀ-ਕੋਡ"</item>
     <item msgid="8748101184830239843">"ਮੀਨੂ/ਕੀ-ਬੋਰਡ ਸਵਿੱਚਰ"</item>
     <item msgid="8175437057325747277">"ਕੋਈ ਨਹੀਂ"</item>
   </string-array>
@@ -620,7 +621,7 @@
     <string name="clipboard" msgid="1313879395099896312">"ਕਲਿੱਪਬੋਰਡ"</string>
     <string name="accessibility_key" msgid="5701989859305675896">"ਵਿਸ਼ੇਸ਼-ਵਿਉਂਤਬੱਧ ਆਵਾਗੌਣ ਬਟਨ"</string>
     <string name="keycode" msgid="7335281375728356499">"ਕੀਕੋਡ"</string>
-    <string name="icon" msgid="8732339849035837289">"ਚਿੰਨ੍ਹ"</string>
+    <string name="icon" msgid="8732339849035837289">"ਪ੍ਰਤੀਕ"</string>
     <string name="drag_to_add_tiles" msgid="7058945779098711293">"ਟਾਇਲਾਂ ਨੂੰ ਸ਼ਾਮਲ ਕਰਨ ਲਈ ਘਸੀਟੋ"</string>
     <string name="drag_to_remove_tiles" msgid="3361212377437088062">"ਹਟਾਉਣ ਲਈ ਇੱਥੇ ਘਸੀਟੋ"</string>
     <string name="qs_edit" msgid="2232596095725105230">"ਸੰਪਾਦਨ ਕਰੋ"</string>
@@ -671,18 +672,17 @@
     <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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"ਖਾਰਜ ਕਰੋ"</string>
+    <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>
     <string name="lockscreen_left" msgid="6806490081187499505">"ਖੱਬੇ"</string>
     <string name="lockscreen_right" msgid="6093496261656102989">"ਸੱਜੇ"</string>
-    <string name="lockscreen_customize" msgid="1288691376862981950">"ਵਿਸ਼ੇਸ਼-ਵਿਉਂਤਬੱਧ ਸ਼ਾਰਟਕੱਟ"</string>
+    <string name="lockscreen_customize" msgid="1288691376862981950">"ਸ਼ਾਰਟਕੱਟ ਨੂੰ ਵਿਸ਼ੇਸ਼-ਵਿਉਂਤਬੱਧ ਕਰੋ"</string>
     <string name="lockscreen_shortcut" msgid="3734369277470360642">"ਸ਼ਾਰਟਕੱਟ"</string>
-    <string name="lockscreen_unlock" msgid="4934466194763269051">"ਪਾਸਵਰਡ ਲਈ ਉਤਪ੍ਰੇਰਕ"</string>
+    <string name="lockscreen_unlock" msgid="4934466194763269051">"ਪਾਸਵਰਡ ਲਈ ਪੁੱਛੋ"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"ਸੁਚੇਤਨਾਵਾਂ"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"ਸਕ੍ਰੀਨਸ਼ਾਟ"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"ਸੁਰੱਖਿਆ"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"ਵਰਤੋਂਕਾਰ ਸਥਿਤੀ"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"ਆਮ ਸੁਨੇਹੇ"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"ਸਟੋਰੇਜ"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml
index 6e2d001..3c52089 100644
--- a/packages/SystemUI/res/values-pl/strings.xml
+++ b/packages/SystemUI/res/values-pl/strings.xml
@@ -85,6 +85,7 @@
     <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>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Ułatwienia dostępu"</string>
     <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,7 +676,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Zamknij"</string>
+    <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>
@@ -686,7 +687,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Pytaj o hasło"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Alerty"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Zrzuty ekranu"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Bezpieczeństwo"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Stan użytkownika"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Wiadomości"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Miejsce"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-pt-rBR/strings.xml b/packages/SystemUI/res/values-pt-rBR/strings.xml
index 4ab349c..e089a8b 100644
--- a/packages/SystemUI/res/values-pt-rBR/strings.xml
+++ b/packages/SystemUI/res/values-pt-rBR/strings.xml
@@ -83,6 +83,7 @@
     <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>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Acessibilidade"</string>
     <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,7 +674,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Dispensar"</string>
+    <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>
@@ -684,7 +685,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Solicitar senha"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Alertas"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Capturas de tela"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Segurança"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Status do usuário"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Mensagens gerais"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Armazenamento"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-pt-rPT/strings.xml b/packages/SystemUI/res/values-pt-rPT/strings.xml
index fa1f70e..24532a8 100644
--- a/packages/SystemUI/res/values-pt-rPT/strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/strings.xml
@@ -83,6 +83,7 @@
     <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>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Acessibilidade"</string>
     <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,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Ignorar"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Solicitar palavra-passe"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Alertas"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Capturas de ecrã"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Segurança"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Estado do utilizador"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Mensagens gerais"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Armazenamento"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml
index 4ab349c..e089a8b 100644
--- a/packages/SystemUI/res/values-pt/strings.xml
+++ b/packages/SystemUI/res/values-pt/strings.xml
@@ -83,6 +83,7 @@
     <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>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Acessibilidade"</string>
     <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,7 +674,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Dispensar"</string>
+    <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>
@@ -684,7 +685,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Solicitar senha"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Alertas"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Capturas de tela"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Segurança"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Status do usuário"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Mensagens gerais"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Armazenamento"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml
index 7dc39d5..02d1787 100644
--- a/packages/SystemUI/res/values-ro/strings.xml
+++ b/packages/SystemUI/res/values-ro/strings.xml
@@ -84,6 +84,7 @@
     <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>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Accesibilitate"</string>
     <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,7 +676,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Respingeți"</string>
+    <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>
@@ -686,7 +687,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Solicitați parola"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Alerte"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Capturi de ecran"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Securitate"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Stare utilizator"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Mesaje generale"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Stocare"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml
index 5806e23..cddbf52 100644
--- a/packages/SystemUI/res/values-ru/strings.xml
+++ b/packages/SystemUI/res/values-ru/strings.xml
@@ -85,6 +85,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Назад"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Домой"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Меню"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Специальные возможности"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"Обзор."</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Поиск"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
@@ -677,7 +678,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Закрыть"</string>
+    <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>
@@ -688,7 +689,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Подсказка для пароля"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Уведомления"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Скриншоты"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Безопасность"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Статус пользователя"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Сообщения"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Хранилище"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-si/strings.xml b/packages/SystemUI/res/values-si/strings.xml
index 8870fad..522f126 100644
--- a/packages/SystemUI/res/values-si/strings.xml
+++ b/packages/SystemUI/res/values-si/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"ආපසු"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"මුල් පිටුව"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"මෙනුව"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"ප්‍රවේශ්‍යතාව"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"දළ විශ්ලේෂණය"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"සොයන්න"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"කැමරාව"</string>
@@ -671,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"අස් කරන්න"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"මුරපදය සඳහා ප්‍රේරණය කරන්න"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"ඇඟවීම්"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"තිර රු"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"ආරක්ෂාව"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"පරිශීලක තත්ත්වය"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"පොදු පණිවිඩ"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"ගබඩාව"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml
index 8afa432..d186cac 100644
--- a/packages/SystemUI/res/values-sk/strings.xml
+++ b/packages/SystemUI/res/values-sk/strings.xml
@@ -85,6 +85,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Späť"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Plocha"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Dostupnosť"</string>
     <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,7 +678,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Odmietnuť"</string>
+    <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>
@@ -688,7 +689,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Požadovať heslo"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Upozornenia"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Snímky obrazovky"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Zabezpečenie"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Stav používateľa"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Všeobecné správy"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Úložisko"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-sl/strings.xml b/packages/SystemUI/res/values-sl/strings.xml
index f457847..9a5ccc9 100644
--- a/packages/SystemUI/res/values-sl/strings.xml
+++ b/packages/SystemUI/res/values-sl/strings.xml
@@ -85,6 +85,7 @@
     <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>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Funkcije za ljudi s posebnimi potrebami"</string>
     <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,7 +678,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Opusti"</string>
+    <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>
@@ -688,7 +689,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Poziv za geslo"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Opozorila"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Posnetki zaslona"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Varnost"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Stanje uporabnika"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Splošna sporočila"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Shramba"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-sq/strings.xml b/packages/SystemUI/res/values-sq/strings.xml
index b7409a0..4d8951c 100644
--- a/packages/SystemUI/res/values-sq/strings.xml
+++ b/packages/SystemUI/res/values-sq/strings.xml
@@ -83,6 +83,7 @@
     <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>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Qasshmëria"</string>
     <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,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Hiqe"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Kërko fjalëkalimin"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Sinjalizimet"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Pamjet e ekranit"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Siguria"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Statusi i përdoruesit"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Mesazhe të përgjithshme"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Hapësira ruajtëse"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml
index 4b0a577..66808f7 100644
--- a/packages/SystemUI/res/values-sr/strings.xml
+++ b/packages/SystemUI/res/values-sr/strings.xml
@@ -84,6 +84,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Назад"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Почетна"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Мени"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Приступачност"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"Преглед"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Претражите"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
@@ -673,7 +674,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Одбаци"</string>
+    <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>
@@ -684,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>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Безбедност"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Статус корисника"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Опште поруке"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Меморијски простор"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-sv/strings.xml b/packages/SystemUI/res/values-sv/strings.xml
index c119da7..ccde1d2 100644
--- a/packages/SystemUI/res/values-sv/strings.xml
+++ b/packages/SystemUI/res/values-sv/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Tillbaka"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Startsida"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Meny"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Tillgänglighet"</string>
     <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,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Ignorera"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Kräv lösenord"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Varningar"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Skärmdumpar"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Säkerhet"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Användarstatus"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Allmänna meddelanden"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Lagring"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-sw/strings.xml b/packages/SystemUI/res/values-sw/strings.xml
index 54fc443..2febaa1 100644
--- a/packages/SystemUI/res/values-sw/strings.xml
+++ b/packages/SystemUI/res/values-sw/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Nyuma"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Nyumbani"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menyu"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Zana za walio na matatizo ya kuona au kusikia"</string>
     <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>
@@ -467,13 +468,13 @@
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Gonga ili ukomeshe. Huenda ikakomesha huduma za zana za walio na matatizo ya kuona au kusikia."</string>
     <string name="volume_dialog_accessibility_shown_message" msgid="1834631467074259998">"Inaonyesha %s ya vidhibiti vya sauti. Telezesha kidole juu ili uondoe."</string>
     <string name="volume_dialog_accessibility_dismissed_message" msgid="51543526013711399">"Imeficha vidhibiti vya sauti"</string>
-    <string name="system_ui_tuner" msgid="708224127392452018">"Kipokea Ishara cha SystemUI"</string>
+    <string name="system_ui_tuner" msgid="708224127392452018">"Kirekebishi cha kiolesura cha mfumo"</string>
     <string name="show_battery_percentage" msgid="5444136600512968798">"Onyesha asilimia ya betri iliyopachikwa"</string>
     <string name="show_battery_percentage_summary" msgid="3215025775576786037">"Onyesha asilimia ya kiwango cha betri ndani ya aikoni ya sehemu ya arifa inapokuwa haichaji"</string>
     <string name="quick_settings" msgid="10042998191725428">"Mipangilio ya Haraka"</string>
     <string name="status_bar" msgid="4877645476959324760">"Sehemu ya kuonyesha hali"</string>
     <string name="overview" msgid="4018602013895926956">"Muhtasari"</string>
-    <string name="demo_mode" msgid="2532177350215638026">"Hali ya onyesho la UI ya mfumo"</string>
+    <string name="demo_mode" msgid="2532177350215638026">"Hali ya onyesho la kirekebishi cha kiolesura cha mfumo"</string>
     <string name="enable_demo_mode" msgid="4844205668718636518">"Washa hali ya onyesho"</string>
     <string name="show_demo_mode" msgid="2018336697782464029">"Onyesha hali ya onyesho"</string>
     <string name="status_bar_ethernet" msgid="5044290963549500128">"Ethaneti"</string>
@@ -490,12 +491,12 @@
     <string name="accessibility_status_bar_hotspot" msgid="4099381329956402865">"Mtandao-hewa"</string>
     <string name="accessibility_managed_profile" msgid="6613641363112584120">"Wasifu wa kazini"</string>
     <string name="tuner_warning_title" msgid="7094689930793031682">"Kinafurahisha kwa baadhi ya watu lakini si wote"</string>
-    <string name="tuner_warning" msgid="8730648121973575701">"Kipokea Ishara cha System UI kinakupa njia zaidi za kugeuza na kubadilisha kiolesura cha Android ili kikufae. Vipengele hivi vya majaribio vinaweza kubadilika, kuharibika, au kupotea katika matoleo ya siku zijazo. Endelea kwa uangalifu."</string>
+    <string name="tuner_warning" msgid="8730648121973575701">"Kirekebishi cha kiolesura cha mfumo kinakupa njia zaidi za kugeuza na kubadilisha kiolesura cha Android ili kikufae. Vipengele hivi vya majaribio vinaweza kubadilika, kuharibika au kupotea katika matoleo ya siku zijazo. Endelea kwa uangalifu."</string>
     <string name="tuner_persistent_warning" msgid="8597333795565621795">"Vipengele hivi vya majaribio vinaweza kubadilika, kuharibika, au kupotea katika matoleo ya siku zijazo. Endelea kwa uangalifu."</string>
     <string name="got_it" msgid="2239653834387972602">"Nimeelewa"</string>
-    <string name="tuner_toast" msgid="603429811084428439">"Hongera! Kipokea Ishara cha System UI kimeongezwa kwenye Mipangilio"</string>
+    <string name="tuner_toast" msgid="603429811084428439">"Hongera! Kirekebishi cha kiolesura cha mfumo kimeongezwa kwenye mipangilio"</string>
     <string name="remove_from_settings" msgid="8389591916603406378">"Ondoa kwenye Mipangilio"</string>
-    <string name="remove_from_settings_prompt" msgid="6069085993355887748">"Je, ungependa kuondoa Kipokea ishara cha SystemUI kwenye Mipangilio na uache kutumia vipengele vyake vyote?"</string>
+    <string name="remove_from_settings_prompt" msgid="6069085993355887748">"Je, ungependa kuondoa Kirekebishi cha kiolesura cha mfumo kwenye mipangilio na uache kutumia vipengele vyake vyote?"</string>
     <string name="activity_not_found" msgid="348423244327799974">"Programu haijasakinishwa kwenye kifaa chako"</string>
     <string name="clock_seconds" msgid="7689554147579179507">"Onyesha sekunde za saa"</string>
     <string name="clock_seconds_desc" msgid="6282693067130470675">"Onyesha sekunde za saa katika sehemu ya arifa. Inaweza kuathiri muda wa matumizi ya betri."</string>
@@ -671,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Ondoa"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Omba nenosiri"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Arifa"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Picha za skrini"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Usalama"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Hali ya mtumiaji"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Ujumbe wa Jumla"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Hifadhi"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ta/strings.xml b/packages/SystemUI/res/values-ta/strings.xml
index 68b99bf..857f297 100644
--- a/packages/SystemUI/res/values-ta/strings.xml
+++ b/packages/SystemUI/res/values-ta/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"பின்செல்"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"முகப்பு"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"மெனு"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"அணுகல்தன்மை"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"மேலோட்டப் பார்வை"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"தேடு"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"கேமரா"</string>
@@ -671,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"நிராகரி"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"கடவுச்சொல்லைக் கேள்"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"விழிப்பூட்டல்கள்"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"ஸ்கிரீன் ஷாட்டுகள்"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"பாதுகாப்பு"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"பயனர் நிலை"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"பொதுச் செய்திகள்"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"சேமிப்பிடம்"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-te/strings.xml b/packages/SystemUI/res/values-te/strings.xml
index 69619bd0..2000ea3 100644
--- a/packages/SystemUI/res/values-te/strings.xml
+++ b/packages/SystemUI/res/values-te/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"వెనుకకు"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"హోమ్"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"మెను"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"ప్రాప్యత"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"అవలోకనం"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"శోధించు"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"కెమెరా"</string>
@@ -600,7 +601,7 @@
     <string name="nav_bar_left" msgid="731491280511316123">"ఎడమ"</string>
     <string name="nav_bar_right" msgid="2523774879720231974">"కుడి"</string>
     <string name="nav_bar_button_type" msgid="6947806619897153791">"బటన్ రకం"</string>
-    <string name="nav_bar_default" msgid="8587114043070993007">"(yadha prakaram)"</string>
+    <string name="nav_bar_default" msgid="8587114043070993007">"(డిఫాల్ట్)"</string>
   <string-array name="nav_bar_buttons">
     <item msgid="1545641631806817203">"క్లిప్‌బోర్డ్"</item>
     <item msgid="5742013440802239414">"కీకోడ్"</item>
@@ -671,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"తీసివేయి"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"పాస్‌వర్డ్ కోసం ప్రాంప్ట్ చేయి"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"హెచ్చరికలు"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"స్క్రీన్‌షాట్‌లు"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"భద్రత"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"వినియోగదారు స్థితి"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"సాధారణ సందేశాలు"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"నిల్వ"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml
index ce7af3c..ab6da21 100644
--- a/packages/SystemUI/res/values-th/strings.xml
+++ b/packages/SystemUI/res/values-th/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"กลับ"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"หน้าแรก"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"เมนู"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"ความสามารถเข้าถึงได้ง่าย"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"ภาพรวม"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"ค้นหา"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"กล้องถ่ายรูป"</string>
@@ -671,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"ปิด"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"แจ้งให้ป้อนรหัสผ่าน"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"การแจ้งเตือน"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"ภาพหน้าจอ"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"ความปลอดภัย"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"สถานะของผู้ใช้"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"ข้อความทั่วไป"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"พื้นที่เก็บข้อมูล"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml
index 3e632c4..c9fd8a2 100644
--- a/packages/SystemUI/res/values-tl/strings.xml
+++ b/packages/SystemUI/res/values-tl/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Bumalik"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Home"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Pagiging Naa-access"</string>
     <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,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"I-dismiss"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Mag-prompt para sa password"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Mga Alerto"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Mga Screenshot"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Seguridad"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Status ng user"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Mga Pangkalahatang Mensahe"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Storage"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-tr/strings.xml b/packages/SystemUI/res/values-tr/strings.xml
index 3d00f1d..9baf375e 100644
--- a/packages/SystemUI/res/values-tr/strings.xml
+++ b/packages/SystemUI/res/values-tr/strings.xml
@@ -83,6 +83,7 @@
     <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>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Erişilebilirlik"</string>
     <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,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Kapat"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Şifre sor"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Uyarılar"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Ekran görüntüleri"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Güvenlik"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Kullanıcı durumu"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Genel Mesajlar"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Depolama alanı"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-uk/strings.xml b/packages/SystemUI/res/values-uk/strings.xml
index 4d928d9..a74014c 100644
--- a/packages/SystemUI/res/values-uk/strings.xml
+++ b/packages/SystemUI/res/values-uk/strings.xml
@@ -85,6 +85,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Назад"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Головна"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Меню"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Спеціальні можливості"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"Огляд"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Пошук"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
@@ -677,7 +678,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Вимкнути"</string>
+    <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>
@@ -688,7 +689,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Запит пароля"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Сповіщення"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Знімки екрана"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Безпека"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Статус користувача"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Загальні повідомлення"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Пам’ять"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ur/strings.xml b/packages/SystemUI/res/values-ur/strings.xml
index d8ab5f8..7ea1b1c 100644
--- a/packages/SystemUI/res/values-ur/strings.xml
+++ b/packages/SystemUI/res/values-ur/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"واپس جائیں"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"ہوم"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"مینو"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"ایکسیسبیلٹی"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"مجموعی جائزہ"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"تلاش کریں"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"کیمرا"</string>
@@ -526,24 +527,15 @@
     <string name="notification_importance_high" msgid="3316555356062640222">"آواز نکالیں اور اسکرین پر پاپ کریں"</string>
     <string name="notification_more_settings" msgid="816306283396553571">"مزید ترتیبات"</string>
     <string name="notification_done" msgid="5279426047273930175">"ہوگیا"</string>
-    <!-- no translation found for notification_menu_accessibility (2046162834248888553) -->
-    <skip />
-    <!-- no translation found for notification_menu_gear_description (2204480013726775108) -->
-    <skip />
-    <!-- no translation found for notification_menu_snooze_description (3653669438131034525) -->
-    <skip />
-    <!-- no translation found for snooze_option_15_min (1068727451405610715) -->
-    <skip />
-    <!-- no translation found for snooze_option_30_min (867081342535195788) -->
-    <skip />
-    <!-- no translation found for snooze_option_1_hour (1098086401880077154) -->
-    <skip />
-    <!-- no translation found for snooze_option_dont_snooze (655446566007801922) -->
-    <skip />
-    <!-- no translation found for snooze_undo (6074877317002985129) -->
-    <skip />
-    <!-- no translation found for snoozed_for_time (2390718332980204462) -->
-    <skip />
+    <string name="notification_menu_accessibility" msgid="2046162834248888553">"<xliff:g id="APP_NAME">%1$s</xliff:g> <xliff:g id="MENU_DESCRIPTION">%2$s</xliff:g>"</string>
+    <string name="notification_menu_gear_description" msgid="2204480013726775108">"اطلاع کے کنٹرولز"</string>
+    <string name="notification_menu_snooze_description" msgid="3653669438131034525">"اطلاع اسنوز کرنے کے اختیارات"</string>
+    <string name="snooze_option_15_min" msgid="1068727451405610715">"15 منٹ"</string>
+    <string name="snooze_option_30_min" msgid="867081342535195788">"30 منٹ"</string>
+    <string name="snooze_option_1_hour" msgid="1098086401880077154">"1 گھنٹہ"</string>
+    <string name="snooze_option_dont_snooze" msgid="655446566007801922">"اسنوز نہ کريں"</string>
+    <string name="snooze_undo" msgid="6074877317002985129">"کالعدم کریں"</string>
+    <string name="snoozed_for_time" msgid="2390718332980204462">"<xliff:g id="TIME_AMOUNT">%1$s</xliff:g> کیلئے اسنوز کیا گیا"</string>
     <string name="battery_panel_title" msgid="7944156115535366613">"بیٹری کا استعمال"</string>
     <string name="battery_detail_charging_summary" msgid="1279095653533044008">"چارجنگ کے دوران بیٹری سیور دستیاب نہیں ہے"</string>
     <string name="battery_detail_switch_title" msgid="6285872470260795421">"بیٹری سیور"</string>
@@ -605,24 +597,23 @@
     <string name="switch_bar_on" msgid="1142437840752794229">"آن"</string>
     <string name="switch_bar_off" msgid="8803270596930432874">"آف"</string>
     <string name="nav_bar" msgid="1993221402773877607">"نیویگیشن بار"</string>
-    <!-- no translation found for nav_bar_layout (3664072994198772020) -->
-    <skip />
-    <!-- no translation found for nav_bar_left (731491280511316123) -->
-    <skip />
-    <!-- no translation found for nav_bar_right (2523774879720231974) -->
-    <skip />
-    <!-- no translation found for nav_bar_button_type (6947806619897153791) -->
-    <skip />
-    <!-- no translation found for nav_bar_default (8587114043070993007) -->
-    <skip />
-    <!-- no translation found for nav_bar_buttons:0 (1545641631806817203) -->
-    <!-- no translation found for nav_bar_buttons:1 (5742013440802239414) -->
-    <!-- no translation found for nav_bar_buttons:2 (8748101184830239843) -->
-    <!-- no translation found for nav_bar_buttons:3 (8175437057325747277) -->
-    <!-- no translation found for nav_bar_layouts:0 (4967898371682516967) -->
-    <!-- no translation found for nav_bar_layouts:1 (6210279084134579668) -->
-    <!-- no translation found for nav_bar_layouts:2 (89143234390889289) -->
-    <!-- no translation found for nav_bar_layouts:3 (7715533883382410603) -->
+    <string name="nav_bar_layout" msgid="3664072994198772020">"لے آؤٹ"</string>
+    <string name="nav_bar_left" msgid="731491280511316123">"بائیں"</string>
+    <string name="nav_bar_right" msgid="2523774879720231974">"دائیں"</string>
+    <string name="nav_bar_button_type" msgid="6947806619897153791">"بٹن کی قسم"</string>
+    <string name="nav_bar_default" msgid="8587114043070993007">"(ڈیفالٹ)"</string>
+  <string-array name="nav_bar_buttons">
+    <item msgid="1545641631806817203">"کلپ بورڈ"</item>
+    <item msgid="5742013440802239414">"کی کوڈ"</item>
+    <item msgid="8748101184830239843">"مینو/ کی بورڈ سوئچر"</item>
+    <item msgid="8175437057325747277">"کوئی نہیں"</item>
+  </string-array>
+  <string-array name="nav_bar_layouts">
+    <item msgid="4967898371682516967">"تقسیم شدہ (ڈیفالٹ)"</item>
+    <item msgid="6210279084134579668">"بیچوں بیچ"</item>
+    <item msgid="89143234390889289">"بائیں جانب موافق کردہ"</item>
+    <item msgid="7715533883382410603">"دائیں جانب موافق کردہ"</item>
+  </string-array>
     <string name="menu_ime" msgid="4943221416525250684">"مینو/ کی بورڈ سوئچر"</string>
     <string name="save" msgid="2311877285724540644">"محفوظ کریں"</string>
     <string name="reset" msgid="2448168080964209908">"دوبارہ ترتیب دیں"</string>
@@ -630,8 +621,7 @@
     <string name="clipboard" msgid="1313879395099896312">"کلپ بورڈ"</string>
     <string name="accessibility_key" msgid="5701989859305675896">"حسب ضرورت نیویگیشن بٹن"</string>
     <string name="keycode" msgid="7335281375728356499">"کی کوڈ"</string>
-    <!-- no translation found for icon (8732339849035837289) -->
-    <skip />
+    <string name="icon" msgid="8732339849035837289">"آئیکن"</string>
     <string name="drag_to_add_tiles" msgid="7058945779098711293">"ٹائٹلز شامل کرنے کیلئے گھسیٹیں"</string>
     <string name="drag_to_remove_tiles" msgid="3361212377437088062">"ہٹانے کیلئے یہاں گھسیٹیں؟"</string>
     <string name="qs_edit" msgid="2232596095725105230">"ترمیم کریں"</string>
@@ -682,28 +672,17 @@
     <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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"برخاست کریں"</string>
+    <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>
-    <!-- no translation found for lockscreen_left (6806490081187499505) -->
-    <skip />
-    <!-- no translation found for lockscreen_right (6093496261656102989) -->
-    <skip />
-    <!-- no translation found for lockscreen_customize (1288691376862981950) -->
-    <skip />
-    <!-- no translation found for lockscreen_shortcut (3734369277470360642) -->
-    <skip />
-    <!-- no translation found for lockscreen_unlock (4934466194763269051) -->
-    <skip />
-    <!-- no translation found for notification_channel_alerts (4496839309318519037) -->
-    <skip />
-    <!-- no translation found for notification_channel_screenshot (6314080179230000938) -->
-    <skip />
-    <!-- no translation found for notification_channel_security (7345516133431326347) -->
-    <skip />
-    <!-- no translation found for notification_channel_user_status (1436913581465146650) -->
-    <skip />
-    <!-- no translation found for notification_channel_storage (3077205683020695313) -->
-    <skip />
+    <string name="lockscreen_left" msgid="6806490081187499505">"بائیں"</string>
+    <string name="lockscreen_right" msgid="6093496261656102989">"دائیں"</string>
+    <string name="lockscreen_customize" msgid="1288691376862981950">"شارٹ کٹ کو حسب ضرورت بنائیں"</string>
+    <string name="lockscreen_shortcut" msgid="3734369277470360642">"شارٹ کٹ"</string>
+    <string name="lockscreen_unlock" msgid="4934466194763269051">"پاسورڈ کا اشارہ"</string>
+    <string name="notification_channel_alerts" msgid="4496839309318519037">"الرٹس"</string>
+    <string name="notification_channel_screenshot" msgid="6314080179230000938">"اسکرین شاٹس"</string>
+    <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 f72092b..ae51151 100644
--- a/packages/SystemUI/res/values-uz/strings.xml
+++ b/packages/SystemUI/res/values-uz/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Orqaga"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Uyga"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menyu"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Maxsus imkoniyatlar"</string>
     <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>
@@ -529,14 +530,14 @@
     <string name="notification_more_settings" msgid="816306283396553571">"Boshqa sozlamalar"</string>
     <string name="notification_done" msgid="5279426047273930175">"Tayyor"</string>
     <string name="notification_menu_accessibility" msgid="2046162834248888553">"<xliff:g id="APP_NAME">%1$s</xliff:g> <xliff:g id="MENU_DESCRIPTION">%2$s</xliff:g>"</string>
-    <string name="notification_menu_gear_description" msgid="2204480013726775108">"bildirishnomalarni boshqarish elementlari"</string>
+    <string name="notification_menu_gear_description" msgid="2204480013726775108">"bildirishnoma sozlamalari"</string>
     <string name="notification_menu_snooze_description" msgid="3653669438131034525">"bildirishnomalarni kechiktirish parametrlari"</string>
     <string name="snooze_option_15_min" msgid="1068727451405610715">"15 daqiqa"</string>
     <string name="snooze_option_30_min" msgid="867081342535195788">"30 daqiqa"</string>
     <string name="snooze_option_1_hour" msgid="1098086401880077154">"1 soat"</string>
     <string name="snooze_option_dont_snooze" msgid="655446566007801922">"Kechiktirilmasin"</string>
     <string name="snooze_undo" msgid="6074877317002985129">"BEKOR QILISH"</string>
-    <string name="snoozed_for_time" msgid="2390718332980204462">"<xliff:g id="TIME_AMOUNT">%1$s</xliff:g> kechiktirildi"</string>
+    <string name="snoozed_for_time" msgid="2390718332980204462">"<xliff:g id="TIME_AMOUNT">%1$s</xliff:g> muddatga kechiktirildi"</string>
     <string name="battery_panel_title" msgid="7944156115535366613">"Batareya sarfi"</string>
     <string name="battery_detail_charging_summary" msgid="1279095653533044008">"Quvvat tejash rejimidan quvvatlash vaqtida foydalanib bo‘lmaydi"</string>
     <string name="battery_detail_switch_title" msgid="6285872470260795421">"Quvvat tejash rejimi"</string>
@@ -606,12 +607,12 @@
   <string-array name="nav_bar_buttons">
     <item msgid="1545641631806817203">"Vaqtinchalik xotira"</item>
     <item msgid="5742013440802239414">"Tugma kodi"</item>
-    <item msgid="8748101184830239843">"Menyu yoki klaviatura"</item>
-    <item msgid="8175437057325747277">"Hech qaysi"</item>
+    <item msgid="8748101184830239843">"Menyu/klaviaturani almashtirish"</item>
+    <item msgid="8175437057325747277">"Hech biri"</item>
   </string-array>
   <string-array name="nav_bar_layouts">
-    <item msgid="4967898371682516967">"Bo‘lingan (standart)"</item>
-    <item msgid="6210279084134579668">"O‘rtaga tekislangan"</item>
+    <item msgid="4967898371682516967">"Alohida (standart)"</item>
+    <item msgid="6210279084134579668">"Markazda"</item>
     <item msgid="89143234390889289">"Chapga tekislangan"</item>
     <item msgid="7715533883382410603">"O‘ngga tekislangan"</item>
   </string-array>
@@ -673,7 +674,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Yopish"</string>
+    <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>
@@ -684,7 +685,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Parol uchun bildirgi"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Ogohlantirishlar"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Skrinshotlar"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Xavfsizlik"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Foydalanuvchi holati"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Umumiy xabarlar"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Xotira"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-vi/strings.xml b/packages/SystemUI/res/values-vi/strings.xml
index e33328a..043f1ee 100644
--- a/packages/SystemUI/res/values-vi/strings.xml
+++ b/packages/SystemUI/res/values-vi/strings.xml
@@ -83,6 +83,7 @@
     <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>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Trợ năng"</string>
     <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,7 +674,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Loại bỏ"</string>
+    <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>
@@ -684,7 +685,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Lời nhắc nhập mật khẩu"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Cảnh báo"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Ảnh chụp màn hình"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Bảo mật"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Trạng thái người dùng"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Thông báo chung"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Bộ nhớ"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml
index f754c38..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,7 +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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"关闭"</string>
+    <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>
@@ -682,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>
-    <string name="notification_channel_security" msgid="7345516133431326347">"安全性"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"用户状态"</string>
+    <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 ca882ab..4cdc790 100644
--- a/packages/SystemUI/res/values-zh-rHK/strings.xml
+++ b/packages/SystemUI/res/values-zh-rHK/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"返回"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"首頁"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"選單"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"無障礙功能"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"概覽"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"搜尋"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"相機"</string>
@@ -673,7 +674,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"關閉"</string>
+    <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>
@@ -684,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>
-    <string name="notification_channel_security" msgid="7345516133431326347">"安全性"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"使用者狀態"</string>
+    <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-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml
index 82ef5ee..08c2a05 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"返回"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"主螢幕"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"選單"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"協助工具"</string>
     <string name="accessibility_recent" msgid="5208608566793607626">"總覽"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"搜尋"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"相機"</string>
@@ -671,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"關閉"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"提示輸入密碼"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"快訊"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"螢幕擷取畫面"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"安全性"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"使用者狀態"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"一般訊息"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"儲存空間"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-zu/strings.xml b/packages/SystemUI/res/values-zu/strings.xml
index 1a6b8d0..5a513d8 100644
--- a/packages/SystemUI/res/values-zu/strings.xml
+++ b/packages/SystemUI/res/values-zu/strings.xml
@@ -83,6 +83,7 @@
     <string name="accessibility_back" msgid="567011538994429120">"Emuva"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Ekhaya"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Imenyu"</string>
+    <string name="accessibility_accessibility_button" msgid="7601252764577607915">"Ukufinyeleleka"</string>
     <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,7 +672,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>
-    <string name="pip_phone_dismiss" msgid="1305916715402775904">"Cashisa"</string>
+    <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>
@@ -682,7 +683,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Yalela iphasiwedi"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Izexwayiso"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Izithombe-skrini"</string>
-    <string name="notification_channel_security" msgid="7345516133431326347">"Ukuphepha"</string>
-    <string name="notification_channel_user_status" msgid="1436913581465146650">"Isimo somsebenzisi"</string>
+    <string name="notification_channel_general" msgid="4525309436693914482">"Imilayezo ejwayelekile"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Isitoreji"</string>
 </resources>
diff --git a/packages/SystemUI/res/values/arrays.xml b/packages/SystemUI/res/values/arrays.xml
deleted file mode 100644
index bf0cba2..0000000
--- a/packages/SystemUI/res/values/arrays.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/* //device/apps/common/assets/res/any/colors.xml
-**
-** Copyright 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.
-*/
--->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
-    <!-- BatteryMeterView parameters -->
-    <array name="batterymeter_color_levels">
-        <item>15</item>
-        <item>100</item>
-    </array>
-    <array name="batterymeter_color_values">
-        <item>@*android:color/battery_saver_mode_color</item>
-        <item>#FFFFFFFF</item>
-    </array>
-    <array name="batterymeter_bolt_points">
-        <item>73</item> <item>0</item>
-        <item>392</item><item>0</item>
-        <item>201</item><item>259</item>
-        <item>442</item><item>259</item>
-        <item>4</item>  <item>703</item>
-        <item>157</item><item>334</item>
-        <item>0</item>  <item>334</item>
-    </array>
-    <array name="batterymeter_plus_points">
-        <item>3</item><item>0</item>
-        <item>5</item><item>0</item>
-        <item>5</item><item>3</item>
-        <item>8</item><item>3</item>
-        <item>8</item><item>5</item>
-        <item>5</item><item>5</item>
-        <item>5</item><item>8</item>
-        <item>3</item><item>8</item>
-        <item>3</item><item>5</item>
-        <item>0</item><item>5</item>
-        <item>0</item><item>3</item>
-        <item>3</item><item>3</item>
-    </array>
-</resources>
diff --git a/packages/SystemUI/res/values/attrs.xml b/packages/SystemUI/res/values/attrs.xml
index 7fb513c..7632f87 100644
--- a/packages/SystemUI/res/values/attrs.xml
+++ b/packages/SystemUI/res/values/attrs.xml
@@ -115,5 +115,9 @@
     <declare-styleable name="PluginInflateContainer">
         <attr name="viewType" format="string" />
     </declare-styleable>
+    <declare-styleable name="ScrimView">
+        <!-- The initial color for the scrim. -->
+        <attr name="scrimColor" format="color" />
+    </declare-styleable>
 </resources>
 
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index 1ec611a..7f30c83 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -26,9 +26,6 @@
     <drawable name="status_bar_notification_row_background_color">#ff090909</drawable>
     <color name="notification_list_shadow_top">#80000000</color>
     <drawable name="heads_up_notification_bg_pressed">#ff33B5E5</drawable>
-    <color name="batterymeter_frame_color">#4DFFFFFF</color><!-- 30% white -->
-    <color name="batterymeter_charge_color">#FFFFFFFF</color>
-    <color name="batterymeter_bolt_color">#FFFFFFFF</color>
     <color name="qs_batterymeter_frame_color">#FF404040</color>
     <color name="system_warning_color">@*android:color/system_error</color>
     <color name="qs_tile_divider">#29ffffff</color><!-- 16% white -->
@@ -36,6 +33,7 @@
     <color name="qs_detail_button">@*android:color/quaternary_device_default_settings</color>
     <color name="qs_detail_button_white">#B3FFFFFF</color><!-- 70% white -->
     <color name="qs_detail_transition">#66FFFFFF</color>
+    <color name="scrim_behind_color">@android:color/black</color>
     <color name="status_bar_clock_color">#FFFFFFFF</color>
     <color name="qs_user_detail_icon_muted">#FFFFFFFF</color> <!-- not so muted after all -->
     <color name="qs_tile_disabled_color">#9E9E9E</color> <!-- 38% black -->
@@ -98,10 +96,6 @@
 
     <!-- The "inside" of a notification, reached via longpress -->
     <color name="notification_guts_bg_color">#eeeeee</color>
-    <color name="notification_guts_disabled_slider_color">@*android:color/material_grey_300</color>
-    <color name="notification_guts_secondary_slider_color">#858383</color>
-    <color name="notification_guts_icon_tint">#8a000000</color>
-    <color name="notification_guts_disabled_icon_tint">#4d000000</color>
 
     <!-- Colors of the snooze menu reached via snooze icon behind a notification -->
     <color name="snooze_snackbar_bg">#FF4A4A4A</color>
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index d9407ab..64cac3c 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -302,4 +302,34 @@
     <item type="id" name="action_split_task_to_right" />
     <item type="id" name="action_split_task_to_top" />
 
+    <!-- Whether or not the gear icon on notifications should be shown. The gear is shown when the
+         the notification is not swiped enough to dismiss it. -->
+    <bool name="config_showNotificationGear">true</bool>
+
+    <!-- Whether or not a background should be drawn behind a notification. -->
+    <bool name="config_drawNotificationBackground">true</bool>
+
+    <!-- Whether or not the edit icon on the quick settings header is shown. -->
+    <bool name="config_showQuickSettingsEditingIcon">true</bool>
+
+    <!-- Whether or not the multi-user switcher should be visible even if the quick settings are
+         not expanded. If there are not multiple users on the system, the switcher will still
+         hide itself. -->
+    <bool name="config_alwaysShowMultiUserSwitcher">false</bool>
+
+    <!-- Whether or not the expand indicator is visible for manually expanding the quick settings
+         panel. -->
+    <bool name="config_showQuickSettingsExpandIndicator">true</bool>
+
+    <!-- Whether or not to display the row of quick settings icons separate from the full quick
+         settings panel. -->
+    <bool name="config_showQuickSettingsRow">true</bool>
+
+    <!-- Whether or not the quick settings should be revealed on an overscroll of the
+         notifications panel. -->
+    <bool name="config_enableQuickSettingsOverscrollExpansion">true</bool>
+
+    <!-- Whether or the notifications can be shown and dismissed with a drag. -->
+    <bool name="config_enableNotificationShadeDrag">true</bool>
+
 </resources>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index ddcc4ba..40d4d6f 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -69,6 +69,9 @@
     <!-- Height of a small notification in the status bar-->
     <dimen name="notification_min_height">92dp</dimen>
 
+    <!-- Increased height of a small notification in the status bar -->
+    <dimen name="notification_min_height_increased">132dp</dimen>
+
     <!-- Height of a small notification in the status bar which was used before android N -->
     <dimen name="notification_min_height_legacy">64dp</dimen>
 
@@ -84,6 +87,9 @@
     <!-- Height of a heads up notification in the status bar -->
     <dimen name="notification_max_heads_up_height">148dp</dimen>
 
+    <!-- Height of a heads up notification in the status bar -->
+    <dimen name="notification_max_heads_up_height_increased">188dp</dimen>
+
     <!-- a threshold in dp per second that is considered fast scrolling -->
     <dimen name="scroll_fast_threshold">1500dp</dimen>
 
@@ -213,8 +219,8 @@
     <!-- The size of the gesture span needed to activate the "pull" notification expansion -->
     <dimen name="pull_span_min">25dp</dimen>
 
-    <dimen name="qs_tile_height">80dp</dimen>
-    <dimen name="qs_tile_margin">36dp</dimen>
+    <dimen name="qs_tile_height">88dp</dimen>
+    <dimen name="qs_tile_margin">28dp</dimen>
     <dimen name="qs_tile_margin_top">16dp</dimen>
     <dimen name="qs_quick_tile_size">48dp</dimen>
     <dimen name="qs_quick_tile_padding">12dp</dimen>
@@ -314,9 +320,6 @@
     <!-- The height of the divider between the individual notifications when the notification wants it to be increased. This is currently the case for notification groups -->
     <dimen name="notification_divider_height_increased">6dp</dimen>
 
-    <!-- The height of an importance selection in the inline notification controls -->
-    <dimen name="notification_inline_importance_height">55dp</dimen>
-
     <!-- The minimum amount of top overscroll to go to the quick settings. -->
     <dimen name="min_top_overscroll_to_qs">36dp</dimen>
 
@@ -347,6 +350,8 @@
     <dimen name="keyguard_clock_notifications_margin_max">42dp</dimen>
     <dimen name="heads_up_scrim_height">250dp</dimen>
 
+    <item name="scrim_behind_alpha" format="float" type="dimen">0.62</item>
+
     <!-- The minimum amount the user needs to swipe to go to the camera / phone. -->
     <dimen name="keyguard_min_swipe_amount">110dp</dimen>
 
@@ -515,14 +520,6 @@
     <!-- How much two taps can be apart to still be recognized as a double tap on the lockscreen -->
     <dimen name="double_tap_slop">32dp</dimen>
 
-    <!-- Margin on the right side of the system icon group on Keyguard. -->
-    <fraction name="battery_button_height_fraction">10.5%</fraction>
-
-    <!-- Fraction value to smooth the edges of the battery icon. The path will be inset by this
-         fraction of a pixel.-->
-    <fraction name="battery_subpixel_smoothing_left">0%</fraction>
-    <fraction name="battery_subpixel_smoothing_right">0%</fraction>
-
     <dimen name="battery_margin_bottom">0dp</dimen>
 
     <!-- Padding at the end of the view that displays the mobile signal icons. If the view is
@@ -637,9 +634,6 @@
     <dimen name="docked_divider_handle_width">16dp</dimen>
     <dimen name="docked_divider_handle_height">2dp</dimen>
 
-    <dimen name="battery_height">14.5dp</dimen>
-    <dimen name="battery_width">9.5dp</dimen>
-
     <dimen name="battery_detail_graph_space_top">27dp</dimen>
     <dimen name="battery_detail_graph_space_bottom">27dp</dimen>
 
diff --git a/packages/SystemUI/res/values/dimens_grid.xml b/packages/SystemUI/res/values/dimens_grid.xml
index 5858443..febf65b8 100644
--- a/packages/SystemUI/res/values/dimens_grid.xml
+++ b/packages/SystemUI/res/values/dimens_grid.xml
@@ -22,6 +22,7 @@
   <dimen name="recents_grid_task_view_header_height">44dp</dimen>
   <dimen name="recents_grid_task_view_header_button_padding">8dp</dimen>
   <dimen name="recents_grid_task_view_focused_frame_thickness">8dp</dimen>
-  <dimen name="recents_grid_task_view_rounded_corners_radius">8dp</dimen>
+  <dimen name="recents_grid_task_view_rounded_corners_radius">4dp</dimen>
+  <dimen name="recents_grid_task_view_focused_frame_rounded_corners_radius">8dp</dimen>
 </resources>
 
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index d3e965a..b825cfb 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -207,6 +207,8 @@
     <string name="accessibility_home">Home</string>
     <!-- Content description of the menu button for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
     <string name="accessibility_menu">Menu</string>
+    <!-- Content description of the accessibility button in the navigation bar (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_accessibility_button">Accessibility</string>
     <!-- Content description of the recents button for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
     <string name="accessibility_recent">Overview</string>
     <!-- Content description of the search button for accessibility. [CHAR LIMIT=NONE] -->
@@ -817,9 +819,6 @@
     <!-- Expanded Status Bar Header: Not charging [CHAR LIMIT=40] -->
     <string name="expanded_header_battery_not_charging">Not charging</string>
 
-    <!-- Glyph to be overlaid atop the battery when the level is extremely low. Do not translate. -->
-    <string name="battery_meter_very_low_overlay_symbol">!</string>
-
     <!-- Shows up when there is a user SSL CA Cert installed on the
          device.  Indicates to the user that SSL traffic can be intercepted.
          If the text fits on one line (~14 chars), it should start with a
@@ -1336,37 +1335,23 @@
     <!-- Notification Inline Controls: Header for apps that are not yet using notification channels. -->
     <string name="notification_header_default_channel">Notifications</string>
 
+    <!-- The divider symbol between different parts of the notification header including spaces. not translatable [CHAR LIMIT=3] -->
+    <string name="notification_header_divider_symbol_with_spaces" translatable="false">" • "</string>
+
     <!-- Notification Inline Controls: Shown when a channel's notifications are currently blocked -->
     <string name="notification_channel_disabled">You won\'t get these notifications anymore.</string>
 
-    <!-- Notification Inline Controls: Header text for describing from which app this notification
-        originates.  The line below this in the layout will display the channel name.
-        Note for localization:  For languages in which the two separate lines cannot be a continuous
-        sentence, translate this as a separate statement: "[Calendar] notifications" -->
-    <string name="notification_importance_header_app"><xliff:g id="app" example="Calendar">%s</xliff:g> notifications for</string>
-
-    <!-- Notification importance title, min status-->
-    <string name="min_importance">Low</string>
-    <!-- Notification importance title, low status-->
-    <string name="low_importance">Medium</string>
-    <!-- Notification importance title, normal status-->
-    <string name="default_importance">High</string>
-    <!-- Notification importance title, high status-->
-    <string name="high_importance">Urgent</string>
-
-    <!-- [CHAR LIMIT=100] Notification Importance slider: min importance level description -->
-    <string name="notification_importance_min">No sound or visual interruption</string>
-
-    <!-- [CHAR LIMIT=100] Notification Importance slider: low importance level description -->
-    <string name="notification_importance_low">Show silently</string>
-
-    <!-- [CHAR LIMIT=100] Notification Importance slider: normal importance level description -->
-    <string name="notification_importance_default">Make sound</string>
-
-    <!-- [CHAR LIMIT=100] Notification Importance slider: high importance level description -->
-    <string name="notification_importance_high">Make sound and pop on screen</string>
-
-    <!-- Notification: Control panel: Label for button that launches notification settings. [CHAR LIMIT=NONE] -->
+    <!-- Notification: Control panel: Label that shows how many channels this application has
+        defined, describing the current notification channel as "1 out of n". -->
+    <plurals name="notification_num_channels_desc">
+        <item quantity="one">1 out of <xliff:g id="number">%d</xliff:g> category from this app</item>
+        <item quantity="other">1 out of <xliff:g id="number">%d</xliff:g> categories from this app</item>
+    </plurals>
+    <!-- Notification: Control panel: Label for button that launches notification settings. Used
+        when this app has defined more than a single channel for notifications. -->
+    <string name="notification_all_categories">All Categories</string>
+    <!-- Notification: Control panel: Label for button that launches notification settings. Used
+        when this app has only defined a single channel for notifications. -->
     <string name="notification_more_settings">More settings</string>
     <!-- Notification: Control panel: Label for button that dismisses control panel. [CHAR LIMIT=NONE] -->
     <string name="notification_done">Done</string>
@@ -1542,14 +1527,12 @@
     <!-- SysUI Tuner: Button that controls layout of navigation bar [CHAR LIMIT=60] -->
     <string name="nav_bar_layout">Layout</string>
 
-    <!-- SysUI Tuner: Label for section of settings about the left nav button [CHAR LIMIT=60] -->
-    <string name="nav_bar_left">Left</string>
-
-    <!-- SysUI Tuner: Label for section of settings about the right nav button [CHAR LIMIT=60] -->
-    <string name="nav_bar_right">Right</string>
+    <!-- SysUI Tuner: Setting for button type in nav bar [CHAR LIMIT=60] -->
+    <string name="left_nav_bar_button_type">Extra left button type</string>
 
     <!-- SysUI Tuner: Setting for button type in nav bar [CHAR LIMIT=60] -->
-    <string name="nav_bar_button_type">Button type</string>
+    <string name="right_nav_bar_button_type">Extra right button type</string>
+
 
     <!-- SysUI Tuner: Added to nav bar option to indicate it is the default [CHAR LIMIT=60] -->
     <string name="nav_bar_default"> (default)</string>
@@ -1558,7 +1541,7 @@
     <string-array name="nav_bar_buttons">
         <item>Clipboard</item>
         <item>Keycode</item>
-        <item>Menu / Keyboard Switcher</item>
+        <item>Keyboard switcher</item>
         <item>None</item>
     </string-array>
     <string-array name="nav_bar_button_values" translatable="false">
@@ -1570,10 +1553,10 @@
 
     <!-- SysUI Tuner: Labels for different types of navigation bar layouts [CHAR LIMIT=60] -->
     <string-array name="nav_bar_layouts">
-        <item>Divided (default)</item>
-        <item>Centered</item>
-        <item>Left-aligned</item>
-        <item>Right-aligned</item>
+        <item>Normal</item>
+        <item>Compact</item>
+        <item>Left-leaning</item>
+        <item>Right-leaning</item>
     </string-array>
 
     <string-array name="nav_bar_layouts_values" translatable="false">
@@ -1584,7 +1567,7 @@
     </string-array>
 
     <!-- SysUI Tuner: Name of Combination Menu / Keyboard Switcher button [CHAR LIMIT=30] -->
-    <string name="menu_ime">Menu / Keyboard Switcher</string>
+    <string name="menu_ime">Keyboard switcher</string>
     <!-- SysUI Tuner: Save the current settings [CHAR LIMIT=30] -->
     <string name="save">Save</string>
     <!-- SysUI Tuner: Reset to default settings [CHAR LIMIT=30] -->
@@ -1600,10 +1583,16 @@
     <string name="accessibility_key">Custom navigation button</string>
 
     <!-- SysUI Tuner: Nav bar button that emulates a keycode [CHAR LIMIT=30] -->
-    <string name="keycode">Keycode</string>
+    <string name="left_keycode">Left keycode</string>
+
+    <!-- SysUI Tuner: Nav bar button that emulates a keycode [CHAR LIMIT=30] -->
+    <string name="right_keycode">Right keycode</string>
 
     <!-- SysUI Tuner: Settings to change nav bar icon [CHAR LIMIT=30] -->
-    <string name="icon">Icon</string>
+    <string name="left_icon">Left icon</string>
+
+    <!-- SysUI Tuner: Settings to change nav bar icon [CHAR LIMIT=30] -->
+    <string name="right_icon">Right icon</string>
 
     <!-- Label for area where tiles can be dragged out of [CHAR LIMIT=60] -->
     <string name="drag_to_add_tiles">Drag to add tiles</string>
@@ -1736,38 +1725,25 @@
         not appear on production builds ever. -->
     <string name="tuner_doze" translatable="false">Ambient Display</string>
 
+    <!-- Ambient display, Sensors wake up device of the tuner. Non-translatable since it should
+        not appear on production builds ever. -->
+    <string name="tuner_doze_sensors_wake_up_fully" translatable="false">Wake up device on double tap or lift</string>
+
     <!-- Ambient display always-on of the tuner. Non-translatable since it should
         not appear on production builds ever. -->
     <string name="tuner_doze_always_on" translatable="false">Always on</string>
 
+    <!-- SysUI Tuner: Section to customize lockscreen shortcuts [CHAR LIMIT=60] -->
+    <string name="tuner_lock_screen">Lock screen</string>
+
     <!-- Making the PIP fullscreen [CHAR LIMIT=25] -->
     <string name="pip_phone_expand">Expand</string>
 
     <!-- Label for PIP action to Minimize the PIP [CHAR LIMIT=25] -->
     <string name="pip_phone_minimize">Minimize</string>
 
-    <!-- Label for PIP action to Dismiss the PIP -->
-    <string name="pip_phone_dismiss">Dismiss</string>
-
-    <!-- PIP section of the tuner. Non-translatable since it should
-        not appear on production builds ever. -->
-    <string name="picture_in_picture" translatable="false">Picture-in-Picture</string>
-
-    <!-- PIP drag to dismiss title. Non-translatable since it should
-        not appear on production builds ever. -->
-    <string name="pip_drag_to_dismiss_title" translatable="false">Drag to dismiss</string>
-
-    <!-- PIP drag to dismiss description. Non-translatable since it should
-        not appear on production builds ever. -->
-    <string name="pip_drag_to_dismiss_summary" translatable="false">Drag to the dismiss target at the bottom of the screen to close the PIP</string>
-
-    <!-- PIP allow minimize title. Non-translatable since it should
-        not appear on production builds ever. -->
-    <string name="pip_allow_minimize_title" translatable="false">Allow PIP to minimize</string>
-
-    <!-- PIP allow minimize description. Non-translatable since it should
-        not appear on production builds ever. -->
-    <string name="pip_allow_minimize_summary" translatable="false">Allow PIP to minimize slightly offscreen</string>
+    <!-- Label for PIP the drag to close zone [CHAR LIMIT=NONE]-->
+    <string name="pip_phone_close">Close</string>
 
     <!-- Tuner string -->
     <string name="change_theme_reboot" translatable="false">Changing the theme requires a restart.</string>
@@ -1783,29 +1759,54 @@
     <!-- Text body for dialog alerting user that their phone has reached a certain temperature and may start to slow down in order to cool down. [CHAR LIMIT=300] -->
     <string name="high_temp_dialog_message">Your phone will automatically try to cool down. You can still use your phone, but it may run slower.\n\nOnce your phone has cooled down, it will run normally.</string>
 
-    <!-- SysUI Tuner: Group of settings for left lock screen affordance [CHAR LIMIT=60] -->
-    <string name="lockscreen_left">Left</string>
-
-    <!-- SysUI Tuner: Group of settings for right lock screen affordance [CHAR LIMIT=60] -->
-    <string name="lockscreen_right">Right</string>
-
-    <!-- SysUI Tuner: Switch controlling whether to customize lock screen button [CHAR LIMIT=60] -->
-    <string name="lockscreen_customize">Customize shortcut</string>
+    <!-- SysUI Tuner: Button to select lock screen shortcut [CHAR LIMIT=60] -->
+    <string name="lockscreen_shortcut_left">Left shortcut</string>
 
     <!-- SysUI Tuner: Button to select lock screen shortcut [CHAR LIMIT=60] -->
-    <string name="lockscreen_shortcut">Shortcut</string>
+    <string name="lockscreen_shortcut_right">Right shortcut</string>
 
-    <!-- SysUI Tuner: Switch to control if device gets unlocked [CHAR LIMIT=60] -->
-    <string name="lockscreen_unlock">Prompt for password</string>
+    <!-- SysUI Tuner: Switch to control if device gets unlocked by left shortcut [CHAR LIMIT=60] -->
+    <string name="lockscreen_unlock_left">Left shortcut also unlocks</string>
+
+    <!-- SysUI Tuner: Switch to control if device gets unlocked by right shortcut [CHAR LIMIT=60] -->
+    <string name="lockscreen_unlock_right">Right shortcut also unlocks</string>
+
+    <!-- SysUI Tuner: Summary of no shortcut being selected [CHAR LIMIT=60] -->
+    <string name="lockscreen_none">None</string>
+
+    <!-- SysUI Tuner: Format string for describing launching an app [CHAR LIMIT=60] -->
+    <string name="tuner_launch_app">Launch <xliff:g id="app" example="Settings">%1$s</xliff:g></string>
+
+    <!-- SysUI Tuner: Label for section of other apps that can be launched [CHAR LIMIT=60] -->
+    <string name="tuner_other_apps">Other apps</string>
+
+    <!-- SysUI Tuner: Label for icon shaped like a circle [CHAR LIMIT=60] -->
+    <string name="tuner_circle">Circle</string>
+
+    <!-- SysUI Tuner: Label for icon shaped like a plus [CHAR LIMIT=60] -->
+    <string name="tuner_plus">Plus</string>
+
+    <!-- SysUI Tuner: Label for icon shaped like a minus [CHAR LIMIT=60] -->
+    <string name="tuner_minus">Minus</string>
+
+    <!-- SysUI Tuner: Label for icon shaped like a left [CHAR LIMIT=60] -->
+    <string name="tuner_left">Left</string>
+
+    <!-- SysUI Tuner: Label for icon shaped like a right [CHAR LIMIT=60] -->
+    <string name="tuner_right">Right</string>
+
+    <!-- SysUI Tuner: Label for icon shaped like a menu [CHAR LIMIT=60] -->
+    <string name="tuner_menu">Menu</string>
+
+    <!-- SysUI Tuner: App subheading for shortcut selection [CHAR LIMIT=60] -->
+    <string name="tuner_app"><xliff:g id="app">%1$s</xliff:g> app</string>
 
     <!-- Title for the notification channel containing important alerts like low battery. [CHAR LIMIT=NONE] -->
     <string name="notification_channel_alerts">Alerts</string>
     <!-- Title for the notification channel dedicated to screenshot progress. [CHAR LIMIT=NONE] -->
     <string name="notification_channel_screenshot">Screenshots</string>
-    <!-- Title for the notification channel for urgent security issues. [CHAR LIMIT=NONE] -->
-    <string name="notification_channel_security">Security</string>
-    <!-- Title for the notification channel containing multi-user status information. [CHAR LIMIT=NONE] -->
-    <string name="notification_channel_user_status">User status</string>
+    <!-- Title for the notification channel for miscellaneous notices. [CHAR LIMIT=NONE] -->
+    <string name="notification_channel_general">General Messages</string>
     <!-- Title for the notification channel for problems with storage (i.e. low disk). [CHAR LIMIT=NONE] -->
     <string name="notification_channel_storage">Storage</string>
 
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index c5a5518..48b7664 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -362,17 +362,12 @@
 
     <style name="TextAppearance.NotificationGuts.Secondary">
         <item name="android:textColor">?android:attr/textColorPrimary</item>
-        <item name="android:alpha">.38</item>
         <item name="android:textSize">12sp</item>
     </style>
 
-    <style name="TextAppearance.NotificationGuts.Primary">
-        <item name="android:textColor">?android:attr/textColorPrimary</item>
-        <item name="android:textSize">16sp</item>
-    </style>
-
-    <style name="TextAppearance.NotificationGuts.Radio">
-        <item name="android:textColor">?android:attr/textColorPrimary</item>
+    <style name="TextAppearance.NotificationGuts.SecondaryWarning">
+        <item name="android:textColor">@color/system_warning_color</item>
+        <item name="android:textSize">12sp</item>
     </style>
 
     <style name="TextAppearance.NotificationGuts.Button">
diff --git a/packages/Keyguard/test/SampleTrustAgent/res/values/strings.xml b/packages/SystemUI/res/xml/fileprovider.xml
similarity index 77%
rename from packages/Keyguard/test/SampleTrustAgent/res/values/strings.xml
rename to packages/SystemUI/res/xml/fileprovider.xml
index 0c6b502..4aaa90f 100644
--- a/packages/Keyguard/test/SampleTrustAgent/res/values/strings.xml
+++ b/packages/SystemUI/res/xml/fileprovider.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
-  ~ Copyright (C) 2014 The Android Open Source Project
+  ~ 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.
@@ -15,6 +15,6 @@
   ~ limitations under the License
   -->
 
-<resources>
-    <string name="app_name">Sample Trust Agent</string>
-</resources>
\ No newline at end of file
+<paths xmlns:android="http://schemas.android.com/apk/res/android">
+    <cache-path name="leak" path="leak/"/>
+</paths>
\ No newline at end of file
diff --git a/packages/SystemUI/res/xml/lockscreen_settings.xml b/packages/SystemUI/res/xml/lockscreen_settings.xml
index 73e29af..1e7d266 100644
--- a/packages/SystemUI/res/xml/lockscreen_settings.xml
+++ b/packages/SystemUI/res/xml/lockscreen_settings.xml
@@ -18,42 +18,25 @@
     xmlns:sysui="http://schemas.android.com/apk/res-auto"
     android:title="@string/other">
 
-    <PreferenceCategory
-        android:key="left"
-        android:title="@string/lockscreen_left">
 
-        <SwitchPreference
-            android:key="customize"
-            android:title="@string/lockscreen_customize" />
+    <Preference
+        android:key="sysui_keyguard_left"
+        android:title="@string/lockscreen_shortcut_left"
+        android:fragment="com.android.systemui.tuner.ShortcutPicker" />
 
-        <Preference
-            android:key="shortcut"
-            android:title="@string/lockscreen_shortcut" />
+    <com.android.systemui.tuner.TunerSwitch
+        android:key="sysui_keyguard_left_unlock"
+        android:title="@string/lockscreen_unlock_left"
+        sysui:defValue="true" />
 
-        <com.android.systemui.tuner.TunerSwitch
-            android:key="sysui_keyguard_left_unlock"
-            android:title="@string/lockscreen_unlock"
-            sysui:defValue="true" />
+    <Preference
+        android:key="sysui_keyguard_right"
+        android:title="@string/lockscreen_shortcut_right" 
+        android:fragment="com.android.systemui.tuner.ShortcutPicker" />
 
-    </PreferenceCategory>
-
-    <PreferenceCategory
-        android:key="right"
-        android:title="@string/lockscreen_right">
-
-        <SwitchPreference
-            android:key="customize"
-            android:title="@string/lockscreen_customize" />
-
-        <Preference
-            android:key="shortcut"
-            android:title="@string/lockscreen_shortcut" />
-
-        <com.android.systemui.tuner.TunerSwitch
-            android:key="sysui_keyguard_right_unlock"
-            android:title="@string/lockscreen_unlock"
-            sysui:defValue="true" />
-
-    </PreferenceCategory>
+    <com.android.systemui.tuner.TunerSwitch
+        android:key="sysui_keyguard_right_unlock"
+        android:title="@string/lockscreen_unlock_right"
+        sysui:defValue="true" />
 
 </PreferenceScreen>
diff --git a/packages/SystemUI/res/xml/nav_bar_tuner.xml b/packages/SystemUI/res/xml/nav_bar_tuner.xml
index 6fa8bec..68e8fad 100644
--- a/packages/SystemUI/res/xml/nav_bar_tuner.xml
+++ b/packages/SystemUI/res/xml/nav_bar_tuner.xml
@@ -18,7 +18,7 @@
     xmlns:sysui="http://schemas.android.com/apk/res-auto"
     android:title="@string/nav_bar">
 
-    <ListPreference
+    <com.android.systemui.tuner.RadioListPreference
         android:key="layout"
         android:title="@string/nav_bar_layout"
         android:summary="%s"
@@ -26,54 +26,42 @@
         android:entries="@array/nav_bar_layouts"
         android:entryValues="@array/nav_bar_layouts_values" />
 
-    <PreferenceCategory
-        android:key="left"
-        android:title="@string/nav_bar_left">
+    <com.android.systemui.tuner.RadioListPreference
+        android:key="type_left"
+        android:title="@string/left_nav_bar_button_type"
+        android:persistent="false"
+        android:summary="%s"
+        android:entries="@array/nav_bar_buttons"
+        android:entryValues="@array/nav_bar_button_values" />
 
-        <DropDownPreference
-            android:key="type_left"
-            android:title="@string/nav_bar_button_type"
-            android:persistent="false"
-            android:summary="%s"
-            android:entries="@array/nav_bar_buttons"
-            android:entryValues="@array/nav_bar_button_values" />
+    <Preference
+        android:key="keycode_left"
+        android:persistent="false"
+        android:title="@string/left_keycode" />
 
-        <Preference
-            android:key="keycode_left"
-            android:persistent="false"
-            android:title="@string/keycode" />
+    <com.android.systemui.tuner.RadioListPreference
+        android:key="icon_left"
+        android:persistent="false"
+        android:summary="%s"
+        android:title="@string/left_icon" />
 
-        <com.android.systemui.tuner.BetterListPreference
-            android:key="icon_left"
-            android:persistent="false"
-            android:summary="%s"
-            android:title="@string/icon" />
+    <com.android.systemui.tuner.RadioListPreference
+        android:key="type_right"
+        android:title="@string/right_nav_bar_button_type"
+        android:summary="%s"
+        android:persistent="false"
+        android:entries="@array/nav_bar_buttons"
+        android:entryValues="@array/nav_bar_button_values" />
 
-    </PreferenceCategory>
+    <Preference
+        android:key="keycode_right"
+        android:persistent="false"
+        android:title="@string/right_keycode" />
 
-    <PreferenceCategory
-        android:key="right"
-        android:title="@string/nav_bar_right">
-
-        <DropDownPreference
-            android:key="type_right"
-            android:title="@string/nav_bar_button_type"
-            android:summary="%s"
-            android:persistent="false"
-            android:entries="@array/nav_bar_buttons"
-            android:entryValues="@array/nav_bar_button_values" />
-
-        <Preference
-            android:key="keycode_right"
-            android:persistent="false"
-            android:title="@string/keycode" />
-
-        <com.android.systemui.tuner.BetterListPreference
-            android:key="icon_right"
-            android:persistent="false"
-            android:summary="%s"
-            android:title="@string/icon" />
-
-    </PreferenceCategory>
+    <com.android.systemui.tuner.RadioListPreference
+        android:key="icon_right"
+        android:persistent="false"
+        android:summary="%s"
+        android:title="@string/right_icon" />
 
 </PreferenceScreen>
diff --git a/packages/SystemUI/res/xml/tuner_prefs.xml b/packages/SystemUI/res/xml/tuner_prefs.xml
index 94a7c07..85f12b5 100644
--- a/packages/SystemUI/res/xml/tuner_prefs.xml
+++ b/packages/SystemUI/res/xml/tuner_prefs.xml
@@ -121,24 +121,7 @@
 
     </PreferenceScreen>
 
-    <PreferenceScreen
-      android:key="picture_in_picture"
-      android:title="@string/picture_in_picture">
-
-        <com.android.systemui.tuner.TunerSwitch
-          android:key="pip_drag_to_dismiss"
-          android:title="@string/pip_drag_to_dismiss_title"
-          android:summary="@string/pip_drag_to_dismiss_summary"
-          sysui:defValue="false" />
-
-        <com.android.systemui.tuner.TunerSwitch
-            android:key="pip_allow_minimize"
-            android:title="@string/pip_allow_minimize_title"
-            android:summary="@string/pip_allow_minimize_summary"
-            sysui:defValue="true" />
-
-    </PreferenceScreen>
-
+    <!--
     <PreferenceScreen
       android:key="doze"
       android:title="@string/tuner_doze">
@@ -148,7 +131,13 @@
           android:title="@string/tuner_doze_always_on"
           sysui:defValue="false" />
 
+        <com.android.systemui.tuner.TunerSwitch
+          android:key="doze_sensors_wake_up_fully"
+          android:title="@string/tuner_doze_sensors_wake_up_fully"
+          sysui:defValue="false" />
+
     </PreferenceScreen>
+    -->
 
     <Preference
         android:key="nav_bar"
@@ -157,15 +146,10 @@
 
     <Preference
             android:key="lockscreen"
-            android:title="@string/accessibility_desc_lock_screen"
+            android:title="@string/tuner_lock_screen"
             android:fragment="com.android.systemui.tuner.LockscreenFragment" />
 
     <Preference
-            android:key="other"
-            android:title="@string/other"
-            android:fragment="com.android.systemui.tuner.OtherPrefs" />
-
-    <Preference
             android:key="plugins"
             android:title="@string/plugins"
             android:fragment="com.android.systemui.tuner.PluginFragment" />
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 99%
rename from packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
rename to packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
index 80d4a26..1f58d4c 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -595,6 +595,10 @@
         }
     }
 
+    public boolean isScreenOn() {
+        return mScreenOn;
+    }
+
     static class DisplayClientState {
         public int clientGeneration;
         public boolean clearing;
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/BatteryMeterView.java b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
index b30b596..bda4c95 100644
--- a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
+++ b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
@@ -16,22 +16,56 @@
 package com.android.systemui;
 
 import android.content.Context;
+import android.content.res.Configuration;
+import android.content.res.Resources;
 import android.content.res.TypedArray;
+import android.graphics.Rect;
 import android.util.ArraySet;
 import android.util.AttributeSet;
+import android.util.TypedValue;
+import android.database.ContentObserver;
+import android.net.Uri;
+import android.os.Handler;
+import android.provider.Settings;
+import android.util.ArraySet;
+import android.util.AttributeSet;
+import android.view.Gravity;
+import android.view.LayoutInflater;
 import android.view.View;
+import android.view.ViewGroup;
 import android.widget.ImageView;
+import android.widget.LinearLayout;
 
+import android.widget.LinearLayout;
+import android.widget.TextView;
+import com.android.settingslib.graph.BatteryMeterDrawableBase;
 import com.android.systemui.statusbar.phone.StatusBarIconController;
 import com.android.systemui.statusbar.policy.BatteryController;
+import com.android.systemui.statusbar.policy.BatteryController.BatteryStateChangeCallback;
+import com.android.systemui.statusbar.policy.ConfigurationController;
+import com.android.systemui.statusbar.policy.ConfigurationController.ConfigurationListener;
+import com.android.systemui.statusbar.policy.DarkIconDispatcher;
+import com.android.systemui.statusbar.policy.DarkIconDispatcher.DarkReceiver;
 import com.android.systemui.tuner.TunerService;
+import com.android.systemui.tuner.TunerService.Tunable;
 
-public class BatteryMeterView extends ImageView implements
-        BatteryController.BatteryStateChangeCallback, TunerService.Tunable {
+import java.text.NumberFormat;
 
-    private final BatteryMeterDrawable mDrawable;
+public class BatteryMeterView extends LinearLayout implements
+        BatteryStateChangeCallback, Tunable, DarkReceiver, ConfigurationListener {
+
+    public static final String SHOW_PERCENT_SETTING = "status_bar_show_battery_percent";
+
+    private final BatteryMeterDrawableBase mDrawable;
     private final String mSlotBattery;
+    private final ImageView mBatteryIconView;
+    private TextView mBatteryPercentView;
+
     private BatteryController mBatteryController;
+    private SettingObserver mSettingObserver;
+    private int mTextColor;
+    private int mLevel;
+    private boolean mForceShowPercent;
 
     public BatteryMeterView(Context context) {
         this(context, null, 0);
@@ -44,16 +78,40 @@
     public BatteryMeterView(Context context, AttributeSet attrs, int defStyle) {
         super(context, attrs, defStyle);
 
+        setOrientation(LinearLayout.HORIZONTAL);
+        setGravity(Gravity.CENTER_VERTICAL | Gravity.START);
+
         TypedArray atts = context.obtainStyledAttributes(attrs, R.styleable.BatteryMeterView,
                 defStyle, 0);
         final int frameColor = atts.getColor(R.styleable.BatteryMeterView_frameColor,
                 context.getColor(R.color.batterymeter_frame_color));
-        mDrawable = new BatteryMeterDrawable(context, frameColor);
+        mDrawable = new BatteryMeterDrawableBase(context, frameColor);
         atts.recycle();
 
+        mSettingObserver = new SettingObserver(new Handler(context.getMainLooper()));
+
         mSlotBattery = context.getString(
                 com.android.internal.R.string.status_bar_battery);
-        setImageDrawable(mDrawable);
+        mBatteryIconView = new ImageView(context);
+        mBatteryIconView.setImageDrawable(mDrawable);
+        final MarginLayoutParams mlp = new MarginLayoutParams(
+                getResources().getDimensionPixelSize(R.dimen.status_bar_battery_icon_width),
+                getResources().getDimensionPixelSize(R.dimen.status_bar_battery_icon_height));
+        mlp.setMargins(0, 0, 0,
+                getResources().getDimensionPixelOffset(R.dimen.battery_margin_bottom));
+        addView(mBatteryIconView, mlp);
+
+        updateShowPercent();
+    }
+
+    public void forceShowPercent() {
+        mForceShowPercent = true;
+        updateShowPercent();
+    }
+
+    // StatusBarIconController reaches in here and adjusts the layout parameters of the icon
+    public ImageView getBatteryIconView() {
+        return mBatteryIconView;
     }
 
     @Override
@@ -73,22 +131,29 @@
     public void onAttachedToWindow() {
         super.onAttachedToWindow();
         mBatteryController = Dependency.get(BatteryController.class);
-        mDrawable.setBatteryController(mBatteryController);
         mBatteryController.addCallback(this);
-        mDrawable.startListening();
-        TunerService.get(getContext()).addTunable(this, StatusBarIconController.ICON_BLACKLIST);
+        getContext().getContentResolver().registerContentObserver(
+                Settings.System.getUriFor(SHOW_PERCENT_SETTING), false, mSettingObserver);
+        updateShowPercent();
+        Dependency.get(TunerService.class).addTunable(this, StatusBarIconController.ICON_BLACKLIST);
+        Dependency.get(ConfigurationController.class).addCallback(this);
     }
 
     @Override
     public void onDetachedFromWindow() {
         super.onDetachedFromWindow();
         mBatteryController.removeCallback(this);
-        mDrawable.stopListening();
-        TunerService.get(getContext()).removeTunable(this);
+        getContext().getContentResolver().unregisterContentObserver(mSettingObserver);
+        Dependency.get(TunerService.class).removeTunable(this);
+        Dependency.get(ConfigurationController.class).removeCallback(this);
     }
 
     @Override
     public void onBatteryLevelChanged(int level, boolean pluggedIn, boolean charging) {
+        mDrawable.setBatteryLevel(level);
+        mDrawable.setPluggedIn(pluggedIn);
+        mLevel = level;
+        updatePercentText();
         setContentDescription(
                 getContext().getString(charging ? R.string.accessibility_battery_level_charging
                         : R.string.accessibility_battery_level, level));
@@ -96,14 +161,94 @@
 
     @Override
     public void onPowerSaveChanged(boolean isPowerSave) {
-
+        mDrawable.setPowerSave(isPowerSave);
     }
 
-    public void setDarkIntensity(float f) {
-        mDrawable.setDarkIntensity(f);
+    private TextView loadPercentView() {
+        return (TextView) LayoutInflater.from(getContext())
+                .inflate(R.layout.battery_percentage_view, null);
+    }
+
+    private void updatePercentText() {
+        if (mBatteryPercentView != null) {
+            mBatteryPercentView.setText(
+                    NumberFormat.getPercentInstance().format(mLevel/100f));
+        }
+    }
+
+    private void updateShowPercent() {
+        final boolean showing = mBatteryPercentView != null;
+        if (0 != Settings.System.getInt(getContext().getContentResolver(),
+                BatteryMeterView.SHOW_PERCENT_SETTING, 0) || mForceShowPercent) {
+            if (!showing) {
+                mBatteryPercentView = loadPercentView();
+                if (mTextColor != 0) mBatteryPercentView.setTextColor(mTextColor);
+                updatePercentText();
+                addView(mBatteryPercentView,
+                        new ViewGroup.LayoutParams(
+                                LayoutParams.WRAP_CONTENT,
+                                LayoutParams.MATCH_PARENT));
+            }
+        } else {
+            if (showing) {
+                removeView(mBatteryPercentView);
+                mBatteryPercentView = null;
+            }
+        }
+    }
+
+    @Override
+    public void onDensityOrFontScaleChanged() {
+        scaleBatteryMeterViews();
+    }
+
+    /**
+     * Looks up the scale factor for status bar icons and scales the battery view by that amount.
+     */
+    private void scaleBatteryMeterViews() {
+        Resources res = getContext().getResources();
+        TypedValue typedValue = new TypedValue();
+
+        res.getValue(R.dimen.status_bar_icon_scale_factor, typedValue, true);
+        float iconScaleFactor = typedValue.getFloat();
+
+        int batteryHeight = res.getDimensionPixelSize(R.dimen.status_bar_battery_icon_height);
+        int batteryWidth = res.getDimensionPixelSize(R.dimen.status_bar_battery_icon_width);
+        int marginBottom = res.getDimensionPixelSize(R.dimen.battery_margin_bottom);
+
+        LinearLayout.LayoutParams scaledLayoutParams = new LinearLayout.LayoutParams(
+                (int) (batteryWidth * iconScaleFactor), (int) (batteryHeight * iconScaleFactor));
+        scaledLayoutParams.setMargins(0, 0, 0, marginBottom);
+
+        mBatteryIconView.setLayoutParams(scaledLayoutParams);
+    }
+
+    @Override
+    public void onDarkChanged(Rect area, float darkIntensity, int tint) {
+        mDrawable.setDarkIntensity(DarkIconDispatcher.isInArea(area, this) ? darkIntensity : 0);
+        setTextColor(DarkIconDispatcher.getTint(area, this, tint));
+    }
+
+    public void setTextColor(int color) {
+        mTextColor = color;
+        if (mBatteryPercentView != null) {
+            mBatteryPercentView.setTextColor(color);
+        }
     }
 
     public void setRawColors(int fgColor, int bgColor) {
         mDrawable.setColors(fgColor, bgColor);
     }
+
+    private final class SettingObserver extends ContentObserver {
+        public SettingObserver(Handler handler) {
+            super(handler);
+        }
+
+        @Override
+        public void onChange(boolean selfChange, Uri uri) {
+            super.onChange(selfChange, uri);
+            updateShowPercent();
+        }
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/Dependency.java b/packages/SystemUI/src/com/android/systemui/Dependency.java
index 135b129..f1e7d53 100644
--- a/packages/SystemUI/src/com/android/systemui/Dependency.java
+++ b/packages/SystemUI/src/com/android/systemui/Dependency.java
@@ -14,6 +14,7 @@
 
 package com.android.systemui;
 
+import android.content.Context;
 import android.content.res.Configuration;
 import android.os.Handler;
 import android.os.HandlerThread;
@@ -22,9 +23,18 @@
 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.fragments.FragmentHostManager;
+import com.android.systemui.fragments.FragmentService;
+import com.android.systemui.plugins.PluginManager;
+import com.android.systemui.statusbar.phone.ConfigurationControllerImpl;
+import com.android.systemui.statusbar.phone.DarkIconDispatcherImpl;
 import com.android.systemui.statusbar.phone.ManagedProfileController;
 import com.android.systemui.statusbar.phone.ManagedProfileControllerImpl;
+import com.android.systemui.statusbar.phone.StatusBarWindowManager;
+import com.android.systemui.statusbar.phone.StatusBarIconController;
+import com.android.systemui.statusbar.phone.StatusBarIconControllerImpl;
 import com.android.systemui.statusbar.policy.AccessibilityController;
 import com.android.systemui.statusbar.policy.BatteryController;
 import com.android.systemui.statusbar.policy.BatteryControllerImpl;
@@ -32,6 +42,8 @@
 import com.android.systemui.statusbar.policy.BluetoothControllerImpl;
 import com.android.systemui.statusbar.policy.CastController;
 import com.android.systemui.statusbar.policy.CastControllerImpl;
+import com.android.systemui.statusbar.policy.ConfigurationController;
+import com.android.systemui.statusbar.policy.DarkIconDispatcher;
 import com.android.systemui.statusbar.policy.DataSaverController;
 import com.android.systemui.statusbar.policy.DeviceProvisionedController;
 import com.android.systemui.statusbar.policy.DeviceProvisionedControllerImpl;
@@ -56,9 +68,15 @@
 import com.android.systemui.statusbar.policy.UserSwitcherController;
 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.GarbageMonitor;
+import com.android.systemui.util.leak.LeakDetector;
+import com.android.systemui.util.leak.LeakReporter;
 
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
+import java.util.HashMap;
+import java.util.function.Consumer;
 
 /**
  * Class to handle ugly dependencies throughout sysui until we determine the
@@ -80,18 +98,25 @@
     /**
      * 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<>();
+    /**
+     * An email address to send memory leak reports to by default.
+     */
+    public static final DependencyKey<String> LEAK_REPORT_EMAIL
+            = new DependencyKey<>("leak_report_email");
+
+    private final ArrayMap<Object, Object> mDependencies = new ArrayMap<>();
+    private final ArrayMap<Object, DependencyProvider> mProviders = new ArrayMap<>();
 
     @Override
     public void start() {
@@ -110,69 +135,104 @@
             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(AssistManager.class.getName(), () ->
+        mProviders.put(PluginManager.class, () ->
+                new PluginManager(mContext));
+
+        mProviders.put(AssistManager.class, () ->
                 new AssistManager(getDependency(DeviceProvisionedController.class), mContext));
 
-        mProviders.put(SecurityController.class.getName(), () ->
+        mProviders.put(SecurityController.class, () ->
                 new SecurityControllerImpl(mContext));
 
+        mProviders.put(LeakDetector.class, LeakDetector::create);
+
+        mProviders.put(LEAK_REPORT_EMAIL, () -> null);
+
+        mProviders.put(LeakReporter.class, () -> new LeakReporter(
+                mContext,
+                getDependency(LeakDetector.class),
+                getDependency(LEAK_REPORT_EMAIL)));
+
+        mProviders.put(GarbageMonitor.class, () -> new GarbageMonitor(
+                getDependency(BG_LOOPER),
+                getDependency(LeakDetector.class),
+                getDependency(LeakReporter.class)));
+
+        mProviders.put(TunerService.class, () ->
+                new TunerService(mContext));
+
+        mProviders.put(StatusBarWindowManager.class, () ->
+                new StatusBarWindowManager(mContext));
+
+        mProviders.put(DarkIconDispatcher.class, () ->
+                new DarkIconDispatcherImpl(mContext));
+
+        mProviders.put(ConfigurationController.class, () ->
+                new ConfigurationControllerImpl(mContext));
+
+        mProviders.put(StatusBarIconController.class, () ->
+                new StatusBarIconControllerImpl(mContext));
+
+        mProviders.put(FragmentService.class, () ->
+                new FragmentService(mContext));
+
         // Put all dependencies above here so the factory can override them if it wants.
         SystemUIFactory.getInstance().injectDependencies(mProviders, mContext);
     }
@@ -193,20 +253,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);
@@ -220,11 +288,60 @@
         T createDependency();
     }
 
-    public static <T> T get(Class<T> cls) {
-        return sDependency.getDependency(cls.getName());
+    private <T> void destroyDependency(Class<T> cls, Consumer<T> destroy) {
+        T dep = (T) mDependencies.remove(cls);
+        if (dep != null && destroy != null) {
+            destroy.accept(dep);
+        }
     }
 
-    public static <T> T get(String cls) {
+    /**
+     * Used in separate processes (like tuner settings) to init the dependencies.
+     */
+    public static void initDependencies(Context context) {
+        if (sDependency != null) return;
+        Dependency d = new Dependency();
+        d.mContext = context;
+        d.mComponents = new HashMap<>();
+        d.start();
+    }
+
+    /**
+     * Used in separate process teardown to ensure the context isn't leaked.
+     *
+     * TODO: Remove once PreferenceFragment doesn't reference getActivity()
+     * anymore and these context hacks are no longer needed.
+     */
+    public static void clearDependencies() {
+        sDependency = null;
+    }
+
+    /**
+     * Checks to see if a dependency is instantiated, if it is it removes it from
+     * the cache and calls the destroy callback.
+     */
+    public static <T> void destroy(Class<T> cls, Consumer<T> destroy) {
+        sDependency.destroyDependency(cls, destroy);
+    }
+
+    public static <T> T get(Class<T> cls) {
         return sDependency.getDependency(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/SystemUI/src/com/android/systemui/EventLogConstants.java b/packages/SystemUI/src/com/android/systemui/EventLogConstants.java
index 9238928..def3c40 100644
--- a/packages/SystemUI/src/com/android/systemui/EventLogConstants.java
+++ b/packages/SystemUI/src/com/android/systemui/EventLogConstants.java
@@ -16,30 +16,46 @@
 
 package com.android.systemui;
 
+import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
+
 /**
  * Constants to be passed as sysui_* eventlog parameters.
  */
 public class EventLogConstants {
     /** The user swiped up on the lockscreen, unlocking the device. */
-    public static final int SYSUI_LOCKSCREEN_GESTURE_SWIPE_UP_UNLOCK = 1;
+    private static final int SYSUI_LOCKSCREEN_GESTURE_SWIPE_UP_UNLOCK = 1;
     /** The user swiped down on the lockscreen, going to the full shade. */
-    public static final int SYSUI_LOCKSCREEN_GESTURE_SWIPE_DOWN_FULL_SHADE = 2;
+    private static final int SYSUI_LOCKSCREEN_GESTURE_SWIPE_DOWN_FULL_SHADE = 2;
     /** The user tapped in an empty area, causing the unlock hint to be shown. */
-    public static final int SYSUI_LOCKSCREEN_GESTURE_TAP_UNLOCK_HINT = 3;
+    private static final int SYSUI_LOCKSCREEN_GESTURE_TAP_UNLOCK_HINT = 3;
     /** The user swiped inward on the camera icon, launching the camera. */
-    public static final int SYSUI_LOCKSCREEN_GESTURE_SWIPE_CAMERA = 4;
+    private static final int SYSUI_LOCKSCREEN_GESTURE_SWIPE_CAMERA = 4;
     /** The user swiped inward on the dialer icon, launching the dialer. */
-    public static final int SYSUI_LOCKSCREEN_GESTURE_SWIPE_DIALER = 5;
+    private static final int SYSUI_LOCKSCREEN_GESTURE_SWIPE_DIALER = 5;
     /** The user tapped the lock, locking the device. */
-    public static final int SYSUI_LOCKSCREEN_GESTURE_TAP_LOCK = 6;
+    private static final int SYSUI_LOCKSCREEN_GESTURE_TAP_LOCK = 6;
     /** The user tapped a notification, needs to tap again to launch. */
-    public static final int SYSUI_LOCKSCREEN_GESTURE_TAP_NOTIFICATION_ACTIVATE = 7;
+    private static final int SYSUI_LOCKSCREEN_GESTURE_TAP_NOTIFICATION_ACTIVATE = 7;
     /** The user swiped down to open quick settings, from keyguard. */
-    public static final int SYSUI_LOCKSCREEN_GESTURE_SWIPE_DOWN_QS = 8;
+    private static final int SYSUI_LOCKSCREEN_GESTURE_SWIPE_DOWN_QS = 8;
     /** The user swiped down to open quick settings, from shade. */
-    public static final int SYSUI_SHADE_GESTURE_SWIPE_DOWN_QS = 9;
+    private static final int SYSUI_SHADE_GESTURE_SWIPE_DOWN_QS = 9;
     /** The user tapped on the status bar to open quick settings, from shade. */
-    public static final int SYSUI_TAP_TO_OPEN_QS = 10;
+    private static final int SYSUI_TAP_TO_OPEN_QS = 10;
+
+    public static final int[] METRICS_GESTURE_TYPE_MAP = {
+            MetricsEvent.VIEW_UNKNOWN,         // there is no type 0
+            MetricsEvent.ACTION_LS_UNLOCK,     // SYSUI_LOCKSCREEN_GESTURE_SWIPE_UP_UNLOCK
+            MetricsEvent.ACTION_LS_SHADE,      // SYSUI_LOCKSCREEN_GESTURE_SWIPE_DOWN_FULL_SHADE
+            MetricsEvent.ACTION_LS_HINT,       // SYSUI_LOCKSCREEN_GESTURE_TAP_UNLOCK_HINT
+            MetricsEvent.ACTION_LS_CAMERA,     // SYSUI_LOCKSCREEN_GESTURE_SWIPE_CAMERA
+            MetricsEvent.ACTION_LS_DIALER,     // SYSUI_LOCKSCREEN_GESTURE_SWIPE_DIALER
+            MetricsEvent.ACTION_LS_LOCK,       // SYSUI_LOCKSCREEN_GESTURE_TAP_LOCK
+            MetricsEvent.ACTION_LS_NOTE,       // SYSUI_LOCKSCREEN_GESTURE_TAP_NOTIFICATION_ACTIVATE
+            MetricsEvent.ACTION_LS_QS,         // SYSUI_LOCKSCREEN_GESTURE_SWIPE_DOWN_QS
+            MetricsEvent.ACTION_SHADE_QS_PULL, // SYSUI_SHADE_GESTURE_SWIPE_DOWN_QS
+            MetricsEvent.ACTION_SHADE_QS_TAP   // SYSUI_TAP_TO_OPEN_QS
+    };
 
     /** Secondary user tries binding to the system sysui service */
     public static final int SYSUI_RECENTS_CONNECTION_USER_BIND_SERVICE = 1;
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/PluginInflateContainer.java b/packages/SystemUI/src/com/android/systemui/PluginInflateContainer.java
index efddf20..ddd4833 100644
--- a/packages/SystemUI/src/com/android/systemui/PluginInflateContainer.java
+++ b/packages/SystemUI/src/com/android/systemui/PluginInflateContainer.java
@@ -53,8 +53,7 @@
 
     private static final String TAG = "PluginInflateContainer";
 
-    private String mAction;
-    private int mVersion;
+    private Class<?> mClass;
     private View mPluginView;
 
     public PluginInflateContainer(Context context, @Nullable AttributeSet attrs) {
@@ -62,29 +61,26 @@
         TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.PluginInflateContainer);
         String viewType = a.getString(R.styleable.PluginInflateContainer_viewType);
         try {
-            Class c = Class.forName(viewType);
-            mAction = (String) c.getDeclaredField("ACTION").get(null);
-            mVersion = (int) c.getDeclaredField("VERSION").get(null);
+            mClass = Class.forName(viewType);
         } catch (Exception e) {
             Log.d(TAG, "Problem getting class info " + viewType, e);
-            mAction = null;
-            mVersion = 0;
+            mClass = null;
         }
     }
 
     @Override
     protected void onAttachedToWindow() {
         super.onAttachedToWindow();
-        if (mAction != null) {
-            PluginManager.getInstance(getContext()).addPluginListener(mAction, this, mVersion);
+        if (mClass != null) {
+            Dependency.get(PluginManager.class).addPluginListener(this, mClass);
         }
     }
 
     @Override
     protected void onDetachedFromWindow() {
         super.onDetachedFromWindow();
-        if (mAction != null) {
-            PluginManager.getInstance(getContext()).removePluginListener(this);
+        if (mClass != null) {
+            Dependency.get(PluginManager.class).removePluginListener(this);
         }
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/Prefs.java b/packages/SystemUI/src/com/android/systemui/Prefs.java
index 19ae295..b9ae585 100644
--- a/packages/SystemUI/src/com/android/systemui/Prefs.java
+++ b/packages/SystemUI/src/com/android/systemui/Prefs.java
@@ -49,6 +49,7 @@
         Key.QS_WORK_ADDED,
     })
     public @interface Key {
+        @Deprecated
         String OVERVIEW_LAST_STACK_TASK_ACTIVE_TIME = "OverviewLastStackTaskActiveTime";
         String DEBUG_MODE_ENABLED = "debugModeEnabled";
         String HOTSPOT_TILE_LAST_USED = "HotspotTileLastUsed";
diff --git a/packages/SystemUI/src/com/android/systemui/RecentsComponent.java b/packages/SystemUI/src/com/android/systemui/RecentsComponent.java
index 94b2fdb..9b74cd6 100644
--- a/packages/SystemUI/src/com/android/systemui/RecentsComponent.java
+++ b/packages/SystemUI/src/com/android/systemui/RecentsComponent.java
@@ -21,11 +21,10 @@
 import android.view.View;
 
 public interface RecentsComponent {
-    void showRecents(boolean triggeredFromAltTab, boolean fromHome);
-    void hideRecents(boolean triggeredFromAltTab, boolean triggeredFromHomeKey);
+    void showRecentApps(boolean triggeredFromAltTab, boolean fromHome);
+    void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey);
     void toggleRecents(Display display);
     void preloadRecents();
-    void cancelPreloadingRecents();
     void showNextAffiliatedTask();
     void showPrevAffiliatedTask();
 
diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
index 9515585..be69867 100644
--- a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
+++ b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
@@ -27,6 +27,7 @@
 import android.os.Process;
 import android.os.SystemProperties;
 import android.os.UserHandle;
+import android.util.ArraySet;
 import android.util.Log;
 
 import com.android.systemui.fragments.FragmentService;
@@ -35,6 +36,7 @@
 import com.android.systemui.media.RingtonePlayer;
 import com.android.systemui.pip.PipUI;
 import com.android.systemui.plugins.OverlayPlugin;
+import com.android.systemui.plugins.Plugin;
 import com.android.systemui.plugins.PluginListener;
 import com.android.systemui.plugins.PluginManager;
 import com.android.systemui.power.PowerUI;
@@ -43,9 +45,11 @@
 import com.android.systemui.stackdivider.Divider;
 import com.android.systemui.statusbar.CommandQueue;
 import com.android.systemui.statusbar.phone.StatusBar;
+import com.android.systemui.statusbar.phone.StatusBarWindowManager;
 import com.android.systemui.tuner.TunerService;
 import com.android.systemui.usb.StorageNotification;
 import com.android.systemui.util.NotificationChannels;
+import com.android.systemui.util.leak.GarbageMonitor;
 import com.android.systemui.volume.VolumeUI;
 
 import java.util.HashMap;
@@ -64,8 +68,6 @@
      */
     private final Class<?>[] SERVICES = new Class[] {
             Dependency.class,
-            FragmentService.class,
-            TunerService.class,
             NotificationChannels.class,
             CommandQueue.CommandQueueStart.class,
             KeyguardViewMediator.class,
@@ -80,6 +82,7 @@
             PipUI.class,
             ShortcutKeyDispatcher.class,
             VendorServices.class,
+            GarbageMonitor.Service.class,
             LatencyTester.class,
     };
 
@@ -88,6 +91,7 @@
      * above.
      */
     private final Class<?>[] SERVICES_PER_USER = new Class[] {
+            Dependency.class,
             Recents.class,
             PipUI.class
     };
@@ -149,7 +153,6 @@
      * Makes sure that all the SystemUI services are running. If they are already running, this is a
      * no-op. This is needed to conditinally start all the services, as we only need to have it in
      * the main process.
-     *
      * <p>This method must only be called from the main thread.</p>
      */
     public void startServicesIfNeeded() {
@@ -160,7 +163,6 @@
      * Ensures that all the Secondary user SystemUI services are running. If they are already
      * running, this is a no-op. This is needed to conditinally start all the services, as we only
      * need to have it in the main process.
-     *
      * <p>This method must only be called from the main thread.</p>
      */
     void startSecondaryUserServicesIfNeeded() {
@@ -184,7 +186,7 @@
         Log.v(TAG, "Starting SystemUI services for user " +
                 Process.myUserHandle().getIdentifier() + ".");
         final int N = services.length;
-        for (int i=0; i<N; i++) {
+        for (int i = 0; i < N; i++) {
             Class<?> cl = services[i];
             if (DEBUG) Log.d(TAG, "loading: " + cl);
             try {
@@ -205,17 +207,36 @@
                 mServices[i].onBootCompleted();
             }
         }
-        PluginManager.getInstance(this).addPluginListener(OverlayPlugin.ACTION,
+        Dependency.get(PluginManager.class).addPluginListener(
                 new PluginListener<OverlayPlugin>() {
-            @Override
-            public void onPluginConnected(OverlayPlugin plugin, Context pluginContext) {
-                StatusBar statusBar = getComponent(StatusBar.class);
-                if (statusBar != null) {
-                    plugin.setup(statusBar.getStatusBarWindow(),
-                            statusBar.getNavigationBarView());
-                }
-            }
-        }, OverlayPlugin.VERSION, true /* Allow multiple plugins */);
+                    private ArraySet<OverlayPlugin> mOverlays;
+
+                    @Override
+                    public void onPluginConnected(OverlayPlugin plugin, Context pluginContext) {
+                        StatusBar statusBar = getComponent(StatusBar.class);
+                        if (statusBar != null) {
+                            plugin.setup(statusBar.getStatusBarWindow(),
+                                    statusBar.getNavigationBarView());
+                        }
+                        // Lazy init.
+                        if (mOverlays == null) mOverlays = new ArraySet<>();
+                        if (plugin.holdStatusBarOpen()) {
+                            mOverlays.add(plugin);
+                            Dependency.get(StatusBarWindowManager.class).setStateListener(b ->
+                                    mOverlays.forEach(o -> o.setCollapseDesired(b)));
+                            Dependency.get(StatusBarWindowManager.class).setForcePluginOpen(
+                                    mOverlays.size() != 0);
+
+                        }
+                    }
+
+                    @Override
+                    public void onPluginDisconnected(OverlayPlugin plugin) {
+                        mOverlays.remove(plugin);
+                        Dependency.get(StatusBarWindowManager.class).setForcePluginOpen(
+                                mOverlays.size() != 0);
+                    }
+                }, OverlayPlugin.class, true /* Allow multiple plugins */);
 
         mServicesStarted = true;
     }
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/doze/DozeFactory.java b/packages/SystemUI/src/com/android/systemui/doze/DozeFactory.java
index aa22618..b3a0eb7 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeFactory.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeFactory.java
@@ -16,6 +16,7 @@
 
 package com.android.systemui.doze;
 
+import android.app.AlarmManager;
 import android.app.Application;
 import android.app.PendingIntent;
 import android.content.Context;
@@ -25,10 +26,7 @@
 import android.os.SystemClock;
 
 import com.android.internal.hardware.AmbientDisplayConfiguration;
-import com.android.systemui.SystemUI;
 import com.android.systemui.SystemUIApplication;
-import com.android.systemui.plugins.PluginListener;
-import com.android.systemui.plugins.PluginManager;
 import com.android.systemui.plugins.doze.DozeProvider;
 import com.android.systemui.statusbar.phone.DozeParameters;
 
@@ -45,6 +43,7 @@
         Context context = dozeService;
         SensorManager sensorManager = context.getSystemService(SensorManager.class);
         PowerManager powerManager = context.getSystemService(PowerManager.class);
+        AlarmManager alarmManager = context.getSystemService(AlarmManager.class);
 
         DozeHost host = getHost(dozeService);
         AmbientDisplayConfiguration config = new AmbientDisplayConfiguration(context);
@@ -57,7 +56,7 @@
         machine.setParts(new DozeMachine.Part[]{
                 createDozeTriggers(context, sensorManager, host, config, params, handler, wakeLock,
                         machine),
-                createDozeUi(context, host, wakeLock, machine),
+                createDozeUi(context, host, wakeLock, machine, handler, alarmManager),
         });
 
         return machine;
@@ -72,7 +71,7 @@
     }
 
     private DozeMachine.Part createDozeUi(Context context, DozeHost host, WakeLock wakeLock,
-            DozeMachine machine) {
+            DozeMachine machine, Handler handler, AlarmManager alarmManager) {
         if (mDozePlugin != null) {
             DozeProvider.DozeUi dozeUi = mDozePlugin.provideDozeUi(context,
                     pluginMachine(context, machine, host),
@@ -82,7 +81,7 @@
                         pluginState(newState));
             };
         } else {
-            return new DozeUi(context, machine, wakeLock, host);
+            return new DozeUi(context, alarmManager, machine, wakeLock, host, handler);
         }
     }
 
@@ -92,8 +91,7 @@
             @Override
             public void requestState(DozeProvider.DozeState state) {
                 if (state == DozeProvider.DozeState.WAKE_UP) {
-                    PowerManager pm = context.getSystemService(PowerManager.class);
-                    pm.wakeUp(SystemClock.uptimeMillis(), "com.android.systemui:NODOZE");
+                    machine.wakeUp();
                     return;
                 }
                 machine.requestState(implState(state));
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeHost.java b/packages/SystemUI/src/com/android/systemui/doze/DozeHost.java
index 00d2298..f3fb1ef 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeHost.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeHost.java
@@ -30,15 +30,12 @@
     void stopDozing();
     void dozeTimeTick();
     boolean isPowerSaveActive();
-    boolean isNotificationLightOn();
     boolean isPulsingBlocked();
 
     void startPendingIntentDismissingKeyguard(PendingIntent intent);
 
     interface Callback {
-        default void onNewNotifications() {}
         default void onNotificationHeadsUp() {}
-        default void onNotificationLight(boolean on) {}
         default void onPowerSaveChanged(boolean active) {}
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeMachine.java b/packages/SystemUI/src/com/android/systemui/doze/DozeMachine.java
index 6a868d5..c9eb790 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeMachine.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeMachine.java
@@ -158,6 +158,11 @@
         return mState;
     }
 
+    /** Requests the PowerManager to wake up now. */
+    public void wakeUp() {
+        mDozeService.requestWakeUp();
+    }
+
     private boolean isExecutingTransition() {
         return !mQueuedRequests.isEmpty();
     }
@@ -300,5 +305,8 @@
 
         /** Request a display state. See {@link android.view.Display#STATE_DOZE}. */
         void setDozeScreenState(int state);
+
+        /** Request waking up. */
+        void requestWakeUp();
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeService.java b/packages/SystemUI/src/com/android/systemui/doze/DozeService.java
index 828728f..e55a597 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeService.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeService.java
@@ -16,9 +16,12 @@
 
 package com.android.systemui.doze;
 
+import android.os.PowerManager;
+import android.os.SystemClock;
 import android.service.dreams.DreamService;
 import android.util.Log;
 
+import com.android.systemui.Dependency;
 import com.android.systemui.plugins.Plugin;
 import com.android.systemui.plugins.PluginManager;
 import com.android.systemui.plugins.doze.DozeProvider;
@@ -47,8 +50,8 @@
             return;
         }
 
-        DozeProvider provider = PluginManager.getInstance(this)
-                .getOneShotPlugin(DozeProvider.ACTION, DozeProvider.VERSION);
+        DozeProvider provider = Dependency.get(PluginManager.class)
+                .getOneShotPlugin(DozeProvider.class);
         mDozeMachine = new DozeFactory(provider).assembleMachine(this);
     }
 
@@ -71,4 +74,10 @@
             mDozeMachine.dump(pw);
         }
     }
+
+    @Override
+    public void requestWakeUp() {
+        PowerManager pm = getSystemService(PowerManager.class);
+        pm.wakeUp(SystemClock.uptimeMillis(), "com.android.systemui:NODOZE");
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java b/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java
index db5a392..b5c7dd3 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java
@@ -97,7 +97,11 @@
     }
 
     private void onSensor(int pulseReason, boolean sensorPerformedProxCheck) {
-        requestPulse(pulseReason, sensorPerformedProxCheck);
+        if (mDozeParameters.getSensorsWakeUpFully()) {
+            mMachine.wakeUp();
+        } else {
+            requestPulse(pulseReason, sensorPerformedProxCheck);
+        }
 
         if (pulseReason == DozeLog.PULSE_REASON_SENSOR_PICKUP) {
             final long timeSinceNotification =
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeUi.java b/packages/SystemUI/src/com/android/systemui/doze/DozeUi.java
index 95e49ce..76e0283 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeUi.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeUi.java
@@ -16,7 +16,13 @@
 
 package com.android.systemui.doze;
 
+import android.app.AlarmManager;
 import android.content.Context;
+import android.os.Handler;
+import android.os.SystemClock;
+
+import java.util.Calendar;
+import java.util.GregorianCalendar;
 
 /**
  * The policy controlling doze.
@@ -24,16 +30,25 @@
 public class DozeUi implements DozeMachine.Part {
 
     private final Context mContext;
+    private final AlarmManager mAlarmManager;
     private final DozeHost mHost;
-    private DozeFactory.WakeLock mWakeLock;
-    private DozeMachine mMachine;
+    private final Handler mHandler;
+    private final DozeFactory.WakeLock mWakeLock;
+    private final DozeMachine mMachine;
+    private final AlarmManager.OnAlarmListener mTimeTick;
 
-    public DozeUi(Context context, DozeMachine machine, DozeFactory.WakeLock wakeLock,
-            DozeHost host) {
+    private boolean mTimeTickScheduled = false;
+
+    public DozeUi(Context context, AlarmManager alarmManager, DozeMachine machine,
+            DozeFactory.WakeLock wakeLock, DozeHost host, Handler handler) {
         mContext = context;
+        mAlarmManager = alarmManager;
         mMachine = machine;
         mWakeLock = wakeLock;
         mHost = host;
+        mHandler = handler;
+
+        mTimeTick = this::onTimeTick;
     }
 
     private void pulseWhileDozing(int reason) {
@@ -54,6 +69,12 @@
     @Override
     public void transitionTo(DozeMachine.State oldState, DozeMachine.State newState) {
         switch (newState) {
+            case DOZE_AOD:
+                scheduleTimeTick();
+                break;
+            case DOZE:
+                unscheduleTimeTick();
+                break;
             case DOZE_REQUEST_PULSE:
                 pulseWhileDozing(DozeLog.PULSE_REASON_NOTIFICATION /* TODO */);
                 break;
@@ -62,7 +83,52 @@
                 break;
             case FINISH:
                 mHost.stopDozing();
+                unscheduleTimeTick();
                 break;
         }
     }
+
+    private void scheduleTimeTick() {
+        if (mTimeTickScheduled) {
+            return;
+        }
+
+        long delta = roundToNextMinute(System.currentTimeMillis()) - System.currentTimeMillis();
+        mAlarmManager.setExact(AlarmManager.ELAPSED_REALTIME_WAKEUP,
+                SystemClock.elapsedRealtime() + delta, "doze_time_tick", mTimeTick, mHandler);
+
+        mTimeTickScheduled = true;
+    }
+
+    private void unscheduleTimeTick() {
+        if (!mTimeTickScheduled) {
+            return;
+        }
+        mAlarmManager.cancel(mTimeTick);
+    }
+
+    private long roundToNextMinute(long timeInMillis) {
+        Calendar calendar = GregorianCalendar.getInstance();
+        calendar.setTimeInMillis(timeInMillis);
+        calendar.set(Calendar.MILLISECOND, 0);
+        calendar.set(Calendar.SECOND, 0);
+        calendar.add(Calendar.MINUTE, 1);
+
+        return calendar.getTimeInMillis();
+    }
+
+    private void onTimeTick() {
+        if (!mTimeTickScheduled) {
+            // Alarm was canceled, but we still got the callback. Ignore.
+            return;
+        }
+
+        mHost.dozeTimeTick();
+
+        // Keep wakelock until a frame has been pushed.
+        mHandler.post(mWakeLock.wrap(() -> {}));
+
+        mTimeTickScheduled = false;
+        scheduleTimeTick();
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java b/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java
index 50506a9..57c75bf 100644
--- a/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java
+++ b/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java
@@ -32,6 +32,7 @@
 import android.view.View;
 
 import com.android.settingslib.applications.InterestingConfigChanges;
+import com.android.systemui.Dependency;
 import com.android.systemui.SystemUIApplication;
 import com.android.systemui.plugins.Plugin;
 import com.android.systemui.plugins.PluginManager;
@@ -97,7 +98,7 @@
         return p;
     }
 
-    public void addTagListener(String tag, FragmentListener listener) {
+    public FragmentHostManager addTagListener(String tag, FragmentListener listener) {
         ArrayList<FragmentListener> listeners = mListeners.get(tag);
         if (listeners == null) {
             listeners = new ArrayList<>();
@@ -108,6 +109,7 @@
         if (current != null && current.getView() != null) {
             listener.onFragmentViewCreated(tag, current);
         }
+        return this;
     }
 
     // Shouldn't generally be needed, included for completeness sake.
@@ -170,6 +172,10 @@
         return mPlugins;
     }
 
+    void destroy() {
+        mFragments.dispatchDestroy();
+    }
+
     public interface FragmentListener {
         void onFragmentViewCreated(String tag, Fragment fragment);
 
@@ -181,8 +187,7 @@
 
     public static FragmentHostManager get(View view) {
         try {
-            return ((SystemUIApplication) view.getContext().getApplicationContext())
-                    .getComponent(FragmentService.class).getFragmentHostManager(view);
+            return Dependency.get(FragmentService.class).getFragmentHostManager(view);
         } catch (ClassCastException e) {
             // TODO: Some auto handling here?
             throw e;
diff --git a/packages/SystemUI/src/com/android/systemui/fragments/FragmentService.java b/packages/SystemUI/src/com/android/systemui/fragments/FragmentService.java
index 85cde10..9a8512d 100644
--- a/packages/SystemUI/src/com/android/systemui/fragments/FragmentService.java
+++ b/packages/SystemUI/src/com/android/systemui/fragments/FragmentService.java
@@ -14,6 +14,7 @@
 
 package com.android.systemui.fragments;
 
+import android.content.Context;
 import android.content.res.Configuration;
 import android.os.Bundle;
 import android.os.Handler;
@@ -21,6 +22,7 @@
 import android.util.Log;
 import android.view.View;
 
+import com.android.systemui.ConfigurationChangedReceiver;
 import com.android.systemui.SystemUI;
 import com.android.systemui.SystemUIApplication;
 
@@ -28,16 +30,16 @@
  * Holds a map of root views to FragmentHostStates and generates them as needed.
  * Also dispatches the configuration changes to all current FragmentHostStates.
  */
-public class FragmentService extends SystemUI {
+public class FragmentService implements ConfigurationChangedReceiver {
 
     private static final String TAG = "FragmentService";
 
     private final ArrayMap<View, FragmentHostState> mHosts = new ArrayMap<>();
     private final Handler mHandler = new Handler();
+    private final Context mContext;
 
-    @Override
-    public void start() {
-        putComponent(FragmentService.class, this);
+    public FragmentService(Context context) {
+        mContext = context;
     }
 
     public FragmentHostManager getFragmentHostManager(View view) {
@@ -50,8 +52,14 @@
         return state.getFragmentHostManager();
     }
 
+    public void destroyAll() {
+        for (FragmentHostState state : mHosts.values()) {
+            state.mFragmentHostManager.destroy();
+        }
+    }
+
     @Override
-    protected void onConfigurationChanged(Configuration newConfig) {
+    public void onConfigurationChanged(Configuration newConfig) {
         for (FragmentHostState state : mHosts.values()) {
             state.sendConfigurationChange(newConfig);
         }
diff --git a/packages/SystemUI/src/com/android/systemui/fragments/PluginFragmentListener.java b/packages/SystemUI/src/com/android/systemui/fragments/PluginFragmentListener.java
index 2e6de4a..03bb73d 100644
--- a/packages/SystemUI/src/com/android/systemui/fragments/PluginFragmentListener.java
+++ b/packages/SystemUI/src/com/android/systemui/fragments/PluginFragmentListener.java
@@ -19,6 +19,7 @@
 import android.util.Log;
 import android.view.View;
 
+import com.android.systemui.Dependency;
 import com.android.systemui.plugins.FragmentBase;
 import com.android.systemui.plugins.Plugin;
 import com.android.systemui.plugins.PluginListener;
@@ -38,13 +39,14 @@
             Class<? extends FragmentBase> expectedInterface) {
         mTag = tag;
         mFragmentHostManager = FragmentHostManager.get(view);
-        mPluginManager = PluginManager.getInstance(view.getContext());
+        mPluginManager = Dependency.get(PluginManager.class);
         mExpectedInterface = expectedInterface;
         mDefaultClass = defaultFragment;
     }
 
-    public void startListening(String action, int version) {
-        mPluginManager.addPluginListener(action, this, version, false /* Only allow one */);
+    public void startListening() {
+        mPluginManager.addPluginListener(this, mExpectedInterface,
+                false /* Only allow one */);
     }
 
     public void stopListening() {
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index 99c8c6b..cbe822f 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -1956,11 +1956,11 @@
     }
 
     public StatusBarKeyguardViewManager registerStatusBar(StatusBar statusBar,
-            ViewGroup container, StatusBarWindowManager statusBarWindowManager,
+            ViewGroup container,
             ScrimController scrimController,
             FingerprintUnlockController fingerprintUnlockController) {
         mStatusBarKeyguardViewManager.registerStatusBar(statusBar, container,
-                statusBarWindowManager, scrimController, fingerprintUnlockController,
+                scrimController, fingerprintUnlockController,
                 mDismissCallbackRegistry);
         return mStatusBarKeyguardViewManager;
     }
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivity.java b/packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivity.java
index 23eaed9..32b5862 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivity.java
@@ -17,7 +17,6 @@
 package com.android.systemui.keyguard;
 
 import static android.app.ActivityManager.TaskDescription;
-import static android.app.ActivityManager.StackId;
 
 import android.annotation.ColorInt;
 import android.annotation.UserIdInt;
@@ -32,13 +31,14 @@
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.graphics.Color;
-import android.graphics.Rect;
 import android.os.Bundle;
 import android.os.RemoteException;
 import android.os.UserHandle;
 import android.util.Log;
 import android.view.View;
 
+import com.android.internal.annotations.VisibleForTesting;
+
 /**
  * Bouncer between work activities and the activity used to confirm credentials before unlocking
  * a managed profile.
@@ -51,52 +51,39 @@
     private static final String TAG = "WorkLockActivity";
 
     /**
-     * ID of the locked user that this activity blocks access to.
+     * Contains a {@link TaskDescription} for the activity being covered.
      */
-    @UserIdInt
-    private int mUserId;
-
+    static final String EXTRA_TASK_DESCRIPTION =
+            "com.android.systemui.keyguard.extra.TASK_DESCRIPTION";
+  
     /**
-     * {@see KeyguardManager}
+     * Cached keyguard manager instance populated by {@link #getKeyguardManager}.
+     * @see KeyguardManager
      */
     private KeyguardManager mKgm;
 
-    /**
-     * {@see DevicePolicyManager}
-     */
-    private DevicePolicyManager mDpm;
-
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
-        mUserId = getIntent().getIntExtra(Intent.EXTRA_USER_ID, UserHandle.myUserId());
-        mDpm = (DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE);
-        mKgm = (KeyguardManager) getSystemService(Context.KEYGUARD_SERVICE);
-
-        final IntentFilter lockFilter = new IntentFilter();
-        lockFilter.addAction(Intent.ACTION_DEVICE_LOCKED_CHANGED);
-        registerReceiverAsUser(mLockEventReceiver, UserHandle.ALL, lockFilter,
-                /* permission */ null, /* scheduler */ null);
+        registerReceiverAsUser(mLockEventReceiver, UserHandle.ALL,
+                new IntentFilter(Intent.ACTION_DEVICE_LOCKED_CHANGED), /* permission */ null,
+                /* scheduler */ null);
 
         // Once the receiver is registered, check whether anything happened between now and the time
         // when this activity was launched. If it did and the user is unlocked now, just quit.
-        if (!mKgm.isDeviceLocked(mUserId)) {
+        if (!getKeyguardManager().isDeviceLocked(getTargetUserId())) {
             finish();
             return;
         }
 
-        // Get the organization color; this is a 24-bit integer provided by a DPC, guaranteed to
-        // be completely opaque.
-        final @ColorInt int color = mDpm.getOrganizationColorForUser(mUserId);
-
         // Draw captions overlaid on the content view, so the whole window is one solid color.
         setOverlayWithDecorCaptionEnabled(true);
 
         // Blank out the activity. When it is on-screen it will look like a Recents thumbnail with
         // redaction switched on.
         final View blankView = new View(this);
-        blankView.setBackgroundColor(color);
+        blankView.setBackgroundColor(getPrimaryColor());
         setContentView(blankView);
     }
 
@@ -127,26 +114,28 @@
 
     @Override
     public void setTaskDescription(TaskDescription taskDescription) {
-        // Use the previous activity's task description.
+        // Leave unset so we use the previous activity's task description.
     }
 
     private final BroadcastReceiver mLockEventReceiver = new BroadcastReceiver() {
         @Override
         public void onReceive(Context context, Intent intent) {
-            final int userId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, mUserId);
-            if (userId == mUserId && !mKgm.isDeviceLocked(mUserId)) {
+            final int targetUserId = getTargetUserId();
+            final int userId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, targetUserId);
+            if (userId == targetUserId && !getKeyguardManager().isDeviceLocked(targetUserId)) {
                 finish();
             }
         }
     };
 
     private void showConfirmCredentialActivity() {
-        if (isFinishing() || !mKgm.isDeviceLocked(mUserId)) {
+        if (isFinishing() || !getKeyguardManager().isDeviceLocked(getTargetUserId())) {
             // Don't show the confirm credentials screen if we are already unlocked / unlocking.
             return;
         }
 
-        final Intent credential = mKgm.createConfirmDeviceCredentialIntent(null, null, mUserId);
+        final Intent credential = getKeyguardManager()
+                .createConfirmDeviceCredentialIntent(null, null, getTargetUserId());
         if (credential == null) {
             return;
         }
@@ -181,4 +170,32 @@
         final View view = getWindow().getDecorView();
         return ActivityOptions.makeScaleUpAnimation(view, 0, 0, view.getWidth(), view.getHeight());
     }
+
+    private KeyguardManager getKeyguardManager() {
+        if (mKgm == null) {
+            mKgm = (KeyguardManager) getSystemService(Context.KEYGUARD_SERVICE);
+        }
+        return mKgm;
+    }
+
+    @VisibleForTesting
+    @UserIdInt
+    final int getTargetUserId() {
+        return getIntent().getIntExtra(Intent.EXTRA_USER_ID, UserHandle.myUserId());
+    }
+
+    @VisibleForTesting
+    @ColorInt
+    final int getPrimaryColor() {
+        final TaskDescription taskDescription = (TaskDescription)
+                getIntent().getExtra(EXTRA_TASK_DESCRIPTION);
+        if (taskDescription != null && Color.alpha(taskDescription.getPrimaryColor()) == 255) {
+            return taskDescription.getPrimaryColor();
+        } else {
+            // No task description. Use an organization color set by the policy controller.
+            final DevicePolicyManager devicePolicyManager = (DevicePolicyManager)
+                    getSystemService(Context.DEVICE_POLICY_SERVICE);
+            return devicePolicyManager.getOrganizationColorForUser(getTargetUserId());
+        }
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivityController.java b/packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivityController.java
index e6483f6..a49c482 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivityController.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivityController.java
@@ -31,17 +31,21 @@
 
 public class WorkLockActivityController {
     private final Context mContext;
+    final SystemServicesProxy mSsp;
 
     public WorkLockActivityController(Context context) {
         mContext = context;
+        mSsp = SystemServicesProxy.getInstance(context);
+
         EventBus.getDefault().register(this);
-        SystemServicesProxy.getInstance(context).registerTaskStackListener(mLockListener);
+        mSsp.registerTaskStackListener(mLockListener);
     }
 
     private void startWorkChallengeInTask(int taskId, int userId) {
         Intent intent = new Intent(KeyguardManager.ACTION_CONFIRM_DEVICE_CREDENTIAL_WITH_USER)
                 .setComponent(new ComponentName(mContext, WorkLockActivity.class))
                 .putExtra(Intent.EXTRA_USER_ID, userId)
+                .putExtra(WorkLockActivity.EXTRA_TASK_DESCRIPTION, mSsp.getTaskDescription(taskId))
                 .addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
                         | Intent.FLAG_ACTIVITY_CLEAR_TOP);
 
diff --git a/core/java/android/service/autofill/CallbackHelper.java b/packages/SystemUI/src/com/android/systemui/pip/BasePipManager.java
similarity index 71%
copy from core/java/android/service/autofill/CallbackHelper.java
copy to packages/SystemUI/src/com/android/systemui/pip/BasePipManager.java
index ded8f97..69541ec 100644
--- a/core/java/android/service/autofill/CallbackHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/BasePipManager.java
@@ -13,18 +13,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package android.service.autofill;
+
+package com.android.systemui.pip;
+
+import android.content.Context;
 
 import java.io.PrintWriter;
 
-final class CallbackHelper {
-
-    static interface Dumpable {
-        void dump(String prefix, PrintWriter pw);
-        void setFinalizer(Finalizer f);
-    }
-
-    static interface Finalizer {
-        void gone();
-    }
+public interface  BasePipManager {
+    void initialize(Context context);
+    void onConfigurationChanged();
+    void dump(PrintWriter pw);
 }
diff --git a/packages/SystemUI/src/com/android/systemui/pip/PipUI.java b/packages/SystemUI/src/com/android/systemui/pip/PipUI.java
index 617d8ad..cc35f3c 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/PipUI.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/PipUI.java
@@ -24,11 +24,16 @@
 
 import com.android.systemui.SystemUI;
 
+import java.io.FileDescriptor;
+import java.io.PrintWriter;
+
 /**
  * Controls the picture-in-picture window.
  */
 public class PipUI extends SystemUI {
 
+    private BasePipManager mPipManager;
+
     private boolean mSupportsPip;
     private boolean mIsLeanBackOnly;
 
@@ -36,27 +41,32 @@
     public void start() {
         PackageManager pm = mContext.getPackageManager();
         mSupportsPip = pm.hasSystemFeature(FEATURE_PICTURE_IN_PICTURE);
-        mIsLeanBackOnly = pm.hasSystemFeature(FEATURE_LEANBACK_ONLY);
         if (!mSupportsPip) {
             return;
         }
-        if (mIsLeanBackOnly) {
-            com.android.systemui.pip.tv.PipManager.getInstance().initialize(mContext);
-        } else {
-            com.android.systemui.pip.phone.PipManager.getInstance().initialize(mContext);
-        }
+
+        mPipManager = pm.hasSystemFeature(FEATURE_LEANBACK_ONLY)
+                ? com.android.systemui.pip.tv.PipManager.getInstance()
+                : com.android.systemui.pip.phone.PipManager.getInstance();
+        mPipManager.initialize(mContext);
     }
 
     @Override
     protected void onConfigurationChanged(Configuration newConfig) {
         super.onConfigurationChanged(newConfig);
-        if (!mSupportsPip) {
+        if (mPipManager == null) {
             return;
         }
-        if (mIsLeanBackOnly) {
-            com.android.systemui.pip.tv.PipManager.getInstance().onConfigurationChanged();
-        } else {
-            com.android.systemui.pip.phone.PipManager.getInstance().onConfigurationChanged();
+
+        mPipManager.onConfigurationChanged();
+    }
+
+    @Override
+    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
+        if (mPipManager == null) {
+            return;
         }
+
+        mPipManager.dump(pw);
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipDismissViewController.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipDismissViewController.java
index a7ac719..0259e3e 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipDismissViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipDismissViewController.java
@@ -18,15 +18,21 @@
 
 import android.content.Context;
 import android.graphics.PixelFormat;
+import android.graphics.Point;
+import android.graphics.PointF;
 import android.graphics.Rect;
 import android.view.Gravity;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.View.OnLayoutChangeListener;
+import android.view.ViewGroup;
 import android.view.WindowManager;
+import android.view.WindowManager.LayoutParams;
+import android.widget.FrameLayout;
 
 import com.android.systemui.Interpolators;
 import com.android.systemui.R;
+import com.android.systemui.recents.misc.SystemServicesProxy;
 
 public class PipDismissViewController {
 
@@ -35,12 +41,22 @@
     private static final int SHOW_TARGET_DELAY = 100;
     private static final int SHOW_TARGET_DURATION = 200;
 
+    private static final float DISMISS_TEXT_MAX_SCALE = 2f;
+    private static final float DISMISS_GRADIENT_MIN_HEIGHT_PERCENT = 0.33f;
+    private static final float DISMISS_GRADIENT_MAX_HEIGHT_PERCENT = 0.5f;
+    private static final float DISMISS_THRESHOLD = 0.55f;
+
     private Context mContext;
     private WindowManager mWindowManager;
 
     private View mDismissView;
     private Rect mDismissTargetScreenBounds = new Rect();
 
+    private View mDismissContainer;
+    private View mGradientView;
+    private float mMinHeight;
+    private float mMaxHeight;
+
     public PipDismissViewController(Context context) {
         mContext = context;
         mWindowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
@@ -51,31 +67,49 @@
      */
     public void createDismissTarget() {
         if (mDismissView == null) {
+            // Determine sizes for the gradient
+            final Rect stableInsets = new Rect();
+            SystemServicesProxy.getInstance(mContext).getStableInsets(stableInsets);
+            final Point windowSize = new Point();
+            mWindowManager.getDefaultDisplay().getRealSize(windowSize);
+            mMinHeight = windowSize.y * DISMISS_GRADIENT_MIN_HEIGHT_PERCENT;
+            mMaxHeight = windowSize.y * DISMISS_GRADIENT_MAX_HEIGHT_PERCENT;
+
             // Create a new view for the dismiss target
-            int dismissTargetSize = mContext.getResources().getDimensionPixelSize(
-                    R.dimen.pip_dismiss_target_size);
             LayoutInflater inflater = LayoutInflater.from(mContext);
             mDismissView = inflater.inflate(R.layout.pip_dismiss_view, null);
-            mDismissView.addOnLayoutChangeListener(new OnLayoutChangeListener() {
+            mGradientView = mDismissView.findViewById(R.id.gradient_view);
+            FrameLayout.LayoutParams glp =
+                    (FrameLayout.LayoutParams) mGradientView.getLayoutParams();
+            glp.height = (int) mMaxHeight;
+            mGradientView.setLayoutParams(glp);
+            mGradientView.setPivotY(windowSize.y);
+            mGradientView.setScaleY(mMaxHeight / mMinHeight); // Set to min height via scaling
+            mDismissContainer = mDismissView.findViewById(R.id.pip_dismiss_container);
+            FrameLayout.LayoutParams clp =
+                    (FrameLayout.LayoutParams) mDismissContainer.getLayoutParams();
+            clp.bottomMargin = stableInsets.bottom;
+            mDismissContainer.addOnLayoutChangeListener(new OnLayoutChangeListener() {
                 @Override
                 public void onLayoutChange(View v, int left, int top, int right, int bottom,
                         int oldLeft, int oldTop, int oldRight, int oldBottom) {
-                    if (mDismissView != null) {
-                        mDismissView.getBoundsOnScreen(mDismissTargetScreenBounds);
+                    if (mDismissContainer != null) {
+                        mDismissContainer.getBoundsOnScreen(mDismissTargetScreenBounds);
                     }
                 }
             });
 
             // Add the target to the window
-            WindowManager.LayoutParams lp =  new WindowManager.LayoutParams(
-                    dismissTargetSize,
-                    dismissTargetSize,
-                    WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG,
-                    WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
-                            | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
-                            | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
+            LayoutParams lp =  new LayoutParams(
+                    ViewGroup.LayoutParams.MATCH_PARENT, (int) mMaxHeight,
+                    0, windowSize.y - (int) mMaxHeight,
+                    LayoutParams.TYPE_SYSTEM_DIALOG,
+                    LayoutParams.FLAG_LAYOUT_IN_SCREEN
+                            | LayoutParams.FLAG_LAYOUT_NO_LIMITS
+                            | LayoutParams.FLAG_NOT_TOUCHABLE
+                            | LayoutParams.FLAG_NOT_FOCUSABLE,
                     PixelFormat.TRANSLUCENT);
-            lp.gravity = Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL;
+            lp.gravity = Gravity.TOP | Gravity.CENTER_HORIZONTAL;
             mWindowManager.addView(mDismissView, lp);
         }
         mDismissView.animate().cancel();
@@ -84,7 +118,8 @@
     /**
      * Shows the dismiss target.
      */
-    public void showDismissTarget() {
+    public void showDismissTarget(Rect pinnedStack) {
+        updateDismissTarget(pinnedStack);
         mDismissView.animate()
                 .alpha(1f)
                 .setInterpolator(Interpolators.LINEAR_OUT_SLOW_IN)
@@ -106,7 +141,7 @@
                     .withEndAction(new Runnable() {
                         @Override
                         public void run() {
-                            mWindowManager.removeView(mDismissView);
+                            mWindowManager.removeViewImmediate(mDismissView);
                             mDismissView = null;
                         }
                     })
@@ -115,10 +150,46 @@
     }
 
     /**
+     * Updates the appearance of the dismiss target based on how close the PIP is.
+     */
+    public void updateDismissTarget(Rect pinnedStack) {
+        // As PIP moves over / away from delete target it grows / shrinks
+        final float scalePercent = calculateDistancePercent(pinnedStack);
+        final float newScale = 1 + (DISMISS_TEXT_MAX_SCALE - 1) * scalePercent;
+        final float minGradientScale = mMinHeight / mMaxHeight;
+        final float newHeight = Math.max(minGradientScale, scalePercent);
+        mGradientView.setScaleY(newHeight);
+        mDismissContainer.setScaleX(newScale);
+        mDismissContainer.setScaleY(newScale);
+    }
+
+    /**
+     * @return the percentage of distance the PIP is away from the dismiss target point.
+     */
+    private float calculateDistancePercent(Rect pinnedStack) {
+        final int distance = mDismissTargetScreenBounds.height();
+        final int textX = mDismissTargetScreenBounds.centerX();
+        final int textY = mDismissTargetScreenBounds.bottom;
+        final float pipCurrX = pinnedStack.centerX();
+        final float pipCurrY = pinnedStack.bottom;
+        final float currentDistance = PointF.length(pipCurrX - textX, pipCurrY - textY);
+        if (currentDistance <= distance) {
+            return 1 - (currentDistance / distance);
+        }
+        return 0;
+    }
+
+    /**
      * @return the dismiss target screen bounds.
      */
     public Rect getDismissBounds() {
         return mDismissTargetScreenBounds;
     }
 
+    /**
+     * @return whether the PIP is positioned on the dismiss target enough to be dismissed.
+     */
+    public boolean shouldDismiss(Rect pinnedStack) {
+        return calculateDistancePercent(pinnedStack) >= DISMISS_THRESHOLD;
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
index 3df557d..42f1b14 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
@@ -16,33 +16,32 @@
 
 package com.android.systemui.pip.phone;
 
-import static android.app.ActivityManager.StackId.PINNED_STACK_ID;
 import static android.view.Display.DEFAULT_DISPLAY;
 
 import android.app.ActivityManager;
-import android.app.ActivityManager.StackInfo;
-import android.app.ActivityOptions;
 import android.app.IActivityManager;
 import android.content.ComponentName;
 import android.content.Context;
-import android.content.Intent;
 import android.content.pm.ParceledListSlice;
+import android.graphics.Rect;
 import android.os.Handler;
 import android.os.RemoteException;
-import android.os.UserHandle;
 import android.util.Log;
 import android.view.IPinnedStackController;
 import android.view.IPinnedStackListener;
 import android.view.IWindowManager;
 import android.view.WindowManagerGlobal;
 
+import com.android.systemui.pip.BasePipManager;
 import com.android.systemui.recents.misc.SystemServicesProxy;
 import com.android.systemui.recents.misc.SystemServicesProxy.TaskStackListener;
 
+import java.io.PrintWriter;
+
 /**
  * Manages the picture-in-picture (PIP) UI and states for Phones.
  */
-public class PipManager {
+public class PipManager implements BasePipManager {
     private static final String TAG = "PipManager";
 
     private static PipManager sPipController;
@@ -94,7 +93,7 @@
                 }
             }
             if (expandPipToFullscreen) {
-                mTouchHandler.expandPinnedStackToFullscreen();
+                mTouchHandler.getMotionHelper().expandPip();
             } else {
                 Log.w(TAG, "Can not expand PiP to fullscreen via intent from the same package.");
             }
@@ -114,28 +113,31 @@
         }
 
         @Override
-        public void onBoundsChanged(boolean adjustedForIme) {
-            // Do nothing
-        }
-
-        @Override
-        public void onActionsChanged(ParceledListSlice actions) {
+        public void onImeVisibilityChanged(boolean imeVisible, int imeHeight) {
             mHandler.post(() -> {
-                mMenuController.setAppActions(actions);
+                mTouchHandler.onImeVisibilityChanged(imeVisible, imeHeight);
             });
         }
 
         @Override
         public void onMinimizedStateChanged(boolean isMinimized) {
             mHandler.post(() -> {
-                mTouchHandler.onMinimizedStateChanged(isMinimized);
+                mTouchHandler.setMinimizedState(isMinimized, true /* fromController */);
             });
         }
 
         @Override
-        public void onSnapToEdgeStateChanged(boolean isSnapToEdge) {
+        public void onMovementBoundsChanged(Rect insetBounds, Rect normalBounds,
+                boolean fromImeAdjustement) {
             mHandler.post(() -> {
-                mTouchHandler.onSnapToEdgeStateChanged(isSnapToEdge);
+                mTouchHandler.onMovementBoundsChanged(insetBounds, normalBounds, fromImeAdjustement);
+            });
+        }
+
+        @Override
+        public void onActionsChanged(ParceledListSlice actions) {
+            mHandler.post(() -> {
+                mMenuController.setAppActions(actions);
             });
         }
     }
@@ -180,4 +182,11 @@
         }
         return sPipController;
     }
+
+    public void dump(PrintWriter pw) {
+        final String innerPrefix = "  ";
+        pw.println(TAG);
+        mMenuController.dump(pw, innerPrefix);
+        mTouchHandler.dump(pw, innerPrefix);
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMediaController.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMediaController.java
index d96baa6..3a4caa9 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMediaController.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMediaController.java
@@ -16,16 +16,22 @@
 
 package com.android.systemui.pip.phone;
 
+import static android.app.PendingIntent.FLAG_UPDATE_CURRENT;
+
 import android.app.IActivityManager;
+import android.app.PendingIntent;
 import android.app.RemoteAction;
+import android.content.BroadcastReceiver;
 import android.content.ComponentName;
 import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
 import android.graphics.drawable.Icon;
 import android.media.session.MediaController;
-import android.media.session.MediaController.TransportControls;
 import android.media.session.MediaSession;
 import android.media.session.MediaSessionManager;
 import android.media.session.PlaybackState;
+import android.os.UserHandle;
 
 import com.android.systemui.R;
 
@@ -40,6 +46,9 @@
  */
 public class PipMediaController {
 
+    private static final String ACTION_PLAY = "com.android.systemui.pip.phone.PLAY";
+    private static final String ACTION_PAUSE = "com.android.systemui.pip.phone.PAUSE";
+
     /**
      * A listener interface to receive notification on changes to the media actions.
      */
@@ -59,12 +68,22 @@
     private RemoteAction mPauseAction;
     private RemoteAction mPlayAction;
 
+    private BroadcastReceiver mPlayPauseActionReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            final String action = intent.getAction();
+            if (action.equals(ACTION_PLAY)) {
+                mMediaController.getTransportControls().play();
+            } else if (action.equals(ACTION_PAUSE)) {
+                mMediaController.getTransportControls().pause();
+            }
+        }
+    };
+
     private MediaController.Callback mPlaybackChangedListener = new MediaController.Callback() {
         @Override
         public void onPlaybackStateChanged(PlaybackState state) {
-            if (!mListeners.isEmpty()) {
-                notifyActionsChanged(getMediaActions());
-            }
+            notifyActionsChanged();
         }
     };
 
@@ -73,6 +92,10 @@
     public PipMediaController(Context context, IActivityManager activityManager) {
         mContext = context;
         mActivityManager = activityManager;
+        IntentFilter mediaControlFilter = new IntentFilter();
+        mediaControlFilter.addAction(ACTION_PLAY);
+        mediaControlFilter.addAction(ACTION_PAUSE);
+        mContext.registerReceiver(mPlayPauseActionReceiver, mediaControlFilter);
 
         createMediaActions();
         mMediaSessionManager =
@@ -121,9 +144,9 @@
         boolean isPlaying = MediaSession.isActiveState(state);
         long actions = mMediaController.getPlaybackState().getActions();
         if (!isPlaying && ((actions & PlaybackState.ACTION_PLAY) != 0)) {
-            mediaActions.add(mPauseAction);
-        } else if (isPlaying && ((actions & PlaybackState.ACTION_PAUSE) != 0)) {
             mediaActions.add(mPlayAction);
+        } else if (isPlaying && ((actions & PlaybackState.ACTION_PAUSE) != 0)) {
+            mediaActions.add(mPauseAction);
         }
         return mediaActions;
     }
@@ -135,12 +158,14 @@
         String pauseDescription = mContext.getString(R.string.pip_pause);
         mPauseAction = new RemoteAction(Icon.createWithResource(mContext,
                 R.drawable.ic_pause_white_24dp), pauseDescription, pauseDescription,
-                action -> mMediaController.getTransportControls().pause());
+                        PendingIntent.getBroadcast(mContext, 0, new Intent(ACTION_PAUSE),
+                                FLAG_UPDATE_CURRENT));
 
         String playDescription = mContext.getString(R.string.pip_play);
         mPlayAction = new RemoteAction(Icon.createWithResource(mContext,
                 R.drawable.ic_play_arrow_white_24dp), playDescription, playDescription,
-                action -> mMediaController.getTransportControls().play());
+                        PendingIntent.getBroadcast(mContext, 0, new Intent(ACTION_PLAY),
+                                FLAG_UPDATE_CURRENT));
     }
 
     /**
@@ -175,9 +200,7 @@
             if (controller != null) {
                 controller.registerCallback(mPlaybackChangedListener);
             }
-            if (!mListeners.isEmpty()) {
-                notifyActionsChanged(getMediaActions());
-            }
+            notifyActionsChanged();
 
             // TODO(winsonc): Consider if we want to close the PIP after a timeout (like on TV)
         }
@@ -186,8 +209,9 @@
     /**
      * Notifies all listeners that the actions have changed.
      */
-    private void notifyActionsChanged(List<RemoteAction> actions) {
+    private void notifyActionsChanged() {
         if (!mListeners.isEmpty()) {
+            List<RemoteAction> actions = getMediaActions();
             mListeners.forEach(l -> l.onMediaActionsChanged(actions));
         }
     }
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java
index 438b8dd..9066977 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java
@@ -22,6 +22,7 @@
 import android.annotation.Nullable;
 import android.app.Activity;
 import android.app.ActivityManager;
+import android.app.PendingIntent.CanceledException;
 import android.app.RemoteAction;
 import android.content.Intent;
 import android.content.pm.ParceledListSlice;
@@ -258,7 +259,11 @@
                     }, mHandler);
                     actionView.setContentDescription(action.getContentDescription());
                     actionView.setOnClickListener(v -> {
-                        action.sendActionInvoked();
+                        try {
+                            action.getActionIntent().send();
+                        } catch (CanceledException e) {
+                            Log.w(TAG, "Failed to send action", e);
+                        }
                     });
                     actionsGroup.addView(actionView);
                 }
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java
index f3dc339..91115d0 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java
@@ -35,6 +35,7 @@
 
 import com.android.systemui.pip.phone.PipMediaController.ActionListener;
 
+import java.io.PrintWriter;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -264,4 +265,11 @@
         }
         mVisible = visible;
     }
+
+    public void dump(PrintWriter pw, String prefix) {
+        final String innerPrefix = prefix + "  ";
+        pw.println(prefix + TAG);
+        pw.println(innerPrefix + "mVisible=" + mVisible);
+        pw.println(innerPrefix + "mListeners=" + mListeners.size());
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMotionHelper.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMotionHelper.java
new file mode 100644
index 0000000..ed0a37f
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMotionHelper.java
@@ -0,0 +1,387 @@
+/*
+ * Copyright (C) 2016 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.pip.phone;
+
+import static android.app.ActivityManager.StackId.PINNED_STACK_ID;
+
+import static com.android.systemui.Interpolators.FAST_OUT_LINEAR_IN;
+import static com.android.systemui.Interpolators.FAST_OUT_SLOW_IN;
+import static com.android.systemui.Interpolators.LINEAR_OUT_SLOW_IN;
+
+import android.animation.Animator;
+import android.animation.AnimatorListenerAdapter;
+import android.animation.RectEvaluator;
+import android.animation.ValueAnimator;
+import android.animation.ValueAnimator.AnimatorUpdateListener;
+import android.app.ActivityManager.StackInfo;
+import android.app.IActivityManager;
+import android.content.Context;
+import android.graphics.Point;
+import android.graphics.PointF;
+import android.graphics.Rect;
+import android.os.Handler;
+import android.os.RemoteException;
+import android.util.Log;
+import android.view.animation.Interpolator;
+
+import com.android.internal.os.BackgroundThread;
+import com.android.internal.policy.PipSnapAlgorithm;
+import com.android.systemui.recents.misc.SystemServicesProxy;
+import com.android.systemui.statusbar.FlingAnimationUtils;
+
+import java.io.PrintWriter;
+
+/**
+ * A helper to animate and manipulate the PiP.
+ */
+public class PipMotionHelper {
+
+    private static final String TAG = "PipMotionHelper";
+
+    private static final RectEvaluator RECT_EVALUATOR = new RectEvaluator(new Rect());
+
+    private static final int DEFAULT_MOVE_STACK_DURATION = 225;
+    private static final int SNAP_STACK_DURATION = 225;
+    private static final int DISMISS_STACK_DURATION = 375;
+    private static final int SHRINK_STACK_FROM_MENU_DURATION = 175;
+    private static final int EXPAND_STACK_TO_MENU_DURATION = 175;
+    private static final int EXPAND_STACK_TO_FULLSCREEN_DURATION = 225;
+    private static final int MINIMIZE_STACK_MAX_DURATION = 200;
+
+    // The fraction of the stack width that the user has to drag offscreen to minimize the PiP
+    private static final float MINIMIZE_OFFSCREEN_FRACTION = 0.2f;
+
+    private Context mContext;
+    private IActivityManager mActivityManager;
+    private Handler mHandler;
+
+    private PipSnapAlgorithm mSnapAlgorithm;
+    private FlingAnimationUtils mFlingAnimationUtils;
+
+    private final Rect mBounds = new Rect();
+    private final Rect mStableInsets = new Rect();
+
+    private ValueAnimator mBoundsAnimator = null;
+    private ValueAnimator.AnimatorUpdateListener mUpdateBoundsListener =
+            new AnimatorUpdateListener() {
+                @Override
+                public void onAnimationUpdate(ValueAnimator animation) {
+                    mBounds.set((Rect) animation.getAnimatedValue());
+                }
+            };
+
+    public PipMotionHelper(Context context, IActivityManager activityManager,
+            PipSnapAlgorithm snapAlgorithm, FlingAnimationUtils flingAnimationUtils) {
+        mContext = context;
+        mHandler = BackgroundThread.getHandler();
+        mActivityManager = activityManager;
+        mSnapAlgorithm = snapAlgorithm;
+        mFlingAnimationUtils = flingAnimationUtils;
+        onConfigurationChanged();
+    }
+
+    /**
+     * Updates whenever the configuration changes.
+     */
+    void onConfigurationChanged() {
+        mSnapAlgorithm.onConfigurationChanged();
+        SystemServicesProxy.getInstance(mContext).getStableInsets(mStableInsets);
+    }
+
+    /**
+     * Synchronizes the current bounds with the pinned stack.
+     */
+    void synchronizePinnedStackBounds() {
+        cancelAnimations();
+        try {
+            StackInfo stackInfo = mActivityManager.getStackInfo(PINNED_STACK_ID);
+            if (stackInfo != null) {
+                mBounds.set(stackInfo.bounds);
+            }
+        } catch (RemoteException e) {
+            Log.w(TAG, "Failed to get pinned stack bounds");
+        }
+    }
+
+    /**
+     * Tries to the move the pinned stack to the given {@param bounds}.
+     */
+    void movePip(Rect toBounds) {
+        cancelAnimations();
+        resizePipUnchecked(toBounds);
+        mBounds.set(toBounds);
+    }
+
+    /**
+     * Resizes the pinned stack back to fullscreen.
+     */
+    void expandPip() {
+        cancelAnimations();
+        mHandler.post(() -> {
+            try {
+                mActivityManager.resizeStack(PINNED_STACK_ID, null /* bounds */,
+                        true /* allowResizeInDockedMode */, true /* preserveWindows */,
+                        true /* animate */, EXPAND_STACK_TO_FULLSCREEN_DURATION);
+            } catch (RemoteException e) {
+                Log.e(TAG, "Error showing PiP menu activity", e);
+            }
+        });
+    }
+
+    /**
+     * Dismisses the pinned stack.
+     */
+    void dismissPip() {
+        cancelAnimations();
+        mHandler.post(() -> {
+            try {
+                mActivityManager.removeStack(PINNED_STACK_ID);
+            } catch (RemoteException e) {
+                Log.e(TAG, "Failed to remove PiP", e);
+            }
+        });
+    }
+
+    /**
+     * @return the PiP bounds.
+     */
+    Rect getBounds() {
+        return mBounds;
+    }
+
+    /**
+     * @return the closest minimized PiP bounds.
+     */
+    Rect getClosestMinimizedBounds(Rect stackBounds, Rect movementBounds) {
+        Point displaySize = new Point();
+        mContext.getDisplay().getRealSize(displaySize);
+        Rect toBounds = mSnapAlgorithm.findClosestSnapBounds(movementBounds, stackBounds);
+        mSnapAlgorithm.applyMinimizedOffset(toBounds, movementBounds, displaySize, mStableInsets);
+        return toBounds;
+    }
+
+    /**
+     * @return whether the PiP at the current bounds should be minimized.
+     */
+    boolean shouldMinimizePip() {
+        Point displaySize = new Point();
+        mContext.getDisplay().getRealSize(displaySize);
+        if (mBounds.left < 0) {
+            float offscreenFraction = (float) -mBounds.left / mBounds.width();
+            return offscreenFraction >= MINIMIZE_OFFSCREEN_FRACTION;
+        } else if (mBounds.right > displaySize.x) {
+            float offscreenFraction = (float) (mBounds.right - displaySize.x) /
+                    mBounds.width();
+            return offscreenFraction >= MINIMIZE_OFFSCREEN_FRACTION;
+        } else {
+            return false;
+        }
+    }
+
+    /**
+     * Flings the minimized PiP to the closest minimized snap target.
+     */
+    Rect flingToMinimizedState(float velocityY, Rect movementBounds) {
+        cancelAnimations();
+        // We currently only allow flinging the minimized stack up and down, so just lock the
+        // movement bounds to the current stack bounds horizontally
+        movementBounds = new Rect(mBounds.left, movementBounds.top, mBounds.left,
+                movementBounds.bottom);
+        Rect toBounds = mSnapAlgorithm.findClosestSnapBounds(movementBounds, mBounds,
+                0 /* velocityX */, velocityY);
+        if (!mBounds.equals(toBounds)) {
+            mBoundsAnimator = createAnimationToBounds(mBounds, toBounds, 0, FAST_OUT_SLOW_IN,
+                    mUpdateBoundsListener);
+            mFlingAnimationUtils.apply(mBoundsAnimator, 0,
+                    distanceBetweenRectOffsets(mBounds, toBounds),
+                    velocityY);
+            mBoundsAnimator.start();
+        }
+        return toBounds;
+    }
+
+    /**
+     * Animates the PiP to the minimized state, slightly offscreen.
+     */
+    Rect animateToClosestMinimizedState(Rect movementBounds,
+            final PipMenuActivityController menuController) {
+        cancelAnimations();
+        Rect toBounds = getClosestMinimizedBounds(mBounds, movementBounds);
+        if (!mBounds.equals(toBounds)) {
+            mBoundsAnimator = createAnimationToBounds(mBounds, toBounds,
+                    MINIMIZE_STACK_MAX_DURATION, LINEAR_OUT_SLOW_IN, mUpdateBoundsListener);
+            mBoundsAnimator.addListener(new AnimatorListenerAdapter() {
+                @Override
+                public void onAnimationStart(Animator animation) {
+                    menuController.hideMenu();
+                }
+            });
+            mBoundsAnimator.start();
+        }
+        return toBounds;
+    }
+
+    /**
+     * Flings the PiP to the closest snap target.
+     */
+    Rect flingToSnapTarget(float velocity, float velocityX, float velocityY, Rect movementBounds) {
+        cancelAnimations();
+        Rect toBounds = mSnapAlgorithm.findClosestSnapBounds(movementBounds, mBounds,
+                velocityX, velocityY);
+        if (!mBounds.equals(toBounds)) {
+            mBoundsAnimator = createAnimationToBounds(mBounds, toBounds, 0, FAST_OUT_SLOW_IN,
+                    mUpdateBoundsListener);
+            mFlingAnimationUtils.apply(mBoundsAnimator, 0,
+                    distanceBetweenRectOffsets(mBounds, toBounds),
+                    velocity);
+            mBoundsAnimator.start();
+        }
+        return toBounds;
+    }
+
+    /**
+     * Animates the PiP to the closest snap target.
+     */
+    Rect animateToClosestSnapTarget(Rect movementBounds) {
+        cancelAnimations();
+        Rect toBounds = mSnapAlgorithm.findClosestSnapBounds(movementBounds, mBounds);
+        if (!mBounds.equals(toBounds)) {
+            mBoundsAnimator = createAnimationToBounds(mBounds, toBounds, SNAP_STACK_DURATION,
+                    FAST_OUT_SLOW_IN, mUpdateBoundsListener);
+            mBoundsAnimator.start();
+        }
+        return toBounds;
+    }
+
+    /**
+     * Animates the PiP to the expanded state to show the menu.
+     */
+    float animateToExpandedState(Rect expandedBounds, Rect movementBounds,
+            Rect expandedMovementBounds) {
+        float savedSnapFraction = mSnapAlgorithm.getSnapFraction(new Rect(mBounds), movementBounds);
+        mSnapAlgorithm.applySnapFraction(expandedBounds, expandedMovementBounds, savedSnapFraction);
+        mBoundsAnimator = createAnimationToBounds(mBounds, expandedBounds,
+                EXPAND_STACK_TO_MENU_DURATION, FAST_OUT_SLOW_IN, mUpdateBoundsListener);
+        mBoundsAnimator.start();
+        return savedSnapFraction;
+    }
+
+    /**
+     * Animates the PiP from the expanded state to the normal state after the menu is hidden.
+     */
+    void animateToUnexpandedState(Rect normalBounds, float savedSnapFraction,
+            Rect normalMovementBounds) {
+        if (savedSnapFraction >= 0f) {
+            mSnapAlgorithm.applySnapFraction(normalBounds, normalMovementBounds, savedSnapFraction);
+            mBoundsAnimator = createAnimationToBounds(mBounds, normalBounds,
+                    SHRINK_STACK_FROM_MENU_DURATION, FAST_OUT_SLOW_IN, mUpdateBoundsListener);
+            mBoundsAnimator.start();
+        } else {
+            animateToClosestSnapTarget(normalMovementBounds);
+        }
+    }
+
+    /**
+     * Animates the dismissal of the PiP over the dismiss target bounds.
+     */
+    Rect animateDismissFromDrag(Rect dismissBounds) {
+        cancelAnimations();
+        Rect toBounds = new Rect(dismissBounds.centerX(),
+                dismissBounds.centerY(),
+                dismissBounds.centerX() + 1,
+                dismissBounds.centerY() + 1);
+        mBoundsAnimator = createAnimationToBounds(mBounds, toBounds, DISMISS_STACK_DURATION,
+                FAST_OUT_LINEAR_IN, mUpdateBoundsListener);
+        mBoundsAnimator.addListener(new AnimatorListenerAdapter() {
+            @Override
+            public void onAnimationEnd(Animator animation) {
+                dismissPip();
+            }
+        });
+        mBoundsAnimator.start();
+        return toBounds;
+    }
+
+    /**
+     * Animates the PiP to some given bounds.
+     */
+    void animateToBounds(Rect toBounds) {
+        cancelAnimations();
+        if (!mBounds.equals(toBounds)) {
+            mBoundsAnimator = createAnimationToBounds(mBounds, toBounds,
+                    DEFAULT_MOVE_STACK_DURATION, FAST_OUT_LINEAR_IN, mUpdateBoundsListener);
+            mBoundsAnimator.start();
+        }
+    }
+
+    /**
+     * Cancels all existing animations.
+     */
+    void cancelAnimations() {
+        if (mBoundsAnimator != null) {
+            mBoundsAnimator.cancel();
+            mBoundsAnimator = null;
+        }
+    }
+
+    /**
+     * Creates an animation to move the PiP to give given {@param toBounds}.
+     */
+    private ValueAnimator createAnimationToBounds(Rect fromBounds, Rect toBounds, int duration,
+            Interpolator interpolator, ValueAnimator.AnimatorUpdateListener updateListener) {
+        ValueAnimator anim = ValueAnimator.ofObject(RECT_EVALUATOR, fromBounds, toBounds);
+        anim.setDuration(duration);
+        anim.setInterpolator(interpolator);
+        anim.addUpdateListener((ValueAnimator animation) -> {
+            resizePipUnchecked((Rect) animation.getAnimatedValue());
+        });
+        if (updateListener != null) {
+            anim.addUpdateListener(updateListener);
+        }
+        return anim;
+    }
+
+    /**
+     * Directly resizes the PiP to the given {@param bounds}.
+     */
+    private void resizePipUnchecked(Rect toBounds) {
+        if (!toBounds.equals(mBounds)) {
+            mHandler.post(() -> {
+                try {
+                    mActivityManager.resizePinnedStack(toBounds, null /* tempPinnedTaskBounds */);
+                    mBounds.set(toBounds);
+                } catch (RemoteException e) {
+                    Log.e(TAG, "Could not move pinned stack to bounds: " + toBounds, e);
+                }
+            });
+        }
+    }
+
+    /**
+     * @return the distance between points {@param p1} and {@param p2}.
+     */
+    private float distanceBetweenRectOffsets(Rect r1, Rect r2) {
+        return PointF.length(r1.left - r2.left, r1.top - r2.top);
+    }
+
+    public void dump(PrintWriter pw, String prefix) {
+        final String innerPrefix = prefix + "  ";
+        pw.println(prefix + TAG);
+        pw.println(innerPrefix + "mBounds=" + mBounds);
+        pw.println(innerPrefix + "mStableInsets=" + mStableInsets);
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java
index 30aa03c..d832810 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java
@@ -16,23 +16,13 @@
 
 package com.android.systemui.pip.phone;
 
-import static android.app.ActivityManager.StackId.PINNED_STACK_ID;
 import static android.view.WindowManager.INPUT_CONSUMER_PIP;
 
-import static com.android.systemui.Interpolators.FAST_OUT_LINEAR_IN;
-import static com.android.systemui.Interpolators.FAST_OUT_SLOW_IN;
-import static com.android.systemui.Interpolators.LINEAR_OUT_SLOW_IN;
-
-import android.animation.Animator;
-import android.animation.AnimatorListenerAdapter;
-import android.animation.ValueAnimator;
-import android.animation.ValueAnimator.AnimatorUpdateListener;
-import android.app.ActivityManager.StackInfo;
 import android.app.IActivityManager;
 import android.content.Context;
-import android.graphics.Point;
 import android.graphics.PointF;
 import android.graphics.Rect;
+import android.os.Handler;
 import android.os.Looper;
 import android.os.RemoteException;
 import android.util.Log;
@@ -46,34 +36,26 @@
 
 import com.android.internal.logging.MetricsLogger;
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
-import com.android.internal.os.BackgroundThread;
-import com.android.internal.policy.PipMotionHelper;
 import com.android.internal.policy.PipSnapAlgorithm;
 import com.android.systemui.statusbar.FlingAnimationUtils;
-import com.android.systemui.tuner.TunerService;
+
+import java.io.PrintWriter;
 
 /**
  * Manages all the touch handling for PIP on the Phone, including moving, dismissing and expanding
  * the PIP.
  */
-public class PipTouchHandler implements TunerService.Tunable {
+public class PipTouchHandler {
     private static final String TAG = "PipTouchHandler";
-    private static final boolean DEBUG_ALLOW_OUT_OF_BOUNDS_STACK = false;
 
     // These values are used for metrics and should never change
     private static final int METRIC_VALUE_DISMISSED_BY_TAP = 0;
     private static final int METRIC_VALUE_DISMISSED_BY_DRAG = 1;
 
-    private static final String TUNER_KEY_DRAG_TO_DISMISS = "pip_drag_to_dismiss";
-    private static final String TUNER_KEY_ALLOW_MINIMIZE = "pip_allow_minimize";
+    private static final int SHOW_DISMISS_AFFORDANCE_DELAY = 200;
 
-    private static final int SNAP_STACK_DURATION = 225;
-    private static final int DISMISS_STACK_DURATION = 375;
-    private static final int EXPAND_STACK_DURATION = 225;
-    private static final int MINIMIZE_STACK_MAX_DURATION = 200;
-
-    // The fraction of the stack width that the user has to drag offscreen to minimize the PIP
-    private static final float MINIMIZE_OFFSCREEN_FRACTION = 0.2f;
+    // Allow dragging the PIP to a location to close it
+    private static final boolean ENABLE_DRAG_TO_DISMISS = false;
 
     private final Context mContext;
     private final IActivityManager mActivityManager;
@@ -83,38 +65,44 @@
     private IPinnedStackController mPinnedStackController;
 
     private PipInputEventReceiver mInputEventReceiver;
-    private PipMenuActivityController mMenuController;
-    private PipDismissViewController mDismissViewController;
+    private final PipMenuActivityController mMenuController;
+    private final PipDismissViewController mDismissViewController;
     private final PipSnapAlgorithm mSnapAlgorithm;
-    private PipMotionHelper mMotionHelper;
 
-    // Allow dragging the PIP to a location to close it
-    private boolean mEnableDragToDismiss = false;
-    // Allow the PIP to be "docked" slightly offscreen
-    private boolean mEnableMinimizing = true;
+    // The current movement bounds
+    private Rect mMovementBounds = new Rect();
 
-    private final Rect mStableInsets = new Rect();
-    private final Rect mPinnedStackBounds = new Rect();
-    private final Rect mBoundedPinnedStackBounds = new Rect();
-    private ValueAnimator mPinnedStackBoundsAnimator = null;
-    private ValueAnimator.AnimatorUpdateListener mUpdatePinnedStackBoundsListener =
-            new AnimatorUpdateListener() {
+    // The reference bounds used to calculate the normal/expanded target bounds
+    private Rect mNormalBounds = new Rect();
+    private Rect mNormalMovementBounds = new Rect();
+    private Rect mExpandedBounds = new Rect();
+    private Rect mExpandedMovementBounds = new Rect();
+
+    private Handler mHandler = new Handler();
+    private Runnable mShowDismissAffordance = new Runnable() {
         @Override
-        public void onAnimationUpdate(ValueAnimator animation) {
-            mPinnedStackBounds.set((Rect) animation.getAnimatedValue());
+        public void run() {
+            if (ENABLE_DRAG_TO_DISMISS) {
+                mDismissViewController.showDismissTarget(mMotionHelper.getBounds());
+            }
         }
     };
 
     // Behaviour states
     private boolean mIsTappingThrough;
     private boolean mIsMinimized;
+    private boolean mIsMenuVisible;
+    private boolean mIsImeShowing;
+    private int mImeHeight;
+    private float mSavedSnapFraction = -1f;
 
     // Touch state
     private final PipTouchState mTouchState;
     private final FlingAnimationUtils mFlingAnimationUtils;
     private final PipTouchGesture[] mGestures;
+    private final PipMotionHelper mMotionHelper;
 
-    // Temporary vars
+    // Temp vars
     private final Rect mTmpBounds = new Rect();
 
     /**
@@ -147,32 +135,25 @@
     private class PipMenuListener implements PipMenuActivityController.Listener {
         @Override
         public void onPipMenuVisibilityChanged(boolean visible) {
-            if (!visible) {
-                mIsTappingThrough = false;
-                registerInputConsumer();
-            } else {
-                unregisterInputConsumer();
-            }
-            MetricsLogger.visibility(mContext, MetricsEvent.ACTION_PICTURE_IN_PICTURE_MENU,
-                    visible);
+            setMenuVisibilityState(visible);
         }
 
         @Override
         public void onPipExpand() {
             if (!mIsMinimized) {
-                expandPinnedStackToFullscreen();
+                mMotionHelper.expandPip();
             }
         }
 
         @Override
         public void onPipMinimize() {
-            setMinimizedState(true);
-            animateToClosestMinimizedTarget();
+            setMinimizedStateInternal(true);
+            mMotionHelper.animateToClosestMinimizedState(mMovementBounds, mMenuController);
         }
 
         @Override
         public void onPipDismiss() {
-            BackgroundThread.getHandler().post(PipTouchHandler.this::dismissPinnedStack);
+            mMotionHelper.dismissPip();
             MetricsLogger.action(mContext, MetricsEvent.ACTION_PICTURE_IN_PICTURE_DISMISSED,
                     METRIC_VALUE_DISMISSED_BY_TAP);
         }
@@ -193,34 +174,11 @@
         mTouchState = new PipTouchState(mViewConfig);
         mFlingAnimationUtils = new FlingAnimationUtils(context, 2f);
         mGestures = new PipTouchGesture[] {
-                mDragToDismissGesture, mDefaultMovementGesture
+                mDefaultMovementGesture
         };
-        mMotionHelper = new PipMotionHelper(BackgroundThread.getHandler());
+        mMotionHelper = new PipMotionHelper(mContext, mActivityManager, mSnapAlgorithm,
+                mFlingAnimationUtils);
         registerInputConsumer();
-        setSnapToEdge(true);
-
-        // Register any tuner settings changes
-        TunerService.get(context).addTunable(this, TUNER_KEY_DRAG_TO_DISMISS,
-                TUNER_KEY_ALLOW_MINIMIZE);
-    }
-
-    @Override
-    public void onTuningChanged(String key, String newValue) {
-        if (newValue == null) {
-            // Reset back to default
-            mEnableDragToDismiss = false;
-            mEnableMinimizing = true;
-            setMinimizedState(false);
-            return;
-        }
-        switch (key) {
-            case TUNER_KEY_DRAG_TO_DISMISS:
-                mEnableDragToDismiss = Integer.parseInt(newValue) != 0;
-                break;
-            case TUNER_KEY_ALLOW_MINIMIZE:
-                mEnableMinimizing = Integer.parseInt(newValue) != 0;
-                break;
-        }
     }
 
     public void onActivityPinned() {
@@ -230,26 +188,70 @@
             registerInputConsumer();
         }
         if (mIsMinimized) {
-            setMinimizedState(false);
+            setMinimizedStateInternal(false);
         }
     }
 
     public void onConfigurationChanged() {
-        mSnapAlgorithm.onConfigurationChanged();
-        updateBoundedPinnedStackBounds(false /* updatePinnedStackBounds */);
+        mMotionHelper.onConfigurationChanged();
+        mMotionHelper.synchronizePinnedStackBounds();
     }
 
-    public void onMinimizedStateChanged(boolean isMinimized) {
-        if (mIsMinimized != isMinimized) {
-            MetricsLogger.action(mContext, MetricsEvent.ACTION_PICTURE_IN_PICTURE_MINIMIZED,
-                    isMinimized);
+    public void onImeVisibilityChanged(boolean imeVisible, int imeHeight) {
+        mIsImeShowing = imeVisible;
+        mImeHeight = imeHeight;
+    }
+
+    public void onMovementBoundsChanged(Rect insetBounds, Rect normalBounds,
+            boolean fromImeAdjustement) {
+        // Re-calculate the expanded bounds
+        mNormalBounds = normalBounds;
+        Rect normalMovementBounds = new Rect();
+        mSnapAlgorithm.getMovementBounds(mNormalBounds, insetBounds, normalMovementBounds,
+                mIsImeShowing ? mImeHeight : 0);
+        // TODO: Figure out the expanded size policy
+        mExpandedBounds = new Rect(normalBounds);
+        Rect expandedMovementBounds = new Rect();
+        mSnapAlgorithm.getMovementBounds(mExpandedBounds, insetBounds, expandedMovementBounds,
+                mIsImeShowing ? mImeHeight : 0);
+
+
+        // If this is from an IME adjustment, then we should move the PiP so that it is not occluded
+        // by the IME
+        if (fromImeAdjustement) {
+            if (mTouchState.isUserInteracting()) {
+                // Defer the update of the current movement bounds until after the user finishes
+                // touching the screen
+            } else {
+                final Rect bounds = new Rect(mMotionHelper.getBounds());
+                final Rect toMovementBounds = mIsMenuVisible
+                        ? expandedMovementBounds
+                        : normalMovementBounds;
+                if (mIsImeShowing) {
+                    // IME visible
+                    if (bounds.top == mMovementBounds.bottom) {
+                        // If the PIP is currently resting on top of the IME, then adjust it with
+                        // the hiding IME
+                        bounds.offsetTo(bounds.left, toMovementBounds.bottom);
+                    } else {
+                        bounds.offset(0, Math.min(0, toMovementBounds.bottom - bounds.top));
+                    }
+                } else {
+                    // IME hidden
+                    if (bounds.top == mMovementBounds.bottom) {
+                        // If the PIP is resting on top of the IME, then adjust it with the hiding IME
+                        bounds.offsetTo(bounds.left, toMovementBounds.bottom);
+                    }
+                }
+                mMotionHelper.animateToBounds(bounds);
+            }
         }
-        mIsMinimized = isMinimized;
-        mSnapAlgorithm.setMinimized(isMinimized);
-    }
 
-    public void onSnapToEdgeStateChanged(boolean isSnapToEdge) {
-        mSnapAlgorithm.setSnapToEdge(isSnapToEdge);
+        // Update the movement bounds after doing the calculations based on the old movement bounds
+        // above
+        mNormalMovementBounds = normalMovementBounds;
+        mExpandedMovementBounds = expandedMovementBounds;
+        updateMovementBounds();
     }
 
     private boolean handleTouchEvent(MotionEvent ev) {
@@ -263,20 +265,11 @@
 
         switch (ev.getAction()) {
             case MotionEvent.ACTION_DOWN: {
-                // Cancel any existing animations on the pinned stack
-                if (mPinnedStackBoundsAnimator != null) {
-                    mPinnedStackBoundsAnimator.cancel();
-                }
+                mMotionHelper.synchronizePinnedStackBounds();
 
-                updateBoundedPinnedStackBounds(true /* updatePinnedStackBounds */);
                 for (PipTouchGesture gesture : mGestures) {
                     gesture.onDown(mTouchState);
                 }
-                try {
-                    mPinnedStackController.setInInteractiveMode(true);
-                } catch (RemoteException e) {
-                    Log.e(TAG, "Could not set dragging state", e);
-                }
                 break;
             }
             case MotionEvent.ACTION_MOVE: {
@@ -290,7 +283,7 @@
             case MotionEvent.ACTION_UP: {
                 // Update the movement bounds again if the state has changed since the user started
                 // dragging (ie. when the IME shows)
-                updateBoundedPinnedStackBounds(false /* updatePinnedStackBounds */);
+                updateMovementBounds();
 
                 for (PipTouchGesture gesture : mGestures) {
                     if (gesture.onUp(mTouchState)) {
@@ -301,11 +294,6 @@
                 // Fall through to clean up
             }
             case MotionEvent.ACTION_CANCEL: {
-                try {
-                    mPinnedStackController.setInInteractiveMode(false);
-                } catch (RemoteException e) {
-                    Log.e(TAG, "Could not set dragging state", e);
-                }
                 break;
             }
         }
@@ -313,16 +301,6 @@
     }
 
     /**
-     * @return whether the current touch state places the pip partially offscreen.
-     */
-    private boolean isDraggingOffscreen(PipTouchState touchState) {
-        PointF lastDelta = touchState.getLastTouchDelta();
-        PointF downDelta = touchState.getDownTouchDelta();
-        float left = mPinnedStackBounds.left + lastDelta.x;
-        return !(mBoundedPinnedStackBounds.left <= left && left <= mBoundedPinnedStackBounds.right);
-    }
-
-    /**
      * Registers the input consumer.
      */
     private void registerInputConsumer() {
@@ -361,27 +339,30 @@
     }
 
     /**
-     * Sets the snap-to-edge state and notifies the controller.
+     * Sets the minimized state.
      */
-    private void setSnapToEdge(boolean snapToEdge) {
-        onSnapToEdgeStateChanged(snapToEdge);
-
-        if (mPinnedStackController != null) {
-            try {
-                mPinnedStackController.setSnapToEdge(snapToEdge);
-            } catch (RemoteException e) {
-                Log.e(TAG, "Could not set snap mode to edge", e);
-            }
-        }
+    void setMinimizedStateInternal(boolean isMinimized) {
+        setMinimizedState(isMinimized, false /* fromController */);
     }
 
     /**
-     * Sets the minimized state and notifies the controller.
+     * Sets the minimized state.
      */
-    private void setMinimizedState(boolean isMinimized) {
-        onMinimizedStateChanged(isMinimized);
+    void setMinimizedState(boolean isMinimized, boolean fromController) {
+        if (mIsMinimized != isMinimized) {
+            MetricsLogger.action(mContext, MetricsEvent.ACTION_PICTURE_IN_PICTURE_MINIMIZED,
+                    isMinimized);
+        }
+        mIsMinimized = isMinimized;
+        mSnapAlgorithm.setMinimized(isMinimized);
 
-        if (mPinnedStackController != null) {
+        if (fromController) {
+            if (isMinimized) {
+                // Move the PiP to the new bounds immediately if minimized
+                mMotionHelper.movePip(mMotionHelper.getClosestMinimizedBounds(mNormalBounds,
+                        mMovementBounds));
+            }
+        } else if (mPinnedStackController != null) {
             try {
                 mPinnedStackController.setIsMinimized(isMinimized);
             } catch (RemoteException e) {
@@ -391,243 +372,85 @@
     }
 
     /**
-     * @return whether the given {@param pinnedStackBounds} indicates the PIP should be minimized.
+     * Sets the menu visibility.
      */
-    private boolean shouldMinimizedPinnedStack() {
-        Point displaySize = new Point();
-        mContext.getDisplay().getRealSize(displaySize);
-        if (mPinnedStackBounds.left < 0) {
-            float offscreenFraction = (float) -mPinnedStackBounds.left / mPinnedStackBounds.width();
-            return offscreenFraction >= MINIMIZE_OFFSCREEN_FRACTION;
-        } else if (mPinnedStackBounds.right > displaySize.x) {
-            float offscreenFraction = (float) (mPinnedStackBounds.right - displaySize.x) /
-                    mPinnedStackBounds.width();
-            return offscreenFraction >= MINIMIZE_OFFSCREEN_FRACTION;
+    void setMenuVisibilityState(boolean isMenuVisible) {
+        if (!isMenuVisible) {
+            mIsTappingThrough = false;
+            registerInputConsumer();
         } else {
-            return false;
+            unregisterInputConsumer();
         }
-    }
+        MetricsLogger.visibility(mContext, MetricsEvent.ACTION_PICTURE_IN_PICTURE_MENU,
+                isMenuVisible);
 
-    /**
-     * Flings the minimized PIP to the closest minimized snap target.
-     */
-    private void flingToMinimizedSnapTarget(float velocityY) {
-        // We currently only allow flinging the minimized stack up and down, so just lock the
-        // movement bounds to the current stack bounds horizontally
-        Rect movementBounds = new Rect(mPinnedStackBounds.left, mBoundedPinnedStackBounds.top,
-                mPinnedStackBounds.left, mBoundedPinnedStackBounds.bottom);
-        Rect toBounds = mSnapAlgorithm.findClosestSnapBounds(movementBounds, mPinnedStackBounds,
-                0 /* velocityX */, velocityY);
-        if (!mPinnedStackBounds.equals(toBounds)) {
-            mPinnedStackBoundsAnimator = mMotionHelper.createAnimationToBounds(mPinnedStackBounds,
-                    toBounds, 0, FAST_OUT_SLOW_IN, mUpdatePinnedStackBoundsListener);
-            mFlingAnimationUtils.apply(mPinnedStackBoundsAnimator, 0,
-                    distanceBetweenRectOffsets(mPinnedStackBounds, toBounds),
-                    velocityY);
-            mPinnedStackBoundsAnimator.start();
-        }
-    }
-
-    /**
-     * Animates the PIP to the minimized state, slightly offscreen.
-     */
-    private void animateToClosestMinimizedTarget() {
-        Point displaySize = new Point();
-        mContext.getDisplay().getRealSize(displaySize);
-        Rect toBounds = mSnapAlgorithm.findClosestSnapBounds(mBoundedPinnedStackBounds,
-                mPinnedStackBounds);
-        mSnapAlgorithm.applyMinimizedOffset(toBounds, mBoundedPinnedStackBounds, displaySize,
-                mStableInsets);
-        mPinnedStackBoundsAnimator = mMotionHelper.createAnimationToBounds(mPinnedStackBounds,
-                toBounds, MINIMIZE_STACK_MAX_DURATION, LINEAR_OUT_SLOW_IN,
-                mUpdatePinnedStackBoundsListener);
-        mPinnedStackBoundsAnimator.addListener(new AnimatorListenerAdapter() {
-            @Override
-            public void onAnimationStart(Animator animation) {
-                mMenuController.hideMenu();
+        if (isMenuVisible != mIsMenuVisible) {
+            if (isMenuVisible) {
+                // Save the current snap fraction and if we do not drag or move the PiP, then
+                // we store back to this snap fraction.  Otherwise, we'll reset the snap
+                // fraction and snap to the closest edge
+                Rect expandedBounds = new Rect(mExpandedBounds);
+                mSavedSnapFraction = mMotionHelper.animateToExpandedState(expandedBounds,
+                        mMovementBounds, mExpandedMovementBounds);
+            } else {
+                // Try and restore the PiP to the closest edge, using the saved snap fraction
+                // if possible
+                Rect normalBounds = new Rect(mNormalBounds);
+                mMotionHelper.animateToUnexpandedState(normalBounds, mSavedSnapFraction,
+                        mNormalMovementBounds);
             }
-        });
-        mPinnedStackBoundsAnimator.start();
-    }
-
-    /**
-     * Flings the PIP to the closest snap target.
-     */
-    private Rect flingToSnapTarget(float velocity, float velocityX, float velocityY) {
-        Rect toBounds = mSnapAlgorithm.findClosestSnapBounds(mBoundedPinnedStackBounds,
-                mPinnedStackBounds, velocityX, velocityY);
-        if (!mPinnedStackBounds.equals(toBounds)) {
-            mPinnedStackBoundsAnimator = mMotionHelper.createAnimationToBounds(mPinnedStackBounds,
-                toBounds, 0, FAST_OUT_SLOW_IN, mUpdatePinnedStackBoundsListener);
-            mFlingAnimationUtils.apply(mPinnedStackBoundsAnimator, 0,
-                distanceBetweenRectOffsets(mPinnedStackBounds, toBounds),
-                velocity);
-            mPinnedStackBoundsAnimator.start();
-        }
-        return toBounds;
-    }
-
-    /**
-     * Animates the PIP to the closest snap target.
-     */
-    private Rect animateToClosestSnapTarget() {
-        Rect toBounds = mSnapAlgorithm.findClosestSnapBounds(mBoundedPinnedStackBounds,
-                mPinnedStackBounds);
-        if (!mPinnedStackBounds.equals(toBounds)) {
-            mPinnedStackBoundsAnimator = mMotionHelper.createAnimationToBounds(mPinnedStackBounds,
-                toBounds, SNAP_STACK_DURATION, FAST_OUT_SLOW_IN, mUpdatePinnedStackBoundsListener);
-            mPinnedStackBoundsAnimator.start();
-        }
-        return toBounds;
-    }
-
-    /**
-     * Animates the dismissal of the PIP over the dismiss target bounds.
-     */
-    private void animateDismissPinnedStack(Rect dismissBounds) {
-        Rect toBounds = new Rect(dismissBounds.centerX(),
-            dismissBounds.centerY(),
-            dismissBounds.centerX() + 1,
-            dismissBounds.centerY() + 1);
-        mPinnedStackBoundsAnimator = mMotionHelper.createAnimationToBounds(mPinnedStackBounds,
-            toBounds, DISMISS_STACK_DURATION, FAST_OUT_LINEAR_IN, mUpdatePinnedStackBoundsListener);
-        mPinnedStackBoundsAnimator.addListener(new AnimatorListenerAdapter() {
-            @Override
-            public void onAnimationEnd(Animator animation) {
-                BackgroundThread.getHandler().post(PipTouchHandler.this::dismissPinnedStack);
-            }
-        });
-        mPinnedStackBoundsAnimator.start();
-    }
-
-    /**
-     * Resizes the pinned stack back to fullscreen.
-     */
-    void expandPinnedStackToFullscreen() {
-        BackgroundThread.getHandler().post(() -> {
-            try {
-                mActivityManager.resizeStack(PINNED_STACK_ID, null /* bounds */,
-                        true /* allowResizeInDockedMode */, true /* preserveWindows */,
-                        true /* animate */, EXPAND_STACK_DURATION);
-            } catch (RemoteException e) {
-                Log.e(TAG, "Error showing PIP menu activity", e);
-            }
-        });
-    }
-
-    /**
-     * Tries to the move the pinned stack to the given {@param bounds}.
-     */
-    private void movePinnedStack(Rect bounds) {
-        if (!bounds.equals(mPinnedStackBounds)) {
-            mPinnedStackBounds.set(bounds);
-            mMotionHelper.resizeToBounds(mPinnedStackBounds);
+            mIsMenuVisible = isMenuVisible;
+            updateMovementBounds();
         }
     }
 
     /**
-     * Dismisses the pinned stack.
+     * @return the motion helper.
      */
-    private void dismissPinnedStack() {
-        try {
-            mActivityManager.removeStack(PINNED_STACK_ID);
-        } catch (RemoteException e) {
-            Log.e(TAG, "Failed to remove PIP", e);
-        }
+    public PipMotionHelper getMotionHelper() {
+        return mMotionHelper;
     }
 
     /**
-     * Updates the movement bounds of the pinned stack.
-     */
-    private void updateBoundedPinnedStackBounds(boolean updatePinnedStackBounds) {
-        try {
-            StackInfo info = mActivityManager.getStackInfo(PINNED_STACK_ID);
-            if (info != null) {
-                if (updatePinnedStackBounds) {
-                    mPinnedStackBounds.set(info.bounds);
-                }
-                mWindowManager.getStableInsets(info.displayId, mStableInsets);
-                mBoundedPinnedStackBounds.set(mWindowManager.getPictureInPictureMovementBounds(
-                        info.displayId));
-            }
-        } catch (RemoteException e) {
-            Log.e(TAG, "Could not fetch PIP movement bounds.", e);
-        }
-    }
-
-    /**
-     * @return the distance between points {@param p1} and {@param p2}.
-     */
-    private float distanceBetweenRectOffsets(Rect r1, Rect r2) {
-        return PointF.length(r1.left - r2.left, r1.top - r2.top);
-    }
-
-    /**
-     * Gesture controlling dragging over a target to dismiss the PIP.
-     */
-    private PipTouchGesture mDragToDismissGesture = new PipTouchGesture() {
-        @Override
-        public void onDown(PipTouchState touchState) {
-            if (mEnableDragToDismiss) {
-                // TODO: Consider setting a timer such at after X time, we show the dismiss
-                //       target if the user hasn't already dragged some distance
-                mDismissViewController.createDismissTarget();
-            }
-        }
-
-        @Override
-        boolean onMove(PipTouchState touchState) {
-            if (mEnableDragToDismiss && touchState.startedDragging()) {
-                mDismissViewController.showDismissTarget();
-            }
-            return false;
-        }
-
-        @Override
-        public boolean onUp(PipTouchState touchState) {
-            if (mEnableDragToDismiss) {
-                try {
-                    if (touchState.isDragging()) {
-                        Rect dismissBounds = mDismissViewController.getDismissBounds();
-                        PointF lastTouch = touchState.getLastTouchPosition();
-                        if (dismissBounds.contains((int) lastTouch.x, (int) lastTouch.y)) {
-                            animateDismissPinnedStack(dismissBounds);
-                            MetricsLogger.action(mContext,
-                                    MetricsEvent.ACTION_PICTURE_IN_PICTURE_DISMISSED,
-                                            METRIC_VALUE_DISMISSED_BY_DRAG);
-                            return true;
-                        }
-                    }
-                } finally {
-                    mDismissViewController.destroyDismissTarget();
-                }
-            }
-            return false;
-        }
-    };
-
-    /**** Gestures ****/
-
-    /**
      * Gesture controlling normal movement of the PIP.
      */
     private PipTouchGesture mDefaultMovementGesture = new PipTouchGesture() {
+
+        @Override
+        public void onDown(PipTouchState touchState) {
+            if (ENABLE_DRAG_TO_DISMISS) {
+                mDismissViewController.createDismissTarget();
+                mHandler.postDelayed(mShowDismissAffordance, SHOW_DISMISS_AFFORDANCE_DELAY);
+            }
+        }
+
         @Override
         boolean onMove(PipTouchState touchState) {
+            if (touchState.startedDragging()) {
+                mSavedSnapFraction = -1f;
+            }
+
+            if (touchState.startedDragging() && ENABLE_DRAG_TO_DISMISS) {
+                mHandler.removeCallbacks(mShowDismissAffordance);
+                mDismissViewController.showDismissTarget(mMotionHelper.getBounds());
+            }
+
             if (touchState.isDragging()) {
                 // Move the pinned stack freely
-                PointF lastDelta = touchState.getLastTouchDelta();
-                float left = mPinnedStackBounds.left + lastDelta.x;
-                float top = mPinnedStackBounds.top + lastDelta.y;
+                mTmpBounds.set(mMotionHelper.getBounds());
+                final PointF lastDelta = touchState.getLastTouchDelta();
+                float left = mTmpBounds.left + lastDelta.x;
+                float top = mTmpBounds.top + lastDelta.y;
                 if (!touchState.allowDraggingOffscreen()) {
-                    left = Math.max(mBoundedPinnedStackBounds.left, Math.min(
-                            mBoundedPinnedStackBounds.right, left));
+                    left = Math.max(mMovementBounds.left, Math.min(mMovementBounds.right, left));
                 }
-                top = Math.max(mBoundedPinnedStackBounds.top, Math.min(
-                        mBoundedPinnedStackBounds.bottom, top));
-                mTmpBounds.set(mPinnedStackBounds);
+                top = Math.max(mMovementBounds.top, Math.min(mMovementBounds.bottom, top));
                 mTmpBounds.offsetTo((int) left, (int) top);
-                movePinnedStack(mTmpBounds);
+                mMotionHelper.movePip(mTmpBounds);
+
+                if (ENABLE_DRAG_TO_DISMISS) {
+                    mDismissViewController.updateDismissTarget(mTmpBounds);
+                }
                 return true;
             }
             return false;
@@ -635,36 +458,56 @@
 
         @Override
         public boolean onUp(PipTouchState touchState) {
+            try {
+                if (ENABLE_DRAG_TO_DISMISS) {
+                    mHandler.removeCallbacks(mShowDismissAffordance);
+                    PointF vel = mTouchState.getVelocity();
+                    final float velocity = PointF.length(vel.x, vel.y);
+                    if (touchState.isDragging()
+                            && velocity < mFlingAnimationUtils.getMinVelocityPxPerSecond()) {
+                        if (mDismissViewController.shouldDismiss(mMotionHelper.getBounds())) {
+                            Rect dismissBounds = mDismissViewController.getDismissBounds();
+                            mMotionHelper.animateDismissFromDrag(dismissBounds);
+                            MetricsLogger.action(mContext,
+                                    MetricsEvent.ACTION_PICTURE_IN_PICTURE_DISMISSED,
+                                    METRIC_VALUE_DISMISSED_BY_DRAG);
+                            return true;
+                        }
+                    }
+                }
+            } finally {
+                mDismissViewController.destroyDismissTarget();
+            }
             if (touchState.isDragging()) {
                 PointF vel = mTouchState.getVelocity();
-                if (!mIsMinimized && (shouldMinimizedPinnedStack()
+                if (!mIsMinimized && (mMotionHelper.shouldMinimizePip()
                         || isHorizontalFlingTowardsCurrentEdge(vel))) {
                     // Pip should be minimized
-                    setMinimizedState(true);
-                    animateToClosestMinimizedTarget();
+                    setMinimizedStateInternal(true);
+                    mMotionHelper.animateToClosestMinimizedState(mMovementBounds, mMenuController);
                     return true;
                 }
                 if (mIsMinimized) {
                     // If we're dragging and it wasn't a minimize gesture
                     // then we shouldn't be minimized.
-                    setMinimizedState(false);
+                    setMinimizedStateInternal(false);
                 }
 
                 final float velocity = PointF.length(vel.x, vel.y);
                 if (velocity > mFlingAnimationUtils.getMinVelocityPxPerSecond()) {
-                    flingToSnapTarget(velocity, vel.x, vel.y);
+                    mMotionHelper.flingToSnapTarget(velocity, vel.x, vel.y, mMovementBounds);
                 } else {
-                    animateToClosestSnapTarget();
+                    mMotionHelper.animateToClosestSnapTarget(mMovementBounds);
                 }
             } else if (mIsMinimized) {
                 // This was a tap, so no longer minimized
-                animateToClosestSnapTarget();
-                setMinimizedState(false);
+                mMotionHelper.animateToClosestSnapTarget(mMovementBounds);
+                setMinimizedStateInternal(false);
             } else if (!mIsTappingThrough) {
                 mMenuController.showMenu();
                 mIsTappingThrough = true;
             } else {
-                expandPinnedStackToFullscreen();
+                mMotionHelper.expandPip();
             }
             return true;
         }
@@ -678,17 +521,50 @@
         final boolean isHorizontal = Math.abs(vel.x) > Math.abs(vel.y);
         final boolean isFling = PointF.length(vel.x, vel.y) > mFlingAnimationUtils
                 .getMinVelocityPxPerSecond();
-        final boolean towardsCurrentEdge = onEdge(true /* left */) && vel.x < 0
-                || onEdge(false /* right */) && vel.x > 0;
+        final boolean towardsCurrentEdge = isOverEdge(true /* left */) && vel.x < 0
+                || isOverEdge(false /* right */) && vel.x > 0;
         return towardsCurrentEdge && isHorizontal && isFling;
     }
 
-    private boolean onEdge(boolean checkLeft) {
+    /**
+     * @return whether the given bounds are on the left or right edge (depending on
+     *         {@param checkLeft})
+     */
+    private boolean isOverEdge(boolean checkLeft) {
+        final Rect bounds = mMotionHelper.getBounds();
         if (checkLeft) {
-            return mPinnedStackBounds.left <= mBoundedPinnedStackBounds.left;
+            return bounds.left <= mMovementBounds.left;
         } else {
-            return mPinnedStackBounds.right >= mBoundedPinnedStackBounds.right
-                    + mPinnedStackBounds.width();
+            return bounds.right >= mMovementBounds.right + bounds.width();
         }
     }
+
+    /**
+     * Updates the current movement bounds based on whether the menu is currently visible.
+     */
+    private void updateMovementBounds() {
+        mMovementBounds = mIsMenuVisible
+                ? mExpandedMovementBounds
+                : mNormalMovementBounds;
+    }
+
+    public void dump(PrintWriter pw, String prefix) {
+        final String innerPrefix = prefix + "  ";
+        pw.println(prefix + TAG);
+        pw.println(innerPrefix + "mMovementBounds=" + mMovementBounds);
+        pw.println(innerPrefix + "mNormalBounds=" + mNormalBounds);
+        pw.println(innerPrefix + "mNormalMovementBounds=" + mNormalMovementBounds);
+        pw.println(innerPrefix + "mExpandedBounds=" + mExpandedBounds);
+        pw.println(innerPrefix + "mExpandedMovementBounds=" + mExpandedMovementBounds);
+        pw.println(innerPrefix + "mIsTappingThrough=" + mIsTappingThrough);
+        pw.println(innerPrefix + "mIsMinimized=" + mIsMinimized);
+        pw.println(innerPrefix + "mIsMenuVisible=" + mIsMenuVisible);
+        pw.println(innerPrefix + "mIsImeShowing=" + mIsImeShowing);
+        pw.println(innerPrefix + "mImeHeight=" + mImeHeight);
+        pw.println(innerPrefix + "mSavedSnapFraction=" + mSavedSnapFraction);
+        pw.println(innerPrefix + "mEnableDragToDismiss=" + ENABLE_DRAG_TO_DISMISS);
+        mSnapAlgorithm.dump(pw, innerPrefix);
+        mTouchState.dump(pw, innerPrefix);
+        mMotionHelper.dump(pw, innerPrefix);
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchState.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchState.java
index 2e84ced..702ad0a 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchState.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchState.java
@@ -21,10 +21,13 @@
 import android.view.VelocityTracker;
 import android.view.ViewConfiguration;
 
+import java.io.PrintWriter;
+
 /**
  * This keeps track of the touch state throughout the current touch gesture.
  */
 public class PipTouchState {
+    private static final String TAG = "PipTouchHandler";
 
     private ViewConfiguration mViewConfig;
 
@@ -34,6 +37,7 @@
     private final PointF mLastTouch = new PointF();
     private final PointF mLastDelta = new PointF();
     private final PointF mVelocity = new PointF();
+    private boolean mIsUserInteracting = false;
     private boolean mIsDragging = false;
     private boolean mStartedDragging = false;
     private boolean mAllowDraggingOffscreen = false;
@@ -57,6 +61,7 @@
                 mIsDragging = false;
                 mStartedDragging = false;
                 mAllowDraggingOffscreen = true;
+                mIsUserInteracting = true;
                 break;
             }
             case MotionEvent.ACTION_MOVE: {
@@ -107,6 +112,7 @@
                 // Fall through to clean up
             }
             case MotionEvent.ACTION_CANCEL: {
+                mIsUserInteracting = false;
                 recycleVelocityTracker();
                 break;
             }
@@ -151,6 +157,13 @@
     }
 
     /**
+     * @return whether the user is currently interacting with the PiP.
+     */
+    public boolean isUserInteracting() {
+        return mIsUserInteracting;
+    }
+
+    /**
      * @return whether the user has started dragging just in the last handled touch event.
      */
     public boolean startedDragging() {
@@ -185,4 +198,18 @@
             mVelocityTracker = null;
         }
     }
+
+    public void dump(PrintWriter pw, String prefix) {
+        final String innerPrefix = prefix + "  ";
+        pw.println(prefix + TAG);
+        pw.println(innerPrefix + "mDownTouch=" + mDownTouch);
+        pw.println(innerPrefix + "mDownDelta=" + mDownDelta);
+        pw.println(innerPrefix + "mLastTouch=" + mLastTouch);
+        pw.println(innerPrefix + "mLastDelta=" + mLastDelta);
+        pw.println(innerPrefix + "mVelocity=" + mVelocity);
+        pw.println(innerPrefix + "mIsUserInteracting=" + mIsUserInteracting);
+        pw.println(innerPrefix + "mIsDragging=" + mIsDragging);
+        pw.println(innerPrefix + "mStartedDragging=" + mStartedDragging);
+        pw.println(innerPrefix + "mAllowDraggingOffscreen=" + mAllowDraggingOffscreen);
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/pip/tv/PipManager.java b/packages/SystemUI/src/com/android/systemui/pip/tv/PipManager.java
index 964fefa..112fedb 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/tv/PipManager.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/tv/PipManager.java
@@ -25,6 +25,7 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
+import android.content.pm.ParceledListSlice;
 import android.content.res.Resources;
 import android.graphics.Rect;
 import android.media.session.MediaController;
@@ -39,24 +40,30 @@
 import android.util.Log;
 import android.util.Pair;
 import android.view.Display;
+import android.view.IPinnedStackController;
+import android.view.IPinnedStackListener;
 import android.view.IWindowManager;
 import android.view.WindowManagerGlobal;
 
 import com.android.systemui.Prefs;
 import com.android.systemui.R;
+import com.android.systemui.pip.BasePipManager;
 import com.android.systemui.recents.misc.SystemServicesProxy;
 import com.android.systemui.recents.misc.SystemServicesProxy.TaskStackListener;
 
+import java.io.PrintWriter;
 import java.util.ArrayList;
 import java.util.List;
 
 import static android.app.ActivityManager.StackId.PINNED_STACK_ID;
+import static android.view.Display.DEFAULT_DISPLAY;
+
 import static com.android.systemui.Prefs.Key.TV_PICTURE_IN_PICTURE_ONBOARDING_SHOWN;
 
 /**
  * Manages the picture-in-picture (PIP) UI and states.
  */
-public class PipManager {
+public class PipManager implements BasePipManager {
     private static final String TAG = "PipManager";
     private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
     private static final boolean DEBUG_FORCE_ONBOARDING =
@@ -146,7 +153,7 @@
     private List<MediaListener> mMediaListeners = new ArrayList<>();
     private Rect mCurrentPipBounds;
     private Rect mPipBounds;
-    private Rect mDefaultPipBounds;
+    private Rect mDefaultPipBounds = new Rect();
     private Rect mSettingsPipBounds;
     private Rect mMenuModePipBounds;
     private Rect mRecentsPipBounds;
@@ -159,6 +166,8 @@
     private boolean mOnboardingShown;
     private String[] mLastPackagesResourceGranted;
 
+    private final PinnedStackListener mPinnedStackListener = new PinnedStackListener();
+
     private final Runnable mResizePinnedStackRunnable = new Runnable() {
         @Override
         public void run() {
@@ -196,6 +205,32 @@
                 }
             };
 
+    /**
+     * Handler for messages from the PIP controller.
+     */
+    private class PinnedStackListener extends IPinnedStackListener.Stub {
+
+        @Override
+        public void onListenerRegistered(IPinnedStackController controller) {}
+
+        @Override
+        public void onImeVisibilityChanged(boolean imeVisible, int imeHeight) {}
+
+        @Override
+        public void onMinimizedStateChanged(boolean isMinimized) {}
+
+        @Override
+        public void onMovementBoundsChanged(Rect insetBounds, Rect normalBounds,
+                boolean fromImeAdjustement) {
+            mHandler.post(() -> {
+                mDefaultPipBounds.set(normalBounds);
+            });
+        }
+
+        @Override
+        public void onActionsChanged(ParceledListSlice actions) {}
+    }
+
     private PipManager() { }
 
     /**
@@ -221,16 +256,16 @@
         mPipRecentsOverlayManager = new PipRecentsOverlayManager(context);
         mMediaSessionManager =
                 (MediaSessionManager) mContext.getSystemService(Context.MEDIA_SESSION_SERVICE);
+
+        try {
+            mWindowManager.registerPinnedStackListener(DEFAULT_DISPLAY, mPinnedStackListener);
+        } catch (RemoteException e) {
+            Log.e(TAG, "Failed to register pinned stack listener", e);
+        }
     }
 
     private void loadConfigurationsAndApply() {
         Resources res = mContext.getResources();
-        try {
-            mDefaultPipBounds = mWindowManager.getPictureInPictureDefaultBounds(
-                    Display.DEFAULT_DISPLAY);
-        } catch (RemoteException e) {
-            Log.e(TAG, "Failed to get default PIP bounds", e);
-        }
         mSettingsPipBounds = Rect.unflattenFromString(res.getString(
                 R.string.pip_settings_bounds));
         mMenuModePipBounds = Rect.unflattenFromString(res.getString(
@@ -746,4 +781,9 @@
     private void updatePipVisibility(final boolean visible) {
         SystemServicesProxy.getInstance(mContext).setTvPipVisibility(visible);
     }
+
+    @Override
+    public void dump(PrintWriter pw) {
+        // Do nothing
+    }
 }
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/PluginInstanceManager.java b/packages/SystemUI/src/com/android/systemui/plugins/PluginInstanceManager.java
similarity index 89%
rename from packages/SystemUI/plugin/src/com/android/systemui/plugins/PluginInstanceManager.java
rename to packages/SystemUI/src/com/android/systemui/plugins/PluginInstanceManager.java
index d71b6bd..e895fa2 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/PluginInstanceManager.java
+++ b/packages/SystemUI/src/com/android/systemui/plugins/PluginInstanceManager.java
@@ -18,12 +18,10 @@
 import android.app.Notification.Action;
 import android.app.NotificationManager;
 import android.app.PendingIntent;
-import android.content.BroadcastReceiver;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.ContextWrapper;
 import android.content.Intent;
-import android.content.IntentFilter;
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageManager;
 import android.content.pm.PackageManager.NameNotFoundException;
@@ -40,6 +38,7 @@
 
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
+import com.android.systemui.plugins.VersionInfo.InvalidVersionException;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -51,14 +50,11 @@
     private static final String TAG = "PluginInstanceManager";
     private static final String PLUGIN_PERMISSION = "com.android.systemui.permission.PLUGIN";
 
-    // must be one of the channels created in NotificationChannels.java
-    private static final String NOTIFICATION_CHANNEL_ID = "ALR";
-
     private final Context mContext;
     private final PluginListener<T> mListener;
     private final String mAction;
     private final boolean mAllowMultiple;
-    private final int mVersion;
+    private final VersionInfo mVersion;
 
     @VisibleForTesting
     final MainHandler mMainHandler;
@@ -69,14 +65,14 @@
     private final PluginManager mManager;
 
     PluginInstanceManager(Context context, String action, PluginListener<T> listener,
-            boolean allowMultiple, Looper looper, int version, PluginManager manager) {
+            boolean allowMultiple, Looper looper, VersionInfo version, PluginManager manager) {
         this(context, context.getPackageManager(), action, listener, allowMultiple, looper, version,
                 manager, Build.IS_DEBUGGABLE);
     }
 
     @VisibleForTesting
     PluginInstanceManager(Context context, PackageManager pm, String action,
-            PluginListener<T> listener, boolean allowMultiple, Looper looper, int version,
+            PluginListener<T> listener, boolean allowMultiple, Looper looper, VersionInfo version,
             PluginManager manager, boolean debuggable) {
         mMainHandler = new MainHandler(Looper.getMainLooper());
         mPluginHandler = new PluginHandler(looper);
@@ -304,37 +300,41 @@
                 Context pluginContext = new PluginContextWrapper(
                         mContext.createApplicationContext(info, 0), classLoader);
                 Class<?> pluginClass = Class.forName(cls, true, classLoader);
+                // TODO: Only create the plugin before version check if we need it for
+                // legacy version check.
                 T plugin = (T) pluginClass.newInstance();
-                if (plugin.getVersion() != mVersion) {
+                try {
+                    checkVersion(pluginClass, plugin, mVersion);
+                    if (DEBUG) Log.d(TAG, "createPlugin");
+                    return new PluginInfo(pkg, cls, plugin, pluginContext);
+                } catch (InvalidVersionException e) {
                     final int icon = mContext.getResources().getIdentifier("tuner", "drawable",
                             mContext.getPackageName());
                     final int color = Resources.getSystem().getIdentifier(
                             "system_notification_accent_color", "color", "android");
-                    final Notification.Builder nb = new Notification.Builder(mContext)
-                            .setStyle(new Notification.BigTextStyle())
-                            .setSmallIcon(icon)
-                            .setWhen(0)
-                            .setShowWhen(false)
-                            .setChannel(NOTIFICATION_CHANNEL_ID)
-                            .setVisibility(Notification.VISIBILITY_PUBLIC)
-                            .setColor(mContext.getColor(color));
+                    final Notification.Builder nb = new Notification.Builder(mContext,
+                            PluginManager.NOTIFICATION_CHANNEL_ID)
+                                    .setStyle(new Notification.BigTextStyle())
+                                    .setSmallIcon(icon)
+                                    .setWhen(0)
+                                    .setShowWhen(false)
+                                    .setVisibility(Notification.VISIBILITY_PUBLIC)
+                                    .setColor(mContext.getColor(color));
                     String label = cls;
                     try {
                         label = mPm.getServiceInfo(component, 0).loadLabel(mPm).toString();
-                    } catch (NameNotFoundException e) {
+                    } catch (NameNotFoundException e2) {
                     }
-                    if (plugin.getVersion() < mVersion) {
+                    if (!e.isTooNew()) {
                         // Localization not required as this will never ever appear in a user build.
                         nb.setContentTitle("Plugin \"" + label + "\" is too old")
                                 .setContentText("Contact plugin developer to get an updated"
-                                        + " version.\nPlugin version: " + plugin.getVersion()
-                                        + "\nSystem version: " + mVersion);
+                                        + " version.\n" + e.getMessage());
                     } else {
                         // Localization not required as this will never ever appear in a user build.
                         nb.setContentTitle("Plugin \"" + label + "\" is too new")
                                 .setContentText("Check to see if an OTA is available.\n"
-                                        + "Plugin version: " + plugin.getVersion()
-                                        + "\nSystem version: " + mVersion);
+                                        + e.getMessage());
                     }
                     Intent i = new Intent(PluginManager.DISABLE_PLUGIN).setData(
                             Uri.parse("package://" + component.flattenToString()));
@@ -348,13 +348,24 @@
                             + ", expected " + mVersion);
                     return null;
                 }
-                if (DEBUG) Log.d(TAG, "createPlugin");
-                return new PluginInfo(pkg, cls, plugin, pluginContext);
             } catch (Exception e) {
                 Log.w(TAG, "Couldn't load plugin: " + pkg, e);
                 return null;
             }
         }
+
+        private void checkVersion(Class<?> pluginClass, T plugin, VersionInfo version)
+                throws InvalidVersionException {
+            VersionInfo pv = new VersionInfo().addClass(pluginClass);
+            if (pv.hasVersionInfo()) {
+                version.checkVersion(pv);
+            } else {
+                int fallbackVersion = plugin.getVersion();
+                if (fallbackVersion != version.getDefaultVersion()) {
+                    throw new InvalidVersionException("Invalid legacy version", false);
+                }
+            }
+        }
     }
 
     public static class PluginContextWrapper extends ContextWrapper {
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/PluginManager.java b/packages/SystemUI/src/com/android/systemui/plugins/PluginManager.java
similarity index 84%
rename from packages/SystemUI/plugin/src/com/android/systemui/plugins/PluginManager.java
rename to packages/SystemUI/src/com/android/systemui/plugins/PluginManager.java
index 4714547..8b4bd7b 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/PluginManager.java
+++ b/packages/SystemUI/src/com/android/systemui/plugins/PluginManager.java
@@ -33,6 +33,7 @@
 import android.os.Looper;
 import android.os.SystemProperties;
 import android.os.UserHandle;
+import android.text.TextUtils;
 import android.util.ArrayMap;
 import android.util.ArraySet;
 
@@ -40,6 +41,7 @@
 import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
 import com.android.systemui.plugins.PluginInstanceManager.PluginContextWrapper;
 import com.android.systemui.plugins.PluginInstanceManager.PluginInfo;
+import com.android.systemui.plugins.annotations.ProvidesInterface;
 
 import dalvik.system.PathClassLoader;
 
@@ -55,6 +57,9 @@
 
     static final String DISABLE_PLUGIN = "com.android.systemui.action.DISABLE_PLUGIN";
 
+    // must be one of the channels created in NotificationChannels.java
+    static final String NOTIFICATION_CHANNEL_ID = "ALR";
+
     private static PluginManager sInstance;
 
     private final HandlerThread mBackgroundThread;
@@ -70,7 +75,7 @@
     private boolean mListening;
     private boolean mHasOneShot;
 
-    private PluginManager(Context context) {
+    public PluginManager(Context context) {
         this(context, new PluginInstanceManagerFactory(),
                 Build.IS_DEBUGGABLE, Thread.getDefaultUncaughtExceptionHandler());
     }
@@ -90,7 +95,18 @@
         Thread.setDefaultUncaughtExceptionHandler(uncaughtExceptionHandler);
     }
 
-    public <T extends Plugin> T getOneShotPlugin(String action, int version) {
+    public <T extends Plugin> T getOneShotPlugin(Class<T> cls) {
+        ProvidesInterface info = cls.getDeclaredAnnotation(ProvidesInterface.class);
+        if (info == null) {
+            throw new RuntimeException(cls + " doesn't provide an interface");
+        }
+        if (TextUtils.isEmpty(info.action())) {
+            throw new RuntimeException(cls + " doesn't provide an action");
+        }
+        return getOneShotPlugin(info.action(), cls);
+    }
+
+    public <T extends Plugin> T getOneShotPlugin(String action, Class<?> cls) {
         if (!isDebuggable) {
             // Never ever ever allow these on production builds, they are only for prototyping.
             return null;
@@ -99,7 +115,7 @@
             throw new RuntimeException("Must be called from UI thread");
         }
         PluginInstanceManager<T> p = mFactory.createPluginInstanceManager(mContext, action, null,
-                false, mBackgroundThread.getLooper(), version, this);
+                false, mBackgroundThread.getLooper(), cls, this);
         mPluginPrefs.addAction(action);
         PluginInfo<T> info = p.getPlugin();
         if (info != null) {
@@ -111,20 +127,36 @@
         return null;
     }
 
-    public <T extends Plugin> void addPluginListener(String action, PluginListener<T> listener,
-            int version) {
-        addPluginListener(action, listener, version, false);
+    public <T extends Plugin> void addPluginListener(PluginListener<T> listener, Class<?> cls) {
+        addPluginListener(listener, cls, false);
+    }
+
+    public <T extends Plugin> void addPluginListener(PluginListener<T> listener, Class<?> cls,
+            boolean allowMultiple) {
+        ProvidesInterface info = cls.getDeclaredAnnotation(ProvidesInterface.class);
+        if (info == null) {
+            throw new RuntimeException(cls + " doesn't provide an interface");
+        }
+        if (TextUtils.isEmpty(info.action())) {
+            throw new RuntimeException(cls + " doesn't provide an action");
+        }
+        addPluginListener(info.action(), listener, cls, allowMultiple);
     }
 
     public <T extends Plugin> void addPluginListener(String action, PluginListener<T> listener,
-            int version, boolean allowMultiple) {
+            Class<?> cls) {
+        addPluginListener(action, listener, cls, false);
+    }
+
+    public <T extends Plugin> void addPluginListener(String action, PluginListener<T> listener,
+            Class cls, boolean allowMultiple) {
         if (!isDebuggable) {
             // Never ever ever allow these on production builds, they are only for prototyping.
             return;
         }
         mPluginPrefs.addAction(action);
         PluginInstanceManager p = mFactory.createPluginInstanceManager(mContext, action, listener,
-                allowMultiple, mBackgroundThread.getLooper(), version, this);
+                allowMultiple, mBackgroundThread.getLooper(), cls, this);
         p.loadAll();
         mPluginMap.put(listener, p);
         startListening();
@@ -191,15 +223,16 @@
                 } catch (NameNotFoundException e) {
                 }
                 // Localization not required as this will never ever appear in a user build.
-                final Notification.Builder nb = new Notification.Builder(mContext)
-                        .setSmallIcon(icon)
-                        .setWhen(0)
-                        .setShowWhen(false)
-                        .setPriority(Notification.PRIORITY_MAX)
-                        .setVisibility(Notification.VISIBILITY_PUBLIC)
-                        .setColor(mContext.getColor(color))
-                        .setContentTitle("Plugin \"" + label + "\" has updated")
-                        .setContentText("Restart SysUI for changes to take effect.");
+                final Notification.Builder nb =
+                        new Notification.Builder(mContext, NOTIFICATION_CHANNEL_ID)
+                                .setSmallIcon(icon)
+                                .setWhen(0)
+                                .setShowWhen(false)
+                                .setPriority(Notification.PRIORITY_MAX)
+                                .setVisibility(Notification.VISIBILITY_PUBLIC)
+                                .setColor(mContext.getColor(color))
+                                .setContentTitle("Plugin \"" + label + "\" has updated")
+                                .setContentText("Restart SysUI for changes to take effect.");
                 Intent i = new Intent("com.android.systemui.action.RESTART").setData(
                             Uri.parse("package://" + pkg));
                 PendingIntent pi = PendingIntent.getBroadcast(mContext, 0, i, 0);
@@ -252,13 +285,6 @@
         return new PluginContextWrapper(mContext.createApplicationContext(info, 0), classLoader);
     }
 
-    public static PluginManager getInstance(Context context) {
-        if (sInstance == null) {
-            sInstance = new PluginManager(context.getApplicationContext());
-        }
-        return sInstance;
-    }
-
     private class AllPluginClassLoader extends ClassLoader {
         public AllPluginClassLoader(ClassLoader classLoader) {
             super(classLoader);
@@ -285,9 +311,9 @@
     public static class PluginInstanceManagerFactory {
         public <T extends Plugin> PluginInstanceManager createPluginInstanceManager(Context context,
                 String action, PluginListener<T> listener, boolean allowMultiple, Looper looper,
-                int version, PluginManager manager) {
+                Class<?> cls, PluginManager manager) {
             return new PluginInstanceManager(context, action, listener, allowMultiple, looper,
-                    version, manager);
+                    new VersionInfo().addClass(cls), manager);
         }
     }
 
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/PluginPrefs.java b/packages/SystemUI/src/com/android/systemui/plugins/PluginPrefs.java
similarity index 100%
rename from packages/SystemUI/plugin/src/com/android/systemui/plugins/PluginPrefs.java
rename to packages/SystemUI/src/com/android/systemui/plugins/PluginPrefs.java
diff --git a/packages/SystemUI/src/com/android/systemui/plugins/VersionInfo.java b/packages/SystemUI/src/com/android/systemui/plugins/VersionInfo.java
new file mode 100644
index 0000000..84f7761
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/plugins/VersionInfo.java
@@ -0,0 +1,134 @@
+/*
+ * 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.plugins;
+
+import com.android.systemui.plugins.annotations.Dependencies;
+import com.android.systemui.plugins.annotations.DependsOn;
+import com.android.systemui.plugins.annotations.ProvidesInterface;
+import com.android.systemui.plugins.annotations.Requirements;
+import com.android.systemui.plugins.annotations.Requires;
+
+import android.util.ArrayMap;
+
+public class VersionInfo {
+
+    private final ArrayMap<Class<?>, Version> mVersions = new ArrayMap<>();
+    private Class<?> mDefault;
+
+    public boolean hasVersionInfo() {
+        return !mVersions.isEmpty();
+    }
+
+    public int getDefaultVersion() {
+        return mVersions.get(mDefault).mVersion;
+    }
+
+    public VersionInfo addClass(Class<?> cls) {
+        if (mDefault == null) {
+            // The legacy default version is from the first class we add.
+            mDefault = cls;
+        }
+        addClass(cls, false);
+        return this;
+    }
+
+    private void addClass(Class<?> cls, boolean required) {
+        ProvidesInterface provider = cls.getDeclaredAnnotation(ProvidesInterface.class);
+        if (provider != null) {
+            mVersions.put(cls, new Version(provider.version(), true));
+        }
+        Requires requires = cls.getDeclaredAnnotation(Requires.class);
+        if (requires != null) {
+            mVersions.put(requires.target(), new Version(requires.version(), required));
+        }
+        Requirements requirements = cls.getDeclaredAnnotation(Requirements.class);
+        if (requirements != null) {
+            for (Requires r : requirements.value()) {
+                mVersions.put(r.target(), new Version(r.version(), required));
+            }
+        }
+        DependsOn depends = cls.getDeclaredAnnotation(DependsOn.class);
+        if (depends != null) {
+            addClass(depends.target(), true);
+        }
+        Dependencies dependencies = cls.getDeclaredAnnotation(Dependencies.class);
+        if (dependencies != null) {
+            for (DependsOn d : dependencies.value()) {
+                addClass(d.target(), true);
+            }
+        }
+    }
+
+    public void checkVersion(VersionInfo plugin) throws InvalidVersionException {
+        ArrayMap<Class<?>, Version> versions = new ArrayMap<>(mVersions);
+        plugin.mVersions.forEach((aClass, version) -> {
+            Version v = versions.remove(aClass);
+            if (v == null) {
+                v = createVersion(aClass);
+            }
+            if (v == null) {
+                throw new InvalidVersionException(aClass.getSimpleName()
+                        + " does not provide an interface", false);
+            }
+            if (v.mVersion != version.mVersion) {
+                throw new InvalidVersionException(aClass, v.mVersion < version.mVersion, v.mVersion,
+                        version.mVersion);
+            }
+        });
+        versions.forEach((aClass, version) -> {
+            if (version.mRequired) {
+                throw new InvalidVersionException("Missing required dependency "
+                        + aClass.getSimpleName(), false);
+            }
+        });
+    }
+
+    private Version createVersion(Class<?> cls) {
+        ProvidesInterface provider = cls.getDeclaredAnnotation(ProvidesInterface.class);
+        if (provider != null) {
+            return new Version(provider.version(), false);
+        }
+        return null;
+    }
+
+    public static class InvalidVersionException extends RuntimeException {
+        private final boolean mTooNew;
+
+        public InvalidVersionException(String str, boolean tooNew) {
+            super(str);
+            mTooNew = tooNew;
+        }
+
+        public InvalidVersionException(Class<?> cls, boolean tooNew, int expected, int actual) {
+            super(cls.getSimpleName() + " expected version " + expected + " but had " + actual);
+            mTooNew = tooNew;
+        }
+
+        public boolean isTooNew() {
+            return mTooNew;
+        }
+    }
+
+    private static class Version {
+
+        private final int mVersion;
+        private final boolean mRequired;
+
+        public Version(int version, boolean required) {
+            mVersion = version;
+            mRequired = required;
+        }
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
index 82ec69d..09ce2ad 100644
--- a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
+++ b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
@@ -145,16 +145,16 @@
     }
 
     private void showInvalidChargerNotification() {
-        final Notification.Builder nb = new Notification.Builder(mContext)
-                .setSmallIcon(R.drawable.ic_power_low)
-                .setWhen(0)
-                .setShowWhen(false)
-                .setOngoing(true)
-                .setContentTitle(mContext.getString(R.string.invalid_charger_title))
-                .setContentText(mContext.getString(R.string.invalid_charger_text))
-                .setChannel(NotificationChannels.ALERTS)
-                .setColor(mContext.getColor(
-                        com.android.internal.R.color.system_notification_accent_color));
+        final Notification.Builder nb =
+                new Notification.Builder(mContext, NotificationChannels.ALERTS)
+                        .setSmallIcon(R.drawable.ic_power_low)
+                        .setWhen(0)
+                        .setShowWhen(false)
+                        .setOngoing(true)
+                        .setContentTitle(mContext.getString(R.string.invalid_charger_title))
+                        .setContentText(mContext.getString(R.string.invalid_charger_text))
+                        .setColor(mContext.getColor(
+                                com.android.internal.R.color.system_notification_accent_color));
         SystemUI.overrideNotificationAppName(mContext, nb);
         final Notification n = nb.build();
         mNoMan.cancelAsUser(TAG_BATTERY, SystemMessage.NOTE_POWER_LOW, UserHandle.ALL);
@@ -164,19 +164,19 @@
     private void showWarningNotification() {
         final int textRes = R.string.battery_low_percent_format;
         final String percentage = NumberFormat.getPercentInstance().format((double) mBatteryLevel / 100.0);
-        final Notification.Builder nb = new Notification.Builder(mContext)
-                .setSmallIcon(R.drawable.ic_power_low)
-                // Bump the notification when the bucket dropped.
-                .setWhen(mBucketDroppedNegativeTimeMs)
-                .setShowWhen(false)
-                .setContentTitle(mContext.getString(R.string.battery_low_title))
-                .setContentText(mContext.getString(textRes, percentage))
-                .setOnlyAlertOnce(true)
-                .setDeleteIntent(pendingBroadcast(ACTION_DISMISSED_WARNING))
-                .setChannel(NotificationChannels.ALERTS)
-                .setVisibility(Notification.VISIBILITY_PUBLIC)
-                .setColor(mContext.getColor(
-                        com.android.internal.R.color.battery_saver_mode_color));
+        final Notification.Builder nb =
+                new Notification.Builder(mContext, NotificationChannels.ALERTS)
+                        .setSmallIcon(R.drawable.ic_power_low)
+                        // Bump the notification when the bucket dropped.
+                        .setWhen(mBucketDroppedNegativeTimeMs)
+                        .setShowWhen(false)
+                        .setContentTitle(mContext.getString(R.string.battery_low_title))
+                        .setContentText(mContext.getString(textRes, percentage))
+                        .setOnlyAlertOnce(true)
+                        .setDeleteIntent(pendingBroadcast(ACTION_DISMISSED_WARNING))
+                        .setVisibility(Notification.VISIBILITY_PUBLIC)
+                        .setColor(mContext.getColor(
+                                com.android.internal.R.color.battery_saver_mode_color));
         if (hasBatterySettings()) {
             nb.setContentIntent(pendingBroadcast(ACTION_SHOW_BATTERY_SETTINGS));
         }
@@ -235,18 +235,18 @@
             return;
         }
         mTempWarning = true;
-        final Notification.Builder nb = new Notification.Builder(mContext)
-                .setSmallIcon(R.drawable.ic_device_thermostat_24)
-                .setWhen(0)
-                .setShowWhen(false)
-                .setContentTitle(mContext.getString(R.string.high_temp_title))
-                .setContentText(mContext.getString(R.string.high_temp_notif_message))
-                .setChannel(NotificationChannels.ALERTS)
-                .setVisibility(Notification.VISIBILITY_PUBLIC)
-                .setContentIntent(pendingBroadcast(ACTION_CLICKED_TEMP_WARNING))
-                .setDeleteIntent(pendingBroadcast(ACTION_DISMISSED_TEMP_WARNING))
-                .setColor(mContext.getColor(
-                        com.android.internal.R.color.battery_saver_mode_color));
+        final Notification.Builder nb =
+                new Notification.Builder(mContext, NotificationChannels.ALERTS)
+                        .setSmallIcon(R.drawable.ic_device_thermostat_24)
+                        .setWhen(0)
+                        .setShowWhen(false)
+                        .setContentTitle(mContext.getString(R.string.high_temp_title))
+                        .setContentText(mContext.getString(R.string.high_temp_notif_message))
+                        .setVisibility(Notification.VISIBILITY_PUBLIC)
+                        .setContentIntent(pendingBroadcast(ACTION_CLICKED_TEMP_WARNING))
+                        .setDeleteIntent(pendingBroadcast(ACTION_DISMISSED_TEMP_WARNING))
+                        .setColor(mContext.getColor(
+                                com.android.internal.R.color.battery_saver_mode_color));
         SystemUI.overrideNotificationAppName(mContext, nb);
         final Notification n = nb.build();
         mNoMan.notifyAsUser(TAG_TEMPERATURE, SystemMessage.NOTE_HIGH_TEMP, n, UserHandle.ALL);
diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerUI.java b/packages/SystemUI/src/com/android/systemui/power/PowerUI.java
index 3d36868..471c3ae 100644
--- a/packages/SystemUI/src/com/android/systemui/power/PowerUI.java
+++ b/packages/SystemUI/src/com/android/systemui/power/PowerUI.java
@@ -34,6 +34,7 @@
 import android.text.format.DateUtils;
 import android.util.Log;
 import android.util.Slog;
+import com.android.internal.logging.MetricsLogger;
 import com.android.systemui.R;
 import com.android.systemui.SystemUI;
 import com.android.systemui.statusbar.phone.StatusBar;
@@ -45,6 +46,8 @@
     static final String TAG = "PowerUI";
     static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
     private static final long TEMPERATURE_INTERVAL = 30 * DateUtils.SECOND_IN_MILLIS;
+    private static final long TEMPERATURE_LOGGING_INTERVAL = DateUtils.HOUR_IN_MILLIS;
+    private static final int MAX_RECENT_TEMPS = 125; // TEMPERATURE_LOGGING_INTERVAL plus a buffer
 
     private final Handler mHandler = new Handler();
     private final Receiver mReceiver = new Receiver();
@@ -62,7 +65,10 @@
 
     private long mScreenOffTime = -1;
 
-    private float mThrottlingTemp;
+    private float mThresholdTemp;
+    private float[] mRecentTemps = new float[MAX_RECENT_TEMPS];
+    private int mNumTemps;
+    private long mNextLogTime;
 
     public void start() {
         mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
@@ -229,10 +235,10 @@
             return;
         }
 
-        mThrottlingTemp = Settings.Global.getFloat(resolver, Settings.Global.WARNING_TEMPERATURE,
+        mThresholdTemp = Settings.Global.getFloat(resolver, Settings.Global.WARNING_TEMPERATURE,
                 resources.getInteger(R.integer.config_warningTemperature));
 
-        if (mThrottlingTemp < 0f) {
+        if (mThresholdTemp < 0f) {
             // Get the throttling temperature. No need to check if we're not throttling.
             float[] throttlingTemps = mHardwarePropertiesManager.getDeviceTemperatures(
                     HardwarePropertiesManager.DEVICE_TEMPERATURE_SKIN,
@@ -242,41 +248,86 @@
                     || throttlingTemps[0] == HardwarePropertiesManager.UNDEFINED_TEMPERATURE) {
                 return;
             }
-            mThrottlingTemp = throttlingTemps[0];
+            mThresholdTemp = throttlingTemps[0];
         }
+        setNextLogTime();
 
         // We have passed all of the checks, start checking the temp
         updateTemperatureWarning();
     }
 
     private void updateTemperatureWarning() {
-        StatusBar statusBar = getComponent(StatusBar.class);
-        if (statusBar != null && statusBar.isDeviceInVrMode()) {
-            // ensure the warning isn't showing, since VR shows its own warning
-            mWarnings.dismissTemperatureWarning();
-        } else {
-            float[] temps = mHardwarePropertiesManager.getDeviceTemperatures(
-                    HardwarePropertiesManager.DEVICE_TEMPERATURE_SKIN,
-                    HardwarePropertiesManager.TEMPERATURE_CURRENT);
-            boolean shouldShowTempWarning = false;
-            for (float temp : temps) {
-                if (temp >= mThrottlingTemp) {
-                    Slog.i(TAG, "currentTemp=" + temp + ", throttlingTemp=" + mThrottlingTemp);
-                    shouldShowTempWarning = true;
-                    break;
-                }
-            }
-            if (shouldShowTempWarning) {
+        float[] temps = mHardwarePropertiesManager.getDeviceTemperatures(
+                HardwarePropertiesManager.DEVICE_TEMPERATURE_SKIN,
+                HardwarePropertiesManager.TEMPERATURE_CURRENT);
+        if (temps.length != 0) {
+            float temp = temps[0];
+            mRecentTemps[mNumTemps++] = temp;
+
+            StatusBar statusBar = getComponent(StatusBar.class);
+            if (statusBar != null && !statusBar.isDeviceInVrMode()
+                    && temp >= mThresholdTemp) {
+                logAtTemperatureThreshold(temp);
                 mWarnings.showTemperatureWarning();
             } else {
                 mWarnings.dismissTemperatureWarning();
             }
         }
 
-        // TODO: skip this when in VR mode since we already get a callback
+        logTemperatureStats();
+
         mHandler.postDelayed(this::updateTemperatureWarning, TEMPERATURE_INTERVAL);
     }
 
+    private void logAtTemperatureThreshold(float temp) {
+        StringBuilder sb = new StringBuilder();
+        sb.append("currentTemp=").append(temp)
+                .append(",thresholdTemp=").append(mThresholdTemp)
+                .append(",batteryStatus=").append(mBatteryStatus)
+                .append(",recentTemps=");
+        for (int i = 0; i < mNumTemps; i++) {
+            sb.append(mRecentTemps[i]).append(',');
+        }
+        Slog.i(TAG, sb.toString());
+    }
+
+    /**
+     * Calculates and logs min, max, and average
+     * {@link HardwarePropertiesManager#DEVICE_TEMPERATURE_SKIN} over the past
+     * {@link #TEMPERATURE_LOGGING_INTERVAL}.
+     */
+    private void logTemperatureStats() {
+        if (mNextLogTime > System.currentTimeMillis() && mNumTemps != MAX_RECENT_TEMPS) {
+            return;
+        }
+
+        if (mNumTemps > 0) {
+            float sum = mRecentTemps[0], min = mRecentTemps[0], max = mRecentTemps[0];
+            for (int i = 1; i < mNumTemps; i++) {
+                float temp = mRecentTemps[i];
+                sum += temp;
+                if (temp > max) {
+                    max = temp;
+                }
+                if (temp < min) {
+                    min = temp;
+                }
+            }
+
+            float avg = sum / mNumTemps;
+            Slog.i(TAG, "avg=" + avg + ",min=" + min + ",max=" + max);
+            MetricsLogger.histogram(mContext, "device_skin_temp_avg", (int) avg);
+            MetricsLogger.histogram(mContext, "device_skin_temp_min", (int) min);
+            MetricsLogger.histogram(mContext, "device_skin_temp_max", (int) max);
+        }
+        setNextLogTime();
+        mNumTemps = 0;
+    }
+
+    private void setNextLogTime() {
+        mNextLogTime = System.currentTimeMillis() + TEMPERATURE_LOGGING_INTERVAL;
+    }
+
     public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
         pw.print("mLowBatteryAlertCloseLevel=");
         pw.println(mLowBatteryAlertCloseLevel);
@@ -303,8 +354,10 @@
                 Settings.Global.LOW_BATTERY_SOUND_TIMEOUT, 0));
         pw.print("bucket: ");
         pw.println(Integer.toString(findBatteryLevelBucket(mBatteryLevel)));
-        pw.print("mThrottlingTemp=");
-        pw.println(Float.toString(mThrottlingTemp));
+        pw.print("mThresholdTemp=");
+        pw.println(Float.toString(mThresholdTemp));
+        pw.print("mNextLogTime=");
+        pw.println(Long.toString(mNextLogTime));
         mWarnings.dump(pw);
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java b/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java
index a231e79..3559257 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java
@@ -242,7 +242,7 @@
                 maxHeight = height;
             }
         }
-        setMeasuredDimension(getMeasuredWidth(), maxHeight);
+        setMeasuredDimension(getMeasuredWidth(), maxHeight + getPaddingBottom());
     }
 
     private final Runnable mDistribute = new Runnable() {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java b/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java
index 615063c..e0d1cba 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java
@@ -20,6 +20,7 @@
 import android.view.View.OnLayoutChangeListener;
 import android.widget.TextView;
 
+import com.android.systemui.Dependency;
 import com.android.systemui.plugins.qs.QS;
 import com.android.systemui.qs.PagedTileLayout.PageListener;
 import com.android.systemui.qs.QSPanel.QSTileLayout;
@@ -105,7 +106,7 @@
 
     @Override
     public void onViewAttachedToWindow(View v) {
-        TunerService.get(mQs.getContext()).addTunable(this, ALLOW_FANCY_ANIMATION,
+        Dependency.get(TunerService.class).addTunable(this, ALLOW_FANCY_ANIMATION,
                 MOVE_FULL_ROWS, QuickQSPanel.NUM_QUICK_TILES);
     }
 
@@ -114,7 +115,7 @@
         if (mHost != null) {
             mHost.removeCallback(this);
         }
-        TunerService.get(mQs.getContext()).removeTunable(this);
+        Dependency.get(TunerService.class).removeTunable(this);
     }
 
     @Override
@@ -159,7 +160,9 @@
         mAllViews.clear();
         mTopFiveQs.clear();
 
-        mAllViews.add((View) mQsPanel.getTileLayout());
+        QSTileLayout tileLayout = mQsPanel.getTileLayout();
+        mAllViews.add((View) tileLayout);
+        firstPageBuilder.addFloat(tileLayout, "translationY", mQsPanel.getHeight(), 0);
 
         for (QSTile<?> tile : tiles) {
             QSTileBaseView tileView = mQsPanel.getTileView(tile);
@@ -167,7 +170,6 @@
                 Log.e(TAG, "tileView is null " + tile.getTileSpec());
                 continue;
             }
-            final TextView label = ((QSTileView) tileView).getLabel();
             final View tileIcon = tileView.getIcon().getIconView();
             View view = mQs.getView();
             if (count < mNumQuickTiles && mAllowFancy) {
@@ -186,12 +188,12 @@
 
                 // Counteract the parent translation on the tile. So we have a static base to
                 // animate the label position off from.
-                firstPageBuilder.addFloat(tileView, "translationY", mQsPanel.getHeight(), 0);
+                //firstPageBuilder.addFloat(tileView, "translationY", mQsPanel.getHeight(), 0);
 
-                // Move the real tile's label from the quick tile position to its final
+                // Move the real tile from the quick tile position to its final
                 // location.
-                translationXBuilder.addFloat(label, "translationX", -xDiff, 0);
-                translationYBuilder.addFloat(label, "translationY", -yDiff, 0);
+                translationXBuilder.addFloat(tileView, "translationX", -xDiff, 0);
+                translationYBuilder.addFloat(tileView, "translationY", -yDiff, 0);
 
                 mTopFiveQs.add(tileView.getIcon());
                 mAllViews.add(tileView.getIcon());
@@ -208,22 +210,22 @@
 
                 firstPageBuilder.addFloat(tileView, "translationY", mQsPanel.getHeight(), 0);
                 translationXBuilder.addFloat(tileView, "translationX", -xDiff, 0);
-                translationYBuilder.addFloat(label, "translationY", -yDiff, 0);
+                translationYBuilder.addFloat(tileView, "translationY", -yDiff, 0);
                 translationYBuilder.addFloat(tileIcon, "translationY", -yDiff, 0);
 
                 mAllViews.add(tileIcon);
             } else {
                 firstPageBuilder.addFloat(tileView, "alpha", 0, 1);
+                firstPageBuilder.addFloat(tileView, "translationY", -mQsPanel.getHeight(), 0);
             }
             mAllViews.add(tileView);
-            mAllViews.add(label);
             count++;
         }
         if (mAllowFancy) {
             // Make brightness appear static position and alpha in through second half.
             View brightness = mQsPanel.getBrightnessView();
             if (brightness != null) {
-//                firstPageBuilder.addFloat(brightness, "translationY", mQsPanel.getHeight(), 0);
+                firstPageBuilder.addFloat(brightness, "translationY", mQsPanel.getHeight(), 0);
                 mBrightnessAnimator = new TouchAnimator.Builder()
                         .addFloat(brightness, "alpha", 0, 1)
                         .addFloat(mQsPanel.getPageIndicator(), "alpha", 0, 1)
@@ -239,7 +241,7 @@
             // Fade in the tiles/labels as we reach the final position.
             mFirstPageDelayedAnimator = new TouchAnimator.Builder()
                     .setStartDelay(EXPANDED_TILE_DELAY)
-                    .addFloat(mQsPanel.getTileLayout(), "alpha", 0, 1)
+                    .addFloat(tileLayout, "alpha", 0, 1)
                     .addFloat(mQsPanel.getFooter().getView(), "alpha", 0, 1).build();
             mAllViews.add(mQsPanel.getFooter().getView());
             float px = 0;
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java b/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java
index c8f1670..95e0301 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java
@@ -74,8 +74,14 @@
         mContainer = (QSContainerImpl) view;
 
         mQSDetail.setQsPanel(mQSPanel, mHeader);
-        mQSAnimator = new QSAnimator(this, (QuickQSPanel) mHeader.findViewById(R.id.quick_qs_panel),
-                mQSPanel);
+
+        // If the quick settings row is not shown, then there is no need for the animation from
+        // the row to the full QS panel.
+        if (getResources().getBoolean(R.bool.config_showQuickSettingsRow)) {
+            mQSAnimator = new QSAnimator(this,
+                    (QuickQSPanel) mHeader.findViewById(R.id.quick_qs_panel), mQSPanel);
+        }
+
         mQSCustomizer = (QSCustomizer) view.findViewById(R.id.qs_customize);
         mQSCustomizer.setQs(this);
     }
@@ -89,7 +95,10 @@
         super.onConfigurationChanged(newConfig);
         if (newConfig.getLayoutDirection() != mLayoutDirection) {
             mLayoutDirection = newConfig.getLayoutDirection();
-            mQSAnimator.onRtlChanged();
+
+            if (mQSAnimator != null) {
+                mQSAnimator.onRtlChanged();
+            }
         }
     }
 
@@ -108,7 +117,10 @@
         mQSPanel.setHost(qsh, mQSCustomizer);
         mHeader.setQSPanel(mQSPanel);
         mQSDetail.setHost(qsh);
-        mQSAnimator.setHost(qsh);
+
+        if (mQSAnimator != null) {
+            mQSAnimator.setHost(qsh);
+        }
     }
 
     private void updateQsState() {
@@ -155,7 +167,11 @@
     public void setKeyguardShowing(boolean keyguardShowing) {
         if (DEBUG) Log.d(TAG, "setKeyguardShowing " + keyguardShowing);
         mKeyguardShowing = keyguardShowing;
-        mQSAnimator.setOnKeyguard(keyguardShowing);
+
+        if (mQSAnimator != null) {
+            mQSAnimator.setOnKeyguard(keyguardShowing);
+        }
+
         updateQsState();
     }
 
@@ -187,7 +203,10 @@
         mHeader.setExpansion(mKeyguardShowing ? 1 : expansion);
         mQSPanel.setTranslationY(translationScaleY * mQSPanel.getHeight());
         mQSDetail.setFullyExpanded(expansion == 1);
-        mQSAnimator.setPosition(expansion);
+
+        if (mQSAnimator != null) {
+            mQSAnimator.setPosition(expansion);
+        }
 
         // Set bounds on the QS panel so it doesn't run over the header.
         mQsBounds.top = (int) (mQSPanel.getHeight() * (1 - expansion));
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
index e004828..e8d5ece 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
@@ -29,6 +29,7 @@
 import android.widget.LinearLayout;
 import com.android.internal.logging.MetricsLogger;
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
+import com.android.systemui.Dependency;
 import com.android.systemui.R;
 import com.android.systemui.plugins.qs.QS;
 import com.android.systemui.plugins.qs.QS.DetailAdapter;
@@ -85,6 +86,10 @@
 
         setOrientation(VERTICAL);
 
+        mBrightnessView = LayoutInflater.from(context).inflate(
+                R.layout.quick_settings_brightness_dialog, this, false);
+        addView(mBrightnessView);
+
         setupTileLayout();
 
         mFooter = new QSFooter(this, context);
@@ -99,10 +104,6 @@
 
         updateResources();
 
-        mBrightnessView = LayoutInflater.from(context).inflate(
-                R.layout.quick_settings_brightness_dialog, this, false);
-        addView(mBrightnessView);
-
         mBrightnessController = new BrightnessController(getContext(),
                 (ImageView) findViewById(R.id.brightness_icon),
                 (ToggleSliderView) findViewById(R.id.brightness_slider));
@@ -126,7 +127,7 @@
     @Override
     protected void onAttachedToWindow() {
         super.onAttachedToWindow();
-        TunerService.get(mContext).addTunable(this, QS_SHOW_BRIGHTNESS);
+        Dependency.get(TunerService.class).addTunable(this, QS_SHOW_BRIGHTNESS);
         if (mHost != null) {
             setTiles(mHost.getTiles());
         }
@@ -134,8 +135,10 @@
 
     @Override
     protected void onDetachedFromWindow() {
-        TunerService.get(mContext).removeTunable(this);
-        mHost.removeCallback(this);
+        Dependency.get(TunerService.class).removeTunable(this);
+        if (mHost != null) {
+            mHost.removeCallback(this);
+        }
         for (TileRecord record : mRecords) {
             record.tile.removeCallbacks();
         }
@@ -438,8 +441,15 @@
         }
         r.tile.setDetailListening(show);
         int x = r.tileView.getLeft() + r.tileView.getWidth() / 2;
-        int y = r.tileView.getTop() + mTileLayout.getOffsetTop(r) + r.tileView.getHeight() / 2
-                + getTop();
+        int y;
+        if (r.tileView instanceof QSTileView) {
+            View labelContainer = (View) ((QSTileView) r.tileView).getLabel().getParent();
+            y = r.tileView.getTop() + mTileLayout.getOffsetTop(r) + getTop()
+                    + labelContainer.getTop() + labelContainer.getHeight() / 2;
+        } else {
+            y = r.tileView.getTop() + mTileLayout.getOffsetTop(r) + r.tileView.getHeight() / 2
+                    + getTop();
+        }
         handleShowDetailImpl(r, show, x, y);
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTileBaseView.java b/packages/SystemUI/src/com/android/systemui/qs/QSTileBaseView.java
index 0e04d0a..c750fdc 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSTileBaseView.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSTileBaseView.java
@@ -15,38 +15,30 @@
  */
 package com.android.systemui.qs;
 
-import android.animation.ValueAnimator;
 import android.content.Context;
-import android.content.res.ColorStateList;
 import android.content.res.TypedArray;
-import android.graphics.Color;
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.RippleDrawable;
 import android.os.Handler;
 import android.os.Looper;
 import android.os.Message;
-import android.service.quicksettings.Tile;
 import android.text.TextUtils;
-import android.util.Log;
 import android.view.Gravity;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.accessibility.AccessibilityEvent;
 import android.view.accessibility.AccessibilityNodeInfo;
 import android.widget.FrameLayout;
-import android.widget.ImageView;
-import android.widget.ImageView.ScaleType;
 import android.widget.LinearLayout;
 import android.widget.Switch;
 
-import com.android.settingslib.Utils;
-
 import com.android.systemui.R;
 
 public class QSTileBaseView extends LinearLayout {
 
     private static final String TAG = "QSTileBaseView";
     private final H mHandler = new H();
+    private final FrameLayout mIconFrame;
     protected QSIconView mIcon;
     protected RippleDrawable mRipple;
     private Drawable mTileBackground;
@@ -63,15 +55,15 @@
         // Default to Quick Tile padding, and QSTileView will specify its own padding.
         int padding = context.getResources().getDimensionPixelSize(R.dimen.qs_quick_tile_padding);
 
-        FrameLayout frame = new FrameLayout(context);
-        frame.setForegroundGravity(Gravity.CENTER);
+        mIconFrame = new FrameLayout(context);
+        mIconFrame.setForegroundGravity(Gravity.CENTER);
         int size = context.getResources().getDimensionPixelSize(R.dimen.qs_quick_tile_size);
-        addView(frame, new LayoutParams(size, size));
+        addView(mIconFrame, new LayoutParams(size, size));
         mIcon = icon;
         FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(
                 ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
         params.setMargins(0, padding, 0, padding);
-        frame.addView(mIcon, params);
+        mIconFrame.addView(mIcon, params);
 
         mTileBackground = newTileBackground();
         if (mTileBackground instanceof RippleDrawable) {
@@ -105,7 +97,7 @@
     private void updateRippleSize(int width, int height) {
         // center the touch feedback on the center of the icon, and dial it down a bit
         final int cx = width / 2;
-        final int cy = height / 2;
+        final int cy = mIconFrame.getMeasuredHeight() / 2;
         final int rad = (int) (mIcon.getHeight() * .85f);
         mRipple.setHotspotBounds(cx - rad, cy - rad, cx + rad, cy + rad);
     }
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java b/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java
index 232941d..428fe9b 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java
@@ -20,6 +20,7 @@
 
 import android.content.Context;
 import android.content.res.Configuration;
+import android.graphics.drawable.RippleDrawable;
 import android.service.quicksettings.Tile;
 import android.text.SpannableStringBuilder;
 import android.text.style.ForegroundColorSpan;
@@ -28,6 +29,7 @@
 import android.view.MotionEvent;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.ViewGroup.LayoutParams;
 import android.widget.ImageView;
 import android.widget.TextView;
 
@@ -43,8 +45,7 @@
     protected TextView mLabel;
     private ImageView mPadLock;
     private int mState;
-    private OnClickListener mClick;
-    private OnClickListener mSecondaryClick;
+    private ViewGroup mLabelContainer;
 
     public QSTileView(Context context, QSIconView icon) {
         this(context, icon, false);
@@ -76,13 +77,15 @@
     }
 
     protected void createLabel() {
-        ViewGroup view = (ViewGroup) LayoutInflater.from(getContext())
-                .inflate(R.layout.qs_tile_label, null);
-        view.setClipChildren(false);
-        view.setClipToPadding(false);
-        mLabel = (TextView) view.findViewById(R.id.tile_label);
-        mPadLock = (ImageView) view.findViewById(R.id.restricted_padlock);
-        addView(view);
+        mLabelContainer = (ViewGroup) LayoutInflater.from(getContext())
+                .inflate(R.layout.qs_tile_label, this, false);
+        mLabelContainer.setClipChildren(false);
+        mLabelContainer.setClipToPadding(false);
+        mLabel = (TextView) mLabelContainer.findViewById(R.id.tile_label);
+        mPadLock = (ImageView) mLabelContainer.findViewById(R.id.restricted_padlock);
+
+        mLabelContainer.setBackground(newTileBackground());
+        addView(mLabelContainer);
     }
 
     @Override
@@ -104,17 +107,10 @@
     }
 
     @Override
-    public void init(OnClickListener click, OnClickListener secondaryClick, OnLongClickListener longClick) {
-        mClick = click;
-        mSecondaryClick = secondaryClick;
+    public void init(OnClickListener click, OnClickListener secondaryClick,
+            OnLongClickListener longClick) {
         super.init(click, secondaryClick, longClick);
-    }
-
-    @Override
-    public boolean onTouchEvent(MotionEvent event) {
-        if (event.getActionMasked() == MotionEvent.ACTION_UP)  {
-            setOnClickListener(event.getY() < (getMeasuredHeight() / 2) ? mClick : mSecondaryClick);
-        }
-        return super.onTouchEvent(event);
+        mLabelContainer.setClickable(true);
+        mLabelContainer.setOnClickListener(secondaryClick);
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java
index 16b351e..d789b44 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java
@@ -24,6 +24,7 @@
 import android.widget.LinearLayout;
 import android.widget.Space;
 
+import com.android.systemui.Dependency;
 import com.android.systemui.R;
 import com.android.systemui.qs.QSTile.SignalState;
 import com.android.systemui.qs.QSTile.State;
@@ -62,13 +63,13 @@
     @Override
     protected void onAttachedToWindow() {
         super.onAttachedToWindow();
-        TunerService.get(mContext).addTunable(mNumTiles, NUM_QUICK_TILES);
+        Dependency.get(TunerService.class).addTunable(mNumTiles, NUM_QUICK_TILES);
     }
 
     @Override
     protected void onDetachedFromWindow() {
         super.onDetachedFromWindow();
-        TunerService.get(mContext).removeTunable(mNumTiles);
+        Dependency.get(TunerService.class).removeTunable(mNumTiles);
     }
 
     public void setQSPanelAndHeader(QSPanel fullPanel, View header) {
@@ -141,7 +142,7 @@
     };
 
     public int getNumQuickTiles(Context context) {
-        return TunerService.get(context).getValue(NUM_QUICK_TILES, 6);
+        return Dependency.get(TunerService.class).getValue(NUM_QUICK_TILES, 6);
     }
 
     private static class HeaderTileLayout extends LinearLayout implements QSTileLayout {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java b/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java
index a5a1eaa..3b9e7bc 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java
@@ -99,8 +99,9 @@
             record.tileView.measure(exactly(mCellWidth), exactly(mCellHeight));
             previousView = record.tileView.updateAccessibilityOrder(previousView);
         }
-        setMeasuredDimension(width,
-                (mCellHeight + mCellMargin) * rows + (mCellMarginTop - mCellMargin));
+        int height = (mCellHeight + mCellMargin) * rows + (mCellMarginTop - mCellMargin);
+        if (height < 0) height = 0;
+        setMeasuredDimension(width, height);
     }
 
     private static int exactly(int size) {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
index f2c3e61..4e30797 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
@@ -301,6 +301,7 @@
         if (position == mEditIndex) position--;
 
         move(mAccessibilityFromIndex, position, v);
+
         notifyDataSetChanged();
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/qs/external/CustomTile.java b/packages/SystemUI/src/com/android/systemui/qs/external/CustomTile.java
index 3afbc35..dea56aa1 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/external/CustomTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/external/CustomTile.java
@@ -237,6 +237,8 @@
         i.setPackage(mComponent.getPackageName());
         i = resolveIntent(i);
         if (i != null) {
+            i.putExtra(TileService.EXTRA_COMPONENT, mComponent);
+            i.putExtra(TileService.EXTRA_STATE, mTile.getState());
             return i;
         }
         return new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS).setData(
diff --git a/packages/SystemUI/src/com/android/systemui/qs/external/TileServices.java b/packages/SystemUI/src/com/android/systemui/qs/external/TileServices.java
index ce72942..ec4ca7a6 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/external/TileServices.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/external/TileServices.java
@@ -102,12 +102,7 @@
             mTokenMap.remove(service.getToken());
             mTiles.remove(tile.getComponent());
             final String slot = tile.getComponent().getClassName();
-            mMainHandler.post(new Runnable() {
-                @Override
-                public void run() {
-                    mHost.getIconController().removeIcon(slot);
-                }
-            });
+            mMainHandler.post(() -> mHost.getIconController().removeIcon(slot));
         }
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/BatteryTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/BatteryTile.java
index 6f1f977..f7bfc1e 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/BatteryTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/BatteryTile.java
@@ -35,8 +35,8 @@
 import android.widget.TextView;
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
 import com.android.settingslib.BatteryInfo;
+import com.android.settingslib.graph.BatteryMeterDrawableBase;
 import com.android.settingslib.graph.UsageView;
-import com.android.systemui.BatteryMeterDrawable;
 import com.android.systemui.Dependency;
 import com.android.systemui.R;
 import com.android.systemui.plugins.qs.QS.DetailAdapter;
@@ -104,11 +104,6 @@
     }
 
     @Override
-    protected void handleSecondaryClick() {
-        showDetail(true);
-    }
-
-    @Override
     public CharSequence getTileLabel() {
         return mContext.getString(R.string.battery);
     }
@@ -118,7 +113,6 @@
         int level = (arg != null) ? (Integer) arg : mLevel;
         String percentage = NumberFormat.getPercentInstance().format((double) level / 100.0);
 
-        state.dualTarget = true;
         state.state = mCharging ? Tile.STATE_UNAVAILABLE
                 : mPowerSave ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE;
         state.icon = ResourceIcon.get(R.drawable.ic_qs_battery_saver);
@@ -155,8 +149,10 @@
 
     private final class BatteryDetail implements DetailAdapter, OnClickListener,
             OnAttachStateChangeListener {
-        private final BatteryMeterDrawable mDrawable = new BatteryMeterDrawable(mHost.getContext(),
-                mHost.getContext().getColor(R.color.batterymeter_frame_color));
+        private final BatteryMeterDrawableBase mDrawable
+                = new BatteryMeterDrawableBase(
+                        mHost.getContext(),
+                        mHost.getContext().getColor(R.color.batterymeter_frame_color));
         private View mCurrentView;
 
         @Override
@@ -195,9 +191,10 @@
             if (mCurrentView == null) {
                 return;
             }
-            mDrawable.onBatteryLevelChanged(100, false, false);
-            mDrawable.onPowerSaveChanged(true);
-            mDrawable.disableShowPercent();
+            mDrawable.setBatteryLevel(100);
+            mDrawable.setPluggedIn(false);
+            mDrawable.setPowerSave(true);
+            mDrawable.setShowPercent(false);
             ((ImageView) mCurrentView.findViewById(android.R.id.icon)).setImageDrawable(mDrawable);
             Checkable checkbox = (Checkable) mCurrentView.findViewById(android.R.id.toggle);
             checkbox.setChecked(mPowerSave);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java
index a4cd14d..3c28f76 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java
@@ -123,7 +123,6 @@
 
     @Override
     protected void handleUpdateState(BooleanState state, Object arg) {
-        state.dualTarget = true;
         state.label = mContext.getString(R.string.quick_settings_cast_title);
         state.contentDescription = state.label;
         state.value = false;
@@ -179,7 +178,7 @@
         }
 
         @Override
-        public void onKeyguardChanged() {
+        public void onKeyguardShowingChanged() {
             refreshState();
         }
     };
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java
index 70f8109..dab5967 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java
@@ -16,6 +16,9 @@
 
 package com.android.systemui.qs.tiles;
 
+import android.content.BroadcastReceiver;
+import android.content.ComponentName;
+import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.os.UserManager;
@@ -37,6 +40,9 @@
 
 /** Quick settings tile: Hotspot **/
 public class HotspotTile extends QSTile<QSTile.AirplaneBooleanState> {
+    static final Intent TETHER_SETTINGS = new Intent().setComponent(new ComponentName(
+             "com.android.settings", "com.android.settings.TetherSettings"));
+
     private final AnimationIcon mEnable =
             new AnimationIcon(R.drawable.ic_hotspot_enable_animation,
                     R.drawable.ic_hotspot_disable);
@@ -94,7 +100,7 @@
 
     @Override
     public Intent getLongClickIntent() {
-        return new Intent(Settings.ACTION_WIRELESS_SETTINGS);
+        return new Intent(TETHER_SETTINGS);
     }
 
     @Override
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/LocationTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/LocationTile.java
index 5374f18..423a1df 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/LocationTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/LocationTile.java
@@ -141,7 +141,7 @@
         }
 
         @Override
-        public void onKeyguardChanged() {
+        public void onKeyguardShowingChanged() {
             refreshState();
         }
     };
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/WorkModeTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/WorkModeTile.java
index ae4d6c9..7e6bb3b 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/WorkModeTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/WorkModeTile.java
@@ -61,7 +61,7 @@
 
     @Override
     public Intent getLongClickIntent() {
-        return new Intent(Settings.ACTION_SYNC_SETTINGS);
+        return new Intent(Settings.ACTION_MANAGED_PROFILE_SETTINGS);
     }
 
     @Override
diff --git a/packages/SystemUI/src/com/android/systemui/recents/Recents.java b/packages/SystemUI/src/com/android/systemui/recents/Recents.java
index 8d18a75..e635162 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/Recents.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/Recents.java
@@ -16,6 +16,8 @@
 
 package com.android.systemui.recents;
 
+import static com.android.systemui.statusbar.phone.StatusBar.SYSTEM_DIALOG_REASON_RECENT_APPS;
+
 import android.app.ActivityManager;
 import android.app.UiModeManager;
 import android.content.ComponentName;
@@ -38,6 +40,7 @@
 import android.util.EventLog;
 import android.util.Log;
 import android.view.Display;
+import android.view.WindowManager;
 import android.widget.Toast;
 
 import com.android.internal.logging.MetricsLogger;
@@ -59,6 +62,7 @@
 import com.android.systemui.recents.model.RecentsTaskLoader;
 import com.android.systemui.recents.tv.RecentsTvImpl;
 import com.android.systemui.stackdivider.Divider;
+import com.android.systemui.statusbar.CommandQueue;
 
 import java.util.ArrayList;
 import java.util.HashSet;
@@ -70,7 +74,7 @@
  * users.
  */
 public class Recents extends SystemUI
-        implements RecentsComponent {
+        implements RecentsComponent, CommandQueue.Callbacks {
 
     private final static String TAG = "Recents";
     private final static boolean DEBUG = false;
@@ -229,6 +233,7 @@
         if (sSystemServicesProxy.isSystemUser(processUser)) {
             // For the system user, initialize an instance of the interface that we can pass to the
             // secondary user
+            getComponent(CommandQueue.class).addCallbacks(this);
             mSystemToUserCallbacks = new RecentsSystemUser(mContext, mImpl);
         } else {
             // For the secondary user, bind to the primary user's service to get a persistent
@@ -247,7 +252,7 @@
      * Shows the Recents.
      */
     @Override
-    public void showRecents(boolean triggeredFromAltTab, boolean fromHome) {
+    public void showRecentApps(boolean triggeredFromAltTab, boolean fromHome) {
         // Ensure the device has been provisioned before allowing the user to interact with
         // recents
         if (!isUserSetup()) {
@@ -257,6 +262,10 @@
         if (proxyToOverridePackage(ACTION_SHOW_RECENTS)) {
             return;
         }
+        try {
+            ActivityManager.getService().closeSystemDialogs(SYSTEM_DIALOG_REASON_RECENT_APPS);
+        } catch (RemoteException e) {
+        }
 
         int recentsGrowTarget = getComponent(Divider.class).getView().growsRecents();
 
@@ -287,7 +296,7 @@
      * Hides the Recents.
      */
     @Override
-    public void hideRecents(boolean triggeredFromAltTab, boolean triggeredFromHomeKey) {
+    public void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey) {
         // Ensure the device has been provisioned before allowing the user to interact with
         // recents
         if (!isUserSetup()) {
@@ -318,6 +327,11 @@
         }
     }
 
+    @Override
+    public void toggleRecentApps() {
+        toggleRecents(mContext.getSystemService(WindowManager.class).getDefaultDisplay());
+    }
+
     /**
      * Toggles the Recents activity.
      */
@@ -387,7 +401,7 @@
     }
 
     @Override
-    public void cancelPreloadingRecents() {
+    public void cancelPreloadRecentApps() {
         // Ensure the device has been provisioned before allowing the user to interact with
         // recents
         if (!isUserSetup()) {
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
index a6fe0ea..c9debb2 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
@@ -31,6 +31,7 @@
 import android.os.SystemClock;
 import android.os.UserHandle;
 import android.provider.Settings;
+import android.provider.Settings.Secure;
 import android.util.Log;
 import android.view.KeyEvent;
 import android.view.View;
@@ -44,7 +45,6 @@
 import com.android.systemui.DejankUtils;
 import com.android.systemui.Interpolators;
 import com.android.keyguard.LatencyTracker;
-import com.android.systemui.Prefs;
 import com.android.systemui.R;
 import com.android.systemui.recents.events.EventBus;
 import com.android.systemui.recents.events.activity.CancelEnterRecentsWindowAnimationEvent;
@@ -181,8 +181,10 @@
                 // is still valid.  Otherwise, we need to reset the lastStackactiveTime to the
                 // currentTime and remove the old tasks in between which would not be previously
                 // visible, but currently would be in the new currentTime
-                long oldLastStackActiveTime = Prefs.getLong(RecentsActivity.this,
-                        Prefs.Key.OVERVIEW_LAST_STACK_TASK_ACTIVE_TIME, -1);
+                int currentUser = SystemServicesProxy.getInstance(RecentsActivity.this)
+                        .getCurrentUser();
+                long oldLastStackActiveTime = Settings.Secure.getLongForUser(getContentResolver(),
+                        Secure.OVERVIEW_LAST_STACK_ACTIVE_TIME, -1, currentUser);
                 if (oldLastStackActiveTime != -1) {
                     long currentTime = System.currentTimeMillis();
                     if (currentTime < oldLastStackActiveTime) {
@@ -200,8 +202,8 @@
                                 Recents.getSystemServices().removeTask(task.persistentId);
                             }
                         }
-                        Prefs.putLong(RecentsActivity.this,
-                                Prefs.Key.OVERVIEW_LAST_STACK_TASK_ACTIVE_TIME, currentTime);
+                        Settings.Secure.putLongForUser(RecentsActivity.this.getContentResolver(),
+                                Secure.OVERVIEW_LAST_STACK_ACTIVE_TIME, currentTime, currentUser);
                     }
                 }
             }
@@ -834,8 +836,9 @@
         Recents.getTaskLoader().dump(prefix, writer);
 
         String id = Integer.toHexString(System.identityHashCode(this));
-        long lastStackActiveTime = Prefs.getLong(this,
-                Prefs.Key.OVERVIEW_LAST_STACK_TASK_ACTIVE_TIME, -1);
+        long lastStackActiveTime = Settings.Secure.getLongForUser(getContentResolver(),
+                Secure.OVERVIEW_LAST_STACK_ACTIVE_TIME, -1,
+                SystemServicesProxy.getInstance(this).getCurrentUser());
 
         writer.print(prefix); writer.print(TAG);
         writer.print(" visible="); writer.print(mIsVisible ? "Y" : "N");
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java
index 9a8b267..8de4e58 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java
@@ -53,6 +53,7 @@
 import com.android.systemui.recents.events.activity.EnterRecentsWindowLastAnimationFrameEvent;
 import com.android.systemui.recents.events.activity.HideRecentsEvent;
 import com.android.systemui.recents.events.activity.IterateRecentsEvent;
+import com.android.systemui.recents.events.activity.LaunchMostRecentTaskRequestEvent;
 import com.android.systemui.recents.events.activity.LaunchNextTaskRequestEvent;
 import com.android.systemui.recents.events.activity.RecentsActivityStartingEvent;
 import com.android.systemui.recents.events.activity.ToggleRecentsEvent;
@@ -75,6 +76,7 @@
 import com.android.systemui.recents.views.TaskStackViewScroller;
 import com.android.systemui.recents.views.TaskViewHeader;
 import com.android.systemui.recents.views.TaskViewTransform;
+import com.android.systemui.recents.views.grid.TaskGridLayoutAlgorithm;
 import com.android.systemui.stackdivider.DividerView;
 import com.android.systemui.statusbar.phone.NavigationBarGestureHelper;
 import com.android.systemui.statusbar.phone.StatusBar;
@@ -128,6 +130,7 @@
                 launchOpts.numVisibleTaskThumbnails = 2;
                 launchOpts.onlyLoadForCache = true;
                 launchOpts.onlyLoadPausedActivities = true;
+                launchOpts.loadThumbnails = !ActivityManager.ENABLE_TASK_SNAPSHOTS;
                 loader.loadTasks(mContext, plan, launchOpts);
             }
         }
@@ -311,15 +314,23 @@
                 RecentsConfiguration config = Recents.getConfiguration();
                 RecentsActivityLaunchState launchState = config.getLaunchState();
                 if (!launchState.launchedWithAltTab) {
-                    // If the user taps quickly
-                    if (!debugFlags.isPagingEnabled() ||
-                            (ViewConfiguration.getDoubleTapMinTime() < elapsedTime &&
-                                    elapsedTime < ViewConfiguration.getDoubleTapTimeout())) {
-                        // Launch the next focused task
-                        EventBus.getDefault().post(new LaunchNextTaskRequestEvent());
+                    // Has the user tapped quickly?
+                    boolean isQuickTap = ViewConfiguration.getDoubleTapMinTime() < elapsedTime &&
+                            elapsedTime < ViewConfiguration.getDoubleTapTimeout();
+                    if (Recents.getConfiguration().isGridEnabled) {
+                        if (isQuickTap) {
+                            EventBus.getDefault().post(new LaunchNextTaskRequestEvent());
+                        } else {
+                            EventBus.getDefault().post(new LaunchMostRecentTaskRequestEvent());
+                        }
                     } else {
-                        // Notify recents to move onto the next task
-                        EventBus.getDefault().post(new IterateRecentsEvent());
+                        if (!debugFlags.isPagingEnabled() || isQuickTap) {
+                            // Launch the next focused task
+                            EventBus.getDefault().post(new LaunchNextTaskRequestEvent());
+                        } else {
+                            // Notify recents to move onto the next task
+                            EventBus.getDefault().post(new IterateRecentsEvent());
+                        }
                     }
                 } else {
                     // If the user has toggled it too quickly, then just eat up the event here (it's
@@ -628,13 +639,28 @@
             stackLayout.initialize(displayRect, windowRect, mTaskStackBounds,
                     TaskStackLayoutAlgorithm.StackState.getStackStateForStack(stack));
             mDummyStackView.setTasks(stack, false /* allowNotifyStackChanges */);
+            // Get the width of a task view so that we know how wide to draw the header bar.
+            int taskViewWidth = 0;
+            if (mDummyStackView.useGridLayout()) {
+                TaskGridLayoutAlgorithm gridLayout = mDummyStackView.getGridAlgorithm();
+                gridLayout.initialize(windowRect);
+                taskViewWidth = (int) gridLayout.getTransform(0 /* taskIndex */,
+                        stack.getTaskCount(), new TaskViewTransform(), stackLayout).rect.width();
+            } else {
+                Rect taskViewBounds = stackLayout.getUntransformedTaskViewBounds();
+                if (!taskViewBounds.isEmpty()) {
+                    taskViewWidth = taskViewBounds.width();
+                }
+            }
 
-            Rect taskViewBounds = stackLayout.getUntransformedTaskViewBounds();
-            if (!taskViewBounds.isEmpty()) {
-                int taskViewWidth = taskViewBounds.width();
+            if (taskViewWidth > 0) {
                 synchronized (mHeaderBarLock) {
                     if (mHeaderBar.getMeasuredWidth() != taskViewWidth ||
                             mHeaderBar.getMeasuredHeight() != mTaskBarHeight) {
+                        if (mDummyStackView.useGridLayout()) {
+                            mHeaderBar.setShouldDarkenBackgroundColor(true);
+                            mHeaderBar.setNoUserInteractionState();
+                        }
                         mHeaderBar.forceLayout();
                         mHeaderBar.measure(
                                 MeasureSpec.makeMeasureSpec(taskViewWidth, MeasureSpec.EXACTLY),
@@ -743,11 +769,7 @@
             Task toTask = new Task();
             TaskViewTransform toTransform = getThumbnailTransitionTransform(stackView, toTask,
                     windowOverrideRect);
-            // When using a grid layout, the header is already visible on screen at the target
-            // location, making it unnecessary to draw it in the transition thumbnail.
-            Bitmap thumbnail = stackView.useGridLayout()
-                    ? mThumbTransitionBitmapCache.createAshmemBitmap()
-                    : drawThumbnailTransitionBitmap(toTask, toTransform,
+            Bitmap thumbnail = drawThumbnailTransitionBitmap(toTask, toTransform,
                             mThumbTransitionBitmapCache);
             if (thumbnail != null) {
                 RectF toTaskRect = toTransform.rect;
diff --git a/core/java/android/service/autofill/CallbackHelper.java b/packages/SystemUI/src/com/android/systemui/recents/events/activity/LaunchMostRecentTaskRequestEvent.java
similarity index 68%
copy from core/java/android/service/autofill/CallbackHelper.java
copy to packages/SystemUI/src/com/android/systemui/recents/events/activity/LaunchMostRecentTaskRequestEvent.java
index ded8f97..24913a4 100644
--- a/core/java/android/service/autofill/CallbackHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/events/activity/LaunchMostRecentTaskRequestEvent.java
@@ -13,18 +13,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package android.service.autofill;
 
-import java.io.PrintWriter;
+package com.android.systemui.recents.events.activity;
 
-final class CallbackHelper {
+import com.android.systemui.recents.events.EventBus;
 
-    static interface Dumpable {
-        void dump(String prefix, PrintWriter pw);
-        void setFinalizer(Finalizer f);
-    }
-
-    static interface Finalizer {
-        void gone();
-    }
+/**
+ * This event is sent to request that the most recent task is launched.
+ */
+public class LaunchMostRecentTaskRequestEvent extends EventBus.Event {
+    // Simple event
 }
diff --git a/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java b/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
index 49074a6..eae1b81 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
@@ -868,6 +868,14 @@
         return null;
     }
 
+    public ActivityManager.TaskDescription getTaskDescription(int taskId) {
+        try {
+            return mIam.getTaskDescription(taskId);
+        } catch (RemoteException e) {
+            return null;
+        }
+    }
+
     /**
      * Returns the given icon for a user, badging if necessary.
      */
diff --git a/packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoadPlan.java b/packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoadPlan.java
index 11b5984..12c10df 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoadPlan.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoadPlan.java
@@ -26,6 +26,8 @@
 import android.graphics.drawable.Drawable;
 import android.os.UserHandle;
 import android.os.UserManager;
+import android.provider.Settings;
+import android.provider.Settings.Secure;
 import android.util.ArraySet;
 import android.util.SparseArray;
 import android.util.SparseBooleanArray;
@@ -130,6 +132,7 @@
             preloadRawTasks(includeFrontMostExcludedTask);
         }
 
+        SystemServicesProxy ssp = SystemServicesProxy.getInstance(mContext);
         SparseArray<Task.TaskKey> affiliatedTasks = new SparseArray<>();
         SparseIntArray affiliatedTaskCounts = new SparseIntArray();
         SparseBooleanArray lockedUsers = new SparseBooleanArray();
@@ -137,8 +140,10 @@
                 R.string.accessibility_recents_item_will_be_dismissed);
         String appInfoDescFormat = mContext.getString(
                 R.string.accessibility_recents_item_open_app_info);
-        long lastStackActiveTime = Prefs.getLong(mContext,
-                Prefs.Key.OVERVIEW_LAST_STACK_TASK_ACTIVE_TIME, 0);
+        int currentUserId = ssp.getCurrentUser();
+        long legacyLastStackActiveTime = migrateLegacyLastStackActiveTime(currentUserId);
+        long lastStackActiveTime = Settings.Secure.getLongForUser(mContext.getContentResolver(),
+                Secure.OVERVIEW_LAST_STACK_ACTIVE_TIME, legacyLastStackActiveTime, currentUserId);
         if (RecentsDebugFlags.Static.EnableMockTasks) {
             lastStackActiveTime = 0;
         }
@@ -205,8 +210,8 @@
             affiliatedTasks.put(taskKey.id, taskKey);
         }
         if (newLastStackActiveTime != -1) {
-            Prefs.putLong(mContext, Prefs.Key.OVERVIEW_LAST_STACK_TASK_ACTIVE_TIME,
-                    newLastStackActiveTime);
+            Settings.Secure.putLongForUser(mContext.getContentResolver(),
+                    Secure.OVERVIEW_LAST_STACK_ACTIVE_TIME, newLastStackActiveTime, currentUserId);
         }
 
         // Initialize the stacks
@@ -285,4 +290,36 @@
     private boolean isHistoricalTask(ActivityManager.RecentTaskInfo t) {
         return t.lastActiveTime < (System.currentTimeMillis() - SESSION_BEGIN_TIME);
     }
+
+
+    /**
+     * Migrate the last active time from the prefs to the secure settings.
+     *
+     * The first time this runs, it will:
+     * 1) fetch the last stack active time from the prefs
+     * 2) set the prefs to the last stack active time for all users
+     * 3) clear the pref
+     * 4) return the last stack active time
+     *
+     * Subsequent calls to this will return zero.
+     */
+    private long migrateLegacyLastStackActiveTime(int currentUserId) {
+        long legacyLastStackActiveTime = Prefs.getLong(mContext,
+                Prefs.Key.OVERVIEW_LAST_STACK_TASK_ACTIVE_TIME, -1);
+        if (legacyLastStackActiveTime != -1) {
+            Prefs.remove(mContext, Prefs.Key.OVERVIEW_LAST_STACK_TASK_ACTIVE_TIME);
+            UserManager userMgr = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
+            List<UserInfo> users = userMgr.getUsers();
+            for (int i = 0; i < users.size(); i++) {
+                int userId = users.get(i).id;
+                if (userId != currentUserId) {
+                    Settings.Secure.putLongForUser(mContext.getContentResolver(),
+                            Secure.OVERVIEW_LAST_STACK_ACTIVE_TIME, legacyLastStackActiveTime,
+                            userId);
+                }
+            }
+            return legacyLastStackActiveTime;
+        }
+        return 0;
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackAnimationHelper.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackAnimationHelper.java
index a2ee4c5..f1314aba 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackAnimationHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackAnimationHelper.java
@@ -619,7 +619,7 @@
         postAnimationTrigger.addLastDecrementRunnable(() -> {
             mStackView.getTouchHandler().onChildDismissed(deleteTaskView);
         });
-        deleteTaskView.animate().setDuration(300).scaleX(0).scaleY(0).alpha(0).setListener(
+        deleteTaskView.animate().setDuration(300).scaleX(0.9f).scaleY(0.9f).alpha(0).setListener(
                 new AnimatorListenerAdapter() {
                     @Override
                     public void onAnimationEnd(Animator animation) {
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
index 8ae7a83..40aad45 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
@@ -20,6 +20,8 @@
 import static android.app.ActivityManager.StackId.FULLSCREEN_WORKSPACE_STACK_ID;
 import static android.app.ActivityManager.StackId.INVALID_STACK_ID;
 
+import android.animation.Animator;
+import android.animation.AnimatorListenerAdapter;
 import android.animation.ObjectAnimator;
 import android.animation.ValueAnimator;
 import android.annotation.IntDef;
@@ -64,6 +66,7 @@
 import com.android.systemui.recents.events.activity.HideRecentsEvent;
 import com.android.systemui.recents.events.activity.HideStackActionButtonEvent;
 import com.android.systemui.recents.events.activity.IterateRecentsEvent;
+import com.android.systemui.recents.events.activity.LaunchMostRecentTaskRequestEvent;
 import com.android.systemui.recents.events.activity.LaunchNextTaskRequestEvent;
 import com.android.systemui.recents.events.activity.LaunchTaskEvent;
 import com.android.systemui.recents.events.activity.LaunchTaskStartedEvent;
@@ -95,6 +98,7 @@
 import com.android.systemui.recents.model.TaskStack;
 
 import com.android.systemui.recents.views.grid.GridTaskView;
+import com.android.systemui.recents.views.grid.TaskGridLayoutAlgorithm;
 import com.android.systemui.recents.views.grid.TaskViewFocusFrame;
 import java.io.PrintWriter;
 import java.lang.annotation.Retention;
@@ -446,6 +450,11 @@
         return mLayoutAlgorithm;
     }
 
+    /** Returns the grid algorithm for this task stack. */
+    public TaskGridLayoutAlgorithm getGridAlgorithm() {
+        return mLayoutAlgorithm.mTaskGridLayoutAlgorithm;
+    }
+
     /**
      * Returns the touch handler for this task stack.
      */
@@ -1489,11 +1498,6 @@
         // Remove the task from the ignored set
         removeIgnoreTask(removedTask);
 
-        // Resize the grid layout task view focus frame
-        if (mTaskViewFocusFrame != null) {
-            mTaskViewFocusFrame.resize();
-        }
-
         // If requested, relayout with the given animation
         if (animation != null) {
             updateLayoutAlgorithm(true /* boundScroll */);
@@ -1733,6 +1737,13 @@
         mUIDozeTrigger.stopDozing();
     }
 
+    public final void onBusEvent(LaunchMostRecentTaskRequestEvent event) {
+        if (mStack.getTaskCount() > 0) {
+            Task mostRecentTask = mStack.getStackFrontMostTask(true /* includeFreefromTasks */);
+            launchTask(mostRecentTask);
+        }
+    }
+
     public final void onBusEvent(LaunchNextTaskRequestEvent event) {
         if (mAwaitingFirstLayout) {
             mLaunchNextAfterFirstMeasure = true;
@@ -1741,29 +1752,7 @@
 
         final Task launchTask = mStack.getNextLaunchTarget();
         if (launchTask != null) {
-            // Stop all animations
-            cancelAllTaskViewAnimations();
-
-            float curScroll = mStackScroller.getStackScroll();
-            float targetScroll = mLayoutAlgorithm.getStackScrollForTaskAtInitialOffset(launchTask);
-            float absScrollDiff = Math.abs(targetScroll - curScroll);
-            if (getChildViewForTask(launchTask) == null || absScrollDiff > 0.35f) {
-                int duration = (int) (LAUNCH_NEXT_SCROLL_BASE_DURATION +
-                        absScrollDiff * LAUNCH_NEXT_SCROLL_INCR_DURATION);
-                mStackScroller.animateScroll(targetScroll,
-                        duration, new Runnable() {
-                            @Override
-                            public void run() {
-                                EventBus.getDefault().send(new LaunchTaskEvent(
-                                        getChildViewForTask(launchTask), launchTask, null,
-                                        INVALID_STACK_ID, false /* screenPinningRequested */));
-                            }
-                        });
-            } else {
-                EventBus.getDefault().send(new LaunchTaskEvent(getChildViewForTask(launchTask),
-                        launchTask, null, INVALID_STACK_ID, false /* screenPinningRequested */));
-            }
-
+            launchTask(launchTask);
             MetricsLogger.action(getContext(), MetricsEvent.OVERVIEW_LAUNCH_PREVIOUS_TASK,
                     launchTask.key.getComponent().toString());
         } else if (mStack.getTaskCount() == 0) {
@@ -1846,6 +1835,17 @@
         announceForAccessibility(getContext().getString(
                 R.string.accessibility_recents_item_dismissed, event.task.title));
 
+        if (useGridLayout() && event.animation != null) {
+            event.animation.setListener(new AnimatorListenerAdapter() {
+                public void onAnimationEnd(Animator animator) {
+                    if (mTaskViewFocusFrame != null) {
+                        // Resize the grid layout task view focus frame
+                        mTaskViewFocusFrame.resize();
+                    }
+                }
+            });
+        }
+
         // Remove the task from the stack
         mStack.removeTask(event.task, event.animation, false /* fromDockGesture */);
         EventBus.getDefault().send(new DeleteTaskDataEvent(event.task));
@@ -2215,6 +2215,31 @@
         return -1;
     }
 
+    private void launchTask(Task task) {
+        // Stop all animations
+        cancelAllTaskViewAnimations();
+
+        float curScroll = mStackScroller.getStackScroll();
+        float targetScroll = mLayoutAlgorithm.getStackScrollForTaskAtInitialOffset(task);
+        float absScrollDiff = Math.abs(targetScroll - curScroll);
+        if (getChildViewForTask(task) == null || absScrollDiff > 0.35f) {
+            int duration = (int) (LAUNCH_NEXT_SCROLL_BASE_DURATION +
+                    absScrollDiff * LAUNCH_NEXT_SCROLL_INCR_DURATION);
+            mStackScroller.animateScroll(targetScroll,
+                    duration, new Runnable() {
+                        @Override
+                        public void run() {
+                            EventBus.getDefault().send(new LaunchTaskEvent(
+                                    getChildViewForTask(task), task, null,
+                                    INVALID_STACK_ID, false /* screenPinningRequested */));
+                        }
+                    });
+        } else {
+            EventBus.getDefault().send(new LaunchTaskEvent(getChildViewForTask(task),
+                    task, null, INVALID_STACK_ID, false /* screenPinningRequested */));
+        }
+    }
+
     /**
      * Check whether we should use the grid layout.
      */
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
index 45e766c..a5f7832 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
@@ -151,7 +151,7 @@
     @ViewDebug.ExportedProperty(deepExport=true, prefix="thumbnail_")
     protected TaskViewThumbnail mThumbnailView;
     @ViewDebug.ExportedProperty(deepExport=true, prefix="header_")
-    TaskViewHeader mHeaderView;
+    protected TaskViewHeader mHeaderView;
     private View mActionButtonView;
     private View mIncompatibleAppToastView;
     private TaskViewCallbacks mCb;
@@ -270,7 +270,6 @@
         return super.onInterceptTouchEvent(ev);
     }
 
-
     @Override
     protected void measureContents(int width, int height) {
         int widthWithoutPadding = width - mPaddingLeft - mPaddingRight;
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java
index 0777163..dc666e9 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java
@@ -91,6 +91,9 @@
             if (mColor != color || Float.compare(mDimAlpha, dimAlpha) != 0) {
                 mColor = color;
                 mDimAlpha = dimAlpha;
+                if (mShouldDarkenBackgroundColor) {
+                    color = getSecondaryColor(color, false /* useLightOverlayColor */);
+                }
                 mBackgroundPaint.setColor(color);
 
                 ColorUtils.colorToHSL(color, mTmpHSL);
@@ -179,6 +182,10 @@
     // Header dim, which is only used when task view hardware layers are not used
     private Paint mDimLayerPaint = new Paint();
 
+    // Whether the background color should be darkened to differentiate from the primary color.
+    // Used in grid layout.
+    private boolean mShouldDarkenBackgroundColor = false;
+
     private CountDownTimer mFocusTimerCountDown;
 
     public TaskViewHeader(Context context) {
@@ -443,6 +450,13 @@
     }
 
     /**
+     * Sets whether the background color should be darkened to differentiate from the primary color.
+     */
+    public void setShouldDarkenBackgroundColor(boolean flag) {
+        mShouldDarkenBackgroundColor = flag;
+    }
+
+    /**
      * Binds the bar view to the task.
      */
     public void bindToTask(Task t, boolean touchExplorationEnabled, boolean disabledInSafeMode) {
@@ -557,7 +571,7 @@
      * Mark this task view that the user does has not interacted with the stack after a certain
      * time.
      */
-    void setNoUserInteractionState() {
+    public void setNoUserInteractionState() {
         mDismissButton.setVisibility(View.VISIBLE);
         mDismissButton.animate().cancel();
         mDismissButton.setAlpha(1f);
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewThumbnail.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewThumbnail.java
index 4ac0f9e..02b0113 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewThumbnail.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewThumbnail.java
@@ -77,10 +77,11 @@
     @ViewDebug.ExportedProperty(category="recents")
     private float mDimAlpha;
     private Matrix mMatrix = new Matrix();
-    protected Paint mDrawPaint = new Paint();
-    private Paint mLockedPaint = new Paint();
+    private Paint mDrawPaint = new Paint();
+    protected Paint mLockedPaint = new Paint();
     protected Paint mBgFillPaint = new Paint();
     protected BitmapShader mBitmapShader;
+    protected boolean mUserLocked = false;
     private LightingColorFilter mLightingColorFilter = new LightingColorFilter(0xffffffff, 0);
 
     // Clip the top of the thumbnail against the opaque header bar that overlaps this view
@@ -152,7 +153,7 @@
         int thumbnailHeight = Math.min(viewHeight,
                 (int) (mThumbnailRect.height() * mThumbnailScale));
 
-        if (mTask != null && mTask.isLocked) {
+        if (mUserLocked) {
             canvas.drawRoundRect(0, 0, viewWidth, viewHeight, mCornerRadius, mCornerRadius,
                     mLockedPaint);
         } else if (mBitmapShader != null && thumbnailWidth > 0 && thumbnailHeight > 0) {
@@ -344,6 +345,17 @@
     }
 
     /**
+     * Returns the {@link Paint} used to draw a task screenshot, or {@link #mLockedPaint} if the
+     * thumbnail shouldn't be drawn because it belongs to a locked user.
+     */
+    protected Paint getDrawPaint() {
+        if (mUserLocked) {
+            return mLockedPaint;
+        }
+        return mDrawPaint;
+    }
+
+    /**
      * Binds the thumbnail view to the task.
      */
     void bindToTask(Task t, boolean disabledInSafeMode, int displayOrientation, Rect displayRect) {
@@ -354,7 +366,10 @@
         if (t.colorBackground != 0) {
             mBgFillPaint.setColor(t.colorBackground);
         }
-        mLockedPaint.setColor(t.colorPrimary);
+        if (t.colorPrimary != 0) {
+            mLockedPaint.setColor(t.colorPrimary);
+        }
+        mUserLocked = t.isLocked;
         EventBus.getDefault().register(this);
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/grid/GridTaskView.java b/packages/SystemUI/src/com/android/systemui/recents/views/grid/GridTaskView.java
index a86abf6..8b4700c 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/grid/GridTaskView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/grid/GridTaskView.java
@@ -53,6 +53,7 @@
         mThumbnailView.setOverlayHeaderOnThumbnailActionBar(false);
         mThumbnailView.updateThumbnailMatrix();
         mThumbnailView.setTranslationY(mHeaderHeight);
+        mHeaderView.setShouldDarkenBackgroundColor(true);
     }
 
     @Override
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/grid/GridTaskViewThumbnail.java b/packages/SystemUI/src/com/android/systemui/recents/views/grid/GridTaskViewThumbnail.java
index 2c3e42b..bcf4f17 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/grid/GridTaskViewThumbnail.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/grid/GridTaskViewThumbnail.java
@@ -28,7 +28,6 @@
 
     private Path mThumbnailOutline;
     private Path mRestBackgroundOutline;
-    private Path mFullBackgroundOutline;
     // True if either this view's size or thumbnail scale has changed and mThumbnailOutline should
     // be updated.
     private boolean mUpdateThumbnailOutline = true;
@@ -145,10 +144,7 @@
                         90, 90, false); // F
                 mRestBackgroundOutline.lineTo(l, t); // A
                 mRestBackgroundOutline.close();
-
             }
-        } else {
-            mFullBackgroundOutline = mThumbnailOutline;
         }
     }
 
@@ -167,7 +163,10 @@
             updateThumbnailOutline();
             mUpdateThumbnailOutline = false;
         }
-        if (mBitmapShader != null && thumbnailWidth > 0 && thumbnailHeight > 0) {
+
+        if (mUserLocked) {
+            canvas.drawPath(mThumbnailOutline, mLockedPaint);
+        } else if (mBitmapShader != null && thumbnailWidth > 0 && thumbnailHeight > 0) {
             // Draw the background, there will be some small overdraw with the thumbnail
             if (thumbnailWidth < viewWidth) {
                 // Portrait thumbnail on a landscape task view
@@ -177,9 +176,9 @@
                 // Landscape thumbnail on a portrait task view
                 canvas.drawPath(mRestBackgroundOutline, mBgFillPaint);
             }
-            canvas.drawPath(mThumbnailOutline, mDrawPaint);
+            canvas.drawPath(mThumbnailOutline, getDrawPaint());
         } else {
-            canvas.drawPath(mFullBackgroundOutline, mBgFillPaint);
+            canvas.drawPath(mThumbnailOutline, mBgFillPaint);
         }
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
index 7135caf..9a4b45a 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
@@ -178,20 +178,19 @@
                 .bigPicture(picture.createAshmemBitmap());
 
         // The public notification will show similar info but with the actual screenshot omitted
-        mPublicNotificationBuilder = new Notification.Builder(context)
-                .setChannel(NotificationChannels.SCREENSHOTS)
-                .setContentTitle(r.getString(R.string.screenshot_saving_title))
-                .setContentText(r.getString(R.string.screenshot_saving_text))
-                .setSmallIcon(R.drawable.stat_notify_image)
-                .setCategory(Notification.CATEGORY_PROGRESS)
-                .setWhen(now)
-                .setShowWhen(true)
-                .setColor(r.getColor(
-                        com.android.internal.R.color.system_notification_accent_color));
+        mPublicNotificationBuilder =
+                new Notification.Builder(context, NotificationChannels.SCREENSHOTS)
+                        .setContentTitle(r.getString(R.string.screenshot_saving_title))
+                        .setContentText(r.getString(R.string.screenshot_saving_text))
+                        .setSmallIcon(R.drawable.stat_notify_image)
+                        .setCategory(Notification.CATEGORY_PROGRESS)
+                        .setWhen(now)
+                        .setShowWhen(true)
+                        .setColor(r.getColor(
+                                com.android.internal.R.color.system_notification_accent_color));
         SystemUI.overrideNotificationAppName(context, mPublicNotificationBuilder);
 
-        mNotificationBuilder = new Notification.Builder(context)
-            .setChannel(NotificationChannels.SCREENSHOTS)
+        mNotificationBuilder = new Notification.Builder(context, NotificationChannels.SCREENSHOTS)
             .setTicker(r.getString(R.string.screenshot_saving_ticker)
                     + (mTickerAddSpace ? " " : ""))
             .setContentTitle(r.getString(R.string.screenshot_saving_title))
@@ -335,7 +334,6 @@
 
             // Update the text and the icon for the existing notification
             mPublicNotificationBuilder
-                    .setChannel(NotificationChannels.SCREENSHOTS)
                     .setContentTitle(r.getString(R.string.screenshot_saved_title))
                     .setContentText(r.getString(R.string.screenshot_saved_text))
                     .setContentIntent(PendingIntent.getActivity(mParams.context, 0, launchIntent, 0))
@@ -344,7 +342,6 @@
                     .setColor(context.getColor(
                             com.android.internal.R.color.system_notification_accent_color));
             mNotificationBuilder
-                .setChannel(NotificationChannels.SCREENSHOTS)
                 .setContentTitle(r.getString(R.string.screenshot_saved_title))
                 .setContentText(r.getString(R.string.screenshot_saved_text))
                 .setContentIntent(PendingIntent.getActivity(mParams.context, 0, launchIntent, 0))
@@ -858,7 +855,7 @@
         String errorMsg = r.getString(msgResId);
 
         // Repurpose the existing notification to notify the user of the error
-        Notification.Builder b = new Notification.Builder(context)
+        Notification.Builder b = new Notification.Builder(context, NotificationChannels.ALERTS)
             .setTicker(r.getString(R.string.screenshot_failed_title))
             .setContentTitle(r.getString(R.string.screenshot_failed_title))
             .setContentText(errorMsg)
diff --git a/packages/SystemUI/src/com/android/systemui/settings/BrightnessController.java b/packages/SystemUI/src/com/android/systemui/settings/BrightnessController.java
index 7825e9e..d3f997a 100644
--- a/packages/SystemUI/src/com/android/systemui/settings/BrightnessController.java
+++ b/packages/SystemUI/src/com/android/systemui/settings/BrightnessController.java
@@ -295,8 +295,10 @@
 
         mAutomaticAvailable = context.getResources().getBoolean(
                 com.android.internal.R.bool.config_automatic_brightness_available);
-        mPower = IPowerManager.Stub.asInterface(ServiceManager.getService("power"));
-        mVrManager = IVrManager.Stub.asInterface(ServiceManager.getService("vrmanager"));
+        mPower = IPowerManager.Stub.asInterface(ServiceManager.getService(
+                Context.POWER_SERVICE));
+        mVrManager = IVrManager.Stub.asInterface(ServiceManager.getService(
+                Context.VR_SERVICE));
     }
 
     public void addStateChangedCallback(BrightnessStateChangeCallback cb) {
diff --git a/packages/SystemUI/src/com/android/systemui/shortcut/ShortcutKeyDispatcher.java b/packages/SystemUI/src/com/android/systemui/shortcut/ShortcutKeyDispatcher.java
index 19eefec..7699bb9 100644
--- a/packages/SystemUI/src/com/android/systemui/shortcut/ShortcutKeyDispatcher.java
+++ b/packages/SystemUI/src/com/android/systemui/shortcut/ShortcutKeyDispatcher.java
@@ -107,7 +107,7 @@
                 List<ActivityManager.RecentTaskInfo> taskList =
                         SystemServicesProxy.getInstance(mContext).getRecentTasks(1,
                                 UserHandle.USER_CURRENT, false, new ArraySet<>());
-                recents.showRecents(
+                recents.showRecentApps(
                         false /* triggeredFromAltTab */,
                         false /* fromHome */);
                 if (!taskList.isEmpty()) {
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/Divider.java b/packages/SystemUI/src/com/android/systemui/stackdivider/Divider.java
index b9a0f74..0b09acc 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/Divider.java
+++ b/packages/SystemUI/src/com/android/systemui/stackdivider/Divider.java
@@ -72,6 +72,10 @@
         return mMinimized;
     }
 
+    public boolean isHomeStackResizable() {
+        return mHomeStackResizable;
+    }
+
     private void addDivider(Configuration configuration) {
         mView = (DividerView)
                 LayoutInflater.from(mContext).inflate(R.layout.docked_stack_divider, null);
@@ -119,6 +123,7 @@
         mView.post(new Runnable() {
             @Override
             public void run() {
+                mHomeStackResizable = isHomeStackResizable;
                 if (mMinimized != minimized) {
                     mMinimized = minimized;
                     updateTouchable();
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java b/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java
index 49035ba..6f59fe2 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java
+++ b/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java
@@ -1241,7 +1241,8 @@
 
     public final void onBusEvent(UndockingTaskEvent undockingTaskEvent) {
         int dockSide = mWindowManagerProxy.getDockSide();
-        if (dockSide != WindowManager.DOCKED_INVALID && !mDockedStackMinimized) {
+        if (dockSide != WindowManager.DOCKED_INVALID && (mHomeStackResizable
+                || !mDockedStackMinimized)) {
             startDragging(false /* animate */, false /* touching */);
             SnapTarget target = dockSideTopLeft(dockSide)
                     ? mSnapAlgorithm.getDismissEndTarget()
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java b/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java
index b9ed725..0bd6491 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java
@@ -38,7 +38,6 @@
 import com.android.systemui.classifier.FalsingManager;
 import com.android.systemui.statusbar.notification.FakeShadowView;
 import com.android.systemui.statusbar.notification.NotificationUtils;
-import com.android.systemui.statusbar.policy.AccessibilityController;
 import com.android.systemui.statusbar.stack.NotificationStackScrollLayout;
 import com.android.systemui.statusbar.stack.StackStateAnimator;
 
@@ -106,7 +105,7 @@
     private boolean mDimmed;
     private boolean mDark;
 
-    private int mBgTint = NO_COLOR;
+    protected int mBgTint = NO_COLOR;
     private float mBgAlpha = 1f;
 
     /**
@@ -140,8 +139,6 @@
     private ValueAnimator mBackgroundColorAnimator;
     private float mAppearAnimationFraction = -1.0f;
     private float mAppearAnimationTranslation;
-    private boolean mShowingLegacyBackground;
-    private final int mLegacyColor;
     private final int mNormalColor;
     private final int mLowPriorityColor;
     private boolean mIsBelowSpeedBump;
@@ -192,7 +189,6 @@
         mSlowOutLinearInInterpolator = new PathInterpolator(0.8f, 0.0f, 1.0f, 1.0f);
         setClipChildren(false);
         setClipToPadding(false);
-        mLegacyColor = context.getColor(R.color.notification_legacy_background_color);
         mNormalColor = context.getColor(R.color.notification_material_background_color);
         mLowPriorityColor = context.getColor(
                 R.color.notification_material_background_low_priority_color);
@@ -489,11 +485,6 @@
         updateOutlineAlpha();
     }
 
-    public void setShowingLegacyBackground(boolean showing) {
-        mShowingLegacyBackground = showing;
-        updateBackgroundTint();
-    }
-
     @Override
     public void setBelowSpeedBump(boolean below) {
         super.setBelowSpeedBump(below);
@@ -950,8 +941,6 @@
         }
         if (withTint && mBgTint != NO_COLOR) {
             return mBgTint;
-        } else if (mShowingLegacyBackground) {
-            return mLegacyColor;
         } else if (mIsBelowSpeedBump) {
             return mLowPriorityColor;
         } else {
@@ -962,8 +951,6 @@
     protected int getRippleColor() {
         if (mBgTint != 0) {
             return mTintedRippleColor;
-        } else if (mShowingLegacyBackground) {
-            return mTintedRippleColor;
         } else if (mIsBelowSpeedBump) {
             return mLowPriorityRippleColor;
         } else {
@@ -1009,7 +996,6 @@
     public void reset() {
         setTintColor(0);
         resetBackgroundAlpha();
-        setShowingLegacyBackground(false);
         setBelowSpeedBump(false);
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
index 477701c..995901b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
@@ -25,7 +25,6 @@
 import android.os.Message;
 import android.support.annotation.VisibleForTesting;
 import android.util.Pair;
-import android.view.KeyEvent;
 
 import com.android.internal.os.SomeArgs;
 import com.android.internal.statusbar.IStatusBar;
@@ -63,9 +62,6 @@
     private static final int MSG_SET_WINDOW_STATE              = 12 << MSG_SHIFT;
     private static final int MSG_SHOW_RECENT_APPS              = 13 << MSG_SHIFT;
     private static final int MSG_HIDE_RECENT_APPS              = 14 << MSG_SHIFT;
-    private static final int MSG_BUZZ_BEEP_BLINKED             = 15 << MSG_SHIFT;
-    private static final int MSG_NOTIFICATION_LIGHT_OFF        = 16 << MSG_SHIFT;
-    private static final int MSG_NOTIFICATION_LIGHT_PULSE      = 17 << MSG_SHIFT;
     private static final int MSG_SHOW_SCREEN_PIN_REQUEST       = 18 << MSG_SHIFT;
     private static final int MSG_APP_TRANSITION_PENDING        = 19 << MSG_SHIFT;
     private static final int MSG_APP_TRANSITION_CANCELLED      = 20 << MSG_SHIFT;
@@ -95,6 +91,8 @@
     private final Object mLock = new Object();
     private ArrayList<Callbacks> mCallbacks = new ArrayList<>();
     private Handler mHandler = new H(Looper.getMainLooper());
+    private int mDisable1;
+    private int mDisable2;
 
     /**
      * These methods are called back on the main thread.
@@ -121,13 +119,10 @@
         default void toggleKeyboardShortcutsMenu(int deviceId) { }
         default void cancelPreloadRecentApps() { }
         default void setWindowState(int window, int state) { }
-        default void buzzBeepBlinked() { }
-        default void notificationLightOff() { }
-        default void notificationLightPulse(int argb, int onMillis, int offMillis) { }
         default void showScreenPinningRequest(int taskId) { }
-        default void appTransitionPending() { }
+        default void appTransitionPending(boolean forced) { }
         default void appTransitionCancelled() { }
-        default void appTransitionStarting(long startTime, long duration) { }
+        default void appTransitionStarting(long startTime, long duration, boolean forced) { }
         default void appTransitionFinished() { }
         default void showAssistDisclosure() { }
         default void startAssist(Bundle args) { }
@@ -147,6 +142,7 @@
 
     public void addCallbacks(Callbacks callbacks) {
         mCallbacks.add(callbacks);
+        callbacks.disable(mDisable1, mDisable2, false /* animate */);
     }
 
     public void removeCallbacks(Callbacks callbacks) {
@@ -168,13 +164,19 @@
         }
     }
 
-    public void disable(int state1, int state2) {
+    public void disable(int state1, int state2, boolean animate) {
         synchronized (mLock) {
+            mDisable1 = state1;
+            mDisable2 = state2;
             mHandler.removeMessages(MSG_DISABLE);
-            mHandler.obtainMessage(MSG_DISABLE, state1, state2, null).sendToTarget();
+            mHandler.obtainMessage(MSG_DISABLE, state1, state2, animate).sendToTarget();
         }
     }
 
+    public void disable(int state1, int state2) {
+        disable(state1, state2, true);
+    }
+
     public void animateExpandNotificationsPanel() {
         synchronized (mLock) {
             mHandler.removeMessages(MSG_EXPAND_NOTIFICATIONS);
@@ -313,26 +315,6 @@
         }
     }
 
-    public void buzzBeepBlinked() {
-        synchronized (mLock) {
-            mHandler.removeMessages(MSG_BUZZ_BEEP_BLINKED);
-            mHandler.sendEmptyMessage(MSG_BUZZ_BEEP_BLINKED);
-        }
-    }
-
-    public void notificationLightOff() {
-        synchronized (mLock) {
-            mHandler.sendEmptyMessage(MSG_NOTIFICATION_LIGHT_OFF);
-        }
-    }
-
-    public void notificationLightPulse(int argb, int onMillis, int offMillis) {
-        synchronized (mLock) {
-            mHandler.obtainMessage(MSG_NOTIFICATION_LIGHT_PULSE, onMillis, offMillis, argb)
-                    .sendToTarget();
-        }
-    }
-
     public void showScreenPinningRequest(int taskId) {
         synchronized (mLock) {
             mHandler.obtainMessage(MSG_SHOW_SCREEN_PIN_REQUEST, taskId, 0, null)
@@ -341,9 +323,13 @@
     }
 
     public void appTransitionPending() {
+        appTransitionPending(false /* forced */);
+    }
+
+    public void appTransitionPending(boolean forced) {
         synchronized (mLock) {
             mHandler.removeMessages(MSG_APP_TRANSITION_PENDING);
-            mHandler.sendEmptyMessage(MSG_APP_TRANSITION_PENDING);
+            mHandler.obtainMessage(MSG_APP_TRANSITION_PENDING, forced ? 1 : 0, 0).sendToTarget();
         }
     }
 
@@ -355,10 +341,14 @@
     }
 
     public void appTransitionStarting(long startTime, long duration) {
+        appTransitionStarting(startTime, duration, false /* forced */);
+    }
+
+    public void appTransitionStarting(long startTime, long duration, boolean forced) {
         synchronized (mLock) {
             mHandler.removeMessages(MSG_APP_TRANSITION_STARTING);
-            mHandler.obtainMessage(MSG_APP_TRANSITION_STARTING, Pair.create(startTime, duration))
-                    .sendToTarget();
+            mHandler.obtainMessage(MSG_APP_TRANSITION_STARTING, forced ? 1 : 0, 0,
+                    Pair.create(startTime, duration)).sendToTarget();
         }
     }
 
@@ -447,7 +437,7 @@
                 }
                 case MSG_DISABLE:
                     for (int i = 0; i < mCallbacks.size(); i++) {
-                        mCallbacks.get(i).disable(msg.arg1, msg.arg2, true /* animate */);
+                        mCallbacks.get(i).disable(msg.arg1, msg.arg2, (Boolean) msg.obj);
                     }
                     break;
                 case MSG_EXPAND_NOTIFICATIONS:
@@ -524,21 +514,6 @@
                         mCallbacks.get(i).setWindowState(msg.arg1, msg.arg2);
                     }
                     break;
-                case MSG_BUZZ_BEEP_BLINKED:
-                    for (int i = 0; i < mCallbacks.size(); i++) {
-                        mCallbacks.get(i).buzzBeepBlinked();
-                    }
-                    break;
-                case MSG_NOTIFICATION_LIGHT_OFF:
-                    for (int i = 0; i < mCallbacks.size(); i++) {
-                        mCallbacks.get(i).notificationLightOff();
-                    }
-                    break;
-                case MSG_NOTIFICATION_LIGHT_PULSE:
-                    for (int i = 0; i < mCallbacks.size(); i++) {
-                        mCallbacks.get(i).notificationLightPulse((Integer) msg.obj, msg.arg1, msg.arg2);
-                    }
-                    break;
                 case MSG_SHOW_SCREEN_PIN_REQUEST:
                     for (int i = 0; i < mCallbacks.size(); i++) {
                         mCallbacks.get(i).showScreenPinningRequest(msg.arg1);
@@ -546,7 +521,7 @@
                     break;
                 case MSG_APP_TRANSITION_PENDING:
                     for (int i = 0; i < mCallbacks.size(); i++) {
-                        mCallbacks.get(i).appTransitionPending();
+                        mCallbacks.get(i).appTransitionPending(msg.arg1 != 0);
                     }
                     break;
                 case MSG_APP_TRANSITION_CANCELLED:
@@ -557,7 +532,8 @@
                 case MSG_APP_TRANSITION_STARTING:
                     for (int i = 0; i < mCallbacks.size(); i++) {
                         Pair<Long, Long> data = (Pair<Long, Long>) msg.obj;
-                        mCallbacks.get(i).appTransitionStarting(data.first, data.second);
+                        mCallbacks.get(i).appTransitionStarting(data.first, data.second,
+                                msg.arg1 != 0);
                     }
                     break;
                 case MSG_APP_TRANSITION_FINISHED:
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
index d1245b1..bfe4bb2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
@@ -22,7 +22,6 @@
 import android.animation.ValueAnimator.AnimatorUpdateListener;
 import android.annotation.Nullable;
 import android.content.Context;
-import android.content.res.ColorStateList;
 import android.graphics.drawable.AnimatedVectorDrawable;
 import android.graphics.drawable.AnimationDrawable;
 import android.graphics.drawable.ColorDrawable;
@@ -76,7 +75,9 @@
     private int mNotificationMinHeightLegacy;
     private int mMaxHeadsUpHeightLegacy;
     private int mMaxHeadsUpHeight;
+    private int mMaxHeadsUpHeightIncreased;
     private int mNotificationMinHeight;
+    private int mNotificationMinHeightLarge;
     private int mNotificationMaxHeight;
     private int mNotificationAmbientHeight;
     private int mIncreasedPaddingBetweenElements;
@@ -207,6 +208,10 @@
     private Runnable mOnDismissRunnable;
     private boolean mIsLowPriority;
     private boolean mIsColorized;
+    private boolean mUseIncreasedCollapsedHeight;
+    private boolean mUseIncreasedHeadsUpHeight;
+    private float mTranslationWhenRemoved;
+    private boolean mWasChildInGroupWhenRemoved;
 
     @Override
     public boolean isGroupExpansionChanging() {
@@ -325,10 +330,11 @@
         boolean isPreL = Boolean.TRUE.equals(expandedIcon.getTag(R.id.icon_is_pre_L));
         boolean colorize = !isPreL || NotificationUtils.isGrayscale(expandedIcon,
                 NotificationColorUtil.getInstance(mContext));
+        int color = StatusBarIconView.NO_COLOR;
         if (colorize) {
-            int color = mEntry.getContrastedColor(mContext, mIsLowPriority && !isExpanded());
-            expandedIcon.setImageTintList(ColorStateList.valueOf(color));
+            color = mEntry.getContrastedColor(mContext, mIsLowPriority && !isExpanded());
         }
+        expandedIcon.setStaticDrawableColor(color);
     }
 
     private void updateLimits() {
@@ -341,13 +347,25 @@
         boolean customView = layout.getContractedChild().getId()
                 != com.android.internal.R.id.status_bar_latest_event_content;
         boolean beforeN = mEntry.targetSdk < Build.VERSION_CODES.N;
-        int minHeight = customView && beforeN && !mIsSummaryWithChildren ?
-                mNotificationMinHeightLegacy : mNotificationMinHeight;
+        int minHeight;
+        if (customView && beforeN && !mIsSummaryWithChildren) {
+            minHeight = mNotificationMinHeightLegacy;
+        } else if (mUseIncreasedCollapsedHeight && layout == mPrivateLayout) {
+            minHeight = mNotificationMinHeightLarge;
+        } else {
+            minHeight = mNotificationMinHeight;
+        }
         boolean headsUpCustom = layout.getHeadsUpChild() != null &&
                 layout.getHeadsUpChild().getId()
                         != com.android.internal.R.id.status_bar_latest_event_content;
-        int headsUpheight = headsUpCustom && beforeN ? mMaxHeadsUpHeightLegacy
-                : mMaxHeadsUpHeight;
+        int headsUpheight;
+        if (headsUpCustom && beforeN) {
+            headsUpheight = mMaxHeadsUpHeightLegacy;
+        } else if (mUseIncreasedHeadsUpHeight && layout == mPrivateLayout) {
+            headsUpheight = mMaxHeadsUpHeightIncreased;
+        } else {
+            headsUpheight = mMaxHeadsUpHeight;
+        }
         layout.setHeights(minHeight, headsUpheight, mNotificationMaxHeight,
                 mNotificationAmbientHeight);
     }
@@ -444,6 +462,7 @@
         updateBackgroundForGroupState();
         updateClickAndFocus();
         if (mNotificationParent != null) {
+            setOverrideTintColor(NO_COLOR, 0.0f);
             mNotificationParent.updateBackgroundForGroupState();
         }
         updateIconVisibilities();
@@ -820,10 +839,22 @@
 
     public void setRemoved() {
         mRemoved = true;
-
+        mTranslationWhenRemoved = getTranslationY();
+        mWasChildInGroupWhenRemoved = isChildInGroup();
+        if (isChildInGroup()) {
+            mTranslationWhenRemoved += getNotificationParent().getTranslationY();
+        }
         mPrivateLayout.setRemoved();
     }
 
+    public boolean wasChildInGroupWhenRemoved() {
+        return mWasChildInGroupWhenRemoved;
+    }
+
+    public float getTranslationWhenRemoved() {
+        return mTranslationWhenRemoved;
+    }
+
     public NotificationChildrenContainer getChildrenContainer() {
         return mChildrenContainer;
     }
@@ -871,6 +902,9 @@
      * @return whether the notification is currently showing a view with an icon.
      */
     public boolean isShowingIcon() {
+        if (areGutsExposed()) {
+            return false;
+        }
         if (mIsSummaryWithChildren) {
             return true;
         }
@@ -979,6 +1013,14 @@
         }
     }
 
+    public void setUseIncreasedCollapsedHeight(boolean use) {
+        mUseIncreasedCollapsedHeight = use;
+    }
+
+    public void setUseIncreasedHeadsUpHeight(boolean use) {
+        mUseIncreasedHeadsUpHeight = use;
+    }
+
     public interface ExpansionLogger {
         public void logNotificationExpansion(String key, boolean userAction, boolean expanded);
     }
@@ -992,11 +1034,15 @@
     private void initDimens() {
         mNotificationMinHeightLegacy = getFontScaledHeight(R.dimen.notification_min_height_legacy);
         mNotificationMinHeight = getFontScaledHeight(R.dimen.notification_min_height);
+        mNotificationMinHeightLarge = getFontScaledHeight(
+                R.dimen.notification_min_height_increased);
         mNotificationMaxHeight = getFontScaledHeight(R.dimen.notification_max_height);
         mNotificationAmbientHeight = getFontScaledHeight(R.dimen.notification_ambient_height);
         mMaxHeadsUpHeightLegacy = getFontScaledHeight(
                 R.dimen.notification_max_heads_up_height_legacy);
         mMaxHeadsUpHeight = getFontScaledHeight(R.dimen.notification_max_heads_up_height);
+        mMaxHeadsUpHeightIncreased = getFontScaledHeight(
+                R.dimen.notification_max_heads_up_height_increased);
         mIncreasedPaddingBetweenElements = getResources()
                 .getDimensionPixelSize(R.dimen.notification_divider_height_increased);
         mIconTransformContentShiftNoIcon = getResources().getDimensionPixelSize(
@@ -1782,9 +1828,7 @@
         return mShowingPublic ? mPublicLayout : mPrivateLayout;
     }
 
-    @Override
     public void setShowingLegacyBackground(boolean showing) {
-        super.setShowingLegacyBackground(showing);
         for (NotificationContentView l : mLayouts) {
             l.setShowingLegacyBackground(showing);
         }
@@ -1868,14 +1912,14 @@
             } else if (isUserLocked()) {
                 return mChildrenContainer.getGroupExpandFraction();
             }
-        } else if (isColorized()) {
+        } else if (isColorized() && (!mIsLowPriority || isExpanded())) {
             return -1.0f;
         }
         return 0.0f;
     }
 
     private boolean isColorized() {
-        return mIsColorized;
+        return mIsColorized && mBgTint != NO_COLOR;
     }
 
     @Override
@@ -1950,7 +1994,7 @@
         mAboveShelf = aboveShelf;
     }
 
-    public class NotificationViewState extends ExpandableViewState {
+    public static class NotificationViewState extends ExpandableViewState {
 
         private final StackScrollState mOverallState;
 
@@ -1971,8 +2015,11 @@
         @Override
         protected void onYTranslationAnimationFinished(View view) {
             super.onYTranslationAnimationFinished(view);
-            if (mHeadsupDisappearRunning) {
-                setHeadsUpAnimatingAway(false);
+            if (view instanceof ExpandableNotificationRow) {
+                ExpandableNotificationRow row = (ExpandableNotificationRow) view;
+                if (row.isHeadsUpAnimatingAway()) {
+                    row.setHeadsUpAnimatingAway(false);
+                }
             }
         }
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java
index bd5fb92..0ea56b8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java
@@ -381,12 +381,7 @@
                         if (appShortcuts != null) {
                             result.add(appShortcuts);
                         }
-                        synchronized (sLock) {
-                            // showKeyboardShortcutsDialog only if it has not been dismissed already
-                            if (sInstance != null) {
-                                showKeyboardShortcutsDialog(result);
-                            }
-                        }
+                        showKeyboardShortcutsDialog(result);
                     }
                 }, deviceId);
     }
@@ -585,7 +580,12 @@
         mKeyboardShortcutsDialog.setCanceledOnTouchOutside(true);
         Window keyboardShortcutsWindow = mKeyboardShortcutsDialog.getWindow();
         keyboardShortcutsWindow.setType(TYPE_SYSTEM_DIALOG);
-        mKeyboardShortcutsDialog.show();
+        synchronized (sLock) {
+            // showKeyboardShortcutsDialog only if it has not been dismissed already
+            if (sInstance != null) {
+                mKeyboardShortcutsDialog.show();
+            }
+        }
     }
 
     private void populateKeyboardShortcuts(LinearLayout keyboardShortcutsLayout,
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/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
index d599ec1..bc992d8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
@@ -87,6 +87,7 @@
     private KeyguardUpdateMonitorCallback mUpdateMonitor;
 
     private final DevicePolicyManager mDevicePolicyManager;
+    private boolean mDozing;
 
     public KeyguardIndicationController(Context context, ViewGroup indicationArea,
             LockIcon lockIcon) {
@@ -139,7 +140,7 @@
             return;
         }
 
-        if (mDevicePolicyManager.isDeviceManaged()) {
+        if (!mDozing && mDevicePolicyManager.isDeviceManaged()) {
             final CharSequence organizationName =
                     mDevicePolicyManager.getDeviceOwnerOrganizationName();
             if (organizationName != null) {
@@ -224,6 +225,18 @@
         if (mVisible) {
             // Walk down a precedence-ordered list of what should indication
             // should be shown based on user or device state
+            if (mDozing) {
+                // If we're dozing, never show a persistent indication.
+                if (!TextUtils.isEmpty(mTransientIndication)) {
+                    mTextView.switchIndication(mTransientIndication);
+                    mTextView.setTextColor(mTransientTextColor);
+
+                } else {
+                    mTextView.switchIndication(null);
+                }
+                return;
+            }
+
             if (!mUserManager.isUserUnlocked(ActivityManager.getCurrentUser())) {
                 mTextView.switchIndication(com.android.internal.R.string.lockscreen_storage_locked);
                 mTextView.setTextColor(Color.WHITE);
@@ -319,6 +332,12 @@
         }
     };
 
+    public void setDozing(boolean dozing) {
+        mDozing = dozing;
+        updateIndication();
+        updateDisclosure();
+    }
+
     protected class BaseKeyguardCallback extends KeyguardUpdateMonitorCallback {
         private int mLastSuccessiveErrorMessage = -1;
 
@@ -349,7 +368,8 @@
             int errorColor = mContext.getResources().getColor(R.color.system_warning_color, null);
             if (mStatusBarKeyguardViewManager.isBouncerShowing()) {
                 mStatusBarKeyguardViewManager.showBouncerMessage(helpString, errorColor);
-            } else if (updateMonitor.isDeviceInteractive()) {
+            } else if (updateMonitor.isDeviceInteractive()
+                    || mDozing && updateMonitor.isScreenOn()) {
                 mLockIcon.setTransientFpError(true);
                 showTransientIndication(helpString, errorColor);
                 mHandler.removeMessages(MSG_CLEAR_FP_MSG);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
index e0ddf13..57d2e1c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
@@ -505,7 +505,8 @@
                     isTransitioningFromTo(VISIBLE_TYPE_HEADSUP, VISIBLE_TYPE_EXPANDED) ||
                     isTransitioningFromTo(VISIBLE_TYPE_EXPANDED, VISIBLE_TYPE_HEADSUP);
             boolean pinned = !isVisibleOrTransitioning(VISIBLE_TYPE_CONTRACTED)
-                    && (mIsHeadsUp || mHeadsUpAnimatingAway);
+                    && (mIsHeadsUp || mHeadsUpAnimatingAway)
+                    && !mContainingNotification.isOnKeyguard();
             if (transitioningBetweenHunAndExpanded || pinned) {
                 return Math.min(mHeadsUpChild.getHeight(), mExpandedChild.getHeight());
             }
@@ -611,7 +612,7 @@
     public int getMaxHeight() {
         if (mExpandedChild != null) {
             return mExpandedChild.getHeight();
-        } else if (mIsHeadsUp && mHeadsUpChild != null) {
+        } else if (mIsHeadsUp && mHeadsUpChild != null && !mContainingNotification.isOnKeyguard()) {
             return mHeadsUpChild.getHeight();
         }
         return mContractedChild.getHeight();
@@ -921,7 +922,8 @@
             return VISIBLE_TYPE_SINGLELINE;
         }
 
-        if ((mIsHeadsUp || mHeadsUpAnimatingAway) && mHeadsUpChild != null) {
+        if ((mIsHeadsUp || mHeadsUpAnimatingAway) && mHeadsUpChild != null
+                && !mContainingNotification.isOnKeyguard()) {
             if (viewHeight <= mHeadsUpChild.getHeight() || noExpandedChild) {
                 return VISIBLE_TYPE_HEADSUP;
             } else {
@@ -1174,7 +1176,7 @@
         mExpandable = expandable;
         // if the expanded child has the same height as the collapsed one we hide it.
         if (mExpandedChild != null && mExpandedChild.getHeight() != 0) {
-            if ((!mIsHeadsUp || mHeadsUpChild == null)) {
+            if (!mIsHeadsUp || mHeadsUpChild == null || mContainingNotification.isOnKeyguard()) {
                 if (mExpandedChild.getHeight() == mContractedChild.getHeight()) {
                     expandable = false;
                 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java
index b49ba0c..81db429 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java
@@ -126,17 +126,18 @@
         }
 
         public boolean cacheContentViews(Context ctx, Notification updatedNotification,
-                boolean isLowPriority) {
+                boolean isLowPriority, boolean useIncreasedCollapsedView,
+                boolean useIncreasedHeadsUp) {
             boolean applyInPlace = false;
             if (updatedNotification != null) {
                 final Notification.Builder updatedNotificationBuilder
                         = Notification.Builder.recoverBuilder(ctx, updatedNotification);
                 final RemoteViews newContentView = createContentView(updatedNotificationBuilder,
-                        isLowPriority);
+                        isLowPriority, useIncreasedCollapsedView);
                 final RemoteViews newBigContentView = createBigContentView(
                         updatedNotificationBuilder, isLowPriority);
                 final RemoteViews newHeadsUpContentView =
-                        updatedNotificationBuilder.createHeadsUpContentView();
+                        updatedNotificationBuilder.createHeadsUpContentView(useIncreasedHeadsUp);
                 final RemoteViews newPublicNotification
                         = updatedNotificationBuilder.makePublicContentView();
                 final RemoteViews newAmbientNotification
@@ -162,9 +163,10 @@
                 final Notification.Builder builder
                         = Notification.Builder.recoverBuilder(ctx, notification.getNotification());
 
-                cachedContentView = createContentView(builder, isLowPriority);
+                cachedContentView = createContentView(builder, isLowPriority,
+                        useIncreasedCollapsedView);
                 cachedBigContentView = createBigContentView(builder, isLowPriority);
-                cachedHeadsUpContentView = builder.createHeadsUpContentView();
+                cachedHeadsUpContentView = builder.createHeadsUpContentView(useIncreasedHeadsUp);
                 cachedPublicContentView = builder.makePublicContentView();
                 cachedAmbientContentView = builder.makeAmbientNotification();
 
@@ -188,11 +190,11 @@
         }
 
         private RemoteViews createContentView(Notification.Builder builder,
-                boolean isAmbient) {
-            if (isAmbient) {
+                boolean isLowPriority, boolean useLarge) {
+            if (isLowPriority) {
                 return builder.makeLowPriorityContentView(false /* useRegularSubtext */);
             }
-            return builder.createContentView();
+            return builder.createContentView(useLarge);
         }
 
         // Returns true if the RemoteViews are the same.
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java
index f6056dd..fd1317e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java
@@ -39,12 +39,9 @@
 import android.view.View;
 import android.view.ViewAnimationUtils;
 import android.view.ViewGroup;
-import android.widget.CompoundButton;
 import android.widget.FrameLayout;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
-import android.widget.RadioButton;
-import android.widget.RadioGroup;
 import android.widget.SeekBar;
 import android.widget.Switch;
 import android.widget.TextView;
@@ -170,14 +167,14 @@
         void onClick(View v, int appUid);
     }
 
-    public void closeControls(int x, int y, boolean saveImportance) {
+    public void closeControls(int x, int y, boolean save) {
         if (getWindowToken() == null) {
             if (mListener != null) {
                 mListener.onGutsClosed(this);
             }
             return;
         }
-        if (mGutsContent == null || !mGutsContent.handleCloseControls()) {
+        if (mGutsContent == null || !mGutsContent.handleCloseControls(save)) {
             animateClose(x, y);
         }
         setExposed(false, mNeedsFalsingProtection);
@@ -247,6 +244,10 @@
         }
     }
 
+    public boolean willBeRemoved() {
+        return mGutsContent != null ? mGutsContent.willBeRemoved() : false;
+    }
+
     public boolean isExposed() {
         return mExposed;
     }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationInfo.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationInfo.java
index bdbc9b3..9703235 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationInfo.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationInfo.java
@@ -1,5 +1,3 @@
-package com.android.systemui.statusbar;
-
 /*
  * Copyright (C) 2017 The Android Open Source Project
  *
@@ -16,15 +14,19 @@
  * limitations under the License
  */
 
+package com.android.systemui.statusbar;
+
 import android.animation.Animator;
 import android.animation.AnimatorListenerAdapter;
 import android.app.INotificationManager;
 import android.app.NotificationChannel;
+import android.app.NotificationChannelGroup;
 import android.app.NotificationManager;
 import android.content.Context;
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
+import android.content.pm.ParceledListSlice;
 import android.content.res.ColorStateList;
 import android.content.res.TypedArray;
 import android.graphics.Canvas;
@@ -43,8 +45,6 @@
 import android.widget.CompoundButton;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
-import android.widget.RadioButton;
-import android.widget.RadioGroup;
 import android.widget.SeekBar;
 import android.widget.Switch;
 import android.widget.TextView;
@@ -77,13 +77,9 @@
     private TextView mImportanceTitle;
     private boolean mAuto;
 
-    private View mImportanceGroup;
-    private View mChannelDisabled;
+    private TextView mNumChannelsView;
+    private View mChannelDisabledView;
     private Switch mChannelEnabledSwitch;
-    private RadioButton mMinImportanceButton;
-    private RadioButton mLowImportanceButton;
-    private RadioButton mDefaultImportanceButton;
-    private RadioButton mHighImportanceButton;
 
     private GutsInteractionListener mGutsInteractionListener;
 
@@ -107,7 +103,7 @@
 
         final String pkg = sbn.getPackageName();
         int appUid = -1;
-        String appname = pkg;
+        String appName = pkg;
         Drawable pkgicon = null;
         try {
             final ApplicationInfo info = pm.getApplicationInfo(pkg,
@@ -117,44 +113,61 @@
                             | PackageManager.MATCH_DIRECT_BOOT_AWARE);
             if (info != null) {
                 appUid = info.uid;
-                appname = String.valueOf(pm.getApplicationLabel(info));
+                appName = String.valueOf(pm.getApplicationLabel(info));
                 pkgicon = pm.getApplicationIcon(info);
             }
         } catch (PackageManager.NameNotFoundException e) {
             // app is gone, just show package name and generic icon
             pkgicon = pm.getDefaultActivityIcon();
         }
+        ((ImageView) findViewById(R.id.pkgicon)).setImageDrawable(pkgicon);
+
+        int numChannels = 1;
+        try {
+            numChannels = iNotificationManager.getNumNotificationChannelsForPackage(
+                    pkg, appUid, false /* includeDeleted */);
+        } catch (RemoteException e) {
+            Log.e(TAG, e.toString());
+        }
+
+        mNumChannelsView = (TextView) (findViewById(R.id.num_channels_desc));
+        mNumChannelsView.setText(String.format(mContext.getResources().getQuantityString(
+                R.plurals.notification_num_channels_desc, numChannels), numChannels));
 
         // If this is the placeholder channel, don't use our channel-specific text.
-        String appNameText;
         CharSequence channelNameText;
         if (channel.getId().equals(NotificationChannel.DEFAULT_CHANNEL_ID)) {
-            appNameText = appname;
             channelNameText = mContext.getString(R.string.notification_header_default_channel);
         } else {
-            appNameText = mContext.getString(R.string.notification_importance_header_app, appname);
             channelNameText = channel.getName();
         }
-        ((TextView) findViewById(R.id.pkgname)).setText(appNameText);
+        ((TextView) findViewById(R.id.pkgname)).setText(appName);
         ((TextView) findViewById(R.id.channel_name)).setText(channelNameText);
 
-        // Settings button.
-        final TextView settingsButton = (TextView) findViewById(R.id.more_settings);
-        if (appUid >= 0 && onSettingsClick != null) {
-            final int appUidF = appUid;
-            settingsButton.setOnClickListener(
-                    (View view) -> {
-                        onSettingsClick.onClick(view, appUidF);
-                    });
-            settingsButton.setText(R.string.notification_more_settings);
-        } else {
-            settingsButton.setVisibility(View.GONE);
+        // Set group information if this channel has an associated group.
+        CharSequence groupName = null;
+        if (channel.getGroup() != null) {
+            try {
+                final NotificationChannelGroup notificationChannelGroup =
+                        iNotificationManager.getNotificationChannelGroupForPackage(
+                                channel.getGroup(), pkg, appUid);
+                if (notificationChannelGroup != null) {
+                    groupName = notificationChannelGroup.getName();
+                }
+            } catch (RemoteException e) {
+                Log.e(TAG, e.toString());
+            }
         }
-
-        // Done button.
-        final TextView doneButton = (TextView) findViewById(R.id.done);
-        doneButton.setText(R.string.notification_done);
-        doneButton.setOnClickListener(onDoneClick);
+        TextView groupNameView = ((TextView) findViewById(R.id.group_name));
+        TextView groupDividerView = ((TextView) findViewById(R.id.pkg_group_divider));
+        if (groupName != null) {
+            groupNameView.setText(groupName);
+            groupNameView.setVisibility(View.VISIBLE);
+            groupDividerView.setVisibility(View.VISIBLE);
+        } else {
+            groupNameView.setVisibility(View.GONE);
+            groupDividerView.setVisibility(View.GONE);
+        }
 
         boolean nonBlockable = false;
         try {
@@ -167,53 +180,41 @@
             nonBlockable |= nonBlockablePkgs.contains(pkg);
         }
 
-        final View importanceButtons = findViewById(R.id.importance_buttons);
-        bindToggles(importanceButtons, mStartingUserImportance, nonBlockable);
-
-        // Importance Text (hardcoded to 4 importance levels)
-        final ViewGroup importanceTextGroup = (ViewGroup) findViewById(
-                R.id.importance_buttons_text);
-        final int size = importanceTextGroup.getChildCount();
-        for (int i = 0; i < size; i++) {
-            int importanceNameResId = 0;
-            int importanceDescResId = 0;
-            switch (i) {
-                case 0:
-                    importanceNameResId = R.string.high_importance;
-                    importanceDescResId = R.string.notification_importance_high;
-                    break;
-                case 1:
-                    importanceNameResId = R.string.default_importance;
-                    importanceDescResId = R.string.notification_importance_default;
-                    break;
-                case 2:
-                    importanceNameResId = R.string.low_importance;
-                    importanceDescResId = R.string.notification_importance_low;
-                    break;
-                case 3:
-                    importanceNameResId = R.string.min_importance;
-                    importanceDescResId = R.string.notification_importance_min;
-                    break;
-                default:
-                    Log.e(TAG, "Too many importance groups in this layout.");
-                    break;
-            }
-            final ViewGroup importanceChildGroup = (ViewGroup) importanceTextGroup.getChildAt(i);
-            ((TextView) importanceChildGroup.getChildAt(0)).setText(importanceNameResId);
-            ((TextView) importanceChildGroup.getChildAt(1)).setText(importanceDescResId);
-        }
+        bindButtons(nonBlockable);
 
         // Top-level importance group
-        mImportanceGroup = findViewById(R.id.importance);
-        mChannelDisabled = findViewById(R.id.channel_disabled);
-        updateImportanceGroup();
+        mChannelDisabledView = findViewById(R.id.channel_disabled);
+        updateImportanceDisplay();
+
+        // Settings button.
+        final TextView settingsButton = (TextView) findViewById(R.id.more_settings);
+        if (appUid >= 0 && onSettingsClick != null) {
+            final int appUidF = appUid;
+            settingsButton.setOnClickListener(
+                    (View view) -> {
+                        onSettingsClick.onClick(view, appUidF);
+                    });
+            if (numChannels > 1) {
+                settingsButton.setText(R.string.notification_all_categories);
+            } else {
+                settingsButton.setText(R.string.notification_more_settings);
+            }
+
+        } else {
+            settingsButton.setVisibility(View.GONE);
+        }
+
+        // Done button.
+        final TextView doneButton = (TextView) findViewById(R.id.done);
+        doneButton.setText(R.string.notification_done);
+        doneButton.setOnClickListener(onDoneClick);
     }
 
     public boolean hasImportanceChanged() {
         return mStartingUserImportance != getSelectedImportance();
     }
 
-    public void saveImportance() {
+    private void saveImportance() {
         int selectedImportance = getSelectedImportance();
         if (selectedImportance == mStartingUserImportance) {
             return;
@@ -233,73 +234,37 @@
     private int getSelectedImportance() {
         if (!mChannelEnabledSwitch.isChecked()) {
             return NotificationManager.IMPORTANCE_NONE;
-        } else if (mMinImportanceButton.isChecked()) {
-            return NotificationManager.IMPORTANCE_MIN;
-        } else if (mLowImportanceButton.isChecked()) {
-            return NotificationManager.IMPORTANCE_LOW;
-        } else if (mDefaultImportanceButton.isChecked()) {
-            return NotificationManager.IMPORTANCE_DEFAULT;
-        } else if (mHighImportanceButton.isChecked()) {
-            return NotificationManager.IMPORTANCE_HIGH;
         } else {
-            return NotificationManager.IMPORTANCE_UNSPECIFIED;
+            return mStartingUserImportance;
         }
     }
 
-    private void bindToggles(final View importanceButtons, final int importance,
-            final boolean nonBlockable) {
+    private void bindButtons(final boolean nonBlockable) {
         // Enabled Switch
         mChannelEnabledSwitch = (Switch) findViewById(R.id.channel_enabled_switch);
-        mChannelEnabledSwitch.setChecked(importance != NotificationManager.IMPORTANCE_NONE);
+        mChannelEnabledSwitch.setChecked(
+                mStartingUserImportance != NotificationManager.IMPORTANCE_NONE);
         mChannelEnabledSwitch.setVisibility(nonBlockable ? View.INVISIBLE : View.VISIBLE);
 
-        // Importance Buttons
-        mMinImportanceButton = (RadioButton) importanceButtons.findViewById(R.id.min_importance);
-        mLowImportanceButton = (RadioButton) importanceButtons.findViewById(R.id.low_importance);
-        mDefaultImportanceButton = (RadioButton) importanceButtons
-                .findViewById(R.id.default_importance);
-        mHighImportanceButton = (RadioButton) importanceButtons.findViewById(R.id.high_importance);
-
-        // Set to current importance setting
-        switch (importance) {
-            case NotificationManager.IMPORTANCE_UNSPECIFIED:
-            case NotificationManager.IMPORTANCE_NONE:
-                break;
-            case NotificationManager.IMPORTANCE_MIN:
-                mMinImportanceButton.setChecked(true);
-                break;
-            case NotificationManager.IMPORTANCE_LOW:
-                mLowImportanceButton.setChecked(true);
-                break;
-            case NotificationManager.IMPORTANCE_DEFAULT:
-                mDefaultImportanceButton.setChecked(true);
-                break;
-            case NotificationManager.IMPORTANCE_HIGH:
-            case NotificationManager.IMPORTANCE_MAX:
-                mHighImportanceButton.setChecked(true);
-                break;
-        }
-
         // Callback when checked.
         mChannelEnabledSwitch.setOnCheckedChangeListener((buttonView, isChecked) -> {
-            mGutsInteractionListener.onInteraction(NotificationInfo.this);
-            updateImportanceGroup();
+            if (mGutsInteractionListener != null) {
+                mGutsInteractionListener.onInteraction(NotificationInfo.this);
+            }
+            updateImportanceDisplay();
         });
-        ((RadioGroup) importanceButtons).setOnCheckedChangeListener(
-                (buttonView, isChecked) -> {
-                    mGutsInteractionListener.onInteraction(NotificationInfo.this);
-                });
     }
 
-    private void updateImportanceGroup() {
+    private void updateImportanceDisplay() {
         final boolean disabled = getSelectedImportance() == NotificationManager.IMPORTANCE_NONE;
-        mImportanceGroup.setVisibility(disabled ? View.GONE : View.VISIBLE);
-        mChannelDisabled.setVisibility(disabled ? View.VISIBLE : View.GONE);
-    }
-
-    public void closeControls() {
-        if (mGutsInteractionListener != null) {
-            mGutsInteractionListener.closeGuts(this);
+        mChannelDisabledView.setVisibility(disabled ? View.VISIBLE : View.GONE);
+        if (disabled) {
+            // To be replaced by disabled text.
+            mNumChannelsView.setVisibility(View.GONE);
+        } else if (mNotificationChannel.getId().equals(NotificationChannel.DEFAULT_CHANNEL_ID)) {
+            mNumChannelsView.setVisibility(View.INVISIBLE);
+        } else {
+            mNumChannelsView.setVisibility(View.VISIBLE);
         }
     }
 
@@ -309,12 +274,20 @@
     }
 
     @Override
+    public boolean willBeRemoved() {
+        return !mChannelEnabledSwitch.isChecked();
+    }
+
+    @Override
     public View getContentView() {
         return this;
     }
 
     @Override
-    public boolean handleCloseControls() {
+    public boolean handleCloseControls(boolean save) {
+        if (save) {
+            saveImportance();
+        }
         return false;
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMenuRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMenuRow.java
index fad63dd..534a719 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMenuRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMenuRow.java
@@ -30,6 +30,7 @@
 
 import java.util.ArrayList;
 
+import com.android.systemui.Dependency;
 import com.android.systemui.Interpolators;
 import com.android.systemui.R;
 import com.android.systemui.plugins.PluginListener;
@@ -82,13 +83,23 @@
     public NotificationMenuRow(Context context, AttributeSet attrs, int defStyleAttr,
             int defStyleRes) {
         super(context, attrs);
-        PluginManager.getInstance(getContext()).addPluginListener(
-                NotificationMenuRowProvider.ACTION, this,
-                NotificationMenuRowProvider.VERSION, false /* Allow multiple */);
         mMenuItems.addAll(getDefaultNotificationMenuItems());
     }
 
     @Override
+    protected void onAttachedToWindow() {
+        super.onAttachedToWindow();
+        Dependency.get(PluginManager.class).addPluginListener(
+                this, NotificationMenuRowProvider.class, false /* Allow multiple */);
+    }
+
+    @Override
+    protected void onDetachedFromWindow() {
+        super.onDetachedFromWindow();
+        Dependency.get(PluginManager.class).removePluginListener(this);
+    }
+
+    @Override
     protected void onFinishInflate() {
         super.onFinishInflate();
         final Resources res = getResources();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
index e8e9d4e..1cd909ea 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
@@ -23,6 +23,7 @@
 import android.view.View;
 import android.view.ViewGroup;
 
+import com.android.internal.widget.CachingIconView;
 import com.android.systemui.Interpolators;
 import com.android.systemui.R;
 import com.android.systemui.ViewInvertHelper;
@@ -68,6 +69,7 @@
     private float mMaxShelfEnd;
     private int mRelativeOffset;
     private boolean mInteractive;
+    private boolean mAnimationsEnabled = true;
 
     public NotificationShelf(Context context, AttributeSet attrs) {
         super(context, attrs);
@@ -378,22 +380,24 @@
                 : 0.0f;
         row.setContentTransformationAmount(contentTransformationAmount, isLastChild);
         setIconTransformationAmount(row, transitionAmount, iconTransformDistance,
-                clampedAmount != transitionAmount);
+                clampedAmount != transitionAmount, isLastChild);
     }
 
     private void setIconTransformationAmount(ExpandableNotificationRow row,
-            float transitionAmount, float iconTransformDistance, boolean usingLinearInterpolation) {
+            float transitionAmount, float iconTransformDistance, boolean usingLinearInterpolation,
+            boolean isLastChild) {
         StatusBarIconView icon = row.getEntry().expandedIcon;
         NotificationIconContainer.IconState iconState = getIconState(icon);
 
         View rowIcon = row.getNotificationIcon();
         float notificationIconPosition = row.getTranslationY() + row.getContentTranslation();
-        if (usingLinearInterpolation) {
+        boolean stayingInShelf = row.isInShelf() && !row.isTransformingIntoShelf();
+        if (usingLinearInterpolation && !stayingInShelf) {
             // If we interpolate from the notification position, this might lead to a slightly
             // odd interpolation, since the notification position changes as well. Let's interpolate
             // from a fixed distance. We can only do this if we don't animate and the icon is
             // always in the interpolated positon.
-            notificationIconPosition = mMaxShelfEnd - getIntrinsicHeight() - iconTransformDistance;
+            notificationIconPosition = getTranslationY() - iconTransformDistance;
         }
         float notificationIconSize = 0.0f;
         int iconTopPadding;
@@ -412,7 +416,8 @@
                 transitionAmount);
         float shelfIconSize = icon.getHeight() * icon.getIconScale();
         float alpha = 1.0f;
-        if (!row.isShowingIcon()) {
+        boolean noIcon = !row.isShowingIcon();
+        if (noIcon) {
             // The view currently doesn't have an icon, lets transform it in!
             alpha = transitionAmount;
             notificationIconSize = shelfIconSize / 2.0f;
@@ -426,16 +431,23 @@
             iconState.hidden = transitionAmount == 0.0f;
             iconState.alpha = alpha;
             iconState.yTranslation = iconYTranslation;
-            if (row.isInShelf() && !row.isTransformingIntoShelf()) {
+            if (stayingInShelf) {
                 iconState.iconAppearAmount = 1.0f;
                 iconState.alpha = 1.0f;
                 iconState.scaleX = 1.0f;
                 iconState.scaleY = 1.0f;
                 iconState.hidden = false;
             }
-            if (row.isAboveShelf()) {
+            if (row.isAboveShelf() || (!row.isInShelf() && isLastChild && row.areGutsExposed())) {
                 iconState.hidden = true;
             }
+            int shelfColor = icon.getStaticDrawableColor();
+            if (!noIcon && shelfColor != StatusBarIconView.NO_COLOR) {
+                int notificationColor = row.getNotificationHeader().getOriginalNotificationColor();
+                shelfColor = NotificationUtils.interpolateColors(notificationColor, shelfColor,
+                        iconState.iconAppearAmount);
+            }
+            iconState.iconColor = shelfColor;
         }
     }
 
@@ -573,6 +585,15 @@
         mMaxShelfEnd = maxShelfEnd;
     }
 
+    public void setAnimationsEnabled(boolean enabled) {
+        mAnimationsEnabled = enabled;
+        mCollapsedIcons.setAnimationsEnabled(enabled);
+        if (!enabled) {
+            // we need to wait with enabling the animations until the first frame has passed
+            mShelfIcons.setAnimationsEnabled(false);
+        }
+    }
+
     private class ShelfState extends ExpandableViewState {
         private float openedAmount;
         private boolean hasItemsInStableShelf;
@@ -585,6 +606,7 @@
             setOpenedAmount(openedAmount);
             updateAppearance();
             setHasItemsInStableShelf(hasItemsInStableShelf);
+            mShelfIcons.setAnimationsEnabled(mAnimationsEnabled);
         }
 
         @Override
@@ -594,6 +616,7 @@
             setOpenedAmount(openedAmount);
             updateAppearance();
             setHasItemsInStableShelf(hasItemsInStableShelf);
+            mShelfIcons.setAnimationsEnabled(mAnimationsEnabled);
         }
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationSnooze.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationSnooze.java
index 1992b6c..6b1e62d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationSnooze.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationSnooze.java
@@ -56,6 +56,7 @@
     private TextView mUndoButton;
     private ViewGroup mSnoozeOptionView;
     private List<SnoozeOption> mSnoozeOptions;
+    private boolean mSnoozing;
 
     private SnoozeOption mSelectedOption;
 
@@ -175,6 +176,11 @@
     }
 
     @Override
+    public boolean willBeRemoved() {
+        return mSnoozing;
+    }
+
+    @Override
     public View getContentView() {
         return this;
     }
@@ -195,10 +201,11 @@
     }
 
     @Override
-    public boolean handleCloseControls() {
+    public boolean handleCloseControls(boolean save) {
         // When snooze is closed (i.e. there was interaction outside of the notification)
         // then we commit the snooze action.
         if (mSnoozeListener != null && mSelectedOption != null) {
+            mSnoozing = true;
             mSnoozeListener.snoozeNotification(mSbn, mSelectedOption);
             return true;
         } else {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java b/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java
index 66cc15d..7f28c4c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java
@@ -17,6 +17,7 @@
 package com.android.systemui.statusbar;
 
 import com.android.internal.util.Preconditions;
+import com.android.systemui.Dependency;
 import com.android.systemui.statusbar.phone.StatusBarWindowManager;
 import com.android.systemui.statusbar.policy.HeadsUpManager;
 import com.android.systemui.statusbar.policy.RemoteInputView;
@@ -39,8 +40,8 @@
     private final ArrayList<Callback> mCallbacks = new ArrayList<>(3);
     private final HeadsUpManager mHeadsUpManager;
 
-    public RemoteInputController(StatusBarWindowManager sbwm, HeadsUpManager headsUpManager) {
-        addCallback(sbwm);
+    public RemoteInputController(HeadsUpManager headsUpManager) {
+        addCallback(Dependency.get(StatusBarWindowManager.class));
         mHeadsUpManager = headsUpManager;
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ScrimView.java b/packages/SystemUI/src/com/android/systemui/statusbar/ScrimView.java
index dba7130..f9d0cd6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ScrimView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ScrimView.java
@@ -20,6 +20,7 @@
 import android.animation.AnimatorListenerAdapter;
 import android.animation.ValueAnimator;
 import android.content.Context;
+import android.content.res.TypedArray;
 import android.graphics.Canvas;
 import android.graphics.Color;
 import android.graphics.Paint;
@@ -29,6 +30,7 @@
 import android.util.AttributeSet;
 import android.view.View;
 import android.view.animation.Interpolator;
+import com.android.systemui.R;
 
 /**
  * A view which can draw a scrim
@@ -73,6 +75,14 @@
 
     public ScrimView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
         super(context, attrs, defStyleAttr, defStyleRes);
+
+        TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.ScrimView);
+
+        try {
+            mScrimColor = ta.getColor(R.styleable.ScrimView_scrimColor, Color.BLACK);
+        } finally {
+            ta.recycle();
+        }
     }
 
     @Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
index 9a76ad6..89041f9 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
@@ -43,6 +43,8 @@
 import com.android.systemui.Dependency;
 import com.android.systemui.R;
 import com.android.systemui.statusbar.phone.StatusBarIconController;
+import com.android.systemui.statusbar.policy.DarkIconDispatcher;
+import com.android.systemui.statusbar.policy.DarkIconDispatcher.DarkReceiver;
 import com.android.systemui.statusbar.policy.NetworkController;
 import com.android.systemui.statusbar.policy.NetworkController.IconState;
 import com.android.systemui.statusbar.policy.NetworkControllerImpl;
@@ -54,10 +56,9 @@
 import java.util.List;
 
 // Intimately tied to the design of res/layout/signal_cluster_view.xml
-public class SignalClusterView
-        extends LinearLayout
-        implements NetworkControllerImpl.SignalCallback,
-        SecurityController.SecurityControllerCallback, Tunable {
+public class SignalClusterView extends LinearLayout implements NetworkControllerImpl.SignalCallback,
+        SecurityController.SecurityControllerCallback, Tunable,
+        DarkReceiver {
 
     static final String TAG = "SignalClusterView";
     static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
@@ -220,7 +221,7 @@
         int endPadding = mMobileSignalGroup.getChildCount() > 0 ? mMobileSignalGroupEndPadding : 0;
         mMobileSignalGroup.setPaddingRelative(0, 0, endPadding, 0);
 
-        TunerService.get(mContext).addTunable(this, StatusBarIconController.ICON_BLACKLIST);
+        Dependency.get(TunerService.class).addTunable(this, StatusBarIconController.ICON_BLACKLIST);
 
         apply();
         applyIconTint();
@@ -231,7 +232,7 @@
     @Override
     protected void onDetachedFromWindow() {
         mMobileSignalGroup.removeAllViews();
-        TunerService.get(mContext).removeTunable(this);
+        Dependency.get(TunerService.class).removeTunable(this);
         mSecurityController.removeCallback(this);
         mNetworkController.removeCallback(this);
 
@@ -581,7 +582,8 @@
         return colorAccent;
     }
 
-    public void setIconTint(int tint, float darkIntensity, Rect tintArea) {
+    @Override
+    public void onDarkChanged(Rect tintArea, float darkIntensity, int tint) {
         boolean changed = tint != mIconTint || darkIntensity != mDarkIntensity
                 || !mTintArea.equals(tintArea);
         mIconTint = tint;
@@ -593,16 +595,16 @@
     }
 
     private void applyIconTint() {
-        setTint(mVpn, StatusBarIconController.getTint(mTintArea, mVpn, mIconTint));
-        setTint(mAirplane, StatusBarIconController.getTint(mTintArea, mAirplane, mIconTint));
+        setTint(mVpn, DarkIconDispatcher.getTint(mTintArea, mVpn, mIconTint));
+        setTint(mAirplane, DarkIconDispatcher.getTint(mTintArea, mAirplane, mIconTint));
         applyDarkIntensity(
-                StatusBarIconController.getDarkIntensity(mTintArea, mNoSims, mDarkIntensity),
+                DarkIconDispatcher.getDarkIntensity(mTintArea, mNoSims, mDarkIntensity),
                 mNoSims, mNoSimsDark);
         applyDarkIntensity(
-                StatusBarIconController.getDarkIntensity(mTintArea, mWifi, mDarkIntensity),
+                DarkIconDispatcher.getDarkIntensity(mTintArea, mWifi, mDarkIntensity),
                 mWifi, mWifiDark);
         applyDarkIntensity(
-                StatusBarIconController.getDarkIntensity(mTintArea, mEthernet, mDarkIntensity),
+                DarkIconDispatcher.getDarkIntensity(mTintArea, mEthernet, mDarkIntensity),
                 mEthernet, mEthernetDark);
         for (int i = 0; i < mPhoneStates.size(); i++) {
             mPhoneStates.get(i).setIconTint(mIconTint, mDarkIntensity, mTintArea);
@@ -740,10 +742,10 @@
 
         public void setIconTint(int tint, float darkIntensity, Rect tintArea) {
             applyDarkIntensity(
-                    StatusBarIconController.getDarkIntensity(tintArea, mMobile, darkIntensity),
+                    DarkIconDispatcher.getDarkIntensity(tintArea, mMobile, darkIntensity),
                     mMobile, mMobileDark);
-            setTint(mMobileType, StatusBarIconController.getTint(tintArea, mMobileType, tint));
-            setTint(mMobileRoaming, StatusBarIconController.getTint(tintArea, mMobileRoaming,
+            setTint(mMobileType, DarkIconDispatcher.getTint(tintArea, mMobileType, tint));
+            setTint(mMobileRoaming, DarkIconDispatcher.getTint(tintArea, mMobileRoaming,
                     tint));
         }
     }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
index 399b0d2..aec9a4b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
@@ -19,9 +19,11 @@
 import android.animation.Animator;
 import android.animation.AnimatorListenerAdapter;
 import android.animation.ObjectAnimator;
+import android.animation.ValueAnimator;
 import android.app.Notification;
 import android.content.Context;
 import android.content.pm.ApplicationInfo;
+import android.content.res.ColorStateList;
 import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.graphics.Canvas;
@@ -37,7 +39,6 @@
 import android.util.Log;
 import android.util.Property;
 import android.util.TypedValue;
-import android.view.View;
 import android.view.ViewDebug;
 import android.view.accessibility.AccessibilityEvent;
 import android.view.animation.Interpolator;
@@ -50,6 +51,9 @@
 import java.text.NumberFormat;
 
 public class StatusBarIconView extends AnimatedImageView {
+    public static final int NO_COLOR = 0;
+    private final int ANIMATION_DURATION_FAST = 100;
+
     public static final int STATE_ICON = 0;
     public static final int STATE_DOT = 1;
     public static final int STATE_HIDDEN = 2;
@@ -104,6 +108,17 @@
     private ObjectAnimator mDotAnimator;
     private float mDotAppearAmount;
     private OnVisibilityChangedListener mOnVisibilityChangedListener;
+    private int mDrawableColor;
+    private int mIconColor;
+    private ValueAnimator mColorAnimator;
+    private int mCurrentSetColor = NO_COLOR;
+    private int mAnimationStartColor = NO_COLOR;
+    private final ValueAnimator.AnimatorUpdateListener mColorUpdater
+            = animation -> {
+        int newColor = NotificationUtils.interpolateColors(mAnimationStartColor, mIconColor,
+                animation.getAnimatedFraction());
+        setColorInternal(newColor);
+    };
 
     public StatusBarIconView(Context context, String slot, Notification notification) {
         this(context, slot, notification, false);
@@ -123,7 +138,7 @@
         setScaleType(ScaleType.CENTER);
         mDensity = context.getResources().getDisplayMetrics().densityDpi;
         if (mNotification != null) {
-            setIconTint(getContext().getColor(
+            setDecorColor(getContext().getColor(
                     com.android.internal.R.color.notification_icon_default_color));
         }
         reloadDimens();
@@ -256,9 +271,16 @@
         if (mIcon == null) {
             return false;
         }
-        Drawable drawable = getIcon(mIcon);
+        Drawable drawable;
+        try {
+            drawable = getIcon(mIcon);
+        } catch (OutOfMemoryError e) {
+            Log.w(TAG, "OOM while inflating " + mIcon.icon + " for slot " + mSlot);
+            return false;
+        }
+
         if (drawable == null) {
-            Log.w(TAG, "No icon for slot " + mSlot);
+            Log.w(TAG, "No icon for slot " + mSlot + "; " + mIcon.icon);
             return false;
         }
         if (withClear) {
@@ -439,10 +461,66 @@
         return c.getString(R.string.accessibility_desc_notification_icon, appName, desc);
     }
 
-    public void setIconTint(int iconTint) {
+    /**
+     * Set the color that is used to draw decoration like the overflow dot. This will not be applied
+     * to the drawable.
+     */
+    public void setDecorColor(int iconTint) {
         mDotPaint.setColor(iconTint);
     }
 
+    /**
+     * Set the static color that should be used for the drawable of this icon if it's not
+     * transitioning this also immediately sets the color.
+     */
+    public void setStaticDrawableColor(int color) {
+        mDrawableColor = color;
+        setColorInternal(color);
+        mIconColor = color;
+    }
+
+    private void setColorInternal(int color) {
+        if (color != NO_COLOR) {
+            setImageTintList(ColorStateList.valueOf(color));
+        } else {
+            setImageTintList(null);
+        }
+        mCurrentSetColor = color;
+    }
+
+    public void setIconColor(int iconColor, boolean animate) {
+        if (mIconColor != iconColor) {
+            mIconColor = iconColor;
+            if (mColorAnimator != null) {
+                mColorAnimator.cancel();
+            }
+            if (mCurrentSetColor == iconColor) {
+                return;
+            }
+            if (animate && mCurrentSetColor != NO_COLOR) {
+                mAnimationStartColor = mCurrentSetColor;
+                mColorAnimator = ValueAnimator.ofFloat(0.0f, 1.0f);
+                mColorAnimator.setInterpolator(Interpolators.FAST_OUT_SLOW_IN);
+                mColorAnimator.setDuration(ANIMATION_DURATION_FAST);
+                mColorAnimator.addUpdateListener(mColorUpdater);
+                mColorAnimator.addListener(new AnimatorListenerAdapter() {
+                    @Override
+                    public void onAnimationEnd(Animator animation) {
+                        mColorAnimator = null;
+                        mAnimationStartColor = NO_COLOR;
+                    }
+                });
+                mColorAnimator.start();
+            } else {
+                setColorInternal(iconColor);
+            }
+        }
+    }
+
+    public int getStaticDrawableColor() {
+        return mDrawableColor;
+    }
+
     public void setVisibleState(int state) {
         setVisibleState(state, true /* animate */, null /* endRunnable */);
     }
@@ -460,10 +538,13 @@
         boolean runnableAdded = false;
         if (visibleState != mVisibleState) {
             mVisibleState = visibleState;
+            if (mIconAppearAnimator != null) {
+                mIconAppearAnimator.cancel();
+            }
+            if (mDotAnimator != null) {
+                mDotAnimator.cancel();
+            }
             if (animate) {
-                if (mIconAppearAnimator != null) {
-                    mIconAppearAnimator.cancel();
-                }
                 float targetAmount = 0.0f;
                 Interpolator interpolator = Interpolators.FAST_OUT_LINEAR_IN;
                 if (visibleState == STATE_ICON) {
@@ -475,7 +556,7 @@
                     mIconAppearAnimator = ObjectAnimator.ofFloat(this, ICON_APPEAR_AMOUNT,
                             currentAmount, targetAmount);
                     mIconAppearAnimator.setInterpolator(interpolator);
-                    mIconAppearAnimator.setDuration(100);
+                    mIconAppearAnimator.setDuration(ANIMATION_DURATION_FAST);
                     mIconAppearAnimator.addListener(new AnimatorListenerAdapter() {
                         @Override
                         public void onAnimationEnd(Animator animation) {
@@ -487,9 +568,6 @@
                     runnableAdded = true;
                 }
 
-                if (mDotAnimator != null) {
-                    mDotAnimator.cancel();
-                }
                 targetAmount = visibleState == STATE_ICON ? 2.0f : 0.0f;
                 interpolator = Interpolators.FAST_OUT_LINEAR_IN;
                 if (visibleState == STATE_DOT) {
@@ -501,7 +579,7 @@
                     mDotAnimator = ObjectAnimator.ofFloat(this, DOT_APPEAR_AMOUNT,
                             currentAmount, targetAmount);
                     mDotAnimator.setInterpolator(interpolator);
-                    mDotAnimator.setDuration(100);
+                    mDotAnimator.setDuration(ANIMATION_DURATION_FAST);
                     final boolean runRunnable = !runnableAdded;
                     mDotAnimator.addListener(new AnimatorListenerAdapter() {
                         @Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ViewTransformationHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/ViewTransformationHelper.java
index 1c89e32..5353005 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ViewTransformationHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ViewTransformationHelper.java
@@ -224,9 +224,6 @@
         stack.push(viewRoot);
         while (!stack.isEmpty()) {
             View child = stack.pop();
-            if (child.getVisibility() == View.GONE) {
-                continue;
-            }
             Boolean containsView = (Boolean) child.getTag(TAG_CONTAINS_TRANSFORMED_VIEW);
             if (containsView == null) {
                 // This one is unhandled, let's add it to our list.
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/car/CarNavigationBarController.java b/packages/SystemUI/src/com/android/systemui/statusbar/car/CarNavigationBarController.java
index 3bbda4b..7e08d56 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/car/CarNavigationBarController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/car/CarNavigationBarController.java
@@ -24,24 +24,22 @@
 import android.content.res.TypedArray;
 import android.graphics.drawable.Drawable;
 import android.support.v4.util.SimpleArrayMap;
+import android.text.TextUtils;
 import android.util.Log;
 import android.util.SparseBooleanArray;
 import android.view.View;
 import android.widget.LinearLayout;
-
 import com.android.systemui.R;
-import com.android.systemui.ActivityStarter;
 
 import java.net.URISyntaxException;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
 
 /**
  * A controller to populate data for CarNavigationBarView and handle user interactions.
- * <p/>
- * Each button inside the navigation bar is defined by data in arrays_car.xml. OEMs can customize
- * the navigation buttons by updating arrays_car.xml appropriately in an overlay.
+ *
+ * <p>Each button inside the navigation bar is defined by data in arrays_car.xml. OEMs can
+ * customize the navigation buttons by updating arrays_car.xml appropriately in an overlay.
  */
 class CarNavigationBarController {
     private static final String TAG = "CarNavBarController";
@@ -51,48 +49,49 @@
     private static final String EXTRA_FACET_ID = "filter_id";
     private static final String EXTRA_FACET_LAUNCH_PICKER = "launch_picker";
 
-    // Each facet of the navigation bar maps to a set of package names or categories defined in
-    // arrays_car.xml. Package names for a given facet are delimited by ";"
-    private static final String FACET_FILTER_DEMILITER = ";";
+    /**
+     * Each facet of the navigation bar maps to a set of package names or categories defined in
+     * arrays_car.xml. Package names for a given facet are delimited by ";".
+     */
+    private static final String FACET_FILTER_DELIMITER = ";";
 
-    private Context mContext;
-    private CarNavigationBarView mNavBar;
-    private CarStatusBar mStatusBar;
+    private final Context mContext;
+    private final CarNavigationBarView mNavBar;
+    private final CarStatusBar mStatusBar;
 
-    // Set of categories each facet will filter on.
-    private List<String[]> mFacetCategories = new ArrayList<String[]>();
-    // Set of package names each facet will filter on.
-    private List<String[]> mFacetPackages = new ArrayList<String[]>();
+    /**
+     * Set of categories each facet will filter on.
+     */
+    private final List<String[]> mFacetCategories = new ArrayList<>();
 
-    private SimpleArrayMap<String, Integer> mFacetCategoryMap
-            = new SimpleArrayMap<String, Integer>();
-    private SimpleArrayMap<String, Integer> mFacetPackageMap
-            = new SimpleArrayMap<String, Integer>();
+    /**
+     * Set of package names each facet will filter on.
+     */
+    private final List<String[]> mFacetPackages = new ArrayList<>();
 
-    private List<Intent> mIntents;
-    private List<Intent> mLongPressIntents;
+    private final SimpleArrayMap<String, Integer> mFacetCategoryMap = new SimpleArrayMap<>();
+    private final SimpleArrayMap<String, Integer> mFacetPackageMap = new SimpleArrayMap<>();
 
-    private List<CarNavigationButton> mNavButtons = new ArrayList<CarNavigationButton>();
+    private final List<CarNavigationButton> mNavButtons = new ArrayList<>();
+
+    private final SparseBooleanArray mFacetHasMultipleAppsCache = new SparseBooleanArray();
 
     private int mCurrentFacetIndex;
-    private SparseBooleanArray mFacetHasMultipleAppsCache = new SparseBooleanArray();
-
     private Intent mPersistentTaskIntent;
 
-    public CarNavigationBarController(Context context,
-                                      CarNavigationBarView navBar,
-                                      CarStatusBar activityStarter) {
+    public CarNavigationBarController(Context context, CarNavigationBarView navBar,
+            CarStatusBar activityStarter) {
         mContext = context;
         mNavBar = navBar;
         mStatusBar = activityStarter;
         bind();
 
         if (context.getResources().getBoolean(R.bool.config_enablePersistentDockedActivity)) {
-            setupPersistentDockedTask(context);
+            setupPersistentDockedTask();
         }
     }
 
-    private void setupPersistentDockedTask(Context context) {
+    private void setupPersistentDockedTask() {
         try {
             mPersistentTaskIntent = Intent.parseUri(
                     mContext.getString(R.string.config_persistentDockedActivityIntentUri),
@@ -137,64 +136,85 @@
         }
     }
 
+    /**
+     * Iterates through the items in arrays_car.xml and sets up the facet bar buttons to
+     * perform the task in that configuration file when clicked or long-pressed.
+     */
     private void bind() {
-        // Read up arrays_car.xml and populate the navigation bar here.
-        Resources r = mContext.getResources();
-        TypedArray icons = r.obtainTypedArray(R.array.car_facet_icons);
-        TypedArray intents = r.obtainTypedArray(R.array.car_facet_intent_uris);
-        TypedArray longpressIntents =
-                r.obtainTypedArray(R.array.car_facet_longpress_intent_uris);
-        TypedArray facetPackageNames = r.obtainTypedArray(R.array.car_facet_package_filters);
+        Resources res = mContext.getResources();
 
-        TypedArray facetCategories = r.obtainTypedArray(R.array.car_facet_category_filters);
+        TypedArray icons = res.obtainTypedArray(R.array.car_facet_icons);
+        TypedArray intents = res.obtainTypedArray(R.array.car_facet_intent_uris);
+        TypedArray longPressIntents = res.obtainTypedArray(R.array.car_facet_longpress_intent_uris);
+        TypedArray facetPackageNames = res.obtainTypedArray(R.array.car_facet_package_filters);
+        TypedArray facetCategories = res.obtainTypedArray(R.array.car_facet_category_filters);
 
-        if (icons.length() != intents.length()
-                || icons.length() != longpressIntents.length()
-                || icons.length() != facetPackageNames.length()
-                || icons.length() != facetCategories.length()) {
-            throw new RuntimeException("car_facet array lengths do not match");
-        }
-
-        mIntents = createEmptyIntentList(icons.length());
-        mLongPressIntents = createEmptyIntentList(icons.length());
-
-        for (int i = 0; i < icons.length(); i++) {
-            Drawable icon = icons.getDrawable(i);
-            try {
-                mIntents.set(i,
-                        Intent.parseUri(intents.getString(i), Intent.URI_INTENT_SCHEME));
-
-                String longpressUri = longpressIntents.getString(i);
-                boolean hasLongpress = !longpressUri.isEmpty();
-                if (hasLongpress) {
-                    mLongPressIntents.set(i,
-                            Intent.parseUri(longpressUri, Intent.URI_INTENT_SCHEME));
-                }
-
-                CarNavigationButton button = createNavButton(icon, i, hasLongpress);
-                mNavButtons.add(button);
-                mNavBar.addButton(button,
-                        createNavButton(icon, i, hasLongpress) /* lightsOutButton */);
-
-                initFacetFilterMaps(i,
-                        facetPackageNames.getString(i).split(FACET_FILTER_DEMILITER),
-                        facetCategories.getString(i).split(FACET_FILTER_DEMILITER));
-                        mFacetHasMultipleAppsCache.put(i, facetHasMultiplePackages(i));
-            } catch (URISyntaxException e) {
-                throw new RuntimeException("Malformed intent uri", e);
+        try {
+            if (icons.length() != intents.length()
+                    || icons.length() != longPressIntents.length()
+                    || icons.length() != facetPackageNames.length()
+                    || icons.length() != facetCategories.length()) {
+                throw new RuntimeException("car_facet array lengths do not match");
             }
+
+            for (int i = 0, size = icons.length(); i < size; i++) {
+                Drawable icon = icons.getDrawable(i);
+                CarNavigationButton button = createNavButton(icon);
+                initClickListeners(button, i, intents.getString(i), longPressIntents.getString(i));
+
+                mNavButtons.add(button);
+                mNavBar.addButton(button, createNavButton(icon) /* lightsOutButton */);
+
+                initFacetFilterMaps(i, facetPackageNames.getString(i).split(FACET_FILTER_DELIMITER),
+                        facetCategories.getString(i).split(FACET_FILTER_DELIMITER));
+                mFacetHasMultipleAppsCache.put(i, facetHasMultiplePackages(i));
+            }
+        } finally {
+            // Clean up all the TypedArrays.
+            icons.recycle();
+            intents.recycle();
+            longPressIntents.recycle();
+            facetPackageNames.recycle();
+            facetCategories.recycle();
+        }
+    }
+
+    /**
+     * Recreates each of the buttons on a density or font scale change. This manual process is
+     * necessary since this class is not part of an activity that automatically gets recreated.
+     */
+    public void onDensityOrFontScaleChanged() {
+        TypedArray icons = mContext.getResources().obtainTypedArray(R.array.car_facet_icons);
+
+        try {
+            int length = icons.length();
+            if (length != mNavButtons.size()) {
+                // This should not happen since the mNavButtons list is created from the length
+                // of the icons array in bind().
+                throw new RuntimeException("car_facet array lengths do not match number of "
+                        + "created buttons.");
+            }
+
+            for (int i = 0; i < length; i++) {
+                Drawable icon = icons.getDrawable(i);
+
+                // Setting a new icon will trigger a requestLayout() call if necessary.
+                mNavButtons.get(i).setResources(icon);
+            }
+        } finally {
+            icons.recycle();
         }
     }
 
     private void initFacetFilterMaps(int id, String[] packageNames, String[] categories) {
         mFacetCategories.add(categories);
-        for (int i = 0; i < categories.length; i++) {
-            mFacetCategoryMap.put(categories[i], id);
+        for (String category : categories) {
+            mFacetCategoryMap.put(category, id);
         }
 
         mFacetPackages.add(packageNames);
-        for (int i = 0; i < packageNames.length; i++) {
-            mFacetPackageMap.put(packageNames[i], id);
+        for (String packageName : packageNames) {
+            mFacetPackageMap.put(packageName, id);
         }
     }
 
@@ -223,8 +243,10 @@
     }
 
     /**
-     * Helper method to check if a given facet has multiple packages associated with it.
-     * This can be resource defined package names or package names filtered by facet category.
+     * Helper method to check if a given facet has multiple packages associated with it. This can
+     * be resource defined package names or package names filtered by facet category.
+     *
+     * @return {@code true} if the facet at the given index has more than one package.
      */
     private boolean facetHasMultiplePackages(int index) {
         PackageManager pm = mContext.getPackageManager();
@@ -259,6 +281,10 @@
         return false;
     }
 
+    /**
+     * Sets the facet at the given index to be the facet that is currently active. The button will
+     * be highlighted appropriately.
+     */
     private void setCurrentFacet(int index) {
         if (index == mCurrentFacetIndex) {
             return;
@@ -273,11 +299,16 @@
             mNavButtons.get(index).setSelected(true /* selected */,
                     mFacetHasMultipleAppsCache.get(index)  /* showMoreIcon */);
         }
+
         mCurrentFacetIndex = index;
     }
 
-    private CarNavigationButton createNavButton(Drawable icon, final int id,
-                                                boolean longClickEnabled) {
+    /**
+     * Creates the View that is used for the buttons along the navigation bar.
+     *
+     * @param icon The icon to be used for the button.
+     */
+    private CarNavigationButton createNavButton(Drawable icon) {
         CarNavigationButton button = (CarNavigationButton) View.inflate(mContext,
                 R.layout.car_navigation_button, null);
         button.setResources(icon);
@@ -285,37 +316,49 @@
                 new LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.MATCH_PARENT, 1);
         button.setLayoutParams(lp);
 
-        button.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                onFacetClicked(id);
-            }
-        });
-
-        if (longClickEnabled) {
-            button.setLongClickable(true);
-            button.setOnLongClickListener(new View.OnLongClickListener() {
-                @Override
-                public boolean onLongClick(View v) {
-                    onFacetLongClicked(id);
-                    return true;
-                }
-            });
-        } else {
-            button.setLongClickable(false);
-        }
-
         return button;
     }
 
-    private void startActivity(Intent intent, ActivityStarter.Callback callback) {
-        if (mStatusBar != null && intent != null) {
-            mStatusBar.startActivity(intent, false, callback);
+    /**
+     * Initializes the click and long click listeners that correspond to the given command string.
+     * The click listeners are attached to the given button.
+     */
+    private void initClickListeners(View button, int index, String clickString,
+            String longPressString) {
+        // Each button at least have an action when pressed.
+        if (TextUtils.isEmpty(clickString)) {
+            throw new RuntimeException("Facet at index " + index + " does not have click action.");
+        }
+
+        try {
+            Intent intent = Intent.parseUri(clickString, Intent.URI_INTENT_SCHEME);
+            button.setOnClickListener(v -> onFacetClicked(intent, index));
+        } catch (URISyntaxException e) {
+            throw new RuntimeException("Malformed intent uri", e);
+        }
+
+        if (TextUtils.isEmpty(longPressString)) {
+            button.setLongClickable(false);
+            return;
+        }
+
+        try {
+            Intent intent = Intent.parseUri(longPressString, Intent.URI_INTENT_SCHEME);
+            button.setOnLongClickListener(v -> {
+                onFacetLongClicked(intent, index);
+                return true;
+            });
+        } catch (URISyntaxException e) {
+            throw new RuntimeException("Malformed long-press intent uri", e);
         }
     }
 
-    private void onFacetClicked(int index) {
-        Intent intent = mIntents.get(index);
+    /**
+     * Handles a click on a facet. A click will trigger the given Intent.
+     *
+     * @param index The index of the facet that was clicked.
+     */
+    private void onFacetClicked(Intent intent, int index) {
         String packageName = intent.getPackage();
 
         if (packageName == null) {
@@ -341,13 +384,13 @@
         mStatusBar.startActivityOnStack(intent, stackId);
     }
 
-    private void onFacetLongClicked(int index) {
+    /**
+     * Handles a long-press on a facet. The long-press will trigger the given Intent.
+     *
+     * @param index The index of the facet that was clicked.
+     */
+    private void onFacetLongClicked(Intent intent, int index) {
         setCurrentFacet(index);
-        mStatusBar.startActivityOnStack(mLongPressIntents.get(index),
-                StackId.FULLSCREEN_WORKSPACE_STACK_ID);
-    }
-
-    private List<Intent> createEmptyIntentList(int size) {
-        return Arrays.asList(new Intent[size]);
+        mStatusBar.startActivityOnStack(intent, StackId.FULLSCREEN_WORKSPACE_STACK_ID);
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java
index f6a5687..f53dad5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java
@@ -32,15 +32,19 @@
 import android.view.ViewStub;
 import android.view.WindowManager;
 import android.widget.LinearLayout;
+
 import com.android.systemui.BatteryMeterView;
 import com.android.systemui.Dependency;
 import com.android.systemui.R;
+import com.android.systemui.SwipeHelper;
+import com.android.systemui.fragments.FragmentHostManager;
 import com.android.systemui.recents.Recents;
 import com.android.systemui.recents.misc.SystemServicesProxy;
 import com.android.systemui.recents.misc.SystemServicesProxy.TaskStackListener;
 import com.android.systemui.statusbar.StatusBarState;
+import com.android.systemui.statusbar.phone.CollapsedStatusBarFragment;
+import com.android.systemui.statusbar.phone.NavigationBarView;
 import com.android.systemui.statusbar.phone.StatusBar;
-import com.android.systemui.statusbar.phone.PhoneStatusBarView;
 import com.android.systemui.statusbar.policy.BatteryController;
 import com.android.systemui.statusbar.policy.UserSwitcherController;
 
@@ -51,10 +55,8 @@
         CarBatteryController.BatteryViewHandler {
     private static final String TAG = "CarStatusBar";
 
-    private SystemServicesProxy mSystemServicesProxy;
     private TaskStackListenerImpl mTaskStackListener;
 
-    private CarNavigationBarView mCarNavigationBar;
     private CarNavigationBarController mController;
     private FullscreenUserSwitcher mFullscreenUserSwitcher;
 
@@ -62,7 +64,6 @@
     private BatteryMeterView mBatteryMeterView;
 
     private ConnectedDeviceSignalController mConnectedDeviceSignalController;
-    private View mSignalsView;
     private CarNavigationBarView mNavigationBarView;
 
     @Override
@@ -72,9 +73,10 @@
         SystemServicesProxy.getInstance(mContext).registerTaskStackListener(mTaskStackListener);
         registerPackageChangeReceivers();
 
+        mStackScroller.setScrollingEnabled(true);
+
         createBatteryController();
         mCarBatteryController.startListening();
-        mConnectedDeviceSignalController.startListening();
     }
 
     @Override
@@ -86,32 +88,40 @@
     }
 
     @Override
-    protected PhoneStatusBarView makeStatusBarView() {
-        PhoneStatusBarView statusBarView = super.makeStatusBarView();
+    protected void makeStatusBarView() {
+        super.makeStatusBarView();
 
-        mBatteryMeterView = ((BatteryMeterView) statusBarView.findViewById(R.id.battery));
+        FragmentHostManager manager = FragmentHostManager.get(mStatusBarWindow);
+        manager.addTagListener(CollapsedStatusBarFragment.TAG, (tag, fragment) -> {
+            mBatteryMeterView = ((BatteryMeterView) fragment.getView().findViewById(
+                    R.id.battery));
 
-        // By default, the BatteryMeterView should not be visible. It will be toggled visible
-        // when a device has connected by bluetooth.
-        mBatteryMeterView.setVisibility(View.GONE);
+            // By default, the BatteryMeterView should not be visible. It will be toggled
+            // when a device has connected by bluetooth.
+            mBatteryMeterView.setVisibility(View.GONE);
 
-        ViewStub stub = (ViewStub) statusBarView.findViewById(R.id.connected_device_signals_stub);
-        mSignalsView = stub.inflate();
+            ViewStub stub = (ViewStub) fragment.getView().findViewById(
+                    R.id.connected_device_signals_stub);
+            View signalsView = stub.inflate();
 
-        // When a ViewStub if inflated, it does not respect the margins on the inflated view.
-        // As a result, manually add the ending margin.
-        ((LinearLayout.LayoutParams) mSignalsView.getLayoutParams()).setMarginEnd(
-                mContext.getResources().getDimensionPixelOffset(
-                        R.dimen.status_bar_connected_device_signal_margin_end));
+            // When a ViewStub if inflated, it does not respect the margins on the
+            // inflated view.
+            // As a result, manually add the ending margin.
+            ((LinearLayout.LayoutParams) signalsView.getLayoutParams()).setMarginEnd(
+                    mContext.getResources().getDimensionPixelOffset(
+                            R.dimen.status_bar_connected_device_signal_margin_end));
 
-        mConnectedDeviceSignalController = new ConnectedDeviceSignalController(mContext,
-                mSignalsView);
+            if (mConnectedDeviceSignalController != null) {
+                mConnectedDeviceSignalController.stopListening();
+            }
+            mConnectedDeviceSignalController = new ConnectedDeviceSignalController(mContext,
+                    signalsView);
+            mConnectedDeviceSignalController.startListening();
 
-        if (Log.isLoggable(TAG, Log.DEBUG)) {
-            Log.d(TAG, "makeStatusBarView(). mBatteryMeterView: " + mBatteryMeterView);
-        }
-
-        return statusBarView;
+            if (Log.isLoggable(TAG, Log.DEBUG)) {
+                Log.d(TAG, "makeStatusBarView(). mBatteryMeterView: " + mBatteryMeterView);
+            }
+        });
     }
 
     private BatteryController createBatteryController() {
@@ -126,12 +136,11 @@
             return;
         }
 
-        mCarNavigationBar =
-                (CarNavigationBarView) View.inflate(mContext, R.layout.car_navigation_bar, null);
-        mController = new CarNavigationBarController(mContext, mCarNavigationBar,
+        mNavigationBarView = (CarNavigationBarView) View.inflate(mContext,
+                R.layout.car_navigation_bar, null);
+        mController = new CarNavigationBarController(mContext, mNavigationBarView,
                 this /* ActivityStarter*/);
-        mNavigationBarView = mCarNavigationBar;
-        mCarNavigationBar.getBarTransitions().setAlwaysOpaque(true);
+        mNavigationBarView.getBarTransitions().setAlwaysOpaque(true);
         WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
                 LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT,
                 WindowManager.LayoutParams.TYPE_NAVIGATION_BAR,
@@ -148,6 +157,31 @@
     }
 
     @Override
+    public NavigationBarView getNavigationBarView() {
+        return mNavigationBarView;
+    }
+
+    @Override
+    protected View.OnTouchListener getStatusBarWindowTouchListener() {
+        // Usually, a touch on the background window will dismiss the notification shade. However,
+        // for the car use-case, the shade should remain unless the user switches to a different
+        // facet (e.g. phone).
+        return null;
+    }
+
+    /**
+     * Returns the {@link com.android.systemui.SwipeHelper.LongPressListener} that will be
+     * triggered when a notification card is long-pressed.
+     */
+    @Override
+    protected SwipeHelper.LongPressListener getNotificationLongClicker() {
+        // For the automative use case, we do not want to the user to be able to interact with
+        // a notification other than a regular click. As a result, just return null for the
+        // long click listener.
+        return null;
+    }
+
+    @Override
     public void showBatteryView() {
         if (Log.isLoggable(TAG, Log.DEBUG)) {
             Log.d(TAG, "showBatteryView(). mBatteryMeterView: " + mBatteryMeterView);
@@ -272,4 +306,14 @@
         options.setLaunchStackId(stackId);
         return startActivityWithOptions(intent, options.toBundle());
     }
+
+    /**
+     * Ensures that relevant child views are appropriately recreated when the device's density
+     * changes.
+     */
+    @Override
+    protected void onDensityOrFontScaleChanged() {
+        super.onDensityOrFontScaleChanged();
+        mController.onDensityOrFontScaleChanged();
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationCustomViewWrapper.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationCustomViewWrapper.java
index 3b18886..e5f32df 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationCustomViewWrapper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationCustomViewWrapper.java
@@ -41,10 +41,12 @@
     private final ViewInvertHelper mInvertHelper;
     private final Paint mGreyPaint = new Paint();
     private boolean mShowingLegacyBackground;
+    private int mLegacyColor;
 
     protected NotificationCustomViewWrapper(View view, ExpandableNotificationRow row) {
         super(view, row);
         mInvertHelper = new ViewInvertHelper(view, NotificationPanelView.DOZE_ANIMATION_DURATION);
+        mLegacyColor = row.getContext().getColor(R.color.notification_legacy_background_color);
     }
 
     @Override
@@ -103,6 +105,20 @@
     }
 
     @Override
+    protected boolean shouldClearBackgroundOnReapply() {
+        return false;
+    }
+
+    @Override
+    public int getCustomBackgroundColor() {
+        int customBackgroundColor = super.getCustomBackgroundColor();
+        if (customBackgroundColor == 0 && mShowingLegacyBackground) {
+            return mLegacyColor;
+        }
+        return customBackgroundColor;
+    }
+
+    @Override
     public void setShowingLegacyBackground(boolean showing) {
         super.setShowingLegacyBackground(showing);
         mShowingLegacyBackground = showing;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationViewWrapper.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationViewWrapper.java
index 836482a..5f5e1e4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationViewWrapper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationViewWrapper.java
@@ -93,7 +93,9 @@
     public void notifyContentUpdated(StatusBarNotification notification, boolean isLowPriority) {
         mDarkInitialized = false;
         Drawable background = mView.getBackground();
-        mBackgroundColor = 0;
+        if (shouldClearBackgroundOnReapply()) {
+            mBackgroundColor = 0;
+        }
         if (background instanceof ColorDrawable) {
             mBackgroundColor = ((ColorDrawable) background).getColor();
             mView.setBackground(null);
@@ -101,6 +103,10 @@
         mShouldInvertDark = mBackgroundColor == 0 || isColorLight(mBackgroundColor);
     }
 
+    protected boolean shouldClearBackgroundOnReapply() {
+        return true;
+    }
+
     private boolean isColorLight(int backgroundColor) {
         return Color.alpha(backgroundColor) == 0
                 || ColorUtils.calculateLuminance(backgroundColor) > 0.5;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java
index d15ab10..c3f1cb1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java
@@ -69,7 +69,8 @@
     public void transformViewFrom(TransformState otherState, float transformationAmount) {
         mTransformedView.animate().cancel();
         if (sameAs(otherState)) {
-            if (mTransformedView.getVisibility() == View.INVISIBLE) {
+            if (mTransformedView.getVisibility() == View.INVISIBLE
+                    || mTransformedView.getAlpha() != 1.0f) {
                 // We have the same content, lets show ourselves
                 mTransformedView.setAlpha(1.0f);
                 mTransformedView.setVisibility(View.VISIBLE);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/VisualStabilityManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/VisualStabilityManager.java
index a4e5916..8dab069 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/VisualStabilityManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/VisualStabilityManager.java
@@ -72,6 +72,9 @@
      * @param pulsing whether we are currently pulsing for ambient display.
      */
     public void setPulsing(boolean pulsing) {
+        if (mPulsing == pulsing) {
+            return;
+        }
         mPulsing = pulsing;
         updateReorderingAllowed();
     }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java
new file mode 100644
index 0000000..1f56c56
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java
@@ -0,0 +1,223 @@
+/*
+ * 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.statusbar.phone;
+
+import static com.android.systemui.statusbar.phone.StatusBar.reinflateSignalCluster;
+
+import android.annotation.Nullable;
+import android.app.Fragment;
+import android.app.StatusBarManager;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.LinearLayout;
+
+import com.android.systemui.Dependency;
+import com.android.systemui.Interpolators;
+import com.android.systemui.R;
+import com.android.systemui.SysUiServiceProvider;
+import com.android.systemui.statusbar.CommandQueue;
+import com.android.systemui.statusbar.SignalClusterView;
+import com.android.systemui.statusbar.phone.StatusBarIconController.DarkIconManager;
+import com.android.systemui.statusbar.policy.DarkIconDispatcher;
+import com.android.systemui.statusbar.policy.EncryptionHelper;
+import com.android.systemui.statusbar.policy.KeyguardMonitor;
+import com.android.systemui.statusbar.policy.NetworkController;
+
+/**
+ * Contains the collapsed status bar and handles hiding/showing based on disable flags
+ * and keyguard state. Also manages lifecycle to make sure the views it contains are being
+ * updated by the StatusBarIconController and DarkIconManager while it is attached.
+ */
+public class CollapsedStatusBarFragment extends Fragment implements CommandQueue.Callbacks {
+
+    public static final String TAG = "CollapsedStatusBarFragment";
+    private PhoneStatusBarView mStatusBar;
+    private KeyguardMonitor mKeyguardMonitor;
+    private NetworkController mNetworkController;
+    private LinearLayout mSystemIconArea;
+    private View mNotificationIconAreaInner;
+    private int mDisabled1;
+    private StatusBar mStatusBarComponent;
+    private DarkIconManager mDarkIconManager;
+    private SignalClusterView mSignalClusterView;
+
+    @Override
+    public void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        mKeyguardMonitor = Dependency.get(KeyguardMonitor.class);
+        mNetworkController = Dependency.get(NetworkController.class);
+        mStatusBarComponent = SysUiServiceProvider.getComponent(getContext(), StatusBar.class);
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
+            Bundle savedInstanceState) {
+        return inflater.inflate(R.layout.status_bar, container, false);
+    }
+
+    @Override
+    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
+        super.onViewCreated(view, savedInstanceState);
+        mStatusBar = (PhoneStatusBarView) view;
+        mDarkIconManager = new DarkIconManager((LinearLayout) view.findViewById(R.id.statusIcons));
+        Dependency.get(StatusBarIconController.class).addIconGroup(mDarkIconManager);
+        mSystemIconArea = (LinearLayout) mStatusBar.findViewById(R.id.system_icon_area);
+        mSignalClusterView = reinflateSignalCluster(mStatusBar);
+        Dependency.get(DarkIconDispatcher.class).addDarkReceiver(mSignalClusterView);
+    }
+
+    @Override
+    public void onResume() {
+        super.onResume();
+        SysUiServiceProvider.getComponent(getContext(), CommandQueue.class).addCallbacks(this);
+    }
+
+    @Override
+    public void onPause() {
+        super.onPause();
+        SysUiServiceProvider.getComponent(getContext(), CommandQueue.class).removeCallbacks(this);
+    }
+
+    @Override
+    public void onDestroyView() {
+        super.onDestroyView();
+        Dependency.get(DarkIconDispatcher.class).removeDarkReceiver(mSignalClusterView);
+        Dependency.get(StatusBarIconController.class).removeIconGroup(mDarkIconManager);
+    }
+
+    public void initNotificationIconArea(NotificationIconAreaController
+            notificationIconAreaController) {
+        ViewGroup notificationIconArea = (ViewGroup) mStatusBar
+                .findViewById(R.id.notification_icon_area);
+        mNotificationIconAreaInner =
+                notificationIconAreaController.getNotificationInnerAreaView();
+        if (mNotificationIconAreaInner.getParent() != null) {
+            ((ViewGroup) mNotificationIconAreaInner.getParent())
+                    .removeView(mNotificationIconAreaInner);
+        }
+        notificationIconArea.addView(mNotificationIconAreaInner);
+    }
+
+    @Override
+    public void disable(int state1, int state2, boolean animate) {
+        state1 = adjustDisableFlags(state1);
+        final int old1 = mDisabled1;
+        final int diff1 = state1 ^ old1;
+        mDisabled1 = state1;
+        if ((diff1 & StatusBarManager.DISABLE_SYSTEM_INFO) != 0) {
+            if ((state1 & StatusBarManager.DISABLE_SYSTEM_INFO) != 0) {
+                hideSystemIconArea(animate);
+            } else {
+                showSystemIconArea(animate);
+            }
+        }
+        if ((diff1 & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
+            if ((state1 & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
+                hideNotificationIconArea(animate);
+            } else {
+                showNotificationIconArea(animate);
+            }
+        }
+    }
+
+    protected int adjustDisableFlags(int state) {
+        if (!mStatusBarComponent.isLaunchTransitionFadingAway()
+                && !mKeyguardMonitor.isKeyguardFadingAway()
+                && shouldHideNotificationIcons()) {
+            state |= StatusBarManager.DISABLE_NOTIFICATION_ICONS;
+            state |= StatusBarManager.DISABLE_SYSTEM_INFO;
+        }
+        if (mNetworkController != null && EncryptionHelper.IS_DATA_ENCRYPTED) {
+            if (mNetworkController.hasEmergencyCryptKeeperText()) {
+                state |= StatusBarManager.DISABLE_NOTIFICATION_ICONS;
+            }
+            if (!mNetworkController.isRadioOn()) {
+                state |= StatusBarManager.DISABLE_SYSTEM_INFO;
+            }
+        }
+        return state;
+    }
+
+    private boolean shouldHideNotificationIcons() {
+        return !mStatusBar.isClosed() && mStatusBarComponent.shouldHideNotificationIcons();
+    }
+
+    public void hideSystemIconArea(boolean animate) {
+        animateHide(mSystemIconArea, animate);
+    }
+
+    public void showSystemIconArea(boolean animate) {
+        animateShow(mSystemIconArea, animate);
+    }
+
+    public void hideNotificationIconArea(boolean animate) {
+        animateHide(mNotificationIconAreaInner, animate);
+    }
+
+    public void showNotificationIconArea(boolean animate) {
+        animateShow(mNotificationIconAreaInner, animate);
+    }
+
+    /**
+     * Hides a view.
+     */
+    private void animateHide(final View v, boolean animate) {
+        v.animate().cancel();
+        if (!animate) {
+            v.setAlpha(0f);
+            v.setVisibility(View.INVISIBLE);
+            return;
+        }
+        v.animate()
+                .alpha(0f)
+                .setDuration(160)
+                .setStartDelay(0)
+                .setInterpolator(Interpolators.ALPHA_OUT)
+                .withEndAction(() -> v.setVisibility(View.INVISIBLE));
+    }
+
+    /**
+     * Shows a view, and synchronizes the animation with Keyguard exit animations, if applicable.
+     */
+    private void animateShow(View v, boolean animate) {
+        v.animate().cancel();
+        v.setVisibility(View.VISIBLE);
+        if (!animate) {
+            v.setAlpha(1f);
+            return;
+        }
+        v.animate()
+                .alpha(1f)
+                .setDuration(320)
+                .setInterpolator(Interpolators.ALPHA_IN)
+                .setStartDelay(50)
+
+                // We need to clean up any pending end action from animateHide if we call
+                // both hide and show in the same frame before the animation actually gets started.
+                // cancel() doesn't really remove the end action.
+                .withEndAction(null);
+
+        // Synchronize the motion with the Keyguard fading if necessary.
+        if (mKeyguardMonitor.isKeyguardFadingAway()) {
+            v.animate()
+                    .setDuration(mKeyguardMonitor.getKeyguardFadingAwayDuration())
+                    .setInterpolator(Interpolators.LINEAR_OUT_SLOW_IN)
+                    .setStartDelay(mKeyguardMonitor.getKeyguardFadingAwayDelay())
+                    .start();
+        }
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ConfigurationControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ConfigurationControllerImpl.java
new file mode 100644
index 0000000..020dc25
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ConfigurationControllerImpl.java
@@ -0,0 +1,60 @@
+/*
+ * 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.statusbar.phone;
+
+import android.content.Context;
+import android.content.res.Configuration;
+
+import com.android.systemui.ConfigurationChangedReceiver;
+import com.android.systemui.statusbar.policy.ConfigurationController;
+
+import java.util.ArrayList;
+
+public class ConfigurationControllerImpl implements ConfigurationController,
+        ConfigurationChangedReceiver {
+
+    private final ArrayList<ConfigurationListener> mListeners = new ArrayList<>();
+    private int mDensity;
+    private float mFontScale;
+
+    public ConfigurationControllerImpl(Context context) {
+        Configuration currentConfig = context.getResources().getConfiguration();
+        mFontScale = currentConfig.fontScale;
+        mDensity = currentConfig.densityDpi;
+    }
+
+    @Override
+    public void onConfigurationChanged(Configuration newConfig) {
+        mListeners.forEach(l -> l.onConfigChanged(newConfig));
+        final float fontScale = newConfig.fontScale;
+        final int density = newConfig.densityDpi;
+        if (density != mDensity || mFontScale != fontScale) {
+            mListeners.forEach(l -> l.onDensityOrFontScaleChanged());
+            mDensity = density;
+            mFontScale = fontScale;
+        }
+    }
+
+    @Override
+    public void addCallback(ConfigurationListener listener) {
+        mListeners.add(listener);
+        listener.onDensityOrFontScaleChanged();
+    }
+
+    @Override
+    public void removeCallback(ConfigurationListener listener) {
+        mListeners.remove(listener);
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DarkIconDispatcherImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DarkIconDispatcherImpl.java
new file mode 100644
index 0000000..3f9ae80
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DarkIconDispatcherImpl.java
@@ -0,0 +1,106 @@
+/*
+ * 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.statusbar.phone;
+
+import static com.android.systemui.statusbar.policy.DarkIconDispatcher.getTint;
+
+import android.animation.ArgbEvaluator;
+import android.content.Context;
+import android.content.res.ColorStateList;
+import android.graphics.Rect;
+import android.util.ArrayMap;
+import android.widget.ImageView;
+
+import com.android.systemui.R;
+import com.android.systemui.statusbar.policy.DarkIconDispatcher;
+
+public class DarkIconDispatcherImpl implements DarkIconDispatcher {
+
+    private final LightBarTransitionsController mTransitionsController;
+    private final Rect mTintArea = new Rect();
+    private final ArrayMap<Object, DarkReceiver> mReceivers = new ArrayMap<>();
+
+    private int mIconTint = DEFAULT_ICON_TINT;
+    private float mDarkIntensity;
+    private int mDarkModeIconColorSingleTone;
+    private int mLightModeIconColorSingleTone;
+
+    public DarkIconDispatcherImpl(Context context) {
+        mDarkModeIconColorSingleTone = context.getColor(R.color.dark_mode_icon_color_single_tone);
+        mLightModeIconColorSingleTone = context.getColor(R.color.light_mode_icon_color_single_tone);
+
+        mTransitionsController = new LightBarTransitionsController(context,
+                this::setIconTintInternal);
+    }
+
+    public LightBarTransitionsController getTransitionsController() {
+        return mTransitionsController;
+    }
+
+    public void addDarkReceiver(DarkReceiver receiver) {
+        mReceivers.put(receiver, receiver);
+        receiver.onDarkChanged(mTintArea, mDarkIntensity, mIconTint);
+    }
+
+    public void addDarkReceiver(ImageView imageView) {
+        DarkReceiver receiver = (area, darkIntensity, tint) -> imageView.setImageTintList(
+                ColorStateList.valueOf(getTint(mTintArea, imageView, mIconTint)));
+        mReceivers.put(imageView, receiver);
+        receiver.onDarkChanged(mTintArea, mDarkIntensity, mIconTint);
+    }
+
+    public void removeDarkReceiver(DarkReceiver object) {
+        mReceivers.remove(object);
+    }
+
+    public void removeDarkReceiver(ImageView object) {
+        mReceivers.remove(object);
+    }
+
+    public void applyDark(ImageView object) {
+        mReceivers.get(object).onDarkChanged(mTintArea, mDarkIntensity, mIconTint);
+    }
+
+    /**
+     * Sets the dark area so {@link #setIconsDark} only affects the icons in the specified area.
+     *
+     * @param darkArea the area in which icons should change it's tint, in logical screen
+     *                 coordinates
+     */
+    public void setIconsDarkArea(Rect darkArea) {
+        if (darkArea == null && mTintArea.isEmpty()) {
+            return;
+        }
+        if (darkArea == null) {
+            mTintArea.setEmpty();
+        } else {
+            mTintArea.set(darkArea);
+        }
+        applyIconTint();
+    }
+
+    private void setIconTintInternal(float darkIntensity) {
+        mDarkIntensity = darkIntensity;
+        mIconTint = (int) ArgbEvaluator.getInstance().evaluate(darkIntensity,
+                mLightModeIconColorSingleTone, mDarkModeIconColorSingleTone);
+        applyIconTint();
+    }
+
+    private void applyIconTint() {
+        for (int i = 0; i < mReceivers.size(); i++) {
+            mReceivers.valueAt(i).onDarkChanged(mTintArea, mDarkIntensity, mIconTint);
+        }
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java
index 0e074c7..883a66b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java
@@ -31,6 +31,7 @@
 
 public class DozeParameters {
     private static final int MAX_DURATION = 60 * 1000;
+    public static final String DOZE_SENSORS_WAKE_UP_FULLY = "doze_sensors_wake_up_fully";
 
     private final Context mContext;
 
@@ -56,6 +57,10 @@
         pw.print("    getPickupVibrationThreshold(): "); pw.println(getPickupVibrationThreshold());
         pw.print("    getPickupSubtypePerformsProxCheck(): ");pw.println(
                 dumpPickupSubtypePerformsProxCheck());
+        if (Build.IS_DEBUGGABLE) {
+            pw.print("    getAlwaysOn(): "); pw.println(getAlwaysOn());
+            pw.print("    getSensorsWakeUpFully(): "); pw.println(getSensorsWakeUpFully());
+        }
     }
 
     private String dumpPickupSubtypePerformsProxCheck() {
@@ -118,6 +123,12 @@
                 Settings.Secure.DOZE_ALWAYS_ON, 0, UserHandle.USER_CURRENT) != 0;
     }
 
+    public boolean getSensorsWakeUpFully() {
+        return Build.IS_DEBUGGABLE
+                && Settings.Secure.getIntForUser(mContext.getContentResolver(),
+                DOZE_SENSORS_WAKE_UP_FULLY, 0, UserHandle.USER_CURRENT) != 0;
+    }
+
     private boolean getBoolean(String propName, int resId) {
         return SystemProperties.getBoolean(propName, mContext.getResources().getBoolean(resId));
     }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/FingerprintUnlockController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/FingerprintUnlockController.java
index 0773108..2bb3cbc 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/FingerprintUnlockController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/FingerprintUnlockController.java
@@ -27,6 +27,7 @@
 import com.android.keyguard.KeyguardUpdateMonitor;
 import com.android.keyguard.KeyguardUpdateMonitorCallback;
 import com.android.keyguard.LatencyTracker;
+import com.android.systemui.Dependency;
 import com.android.systemui.keyguard.KeyguardViewMediator;
 
 /**
@@ -101,7 +102,6 @@
     private int mPendingAuthenticatedUserId = -1;
 
     public FingerprintUnlockController(Context context,
-            StatusBarWindowManager statusBarWindowManager,
             DozeScrimController dozeScrimController,
             KeyguardViewMediator keyguardViewMediator,
             ScrimController scrimController,
@@ -111,7 +111,7 @@
         mPowerManager = context.getSystemService(PowerManager.class);
         mUpdateMonitor = KeyguardUpdateMonitor.getInstance(context);
         mUpdateMonitor.registerCallback(this);
-        mStatusBarWindowManager = statusBarWindowManager;
+        mStatusBarWindowManager = Dependency.get(StatusBarWindowManager.class);
         mDozeScrimController = dozeScrimController;
         mKeyguardViewMediator = keyguardViewMediator;
         mScrimController = scrimController;
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 bfc0a80..8f63d45 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
@@ -35,6 +35,7 @@
 import android.content.pm.ActivityInfo;
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
+import android.content.res.AssetFileDescriptor.AutoCloseOutputStream;
 import android.content.res.Configuration;
 import android.graphics.drawable.Drawable;
 import android.os.AsyncTask;
@@ -58,6 +59,7 @@
 import android.widget.FrameLayout;
 import android.widget.TextView;
 
+import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
 import com.android.internal.widget.LockPatternUtils;
 import com.android.keyguard.KeyguardUpdateMonitor;
 import com.android.keyguard.KeyguardUpdateMonitorCallback;
@@ -164,6 +166,8 @@
     private IntentButton mLeftDefault = mLeftButton;
     private IntentButton mLeftPlugin;
     private String mLeftButtonStr;
+    private LockscreenGestureLogger mLockscreenGestureLogger = new LockscreenGestureLogger();
+    private boolean mDozing;
 
     public KeyguardBottomAreaView(Context context) {
         this(context, null);
@@ -257,11 +261,11 @@
     protected void onAttachedToWindow() {
         super.onAttachedToWindow();
         mAccessibilityController.addStateChangedCallback(this);
-        PluginManager.getInstance(getContext()).addPluginListener(RIGHT_BUTTON_PLUGIN,
-                mRightListener, IntentButtonProvider.VERSION, false /* Only allow one */);
-        PluginManager.getInstance(getContext()).addPluginListener(LEFT_BUTTON_PLUGIN,
-                mLeftListener, IntentButtonProvider.VERSION, false /* Only allow one */);
-        TunerService.get(getContext()).addTunable(this, LockscreenFragment.LOCKSCREEN_LEFT_BUTTON,
+        Dependency.get(PluginManager.class).addPluginListener(RIGHT_BUTTON_PLUGIN,
+                mRightListener, IntentButtonProvider.class, false /* Only allow one */);
+        Dependency.get(PluginManager.class).addPluginListener(LEFT_BUTTON_PLUGIN,
+                mLeftListener, IntentButtonProvider.class, false /* Only allow one */);
+        Dependency.get(TunerService.class).addTunable(this, LockscreenFragment.LOCKSCREEN_LEFT_BUTTON,
                 LockscreenFragment.LOCKSCREEN_RIGHT_BUTTON);
     }
 
@@ -269,9 +273,9 @@
     protected void onDetachedFromWindow() {
         super.onDetachedFromWindow();
         mAccessibilityController.removeStateChangedCallback(this);
-        PluginManager.getInstance(getContext()).removePluginListener(mRightListener);
-        PluginManager.getInstance(getContext()).removePluginListener(mLeftListener);
-        TunerService.get(getContext()).removeTunable(this);
+        Dependency.get(PluginManager.class).removePluginListener(mRightListener);
+        Dependency.get(PluginManager.class).removePluginListener(mLeftListener);
+        Dependency.get(TunerService.class).removeTunable(this);
     }
 
     private void initAccessibility() {
@@ -321,7 +325,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);
     }
 
@@ -358,7 +362,7 @@
             // Things are not set up yet; reply hazy, ask again later
             return;
         }
-        mRightAffordanceView.setVisibility(mRightButton.getIcon().isVisible
+        mRightAffordanceView.setVisibility(!mDozing && mRightButton.getIcon().isVisible
                 ? View.VISIBLE : View.GONE);
     }
 
@@ -372,8 +376,8 @@
 
     private void updateLeftAffordanceIcon() {
         IconState state = mLeftButton.getIcon();
-        mLeftAffordanceView.setVisibility(state.isVisible ? View.VISIBLE : View.GONE);
-        mLeftAffordanceView.setImageDrawable(state.drawable);
+        mLeftAffordanceView.setVisibility(!mDozing && state.isVisible ? View.VISIBLE : View.GONE);
+        mLeftAffordanceView.setImageDrawable(state.drawable, state.tint);
         mLeftAffordanceView.setContentDescription(state.contentDescription);
     }
 
@@ -445,8 +449,7 @@
     }
 
     private void handleTrustCircleClick() {
-        EventLogTags.writeSysuiLockscreenGesture(
-                EventLogConstants.SYSUI_LOCKSCREEN_GESTURE_TAP_LOCK, 0 /* lengthDp - N/A */,
+        mLockscreenGestureLogger.write(MetricsEvent.ACTION_LS_LOCK, 0 /* lengthDp - N/A */,
                 0 /* velocityDp - N/A */);
         mIndicationController.showTransientIndication(
                 R.string.keyguard_indication_trust_disabled);
@@ -573,7 +576,7 @@
             AsyncTask.execute(runnable);
         } else {
             boolean dismissShade = !TextUtils.isEmpty(mRightButtonStr)
-                    && TunerService.get(getContext()).getValue(LOCKSCREEN_RIGHT_UNLOCK, 1) != 0;
+                    && Dependency.get(TunerService.class).getValue(LOCKSCREEN_RIGHT_UNLOCK, 1) != 0;
             mStatusBar.executeRunnableDismissingKeyguard(runnable, null /* cancelAction */,
                     dismissShade, false /* afterKeyguardGone */, true /* deferred */);
         }
@@ -594,7 +597,7 @@
             });
         } else {
             boolean dismissShade = !TextUtils.isEmpty(mLeftButtonStr)
-                    && TunerService.get(getContext()).getValue(LOCKSCREEN_LEFT_UNLOCK, 1) != 0;
+                    && Dependency.get(TunerService.class).getValue(LOCKSCREEN_LEFT_UNLOCK, 1) != 0;
             mActivityStarter.startActivity(mLeftButton.getIntent(), dismissShade);
         }
     }
@@ -844,6 +847,22 @@
         }
     };
 
+    public void setDozing(boolean dozing, boolean animate) {
+        mDozing = dozing;
+
+        updateCameraVisibility();
+        updateLeftAffordanceIcon();
+
+        if (dozing) {
+            mLockIcon.setVisibility(INVISIBLE);
+        } else {
+            mLockIcon.setVisibility(VISIBLE);
+            if (animate) {
+                startFinishDozeAnimation();
+            }
+        }
+    }
+
     private class DefaultLeftButton implements IntentButton {
 
         private IconState mIconState = new IconState();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LightBarController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LightBarController.java
index 4535992..9d699cf 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LightBarController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LightBarController.java
@@ -20,7 +20,12 @@
 import android.view.View;
 
 import com.android.systemui.Dependency;
+import com.android.systemui.Dumpable;
 import com.android.systemui.statusbar.policy.BatteryController;
+import com.android.systemui.statusbar.policy.DarkIconDispatcher;
+
+import java.io.FileDescriptor;
+import java.io.PrintWriter;
 
 import static com.android.systemui.statusbar.phone.BarTransitions.MODE_LIGHTS_OUT_TRANSPARENT;
 import static com.android.systemui.statusbar.phone.BarTransitions.MODE_TRANSPARENT;
@@ -28,11 +33,11 @@
 /**
  * Controls how light status bar flag applies to the icons.
  */
-public class LightBarController implements BatteryController.BatteryStateChangeCallback {
+public class LightBarController implements BatteryController.BatteryStateChangeCallback, Dumpable {
 
     private static final float NAV_BAR_INVERSION_SCRIM_ALPHA_THRESHOLD = 0.1f;
 
-    private final StatusBarIconController mStatusBarIconController;
+    private final DarkIconDispatcher mStatusBarIconController;
     private final BatteryController mBatteryController;
     private FingerprintUnlockController mFingerprintUnlockController;
 
@@ -61,8 +66,8 @@
     private final Rect mLastFullscreenBounds = new Rect();
     private final Rect mLastDockedBounds = new Rect();
 
-    public LightBarController(StatusBarIconController statusBarIconController) {
-        mStatusBarIconController = statusBarIconController;
+    public LightBarController() {
+        mStatusBarIconController = Dependency.get(DarkIconDispatcher.class);
         mBatteryController = Dependency.get(BatteryController.class);
         mBatteryController.addCallback(this);
     }
@@ -203,4 +208,37 @@
     public void onPowerSaveChanged(boolean isPowerSave) {
         reevaluate();
     }
+
+    @Override
+    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
+        pw.println("LightBarController: ");
+        pw.print(" mSystemUiVisibility=0x"); pw.print(
+                Integer.toHexString(mSystemUiVisibility));
+        pw.print(" mFullscreenStackVisibility=0x"); pw.print(
+                Integer.toHexString(mFullscreenStackVisibility));
+        pw.print(" mDockedStackVisibility=0x"); pw.println(
+                Integer.toHexString(mDockedStackVisibility));
+
+        pw.print(" mFullscreenLight="); pw.print(mFullscreenLight);
+        pw.print(" mDockedLight="); pw.println(mDockedLight);
+
+        pw.print(" mLastFullscreenBounds="); pw.print(mLastFullscreenBounds);
+        pw.print(" mLastDockedBounds="); pw.println(mLastDockedBounds);
+
+        pw.print(" mNavigationLight="); pw.print(mNavigationLight);
+        pw.print(" mHasLightNavigationBar="); pw.println(mHasLightNavigationBar);
+
+        pw.print(" mLastStatusBarMode="); pw.print(mLastStatusBarMode);
+        pw.print(" mLastNavigationBarMode="); pw.println(mLastNavigationBarMode);
+
+        pw.print(" mScrimAlpha="); pw.print(mScrimAlpha);
+        pw.print(" mScrimAlphaBelowThreshold="); pw.println(mScrimAlphaBelowThreshold);
+        pw.println();
+        pw.println(" StatusBarTransitionsController:");
+        mStatusBarIconController.getTransitionsController().dump(fd, pw, args);
+        pw.println();
+        pw.println(" NavigationBarTransitionsController:");
+        mNavigationBarController.dump(fd, pw, args);
+        pw.println();
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LightBarTransitionsController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LightBarTransitionsController.java
index 0f9f056..6bd959f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LightBarTransitionsController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LightBarTransitionsController.java
@@ -17,22 +17,34 @@
 package com.android.systemui.statusbar.phone;
 
 import android.animation.ValueAnimator;
+import android.content.Context;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.SystemClock;
+import android.util.TimeUtils;
 
+import com.android.systemui.Dumpable;
+import com.android.systemui.Dependency;
 import com.android.systemui.Interpolators;
+import com.android.systemui.SysUiServiceProvider;
+import com.android.systemui.statusbar.CommandQueue;
+import com.android.systemui.statusbar.CommandQueue.Callbacks;
+import com.android.systemui.statusbar.policy.KeyguardMonitor;
+
+import java.io.FileDescriptor;
+import java.io.PrintWriter;
 
 /**
  * Class to control all aspects about light bar changes.
  */
-public class LightBarTransitionsController {
+public class LightBarTransitionsController implements Dumpable, Callbacks {
 
     public static final long DEFAULT_TINT_ANIMATION_DURATION = 120;
     private static final String EXTRA_DARK_INTENSITY = "dark_intensity";
 
     private final Handler mHandler;
     private final DarkIntensityApplier mApplier;
+    private final KeyguardMonitor mKeyguardMonitor;
 
     private boolean mTransitionDeferring;
     private long mTransitionDeferringStartTime;
@@ -51,9 +63,17 @@
         }
     };
 
-    public LightBarTransitionsController(DarkIntensityApplier applier) {
+    public LightBarTransitionsController(Context context, DarkIntensityApplier applier) {
         mApplier = applier;
         mHandler = new Handler();
+        mKeyguardMonitor = Dependency.get(KeyguardMonitor.class);
+        SysUiServiceProvider.getComponent(context, CommandQueue.class)
+                .addCallbacks(this);
+    }
+
+    public void destroy(Context context) {
+        SysUiServiceProvider.getComponent(context, CommandQueue.class)
+                .removeCallbacks(this);
     }
 
     public void saveState(Bundle outState) {
@@ -66,10 +86,15 @@
         setIconTintInternal(savedInstanceState.getFloat(EXTRA_DARK_INTENSITY, 0));
     }
 
-    public void appTransitionPending() {
+    @Override
+    public void appTransitionPending(boolean forced) {
+        if (mKeyguardMonitor.isKeyguardGoingAway() && !forced) {
+            return;
+        }
         mTransitionPending = true;
     }
 
+    @Override
     public void appTransitionCancelled() {
         if (mTransitionPending && mTintChangePending) {
             mTintChangePending = false;
@@ -78,7 +103,11 @@
         mTransitionPending = false;
     }
 
-    public void appTransitionStarting(long startTime, long duration) {
+    @Override
+    public void appTransitionStarting(long startTime, long duration, boolean forced) {
+        if (mKeyguardMonitor.isKeyguardGoingAway() && !forced) {
+            return;
+        }
         if (mTransitionPending && mTintChangePending) {
             mTintChangePending = false;
             animateIconTint(mPendingDarkIntensity,
@@ -147,6 +176,26 @@
         mApplier.applyDarkIntensity(darkIntensity);
     }
 
+    @Override
+    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
+        pw.print("  mTransitionDeferring="); pw.print(mTransitionDeferring);
+        if (mTransitionDeferring) {
+            pw.println();
+            pw.print("   mTransitionDeferringStartTime=");
+            pw.println(TimeUtils.formatUptime(mTransitionDeferringStartTime));
+
+            pw.print("   mTransitionDeferringDuration=");
+            TimeUtils.formatDuration(mTransitionDeferringDuration, pw);
+            pw.println();
+        }
+        pw.print("  mTransitionPending="); pw.print(mTransitionPending);
+        pw.print(" mTintChangePending="); pw.println(mTintChangePending);
+
+        pw.print("  mPendingDarkIntensity="); pw.print(mPendingDarkIntensity);
+        pw.print(" mDarkIntensity="); pw.print(mDarkIntensity);
+        pw.print(" mNextDarkIntensity="); pw.println(mNextDarkIntensity);
+    }
+
     /**
      * Interface to apply a specific dark intensity.
      */
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockscreenGestureLogger.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockscreenGestureLogger.java
new file mode 100644
index 0000000..83b96bf
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockscreenGestureLogger.java
@@ -0,0 +1,59 @@
+/*
+ * 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.statusbar.phone;
+
+import android.metrics.LogMaker;
+import android.util.ArrayMap;
+
+import com.android.internal.logging.MetricsLogger;
+import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
+import com.android.systemui.EventLogConstants;
+import com.android.systemui.EventLogTags;
+
+/**
+ * Wrapper that emits both new- and old-style gesture logs.
+ * TODO: delete this once the old logs are no longer needed.
+ */
+public class LockscreenGestureLogger {
+    private ArrayMap<Integer, Integer> mLegacyMap;
+    private LogMaker mLogMaker = new LogMaker(MetricsEvent.VIEW_UNKNOWN)
+            .setType(MetricsEvent.TYPE_ACTION);
+
+    public LockscreenGestureLogger() {
+        mLegacyMap = new ArrayMap<>(EventLogConstants.METRICS_GESTURE_TYPE_MAP.length);
+        for (int i = 0; i < EventLogConstants.METRICS_GESTURE_TYPE_MAP.length ; i++) {
+            mLegacyMap.put(EventLogConstants.METRICS_GESTURE_TYPE_MAP[i], i);
+        }
+    }
+
+    public void write(int gesture, int length, int velocity) {
+        MetricsLogger.action(mLogMaker.setCategory(gesture)
+                .setType(MetricsEvent.TYPE_ACTION)
+                .addTaggedData(MetricsEvent.FIELD_GESTURE_LENGTH, length)
+                .addTaggedData(MetricsEvent.FIELD_GESTURE_VELOCITY, velocity));
+        // also write old-style logs for backward-0compatibility
+        EventLogTags.writeSysuiLockscreenGesture(safeLookup(gesture), length, velocity);
+    }
+
+    private int safeLookup(int gesture) {
+        Integer value = mLegacyMap.get(gesture);
+        if (value == null) {
+            return MetricsEvent.VIEW_UNKNOWN;
+        }
+        return value;
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
index 62b536e..99f8aaf 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
@@ -23,6 +23,7 @@
 import static com.android.systemui.statusbar.phone.StatusBar.DEBUG_WINDOW_STATE;
 import static com.android.systemui.statusbar.phone.StatusBar.dumpBarTransitions;
 
+import android.accessibilityservice.AccessibilityServiceInfo;
 import android.annotation.Nullable;
 import android.app.ActivityManager;
 import android.app.ActivityManagerNative;
@@ -79,6 +80,7 @@
 
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
+import java.util.List;
 import java.util.Locale;
 
 /**
@@ -101,7 +103,7 @@
 
     private int mNavigationIconHints = 0;
     private int mNavigationBarMode;
-    protected AccessibilityManager mAccessibilityManager;
+    private AccessibilityManager mAccessibilityManager;
 
     private int mDisabledFlags1;
     private StatusBar mStatusBar;
@@ -116,7 +118,6 @@
 
     private int mSystemUiVisibility;
     private LightBarController mLightBarController;
-    private boolean mKeyguardGoingAway;
 
     public boolean mHomeBlockedThisTouch;
 
@@ -132,6 +133,8 @@
         mDivider = SysUiServiceProvider.getComponent(getContext(), Divider.class);
         mWindowManager = getContext().getSystemService(WindowManager.class);
         mAccessibilityManager = getContext().getSystemService(AccessibilityManager.class);
+        mAccessibilityManager.addAccessibilityServicesStateChangeListener(
+                this::updateAccessibilityServicesState);
         if (savedInstanceState != null) {
             mDisabledFlags1 = savedInstanceState.getInt(EXTRA_DISABLE_STATE, 0);
         }
@@ -149,6 +152,8 @@
     public void onDestroy() {
         super.onDestroy();
         mCommandQueue.removeCallbacks(this);
+        mAccessibilityManager.removeAccessibilityServicesStateChangeListener(
+                this::updateAccessibilityServicesState);
         try {
             WindowManagerGlobal.getWindowManagerService()
                     .removeRotationWatcher(mRotationWatcher);
@@ -189,6 +194,7 @@
     @Override
     public void onDestroyView() {
         super.onDestroyView();
+        mNavigationBarView.getLightTransitionsController().destroy(getContext());
         getContext().unregisterReceiver(mBroadcastReceiver);
     }
 
@@ -281,31 +287,6 @@
         }
     }
 
-    @Override
-    public void appTransitionPending() {
-        mNavigationBarView.getLightTransitionsController().appTransitionPending();
-    }
-
-    @Override
-    public void appTransitionCancelled() {
-        mNavigationBarView.getLightTransitionsController().appTransitionCancelled();
-    }
-
-    @Override
-    public void appTransitionStarting(long startTime, long duration) {
-        if (mKeyguardGoingAway) return;
-        doAppTransitionStarting(startTime, duration);
-    }
-
-    /**
-     * Calls appTransitionStarting for the nav bar regardless of whether keyguard is going away.
-     * public so StatusBar can force this when needed.
-     */
-    public void doAppTransitionStarting(long startTime, long duration) {
-        mNavigationBarView.getLightTransitionsController().appTransitionStarting(startTime,
-                duration);
-    }
-
     // Injected from StatusBar at creation.
     public void setCurrentSysuiVisibility(int systemUiVisibility) {
         mSystemUiVisibility = systemUiVisibility;
@@ -402,6 +383,10 @@
         ButtonDispatcher homeButton = mNavigationBarView.getHomeButton();
         homeButton.setOnTouchListener(this::onHomeTouch);
         homeButton.setOnLongClickListener(this::onHomeLongClick);
+
+        ButtonDispatcher accessibilityButton = mNavigationBarView.getAccessibilityButton();
+        accessibilityButton.setOnClickListener(this::onAccessibilityClick);
+        accessibilityButton.setOnLongClickListener(this::onAccessibilityLongClick);
     }
 
     private boolean onHomeTouch(View v, MotionEvent event) {
@@ -553,6 +538,34 @@
                 MetricsEvent.ACTION_WINDOW_UNDOCK_LONGPRESS);
     }
 
+    private void onAccessibilityClick(View v) {
+        mAccessibilityManager.notifyAccessibilityButtonClicked();
+    }
+
+    private boolean onAccessibilityLongClick(View v) {
+        // TODO(b/34720082): Target service selection via long click
+        android.widget.Toast.makeText(getContext(), "Service selection coming soon...",
+                android.widget.Toast.LENGTH_LONG).show();
+        return true;
+    }
+
+    private void updateAccessibilityServicesState() {
+        final List<AccessibilityServiceInfo> services =
+                mAccessibilityManager.getEnabledAccessibilityServiceList(
+                        AccessibilityServiceInfo.FEEDBACK_ALL_MASK);
+        int requestingServices = 0;
+        for (int i = services.size() - 1; i >= 0; --i) {
+            AccessibilityServiceInfo info = services.get(i);
+            if ((info.flags & AccessibilityServiceInfo.FLAG_REQUEST_ACCESSIBILITY_BUTTON) != 0) {
+                requestingServices++;
+            }
+        }
+
+        final boolean showAccessibilityButton = requestingServices >= 1;
+        final boolean targetSelection = requestingServices >= 2;
+        mNavigationBarView.setAccessibilityButtonState(showAccessibilityButton, targetSelection);
+    }
+
     // ----- Methods that StatusBar talks to (should be minimized) -----
 
     public void setLightBarController(LightBarController lightBarController) {
@@ -574,10 +587,6 @@
                 delay + StackStateAnimator.ANIMATION_DURATION_GO_TO_FULL_SHADE);
     }
 
-    public void setKeyguardGoingAway(boolean keyguardGoingAway) {
-        mKeyguardGoingAway = keyguardGoingAway;
-    }
-
     public BarTransitions getBarTransitions() {
         return mNavigationBarView.getBarTransitions();
     }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarGestureHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarGestureHelper.java
index 228e8ea..ee9a791 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarGestureHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarGestureHelper.java
@@ -29,6 +29,7 @@
 import com.android.internal.logging.MetricsLogger;
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
 import com.android.internal.policy.DividerSnapAlgorithm.SnapTarget;
+import com.android.systemui.Dependency;
 import com.android.systemui.R;
 import com.android.systemui.RecentsComponent;
 import com.android.systemui.plugins.statusbar.phone.NavGesture.GestureHelper;
@@ -87,7 +88,11 @@
         mScrollTouchSlop = r.getDimensionPixelSize(R.dimen.navigation_bar_min_swipe_distance);
         mMinFlingVelocity = configuration.getScaledMinimumFlingVelocity();
         mTaskSwitcherDetector = new GestureDetector(context, this);
-        TunerService.get(context).addTunable(this, KEY_DOCK_WINDOW_GESTURE);
+        Dependency.get(TunerService.class).addTunable(this, KEY_DOCK_WINDOW_GESTURE);
+    }
+
+    public void destroy() {
+        Dependency.get(TunerService.class).removeTunable(this);
     }
 
     public void setComponents(RecentsComponent recentsComponent, Divider divider,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java
index 9b4867e..720ca14 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java
@@ -30,6 +30,7 @@
 import android.widget.LinearLayout;
 import android.widget.Space;
 
+import com.android.systemui.Dependency;
 import com.android.systemui.R;
 import com.android.systemui.plugins.PluginListener;
 import com.android.systemui.plugins.PluginManager;
@@ -135,15 +136,16 @@
     @Override
     protected void onAttachedToWindow() {
         super.onAttachedToWindow();
-        TunerService.get(getContext()).addTunable(this, NAV_BAR_VIEWS, NAV_BAR_LEFT,
+        Dependency.get(TunerService.class).addTunable(this, NAV_BAR_VIEWS, NAV_BAR_LEFT,
                 NAV_BAR_RIGHT);
-        PluginManager.getInstance(getContext()).addPluginListener(NavBarButtonProvider.ACTION, this,
-                NavBarButtonProvider.VERSION, true /* Allow multiple */);
+        Dependency.get(PluginManager.class).addPluginListener(this,
+                NavBarButtonProvider.class, true /* Allow multiple */);
     }
 
     @Override
     protected void onDetachedFromWindow() {
-        TunerService.get(getContext()).removeTunable(this);
+        Dependency.get(TunerService.class).removeTunable(this);
+        Dependency.get(PluginManager.class).removePluginListener(this);
         super.onDetachedFromWindow();
     }
 
@@ -278,10 +280,10 @@
         View v = null;
         String button = extractButton(buttonSpec);
         if (LEFT.equals(button)) {
-            buttonSpec = TunerService.get(mContext).getValue(NAV_BAR_LEFT, NAVSPACE);
+            buttonSpec = Dependency.get(TunerService.class).getValue(NAV_BAR_LEFT, NAVSPACE);
             button = extractButton(buttonSpec);
         } else if (RIGHT.equals(button)) {
-            buttonSpec = TunerService.get(mContext).getValue(NAV_BAR_RIGHT, MENU_IME);
+            buttonSpec = Dependency.get(TunerService.class).getValue(NAV_BAR_RIGHT, MENU_IME);
             button = extractButton(buttonSpec);
         }
         // Let plugins go first so they can override a standard view if they want.
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarTransitions.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarTransitions.java
index 3be5e57..cb925d5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarTransitions.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarTransitions.java
@@ -38,7 +38,8 @@
         mView = view;
         mBarService = IStatusBarService.Stub.asInterface(
                 ServiceManager.getService(Context.STATUS_BAR_SERVICE));
-        mLightTransitionsController = new LightBarTransitionsController(this::applyDarkIntensity);
+        mLightTransitionsController = new LightBarTransitionsController(view.getContext(),
+                this::applyDarkIntensity);
     }
 
     public void init() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
index 5e988fc..ad875f1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
@@ -46,6 +46,7 @@
 import android.view.inputmethod.InputMethodManager;
 import android.widget.FrameLayout;
 
+import com.android.systemui.Dependency;
 import com.android.systemui.R;
 import com.android.systemui.RecentsComponent;
 import com.android.systemui.plugins.PluginListener;
@@ -77,6 +78,8 @@
     private int mCurrentRotation = -1;
 
     boolean mShowMenu;
+    boolean mShowAccessibilityButton;
+    boolean mLongClickableAccessibilityButton;
     int mDisabledFlags = 0;
     int mNavigationIconHints = 0;
 
@@ -88,6 +91,7 @@
     private KeyButtonDrawable mDockedIcon;
     private KeyButtonDrawable mImeIcon;
     private KeyButtonDrawable mMenuIcon;
+    private KeyButtonDrawable mAccessibilityIcon;
 
     private GestureHelper mGestureHelper;
     private DeadZone mDeadZone;
@@ -200,7 +204,9 @@
 
         mVertical = false;
         mShowMenu = false;
-        mGestureHelper = new NavigationBarGestureHelper(context);
+
+        mShowAccessibilityButton = false;
+        mLongClickableAccessibilityButton = false;
 
         mConfiguration = new Configuration();
         mConfiguration.updateFrom(context.getResources().getConfiguration());
@@ -213,6 +219,8 @@
         mButtonDispatchers.put(R.id.recent_apps, new ButtonDispatcher(R.id.recent_apps));
         mButtonDispatchers.put(R.id.menu, new ButtonDispatcher(R.id.menu));
         mButtonDispatchers.put(R.id.ime_switcher, new ButtonDispatcher(R.id.ime_switcher));
+        mButtonDispatchers.put(R.id.accessibility_button,
+                new ButtonDispatcher(R.id.accessibility_button));
     }
 
     public BarTransitions getBarTransitions() {
@@ -287,6 +295,10 @@
         return mButtonDispatchers.get(R.id.ime_switcher);
     }
 
+    public ButtonDispatcher getAccessibilityButton() {
+        return mButtonDispatchers.get(R.id.accessibility_button);
+    }
+
     public SparseArray<ButtonDispatcher> getButtonDispatchers() {
         return mButtonDispatchers;
     }
@@ -320,6 +332,8 @@
             mRecentIcon = getDrawable(ctx,
                     R.drawable.ic_sysbar_recent, R.drawable.ic_sysbar_recent_dark);
             mMenuIcon = getDrawable(ctx, R.drawable.ic_sysbar_menu, R.drawable.ic_sysbar_menu_dark);
+            mAccessibilityIcon = getDrawable(ctx, R.drawable.ic_sysbar_accessibility_button,
+                    R.drawable.ic_sysbar_accessibility_button_dark);
 
             Context darkContext = new ContextThemeWrapper(ctx, R.style.DualToneDarkTheme);
             Context lightContext = new ContextThemeWrapper(ctx, R.style.DualToneLightTheme);
@@ -411,6 +425,9 @@
         setMenuVisibility(mShowMenu, true);
         getMenuButton().setImageDrawable(mMenuIcon);
 
+        setAccessibilityButtonState(mShowAccessibilityButton, mLongClickableAccessibilityButton);
+        getAccessibilityButton().setImageDrawable(mAccessibilityIcon);
+
         setDisabledFlags(mDisabledFlags, true);
 
         mBarTransitions.reapplyDarkIntensity();
@@ -517,13 +534,25 @@
 
         mShowMenu = show;
 
-        // Only show Menu if IME switcher not shown.
-        final boolean shouldShow = mShowMenu &&
+        // Only show Menu if IME switcher and Accessibility button not shown.
+        final boolean shouldShow = mShowMenu && !mShowAccessibilityButton &&
                 ((mNavigationIconHints & StatusBarManager.NAVIGATION_HINT_IME_SHOWN) == 0);
 
         getMenuButton().setVisibility(shouldShow ? View.VISIBLE : View.INVISIBLE);
     }
 
+    public void setAccessibilityButtonState(final boolean visible, final boolean longClickable) {
+        mShowAccessibilityButton = visible;
+        mLongClickableAccessibilityButton = longClickable;
+        if (visible) {
+            // Accessibility button overrides Menu button.
+            setMenuVisibility(false, true);
+        }
+
+        getAccessibilityButton().setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
+        getAccessibilityButton().setLongClickable(longClickable);
+    }
+
     @Override
     public void onFinishInflate() {
         mNavigationInflaterView = (NavigationBarInflaterView) findViewById(
@@ -633,6 +662,7 @@
     }
 
     private void updateTaskSwitchHelper() {
+        if (mGestureHelper == null) return;
         boolean isRtl = (getLayoutDirection() == View.LAYOUT_DIRECTION_RTL);
         mGestureHelper.setBarState(mVertical, isRtl);
     }
@@ -752,14 +782,18 @@
     @Override
     protected void onAttachedToWindow() {
         super.onAttachedToWindow();
-        PluginManager.getInstance(getContext()).addPluginListener(NavGesture.ACTION, this,
-                NavGesture.VERSION, false /* Only one */);
+        onPluginDisconnected(null); // Create default gesture helper
+        Dependency.get(PluginManager.class).addPluginListener(this,
+                NavGesture.class, false /* Only one */);
     }
 
     @Override
     protected void onDetachedFromWindow() {
         super.onDetachedFromWindow();
-        PluginManager.getInstance(getContext()).removePluginListener(this);
+        Dependency.get(PluginManager.class).removePluginListener(this);
+        if (mGestureHelper != null) {
+            mGestureHelper.destroy();
+        }
     }
 
     @Override
@@ -772,6 +806,9 @@
     public void onPluginDisconnected(NavGesture plugin) {
         NavigationBarGestureHelper defaultHelper = new NavigationBarGestureHelper(getContext());
         defaultHelper.setComponents(mRecentsComponent, mDivider, this);
+        if (mGestureHelper != null) {
+            mGestureHelper.destroy();
+        }
         mGestureHelper = defaultHelper;
         updateTaskSwitchHelper();
     }
@@ -806,6 +843,7 @@
         dumpButton(pw, "home", getHomeButton());
         dumpButton(pw, "rcnt", getRecentsButton());
         dumpButton(pw, "menu", getMenuButton());
+        dumpButton(pw, "a11y", getAccessibilityButton());
 
         pw.println("    }");
     }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconAreaController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconAreaController.java
index 0386398..707997d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconAreaController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconAreaController.java
@@ -1,7 +1,6 @@
 package com.android.systemui.statusbar.phone;
 
 import android.content.Context;
-import android.content.res.ColorStateList;
 import android.content.res.Resources;
 import android.graphics.Color;
 import android.graphics.Rect;
@@ -17,6 +16,8 @@
 import com.android.systemui.statusbar.NotificationShelf;
 import com.android.systemui.statusbar.StatusBarIconView;
 import com.android.systemui.statusbar.notification.NotificationUtils;
+import com.android.systemui.statusbar.policy.DarkIconDispatcher;
+import com.android.systemui.statusbar.policy.DarkIconDispatcher.DarkReceiver;
 import com.android.systemui.statusbar.stack.NotificationStackScrollLayout;
 
 import java.util.ArrayList;
@@ -26,7 +27,7 @@
  * A controller for the space in the status bar to the left of the system icons. This area is
  * normally reserved for notifications.
  */
-public class NotificationIconAreaController {
+public class NotificationIconAreaController implements DarkReceiver {
     private final NotificationColorUtil mNotificationColorUtil;
 
     private int mIconSize;
@@ -64,11 +65,12 @@
         mNotificationIcons = (NotificationIconContainer) mNotificationIconArea.findViewById(
                 R.id.notificationIcons);
 
-        NotificationShelf shelf = mStatusBar.getNotificationShelf();
+        mNotificationScrollLayout = mStatusBar.getNotificationScrollLayout();
+    }
+
+    public void setupShelf(NotificationShelf shelf) {
         mShelfIcons = shelf.getShelfIcons();
         shelf.setCollapsedIcons(mNotificationIcons);
-
-        mNotificationScrollLayout = mStatusBar.getNotificationScrollLayout();
     }
 
     public void onDensityOrFontScaleChanged(Context context) {
@@ -102,23 +104,18 @@
     }
 
     /**
-     * See {@link StatusBarIconController#setIconsDarkArea}.
+     * See {@link com.android.systemui.statusbar.policy.DarkIconDispatcher#setIconsDarkArea}.
+     * Sets the color that should be used to tint any icons in the notification area.
      *
      * @param tintArea the area in which to tint the icons, specified in screen coordinates
+     * @param darkIntensity
      */
-    public void setTintArea(Rect tintArea) {
+    public void onDarkChanged(Rect tintArea, float darkIntensity, int iconTint) {
         if (tintArea == null) {
             mTintArea.setEmpty();
         } else {
             mTintArea.set(tintArea);
         }
-        applyNotificationIconsTint();
-    }
-
-    /**
-     * Sets the color that should be used to tint any icons in the notification area.
-     */
-    public void setIconTint(int iconTint) {
         mIconTint = iconTint;
         applyNotificationIconsTint();
     }
@@ -228,12 +225,13 @@
         for (int i = 0; i < mNotificationIcons.getChildCount(); i++) {
             StatusBarIconView v = (StatusBarIconView) mNotificationIcons.getChildAt(i);
             boolean isPreL = Boolean.TRUE.equals(v.getTag(R.id.icon_is_pre_L));
+            int color = StatusBarIconView.NO_COLOR;
             boolean colorize = !isPreL || NotificationUtils.isGrayscale(v, mNotificationColorUtil);
             if (colorize) {
-                v.setImageTintList(ColorStateList.valueOf(
-                        StatusBarIconController.getTint(mTintArea, v, mIconTint)));
+                color = DarkIconDispatcher.getTint(mTintArea, v, mIconTint);
             }
-            v.setIconTint(mIconTint);
+            v.setStaticDrawableColor(color);
+            v.setDecorColor(mIconTint);
         }
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java
index c25a45c..dc5f98c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java
@@ -104,6 +104,7 @@
     private float mOpenedAmount = 0.0f;
     private float mVisualOverflowAdaption;
     private boolean mDisallowNextAnimation;
+    private boolean mAnimationsEnabled = true;
 
     public NotificationIconContainer(Context context, AttributeSet attrs) {
         super(context, attrs);
@@ -255,7 +256,7 @@
             iconState.visibleState = StatusBarIconView.STATE_ICON;
             if (firstOverflowIndex == -1 && (isAmbient
                     || (translationX >= (noOverflowAfter ? layoutEnd - mIconSize : overflowStart)))) {
-                firstOverflowIndex = noOverflowAfter ? i - 1 : i;
+                firstOverflowIndex = noOverflowAfter && !isAmbient ? i - 1 : i;
                 int totalDotLength = mStaticDotRadius * 6 + 2 * mDotPadding;
                 visualOverflowStart = overflowStart + mIconSize * (1 + OVERFLOW_EARLY_AMOUNT)
                         - totalDotLength / 2
@@ -422,6 +423,20 @@
         return mIconSize;
     }
 
+    public void setAnimationsEnabled(boolean enabled) {
+        if (!enabled && mAnimationsEnabled) {
+            for (int i = 0; i < getChildCount(); i++) {
+                View child = getChildAt(i);
+                ViewState childState = mIconStates.get(child);
+                if (childState != null) {
+                    childState.cancelAnimations(child);
+                    childState.applyToView(child);
+                }
+            }
+        }
+        mAnimationsEnabled = enabled;
+    }
+
     public class IconState extends ViewState {
         public float iconAppearAmount = 1.0f;
         public float clampedAppearAmount = 1.0f;
@@ -431,6 +446,7 @@
         public boolean useFullTransitionAmount;
         public boolean useLinearTransitionAmount;
         public boolean translateContent;
+        public int iconColor = StatusBarIconView.NO_COLOR;
 
         @Override
         public void applyToView(View view) {
@@ -438,52 +454,60 @@
                 StatusBarIconView icon = (StatusBarIconView) view;
                 boolean animate = false;
                 AnimationProperties animationProperties = null;
-                if (justAdded) {
-                    super.applyToView(icon);
-                    icon.setAlpha(0.0f);
-                    icon.setVisibleState(StatusBarIconView.STATE_HIDDEN, false /* animate */);
-                    animationProperties = ADD_ICON_PROPERTIES;
-                    animate = true;
-                } else if (visibleState != icon.getVisibleState()) {
-                    animationProperties = DOT_ANIMATION_PROPERTIES;
-                    animate = true;
-                }
-                if (!animate && mAddAnimationStartIndex >= 0
-                        && indexOfChild(view) >= mAddAnimationStartIndex
-                        && (icon.getVisibleState() != StatusBarIconView.STATE_HIDDEN
-                            || visibleState != StatusBarIconView.STATE_HIDDEN)) {
-                    animationProperties = DOT_ANIMATION_PROPERTIES;
-                    animate = true;
-                }
-                if (needsCannedAnimation) {
-                    AnimationFilter animationFilter = mTempProperties.getAnimationFilter();
-                    animationFilter.reset();
-                    animationFilter.combineFilter(ICON_ANIMATION_PROPERTIES.getAnimationFilter());
-                    mTempProperties.resetCustomInterpolators();
-                    mTempProperties.combineCustomInterpolators(ICON_ANIMATION_PROPERTIES);
-                    if (animationProperties != null) {
-                        animationFilter.combineFilter(animationProperties.getAnimationFilter());
-                        mTempProperties.combineCustomInterpolators(animationProperties);
+                boolean animationsAllowed = mAnimationsEnabled && !mDisallowNextAnimation;
+                if (animationsAllowed) {
+                    if (justAdded) {
+                        super.applyToView(icon);
+                        if (iconAppearAmount != 0.0f) {
+                            icon.setAlpha(0.0f);
+                            icon.setVisibleState(StatusBarIconView.STATE_HIDDEN,
+                                    false /* animate */);
+                            animationProperties = ADD_ICON_PROPERTIES;
+                            animate = true;
+                        }
+                    } else if (visibleState != icon.getVisibleState()) {
+                        animationProperties = DOT_ANIMATION_PROPERTIES;
+                        animate = true;
                     }
-                    animationProperties = mTempProperties;
-                    animationProperties.setDuration(CANNED_ANIMATION_DURATION);
-                    animate = true;
-                    mCannedAnimationStartIndex = indexOfChild(view);
+                    if (!animate && mAddAnimationStartIndex >= 0
+                            && indexOfChild(view) >= mAddAnimationStartIndex
+                            && (icon.getVisibleState() != StatusBarIconView.STATE_HIDDEN
+                            || visibleState != StatusBarIconView.STATE_HIDDEN)) {
+                        animationProperties = DOT_ANIMATION_PROPERTIES;
+                        animate = true;
+                    }
+                    if (needsCannedAnimation) {
+                        AnimationFilter animationFilter = mTempProperties.getAnimationFilter();
+                        animationFilter.reset();
+                        animationFilter.combineFilter(
+                                ICON_ANIMATION_PROPERTIES.getAnimationFilter());
+                        mTempProperties.resetCustomInterpolators();
+                        mTempProperties.combineCustomInterpolators(ICON_ANIMATION_PROPERTIES);
+                        if (animationProperties != null) {
+                            animationFilter.combineFilter(animationProperties.getAnimationFilter());
+                            mTempProperties.combineCustomInterpolators(animationProperties);
+                        }
+                        animationProperties = mTempProperties;
+                        animationProperties.setDuration(CANNED_ANIMATION_DURATION);
+                        animate = true;
+                        mCannedAnimationStartIndex = indexOfChild(view);
+                    }
+                    if (!animate && mCannedAnimationStartIndex >= 0
+                            && indexOfChild(view) > mCannedAnimationStartIndex
+                            && (icon.getVisibleState() != StatusBarIconView.STATE_HIDDEN
+                            || visibleState != StatusBarIconView.STATE_HIDDEN)) {
+                        AnimationFilter animationFilter = mTempProperties.getAnimationFilter();
+                        animationFilter.reset();
+                        animationFilter.animateX();
+                        mTempProperties.resetCustomInterpolators();
+                        animationProperties = mTempProperties;
+                        animationProperties.setDuration(CANNED_ANIMATION_DURATION);
+                        animate = true;
+                    }
                 }
-                if (!animate && mCannedAnimationStartIndex >= 0
-                        && indexOfChild(view) > mCannedAnimationStartIndex
-                        && (icon.getVisibleState() != StatusBarIconView.STATE_HIDDEN
-                        || visibleState != StatusBarIconView.STATE_HIDDEN)) {
-                    AnimationFilter animationFilter = mTempProperties.getAnimationFilter();
-                    animationFilter.reset();
-                    animationFilter.animateX();
-                    mTempProperties.resetCustomInterpolators();
-                    animationProperties = mTempProperties;
-                    animationProperties.setDuration(CANNED_ANIMATION_DURATION);
-                    animate = true;
-                }
-                icon.setVisibleState(visibleState);
-                if (animate && !mDisallowNextAnimation) {
+                icon.setVisibleState(visibleState, animationsAllowed);
+                icon.setIconColor(iconColor, needsCannedAnimation && animationsAllowed);
+                if (animate) {
                     animateTo(icon, animationProperties);
                 } else {
                     super.applyToView(view);
@@ -493,6 +517,14 @@
             needsCannedAnimation = false;
         }
 
+        @Override
+        public void initFrom(View view) {
+            super.initFrom(view);
+            if (view instanceof StatusBarIconView) {
+                iconColor = ((StatusBarIconView) view).getStaticDrawableColor();
+            }
+        }
+
         protected void onYTranslationAnimationFinished(View view) {
             if (hidden) {
                 view.setVisibility(INVISIBLE);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index fe7e915..6da9e90 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -26,6 +26,7 @@
 import android.content.Context;
 import android.content.pm.ResolveInfo;
 import android.content.res.Configuration;
+import android.content.res.Resources;
 import android.graphics.Canvas;
 import android.graphics.Color;
 import android.graphics.Paint;
@@ -43,6 +44,7 @@
 import android.widget.TextView;
 
 import com.android.internal.logging.MetricsLogger;
+import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
 import com.android.keyguard.KeyguardStatusView;
 import com.android.systemui.DejankUtils;
 import com.android.systemui.EventLogConstants;
@@ -137,6 +139,7 @@
     protected int mQsMinExpansionHeight;
     protected int mQsMaxExpansionHeight;
     private int mQsPeekHeight;
+    private boolean mQsOverscrollExpansionEnabled;
     private boolean mStackScrollerOverscrolling;
     private boolean mQsExpansionFromOverscroll;
     private float mLastOverscroll;
@@ -212,11 +215,14 @@
     private int mIndicationBottomPadding;
     private boolean mIsFullWidth;
     private boolean mDark;
+    private LockscreenGestureLogger mLockscreenGestureLogger = new LockscreenGestureLogger();
 
     public NotificationPanelView(Context context, AttributeSet attrs) {
         super(context, attrs);
         setWillNotDraw(!DEBUG);
         mFalsingManager = FalsingManager.getInstance(context);
+        mQsOverscrollExpansionEnabled =
+                getResources().getBoolean(R.bool.config_enableQuickSettingsOverscrollExpansion);
     }
 
     public void setStatusBar(StatusBar bar) {
@@ -596,7 +602,8 @@
             MetricsLogger.count(mContext, COUNTER_PANEL_OPEN_PEEK, 1);
             return true;
         }
-        if (!isFullyCollapsed() && onQsIntercept(event)) {
+
+        if (mQsOverscrollExpansionEnabled && !isFullyCollapsed() && onQsIntercept(event)) {
             return true;
         }
         return super.onInterceptTouchEvent(event);
@@ -710,10 +717,9 @@
     private void logQsSwipeDown(float y) {
         float vel = getCurrentQSVelocity();
         final int gesture = mStatusBarState == StatusBarState.KEYGUARD
-                ? EventLogConstants.SYSUI_LOCKSCREEN_GESTURE_SWIPE_DOWN_QS
-                : EventLogConstants.SYSUI_SHADE_GESTURE_SWIPE_DOWN_QS;
-        EventLogTags.writeSysuiLockscreenGesture(
-                gesture,
+                ? MetricsEvent.ACTION_LS_QS
+                : MetricsEvent.ACTION_SHADE_QS_PULL;
+        mLockscreenGestureLogger.write(gesture,
                 (int) ((y - mInitialTouchY) / mStatusBar.getDisplayDensity()),
                 (int) (vel / mStatusBar.getDisplayDensity()));
     }
@@ -770,7 +776,9 @@
             return true;
         }
         mHeadsUpTouchHelper.onTouchEvent(event);
-        if (!mHeadsUpTouchHelper.isTrackingHeadsUp() && handleQsTouch(event)) {
+
+        if (mQsOverscrollExpansionEnabled && !mHeadsUpTouchHelper.isTrackingHeadsUp()
+                && handleQsTouch(event)) {
             return true;
         }
         if (event.getActionMasked() == MotionEvent.ACTION_DOWN && isFullyCollapsed()) {
@@ -953,6 +961,10 @@
 
     @Override
     public void onOverscrollTopChanged(float amount, boolean isRubberbanded) {
+        if (!mQsOverscrollExpansionEnabled) {
+            return;
+        }
+
         cancelQsAnimation();
         if (!mQsExpansionEnabled) {
             amount = 0f;
@@ -967,6 +979,10 @@
 
     @Override
     public void flingTopOverscroll(float velocity, boolean open) {
+        if (!mQsOverscrollExpansionEnabled) {
+            return;
+        }
+
         mLastOverscroll = 0f;
         mQsExpansionFromOverscroll = false;
         setQsExpansion(mQsExpansionHeight);
@@ -1135,9 +1151,7 @@
                     .start();
         } else if (statusBarState == StatusBarState.KEYGUARD
                 || statusBarState == StatusBarState.SHADE_LOCKED) {
-            if (!mDozing) {
-                mKeyguardBottomArea.setVisibility(View.VISIBLE);
-            }
+            mKeyguardBottomArea.setVisibility(View.VISIBLE);
             mKeyguardBottomArea.setAlpha(1f);
         } else {
             mKeyguardBottomArea.setVisibility(View.GONE);
@@ -1819,9 +1833,7 @@
             if (mQsExpanded) {
                 flingSettings(0 /* vel */, false /* expand */, null, true /* isClick */);
             } else if (mQsExpansionEnabled) {
-                EventLogTags.writeSysuiLockscreenGesture(
-                        EventLogConstants.SYSUI_TAP_TO_OPEN_QS,
-                        0, 0);
+                mLockscreenGestureLogger.write(MetricsEvent.ACTION_SHADE_QS_TAP, 0, 0);
                 flingSettings(0 /* vel */, true /* expand */, null, true /* isClick */);
             }
         }
@@ -1836,8 +1848,7 @@
         int lengthDp = Math.abs((int) (translation / displayDensity));
         int velocityDp = Math.abs((int) (vel / displayDensity));
         if (start) {
-            EventLogTags.writeSysuiLockscreenGesture(
-                    EventLogConstants.SYSUI_LOCKSCREEN_GESTURE_SWIPE_DIALER, lengthDp, velocityDp);
+            mLockscreenGestureLogger.write(MetricsEvent.ACTION_LS_DIALER, lengthDp, velocityDp);
 
             mFalsingManager.onLeftAffordanceOn();
             if (mFalsingManager.shouldEnforceBouncer()) {
@@ -1855,9 +1866,7 @@
         } else {
             if (KeyguardBottomAreaView.CAMERA_LAUNCH_SOURCE_AFFORDANCE.equals(
                     mLastCameraLaunchSource)) {
-                EventLogTags.writeSysuiLockscreenGesture(
-                        EventLogConstants.SYSUI_LOCKSCREEN_GESTURE_SWIPE_CAMERA,
-                        lengthDp, velocityDp);
+                mLockscreenGestureLogger.write(MetricsEvent.ACTION_LS_CAMERA, lengthDp, velocityDp);
             }
             mFalsingManager.onCameraOn();
             if (mFalsingManager.shouldEnforceBouncer()) {
@@ -2092,13 +2101,12 @@
     private void updateDozingVisibilities(boolean animate) {
         if (mDozing) {
             mKeyguardStatusBar.setVisibility(View.INVISIBLE);
-            mKeyguardBottomArea.setVisibility(View.INVISIBLE);
+            mKeyguardBottomArea.setDozing(mDozing, animate);
         } else {
-            mKeyguardBottomArea.setVisibility(View.VISIBLE);
             mKeyguardStatusBar.setVisibility(View.VISIBLE);
+            mKeyguardBottomArea.setDozing(mDozing, animate);
             if (animate) {
                 animateKeyguardStatusBarIn(DOZE_ANIMATION_DURATION);
-                mKeyguardBottomArea.startFinishDozeAnimation();
             }
         }
     }
@@ -2152,8 +2160,8 @@
         switch (mStatusBar.getBarState()) {
             case StatusBarState.KEYGUARD:
                 if (!mDozingOnDown) {
-                    EventLogTags.writeSysuiLockscreenGesture(
-                            EventLogConstants.SYSUI_LOCKSCREEN_GESTURE_TAP_UNLOCK_HINT,
+                    mLockscreenGestureLogger.write(
+                            MetricsEvent.ACTION_LS_HINT,
                             0 /* lengthDp - N/A */, 0 /* velocityDp - N/A */);
                     startUnlockHintAnimation();
                 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java
index 87a3848..23d3816 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java
@@ -166,6 +166,10 @@
         if (DEBUG) LOG("onPanelPeeked");
     }
 
+    public boolean isClosed() {
+        return mState == STATE_CLOSED;
+    }
+
     public void onPanelCollapsed() {
         if (DEBUG) LOG("onPanelCollapsed");
     }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
index 5f67468..48a8329 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -33,6 +33,7 @@
 import android.view.animation.Interpolator;
 import android.widget.FrameLayout;
 
+import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
 import com.android.systemui.DejankUtils;
 import com.android.systemui.EventLogConstants;
 import com.android.systemui.EventLogTags;
@@ -55,6 +56,7 @@
     private static final int PEEK_ANIMATION_DURATION = 360;
     private long mDownTime;
     private float mMinExpandHeight;
+    private LockscreenGestureLogger mLockscreenGestureLogger = new LockscreenGestureLogger();
 
     private final void logf(String fmt, Object... args) {
         Log.v(TAG, (mViewName != null ? (mViewName + ": ") : "") + String.format(fmt, args));
@@ -110,6 +112,11 @@
     private float mInitialTouchX;
     private boolean mTouchDisabled;
 
+    /**
+     * Whether or not the PanelView can be expanded or collapsed with a drag.
+     */
+    private boolean mNotificationsDragEnabled;
+
     private Interpolator mBounceInterpolator;
     protected KeyguardBottomAreaView mKeyguardBottomArea;
 
@@ -190,6 +197,8 @@
                 0.84f /* y2 */);
         mBounceInterpolator = new BounceInterpolator();
         mFalsingManager = FalsingManager.getInstance(context);
+        mNotificationsDragEnabled =
+                getResources().getBoolean(R.bool.config_enableNotificationShadeDrag);
     }
 
     protected void loadDimens() {
@@ -232,6 +241,15 @@
             return false;
         }
 
+        // If dragging should not expand the notifications shade, then return false.
+        if (!mNotificationsDragEnabled) {
+            if (mTracking) {
+                // Turn off tracking if it's on or the shade can get stuck in the down position.
+                onTrackingStopped(true /* expand */);
+            }
+            return false;
+        }
+
         // On expanding, single mouse click expands the panel instead of dragging.
         if (isFullyCollapsed() && event.isFromSource(InputDevice.SOURCE_MOUSE)) {
             if (event.getAction() == MotionEvent.ACTION_UP) {
@@ -423,8 +441,8 @@
                         float displayDensity = mStatusBar.getDisplayDensity();
                         int heightDp = (int) Math.abs((y - mInitialTouchY) / displayDensity);
                         int velocityDp = (int) Math.abs(vel / displayDensity);
-                        EventLogTags.writeSysuiLockscreenGesture(
-                                EventLogConstants.SYSUI_LOCKSCREEN_GESTURE_SWIPE_UP_UNLOCK,
+                        mLockscreenGestureLogger.write(
+                                MetricsEvent.ACTION_LS_UNLOCK,
                                 heightDp, velocityDp);
                     }
             fling(vel, expand, isFalseTouch(x, y));
@@ -487,7 +505,7 @@
 
     @Override
     public boolean onInterceptTouchEvent(MotionEvent event) {
-        if (mInstantExpanding
+        if (mInstantExpanding || !mNotificationsDragEnabled
                 || (mMotionAborted && event.getActionMasked() != MotionEvent.ACTION_DOWN)) {
             return false;
         }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
index 1044ecf..93f874d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
@@ -38,24 +38,35 @@
 import com.android.internal.telephony.TelephonyIntents;
 import com.android.systemui.Dependency;
 import com.android.systemui.R;
+import com.android.systemui.SysUiServiceProvider;
 import com.android.systemui.qs.tiles.DndTile;
 import com.android.systemui.qs.tiles.RotationLockTile;
+import com.android.systemui.statusbar.CommandQueue;
+import com.android.systemui.statusbar.CommandQueue.Callbacks;
 import com.android.systemui.statusbar.policy.BluetoothController;
 import com.android.systemui.statusbar.policy.BluetoothController.Callback;
 import com.android.systemui.statusbar.policy.CastController;
 import com.android.systemui.statusbar.policy.CastController.CastDevice;
 import com.android.systemui.statusbar.policy.DataSaverController;
+import com.android.systemui.statusbar.policy.DataSaverController.Listener;
+import com.android.systemui.statusbar.policy.DeviceProvisionedController;
+import com.android.systemui.statusbar.policy.DeviceProvisionedController.DeviceProvisionedListener;
 import com.android.systemui.statusbar.policy.HotspotController;
+import com.android.systemui.statusbar.policy.KeyguardMonitor;
 import com.android.systemui.statusbar.policy.NextAlarmController;
 import com.android.systemui.statusbar.policy.RotationLockController;
+import com.android.systemui.statusbar.policy.RotationLockController.RotationLockControllerCallback;
 import com.android.systemui.statusbar.policy.UserInfoController;
+import com.android.systemui.statusbar.policy.ZenModeController;
 
 /**
  * This class contains all of the policy about which icons are installed in the status
  * bar at boot time.  It goes through the normal API for icons, even though it probably
  * strictly doesn't need to.
  */
-public class PhoneStatusBarPolicy implements Callback, RotationLockController.RotationLockControllerCallback, DataSaverController.Listener {
+public class PhoneStatusBarPolicy implements Callback, Callbacks,
+        RotationLockControllerCallback, Listener,
+        ZenModeController.Callback, DeviceProvisionedListener, KeyguardMonitor.Callback {
     private static final String TAG = "PhoneStatusBarPolicy";
     private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
 
@@ -82,7 +93,9 @@
     private final StatusBarIconController mIconController;
     private final RotationLockController mRotationLockController;
     private final DataSaverController mDataSaver;
-    private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
+    private final ZenModeController mZenController;
+    private final DeviceProvisionedController mProvisionedController;
+    private final KeyguardMonitor mKeyguardMonitor;
 
     // Assume it's all good unless we hear otherwise.  We don't always seem
     // to get broadcasts that it *is* there.
@@ -106,13 +119,15 @@
         mCast = Dependency.get(CastController.class);
         mHotspot = Dependency.get(HotspotController.class);
         mBluetooth = Dependency.get(BluetoothController.class);
-        mBluetooth.addCallback(this);
         mNextAlarm = Dependency.get(NextAlarmController.class);
         mAlarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
         mUserInfoController = Dependency.get(UserInfoController.class);
         mUserManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
         mRotationLockController = Dependency.get(RotationLockController.class);
         mDataSaver = Dependency.get(DataSaverController.class);
+        mZenController = Dependency.get(ZenModeController.class);
+        mProvisionedController = Dependency.get(DeviceProvisionedController.class);
+        mKeyguardMonitor = Dependency.get(KeyguardMonitor.class);
 
         mSlotCast = context.getString(com.android.internal.R.string.status_bar_cast);
         mSlotHotspot = context.getString(com.android.internal.R.string.status_bar_hotspot);
@@ -127,7 +142,6 @@
         mSlotHeadset = context.getString(com.android.internal.R.string.status_bar_headset);
         mSlotDataSaver = context.getString(com.android.internal.R.string.status_bar_data_saver);
 
-        mRotationLockController.addCallback(this);
 
         // listen for broadcasts
         IntentFilter filter = new IntentFilter();
@@ -158,7 +172,6 @@
         // Alarm clock
         mIconController.setIcon(mSlotAlarmClock, R.drawable.stat_sys_alarm, null);
         mIconController.setIconVisibility(mSlotAlarmClock, false);
-        mNextAlarm.addCallback(mNextAlarmCallback);
 
         // zen
         mIconController.setIcon(mSlotZen, R.drawable.stat_sys_zen_important, null);
@@ -172,13 +185,11 @@
         // cast
         mIconController.setIcon(mSlotCast, R.drawable.stat_sys_cast, null);
         mIconController.setIconVisibility(mSlotCast, false);
-        mCast.addCallback(mCastCallback);
 
         // hotspot
         mIconController.setIcon(mSlotHotspot, R.drawable.stat_sys_hotspot,
                 mContext.getString(R.string.accessibility_status_bar_hotspot));
         mIconController.setIconVisibility(mSlotHotspot, mHotspot.isHotspotEnabled());
-        mHotspot.addCallback(mHotspotCallback);
 
         // managed profile
         mIconController.setIcon(mSlotManagedProfile, R.drawable.stat_sys_managed_profile_status,
@@ -189,15 +200,36 @@
         mIconController.setIcon(mSlotDataSaver, R.drawable.stat_sys_data_saver,
                 context.getString(R.string.accessibility_data_saver_on));
         mIconController.setIconVisibility(mSlotDataSaver, false);
+
+        mRotationLockController.addCallback(this);
+        mBluetooth.addCallback(this);
+        mProvisionedController.addCallback(this);
+        mZenController.addCallback(this);
+        mCast.addCallback(mCastCallback);
+        mHotspot.addCallback(mHotspotCallback);
+        mNextAlarm.addCallback(mNextAlarmCallback);
         mDataSaver.addCallback(this);
+        mKeyguardMonitor.addCallback(this);
+
+        SysUiServiceProvider.getComponent(mContext, CommandQueue.class).addCallbacks(this);
     }
 
-    public void setStatusBarKeyguardViewManager(
-            StatusBarKeyguardViewManager statusBarKeyguardViewManager) {
-        mStatusBarKeyguardViewManager = statusBarKeyguardViewManager;
+    public void destroy() {
+        mRotationLockController.removeCallback(this);
+        mBluetooth.removeCallback(this);
+        mProvisionedController.removeCallback(this);
+        mZenController.removeCallback(this);
+        mCast.removeCallback(mCastCallback);
+        mHotspot.removeCallback(mHotspotCallback);
+        mNextAlarm.removeCallback(mNextAlarmCallback);
+        mDataSaver.removeCallback(this);
+        mKeyguardMonitor.removeCallback(this);
+        SysUiServiceProvider.getComponent(mContext, CommandQueue.class).removeCallbacks(this);
+        mContext.unregisterReceiver(mIntentReceiver);
     }
 
-    public void setZenMode(int zen) {
+    @Override
+    public void onZenChanged(int zen) {
         mZen = zen;
         updateVolumeZen();
     }
@@ -394,7 +426,7 @@
         if (DEBUG) Log.v(TAG, "updateManagedProfile: mManagedProfileFocused: "
                 + mManagedProfileFocused);
         final boolean showIcon;
-        if (mManagedProfileFocused && !mStatusBarKeyguardViewManager.isShowing()) {
+        if (mManagedProfileFocused && !mKeyguardMonitor.isShowing()) {
             showIcon = true;
             mIconController.setIcon(mSlotManagedProfile,
                     R.drawable.stat_sys_managed_profile_status,
@@ -471,15 +503,20 @@
         }
     };
 
-    public void appTransitionStarting(long startTime, long duration) {
+    @Override
+    public void appTransitionStarting(long startTime, long duration, boolean forced) {
         updateManagedProfile();
     }
 
-    public void notifyKeyguardShowingChanged() {
+    @Override
+    public void onKeyguardShowingChanged() {
         updateManagedProfile();
     }
 
-    public void setCurrentUserSetup(boolean userSetup) {
+    @Override
+    public void onUserSetupChanged() {
+        boolean userSetup = mProvisionedController.isUserSetup(
+                mProvisionedController.getCurrentUser());
         if (mCurrentUserSetup == userSetup) return;
         mCurrentUserSetup = userSetup;
         updateAlarm();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
index 7e08812..b52c26f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
@@ -24,9 +24,13 @@
 import android.view.ViewGroup;
 import android.view.accessibility.AccessibilityEvent;
 
+import com.android.systemui.BatteryMeterView;
 import com.android.systemui.DejankUtils;
+import com.android.systemui.Dependency;
 import com.android.systemui.EventLogTags;
 import com.android.systemui.R;
+import com.android.systemui.statusbar.policy.DarkIconDispatcher;
+import com.android.systemui.statusbar.policy.DarkIconDispatcher.DarkReceiver;
 
 public class PhoneStatusBarView extends PanelBar {
     private static final String TAG = "PhoneStatusBarView";
@@ -48,6 +52,7 @@
             }
         }
     };
+    private DarkReceiver mBattery;
 
     public PhoneStatusBarView(Context context, AttributeSet attrs) {
         super(context, attrs);
@@ -70,6 +75,20 @@
     @Override
     public void onFinishInflate() {
         mBarTransitions.init();
+        mBattery = (DarkReceiver) findViewById(R.id.battery);
+    }
+
+    @Override
+    protected void onAttachedToWindow() {
+        super.onAttachedToWindow();
+        // Always have Battery meters in the status bar observe the dark/light modes.
+        Dependency.get(DarkIconDispatcher.class).addDarkReceiver(mBattery);
+    }
+
+    @Override
+    protected void onDetachedFromWindow() {
+        super.onDetachedFromWindow();
+        Dependency.get(DarkIconDispatcher.class).removeDarkReceiver(mBattery);
     }
 
     @Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
index dd567e8..a1022c4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
@@ -89,7 +89,7 @@
 
         mServices = new TileServices(this, Dependency.get(Dependency.BG_LOOPER));
 
-        TunerService.get(mContext).addTunable(this, TILES_SETTING);
+        Dependency.get(TunerService.class).addTunable(this, TILES_SETTING);
         // AutoTileManager can modify mTiles so make sure mTiles has already been initialized.
         mAutoTiles = new AutoTileManager(context, this);
     }
@@ -101,7 +101,7 @@
     public void destroy() {
         mTiles.values().forEach(tile -> tile.destroy());
         mAutoTiles.destroy();
-        TunerService.get(mContext).removeTunable(this);
+        Dependency.get(TunerService.class).removeTunable(this);
         mServices.destroy();
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java
index c0e9653..ade1b0b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java
@@ -21,12 +21,13 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.res.Configuration;
+import android.content.res.Resources;
 import android.graphics.Color;
 import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.RippleDrawable;
-import android.icu.text.NumberFormat;
 import android.os.UserManager;
+import android.support.annotation.Nullable;
 import android.support.annotation.VisibleForTesting;
 import android.util.AttributeSet;
 import android.util.SparseBooleanArray;
@@ -53,7 +54,6 @@
 import com.android.systemui.qs.TouchAnimator;
 import com.android.systemui.qs.TouchAnimator.Builder;
 import com.android.systemui.statusbar.SignalClusterView;
-import com.android.systemui.statusbar.policy.BatteryController.BatteryStateChangeCallback;
 import com.android.systemui.statusbar.policy.NetworkController;
 import com.android.systemui.statusbar.policy.NetworkController.EmergencyListener;
 import com.android.systemui.statusbar.policy.NetworkController.IconState;
@@ -66,10 +66,7 @@
 
 public class QuickStatusBarHeader extends BaseStatusBarHeader implements
         NextAlarmChangeCallback, OnClickListener, OnUserInfoChangedListener, EmergencyListener,
-        BatteryStateChangeCallback, SignalCallback {
-
-    private static final String TAG = "QuickStatusBarHeader";
-
+        SignalCallback {
     private static final float EXPAND_INDICATOR_THRESHOLD = .93f;
 
     private ActivityStarter mActivityStarter;
@@ -99,16 +96,18 @@
     private boolean mShowEmergencyCallsOnly;
     protected MultiUserSwitch mMultiUserSwitch;
     private ImageView mMultiUserAvatar;
-
+    private boolean mAlwaysShowMultiUserSwitch;
 
     private TouchAnimator mAnimator;
     protected TouchAnimator mSettingsAlpha;
     private float mExpansionAmount;
     protected QSTileHost mHost;
+
     protected View mEdit;
+    private boolean mShowEditIcon;
+
     private boolean mShowFullAlarm;
     private float mDateTimeTranslation;
-    private TextView mBatteryLevel;
     private SparseBooleanArray mRoamingsBySubId = new SparseBooleanArray();
     private boolean mIsRoaming;
 
@@ -119,25 +118,37 @@
     @Override
     protected void onFinishInflate() {
         super.onFinishInflate();
+        Resources res = getResources();
 
         mEmergencyOnly = (TextView) findViewById(R.id.header_emergency_calls_only);
 
+        mShowEditIcon = res.getBoolean(R.bool.config_showQuickSettingsEditingIcon);
+
         mEdit = findViewById(android.R.id.edit);
-        findViewById(android.R.id.edit).setOnClickListener(view ->
-                Dependency.get(ActivityStarter.class).postQSRunnableDismissingKeyguard(() ->
-                        mQsPanel.showEdit(view)));
+        mEdit.setVisibility(mShowEditIcon ? VISIBLE : GONE);
+
+        if (mShowEditIcon) {
+            findViewById(android.R.id.edit).setOnClickListener(view ->
+                    Dependency.get(ActivityStarter.class).postQSRunnableDismissingKeyguard(() ->
+                            mQsPanel.showEdit(view)));
+        }
 
         mDateTimeAlarmGroup = (ViewGroup) findViewById(R.id.date_time_alarm_group);
         mDateTimeAlarmGroup.findViewById(R.id.empty_time_view).setVisibility(View.GONE);
         mDateTimeGroup = (ViewGroup) findViewById(R.id.date_time_group);
         mDateTimeGroup.setPivotX(0);
         mDateTimeGroup.setPivotY(0);
-        mDateTimeTranslation = getResources().getDimension(R.dimen.qs_date_time_translation);
-        mShowFullAlarm = getResources().getBoolean(R.bool.quick_settings_show_full_alarm);
+        mDateTimeTranslation = res.getDimension(R.dimen.qs_date_time_translation);
+        mShowFullAlarm = res.getBoolean(R.bool.quick_settings_show_full_alarm);
 
         mExpandIndicator = (ExpandableIndicator) findViewById(R.id.expand_indicator);
+        mExpandIndicator.setVisibility(
+                res.getBoolean(R.bool.config_showQuickSettingsExpandIndicator)
+                ? VISIBLE : GONE);
 
         mHeaderQsPanel = (QuickQSPanel) findViewById(R.id.quick_qs_panel);
+        mHeaderQsPanel.setVisibility(res.getBoolean(R.bool.config_showQuickSettingsRow)
+                ? VISIBLE : GONE);
 
         mSettingsButton = (SettingsButton) findViewById(R.id.settings_button);
         mSettingsContainer = findViewById(R.id.settings_button_container);
@@ -147,10 +158,9 @@
         mAlarmStatus = (TextView) findViewById(R.id.alarm_status);
         mAlarmStatus.setOnClickListener(this);
 
-        mBatteryLevel = (TextView) findViewById(R.id.battery_level);
-
         mMultiUserSwitch = (MultiUserSwitch) findViewById(R.id.multi_user_switch);
         mMultiUserAvatar = (ImageView) mMultiUserSwitch.findViewById(R.id.multi_user_avatar);
+        mAlwaysShowMultiUserSwitch = res.getBoolean(R.bool.config_alwaysShowMultiUserSwitcher);
 
         // RenderThread is doing more harm than good when touching the header (to expand quick
         // settings), so disable it for this view
@@ -163,8 +173,10 @@
         SignalClusterView cluster = (SignalClusterView) findViewById(R.id.signal_cluster);
         int colorForeground = Utils.getColorAttr(getContext(), android.R.attr.colorForeground);
         float intensity = colorForeground == Color.WHITE ? 0 : 1;
-        cluster.setIconTint(colorForeground, intensity, new Rect(0, 0, 0, 0));
+        cluster.onDarkChanged(new Rect(0, 0, 0, 0), intensity, colorForeground);
+
         BatteryMeterView battery = (BatteryMeterView) findViewById(R.id.battery);
+        battery.forceShowPercent();
         int colorSecondary = Utils.getColorAttr(getContext(), android.R.attr.textColorSecondary);
         battery.setRawColors(colorForeground, colorSecondary);
 
@@ -200,11 +212,8 @@
         updateSettingsAnimator();
     }
 
-    protected void updateSettingsAnimator() {
-        mSettingsAlpha = new TouchAnimator.Builder()
-                .addFloat(mEdit, "alpha", 0, 1)
-                .addFloat(mMultiUserSwitch, "alpha", 0, 1)
-                .build();
+    private void updateSettingsAnimator() {
+        mSettingsAlpha = createSettingsAlphaAnimator();
 
         final boolean isRtl = isLayoutRtl();
         if (isRtl && mDateTimeGroup.getWidth() == 0) {
@@ -221,6 +230,27 @@
         }
     }
 
+    @Nullable
+    private TouchAnimator createSettingsAlphaAnimator() {
+        // If the settings icon is not shown and the user switcher is always shown, then there
+        // is nothing to animate.
+        if (!mShowEditIcon && mAlwaysShowMultiUserSwitch) {
+            return null;
+        }
+
+        TouchAnimator.Builder animatorBuilder = new TouchAnimator.Builder();
+
+        if (mShowEditIcon) {
+            animatorBuilder.addFloat(mEdit, "alpha", 0, 1);
+        }
+
+        if (!mAlwaysShowMultiUserSwitch) {
+            animatorBuilder.addFloat(mMultiUserSwitch, "alpha", 0, 1);
+        }
+
+        return animatorBuilder.build();
+    }
+
     @Override
     public int getCollapsedHeight() {
         return getHeight();
@@ -261,7 +291,10 @@
         mExpansionAmount = headerExpansionFraction;
         updateDateTimePosition();
         mAnimator.setPosition(headerExpansionFraction);
-        mSettingsAlpha.setPosition(headerExpansionFraction);
+
+        if (mSettingsAlpha != null) {
+            mSettingsAlpha.setPosition(headerExpansionFraction);
+        }
 
         updateAlarmVisibilities();
 
@@ -302,7 +335,7 @@
         });
     }
 
-    protected void updateVisibilities() {
+    private void updateVisibilities() {
         updateAlarmVisibilities();
         updateDateTimePosition();
         mEmergencyOnly.setVisibility(mExpanded && (mShowEmergencyCallsOnly || mIsRoaming)
@@ -310,9 +343,14 @@
         mSettingsContainer.findViewById(R.id.tuner_icon).setVisibility(
                 TunerService.isTunerEnabled(mContext) ? View.VISIBLE : View.INVISIBLE);
         final boolean isDemo = UserManager.isDeviceInDemoMode(mContext);
-        mMultiUserSwitch.setVisibility(mExpanded && mMultiUserSwitch.hasMultipleUsers() && !isDemo
+
+        mMultiUserSwitch.setVisibility((mExpanded || mAlwaysShowMultiUserSwitch)
+                && mMultiUserSwitch.hasMultipleUsers() && !isDemo
                 ? View.VISIBLE : View.INVISIBLE);
-        mEdit.setVisibility(isDemo || !mExpanded ? View.INVISIBLE : View.VISIBLE);
+
+        if (mShowEditIcon) {
+            mEdit.setVisibility(isDemo || !mExpanded ? View.INVISIBLE : View.VISIBLE);
+        }
     }
 
     private void updateDateTimePosition() {
@@ -402,17 +440,6 @@
         }
     }
 
-    @Override
-    public void onBatteryLevelChanged(int level, boolean pluggedIn, boolean charging) {
-        String percentage = NumberFormat.getPercentInstance().format((double) level / 100.0);
-        mBatteryLevel.setText(percentage);
-    }
-
-    @Override
-    public void onPowerSaveChanged(boolean isPowerSave) {
-        // Don't care.
-    }
-
     public void setMobileDataIndicators(IconState statusIcon, IconState qsIcon, int statusType,
             int qsType, boolean activityIn, boolean activityOut, String typeContentDescription,
             String description, boolean isWide, int subId, boolean roaming) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
index 8fcbf38..b30d3ab 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
@@ -23,13 +23,13 @@
 import android.content.Context;
 import android.graphics.Rect;
 import android.support.v4.graphics.ColorUtils;
+import android.util.TypedValue;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.ViewTreeObserver;
 import android.view.animation.DecelerateInterpolator;
 import android.view.animation.Interpolator;
 import android.view.animation.PathInterpolator;
-
 import com.android.keyguard.KeyguardUpdateMonitor;
 import com.android.systemui.R;
 import com.android.systemui.statusbar.ExpandableNotificationRow;
@@ -49,7 +49,6 @@
             = new PathInterpolator(0f, 0, 0.7f, 1f);
     public static final Interpolator KEYGUARD_FADE_OUT_INTERPOLATOR_LOCKED
             = new PathInterpolator(0.3f, 0f, 0.8f, 1f);
-    private static final float SCRIM_BEHIND_ALPHA = 0.62f;
     protected static final float SCRIM_BEHIND_ALPHA_KEYGUARD = 0.45f;
     protected static final float SCRIM_BEHIND_ALPHA_UNLOCKING = 0.2f;
     private static final float SCRIM_IN_FRONT_ALPHA = 0.75f;
@@ -66,7 +65,7 @@
     private final View mHeadsUpScrim;
     private final KeyguardUpdateMonitor mKeyguardUpdateMonitor;
 
-    protected float mScrimBehindAlpha = SCRIM_BEHIND_ALPHA;
+    protected float mScrimBehindAlpha;
     protected float mScrimBehindAlphaKeyguard = SCRIM_BEHIND_ALPHA_KEYGUARD;
     protected float mScrimBehindAlphaUnlocking = SCRIM_BEHIND_ALPHA_UNLOCKING;
 
@@ -109,6 +108,8 @@
         mUnlockMethodCache = UnlockMethodCache.getInstance(context);
         mKeyguardUpdateMonitor = KeyguardUpdateMonitor.getInstance(context);
         mLightBarController = lightBarController;
+        mScrimBehindAlpha = context.getResources().getFloat(R.dimen.scrim_behind_alpha);
+
         updateHeadsUpScrim(false);
     }
 
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 270476e..dd04741 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
@@ -1,3 +1,5 @@
+
+
 /*
  * Copyright (C) 2010 The Android Open Source Project
  *
@@ -69,6 +71,7 @@
 import android.media.session.MediaSession;
 import android.media.session.MediaSessionManager;
 import android.media.session.PlaybackState;
+import android.metrics.LogMaker;
 import android.net.Uri;
 import android.os.AsyncTask;
 import android.os.Bundle;
@@ -112,6 +115,7 @@
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
 import com.android.internal.statusbar.NotificationVisibility;
 import com.android.internal.statusbar.StatusBarIcon;
+import com.android.internal.util.NotificationMessagingUtil;
 import com.android.keyguard.KeyguardHostView.OnDismissAction;
 import com.android.keyguard.KeyguardStatusView;
 import com.android.keyguard.KeyguardUpdateMonitor;
@@ -169,13 +173,16 @@
 import com.android.systemui.statusbar.SignalClusterView;
 import com.android.systemui.statusbar.StatusBarState;
 import com.android.systemui.statusbar.notification.VisualStabilityManager;
+import com.android.systemui.statusbar.phone.StatusBarIconController.IconManager;
 import com.android.systemui.statusbar.phone.UnlockMethodCache.OnUnlockMethodChangedListener;
 import com.android.systemui.statusbar.policy.BatteryController;
 import com.android.systemui.statusbar.policy.BatteryController.BatteryStateChangeCallback;
 import com.android.systemui.statusbar.policy.BrightnessMirrorController;
+import com.android.systemui.statusbar.policy.ConfigurationController;
+import com.android.systemui.statusbar.policy.ConfigurationController.ConfigurationListener;
+import com.android.systemui.statusbar.policy.DarkIconDispatcher;
 import com.android.systemui.statusbar.policy.DeviceProvisionedController;
 import com.android.systemui.statusbar.policy.DeviceProvisionedController.DeviceProvisionedListener;
-import com.android.systemui.statusbar.policy.EncryptionHelper;
 import com.android.systemui.statusbar.policy.HeadsUpManager;
 import com.android.systemui.statusbar.policy.KeyguardMonitor;
 import com.android.systemui.statusbar.policy.KeyguardMonitorImpl;
@@ -189,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;
@@ -269,19 +278,20 @@
     protected static final int MSG_TOGGLE_RECENTS_APPS = 1021;
     protected static final int MSG_PRELOAD_RECENT_APPS = 1022;
     protected static final int MSG_CANCEL_PRELOAD_RECENT_APPS = 1023;
-    protected static final int MSG_SHOW_NEXT_AFFILIATED_TASK = 1024;
-    protected static final int MSG_SHOW_PREV_AFFILIATED_TASK = 1025;
     protected static final int MSG_TOGGLE_KEYBOARD_SHORTCUTS_MENU = 1026;
     protected static final int MSG_DISMISS_KEYBOARD_SHORTCUTS_MENU = 1027;
 
     protected static final boolean ENABLE_HEADS_UP = true;
     protected static final String SETTING_HEADS_UP_TICKER = "ticker_gets_heads_up";
 
+    // Must match constant in Settings. Used to highlight preferences when linking to Settings.
+    private static final String EXTRA_FRAGMENT_ARG_KEY = ":settings:fragment_args_key";
+
     private static final String PERMISSION_SELF = "com.android.systemui.permission.SELF";
 
     // Should match the values in PhoneWindowManager
-    public static final String SYSTEM_DIALOG_REASON_RECENT_APPS = "recentapps";
     public static final String SYSTEM_DIALOG_REASON_HOME_KEY = "homekey";
+    public static final String SYSTEM_DIALOG_REASON_RECENT_APPS = "recentapps";
 
     private static final String BANNER_ACTION_CANCEL =
             "com.android.systemui.statusbar.banner_action_cancel";
@@ -406,7 +416,7 @@
     protected PhoneStatusBarView mStatusBarView;
     private int mStatusBarWindowState = WINDOW_STATE_SHOWING;
     protected StatusBarWindowManager mStatusBarWindowManager;
-    private UnlockMethodCache mUnlockMethodCache;
+    protected UnlockMethodCache mUnlockMethodCache;
     private DozeServiceHost mDozeServiceHost;
     private boolean mWakeUpComingFromTouch;
     private PointF mWakeUpTouchLocation;
@@ -499,9 +509,6 @@
                 }
                 updateQsExpansionEnabled();
             }
-            if (mIconPolicy != null) {
-                mIconPolicy.setCurrentUserSetup(mUserSetup);
-            }
         }
     };
 
@@ -601,8 +608,6 @@
             new ArraySet<>();
     private long mLastVisibilityReportUptimeMs;
 
-    private final ShadeUpdates mShadeUpdates = new ShadeUpdates();
-
     private Runnable mLaunchTransitionEndRunnable;
     protected boolean mLaunchTransitionFadingAway;
     private ExpandableNotificationRow mDraggedDownRow;
@@ -701,11 +706,17 @@
         }
     };
 
+    private NotificationMessagingUtil mMessagingUtil;
     private KeyguardUserSwitcher mKeyguardUserSwitcher;
     private UserSwitcherController mUserSwitcherController;
     private NetworkController mNetworkController;
     private KeyguardMonitorImpl mKeyguardMonitor;
     private BatteryController mBatteryController;
+    private boolean mPanelExpanded;
+    private LogMaker mStatusBarStateLog;
+    private LockscreenGestureLogger mLockscreenGestureLogger = new LockscreenGestureLogger();
+    private NotificationIconAreaController mNotificationIconAreaController;
+    private ConfigurationListener mDensityChangeListener;
 
     private void recycleAllVisibilityObjects(ArraySet<NotificationVisibility> array) {
         final int N = array.size();
@@ -763,6 +774,7 @@
                 Context.DEVICE_POLICY_SERVICE);
 
         mNotificationData = new NotificationData(this);
+        mMessagingUtil = new NotificationMessagingUtil(mContext);
 
         mAccessibilityManager = (AccessibilityManager)
                 mContext.getSystemService(Context.ACCESSIBILITY_SERVICE);
@@ -802,8 +814,6 @@
         final Configuration currentConfig = mContext.getResources().getConfiguration();
         mLocale = currentConfig.locale;
         mLayoutDirection = TextUtils.getLayoutDirectionFromLocale(mLocale);
-        mFontScale = currentConfig.fontScale;
-        mDensity = currentConfig.densityDpi;
 
         mUserManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
         mKeyguardManager = (KeyguardManager) mContext.getSystemService(Context.KEYGUARD_SERVICE);
@@ -829,7 +839,7 @@
         createAndAddWindows();
 
         mSettingsObserver.onChange(false); // set up
-        disable(switches[0], switches[6], false /* animate */);
+        mCommandQueue.disable(switches[0], switches[6], false /* animate */);
         setSystemUiVisibility(switches[1], switches[7], switches[8], 0xffffffff,
                 fullscreenStackBounds, dockedStackBounds);
         topAppWindowChanged(switches[2] != 0);
@@ -840,7 +850,7 @@
         int N = iconSlots.size();
         int viewIndex = 0;
         for (int i=0; i < N; i++) {
-            setIcon(iconSlots.get(i), icons.get(i));
+            mCommandQueue.setIcon(iconSlots.get(i), icons.get(i));
         }
 
         // Set up the initial notification state.
@@ -887,7 +897,8 @@
                 null, null);
         updateCurrentProfilesCache();
 
-        IVrManager vrManager = IVrManager.Stub.asInterface(ServiceManager.getService("vrmanager"));
+        IVrManager vrManager = IVrManager.Stub.asInterface(ServiceManager.getService(
+                Context.VR_SERVICE));
         try {
             vrManager.registerListener(mVrStateCallbacks);
         } catch (RemoteException e) {
@@ -906,7 +917,6 @@
 
         // Lastly, call to the icon policy to install/update all the icons.
         mIconPolicy = new PhoneStatusBarPolicy(mContext, mIconController);
-        mIconPolicy.setCurrentUserSetup(mUserSetup);
         mSettingsObserver.onChange(false); // set up
 
         mHeadsUpObserver.onChange(true); // set up
@@ -930,46 +940,64 @@
 
         mScreenPinningRequest = new ScreenPinningRequest(mContext);
         mFalsingManager = FalsingManager.getInstance(mContext);
+
         Dependency.get(ActivityStarterDelegate.class).setActivityStarterImpl(this);
+
+        mDensityChangeListener = new ConfigurationListener() {
+            @Override
+            public void onDensityOrFontScaleChanged() {
+                StatusBar.this.onDensityOrFontScaleChanged();
+            }
+        };
+        Dependency.get(ConfigurationController.class).addCallback(mDensityChangeListener);
     }
 
     protected void createIconController() {
-        mIconController = new StatusBarIconController(
-                mContext, mStatusBarView, mKeyguardStatusBar, this);
     }
 
     // ================================================================================
     // Constructing the view
     // ================================================================================
-    protected PhoneStatusBarView makeStatusBarView() {
+    protected void makeStatusBarView() {
         final Context context = mContext;
         updateDisplaySize(); // populates mDisplayMetrics
         updateResources();
 
         inflateStatusBarWindow(context);
         mStatusBarWindow.setService(this);
-        mStatusBarWindow.setOnTouchListener(new View.OnTouchListener() {
-            @Override
-            public boolean onTouch(View v, MotionEvent event) {
-                checkUserAutohide(v, event);
-                checkRemoteInputOutside(event);
-                if (event.getAction() == MotionEvent.ACTION_DOWN) {
-                    if (mExpandedVisible) {
-                        animateCollapsePanels();
-                    }
-                }
-                return mStatusBarWindow.onTouchEvent(event);
-            }
-        });
+        mStatusBarWindow.setOnTouchListener(getStatusBarWindowTouchListener());
 
+        // TODO: Deal with the ugliness that comes from having some of the statusbar broken out
+        // into fragments, but the rest here, it leaves some awkward lifecycle and whatnot.
         mNotificationPanel = (NotificationPanelView) mStatusBarWindow.findViewById(
                 R.id.notification_panel);
+        mStackScroller = (NotificationStackScrollLayout) mStatusBarWindow.findViewById(
+                R.id.notification_stack_scroller);
         mNotificationPanel.setStatusBar(this);
         mNotificationPanel.setGroupManager(mGroupManager);
+        mKeyguardStatusBar = (KeyguardStatusBarView) mStatusBarWindow.findViewById(R.id.keyguard_header);
 
-        mStatusBarView = (PhoneStatusBarView) mStatusBarWindow.findViewById(R.id.status_bar);
-        mStatusBarView.setBar(this);
-        mStatusBarView.setPanel(mNotificationPanel);
+        mNotificationIconAreaController = SystemUIFactory.getInstance()
+                .createNotificationIconAreaController(context, this);
+        inflateShelf();
+        mNotificationIconAreaController.setupShelf(mNotificationShelf);
+        Dependency.get(DarkIconDispatcher.class).addDarkReceiver(mNotificationIconAreaController);
+        FragmentHostManager.get(mStatusBarWindow)
+                .addTagListener(CollapsedStatusBarFragment.TAG, (tag, fragment) -> {
+                    CollapsedStatusBarFragment statusBarFragment = (CollapsedStatusBarFragment) fragment;
+                    statusBarFragment.initNotificationIconArea(mNotificationIconAreaController);
+                    mStatusBarView = (PhoneStatusBarView) fragment.getView();
+                    mStatusBarView.setBar(this);
+                    mStatusBarView.setPanel(mNotificationPanel);
+                    mStatusBarView.setScrimController(mScrimController);
+                    setAreThereNotifications();
+                }).getFragmentManager()
+                .beginTransaction()
+                .replace(R.id.status_bar_container, new CollapsedStatusBarFragment(), CollapsedStatusBarFragment.TAG)
+                .commit();
+        Dependency.get(StatusBarIconController.class).addIconGroup(
+                new IconManager((ViewGroup) mKeyguardStatusBar.findViewById(R.id.statusIcons)));
+        mIconController = Dependency.get(StatusBarIconController.class);
 
         if (!ActivityManager.isHighEndGfx()) {
             mStatusBarWindow.setBackground(null);
@@ -1007,8 +1035,6 @@
         // figure out which pixel-format to use for the status bar.
         mPixelFormat = PixelFormat.OPAQUE;
 
-        mStackScroller = (NotificationStackScrollLayout) mStatusBarWindow.findViewById(
-                R.id.notification_stack_scroller);
         mStackScroller.setLongPressListener(getNotificationLongClicker());
         mStackScroller.setStatusBar(this);
         mStackScroller.setGroupManager(mGroupManager);
@@ -1016,7 +1042,6 @@
         mGroupManager.setOnGroupChangeListener(mStackScroller);
         mVisualStabilityManager.setVisibilityLocationProvider(mStackScroller);
 
-        inflateShelf();
         inflateEmptyShadeView();
         inflateDismissView();
         mExpandedContents = mStackScroller;
@@ -1029,7 +1054,6 @@
             mLockscreenWallpaper = new LockscreenWallpaper(mContext, this, mHandler);
         }
 
-        mKeyguardStatusBar = (KeyguardStatusBarView) mStatusBarWindow.findViewById(R.id.keyguard_header);
         mKeyguardStatusView =
                 (KeyguardStatusView) mStatusBarWindow.findViewById(R.id.keyguard_status_view);
         mKeyguardBottomArea =
@@ -1043,8 +1067,6 @@
         // set the initial view visibility
         setAreThereNotifications();
 
-        createIconController();
-
         // TODO: Find better place for this callback.
         mBatteryController.addCallback(new BatteryStateChangeCallback() {
             @Override
@@ -1061,7 +1083,7 @@
             }
         });
 
-        mLightBarController = new LightBarController(mIconController);
+        mLightBarController = new LightBarController();
         if (mNavigationBar != null) {
             mNavigationBar.setLightBarController(mLightBarController);
         }
@@ -1085,7 +1107,6 @@
         }
         mHeadsUpManager.addListener(mScrimController);
         mStackScroller.setScrimController(mScrimController);
-        mStatusBarView.setScrimController(mScrimController);
         mDozeScrimController = new DozeScrimController(mScrimController, context, mStackScroller,
                 mNotificationPanel);
 
@@ -1108,7 +1129,7 @@
                     .replace(R.id.qs_frame, new QSFragment(), QS.TAG)
                     .commit();
             new PluginFragmentListener(container, QS.TAG, QSFragment.class, QS.class)
-                    .startListening(QS.ACTION, QS.VERSION);
+                    .startListening();
             final QSTileHost qsh = SystemUIFactory.getInstance().createQSTileHost(mContext, this,
                     mIconController);
             mBrightnessMirrorController = new BrightnessMirrorController(mStatusBarWindow);
@@ -1191,8 +1212,6 @@
 
         // Private API call to make the shadows look better for Recents
         ThreadedRenderer.overrideProperty("ambientRatio", String.valueOf(1.5f));
-
-        return mStatusBarView;
     }
 
     protected void createNavigationBar() {
@@ -1223,6 +1242,23 @@
         }
     }
 
+    /**
+     * Returns the {@link android.view.View.OnTouchListener} that will be invoked when the
+     * background window of the status bar is clicked.
+     */
+    protected View.OnTouchListener getStatusBarWindowTouchListener() {
+        return (v, event) -> {
+            checkUserAutohide(v, event);
+            checkRemoteInputOutside(event);
+            if (event.getAction() == MotionEvent.ACTION_DOWN) {
+                if (mExpandedVisible) {
+                    animateCollapsePanels();
+                }
+            }
+            return mStatusBarWindow.onTouchEvent(event);
+        };
+    }
+
     private void inflateShelf() {
         mNotificationShelf =
                 (NotificationShelf) LayoutInflater.from(mContext).inflate(
@@ -1249,12 +1285,13 @@
         }
         // end old BaseStatusBar.onDensityOrFontScaleChanged().
         mScrimController.onDensityOrFontScaleChanged();
-        mStatusBarView.onDensityOrFontScaleChanged();
+        // TODO: Remove this.
+        if (mStatusBarView != null) mStatusBarView.onDensityOrFontScaleChanged();
         if (mBrightnessMirrorController != null) {
             mBrightnessMirrorController.onDensityOrFontScaleChanged();
         }
         inflateSignalClusters();
-        mIconController.onDensityOrFontScaleChanged();
+        mNotificationIconAreaController.onDensityOrFontScaleChanged(mContext);
         inflateDismissView();
         updateClearAll();
         inflateEmptyShadeView();
@@ -1270,12 +1307,11 @@
     }
 
     private void inflateSignalClusters() {
-        SignalClusterView signalClusterView = reinflateSignalCluster(mStatusBarView);
-        mIconController.setSignalCluster(signalClusterView);
         reinflateSignalCluster(mKeyguardStatusBar);
     }
 
-    private SignalClusterView reinflateSignalCluster(View view) {
+    public static SignalClusterView reinflateSignalCluster(View view) {
+        Context context = view.getContext();
         SignalClusterView signalCluster =
                 (SignalClusterView) view.findViewById(R.id.signal_cluster);
         if (signalCluster != null) {
@@ -1284,12 +1320,12 @@
                 ViewGroup viewParent = (ViewGroup) parent;
                 int index = viewParent.indexOfChild(signalCluster);
                 viewParent.removeView(signalCluster);
-                SignalClusterView newCluster = (SignalClusterView) LayoutInflater.from(mContext)
+                SignalClusterView newCluster = (SignalClusterView) LayoutInflater.from(context)
                         .inflate(R.layout.signal_cluster_view, viewParent, false);
                 ViewGroup.MarginLayoutParams layoutParams =
                         (ViewGroup.MarginLayoutParams) viewParent.getLayoutParams();
                 layoutParams.setMarginsRelative(
-                        mContext.getResources().getDimensionPixelSize(
+                        context.getResources().getDimensionPixelSize(
                                 R.dimen.signal_cluster_margin_start),
                         0, 0, 0);
                 newCluster.setLayoutParams(layoutParams);
@@ -1413,26 +1449,22 @@
             updateNotifications();
         }
         // end old BaseStatusBar.setZenMode().
-        if (mIconPolicy != null) {
-            mIconPolicy.setZenMode(mode);
-        }
     }
 
     protected void startKeyguard() {
         Trace.beginSection("StatusBar#startKeyguard");
         KeyguardViewMediator keyguardViewMediator = getComponent(KeyguardViewMediator.class);
         mFingerprintUnlockController = new FingerprintUnlockController(mContext,
-                mStatusBarWindowManager, mDozeScrimController, keyguardViewMediator,
+                mDozeScrimController, keyguardViewMediator,
                 mScrimController, this, UnlockMethodCache.getInstance(mContext));
         mStatusBarKeyguardViewManager = keyguardViewMediator.registerStatusBar(this,
-                getBouncerContainer(), mStatusBarWindowManager, mScrimController,
+                getBouncerContainer(), mScrimController,
                 mFingerprintUnlockController);
         mKeyguardIndicationController.setStatusBarKeyguardViewManager(
                 mStatusBarKeyguardViewManager);
         mKeyguardIndicationController.setUserInfoController(
                 Dependency.get(UserInfoController.class));
         mFingerprintUnlockController.setStatusBarKeyguardViewManager(mStatusBarKeyguardViewManager);
-        mIconPolicy.setStatusBarKeyguardViewManager(mStatusBarKeyguardViewManager);
         mRemoteInputController.addCallback(mStatusBarKeyguardViewManager);
 
         mRemoteInputController.addCallback(new RemoteInputController.Callback() {
@@ -1490,7 +1522,7 @@
                     ActivityManager.DOCKED_STACK_CREATE_MODE_TOP_OR_LEFT, null, metricsDockAction);
         } else {
             Divider divider = getComponent(Divider.class);
-            if (divider != null && divider.isMinimized()) {
+            if (divider != null && divider.isMinimized() && !divider.isHomeStackResizable()) {
                 // Undocking from the minimized state is not supported
                 return false;
             } else {
@@ -1513,16 +1545,6 @@
         }
     }
 
-    @Override
-    public void setIcon(String slot, StatusBarIcon icon) {
-        mIconController.setIcon(slot, icon);
-    }
-
-    @Override
-    public void removeIcon(String slot) {
-        mIconController.removeIcon(slot);
-    }
-
     public UserHandle getCurrentUserHandle() {
         return new UserHandle(mCurrentUserId);
     }
@@ -1883,10 +1905,9 @@
         updateEmptyShadeView();
 
         updateQsExpansionEnabled();
-        mShadeUpdates.check();
 
         // Let's also update the icons
-        mIconController.updateNotificationIcons(mNotificationData);
+        mNotificationIconAreaController.updateNotificationIcons(mNotificationData);
     }
 
     /**
@@ -2067,24 +2088,26 @@
                     hasActiveNotifications() + " clearable=" + clearable);
         }
 
-        final View nlo = mStatusBarView.findViewById(R.id.notification_lights_out);
-        final boolean showDot = hasActiveNotifications() && !areLightsOn();
-        if (showDot != (nlo.getAlpha() == 1.0f)) {
-            if (showDot) {
-                nlo.setAlpha(0f);
-                nlo.setVisibility(View.VISIBLE);
+        if (mStatusBarView != null) {
+            final View nlo = mStatusBarView.findViewById(R.id.notification_lights_out);
+            final boolean showDot = hasActiveNotifications() && !areLightsOn();
+            if (showDot != (nlo.getAlpha() == 1.0f)) {
+                if (showDot) {
+                    nlo.setAlpha(0f);
+                    nlo.setVisibility(View.VISIBLE);
+                }
+                nlo.animate()
+                        .alpha(showDot ? 1 : 0)
+                        .setDuration(showDot ? 750 : 250)
+                        .setInterpolator(new AccelerateInterpolator(2.0f))
+                        .setListener(showDot ? null : new AnimatorListenerAdapter() {
+                            @Override
+                            public void onAnimationEnd(Animator _a) {
+                                nlo.setVisibility(View.GONE);
+                            }
+                        })
+                        .start();
             }
-            nlo.animate()
-                .alpha(showDot?1:0)
-                .setDuration(showDot?750:250)
-                .setInterpolator(new AccelerateInterpolator(2.0f))
-                .setListener(showDot ? null : new AnimatorListenerAdapter() {
-                    @Override
-                    public void onAnimationEnd(Animator _a) {
-                        nlo.setVisibility(View.GONE);
-                    }
-                })
-                .start();
         }
 
         findAndUpdateMediaNotifications();
@@ -2408,26 +2431,6 @@
                 && mFalsingManager.isReportingEnabled() ? View.VISIBLE : View.INVISIBLE);
     }
 
-    protected int adjustDisableFlags(int state) {
-        if (!mLaunchTransitionFadingAway && !mKeyguardFadingAway && shouldHideNotificationIcons()) {
-            state |= StatusBarManager.DISABLE_NOTIFICATION_ICONS;
-            state |= StatusBarManager.DISABLE_SYSTEM_INFO;
-        }
-        if (mNetworkController != null && EncryptionHelper.IS_DATA_ENCRYPTED) {
-            if (mNetworkController.hasEmergencyCryptKeeperText()) {
-                state |= StatusBarManager.DISABLE_NOTIFICATION_ICONS;
-            }
-            if (!mNetworkController.isRadioOn()) {
-                state |= StatusBarManager.DISABLE_SYSTEM_INFO;
-            }
-        }
-        return state;
-    }
-
-    private boolean shouldHideNotificationIcons() {
-        return mExpandedVisible && mNotificationPanel.shouldHideNotificationIcons();
-    }
-
     /**
      * State is one or more of the DISABLE constants from StatusBarManager.
      */
@@ -2436,7 +2439,6 @@
         animate &= mStatusBarWindowState != WINDOW_STATE_HIDDEN;
         mDisabledUnmodified1 = state1;
         mDisabledUnmodified2 = state2;
-        state1 = adjustDisableFlags(state1);
         final int old1 = mDisabled1;
         final int diff1 = state1 ^ old1;
         mDisabled1 = state1;
@@ -2478,28 +2480,13 @@
         flagdbg.append(">");
         Log.d(TAG, flagdbg.toString());
 
-        if ((diff1 & StatusBarManager.DISABLE_SYSTEM_INFO) != 0) {
-            if ((state1 & StatusBarManager.DISABLE_SYSTEM_INFO) != 0) {
-                mIconController.hideSystemIconArea(animate);
-            } else {
-                mIconController.showSystemIconArea(animate);
-            }
-        }
-
-        if ((diff1 & StatusBarManager.DISABLE_CLOCK) != 0) {
-            boolean visible = (state1 & StatusBarManager.DISABLE_CLOCK) == 0;
-            mIconController.setClockVisibilityByPolicy(visible);
-        }
         if ((diff1 & StatusBarManager.DISABLE_EXPAND) != 0) {
             if ((state1 & StatusBarManager.DISABLE_EXPAND) != 0) {
                 animateCollapsePanels();
             }
         }
 
-        if ((diff1 & (StatusBarManager.DISABLE_HOME
-                        | StatusBarManager.DISABLE_RECENT
-                        | StatusBarManager.DISABLE_BACK
-                        | StatusBarManager.DISABLE_SEARCH)) != 0) {
+        if ((diff1 & StatusBarManager.DISABLE_RECENT) != 0) {
             if ((state1 & StatusBarManager.DISABLE_RECENT) != 0) {
                 // close recents if it's visible
                 mHandler.removeMessages(MSG_HIDE_RECENT_APPS);
@@ -2507,14 +2494,6 @@
             }
         }
 
-        if ((diff1 & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
-            if ((state1 & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
-                mIconController.hideNotificationIconArea(animate);
-            } else {
-                mIconController.showNotificationIconArea(animate);
-            }
-        }
-
         if ((diff1 & StatusBarManager.DISABLE_NOTIFICATION_ALERTS) != 0) {
             mDisableNotificationAlerts =
                     (state1 & StatusBarManager.DISABLE_NOTIFICATION_ALERTS) != 0;
@@ -2532,7 +2511,7 @@
      * This needs to be called if state used by {@link #adjustDisableFlags} changes.
      */
     public void recomputeDisableFlags(boolean animate) {
-        disable(mDisabledUnmodified1, mDisabledUnmodified2, animate);
+        mCommandQueue.disable(mDisabledUnmodified1, mDisabledUnmodified2, animate);
     }
 
     protected H createHandler() {
@@ -2701,6 +2680,7 @@
     }
 
     public void setPanelExpanded(boolean isExpanded) {
+        mPanelExpanded = isExpanded;
         mStatusBarWindowManager.setPanelExpanded(isExpanded);
         mVisualStabilityManager.setPanelExpanded(isExpanded);
         if (isExpanded && getBarState() != StatusBarState.KEYGUARD) {
@@ -2728,10 +2708,6 @@
         mFalsingManager.onScreenOff();
     }
 
-    public NotificationShelf getNotificationShelf() {
-        return mNotificationShelf;
-    }
-
     public NotificationStackScrollLayout getNotificationScrollLayout() {
         return mStackScroller;
     }
@@ -2745,6 +2721,14 @@
         updateNotifications();
     }
 
+    public boolean isLaunchTransitionFadingAway() {
+        return mLaunchTransitionFadingAway;
+    }
+
+    public boolean shouldHideNotificationIcons() {
+        return mNotificationPanel.shouldHideNotificationIcons();
+    }
+
     /**
      * All changes to the status bar and notifications funnel through here and are batched.
      */
@@ -2752,28 +2736,6 @@
         @Override
         public void handleMessage(Message m) {
             switch (m.what) {
-                // start old BaseStatusBar.H handling.
-                case MSG_SHOW_RECENT_APPS:
-                    showRecents(m.arg1 > 0, m.arg2 != 0);
-                    break;
-                case MSG_HIDE_RECENT_APPS:
-                    hideRecents(m.arg1 > 0, m.arg2 > 0);
-                    break;
-                case MSG_TOGGLE_RECENTS_APPS:
-                    toggleRecents();
-                    break;
-                case MSG_PRELOAD_RECENT_APPS:
-                    preloadRecents();
-                    break;
-                case MSG_CANCEL_PRELOAD_RECENT_APPS:
-                    cancelPreloadingRecents();
-                    break;
-                case MSG_SHOW_NEXT_AFFILIATED_TASK:
-                    showRecentsNextAffiliatedTask();
-                    break;
-                case MSG_SHOW_PREV_AFFILIATED_TASK:
-                    showRecentsPreviousAffiliatedTask();
-                    break;
                 case MSG_TOGGLE_KEYBOARD_SHORTCUTS_MENU:
                     toggleKeyboardShortcuts(m.arg1);
                     break;
@@ -3082,24 +3044,6 @@
     }
 
     @Override // CommandQueue
-    public void buzzBeepBlinked() {
-    }
-
-    @Override
-    public void notificationLightOff() {
-        if (mDozeServiceHost != null) {
-            mDozeServiceHost.fireNotificationLight(false);
-        }
-    }
-
-    @Override
-    public void notificationLightPulse(int argb, int onMillis, int offMillis) {
-        if (mDozeServiceHost != null) {
-            mDozeServiceHost.fireNotificationLight(true);
-        }
-    }
-
-    @Override // CommandQueue
     public void setSystemUiVisibility(int vis, int fullscreenStackVis, int dockedStackVis,
             int mask, Rect fullscreenStackBounds, Rect dockedStackBounds) {
         final int oldVal = mSystemUiVisibility;
@@ -3190,7 +3134,8 @@
 
     void checkBarModes() {
         if (mDemoMode) return;
-        checkBarMode(mStatusBarMode, mStatusBarWindowState, getStatusBarTransitions());
+        if (mStatusBarView != null) checkBarMode(mStatusBarMode, mStatusBarWindowState,
+                getStatusBarTransitions());
         if (mNavigationBar != null) mNavigationBar.checkNavBarModes();
         mNoAnimationOnNextBarModeChange = false;
     }
@@ -3211,7 +3156,9 @@
     }
 
     private void finishBarAnimations() {
-        mStatusBarView.getBarTransitions().finishAnimations();
+        if (mStatusBarView != null) {
+            mStatusBarView.getBarTransitions().finishAnimations();
+        }
         if (mNavigationBar != null) {
             mNavigationBar.finishBarAnimations();
         }
@@ -3391,8 +3338,6 @@
                 mNotificationData.dump(pw, "  ");
             }
 
-            mIconController.dump(pw);
-
             if (false) {
                 pw.println("see the logcat for a dump of the views we have created.");
                 // must happen on ui thread
@@ -3413,9 +3358,6 @@
             pw.print("  status bar gestures: ");
             mGestureRec.dump(fd, pw, args);
         }
-        if (mStatusBarWindowManager != null) {
-            mStatusBarWindowManager.dump(fd, pw, args);
-        }
 
         if (mHeadsUpManager != null) {
             mHeadsUpManager.dump(fd, pw, args);
@@ -3427,6 +3369,9 @@
         } else {
             pw.println("  mGroupManager: null");
         }
+
+        mLightBarController.dump(fd, pw, args);
+
         if (KeyguardUpdateMonitor.getInstance(mContext) != null) {
             KeyguardUpdateMonitor.getInstance(mContext).dump(fd, pw, args);
         }
@@ -3451,9 +3396,8 @@
 
     private void addStatusBarWindow() {
         makeStatusBarView();
-        mStatusBarWindowManager = new StatusBarWindowManager(mContext);
-        mRemoteInputController = new RemoteInputController(mStatusBarWindowManager,
-                mHeadsUpManager);
+        mStatusBarWindowManager = Dependency.get(StatusBarWindowManager.class);
+        mRemoteInputController = new RemoteInputController(mHeadsUpManager);
         mStatusBarWindowManager.add(mStatusBarWindow, getStatusBarHeight());
     }
 
@@ -3646,15 +3590,6 @@
     protected void onConfigurationChanged(Configuration newConfig) {
         updateResources();
         updateDisplaySize(); // populates mDisplayMetrics
-        // Begin old BaseStatusBar.onConfigurationChanged
-        final float fontScale = newConfig.fontScale;
-        final int density = newConfig.densityDpi;
-        if (density != mDensity || mFontScale != fontScale) {
-            onDensityOrFontScaleChanged();
-            mDensity = density;
-            mFontScale = fontScale;
-        }
-        // End old BaseStatusBar.onConfigurationChanged
 
         if (DEBUG) {
             Log.v(TAG, "configuration changed: " + mContext.getResources().getConfiguration());
@@ -3828,6 +3763,13 @@
                 isSecure,
                 canSkipBouncer);
         if (stateFingerprint != mLastLoggedStateFingerprint) {
+            if (mStatusBarStateLog == null) {
+                mStatusBarStateLog = new LogMaker(MetricsEvent.VIEW_UNKNOWN);
+            }
+            MetricsLogger.action(mStatusBarStateLog
+                    .setCategory(isBouncerShowing ? MetricsEvent.BOUNCER : MetricsEvent.LOCKSCREEN)
+                    .setType(isShowing ? MetricsEvent.TYPE_OPEN : MetricsEvent.TYPE_CLOSE)
+                    .setSubtype(isSecure ? 1 : 0));
             EventLogTags.writeSysuiStatusBarState(mState,
                     isShowing ? 1 : 0,
                     isOccluded ? 1 : 0,
@@ -3968,17 +3910,12 @@
         mContext.unregisterReceiver(mDemoReceiver);
         mAssistManager.destroy();
 
-        final SignalClusterView signalCluster =
-                (SignalClusterView) mStatusBarView.findViewById(R.id.signal_cluster);
-        final SignalClusterView signalClusterKeyguard =
-                (SignalClusterView) mKeyguardStatusBar.findViewById(R.id.signal_cluster);
-        final SignalClusterView signalClusterQs =
-                (SignalClusterView) mHeader.findViewById(R.id.signal_cluster);
         if (mQSPanel != null && mQSPanel.getHost() != null) {
             mQSPanel.getHost().destroy();
         }
         Dependency.get(ActivityStarterDelegate.class).setActivityStarterImpl(null);
         mDeviceProvisionedController.removeCallback(mUserSetupObserver);
+        Dependency.get(ConfigurationController.class).removeCallback(mDensityChangeListener);
     }
 
     private boolean mDemoModeAllowed;
@@ -4011,7 +3948,7 @@
             mBatteryController.dispatchDemoCommand(command, args);
         }
         if (modeChange || command.equals(COMMAND_STATUS)) {
-            mIconController.dispatchDemoCommand(command, args);
+            ((StatusBarIconControllerImpl) mIconController).dispatchDemoCommand(command, args);
         }
         if (mNetworkController != null && (modeChange || command.equals(COMMAND_NETWORK))) {
             mNetworkController.dispatchDemoCommand(command, args);
@@ -4154,14 +4091,8 @@
                                 onLaunchTransitionFadingEnded();
                             }
                         });
-                mIconController.getTransitionsController().appTransitionStarting(
-                        SystemClock.uptimeMillis(),
-                        LightBarTransitionsController.DEFAULT_TINT_ANIMATION_DURATION);
-                if (mNavigationBar != null) {
-                    mNavigationBar.doAppTransitionStarting(
-                            SystemClock.uptimeMillis(),
-                            LightBarTransitionsController.DEFAULT_TINT_ANIMATION_DURATION);
-                }
+                mCommandQueue.appTransitionStarting(SystemClock.uptimeMillis(),
+                        LightBarTransitionsController.DEFAULT_TINT_ANIMATION_DURATION, true);
             }
         };
         if (mNotificationPanel.isLaunchTransitionRunning()) {
@@ -4286,11 +4217,8 @@
         // Treat Keyguard exit animation as an app transition to achieve nice transition for status
         // bar.
         mKeyguardGoingAway = true;
-        mIconController.getTransitionsController().appTransitionPending();
-        if (mNavigationBar != null) {
-            mNavigationBar.setKeyguardGoingAway(true);
-            mNavigationBar.appTransitionPending();
-        }
+        mKeyguardMonitor.notifyKeyguardGoingAway(true);
+        mCommandQueue.appTransitionPending(true);
     }
 
     /**
@@ -4305,16 +4233,14 @@
         mKeyguardFadingAwayDelay = delay;
         mKeyguardFadingAwayDuration = fadeoutDuration;
         mWaitingForKeyguardExit = false;
-        mIconController.getTransitionsController().appTransitionStarting(
-                startTime + fadeoutDuration
+        mCommandQueue.appTransitionStarting(startTime + fadeoutDuration
                         - LightBarTransitionsController.DEFAULT_TINT_ANIMATION_DURATION,
-                LightBarTransitionsController.DEFAULT_TINT_ANIMATION_DURATION);
+                LightBarTransitionsController.DEFAULT_TINT_ANIMATION_DURATION, true);
         recomputeDisableFlags(fadeoutDuration > 0 /* animate */);
-        if (mNavigationBar != null) {
-            mNavigationBar.doAppTransitionStarting(
+        mCommandQueue.appTransitionStarting(
                     startTime - LightBarTransitionsController.DEFAULT_TINT_ANIMATION_DURATION,
-                    LightBarTransitionsController.DEFAULT_TINT_ANIMATION_DURATION);
-        }
+                    LightBarTransitionsController.DEFAULT_TINT_ANIMATION_DURATION, true);
+        mKeyguardMonitor.notifyKeyguardFadingAway(delay, fadeoutDuration);
     }
 
     public boolean isKeyguardFadingAway() {
@@ -4327,9 +4253,7 @@
     public void finishKeyguardFadingAway() {
         mKeyguardFadingAway = false;
         mKeyguardGoingAway = false;
-        if (mNavigationBar != null) {
-            mNavigationBar.setKeyguardGoingAway(false);
-        }
+        mKeyguardMonitor.notifyKeyguardDoneFading();
     }
 
     public void stopWaitingForKeyguardExit() {
@@ -4379,7 +4303,6 @@
         } else {
             mScrimController.setKeyguardShowing(false);
         }
-        mIconPolicy.notifyKeyguardShowingChanged();
         mNotificationPanel.setBarState(mState, mKeyguardFadingAway, goingToFullShade);
         updateDozingState();
         updatePublicMode();
@@ -4399,6 +4322,7 @@
         mNotificationPanel.setDozing(mDozing, animate);
         mStackScroller.setDark(mDozing, animate, mWakeUpTouchLocation);
         mScrimController.setDozing(mDozing);
+        mKeyguardIndicationController.setDozing(mDozing);
 
         // Immediately abort the dozing from the doze scrim controller in case of wake-and-unlock
         // for pulsing so the Keyguard fade-out animation scrim can take over.
@@ -4508,8 +4432,8 @@
 
     @Override
     public void onActivated(ActivatableNotificationView view) {
-        EventLogTags.writeSysuiLockscreenGesture(
-                EventLogConstants.SYSUI_LOCKSCREEN_GESTURE_TAP_NOTIFICATION_ACTIVATE,
+        mLockscreenGestureLogger.write(
+                MetricsEvent.ACTION_LS_NOTE,
                 0 /* lengthDp - N/A */, 0 /* velocityDp - N/A */);
         mKeyguardIndicationController.showTransientIndication(R.string.notification_tap_again);
         ActivatableNotificationView previousView = mStackScroller.getActivatedChild();
@@ -4626,8 +4550,8 @@
     @Override
     public boolean onDraggedDown(View startingChild, int dragLengthY) {
         if (hasActiveNotifications() && (!isDozing() || isPulsing())) {
-            EventLogTags.writeSysuiLockscreenGesture(
-                    EventLogConstants.SYSUI_LOCKSCREEN_GESTURE_SWIPE_DOWN_FULL_SHADE,
+            mLockscreenGestureLogger.write(
+                    MetricsEvent.ACTION_LS_SHADE,
                     (int) (dragLengthY / mDisplayMetrics.density),
                     0 /* velocityDp - N/A */);
 
@@ -4967,33 +4891,11 @@
     }
 
     @Override
-    public void appTransitionPending() {
-        // Use own timings when Keyguard is going away, see keyguardGoingAway and
-        // setKeyguardFadingAway
-        if (!mKeyguardFadingAway) {
-            mIconController.getTransitionsController().appTransitionPending();
-        }
-    }
-
-    @Override
     public void appTransitionCancelled() {
-        mIconController.getTransitionsController().appTransitionCancelled();
         EventBus.getDefault().send(new AppTransitionFinishedEvent());
     }
 
     @Override
-    public void appTransitionStarting(long startTime, long duration) {
-        // Use own timings when Keyguard is going away, see keyguardGoingAway and
-        // setKeyguardFadingAway.
-        if (!mKeyguardGoingAway) {
-            mIconController.getTransitionsController().appTransitionStarting(startTime, duration);
-        }
-        if (mIconPolicy != null) {
-            mIconPolicy.appTransitionStarting(startTime, duration);
-        }
-    }
-
-    @Override
     public void appTransitionFinished() {
         EventBus.getDefault().send(new AppTransitionFinishedEvent());
     }
@@ -5060,44 +4962,9 @@
         return mStatusBarKeyguardViewManager.isShowing();
     }
 
-    private final class ShadeUpdates {
-        private final ArraySet<String> mVisibleNotifications = new ArraySet<String>();
-        private final ArraySet<String> mNewVisibleNotifications = new ArraySet<String>();
-
-        public void check() {
-            mNewVisibleNotifications.clear();
-            ArrayList<Entry> activeNotifications = mNotificationData.getActiveNotifications();
-            for (int i = 0; i < activeNotifications.size(); i++) {
-                final Entry entry = activeNotifications.get(i);
-                final boolean visible = entry.row != null
-                        && entry.row.getVisibility() == View.VISIBLE;
-                if (visible) {
-                    mNewVisibleNotifications.add(entry.key + entry.notification.getPostTime());
-                }
-            }
-            final boolean updates = !mVisibleNotifications.containsAll(mNewVisibleNotifications);
-            mVisibleNotifications.clear();
-            mVisibleNotifications.addAll(mNewVisibleNotifications);
-
-            // We have new notifications
-            if (updates && mDozeServiceHost != null) {
-                mDozeServiceHost.fireNewNotifications();
-            }
-        }
-    }
-
     private final class DozeServiceHost implements DozeHost {
-        // Amount of time to allow to update the time shown on the screen before releasing
-        // the wakelock.  This timeout is design to compensate for the fact that we don't
-        // currently have a way to know when time display contents have actually been
-        // refreshed once we've finished rendering a new frame.
-        private static final long PROCESSING_TIME = 500;
-
         private final ArrayList<Callback> mCallbacks = new ArrayList<Callback>();
 
-        // Keeps the last reported state by fireNotificationLight.
-        private boolean mNotificationLightOn;
-
         @Override
         public String toString() {
             return "PSB.DozeServiceHost[mCallbacks=" + mCallbacks.size() + "]";
@@ -5115,19 +4982,6 @@
             }
         }
 
-        public void fireNotificationLight(boolean on) {
-            mNotificationLightOn = on;
-            for (Callback callback : mCallbacks) {
-                callback.onNotificationLight(on);
-            }
-        }
-
-        public void fireNewNotifications() {
-            for (Callback callback : mCallbacks) {
-                callback.onNewNotifications();
-            }
-        }
-
         @Override
         public void addCallback(@NonNull Callback callback) {
             mCallbacks.add(callback);
@@ -5154,8 +5008,12 @@
                 @Override
                 public void onPulseStarted() {
                     callback.onPulseStarted();
-                    mStackScroller.setPulsing(true);
-                    mVisualStabilityManager.setPulsing(true);
+                    if (!mHeadsUpManager.getAllEntries().isEmpty()) {
+                        // Only pulse the stack scroller if there's actually something to show.
+                        // Otherwise just show the always-on screen.
+                        mStackScroller.setPulsing(true);
+                        mVisualStabilityManager.setPulsing(true);
+                    }
                 }
 
                 @Override
@@ -5193,11 +5051,6 @@
         }
 
         @Override
-        public boolean isNotificationLightOn() {
-            return mNotificationLightOn;
-        }
-
-        @Override
         public void startPendingIntentDismissingKeyguard(PendingIntent intent) {
             StatusBar.this.startPendingIntentDismissingKeyguard(intent);
         }
@@ -5255,7 +5108,6 @@
     private boolean mVisibleToUser;
 
     private Locale mLocale;
-    private float mFontScale;
 
     protected boolean mUseHeadsUp = false;
     protected boolean mHeadsUpTicker = false;
@@ -5272,7 +5124,6 @@
     private final SparseBooleanArray mUsersAllowingNotifications = new SparseBooleanArray();
 
     private UserManager mUserManager;
-    private int mDensity;
 
     protected KeyguardManager mKeyguardManager;
     private LockPatternUtils mLockPatternUtils;
@@ -5779,20 +5630,21 @@
                     PendingIntent.FLAG_CANCEL_CURRENT);
 
             final int colorRes = com.android.internal.R.color.system_notification_accent_color;
-            Notification.Builder note = new Notification.Builder(mContext)
-                    .setSmallIcon(R.drawable.ic_android)
-                    .setContentTitle(mContext.getString(R.string.hidden_notifications_title))
-                    .setContentText(mContext.getString(R.string.hidden_notifications_text))
-                    .setChannel(NotificationChannels.SECURITY)
-                    .setOngoing(true)
-                    .setColor(mContext.getColor(colorRes))
-                    .setContentIntent(setupIntent)
-                    .addAction(R.drawable.ic_close,
-                            mContext.getString(R.string.hidden_notifications_cancel),
-                            cancelIntent)
-                    .addAction(R.drawable.ic_settings,
-                            mContext.getString(R.string.hidden_notifications_setup),
-                            setupIntent);
+            Notification.Builder note =
+                    new Notification.Builder(mContext, NotificationChannels.GENERAL)
+                            .setSmallIcon(R.drawable.ic_android)
+                            .setContentTitle(mContext.getString(
+                                    R.string.hidden_notifications_title))
+                            .setContentText(mContext.getString(R.string.hidden_notifications_text))
+                            .setOngoing(true)
+                            .setColor(mContext.getColor(colorRes))
+                            .setContentIntent(setupIntent)
+                            .addAction(R.drawable.ic_close,
+                                    mContext.getString(R.string.hidden_notifications_cancel),
+                                    cancelIntent)
+                            .addAction(R.drawable.ic_settings,
+                                    mContext.getString(R.string.hidden_notifications_setup),
+                                    setupIntent);
             overrideNotificationAppName(mContext, note);
 
             NotificationManager noMan =
@@ -5863,10 +5715,12 @@
     }
 
     // The (i) button in the guts that links to the system notification settings for that app
-    private void startAppNotificationSettingsActivity(String packageName, final int appUid) {
+    private void startAppNotificationSettingsActivity(String packageName, final int appUid,
+            final String channelId) {
         final Intent intent = new Intent(Settings.ACTION_APP_NOTIFICATION_SETTINGS);
         intent.putExtra(Settings.EXTRA_APP_PACKAGE, packageName);
         intent.putExtra(Settings.EXTRA_APP_UID, appUid);
+        intent.putExtra(EXTRA_FRAGMENT_ARG_KEY, channelId);
         startNotificationGutsIntent(intent, appUid);
     }
 
@@ -5906,7 +5760,7 @@
         row.setTag(sbn.getPackageName());
         final NotificationGuts guts = row.getGuts();
         guts.setClosedListener((NotificationGuts g) -> {
-            if (!row.isRemoved()) {
+            if (!g.willBeRemoved() && !row.isRemoved()) {
                 mStackScroller.onHeightChanged(row, !isPanelFullyCollapsed() /* needsAnimation */);
             }
             mNotificationGutsExposed = null;
@@ -5931,7 +5785,7 @@
                     int appUid) -> {
                 MetricsLogger.action(mContext, MetricsEvent.ACTION_NOTE_INFO);
                 guts.resetFalsingCheck();
-                startAppNotificationSettingsActivity(pkg, appUid);
+                startAppNotificationSettingsActivity(pkg, appUid, channel.getId());
             };
             final View.OnClickListener onDoneClick = (View v) -> {
                 // If the user has security enabled, show challenge if the setting is changed.
@@ -5960,7 +5814,6 @@
     private void saveAndCloseNotificationMenu(NotificationInfo info,
             ExpandableNotificationRow row, NotificationGuts guts, View done) {
         guts.resetFalsingCheck();
-        info.saveImportance();
         int[] rowLocation = new int[2];
         int[] doneLocation = new int[2];
         row.getLocationOnScreen(rowLocation);
@@ -6072,26 +5925,6 @@
     }
 
     @Override
-    public void showRecentApps(boolean triggeredFromAltTab, boolean fromHome) {
-        int msg = MSG_SHOW_RECENT_APPS;
-        mHandler.removeMessages(msg);
-        mHandler.obtainMessage(msg, triggeredFromAltTab ? 1 : 0, fromHome ? 1 : 0).sendToTarget();
-    }
-
-    @Override
-    public void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey) {
-        int msg = MSG_HIDE_RECENT_APPS;
-        mHandler.removeMessages(msg);
-        mHandler.obtainMessage(msg, triggeredFromAltTab ? 1 : 0,
-                triggeredFromHomeKey ? 1 : 0).sendToTarget();
-    }
-
-    @Override
-    public void toggleRecentApps() {
-        toggleRecents();
-    }
-
-    @Override
     public void toggleSplitScreen() {
         toggleSplitScreenMode(-1 /* metricsDockAction */, -1 /* metricsUndockAction */);
     }
@@ -6124,20 +5957,6 @@
         mHandler.obtainMessage(msg, deviceId, 0).sendToTarget();
     }
 
-    /** Jumps to the next affiliated task in the group. */
-    public void showNextAffiliatedTask() {
-        int msg = MSG_SHOW_NEXT_AFFILIATED_TASK;
-        mHandler.removeMessages(msg);
-        mHandler.sendEmptyMessage(msg);
-    }
-
-    /** Jumps to the previous affiliated task in the group. */
-    public void showPreviousAffiliatedTask() {
-        int msg = MSG_SHOW_PREV_AFFILIATED_TASK;
-        mHandler.removeMessages(msg);
-        mHandler.sendEmptyMessage(msg);
-    }
-
     protected void sendCloseSystemWindows(String reason) {
         try {
             ActivityManager.getService().closeSystemDialogs(reason);
@@ -6145,33 +5964,6 @@
         }
     }
 
-    /** Proxy for RecentsComponent */
-
-    protected void showRecents(boolean triggeredFromAltTab, boolean fromHome) {
-        if (mRecents != null) {
-            sendCloseSystemWindows(SYSTEM_DIALOG_REASON_RECENT_APPS);
-            mRecents.showRecents(triggeredFromAltTab, fromHome);
-        }
-    }
-
-    protected void hideRecents(boolean triggeredFromAltTab, boolean triggeredFromHomeKey) {
-        if (mRecents != null) {
-            mRecents.hideRecents(triggeredFromAltTab, triggeredFromHomeKey);
-        }
-    }
-
-    protected void toggleRecents() {
-        if (mRecents != null) {
-            mRecents.toggleRecents(mDisplay);
-        }
-    }
-
-    protected void preloadRecents() {
-        if (mRecents != null) {
-            mRecents.preloadRecents();
-        }
-    }
-
     protected void toggleKeyboardShortcuts(int deviceId) {
         KeyboardShortcuts.toggle(mContext, deviceId);
     }
@@ -6180,24 +5972,6 @@
         KeyboardShortcuts.dismiss();
     }
 
-    protected void cancelPreloadingRecents() {
-        if (mRecents != null) {
-            mRecents.cancelPreloadingRecents();
-        }
-    }
-
-    protected void showRecentsNextAffiliatedTask() {
-        if (mRecents != null) {
-            mRecents.showNextAffiliatedTask();
-        }
-    }
-
-    protected void showRecentsPreviousAffiliatedTask() {
-        if (mRecents != null) {
-            mRecents.showPrevAffiliatedTask();
-        }
-    }
-
     /**
      * Save the current "public" (locked and secure) state of the lockscreen.
      */
@@ -6321,8 +6095,12 @@
 
         final StatusBarNotification sbn = entry.notification;
         boolean isLowPriority = mNotificationData.isAmbient(sbn.getKey());
+        boolean useIncreasedCollapsedHeight = mMessagingUtil.isImportantMessaging(sbn,
+                mNotificationData.getImportance(sbn.getKey()));
+        boolean useIncreasedHeadsUp = useIncreasedCollapsedHeight && mPanelExpanded;
         try {
-            entry.cacheContentViews(mContext, null, isLowPriority);
+            entry.cacheContentViews(mContext, null, isLowPriority, useIncreasedCollapsedHeight,
+                    useIncreasedHeadsUp);
         } catch (RuntimeException e) {
             Log.e(TAG, "Unable to get notification remote views", e);
             return false;
@@ -6492,6 +6270,8 @@
             row.setUserExpanded(userExpanded);
         }
         row.setUserLocked(userLocked);
+        row.setUseIncreasedCollapsedHeight(useIncreasedCollapsedHeight);
+        row.setUseIncreasedHeadsUpHeight(useIncreasedHeadsUp);
         row.onNotificationUpdated(entry);
         return true;
     }
@@ -6827,6 +6607,7 @@
             return null;
         }
         updateNotifications();
+        Dependency.get(LeakDetector.class).trackGarbage(entry);
         return entry.notification;
     }
 
@@ -6835,6 +6616,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) {
@@ -6981,10 +6763,16 @@
         Notification n = notification.getNotification();
         mNotificationData.updateRanking(ranking);
 
+        boolean useIncreasedCollapsedHeight = mMessagingUtil.isImportantMessaging(notification,
+                mNotificationData.getImportance(notification.getKey()));
+        entry.row.setUseIncreasedCollapsedHeight(useIncreasedCollapsedHeight);
+        boolean useIncreasedHeadsUp = useIncreasedCollapsedHeight && mPanelExpanded;
+        entry.row.setUseIncreasedHeadsUpHeight(useIncreasedHeadsUp);
         boolean applyInPlace;
         try {
             applyInPlace = entry.cacheContentViews(mContext, notification.getNotification(),
-                    mNotificationData.isAmbient(key));
+                    mNotificationData.isAmbient(key), useIncreasedCollapsedHeight,
+                    useIncreasedHeadsUp);
         } catch (RuntimeException e) {
             Log.e(TAG, "Unable to get notification remote views", e);
             applyInPlace = false;
@@ -7150,7 +6938,10 @@
             return false;
         }
 
-        if (mNotificationData.getImportance(sbn.getKey()) < NotificationManager.IMPORTANCE_HIGH) {
+        // Allow peeking for DEFAULT notifications only if we're on Ambient Display.
+        int importanceLevel = isDozing() ? NotificationManager.IMPORTANCE_DEFAULT
+                : NotificationManager.IMPORTANCE_HIGH;
+        if (mNotificationData.getImportance(sbn.getKey()) < importanceLevel) {
             if (DEBUG) Log.d(TAG, "No peeking: unimportant notification: " + sbn.getKey());
             return false;
         }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java
index 46ca3c6..c339da7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java
@@ -1,501 +1,48 @@
 /*
- * Copyright (C) 2015 The Android Open Source Project
+ * 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
+ * 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
+ * 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.statusbar.phone;
 
-import android.animation.ArgbEvaluator;
 import android.content.Context;
-import android.content.res.ColorStateList;
-import android.content.res.Resources;
-import android.graphics.Color;
-import android.graphics.Rect;
-import android.graphics.drawable.Icon;
-import android.os.Bundle;
-import android.os.UserHandle;
 import android.text.TextUtils;
 import android.util.ArraySet;
-import android.util.TypedValue;
 import android.view.Gravity;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
-import android.widget.TextView;
+
 import com.android.internal.statusbar.StatusBarIcon;
-import com.android.systemui.BatteryMeterView;
-import com.android.systemui.FontSizeUtils;
-import com.android.systemui.Interpolators;
+import com.android.systemui.Dependency;
 import com.android.systemui.R;
-import com.android.systemui.SystemUIFactory;
-import com.android.systemui.statusbar.NotificationData;
-import com.android.systemui.statusbar.NotificationShelf;
-import com.android.systemui.statusbar.SignalClusterView;
 import com.android.systemui.statusbar.StatusBarIconView;
-import com.android.systemui.tuner.TunerService;
-import com.android.systemui.tuner.TunerService.Tunable;
+import com.android.systemui.statusbar.policy.DarkIconDispatcher;
 
-import java.io.PrintWriter;
-import java.util.ArrayList;
+public interface StatusBarIconController {
 
-/**
- * Controls everything regarding the icons in the status bar and on Keyguard, including, but not
- * limited to: notification icons, signal cluster, additional status icons, and clock in the status
- * bar.
- */
-public class StatusBarIconController extends StatusBarIconList implements Tunable {
+    public void addIconGroup(IconManager iconManager);
+    public void removeIconGroup(IconManager iconManager);
+    public void setExternalIcon(String slot);
+    public void setIcon(String slot, int resourceId, CharSequence contentDescription);
+    public void setIcon(String slot, StatusBarIcon icon);
+    public void setIconVisibility(String slotTty, boolean b);
+    public void removeIcon(String slot);
 
     public static final String ICON_BLACKLIST = "icon_blacklist";
-    public static final int DEFAULT_ICON_TINT = Color.WHITE;
-
-    private Context mContext;
-    private StatusBar mStatusBar;
-    private DemoStatusIcons mDemoStatusIcons;
-
-    private LinearLayout mSystemIconArea;
-    private LinearLayout mStatusIcons;
-    private SignalClusterView mSignalCluster;
-    private LinearLayout mStatusIconsKeyguard;
-
-    private NotificationIconAreaController mNotificationIconAreaController;
-    private View mNotificationIconAreaInner;
-    private NotificationShelf mNotificationShelf;
-
-    private BatteryMeterView mBatteryMeterView;
-    private BatteryMeterView mBatteryMeterViewKeyguard;
-    private TextView mClock;
-
-    private int mIconSize;
-    private int mIconHPadding;
-
-    private int mIconTint = DEFAULT_ICON_TINT;
-    private float mDarkIntensity;
-    private final Rect mTintArea = new Rect();
-    private static final Rect sTmpRect = new Rect();
-    private static final int[] sTmpInt2 = new int[2];
-
-    private int mDarkModeIconColorSingleTone;
-    private int mLightModeIconColorSingleTone;
-
-    private final LightBarTransitionsController mTransitionsController;
-
-    private boolean mClockVisibleByPolicy = true;
-    private boolean mClockVisibleByUser = true;
-
-    private final ArraySet<String> mIconBlacklist = new ArraySet<>();
-
-    public StatusBarIconController(Context context, View statusBar, View keyguardStatusBar,
-            StatusBar phoneStatusBar) {
-        super(context.getResources().getStringArray(
-                com.android.internal.R.array.config_statusBarIcons));
-        mContext = context;
-        mStatusBar = phoneStatusBar;
-        mSystemIconArea = (LinearLayout) statusBar.findViewById(R.id.system_icon_area);
-        mStatusIcons = (LinearLayout) statusBar.findViewById(R.id.statusIcons);
-        mSignalCluster = (SignalClusterView) statusBar.findViewById(R.id.signal_cluster);
-
-        mNotificationShelf = phoneStatusBar.getNotificationShelf();
-        mNotificationIconAreaController = SystemUIFactory.getInstance()
-                .createNotificationIconAreaController(context, phoneStatusBar);
-        mNotificationIconAreaInner =
-                mNotificationIconAreaController.getNotificationInnerAreaView();
-
-        ViewGroup notificationIconArea =
-                (ViewGroup) statusBar.findViewById(R.id.notification_icon_area);
-        notificationIconArea.addView(mNotificationIconAreaInner);
-
-        mStatusIconsKeyguard = (LinearLayout) keyguardStatusBar.findViewById(R.id.statusIcons);
-
-        mBatteryMeterView = (BatteryMeterView) statusBar.findViewById(R.id.battery);
-        mBatteryMeterViewKeyguard = (BatteryMeterView) keyguardStatusBar.findViewById(R.id.battery);
-        scaleBatteryMeterViews(context);
-
-        mClock = (TextView) statusBar.findViewById(R.id.clock);
-        mDarkModeIconColorSingleTone = context.getColor(R.color.dark_mode_icon_color_single_tone);
-        mLightModeIconColorSingleTone = context.getColor(R.color.light_mode_icon_color_single_tone);
-        loadDimens();
-
-        TunerService.get(mContext).addTunable(this, ICON_BLACKLIST);
-
-        mTransitionsController = new LightBarTransitionsController(this::setIconTintInternal);
-    }
-
-    public void setSignalCluster(SignalClusterView signalCluster) {
-        mSignalCluster = signalCluster;
-    }
-
-    public LightBarTransitionsController getTransitionsController() {
-        return mTransitionsController;
-    }
-
-    /**
-     * Looks up the scale factor for status bar icons and scales the battery view by that amount.
-     */
-    private void scaleBatteryMeterViews(Context context) {
-        Resources res = context.getResources();
-        TypedValue typedValue = new TypedValue();
-
-        res.getValue(R.dimen.status_bar_icon_scale_factor, typedValue, true);
-        float iconScaleFactor = typedValue.getFloat();
-
-        int batteryHeight = res.getDimensionPixelSize(R.dimen.status_bar_battery_icon_height);
-        int batteryWidth = res.getDimensionPixelSize(R.dimen.status_bar_battery_icon_width);
-        int marginBottom = res.getDimensionPixelSize(R.dimen.battery_margin_bottom);
-
-        LinearLayout.LayoutParams scaledLayoutParams = new LinearLayout.LayoutParams(
-                (int) (batteryWidth * iconScaleFactor), (int) (batteryHeight * iconScaleFactor));
-        scaledLayoutParams.setMarginsRelative(0, 0, 0, marginBottom);
-
-        mBatteryMeterView.setLayoutParams(scaledLayoutParams);
-        mBatteryMeterViewKeyguard.setLayoutParams(scaledLayoutParams);
-    }
-
-    @Override
-    public void onTuningChanged(String key, String newValue) {
-        if (!ICON_BLACKLIST.equals(key)) {
-            return;
-        }
-        mIconBlacklist.clear();
-        mIconBlacklist.addAll(getIconBlacklist(newValue));
-        ArrayList<StatusBarIconView> views = new ArrayList<StatusBarIconView>();
-        // Get all the current views.
-        for (int i = 0; i < mStatusIcons.getChildCount(); i++) {
-            views.add((StatusBarIconView) mStatusIcons.getChildAt(i));
-        }
-        // Remove all the icons.
-        for (int i = views.size() - 1; i >= 0; i--) {
-            removeIcon(views.get(i).getSlot());
-        }
-        // Add them all back
-        for (int i = 0; i < views.size(); i++) {
-            setIcon(views.get(i).getSlot(), views.get(i).getStatusBarIcon());
-        }
-
-        setClockVisibleByUser(!StatusBarIconController.getIconBlacklist(newValue)
-                .contains("clock"));
-        updateClockVisibility();
-    }
-    private void loadDimens() {
-        mIconSize = mContext.getResources().getDimensionPixelSize(
-                com.android.internal.R.dimen.status_bar_icon_size);
-        mIconHPadding = mContext.getResources().getDimensionPixelSize(
-                R.dimen.status_bar_icon_padding);
-    }
-
-    private void addSystemIcon(int index, StatusBarIcon icon) {
-        String slot = getSlot(index);
-        int viewIndex = getViewIndex(index);
-        boolean blocked = mIconBlacklist.contains(slot);
-        StatusBarIconView view = new StatusBarIconView(mContext, slot, null, blocked);
-        view.set(icon);
-
-        LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
-                ViewGroup.LayoutParams.WRAP_CONTENT, mIconSize);
-        lp.setMargins(mIconHPadding, 0, mIconHPadding, 0);
-        mStatusIcons.addView(view, viewIndex, lp);
-
-        view = new StatusBarIconView(mContext, slot, null, blocked);
-        view.set(icon);
-        mStatusIconsKeyguard.addView(view, viewIndex, new LinearLayout.LayoutParams(
-                ViewGroup.LayoutParams.WRAP_CONTENT, mIconSize));
-        applyIconTint();
-    }
-
-    public void setIcon(String slot, int resourceId, CharSequence contentDescription) {
-        int index = getSlotIndex(slot);
-        StatusBarIcon icon = getIcon(index);
-        if (icon == null) {
-            icon = new StatusBarIcon(UserHandle.SYSTEM, mContext.getPackageName(),
-                    Icon.createWithResource(mContext, resourceId), 0, 0, contentDescription);
-            setIcon(slot, icon);
-        } else {
-            icon.icon = Icon.createWithResource(mContext, resourceId);
-            icon.contentDescription = contentDescription;
-            handleSet(index, icon);
-        }
-    }
-
-    public void setExternalIcon(String slot) {
-        int viewIndex = getViewIndex(getSlotIndex(slot));
-        int height = mContext.getResources().getDimensionPixelSize(
-                R.dimen.status_bar_icon_drawing_size);
-        ImageView imageView = (ImageView) mStatusIcons.getChildAt(viewIndex);
-        imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
-        imageView.setAdjustViewBounds(true);
-        setHeightAndCenter(imageView, height);
-        imageView = (ImageView) mStatusIconsKeyguard.getChildAt(viewIndex);
-        imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
-        imageView.setAdjustViewBounds(true);
-        setHeightAndCenter(imageView, height);
-    }
-
-    private void setHeightAndCenter(ImageView imageView, int height) {
-        ViewGroup.LayoutParams params = imageView.getLayoutParams();
-        params.height = height;
-        if (params instanceof LinearLayout.LayoutParams) {
-            ((LinearLayout.LayoutParams) params).gravity = Gravity.CENTER_VERTICAL;
-        }
-        imageView.setLayoutParams(params);
-    }
-
-    public void setIcon(String slot, StatusBarIcon icon) {
-        setIcon(getSlotIndex(slot), icon);
-    }
-
-    public void removeIcon(String slot) {
-        int index = getSlotIndex(slot);
-        removeIcon(index);
-    }
-
-    public void setIconVisibility(String slot, boolean visibility) {
-        int index = getSlotIndex(slot);
-        StatusBarIcon icon = getIcon(index);
-        if (icon == null || icon.visible == visibility) {
-            return;
-        }
-        icon.visible = visibility;
-        handleSet(index, icon);
-    }
-
-    @Override
-    public void removeIcon(int index) {
-        if (getIcon(index) == null) {
-            return;
-        }
-        super.removeIcon(index);
-        int viewIndex = getViewIndex(index);
-        mStatusIcons.removeViewAt(viewIndex);
-        mStatusIconsKeyguard.removeViewAt(viewIndex);
-    }
-
-    @Override
-    public void setIcon(int index, StatusBarIcon icon) {
-        if (icon == null) {
-            removeIcon(index);
-            return;
-        }
-        boolean isNew = getIcon(index) == null;
-        super.setIcon(index, icon);
-        if (isNew) {
-            addSystemIcon(index, icon);
-        } else {
-            handleSet(index, icon);
-        }
-    }
-
-    private void handleSet(int index, StatusBarIcon icon) {
-        int viewIndex = getViewIndex(index);
-        StatusBarIconView view = (StatusBarIconView) mStatusIcons.getChildAt(viewIndex);
-        view.set(icon);
-        view = (StatusBarIconView) mStatusIconsKeyguard.getChildAt(viewIndex);
-        view.set(icon);
-        applyIconTint();
-    }
-
-    public void updateNotificationIcons(NotificationData notificationData) {
-        mNotificationIconAreaController.updateNotificationIcons(notificationData);
-    }
-
-    public void hideSystemIconArea(boolean animate) {
-        animateHide(mSystemIconArea, animate);
-    }
-
-    public void showSystemIconArea(boolean animate) {
-        animateShow(mSystemIconArea, animate);
-    }
-
-    public void hideNotificationIconArea(boolean animate) {
-        animateHide(mNotificationIconAreaInner, animate);
-    }
-
-    public void showNotificationIconArea(boolean animate) {
-        animateShow(mNotificationIconAreaInner, animate);
-    }
-
-    public void setClockVisibleByUser(boolean visible) {
-        mClockVisibleByUser = visible;
-        updateClockVisibility();
-    }
-
-    public void setClockVisibilityByPolicy(boolean visible) {
-        mClockVisibleByPolicy = visible;
-        updateClockVisibility();
-    }
-
-    private void updateClockVisibility() {
-        int visibility = (mClockVisibleByPolicy && mClockVisibleByUser)
-                ? View.VISIBLE : View.GONE;
-        mClock.setVisibility(visibility);
-    }
-
-    public void dump(PrintWriter pw) {
-        int N = mStatusIcons.getChildCount();
-        pw.println("  icon views: " + N);
-        for (int i=0; i<N; i++) {
-            StatusBarIconView ic = (StatusBarIconView) mStatusIcons.getChildAt(i);
-            pw.println("    [" + i + "] icon=" + ic);
-        }
-        super.dump(pw);
-    }
-
-    public void dispatchDemoCommand(String command, Bundle args) {
-        if (mDemoStatusIcons == null) {
-            mDemoStatusIcons = new DemoStatusIcons(mStatusIcons, mIconSize);
-        }
-        mDemoStatusIcons.dispatchDemoCommand(command, args);
-    }
-
-    /**
-     * Hides a view.
-     */
-    private void animateHide(final View v, boolean animate) {
-        v.animate().cancel();
-        if (!animate) {
-            v.setAlpha(0f);
-            v.setVisibility(View.INVISIBLE);
-            return;
-        }
-        v.animate()
-                .alpha(0f)
-                .setDuration(160)
-                .setStartDelay(0)
-                .setInterpolator(Interpolators.ALPHA_OUT)
-                .withEndAction(new Runnable() {
-                    @Override
-                    public void run() {
-                        v.setVisibility(View.INVISIBLE);
-                    }
-                });
-    }
-
-    /**
-     * Shows a view, and synchronizes the animation with Keyguard exit animations, if applicable.
-     */
-    private void animateShow(View v, boolean animate) {
-        v.animate().cancel();
-        v.setVisibility(View.VISIBLE);
-        if (!animate) {
-            v.setAlpha(1f);
-            return;
-        }
-        v.animate()
-                .alpha(1f)
-                .setDuration(320)
-                .setInterpolator(Interpolators.ALPHA_IN)
-                .setStartDelay(50)
-
-                // We need to clean up any pending end action from animateHide if we call
-                // both hide and show in the same frame before the animation actually gets started.
-                // cancel() doesn't really remove the end action.
-                .withEndAction(null);
-
-        // Synchronize the motion with the Keyguard fading if necessary.
-        if (mStatusBar.isKeyguardFadingAway()) {
-            v.animate()
-                    .setDuration(mStatusBar.getKeyguardFadingAwayDuration())
-                    .setInterpolator(Interpolators.LINEAR_OUT_SLOW_IN)
-                    .setStartDelay(mStatusBar.getKeyguardFadingAwayDelay())
-                    .start();
-        }
-    }
-
-    /**
-     * Sets the dark area so {@link #setIconsDark} only affects the icons in the specified area.
-     *
-     * @param darkArea the area in which icons should change it's tint, in logical screen
-     *                 coordinates
-     */
-    public void setIconsDarkArea(Rect darkArea) {
-        if (darkArea == null && mTintArea.isEmpty()) {
-            return;
-        }
-        if (darkArea == null) {
-            mTintArea.setEmpty();
-        } else {
-            mTintArea.set(darkArea);
-        }
-        applyIconTint();
-        mNotificationIconAreaController.setTintArea(darkArea);
-    }
-
-    private void setIconTintInternal(float darkIntensity) {
-        mDarkIntensity = darkIntensity;
-        mIconTint = (int) ArgbEvaluator.getInstance().evaluate(darkIntensity,
-                mLightModeIconColorSingleTone, mDarkModeIconColorSingleTone);
-        mNotificationIconAreaController.setIconTint(mIconTint);
-        applyIconTint();
-    }
-
-    /**
-     * @return the tint to apply to {@param view} depending on the desired tint {@param color} and
-     *         the screen {@param tintArea} in which to apply that tint
-     */
-    public static int getTint(Rect tintArea, View view, int color) {
-        if (isInArea(tintArea, view)) {
-            return color;
-        } else {
-            return DEFAULT_ICON_TINT;
-        }
-    }
-
-    /**
-     * @return the dark intensity to apply to {@param view} depending on the desired dark
-     *         {@param intensity} and the screen {@param tintArea} in which to apply that intensity
-     */
-    public static float getDarkIntensity(Rect tintArea, View view, float intensity) {
-        if (isInArea(tintArea, view)) {
-            return intensity;
-        } else {
-            return 0f;
-        }
-    }
-
-    /**
-     * @return true if more than half of the {@param view} area are in {@param area}, false
-     *         otherwise
-     */
-    private static boolean isInArea(Rect area, View view) {
-        if (area.isEmpty()) {
-            return true;
-        }
-        sTmpRect.set(area);
-        view.getLocationOnScreen(sTmpInt2);
-        int left = sTmpInt2[0];
-
-        int intersectStart = Math.max(left, area.left);
-        int intersectEnd = Math.min(left + view.getWidth(), area.right);
-        int intersectAmount = Math.max(0, intersectEnd - intersectStart);
-
-        boolean coversFullStatusBar = area.top <= 0;
-        boolean majorityOfWidth = 2 * intersectAmount > view.getWidth();
-        return majorityOfWidth && coversFullStatusBar;
-    }
-
-    private void applyIconTint() {
-        for (int i = 0; i < mStatusIcons.getChildCount(); i++) {
-            StatusBarIconView v = (StatusBarIconView) mStatusIcons.getChildAt(i);
-            v.setImageTintList(ColorStateList.valueOf(getTint(mTintArea, v, mIconTint)));
-        }
-        mSignalCluster.setIconTint(mIconTint, mDarkIntensity, mTintArea);
-        mBatteryMeterView.setDarkIntensity(
-                isInArea(mTintArea, mBatteryMeterView) ? mDarkIntensity : 0);
-        mClock.setTextColor(getTint(mTintArea, mClock, mIconTint));
-    }
 
     public static ArraySet<String> getIconBlacklist(String blackListStr) {
-        ArraySet<String> ret = new ArraySet<String>();
+        ArraySet<String> ret = new ArraySet<>();
         if (blackListStr == null) {
             blackListStr = "rotate,headset";
         }
@@ -508,34 +55,110 @@
         return ret;
     }
 
-    public void onDensityOrFontScaleChanged() {
-        loadDimens();
-        mNotificationIconAreaController.onDensityOrFontScaleChanged(mContext);
-        updateClock();
-        for (int i = 0; i < mStatusIcons.getChildCount(); i++) {
-            View child = mStatusIcons.getChildAt(i);
+
+    /**
+     * Version of ViewGroup that observers state from the DarkIconDispatcher.
+     */
+    public static class DarkIconManager extends IconManager {
+        private final DarkIconDispatcher mDarkIconDispatcher;
+        private int mIconHPadding;
+
+        public DarkIconManager(LinearLayout linearLayout) {
+            super(linearLayout);
+            mIconHPadding = mContext.getResources().getDimensionPixelSize(
+                    R.dimen.status_bar_icon_padding);
+            mDarkIconDispatcher = Dependency.get(DarkIconDispatcher.class);
+        }
+
+        @Override
+        protected void onIconAdded(int index, String slot, boolean blocked, StatusBarIcon icon) {
+            StatusBarIconView view = new StatusBarIconView(mContext, slot, null, blocked);
             LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
                     ViewGroup.LayoutParams.WRAP_CONTENT, mIconSize);
             lp.setMargins(mIconHPadding, 0, mIconHPadding, 0);
-            child.setLayoutParams(lp);
+            mGroup.addView(view, index, lp);
+            mDarkIconDispatcher.addDarkReceiver(view);
         }
-        for (int i = 0; i < mStatusIconsKeyguard.getChildCount(); i++) {
-            View child = mStatusIconsKeyguard.getChildAt(i);
-            LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
-                    ViewGroup.LayoutParams.WRAP_CONTENT, mIconSize);
-            child.setLayoutParams(lp);
+
+        @Override
+        protected void destroy() {
+            for (int i = 0; i < mGroup.getChildCount(); i++) {
+                mDarkIconDispatcher.removeDarkReceiver((ImageView) mGroup.getChildAt(i));
+            }
+            mGroup.removeAllViews();
         }
-        scaleBatteryMeterViews(mContext);
+
+        @Override
+        protected void onRemoveIcon(int viewIndex) {
+            mDarkIconDispatcher.removeDarkReceiver((ImageView) mGroup.getChildAt(viewIndex));
+            super.onRemoveIcon(viewIndex);
+        }
+
+        @Override
+        public void onSetIcon(int viewIndex, StatusBarIcon icon) {
+            super.onSetIcon(viewIndex, icon);
+            mDarkIconDispatcher.applyDark((ImageView) mGroup.getChildAt(viewIndex));
+        }
     }
 
-    private void updateClock() {
-        FontSizeUtils.updateFontSize(mClock, R.dimen.status_bar_clock_size);
-        mClock.setPaddingRelative(
-                mContext.getResources().getDimensionPixelSize(
-                        R.dimen.status_bar_clock_starting_padding),
-                0,
-                mContext.getResources().getDimensionPixelSize(
-                        R.dimen.status_bar_clock_end_padding),
-                0);
+    /**
+     * Turns info from StatusBarIconController into ImageViews in a ViewGroup.
+     */
+    public static class IconManager {
+        protected final ViewGroup mGroup;
+        protected final Context mContext;
+        protected final int mIconSize;
+
+        public IconManager(ViewGroup group) {
+            mGroup = group;
+            mContext = group.getContext();
+            mIconSize = mContext.getResources().getDimensionPixelSize(
+                    com.android.internal.R.dimen.status_bar_icon_size);
+        }
+
+        protected void onIconAdded(int index, String slot, boolean blocked, StatusBarIcon icon) {
+            StatusBarIconView view = new StatusBarIconView(mContext, slot, null, blocked);
+            view.set(icon);
+            mGroup.addView(view, index, new LinearLayout.LayoutParams(
+                    ViewGroup.LayoutParams.WRAP_CONTENT, mIconSize));
+        }
+
+        protected void destroy() {
+            mGroup.removeAllViews();
+        }
+
+        protected void onIconExternal(int viewIndex, int height) {
+            ImageView imageView = (ImageView) mGroup.getChildAt(viewIndex);
+            imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
+            imageView.setAdjustViewBounds(true);
+            setHeightAndCenter(imageView, height);
+        }
+
+        protected void onDensityOrFontScaleChanged() {
+            for (int i = 0; i < mGroup.getChildCount(); i++) {
+                View child = mGroup.getChildAt(i);
+                LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
+                        ViewGroup.LayoutParams.WRAP_CONTENT, mIconSize);
+                child.setLayoutParams(lp);
+            }
+        }
+
+        private void setHeightAndCenter(ImageView imageView, int height) {
+            ViewGroup.LayoutParams params = imageView.getLayoutParams();
+            params.height = height;
+            if (params instanceof LinearLayout.LayoutParams) {
+                ((LinearLayout.LayoutParams) params).gravity = Gravity.CENTER_VERTICAL;
+            }
+            imageView.setLayoutParams(params);
+        }
+
+        protected void onRemoveIcon(int viewIndex) {
+            mGroup.removeViewAt(viewIndex);
+        }
+
+        public void onSetIcon(int viewIndex, StatusBarIcon icon) {
+            StatusBarIconView view = (StatusBarIconView) mGroup.getChildAt(viewIndex);
+            view.set(icon);
+        }
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconControllerImpl.java
new file mode 100644
index 0000000..70b92ad
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconControllerImpl.java
@@ -0,0 +1,230 @@
+/*
+ * 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.statusbar.phone;
+
+import android.content.Context;
+import android.graphics.drawable.Icon;
+import android.os.Bundle;
+import android.os.UserHandle;
+import android.text.TextUtils;
+import android.util.ArraySet;
+import android.view.Gravity;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+
+import com.android.internal.statusbar.StatusBarIcon;
+import com.android.systemui.Dependency;
+import com.android.systemui.Dumpable;
+import com.android.systemui.R;
+import com.android.systemui.SysUiServiceProvider;
+import com.android.systemui.statusbar.CommandQueue;
+import com.android.systemui.statusbar.StatusBarIconView;
+import com.android.systemui.statusbar.policy.ConfigurationController;
+import com.android.systemui.statusbar.policy.ConfigurationController.ConfigurationListener;
+import com.android.systemui.statusbar.policy.DarkIconDispatcher;
+import com.android.systemui.tuner.TunerService;
+import com.android.systemui.tuner.TunerService.Tunable;
+
+import java.io.FileDescriptor;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+
+/**
+ * Receives the callbacks from CommandQueue related to icons and tracks the state of
+ * all the icons. Dispatches this state to any IconManagers that are currently
+ * registered with it.
+ */
+public class StatusBarIconControllerImpl extends StatusBarIconList implements Tunable,
+        ConfigurationListener, Dumpable, CommandQueue.Callbacks, StatusBarIconController {
+
+    private final DarkIconDispatcher mDarkIconDispatcher;
+
+    private Context mContext;
+    private DemoStatusIcons mDemoStatusIcons;
+
+    private final ArrayList<IconManager> mIconGroups = new ArrayList<>();
+
+    private final ArraySet<String> mIconBlacklist = new ArraySet<>();
+
+    public StatusBarIconControllerImpl(Context context) {
+        super(context.getResources().getStringArray(
+                com.android.internal.R.array.config_statusBarIcons));
+        Dependency.get(ConfigurationController.class).addCallback(this);
+        mDarkIconDispatcher = Dependency.get(DarkIconDispatcher.class);
+        mContext = context;
+
+        loadDimens();
+
+        SysUiServiceProvider.getComponent(context, CommandQueue.class)
+                .addCallbacks(this);
+        Dependency.get(TunerService.class).addTunable(this, ICON_BLACKLIST);
+    }
+
+    @Override
+    public void addIconGroup(IconManager group) {
+        mIconGroups.add(group);
+        for (int i = 0; i < mIcons.size(); i++) {
+            StatusBarIcon icon = mIcons.get(i);
+            if (icon != null) {
+                String slot = mSlots.get(i);
+                boolean blocked = mIconBlacklist.contains(slot);
+                group.onIconAdded(getViewIndex(getSlotIndex(slot)), slot, blocked, icon);
+            }
+        }
+    }
+
+    @Override
+    public void removeIconGroup(IconManager group) {
+        group.destroy();
+        mIconGroups.remove(group);
+    }
+
+    @Override
+    public void onTuningChanged(String key, String newValue) {
+        if (!ICON_BLACKLIST.equals(key)) {
+            return;
+        }
+        mIconBlacklist.clear();
+        mIconBlacklist.addAll(StatusBarIconController.getIconBlacklist(newValue));
+        ArrayList<StatusBarIcon> current = new ArrayList<>(mIcons);
+        ArrayList<String> currentSlots = new ArrayList<>(mSlots);
+        // Remove all the icons.
+        for (int i = current.size() - 1; i >= 0; i--) {
+            removeIcon(currentSlots.get(i));
+        }
+        // Add them all back
+        for (int i = 0; i < current.size(); i++) {
+            setIcon(currentSlots.get(i), current.get(i));
+        }
+    }
+
+    private void loadDimens() {
+    }
+
+    private void addSystemIcon(int index, StatusBarIcon icon) {
+        String slot = getSlot(index);
+        int viewIndex = getViewIndex(index);
+        boolean blocked = mIconBlacklist.contains(slot);
+
+        mIconGroups.forEach(l -> l.onIconAdded(viewIndex, slot, blocked, icon));
+    }
+
+    @Override
+    public void setIcon(String slot, int resourceId, CharSequence contentDescription) {
+        int index = getSlotIndex(slot);
+        StatusBarIcon icon = getIcon(index);
+        if (icon == null) {
+            icon = new StatusBarIcon(UserHandle.SYSTEM, mContext.getPackageName(),
+                    Icon.createWithResource(mContext, resourceId), 0, 0, contentDescription);
+            setIcon(slot, icon);
+        } else {
+            icon.icon = Icon.createWithResource(mContext, resourceId);
+            icon.contentDescription = contentDescription;
+            handleSet(index, icon);
+        }
+    }
+
+    @Override
+    public void setExternalIcon(String slot) {
+        int viewIndex = getViewIndex(getSlotIndex(slot));
+        int height = mContext.getResources().getDimensionPixelSize(
+                R.dimen.status_bar_icon_drawing_size);
+        mIconGroups.forEach(l -> l.onIconExternal(viewIndex, height));
+    }
+
+    @Override
+    public void setIcon(String slot, StatusBarIcon icon) {
+        setIcon(getSlotIndex(slot), icon);
+    }
+
+    @Override
+    public void removeIcon(String slot) {
+        int index = getSlotIndex(slot);
+        removeIcon(index);
+    }
+
+    public void setIconVisibility(String slot, boolean visibility) {
+        int index = getSlotIndex(slot);
+        StatusBarIcon icon = getIcon(index);
+        if (icon == null || icon.visible == visibility) {
+            return;
+        }
+        icon.visible = visibility;
+        handleSet(index, icon);
+    }
+
+    @Override
+    public void removeIcon(int index) {
+        if (getIcon(index) == null) {
+            return;
+        }
+        super.removeIcon(index);
+        int viewIndex = getViewIndex(index);
+        mIconGroups.forEach(l -> l.onRemoveIcon(viewIndex));
+    }
+
+    @Override
+    public void setIcon(int index, StatusBarIcon icon) {
+        if (icon == null) {
+            removeIcon(index);
+            return;
+        }
+        boolean isNew = getIcon(index) == null;
+        super.setIcon(index, icon);
+        if (isNew) {
+            addSystemIcon(index, icon);
+        } else {
+            handleSet(index, icon);
+        }
+    }
+
+    private void handleSet(int index, StatusBarIcon icon) {
+        int viewIndex = getViewIndex(index);
+        mIconGroups.forEach(l -> l.onSetIcon(viewIndex, icon));
+    }
+
+    @Override
+    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
+        // TODO: Dump info about all icon groups?
+        ViewGroup statusIcons = mIconGroups.get(0).mGroup;
+        int N = statusIcons.getChildCount();
+        pw.println("  icon views: " + N);
+        for (int i = 0; i < N; i++) {
+            StatusBarIconView ic = (StatusBarIconView) statusIcons.getChildAt(i);
+            pw.println("    [" + i + "] icon=" + ic);
+        }
+        super.dump(pw);
+    }
+
+    public void dispatchDemoCommand(String command, Bundle args) {
+        if (mDemoStatusIcons == null) {
+            // TODO: Rework how we handle demo mode.
+            int iconSize = mContext.getResources().getDimensionPixelSize(
+                    com.android.internal.R.dimen.status_bar_icon_size);
+            mDemoStatusIcons = new DemoStatusIcons((LinearLayout) mIconGroups.get(0).mGroup,
+                    iconSize);
+        }
+        mDemoStatusIcons.dispatchDemoCommand(command, args);
+    }
+
+    @Override
+    public void onDensityOrFontScaleChanged() {
+        loadDimens();
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconList.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconList.java
index 660672d..f600908 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconList.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconList.java
@@ -22,8 +22,8 @@
 import java.util.ArrayList;
 
 public class StatusBarIconList {
-    private ArrayList<String> mSlots = new ArrayList<>();
-    private ArrayList<StatusBarIcon> mIcons = new ArrayList<>();
+    protected ArrayList<String> mSlots = new ArrayList<>();
+    protected ArrayList<StatusBarIcon> mIcons = new ArrayList<>();
 
     public StatusBarIconList(String[] slots) {
         final int N = slots.length;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
index 8d5d890..2a69c1e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
@@ -32,6 +32,7 @@
 import com.android.keyguard.ViewMediatorCallback;
 import com.android.systemui.DejankUtils;
 import com.android.keyguard.LatencyTracker;
+import com.android.systemui.Dependency;
 import com.android.systemui.SystemUIFactory;
 import com.android.systemui.keyguard.DismissCallbackRegistry;
 import com.android.systemui.statusbar.CommandQueue;
@@ -67,6 +68,7 @@
     private static String TAG = "StatusBarKeyguardViewManager";
 
     protected final Context mContext;
+    private final StatusBarWindowManager mStatusBarWindowManager;
 
     protected LockPatternUtils mLockPatternUtils;
     protected ViewMediatorCallback mViewMediatorCallback;
@@ -75,7 +77,6 @@
     private FingerprintUnlockController mFingerprintUnlockController;
 
     private ViewGroup mContainer;
-    private StatusBarWindowManager mStatusBarWindowManager;
 
     private boolean mDeviceInteractive = false;
     private boolean mScreenTurnedOn;
@@ -101,16 +102,16 @@
         mContext = context;
         mViewMediatorCallback = callback;
         mLockPatternUtils = lockPatternUtils;
+        mStatusBarWindowManager = Dependency.get(StatusBarWindowManager.class);
     }
 
     public void registerStatusBar(StatusBar statusBar,
-            ViewGroup container, StatusBarWindowManager statusBarWindowManager,
+            ViewGroup container,
             ScrimController scrimController,
             FingerprintUnlockController fingerprintUnlockController,
             DismissCallbackRegistry dismissCallbackRegistry) {
         mStatusBar = statusBar;
         mContainer = container;
-        mStatusBarWindowManager = statusBarWindowManager;
         mScrimController = scrimController;
         mFingerprintUnlockController = fingerprintUnlockController;
         mBouncer = SystemUIFactory.getInstance().createKeyguardBouncer(mContext,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java
index 16999b2..deb0070 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java
@@ -32,6 +32,7 @@
 import android.view.WindowManager;
 
 import com.android.keyguard.R;
+import com.android.systemui.Dumpable;
 import com.android.systemui.keyguard.KeyguardViewMediator;
 import com.android.systemui.statusbar.RemoteInputController;
 import com.android.systemui.statusbar.StatusBarState;
@@ -43,7 +44,7 @@
 /**
  * Encapsulates all logic for the status bar window state management.
  */
-public class StatusBarWindowManager implements RemoteInputController.Callback {
+public class StatusBarWindowManager implements RemoteInputController.Callback, Dumpable {
 
     private static final String TAG = "StatusBarWindowManager";
 
@@ -59,6 +60,7 @@
     private final boolean mKeyguardScreenRotation;
     private final float mScreenBrightnessDoze;
     private final State mCurrentState = new State();
+    private OtherwisedCollapsedListener mListener;
 
     public StatusBarWindowManager(Context context) {
         mContext = context;
@@ -154,6 +156,10 @@
 
     private void applyHeight(State state) {
         boolean expanded = isExpanded(state);
+        if (state.forcePluginOpen) {
+            mListener.setWouldOtherwiseCollapse(expanded);
+            expanded = true;
+        }
         if (expanded) {
             mLpChanged.height = ViewGroup.LayoutParams.MATCH_PARENT;
         } else {
@@ -356,6 +362,15 @@
         apply(mCurrentState);
     }
 
+    public void setForcePluginOpen(boolean forcePluginOpen) {
+        mCurrentState.forcePluginOpen = forcePluginOpen;
+        apply(mCurrentState);
+    }
+
+    public void setStateListener(OtherwisedCollapsedListener listener) {
+        mListener = listener;
+    }
+
     public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
         pw.println("StatusBarWindowManager state:");
         pw.println(mCurrentState);
@@ -388,6 +403,7 @@
         int statusBarState;
 
         boolean remoteInputActive;
+        boolean forcePluginOpen;
 
         private boolean isKeyguardShowingAndNotOccluded() {
             return keyguardShowing && !keyguardOccluded;
@@ -419,4 +435,13 @@
             return result.toString();
         }
     }
+
+    /**
+     * Custom listener to pipe data back to plugins about whether or not the status bar would be
+     * collapsed if not for the plugin.
+     * TODO: Find cleaner way to do this.
+     */
+    public interface OtherwisedCollapsedListener {
+        void setWouldOtherwiseCollapse(boolean otherwiseCollapse);
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
index 9cc9749..bb0748c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
@@ -19,11 +19,14 @@
 import libcore.icu.LocaleData;
 
 import android.app.ActivityManager;
+import android.app.StatusBarManager;
 import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
+import android.content.res.Configuration;
 import android.content.res.TypedArray;
+import android.graphics.Rect;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.SystemClock;
@@ -35,12 +38,18 @@
 import android.text.style.RelativeSizeSpan;
 import android.util.AttributeSet;
 import android.view.Display;
+import android.view.View;
 import android.widget.TextView;
 
 import com.android.systemui.DemoMode;
 import com.android.systemui.Dependency;
+import com.android.systemui.FontSizeUtils;
 import com.android.systemui.R;
+import com.android.systemui.SysUiServiceProvider;
+import com.android.systemui.statusbar.CommandQueue;
 import com.android.systemui.statusbar.phone.StatusBarIconController;
+import com.android.systemui.statusbar.policy.ConfigurationController.ConfigurationListener;
+import com.android.systemui.statusbar.policy.DarkIconDispatcher.DarkReceiver;
 import com.android.systemui.tuner.TunerService;
 import com.android.systemui.tuner.TunerService.Tunable;
 
@@ -52,10 +61,14 @@
 /**
  * Digital clock for the status bar.
  */
-public class Clock extends TextView implements DemoMode, Tunable {
+public class Clock extends TextView implements DemoMode, Tunable, CommandQueue.Callbacks,
+        DarkReceiver, ConfigurationListener {
 
     public static final String CLOCK_SECONDS = "clock_seconds";
 
+    private boolean mClockVisibleByPolicy = true;
+    private boolean mClockVisibleByUser = true;
+
     private boolean mAttached;
     private Calendar mCalendar;
     private String mClockFormatString;
@@ -108,8 +121,10 @@
 
             getContext().registerReceiverAsUser(mIntentReceiver, UserHandle.ALL, filter,
                     null, Dependency.get(Dependency.TIME_TICK_HANDLER));
-            TunerService.get(getContext()).addTunable(this, CLOCK_SECONDS,
+            Dependency.get(TunerService.class).addTunable(this, CLOCK_SECONDS,
                     StatusBarIconController.ICON_BLACKLIST);
+            SysUiServiceProvider.getComponent(getContext(), CommandQueue.class).addCallbacks(this);
+            Dependency.get(DarkIconDispatcher.class).addDarkReceiver(this);
         }
 
         // NOTE: It's safe to do these after registering the receiver since the receiver always runs
@@ -129,7 +144,10 @@
         if (mAttached) {
             getContext().unregisterReceiver(mIntentReceiver);
             mAttached = false;
-            TunerService.get(getContext()).removeTunable(this);
+            Dependency.get(TunerService.class).removeTunable(this);
+            SysUiServiceProvider.getComponent(getContext(), CommandQueue.class)
+                    .removeCallbacks(this);
+            Dependency.get(DarkIconDispatcher.class).removeDarkReceiver(this);
         }
     }
 
@@ -158,6 +176,22 @@
         }
     };
 
+    public void setClockVisibleByUser(boolean visible) {
+        mClockVisibleByUser = visible;
+        updateClockVisibility();
+    }
+
+    public void setClockVisibilityByPolicy(boolean visible) {
+        mClockVisibleByPolicy = visible;
+        updateClockVisibility();
+    }
+
+    private void updateClockVisibility() {
+        int visibility = (mClockVisibleByPolicy && mClockVisibleByUser)
+                ? View.VISIBLE : View.GONE;
+        setVisibility(visibility);
+    }
+
     final void updateClock() {
         if (mDemoMode) return;
         mCalendar.setTimeInMillis(System.currentTimeMillis());
@@ -170,9 +204,38 @@
         if (CLOCK_SECONDS.equals(key)) {
             mShowSeconds = newValue != null && Integer.parseInt(newValue) != 0;
             updateShowSeconds();
+        } else {
+            setClockVisibleByUser(!StatusBarIconController.getIconBlacklist(newValue)
+                    .contains("clock"));
+            updateClockVisibility();
         }
     }
 
+    @Override
+    public void disable(int state1, int state2, boolean animate) {
+        boolean clockVisibleByPolicy = (state1 & StatusBarManager.DISABLE_CLOCK) == 0;
+        if (clockVisibleByPolicy != mClockVisibleByPolicy) {
+            setClockVisibilityByPolicy(clockVisibleByPolicy);
+        }
+    }
+
+    @Override
+    public void onDarkChanged(Rect area, float darkIntensity, int tint) {
+        setTextColor(DarkIconDispatcher.getTint(area, this, tint));
+    }
+
+    @Override
+    public void onDensityOrFontScaleChanged() {
+        FontSizeUtils.updateFontSize(this, R.dimen.status_bar_clock_size);
+        setPaddingRelative(
+                mContext.getResources().getDimensionPixelSize(
+                        R.dimen.status_bar_clock_starting_padding),
+                0,
+                mContext.getResources().getDimensionPixelSize(
+                        R.dimen.status_bar_clock_end_padding),
+                0);
+    }
+
     private void updateShowSeconds() {
         if (mShowSeconds) {
             // Wait until we have a display to start trying to show seconds.
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ConfigurationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ConfigurationController.java
new file mode 100644
index 0000000..788fda8
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ConfigurationController.java
@@ -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.
+ */
+
+package com.android.systemui.statusbar.policy;
+
+import android.content.res.Configuration;
+
+import com.android.systemui.statusbar.policy.ConfigurationController.ConfigurationListener;
+
+/**
+ * Common listener for configuration or subsets of configuration changes (like density or
+ * font scaling), providing easy static dependence on these events.
+ */
+public interface ConfigurationController extends CallbackController<ConfigurationListener> {
+
+    interface ConfigurationListener {
+        default void onConfigChanged(Configuration newConfig) {}
+        default void onDensityOrFontScaleChanged() {}
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/DarkIconDispatcher.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/DarkIconDispatcher.java
new file mode 100644
index 0000000..58944c6
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/DarkIconDispatcher.java
@@ -0,0 +1,92 @@
+/*
+ * 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.statusbar.policy;
+
+import android.graphics.Color;
+import android.graphics.Rect;
+import android.view.View;
+import android.widget.ImageView;
+
+import com.android.systemui.statusbar.phone.LightBarTransitionsController;
+
+public interface DarkIconDispatcher {
+
+    void setIconsDarkArea(Rect r);
+    LightBarTransitionsController getTransitionsController();
+
+    void addDarkReceiver(DarkReceiver receiver);
+    void addDarkReceiver(ImageView imageView);
+
+    // Must have been previously been added through one of the addDarkReceive methods above.
+    void removeDarkReceiver(DarkReceiver object);
+    void removeDarkReceiver(ImageView object);
+
+    // Used to reapply darkness on an object, must have previously been added through
+    // addDarkReceiver.
+    void applyDark(ImageView object);
+
+    int DEFAULT_ICON_TINT = Color.WHITE;
+    Rect sTmpRect = new Rect();
+    int[] sTmpInt2 = new int[2];
+
+    /**
+     * @return the tint to apply to {@param view} depending on the desired tint {@param color} and
+     *         the screen {@param tintArea} in which to apply that tint
+     */
+    static int getTint(Rect tintArea, View view, int color) {
+        if (isInArea(tintArea, view)) {
+            return color;
+        } else {
+            return DEFAULT_ICON_TINT;
+        }
+    }
+
+    /**
+     * @return the dark intensity to apply to {@param view} depending on the desired dark
+     *         {@param intensity} and the screen {@param tintArea} in which to apply that intensity
+     */
+    static float getDarkIntensity(Rect tintArea, View view, float intensity) {
+        if (isInArea(tintArea, view)) {
+            return intensity;
+        } else {
+            return 0f;
+        }
+    }
+
+    /**
+     * @return true if more than half of the {@param view} area are in {@param area}, false
+     *         otherwise
+     */
+    static boolean isInArea(Rect area, View view) {
+        if (area.isEmpty()) {
+            return true;
+        }
+        sTmpRect.set(area);
+        view.getLocationOnScreen(sTmpInt2);
+        int left = sTmpInt2[0];
+
+        int intersectStart = Math.max(left, area.left);
+        int intersectEnd = Math.min(left + view.getWidth(), area.right);
+        int intersectAmount = Math.max(0, intersectEnd - intersectStart);
+
+        boolean coversFullStatusBar = area.top <= 0;
+        boolean majorityOfWidth = 2 * intersectAmount > view.getWidth();
+        return majorityOfWidth && coversFullStatusBar;
+    }
+
+    interface DarkReceiver {
+        void onDarkChanged(Rect area, float darkIntensity, int tint);
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
index 8c805fe..96c70c4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
@@ -602,7 +602,7 @@
      */
     public void setExpanded(NotificationData.Entry entry, boolean expanded) {
         HeadsUpEntry headsUpEntry = mHeadsUpEntries.get(entry.key);
-        if (headsUpEntry != null && headsUpEntry.expanded != expanded) {
+        if (headsUpEntry != null && headsUpEntry.expanded != expanded && entry.row.isPinned()) {
             headsUpEntry.expanded = expanded;
             if (expanded) {
                 headsUpEntry.removeAutoRemovalCallbacks();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardMonitor.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardMonitor.java
index de47267..728005d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardMonitor.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardMonitor.java
@@ -21,8 +21,12 @@
     boolean isSecure();
     boolean canSkipBouncer();
     boolean isShowing();
+    boolean isKeyguardFadingAway();
+    boolean isKeyguardGoingAway();
+    long getKeyguardFadingAwayDuration();
+    long getKeyguardFadingAwayDelay();
 
     public interface Callback {
-        void onKeyguardChanged();
+        void onKeyguardShowingChanged();
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardMonitorImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardMonitorImpl.java
index 769f93f..821e635 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardMonitorImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardMonitorImpl.java
@@ -18,13 +18,10 @@
 
 import android.app.ActivityManager;
 import android.content.Context;
-import android.os.RemoteException;
-import android.view.WindowManagerGlobal;
 
 import com.android.keyguard.KeyguardUpdateMonitor;
 import com.android.keyguard.KeyguardUpdateMonitorCallback;
 import com.android.systemui.settings.CurrentUserTracker;
-import com.android.systemui.statusbar.policy.KeyguardMonitor.Callback;
 
 import java.util.ArrayList;
 
@@ -44,6 +41,10 @@
     private boolean mCanSkipBouncer;
 
     private boolean mListening;
+    private boolean mKeyguardFadingAway;
+    private long mKeyguardFadingAwayDelay;
+    private long mKeyguardFadingAwayDuration;
+    private boolean mKeyguardGoingAway;
 
     public KeyguardMonitorImpl(Context context) {
         mContext = context;
@@ -115,8 +116,42 @@
     }
 
     private void notifyKeyguardChanged() {
-        for (Callback callback : mCallbacks) {
-            callback.onKeyguardChanged();
-        }
+        mCallbacks.forEach(Callback::onKeyguardShowingChanged);
+    }
+
+    public void notifyKeyguardFadingAway(long delay, long fadeoutDuration) {
+        mKeyguardFadingAway = true;
+        mKeyguardFadingAwayDelay = delay;
+        mKeyguardFadingAwayDuration = fadeoutDuration;
+        mCallbacks.forEach(Callback::onKeyguardShowingChanged);
+    }
+
+    public void notifyKeyguardDoneFading() {
+        mKeyguardFadingAway = false;
+        mCallbacks.forEach(Callback::onKeyguardShowingChanged);
+    }
+
+    @Override
+    public boolean isKeyguardFadingAway() {
+        return mKeyguardFadingAway;
+    }
+
+    @Override
+    public boolean isKeyguardGoingAway() {
+        return mKeyguardGoingAway;
+    }
+
+    @Override
+    public long getKeyguardFadingAwayDelay() {
+        return mKeyguardFadingAwayDelay;
+    }
+
+    @Override
+    public long getKeyguardFadingAwayDuration() {
+        return mKeyguardFadingAwayDuration;
+    }
+
+    public void notifyKeyguardGoingAway(boolean keyguardGoingAway) {
+        mKeyguardGoingAway = keyguardGoingAway;
     }
 }
\ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
index fd71f43..6df4a21 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
@@ -560,18 +560,20 @@
         private void showLogoutNotification(int userId) {
             PendingIntent logoutPI = PendingIntent.getBroadcastAsUser(mContext,
                     0, new Intent(ACTION_LOGOUT_USER), 0, UserHandle.SYSTEM);
-            Notification.Builder builder = new Notification.Builder(mContext)
-                    .setVisibility(Notification.VISIBILITY_SECRET)
-                    .setChannel(NotificationChannels.USER)
-                    .setSmallIcon(R.drawable.ic_person)
-                    .setContentTitle(mContext.getString(R.string.user_logout_notification_title))
-                    .setContentText(mContext.getString(R.string.user_logout_notification_text))
-                    .setContentIntent(logoutPI)
-                    .setOngoing(true)
-                    .setShowWhen(false)
-                    .addAction(R.drawable.ic_delete,
-                            mContext.getString(R.string.user_logout_notification_action),
-                            logoutPI);
+            Notification.Builder builder =
+                    new Notification.Builder(mContext, NotificationChannels.GENERAL)
+                            .setVisibility(Notification.VISIBILITY_SECRET)
+                            .setSmallIcon(R.drawable.ic_person)
+                            .setContentTitle(mContext.getString(
+                                    R.string.user_logout_notification_title))
+                            .setContentText(mContext.getString(
+                                    R.string.user_logout_notification_text))
+                            .setContentIntent(logoutPI)
+                            .setOngoing(true)
+                            .setShowWhen(false)
+                            .addAction(R.drawable.ic_delete,
+                                    mContext.getString(R.string.user_logout_notification_action),
+                                    logoutPI);
             SystemUI.overrideNotificationAppName(mContext, builder);
             NotificationManager.from(mContext).notifyAsUser(TAG_LOGOUT_USER,
                     SystemMessage.NOTE_LOGOUT_USER, builder.build(), new UserHandle(userId));
@@ -584,17 +586,17 @@
         PendingIntent removeGuestPI = canSwitchUsers ? PendingIntent.getBroadcastAsUser(mContext,
                 0, new Intent(ACTION_REMOVE_GUEST), 0, UserHandle.SYSTEM) : null;
 
-        Notification.Builder builder = new Notification.Builder(mContext)
-                .setVisibility(Notification.VISIBILITY_SECRET)
-                .setChannel(NotificationChannels.USER)
-                .setSmallIcon(R.drawable.ic_person)
-                .setContentTitle(mContext.getString(R.string.guest_notification_title))
-                .setContentText(mContext.getString(R.string.guest_notification_text))
-                .setContentIntent(removeGuestPI)
-                .setShowWhen(false)
-                .addAction(R.drawable.ic_delete,
-                        mContext.getString(R.string.guest_notification_remove_action),
-                        removeGuestPI);
+        Notification.Builder builder =
+                new Notification.Builder(mContext, NotificationChannels.GENERAL)
+                        .setVisibility(Notification.VISIBILITY_SECRET)
+                        .setSmallIcon(R.drawable.ic_person)
+                        .setContentTitle(mContext.getString(R.string.guest_notification_title))
+                        .setContentText(mContext.getString(R.string.guest_notification_text))
+                        .setContentIntent(removeGuestPI)
+                        .setShowWhen(false)
+                        .addAction(R.drawable.ic_delete,
+                                mContext.getString(R.string.guest_notification_remove_action),
+                                removeGuestPI);
         SystemUI.overrideNotificationAppName(mContext, builder);
         NotificationManager.from(mContext).notifyAsUser(TAG_REMOVE_GUEST,
                 SystemMessage.NOTE_REMOVE_GUEST, builder.build(), new UserHandle(guestUserId));
@@ -848,7 +850,7 @@
 
     private final KeyguardMonitor.Callback mCallback = new KeyguardMonitor.Callback() {
         @Override
-        public void onKeyguardChanged() {
+        public void onKeyguardShowingChanged() {
             notifyAdapters();
         }
     };
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeController.java
index f195f7a..8777aa6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeController.java
@@ -36,14 +36,14 @@
     int getCurrentUser();
     boolean isVolumeRestricted();
 
-    public static class Callback {
-        public void onZenChanged(int zen) {}
-        public void onConditionsChanged(Condition[] conditions) {}
-        public void onNextAlarmChanged() {}
-        public void onZenAvailableChanged(boolean available) {}
-        public void onEffectsSupressorChanged() {}
-        public void onManualRuleChanged(ZenRule rule) {}
-        public void onConfigChanged(ZenModeConfig config) {}
+    public static interface Callback {
+        default void onZenChanged(int zen) {}
+        default void onConditionsChanged(Condition[] conditions) {}
+        default void onNextAlarmChanged() {}
+        default void onZenAvailableChanged(boolean available) {}
+        default void onEffectsSupressorChanged() {}
+        default void onManualRuleChanged(ZenRule rule) {}
+        default void onConfigChanged(ZenModeConfig config) {}
     }
 
 }
\ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
index 85b1c32..67cc5e3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
@@ -27,6 +27,7 @@
 import android.annotation.Nullable;
 import android.content.Context;
 import android.content.res.Configuration;
+import android.content.res.Resources;
 import android.graphics.Canvas;
 import android.graphics.Color;
 import android.graphics.Paint;
@@ -55,7 +56,6 @@
 import android.view.animation.Interpolator;
 import android.widget.OverScroller;
 import android.widget.ScrollView;
-
 import com.android.internal.logging.MetricsLogger;
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
 import com.android.systemui.ExpandHelper;
@@ -88,6 +88,7 @@
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashSet;
+import java.util.List;
 
 /**
  * A layout which handles a dynamic amount of notifications and presents them in a scrollable stack.
@@ -114,6 +115,7 @@
     private boolean mSwipingInProgress;
     private int mCurrentStackHeight = Integer.MAX_VALUE;
     private final Paint mBackgroundPaint = new Paint();
+    private boolean mShouldDrawNotificationBackground;
 
     private float mExpandedHeight;
     private int mOwnScrollY;
@@ -229,6 +231,7 @@
     private NotificationMenuRow mCurrIconRow;
     private View mTranslatingParentView;
     private View mGearExposedView;
+    private boolean mShouldShowGear;
 
     /**
      * Should in this touch motion only be scrolling allowed? It's true when the scroller was
@@ -362,6 +365,7 @@
     private boolean mHeadsUpAnimatingAway;
     private int mStatusBarState;
     private int mCachedBackgroundColor;
+    private Runnable mAnimateScroll = this::animateScroll;
 
     public NotificationStackScrollLayout(Context context) {
         this(context, null);
@@ -378,10 +382,12 @@
     public NotificationStackScrollLayout(Context context, AttributeSet attrs, int defStyleAttr,
             int defStyleRes) {
         super(context, attrs, defStyleAttr, defStyleRes);
+        Resources res = getResources();
+
         mAmbientState = new AmbientState(context);
         mBgColor = context.getColor(R.color.notification_shade_background_color);
-        int minHeight = getResources().getDimensionPixelSize(R.dimen.notification_min_height);
-        int maxHeight = getResources().getDimensionPixelSize(R.dimen.notification_max_height);
+        int minHeight = res.getDimensionPixelSize(R.dimen.notification_min_height);
+        int maxHeight = res.getDimensionPixelSize(R.dimen.notification_max_height);
         mExpandHelper = new ExpandHelper(getContext(), this,
                 minHeight, maxHeight);
         mExpandHelper.setEventSource(this);
@@ -390,14 +396,18 @@
         mSwipeHelper.setLongPressListener(mLongPressListener);
         mStackScrollAlgorithm = createStackScrollAlgorithm(context);
         initView(context);
-        setWillNotDraw(false);
+        mFalsingManager = FalsingManager.getInstance(context);
+        mShouldShowGear = res.getBoolean(R.bool.config_showNotificationGear);
+        mShouldDrawNotificationBackground =
+                res.getBoolean(R.bool.config_drawNotificationBackground);
+
+        updateWillNotDraw();
         if (DEBUG) {
             mDebugPaint = new Paint();
             mDebugPaint.setColor(0xffff0000);
             mDebugPaint.setStrokeWidth(2);
             mDebugPaint.setStyle(Paint.Style.STROKE);
         }
-        mFalsingManager = FalsingManager.getInstance(context);
     }
 
     @Override
@@ -424,10 +434,11 @@
 
     @Override
     protected void onDraw(Canvas canvas) {
-        if (mCurrentBounds.top < mCurrentBounds.bottom) {
+        if (mShouldDrawNotificationBackground && mCurrentBounds.top < mCurrentBounds.bottom) {
             canvas.drawRect(0, mCurrentBounds.top, getWidth(), mCurrentBounds.bottom,
                     mBackgroundPaint);
         }
+
         if (DEBUG) {
             int y = mTopPadding;
             canvas.drawLine(0, y, getWidth(), y, mDebugPaint);
@@ -439,6 +450,11 @@
     }
 
     private void updateBackgroundDimming() {
+        // No need to update the background color if it's not being drawn.
+        if (!mShouldDrawNotificationBackground) {
+            return;
+        }
+
         float alpha = BACKGROUND_ALPHA_DIMMED + (1 - BACKGROUND_ALPHA_DIMMED) * (1.0f - mDimAmount);
         alpha *= mBackgroundFadeAmount;
         // We need to manually blend in the background color
@@ -487,6 +503,10 @@
     }
 
     private void updateSrcDrawing() {
+        if (!mShouldDrawNotificationBackground) {
+            return;
+        }
+
         mBackgroundPaint.setXfermode(mDrawBackgroundAsSrc && !mFadingOut && !mParentNotFullyVisible
                 ? mSrcMode : null);
         invalidate();
@@ -1151,7 +1171,7 @@
         if (mOwnScrollY < targetScroll || outOfViewScroll < mOwnScrollY) {
             mScroller.startScroll(mScrollX, mOwnScrollY, 0, targetScroll - mOwnScrollY);
             mDontReportNextOverScroll = true;
-            postInvalidateOnAnimation();
+            animateScroll();
             return true;
         }
         return false;
@@ -1191,7 +1211,7 @@
             mScroller.startScroll(mScrollX, mOwnScrollY, 0, range - mOwnScrollY);
             mDontReportNextOverScroll = true;
             mDontClampNextScroll = true;
-            postInvalidateOnAnimation();
+            animateScroll();
         }
     };
 
@@ -1308,7 +1328,7 @@
                                 newScrollY = range;
                             }
                             if (newScrollY != oldScrollY) {
-                                customScrollTo(newScrollY);
+                                setOwnScrollY(newScrollY);
                                 return true;
                             }
                         }
@@ -1388,13 +1408,13 @@
                         scrollAmount = overScrollUp(deltaY, range);
                     }
 
-                    // Calling overScrollBy will call onOverScrolled, which
-                    // calls onScrollChanged if applicable.
+                    // Calling customOverScrollBy will call onCustomOverScrolled, which
+                    // sets the scrolling if applicable.
                     if (scrollAmount != 0.0f) {
                         // The scrolling motion could not be compensated with the
                         // existing overScroll, we have to scroll the view
-                        overScrollBy(0, (int) scrollAmount, 0, mOwnScrollY,
-                                0, range, 0, getHeight() / 2, true);
+                        customOverScrollBy((int) scrollAmount, mOwnScrollY,
+                                range, getHeight() / 2);
                     }
                 }
                 break;
@@ -1418,7 +1438,7 @@
                             } else {
                                 if (mScroller.springBack(mScrollX, mOwnScrollY, 0, 0, 0,
                                         getScrollRange())) {
-                                    postInvalidateOnAnimation();
+                                    animateScroll();
                                 }
                             }
                         }
@@ -1431,7 +1451,7 @@
             case MotionEvent.ACTION_CANCEL:
                 if (mIsBeingDragged && getChildCount() > 0) {
                     if (mScroller.springBack(mScrollX, mOwnScrollY, 0, 0, 0, getScrollRange())) {
-                        postInvalidateOnAnimation();
+                        animateScroll();
                     }
                     mActivePointerId = INVALID_POINTER;
                     endDrag();
@@ -1571,16 +1591,12 @@
         mFinishScrollingCallback = runnable;
     }
 
-    @Override
-    public void computeScroll() {
+    private void animateScroll() {
         if (mScroller.computeScrollOffset()) {
-            // This is called at drawing time by ViewGroup.
-            int oldX = mScrollX;
             int oldY = mOwnScrollY;
-            int x = mScroller.getCurrX();
             int y = mScroller.getCurrY();
 
-            if (oldX != x || oldY != y) {
+            if (oldY != y) {
                 int range = getScrollRange();
                 if (y < 0 && oldY >= 0 || y > range && oldY <= range) {
                     float currVelocity = mScroller.getCurrVelocity();
@@ -1592,13 +1608,11 @@
                 if (mDontClampNextScroll) {
                     range = Math.max(range, oldY);
                 }
-                overScrollBy(x - oldX, y - oldY, oldX, oldY, 0, range,
-                        0, (int) (mMaxOverScroll), false);
-                onScrollChanged(mScrollX, mOwnScrollY, oldX, oldY);
+                customOverScrollBy(y - oldY, oldY, range,
+                        (int) (mMaxOverScroll));
             }
 
-            // Keep on drawing until the animation has finished.
-            postInvalidateOnAnimation();
+            postOnAnimation(mAnimateScroll);
         } else {
             mDontClampNextScroll = false;
             if (mFinishScrollingCallback != null) {
@@ -1607,12 +1621,8 @@
         }
     }
 
-    @Override
-    protected boolean overScrollBy(int deltaX, int deltaY,
-            int scrollX, int scrollY,
-            int scrollRangeX, int scrollRangeY,
-            int maxOverScrollX, int maxOverScrollY,
-            boolean isTouchEvent) {
+    private boolean customOverScrollBy(int deltaY, int scrollY, int scrollRangeY,
+            int maxOverScrollY) {
 
         int newScrollY = scrollY + deltaY;
         final int top = -maxOverScrollY;
@@ -1627,7 +1637,7 @@
             clampedY = true;
         }
 
-        onOverScrolled(0, newScrollY, false, clampedY);
+        onCustomOverScrolled(newScrollY, clampedY);
 
         return clampedY;
     }
@@ -1736,25 +1746,13 @@
         }
     }
 
-    private void customScrollTo(int y) {
-        setOwnScrollY(y);
-        updateChildren();
-    }
-
-    @Override
-    protected void onOverScrolled(int scrollX, int scrollY, boolean clampedX, boolean clampedY) {
+    private void onCustomOverScrolled(int scrollY, boolean clampedY) {
         // Treat animating scrolls differently; see #computeScroll() for why.
         if (!mScroller.isFinished()) {
-            final int oldX = mScrollX;
-            final int oldY = mOwnScrollY;
-            mScrollX = scrollX;
             setOwnScrollY(scrollY);
             if (clampedY) {
                 springBack();
             } else {
-                onScrollChanged(mScrollX, mOwnScrollY, oldX, oldY);
-                invalidateParentIfNeeded();
-                updateChildren();
                 float overScrollTop = getCurrentOverScrollAmount(true);
                 if (mOwnScrollY < 0) {
                     notifyOverscrollTopListener(-mOwnScrollY, isRubberbanded(true));
@@ -1763,8 +1761,7 @@
                 }
             }
         } else {
-            customScrollTo(scrollY);
-            scrollTo(scrollX, mScrollY);
+            setOwnScrollY(scrollY);
         }
     }
 
@@ -1840,12 +1837,29 @@
      * @return The first child which has visibility unequal to GONE which is currently below the
      *         given translationY or equal to it.
      */
-    private View getFirstChildBelowTranlsationY(float translationY) {
+    private View getFirstChildBelowTranlsationY(float translationY, boolean ignoreChildren) {
         int childCount = getChildCount();
         for (int i = 0; i < childCount; i++) {
             View child = getChildAt(i);
-            if (child.getVisibility() != View.GONE && child.getTranslationY() >= translationY) {
+            if (child.getVisibility() == View.GONE) {
+                continue;
+            }
+            float rowTranslation = child.getTranslationY();
+            if (rowTranslation >= translationY) {
                 return child;
+            } else if (!ignoreChildren && child instanceof ExpandableNotificationRow) {
+                ExpandableNotificationRow row = (ExpandableNotificationRow) child;
+                if (row.isSummaryWithChildren() && row.areChildrenExpanded()) {
+                    List<ExpandableNotificationRow> notificationChildren =
+                            row.getNotificationChildren();
+                    for (int childIndex = 0; childIndex < notificationChildren.size();
+                            childIndex++) {
+                        ExpandableNotificationRow rowChild = notificationChildren.get(childIndex);
+                        if (rowChild.getTranslationY() + rowTranslation >= translationY) {
+                            return rowChild;
+                        }
+                    }
+                }
             }
         }
         return null;
@@ -1967,9 +1981,11 @@
     }
 
     private void updateBackground() {
-        if (mAmbientState.isDark()) {
+        // No need to update the background color if it's not being drawn.
+        if (!mShouldDrawNotificationBackground || mAmbientState.isDark()) {
             return;
         }
+
         updateBackgroundBounds();
         if (!mCurrentBounds.equals(mBackgroundBounds)) {
             boolean animate = mAnimateNextBackgroundTop || mAnimateNextBackgroundBottom
@@ -2119,6 +2135,12 @@
     }
 
     private void applyCurrentBackgroundBounds() {
+        // If the background of the notification is not being drawn, then there is no need to
+        // exclude an area in the scrim. Rather, the scrim's color should serve as the background.
+        if (!mShouldDrawNotificationBackground) {
+            return;
+        }
+
         mScrimController.setExcludedBackgroundArea(
                 mFadingOut || mParentNotFullyVisible || mAmbientState.isDark() || mIsClipped ? null
                         : mCurrentBounds);
@@ -2265,10 +2287,10 @@
             if (mExpandedInThisMotion) {
                 minScrollY = Math.min(minScrollY, mMaxScrollAfterExpand);
             }
-            mScroller.fling(mScrollX, mOwnScrollY, 1, velocityY, 0, 0, 0,
-                    minScrollY, 0, mExpandedInThisMotion && mOwnScrollY >= 0 ? 0 : Integer.MAX_VALUE / 2);
+            mScroller.fling(mScrollX, mOwnScrollY, 1, velocityY, 0, 0, 0, minScrollY, 0,
+                    mExpandedInThisMotion && mOwnScrollY >= 0 ? 0 : Integer.MAX_VALUE / 2);
 
-            postInvalidateOnAnimation();
+            animateScroll();
         }
     }
 
@@ -2496,7 +2518,7 @@
                     View groupParentWhenDismissed = row.getGroupParentWhenDismissed();
                     nextView = getFirstChildBelowTranlsationY(groupParentWhenDismissed != null
                             ? groupParentWhenDismissed.getTranslationY()
-                            : view.getTranslationY());
+                            : view.getTranslationY(), true /* ignoreChildren */);
                 }
                 if (nextView != null) {
                     nextView.requestAccessibilityFocus();
@@ -2740,6 +2762,7 @@
 
     private void updateNotificationAnimationStates() {
         boolean running = mAnimationsEnabled || mPulsing;
+        mShelf.setAnimationsEnabled(running);
         int childCount = getChildCount();
         for (int i = 0; i < childCount; i++) {
             View child = getChildAt(i);
@@ -2935,7 +2958,17 @@
             AnimationEvent event = new AnimationEvent(child, animationType);
 
             // we need to know the view after this one
-            event.viewAfterChangingView = getFirstChildBelowTranlsationY(child.getTranslationY());
+            float removedTranslation = child.getTranslationY();
+            boolean ignoreChildren = true;
+            if (child instanceof ExpandableNotificationRow) {
+                ExpandableNotificationRow row = (ExpandableNotificationRow) child;
+                if (row.isRemoved() && row.wasChildInGroupWhenRemoved()) {
+                    removedTranslation = row.getTranslationWhenRemoved();
+                    ignoreChildren = false;
+                }
+            }
+            event.viewAfterChangingView = getFirstChildBelowTranlsationY(removedTranslation,
+                    ignoreChildren);
             mAnimationEvents.add(event);
             mSwipedOutViews.remove(child);
         }
@@ -3122,7 +3155,7 @@
                 mActivePointerId = INVALID_POINTER;
                 recycleVelocityTracker();
                 if (mScroller.springBack(mScrollX, mOwnScrollY, 0, 0, 0, getScrollRange())) {
-                    postInvalidateOnAnimation();
+                    animateScroll();
                 }
                 break;
             case MotionEvent.ACTION_POINTER_UP:
@@ -3545,16 +3578,29 @@
         }
         requestChildrenUpdate();
         if (dark) {
-            setWillNotDraw(!DEBUG);
             mScrimController.setExcludedBackgroundArea(null);
         } else {
             updateBackground();
-            setWillNotDraw(false);
         }
+
+        updateWillNotDraw();
         updateContentHeight();
         notifyHeightChangeListener(mShelf);
     }
 
+    /**
+     * Updates whether or not this Layout will perform its own custom drawing (i.e. whether or
+     * not {@link #onDraw(Canvas)} is called). This method should be called whenever the
+     * {@link #mAmbientState}'s dark mode is toggled.
+     */
+    private void updateWillNotDraw() {
+       if (mAmbientState.isDark()) {
+           setWillNotDraw(!DEBUG);
+       } else {
+           setWillNotDraw(!mShouldDrawNotificationBackground && !DEBUG);
+       }
+    }
+
     private void setBackgroundFadeAmount(float fadeAmount) {
         mBackgroundFadeAmount = fadeAmount;
         updateBackgroundDimming();
@@ -3887,7 +3933,7 @@
                         Math.min(mOwnScrollY + direction * viewportHeight, getScrollRange()));
                 if (targetScrollY != mOwnScrollY) {
                     mScroller.startScroll(mScrollX, mOwnScrollY, 0, targetScrollY - mOwnScrollY);
-                    postInvalidateOnAnimation();
+                    animateScroll();
                     return true;
                 }
                 break;
@@ -3986,6 +4032,9 @@
     }
 
     public void setPulsing(boolean pulsing) {
+        if (mPulsing == pulsing) {
+            return;
+        }
         mPulsing = pulsing;
         updateNotificationAnimationStates();
         updateContentHeight();
@@ -4037,8 +4086,11 @@
 
     public void setOwnScrollY(int ownScrollY) {
         if (ownScrollY != mOwnScrollY) {
+            // We still want to call the normal scrolled changed for accessibility reasons
+            onScrollChanged(mScrollX, ownScrollY, mScrollX, mOwnScrollY);
             mOwnScrollY = ownScrollY;
             updateForwardAndBackwardScrollability();
+            requestChildrenUpdate();
         }
     }
 
@@ -4106,14 +4158,14 @@
      * A listener that is notified when some child locations might have changed.
      */
     public interface OnChildLocationsChangedListener {
-        public void onChildLocationsChanged(NotificationStackScrollLayout stackScrollLayout);
+        void onChildLocationsChanged(NotificationStackScrollLayout stackScrollLayout);
     }
 
     /**
      * A listener that is notified when the empty space below the notifications is clicked on
      */
     public interface OnEmptySpaceClickListener {
-        public void onEmptySpaceClicked(float x, float y);
+        void onEmptySpaceClicked(float x, float y);
     }
 
     /**
@@ -4129,7 +4181,7 @@
          *                     unrubberbanded motion to directly expand overscroll view (e.g expand
          *                     QS)
          */
-        public void onOverscrollTopChanged(float amount, boolean isRubberbanded);
+        void onOverscrollTopChanged(float amount, boolean isRubberbanded);
 
         /**
          * Notify a listener that the scroller wants to escape from the scrolling motion and
@@ -4138,7 +4190,7 @@
          * @param velocity The velocity that the Scroller had when over flinging
          * @param open Should the fling open or close the overscroll view.
          */
-        public void flingTopOverscroll(float velocity, boolean open);
+        void flingTopOverscroll(float velocity, boolean open);
     }
 
     private class NotificationSwipeHelper extends SwipeHelper {
@@ -4216,7 +4268,7 @@
             final boolean gutsExposed = (view instanceof ExpandableNotificationRow)
                     && ((ExpandableNotificationRow) view).areGutsExposed();
 
-            if (!isPinnedHeadsUp(view) && !gutsExposed) {
+            if (mShouldShowGear && !isPinnedHeadsUp(view) && !gutsExposed) {
                 // Only show the gear if we're not a heads up view and guts aren't exposed.
                 checkForDrag();
             }
@@ -4259,11 +4311,19 @@
                 return false; // Let SwipeHelper handle it.
             }
 
+            // If the gear icon should not be shown, then there is no need to check if the a swipe
+            // should result in a snapping to the gear icon. As a result, just check if the swipe
+            // was enough to dismiss the notification.
+            if (!mShouldShowGear) {
+                dismissOrSnapBack(animView, velocity, ev);
+                return true;
+            }
+
             boolean gestureTowardsGear = isTowardsGear(velocity, mCurrIconRow.isMenuOnLeft());
             boolean gestureFastEnough = Math.abs(velocity) > getEscapeVelocity();
             final double timeForGesture = ev.getEventTime() - ev.getDownTime();
             final boolean showGearForSlowOnGoing = !canChildBeDismissed(animView)
-                && timeForGesture >= SWIPE_GEAR_TIMING;
+                    && timeForGesture >= SWIPE_GEAR_TIMING;
 
             if (mGearSnappedTo && mCurrIconRow.isVisible()) {
                 if (mGearSnappedOnLeft == mCurrIconRow.isMenuOnLeft()) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java
index 55085e5..9893434 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java
@@ -389,10 +389,25 @@
                 // upwards by default
                 float translationDirection = -1.0f;
                 if (viewState != null) {
+                    float ownPosition = changingView.getTranslationY();
+                    if (changingView instanceof ExpandableNotificationRow
+                            && event.viewAfterChangingView instanceof ExpandableNotificationRow) {
+                        ExpandableNotificationRow changingRow =
+                                (ExpandableNotificationRow) changingView;
+                        ExpandableNotificationRow nextRow =
+                                (ExpandableNotificationRow) event.viewAfterChangingView;
+                        if (changingRow.isRemoved()
+                                && changingRow.wasChildInGroupWhenRemoved()
+                                && !nextRow.isChildInGroup()) {
+                            // the next row isn't actually a child from a group! Let's
+                            // compare absolute positions!
+                            ownPosition = changingRow.getTranslationWhenRemoved();
+                        }
+                    }
                     // there was a view after this one, Approximate the distance the next child
                     // travelled
                     translationDirection = ((viewState.yTranslation
-                            - (changingView.getTranslationY() + actualHeight / 2.0f)) * 2 /
+                            - (ownPosition + actualHeight / 2.0f)) * 2 /
                             actualHeight);
                     translationDirection = Math.max(Math.min(translationDirection, 1.0f),-1.0f);
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java
index ab562d1..5d11ef3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java
@@ -42,104 +42,11 @@
     private IStatusBarService mBarService;
 
     @Override
-    public void setIcon(String slot, StatusBarIcon icon) {
-    }
-
-    @Override
-    public void removeIcon(String slot) {
-    }
-
-    public void removeNotification(String key, RankingMap ranking) {
-    }
-
-    @Override
-    public void disable(int state1, int state2, boolean animate) {
-    }
-
-    @Override
-    public void animateExpandNotificationsPanel() {
-    }
-
-    @Override
-    public void animateCollapsePanels(int flags) {
-    }
-
-    @Override
-    public void setSystemUiVisibility(int vis, int fullscreenStackVis, int dockedStackVis,
-            int mask, Rect fullscreenStackBounds, Rect dockedStackBounds) {
-    }
-
-    @Override
-    public void topAppWindowChanged(boolean visible) {
-    }
-
-    @Override
-    public void setImeWindowStatus(IBinder token, int vis, int backDisposition,
-            boolean showImeSwitcher) {
-    }
-
-    @Override // CommandQueue
-    public void setWindowState(int window, int state) {
-    }
-
-    @Override // CommandQueue
-    public void buzzBeepBlinked() {
-    }
-
-    @Override // CommandQueue
-    public void notificationLightOff() {
-    }
-
-    @Override // CommandQueue
-    public void notificationLightPulse(int argb, int onMillis, int offMillis) {
-    }
-
-    @Override
-    public void animateExpandSettingsPanel(String subPanel) {
-    }
-
-    @Override
-    public void showScreenPinningRequest(int taskId) {
-    }
-
-    @Override
-    public void appTransitionPending() {
-    }
-
-    @Override
-    public void appTransitionCancelled() {
-    }
-
-    @Override
-    public void appTransitionStarting(long startTime, long duration) {
-    }
-
-    @Override
-    public void appTransitionFinished() {
-    }
-
-    @Override
-    public void onCameraLaunchGestureDetected(int source) {
-    }
-
-    @Override
     public void showTvPictureInPictureMenu() {
         PipManager.getInstance().showTvPictureInPictureMenu();
     }
 
     @Override
-    public void addQsTile(ComponentName tile) {
-    }
-
-    @Override
-    public void remQsTile(ComponentName tile) {
-    }
-
-    @Override
-    public void clickTile(ComponentName tile) {
-    }
-
-    @Override
     public void start() {
         putComponent(TvStatusBar.class, this);
         CommandQueue commandQueue = getComponent(CommandQueue.class);
@@ -160,8 +67,4 @@
         }
     }
 
-    @Override
-    public void handleSystemNavigationKey(int arg1) {
-        // Not implemented
-    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/BatteryPreference.java b/packages/SystemUI/src/com/android/systemui/tuner/BatteryPreference.java
index 9998283..1df12ac 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/BatteryPreference.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/BatteryPreference.java
@@ -22,9 +22,10 @@
 import android.util.AttributeSet;
 import com.android.internal.logging.MetricsLogger;
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
+import com.android.systemui.Dependency;
 import com.android.systemui.statusbar.phone.StatusBarIconController;
 
-import static com.android.systemui.BatteryMeterDrawable.SHOW_PERCENT_SETTING;
+import static com.android.systemui.BatteryMeterView.SHOW_PERCENT_SETTING;
 
 public class BatteryPreference extends DropDownPreference implements TunerService.Tunable {
 
@@ -49,12 +50,12 @@
         super.onAttached();
         mHasPercentage = Settings.System.getInt(getContext().getContentResolver(),
                 SHOW_PERCENT_SETTING, 0) != 0;
-        TunerService.get(getContext()).addTunable(this, StatusBarIconController.ICON_BLACKLIST);
+        Dependency.get(TunerService.class).addTunable(this, StatusBarIconController.ICON_BLACKLIST);
     }
 
     @Override
     public void onDetached() {
-        TunerService.get(getContext()).removeTunable(this);
+        Dependency.get(TunerService.class).removeTunable(this);
         super.onDetached();
     }
 
@@ -89,7 +90,7 @@
         } else {
             mBlacklist.remove(mBattery);
         }
-        TunerService.get(getContext()).setValue(StatusBarIconController.ICON_BLACKLIST,
+        Dependency.get(TunerService.class).setValue(StatusBarIconController.ICON_BLACKLIST,
                 TextUtils.join(",", mBlacklist));
         return true;
     }
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/ClockPreference.java b/packages/SystemUI/src/com/android/systemui/tuner/ClockPreference.java
index caa0527..014ec92 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/ClockPreference.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/ClockPreference.java
@@ -18,6 +18,8 @@
 import android.text.TextUtils;
 import android.util.ArraySet;
 import android.util.AttributeSet;
+
+import com.android.systemui.Dependency;
 import com.android.systemui.statusbar.phone.StatusBarIconController;
 import com.android.systemui.statusbar.policy.Clock;
 
@@ -44,13 +46,13 @@
     @Override
     public void onAttached() {
         super.onAttached();
-        TunerService.get(getContext()).addTunable(this, StatusBarIconController.ICON_BLACKLIST,
+        Dependency.get(TunerService.class).addTunable(this, StatusBarIconController.ICON_BLACKLIST,
                 Clock.CLOCK_SECONDS);
     }
 
     @Override
     public void onDetached() {
-        TunerService.get(getContext()).removeTunable(this);
+        Dependency.get(TunerService.class).removeTunable(this);
         super.onDetached();
     }
 
@@ -81,13 +83,14 @@
 
     @Override
     protected boolean persistString(String value) {
-        TunerService.get(getContext()).setValue(Clock.CLOCK_SECONDS, SECONDS.equals(value) ? 1 : 0);
+        Dependency.get(TunerService.class).setValue(Clock.CLOCK_SECONDS, SECONDS.equals(value) ? 1
+                : 0);
         if (DISABLED.equals(value)) {
             mBlacklist.add(mClock);
         } else {
             mBlacklist.remove(mClock);
         }
-        TunerService.get(getContext()).setValue(StatusBarIconController.ICON_BLACKLIST,
+        Dependency.get(TunerService.class).setValue(StatusBarIconController.ICON_BLACKLIST,
                 TextUtils.join(",", mBlacklist));
         return true;
     }
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/CustomListPreference.java b/packages/SystemUI/src/com/android/systemui/tuner/CustomListPreference.java
new file mode 100644
index 0000000..e50fd5e
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/tuner/CustomListPreference.java
@@ -0,0 +1,173 @@
+/*
+ * 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.tuner;
+
+import android.annotation.Nullable;
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.DialogFragment;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.DialogInterface.OnClickListener;
+import android.os.Bundle;
+import android.support.v14.preference.ListPreferenceDialogFragment;
+import android.support.v7.preference.ListPreference;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+public class CustomListPreference extends ListPreference {
+
+    public CustomListPreference(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    public CustomListPreference(Context context, AttributeSet attrs, int defStyleAttr,
+                                int defStyleRes) {
+        super(context, attrs, defStyleAttr, defStyleRes);
+    }
+
+    protected void onPrepareDialogBuilder(AlertDialog.Builder builder,
+            OnClickListener listener) {
+    }
+
+    protected void onDialogClosed(boolean positiveResult) {
+    }
+
+    protected Dialog onDialogCreated(DialogFragment fragment, Dialog dialog) {
+        return dialog;
+    }
+
+    protected boolean isAutoClosePreference() {
+        return true;
+    }
+
+    /**
+     * Called when a user is about to choose the given value, to determine if we
+     * should show a confirmation dialog.
+     *
+     * @param value the value the user is about to choose
+     * @return the message to show in a confirmation dialog, or {@code null} to
+     *         not request confirmation
+     */
+    protected CharSequence getConfirmationMessage(String value) {
+        return null;
+    }
+
+    protected void onDialogStateRestored(DialogFragment fragment, Dialog dialog,
+            Bundle savedInstanceState) {
+    }
+
+    public static class CustomListPreferenceDialogFragment extends ListPreferenceDialogFragment {
+
+        private static final String KEY_CLICKED_ENTRY_INDEX
+                = "settings.CustomListPrefDialog.KEY_CLICKED_ENTRY_INDEX";
+
+        private int mClickedDialogEntryIndex;
+
+        public static ListPreferenceDialogFragment newInstance(String key) {
+            final ListPreferenceDialogFragment fragment = new CustomListPreferenceDialogFragment();
+            final Bundle b = new Bundle(1);
+            b.putString(ARG_KEY, key);
+            fragment.setArguments(b);
+            return fragment;
+        }
+
+        public CustomListPreference getCustomizablePreference() {
+            return (CustomListPreference) getPreference();
+        }
+
+        @Override
+        protected void onPrepareDialogBuilder(AlertDialog.Builder builder) {
+            super.onPrepareDialogBuilder(builder);
+            mClickedDialogEntryIndex = getCustomizablePreference()
+                    .findIndexOfValue(getCustomizablePreference().getValue());
+            getCustomizablePreference().onPrepareDialogBuilder(builder, getOnItemClickListener());
+            if (!getCustomizablePreference().isAutoClosePreference()) {
+                builder.setPositiveButton(com.android.internal.R.string.ok, new OnClickListener() {
+                    @Override
+                    public void onClick(DialogInterface dialog, int which) {
+                        onItemConfirmed();
+                    }
+                });
+            }
+        }
+
+        @Override
+        public Dialog onCreateDialog(Bundle savedInstanceState) {
+            Dialog dialog = super.onCreateDialog(savedInstanceState);
+            if (savedInstanceState != null) {
+                mClickedDialogEntryIndex = savedInstanceState.getInt(KEY_CLICKED_ENTRY_INDEX,
+                        mClickedDialogEntryIndex);
+            }
+            return getCustomizablePreference().onDialogCreated(this, dialog);
+        }
+
+        @Override
+        public void onSaveInstanceState(Bundle outState) {
+            super.onSaveInstanceState(outState);
+            outState.putInt(KEY_CLICKED_ENTRY_INDEX, mClickedDialogEntryIndex);
+        }
+
+        @Override
+        public void onActivityCreated(Bundle savedInstanceState) {
+            super.onActivityCreated(savedInstanceState);
+            getCustomizablePreference().onDialogStateRestored(this, getDialog(), savedInstanceState);
+        }
+
+        protected OnClickListener getOnItemClickListener() {
+            return new OnClickListener() {
+                @Override
+                public void onClick(DialogInterface dialog, int which) {
+                    setClickedDialogEntryIndex(which);
+                    if (getCustomizablePreference().isAutoClosePreference()) {
+                        onItemConfirmed();
+                    }
+                }
+            };
+        }
+
+        protected void setClickedDialogEntryIndex(int which) {
+            mClickedDialogEntryIndex = which;
+        }
+
+        private String getValue() {
+            final ListPreference preference = getCustomizablePreference();
+            if (mClickedDialogEntryIndex >= 0 && preference.getEntryValues() != null) {
+                return preference.getEntryValues()[mClickedDialogEntryIndex].toString();
+            } else {
+                return null;
+            }
+        }
+
+        protected void onItemConfirmed() {
+            onClick(getDialog(), DialogInterface.BUTTON_POSITIVE);
+            getDialog().dismiss();
+        }
+
+        @Override
+        public void onDialogClosed(boolean positiveResult) {
+            getCustomizablePreference().onDialogClosed(positiveResult);
+            final ListPreference preference = getCustomizablePreference();
+            final String value = getValue();
+            if (positiveResult && value != null) {
+                if (preference.callChangeListener(value)) {
+                    preference.setValue(value);
+                }
+            }
+        }
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/LockscreenFragment.java b/packages/SystemUI/src/com/android/systemui/tuner/LockscreenFragment.java
index 41786b5..410d3d2 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,14 +38,19 @@
 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;
 import android.widget.ImageView;
 import android.widget.TextView;
 
+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;
@@ -71,13 +77,11 @@
 
     @Override
     public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
-        mTunerService = TunerService.get(getContext());
+        mTunerService = Dependency.get(TunerService.class);
         mHandler = new Handler();
         addPreferencesFromResource(R.xml.lockscreen_settings);
-        setupGroup((PreferenceGroup) findPreference(KEY_LEFT), LOCKSCREEN_LEFT_BUTTON,
-                LOCKSCREEN_LEFT_UNLOCK);
-        setupGroup((PreferenceGroup) findPreference(KEY_RIGHT), LOCKSCREEN_RIGHT_BUTTON,
-                LOCKSCREEN_RIGHT_UNLOCK);
+        setupGroup(LOCKSCREEN_LEFT_BUTTON, LOCKSCREEN_LEFT_UNLOCK);
+        setupGroup(LOCKSCREEN_RIGHT_BUTTON, LOCKSCREEN_RIGHT_UNLOCK);
     }
 
     @Override
@@ -86,30 +90,14 @@
         mTunables.forEach(t -> mTunerService.removeTunable(t));
     }
 
-    private void setupGroup(PreferenceGroup group, String buttonSetting, String unlockKey) {
-        SwitchPreference customize = (SwitchPreference) group.findPreference(KEY_CUSTOMIZE);
-        Preference shortcut = group.findPreference(KEY_SHORTCUT);
-        SwitchPreference unlock = (SwitchPreference) group.findPreference(unlockKey);
+    private void setupGroup(String buttonSetting, String unlockKey) {
+        Preference shortcut = findPreference(buttonSetting);
+        SwitchPreference unlock = (SwitchPreference) findPreference(unlockKey);
         addTunable((k, v) -> {
-            boolean visible = v != null;
-            customize.setChecked(visible);
-            shortcut.setVisible(visible);
+            boolean visible = !TextUtils.isEmpty(v);
             unlock.setVisible(visible);
-            if (visible) {
-                setSummary(shortcut, v);
-            }
+            setSummary(shortcut, v);
         }, buttonSetting);
-        customize.setOnPreferenceChangeListener((preference, newValue) -> {
-            boolean hasSetting = mTunerService.getValue(buttonSetting) != null;
-            if (hasSetting != (boolean) newValue) {
-                mHandler.post(() -> mTunerService.setValue(buttonSetting, hasSetting ? null : ""));
-            }
-            return true;
-        });
-        shortcut.setOnPreferenceClickListener(preference -> {
-            showSelectDialog(buttonSetting);
-            return true;
-        });
     }
 
     private void showSelectDialog(String buttonSetting) {
@@ -123,24 +111,15 @@
             mTunerService.setValue(buttonSetting, item.getSettingValue());
             dialog.dismiss();
         });
-        LauncherApps apps = getContext().getSystemService(LauncherApps.class);
-        List<LauncherActivityInfo> activities = apps.getActivityList(null,
-                Process.myUserHandle());
-
-        activities.forEach(info -> {
-            App app = new App(getContext(), info);
-            try {
-                new ShortcutParser(getContext(), info.getComponentName()).getShortcuts().forEach(
-                        shortcut -> app.addChild(new StaticShortcut(getContext(), shortcut)));
-            } catch (NameNotFoundException e) {
-            }
-            adapter.addItem(app);
-        });
 
         v.setAdapter(adapter);
     }
 
     private void setSummary(Preference shortcut, String value) {
+        if (value == null) {
+            shortcut.setSummary(R.string.lockscreen_none);
+            return;
+        }
         if (value.contains("::")) {
             Shortcut info = getShortcutInfo(getContext(), value);
             shortcut.setSummary(info != null ? info.label : null);
@@ -149,7 +128,7 @@
             shortcut.setSummary(info != null ? info.loadLabel(getContext().getPackageManager())
                     : null);
         } else {
-            shortcut.setSummary(null);
+            shortcut.setSummary(R.string.lockscreen_none);
         }
     }
 
@@ -364,8 +343,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
@@ -387,8 +371,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/NavBarTuner.java b/packages/SystemUI/src/com/android/systemui/tuner/NavBarTuner.java
index 9593c45..45abd45 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/NavBarTuner.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/NavBarTuner.java
@@ -33,6 +33,9 @@
 import android.content.DialogInterface.OnClickListener;
 import android.content.res.Resources;
 import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.Paint.FontMetricsInt;
+import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.Icon;
 import android.os.Bundle;
@@ -51,13 +54,14 @@
 import android.view.KeyEvent;
 import android.widget.EditText;
 
+import com.android.systemui.Dependency;
 import com.android.systemui.R;
 import com.android.systemui.statusbar.phone.NavigationBarInflaterView;
 import com.android.systemui.tuner.TunerService.Tunable;
 
 import java.util.ArrayList;
 
-public class NavBarTuner extends PreferenceFragment {
+public class NavBarTuner extends TunerPreferenceFragment {
 
     private static final String LAYOUT = "layout";
     private static final String LEFT = "left";
@@ -67,13 +71,13 @@
     private static final String KEYCODE = "keycode";
     private static final String ICON = "icon";
 
-    private static final int[] ICONS = new int[]{
-            R.drawable.ic_qs_circle,
-            R.drawable.ic_add,
-            R.drawable.ic_remove,
-            R.drawable.ic_left,
-            R.drawable.ic_right,
-            R.drawable.ic_menu,
+    private static final int[][] ICONS = new int[][]{
+            {R.drawable.ic_qs_circle, R.string.tuner_circle},
+            {R.drawable.ic_add, R.string.tuner_plus},
+            {R.drawable.ic_remove, R.string.tuner_minus},
+            {R.drawable.ic_left, R.string.tuner_left},
+            {R.drawable.ic_right, R.string.tuner_right},
+            {R.drawable.ic_menu, R.string.tuner_menu},
     };
 
     private final ArrayList<Tunable> mTunables = new ArrayList<>();
@@ -95,21 +99,19 @@
     public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
         addPreferencesFromResource(R.xml.nav_bar_tuner);
         bindLayout((ListPreference) findPreference(LAYOUT));
-        bindButton((PreferenceCategory) findPreference(LEFT),
-                NAV_BAR_LEFT, NAVSPACE);
-        bindButton((PreferenceCategory) findPreference(RIGHT),
-                NAV_BAR_RIGHT, MENU_IME);
+        bindButton(NAV_BAR_LEFT, NAVSPACE, LEFT);
+        bindButton(NAV_BAR_RIGHT, MENU_IME, RIGHT);
     }
 
     @Override
     public void onDestroy() {
         super.onDestroy();
-        mTunables.forEach(t -> TunerService.get(getContext()).removeTunable(t));
+        mTunables.forEach(t -> Dependency.get(TunerService.class).removeTunable(t));
     }
 
     private void addTunable(Tunable tunable, String... keys) {
         mTunables.add(tunable);
-        TunerService.get(getContext()).addTunable(tunable, keys);
+        Dependency.get(TunerService.class).addTunable(tunable, keys);
     }
 
     private void bindLayout(ListPreference preference) {
@@ -123,14 +125,13 @@
         preference.setOnPreferenceChangeListener((preference1, newValue) -> {
             String val = (String) newValue;
             if ("default".equals(val)) val = null;
-            TunerService.get(getContext()).setValue(NAV_BAR_VIEWS, val);
+            Dependency.get(TunerService.class).setValue(NAV_BAR_VIEWS, val);
             return true;
         });
     }
 
-    private void bindButton(PreferenceCategory parent, String setting, String def) {
-        String k = parent.getKey();
-        DropDownPreference type = (DropDownPreference) findPreference(TYPE + "_" + k);
+    private void bindButton(String setting, String def, String k) {
+        ListPreference type = (ListPreference) findPreference(TYPE + "_" + k);
         Preference keycode = findPreference(KEYCODE + "_" + k);
         ListPreference icon = (ListPreference) findPreference(ICON + "_" + k);
         setupIcons(icon);
@@ -194,8 +195,14 @@
                     .loadDrawable(getContext());
             d.setTint(Color.BLACK);
             d.setBounds(0, 0, size, size);
-            ImageSpan span = new ImageSpan(d);
+            ImageSpan span = new ImageSpan(d, ImageSpan.ALIGN_BASELINE);
             builder.append("  ", span, 0);
+            builder.append(" ");
+            for (int i = 0; i < ICONS.length; i++) {
+                if (ICONS[i][0] == id) {
+                    builder.append(getString(ICONS[i][1]));
+                }
+            }
             icon.setSummary(builder);
         } catch (Exception e) {
             Log.d("NavButton", "Problem with summary", e);
@@ -203,7 +210,7 @@
         }
     }
 
-    private void setValue(String setting, DropDownPreference type, Preference keycode,
+    private void setValue(String setting, ListPreference type, Preference keycode,
             ListPreference icon) {
         String button = type.getValue();
         if (KEY.equals(button)) {
@@ -215,7 +222,7 @@
             }
             button = button + KEY_CODE_START + code + KEY_IMAGE_DELIM + uri + KEY_CODE_END;
         }
-        TunerService.get(getContext()).setValue(setting, button);
+        Dependency.get(TunerService.class).setValue(setting, button);
     }
 
     private void setupIcons(ListPreference icon) {
@@ -225,14 +232,16 @@
                 getContext().getResources().getDisplayMetrics());
         for (int i = 0; i < ICONS.length; i++) {
             SpannableStringBuilder builder = new SpannableStringBuilder();
-            Drawable d = Icon.createWithResource(getContext().getPackageName(), ICONS[i])
+            Drawable d = Icon.createWithResource(getContext().getPackageName(), ICONS[i][0])
                     .loadDrawable(getContext());
             d.setTint(Color.BLACK);
             d.setBounds(0, 0, size, size);
-            ImageSpan span = new ImageSpan(d);
+            ImageSpan span = new ImageSpan(d, ImageSpan.ALIGN_BASELINE);
             builder.append("  ", span, 0);
+            builder.append(" ");
+            builder.append(getString(ICONS[i][1]));
             labels[i] = builder;
-            values[i] = getContext().getPackageName() + "/" + ICONS[i];
+            values[i] = getContext().getPackageName() + "/" + ICONS[i][0];
         }
         icon.setEntries(labels);
         icon.setEntryValues(values);
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/PreviewNavInflater.java b/packages/SystemUI/src/com/android/systemui/tuner/PreviewNavInflater.java
index e6e8f4e..e7a695f 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/PreviewNavInflater.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/PreviewNavInflater.java
@@ -18,6 +18,7 @@
 import android.util.AttributeSet;
 import android.view.MotionEvent;
 
+import com.android.systemui.Dependency;
 import com.android.systemui.statusbar.phone.NavigationBarInflaterView;
 
 public class PreviewNavInflater extends NavigationBarInflaterView {
@@ -31,7 +32,7 @@
         super.onAttachedToWindow();
         // Immediately remove tuner listening, since this is a preview, all values will be injected
         // manually.
-        TunerService.get(getContext()).removeTunable(this);
+        Dependency.get(TunerService.class).removeTunable(this);
     }
 
     @Override
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/RadioListPreference.java b/packages/SystemUI/src/com/android/systemui/tuner/RadioListPreference.java
new file mode 100644
index 0000000..dc0d8bf
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/tuner/RadioListPreference.java
@@ -0,0 +1,145 @@
+/*
+ * 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.tuner;
+
+import android.app.AlertDialog.Builder;
+import android.app.Dialog;
+import android.app.DialogFragment;
+import android.app.Fragment;
+import android.content.Context;
+import android.content.DialogInterface.OnClickListener;
+import android.os.Bundle;
+import android.support.v14.preference.PreferenceFragment;
+import android.support.v7.preference.Preference;
+import android.support.v7.preference.PreferenceScreen;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.View;
+import android.widget.Toolbar;
+
+import com.android.settingslib.Utils;
+import com.android.systemui.fragments.FragmentHostManager;
+import com.android.systemui.R;
+
+import libcore.util.Objects;
+
+public class RadioListPreference extends CustomListPreference {
+
+    private OnClickListener mOnClickListener;
+    private CharSequence mSummary;
+
+    public RadioListPreference(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    @Override
+    protected void onPrepareDialogBuilder(Builder builder, OnClickListener listener) {
+        mOnClickListener = listener;
+    }
+
+    @Override
+    public void setSummary(CharSequence summary) {
+        super.setSummary(summary);
+        mSummary = summary;
+    }
+
+    @Override
+    public CharSequence getSummary() {
+        if (mSummary == null || mSummary.toString().contains("%s")) {
+            return super.getSummary();
+        }
+        return mSummary;
+    }
+
+    @Override
+    protected Dialog onDialogCreated(DialogFragment fragment, Dialog dialog) {
+        Dialog d = new Dialog(getContext(), android.R.style.Theme_DeviceDefault_Settings);
+        Toolbar t = (Toolbar) d.findViewById(com.android.internal.R.id.action_bar);
+        View v = new View(getContext());
+        v.setId(R.id.content);
+        d.setContentView(v);
+        t.setTitle(getTitle());
+        t.setNavigationIcon(Utils.getDrawable(d.getContext(), android.R.attr.homeAsUpIndicator));
+        t.setNavigationOnClickListener(view -> d.dismiss());
+
+        RadioFragment f = new RadioFragment();
+        f.setPreference(this);
+        FragmentHostManager.get(v).getFragmentManager()
+                .beginTransaction()
+                .add(android.R.id.content, f)
+                .commit();
+        return d;
+    }
+
+    @Override
+    protected void onDialogStateRestored(DialogFragment fragment, Dialog dialog,
+            Bundle savedInstanceState) {
+        super.onDialogStateRestored(fragment, dialog, savedInstanceState);
+        View view = dialog.findViewById(R.id.content);
+        RadioFragment radioFragment = (RadioFragment) FragmentHostManager.get(view)
+                .getFragmentManager().findFragmentById(R.id.content);
+        if (radioFragment != null) {
+            radioFragment.setPreference(this);
+        }
+    }
+
+    @Override
+    protected void onDialogClosed(boolean positiveResult) {
+        super.onDialogClosed(positiveResult);
+    }
+
+    public static class RadioFragment extends TunerPreferenceFragment {
+        private RadioListPreference mListPref;
+
+        @Override
+        public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
+            Context context = getPreferenceManager().getContext();
+            PreferenceScreen screen = getPreferenceManager().createPreferenceScreen(context);
+            setPreferenceScreen(screen);
+            if (mListPref != null) {
+                update();
+            }
+        }
+
+        private void update() {
+            Context context = getPreferenceManager().getContext();
+
+            CharSequence[] entries = mListPref.getEntries();
+            CharSequence[] values = mListPref.getEntryValues();
+            CharSequence current = mListPref.getValue();
+            for (int i = 0; i < entries.length; i++) {
+                CharSequence entry = entries[i];
+                SelectablePreference pref = new SelectablePreference(context);
+                getPreferenceScreen().addPreference(pref);
+                pref.setTitle(entry);
+                pref.setChecked(Objects.equal(current, values[i]));
+                pref.setKey(String.valueOf(i));
+            }
+        }
+
+        @Override
+        public boolean onPreferenceTreeClick(Preference preference) {
+            mListPref.mOnClickListener.onClick(null, Integer.parseInt(preference.getKey()));
+            return true;
+        }
+
+        public void setPreference(RadioListPreference radioListPreference) {
+            mListPref = radioListPreference;
+            if (getPreferenceManager() != null) {
+                update();
+            }
+        }
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/SelectablePreference.java b/packages/SystemUI/src/com/android/systemui/tuner/SelectablePreference.java
new file mode 100644
index 0000000..1d15708
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/tuner/SelectablePreference.java
@@ -0,0 +1,45 @@
+/*
+ * 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.tuner;
+
+import android.content.Context;
+import android.graphics.drawable.Drawable;
+import android.support.v7.preference.CheckBoxPreference;
+import android.util.TypedValue;
+
+import com.android.systemui.statusbar.ScalingDrawableWrapper;
+
+public class SelectablePreference extends CheckBoxPreference {
+    private final int mSize;
+
+    public SelectablePreference(Context context) {
+        super(context);
+        setWidgetLayoutResource(com.android.systemui.R.layout.preference_widget_radiobutton);
+        setSelectable(true);
+        mSize = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 32,
+                context.getResources().getDisplayMetrics());
+    }
+
+    @Override
+    public void setIcon(Drawable icon) {
+        super.setIcon(new ScalingDrawableWrapper(icon,
+                mSize / (float) icon.getIntrinsicWidth()));
+    }
+
+    @Override
+    public String toString() {
+        return "";
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/ShortcutPicker.java b/packages/SystemUI/src/com/android/systemui/tuner/ShortcutPicker.java
new file mode 100644
index 0000000..533388a
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/tuner/ShortcutPicker.java
@@ -0,0 +1,200 @@
+/*
+ * 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.tuner;
+
+import static com.android.systemui.tuner.LockscreenFragment.LOCKSCREEN_LEFT_BUTTON;
+
+import android.content.Context;
+import android.content.pm.LauncherActivityInfo;
+import android.content.pm.LauncherApps;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.graphics.drawable.ColorDrawable;
+import android.os.Bundle;
+import android.os.Process;
+import android.support.v14.preference.PreferenceFragment;
+import android.support.v7.preference.Preference;
+import android.support.v7.preference.PreferenceCategory;
+import android.support.v7.preference.PreferenceScreen;
+import android.support.v7.preference.PreferenceViewHolder;
+
+import com.android.systemui.Dependency;
+import com.android.systemui.R;
+import com.android.systemui.tuner.ShortcutParser.Shortcut;
+import com.android.systemui.tuner.TunerService.Tunable;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class ShortcutPicker extends PreferenceFragment implements Tunable {
+
+    private final ArrayList<SelectablePreference> mSelectablePreferences = new ArrayList<>();
+    private String mKey;
+    private SelectablePreference mNonePreference;
+    private TunerService mTunerService;
+
+    @Override
+    public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
+        Context context = getPreferenceManager().getContext();
+        PreferenceScreen screen = getPreferenceManager().createPreferenceScreen(context);
+        screen.setOrderingAsAdded(true);
+        PreferenceCategory otherApps = new PreferenceCategory(context);
+        otherApps.setTitle(R.string.tuner_other_apps);
+
+        mNonePreference = new SelectablePreference(context);
+        mSelectablePreferences.add(mNonePreference);
+        mNonePreference.setTitle(R.string.lockscreen_none);
+        mNonePreference.setIcon(R.drawable.ic_remove_circle);
+        screen.addPreference(mNonePreference);
+
+        LauncherApps apps = getContext().getSystemService(LauncherApps.class);
+        List<LauncherActivityInfo> activities = apps.getActivityList(null,
+                Process.myUserHandle());
+
+        screen.addPreference(otherApps);
+        activities.forEach(info -> {
+            try {
+                List<Shortcut> shortcuts = new ShortcutParser(getContext(),
+                        info.getComponentName()).getShortcuts();
+                AppPreference appPreference = new AppPreference(context, info);
+                mSelectablePreferences.add(appPreference);
+                if (shortcuts.size() != 0) {
+                    //PreferenceCategory category = new PreferenceCategory(context);
+                    //screen.addPreference(category);
+                    //category.setTitle(info.getLabel());
+                    screen.addPreference(appPreference);
+                    shortcuts.forEach(shortcut -> {
+                        ShortcutPreference shortcutPref = new ShortcutPreference(context, shortcut,
+                                info.getLabel());
+                        mSelectablePreferences.add(shortcutPref);
+                        screen.addPreference(shortcutPref);
+                    });
+                    return;
+                }
+                otherApps.addPreference(appPreference);
+            } catch (NameNotFoundException e) {
+            }
+        });
+        // Move other apps to the bottom.
+        screen.removePreference(otherApps);
+        for (int i = 0; i < otherApps.getPreferenceCount(); i++) {
+            Preference p = otherApps.getPreference(0);
+            otherApps.removePreference(p);
+            p.setOrder(Preference.DEFAULT_ORDER);
+            screen.addPreference(p);
+        }
+        //screen.addPreference(otherApps);
+
+        setPreferenceScreen(screen);
+        mKey = getArguments().getString(ARG_PREFERENCE_ROOT);
+        mTunerService = Dependency.get(TunerService.class);
+        mTunerService.addTunable(this, mKey);
+    }
+
+    @Override
+    public boolean onPreferenceTreeClick(Preference preference) {
+        mTunerService.setValue(mKey, preference.toString());
+        getActivity().onBackPressed();
+        return true;
+    }
+
+    @Override
+    public void onActivityCreated(Bundle savedInstanceState) {
+        super.onActivityCreated(savedInstanceState);
+        if (LOCKSCREEN_LEFT_BUTTON.equals(mKey)) {
+            getActivity().setTitle(R.string.lockscreen_shortcut_left);
+        } else {
+            getActivity().setTitle(R.string.lockscreen_shortcut_right);
+        }
+    }
+
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        mTunerService.removeTunable(this);
+    }
+
+    @Override
+    public void onTuningChanged(String key, String newValue) {
+        String v = newValue != null ? newValue : "";
+        mSelectablePreferences.forEach(p -> p.setChecked(v.equals(p.toString())));
+    }
+
+    private static class AppPreference extends SelectablePreference {
+        private final LauncherActivityInfo mInfo;
+        private boolean mBinding;
+
+        public AppPreference(Context context, LauncherActivityInfo info) {
+            super(context);
+            mInfo = info;
+            setTitle(context.getString(R.string.tuner_launch_app, info.getLabel()));
+            setSummary(context.getString(R.string.tuner_app, info.getLabel()));
+        }
+
+        @Override
+        public void onBindViewHolder(PreferenceViewHolder holder) {
+            mBinding = true;
+            if (getIcon() == null) {
+                setIcon(mInfo.getBadgedIcon(
+                        getContext().getResources().getConfiguration().densityDpi));
+            }
+            mBinding = false;
+            super.onBindViewHolder(holder);
+        }
+
+        @Override
+        protected void notifyChanged() {
+            if (mBinding) return;
+            super.notifyChanged();
+        }
+
+        @Override
+        public String toString() {
+            return mInfo.getComponentName().flattenToString();
+        }
+    }
+
+    private static class ShortcutPreference extends SelectablePreference {
+        private final Shortcut mShortcut;
+        private boolean mBinding;
+
+        public ShortcutPreference(Context context, Shortcut shortcut, CharSequence appLabel) {
+            super(context);
+            mShortcut = shortcut;
+            setTitle(shortcut.label);
+            setSummary(context.getString(R.string.tuner_app, appLabel));
+        }
+
+        @Override
+        public void onBindViewHolder(PreferenceViewHolder holder) {
+            mBinding = true;
+            if (getIcon() == null) {
+                setIcon(mShortcut.icon.loadDrawable(getContext()));
+            }
+            mBinding = false;
+            super.onBindViewHolder(holder);
+        }
+
+        @Override
+        protected void notifyChanged() {
+            if (mBinding) return;
+            super.notifyChanged();
+        }
+
+        @Override
+        public String toString() {
+            return mShortcut.toString();
+        }
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/StatusBarSwitch.java b/packages/SystemUI/src/com/android/systemui/tuner/StatusBarSwitch.java
index dea2f50..8a2407a 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/StatusBarSwitch.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/StatusBarSwitch.java
@@ -25,6 +25,7 @@
 
 import com.android.internal.logging.MetricsLogger;
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
+import com.android.systemui.Dependency;
 import com.android.systemui.statusbar.phone.StatusBarIconController;
 import com.android.systemui.tuner.TunerService.Tunable;
 
@@ -41,12 +42,12 @@
     @Override
     public void onAttached() {
         super.onAttached();
-        TunerService.get(getContext()).addTunable(this, StatusBarIconController.ICON_BLACKLIST);
+        Dependency.get(TunerService.class).addTunable(this, StatusBarIconController.ICON_BLACKLIST);
     }
 
     @Override
     public void onDetached() {
-        TunerService.get(getContext()).removeTunable(this);
+        Dependency.get(TunerService.class).removeTunable(this);
         super.onDetached();
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java b/packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java
index 3b14e60..4eb1db6 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java
@@ -22,9 +22,12 @@
 import android.support.v7.preference.Preference;
 import android.support.v7.preference.PreferenceScreen;
 import android.util.Log;
+import android.view.MenuItem;
 
 import com.android.settingslib.drawer.SettingsDrawerActivity;
+import com.android.systemui.Dependency;
 import com.android.systemui.R;
+import com.android.systemui.fragments.FragmentService;
 
 public class TunerActivity extends SettingsDrawerActivity implements
         PreferenceFragment.OnPreferenceStartFragmentCallback,
@@ -36,6 +39,7 @@
 
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
+        Dependency.initDependencies(this);
 
         if (getFragmentManager().findFragmentByTag(TAG_TUNER) == null) {
             final String action = getIntent().getAction();
@@ -49,6 +53,22 @@
     }
 
     @Override
+    protected void onDestroy() {
+        super.onDestroy();
+        Dependency.destroy(FragmentService.class, s -> s.destroyAll());
+        Dependency.clearDependencies();
+    }
+
+    @Override
+    public boolean onMenuItemSelected(int featureId, MenuItem item) {
+        if (item.getItemId() == android.R.id.home) {
+            onBackPressed();
+            return true;
+        }
+        return super.onMenuItemSelected(featureId, item);
+    }
+
+    @Override
     public void onBackPressed() {
         if (!getFragmentManager().popBackStackImmediate()) {
             super.onBackPressed();
@@ -60,6 +80,9 @@
         try {
             Class<?> cls = Class.forName(pref.getFragment());
             Fragment fragment = (Fragment) cls.newInstance();
+            final Bundle b = new Bundle(1);
+            b.putString(PreferenceFragment.ARG_PREFERENCE_ROOT, pref.getKey());
+            fragment.setArguments(b);
             FragmentTransaction transaction = getFragmentManager().beginTransaction();
             setTitle(pref.getTitle());
             transaction.replace(R.id.content_frame, fragment);
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/TunerPreferenceFragment.java b/packages/SystemUI/src/com/android/systemui/tuner/TunerPreferenceFragment.java
new file mode 100644
index 0000000..06d40da
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/tuner/TunerPreferenceFragment.java
@@ -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 com.android.systemui.tuner;
+
+import android.app.DialogFragment;
+import android.os.Bundle;
+import android.support.v14.preference.PreferenceFragment;
+import android.support.v7.preference.Preference;
+
+public abstract class TunerPreferenceFragment extends PreferenceFragment {
+
+    @Override
+    public void onDisplayPreferenceDialog(Preference preference) {
+        DialogFragment f = null;
+        if (preference instanceof CustomListPreference) {
+            f = CustomListPreference.CustomListPreferenceDialogFragment
+                    .newInstance(preference.getKey());
+        } else {
+            super.onDisplayPreferenceDialog(preference);
+        }
+        f.setTargetFragment(this, 0);
+        f.show(getFragmentManager(), "dialog_preference");
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/TunerService.java b/packages/SystemUI/src/com/android/systemui/tuner/TunerService.java
index fb94061..6a92b2f 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/TunerService.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/TunerService.java
@@ -38,20 +38,24 @@
 import android.util.ArrayMap;
 import android.util.ArraySet;
 
-import com.android.systemui.BatteryMeterDrawable;
+import static com.android.systemui.BatteryMeterView.SHOW_PERCENT_SETTING;
 import com.android.systemui.DemoMode;
+import com.android.systemui.Dependency;
 import com.android.systemui.R;
+import com.android.systemui.SysUiServiceProvider;
 import com.android.systemui.SystemUI;
 import com.android.systemui.SystemUIApplication;
 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;
 
 
-public class TunerService extends SystemUI {
+public class TunerService {
 
     public static final String ACTION_CLEAR = "com.android.systemui.action.CLEAR_TUNER";
 
@@ -64,13 +68,16 @@
     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;
     private int mCurrentUser;
     private CurrentUserTracker mUserTracker;
 
-    @Override
-    public void start() {
+    public TunerService(Context context) {
+        mContext = context;
         mContentResolver = mContext.getContentResolver();
 
         for (UserInfo user : UserManager.get(mContext).getUsers()) {
@@ -79,7 +86,6 @@
                 upgradeTuner(getValue(TUNER_VERSION, 0), CURRENT_TUNER_VERSION);
             }
         }
-        putComponent(TunerService.class, this);
 
         mCurrentUser = ActivityManager.getCurrentUser();
         mUserTracker = new CurrentUserTracker(mContext) {
@@ -148,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);
@@ -162,6 +172,9 @@
         for (Set<Tunable> list : mTunableLookup.values()) {
             list.remove(tunable);
         }
+        if (LeakDetector.ENABLED) {
+            mTunables.remove(tunable);
+        }
     }
 
     protected void reregisterAll() {
@@ -199,7 +212,8 @@
     public void clearAll() {
         // A couple special cases.
         Settings.Global.putString(mContentResolver, DemoMode.DEMO_MODE_ALLOWED, null);
-        Settings.System.putString(mContentResolver, BatteryMeterDrawable.SHOW_PERCENT_SETTING, null);
+        Settings.System.putString(mContentResolver,
+                SHOW_PERCENT_SETTING, null);
         Intent intent = new Intent(DemoMode.ACTION_DEMO);
         intent.putExtra(DemoMode.EXTRA_COMMAND, DemoMode.COMMAND_EXIT);
         mContext.sendBroadcast(intent);
@@ -209,32 +223,6 @@
         }
     }
 
-    // Only used in other processes, such as the tuner.
-    private static TunerService sInstance;
-
-    public static TunerService get(Context context) {
-        TunerService service = null;
-        if (context.getApplicationContext() instanceof SystemUIApplication) {
-            SystemUIApplication sysUi = (SystemUIApplication) context.getApplicationContext();
-            service = sysUi.getComponent(TunerService.class);
-        }
-        if (service == null) {
-            // Can't get it as a component, must in the tuner, lets just create one for now.
-            return getStaticService(context);
-        }
-        return service;
-    }
-
-    private static TunerService getStaticService(Context context) {
-        if (sInstance == null) {
-            sInstance = new TunerService();
-            sInstance.mContext = context.getApplicationContext();
-            sInstance.mComponents = new HashMap<>();
-            sInstance.start();
-        }
-        return sInstance;
-    }
-
     public static final void showResetRequest(final Context context, final Runnable onDisabled) {
         SystemUIDialog dialog = new SystemUIDialog(context);
         dialog.setShowForAllUsers(true);
@@ -310,7 +298,7 @@
         @Override
         public void onReceive(Context context, Intent intent) {
             if (ACTION_CLEAR.equals(intent.getAction())) {
-                get(context).clearAll();
+                Dependency.get(TunerService.class).clearAll();
             }
         }
     }
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/TunerSwitch.java b/packages/SystemUI/src/com/android/systemui/tuner/TunerSwitch.java
index 5b9ebd7..d5b6ccd 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/TunerSwitch.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/TunerSwitch.java
@@ -7,6 +7,7 @@
 import android.util.AttributeSet;
 
 import com.android.internal.logging.MetricsLogger;
+import com.android.systemui.Dependency;
 import com.android.systemui.R;
 import com.android.systemui.tuner.TunerService.Tunable;
 
@@ -26,12 +27,12 @@
     @Override
     public void onAttached() {
         super.onAttached();
-        TunerService.get(getContext()).addTunable(this, getKey().split(","));
+        Dependency.get(TunerService.class).addTunable(this, getKey().split(","));
     }
 
     @Override
     public void onDetached() {
-        TunerService.get(getContext()).removeTunable(this);
+        Dependency.get(TunerService.class).removeTunable(this);
         super.onDetached();
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
index 9a16d6d..43727e0 100644
--- a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
+++ b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
@@ -198,18 +198,19 @@
                         rec.getNickname());
                 final CharSequence text = mContext.getString(R.string.ext_media_missing_message);
 
-                Notification.Builder builder = new Notification.Builder(mContext)
-                        .setSmallIcon(R.drawable.ic_sd_card_48dp)
-                        .setColor(mContext.getColor(R.color.system_notification_accent_color))
-                        .setContentTitle(title)
-                        .setContentText(text)
-                        .setContentIntent(buildForgetPendingIntent(rec))
-                        .setStyle(new Notification.BigTextStyle().bigText(text))
-                        .setVisibility(Notification.VISIBILITY_PUBLIC)
-                        .setLocalOnly(true)
-                        .setChannel(NotificationChannels.STORAGE)
-                        .setCategory(Notification.CATEGORY_SYSTEM)
-                        .setDeleteIntent(buildSnoozeIntent(fsUuid));
+                Notification.Builder builder =
+                        new Notification.Builder(mContext, NotificationChannels.STORAGE)
+                                .setSmallIcon(R.drawable.ic_sd_card_48dp)
+                                .setColor(mContext.getColor(
+                                        R.color.system_notification_accent_color))
+                                .setContentTitle(title)
+                                .setContentText(text)
+                                .setContentIntent(buildForgetPendingIntent(rec))
+                                .setStyle(new Notification.BigTextStyle().bigText(text))
+                                .setVisibility(Notification.VISIBILITY_PUBLIC)
+                                .setLocalOnly(true)
+                                .setCategory(Notification.CATEGORY_SYSTEM)
+                                .setDeleteIntent(buildSnoozeIntent(fsUuid));
                 SystemUI.overrideNotificationAppName(mContext, builder);
 
                 mNotificationManager.notifyAsUser(fsUuid, SystemMessage.NOTE_STORAGE_PRIVATE,
@@ -226,17 +227,17 @@
             final CharSequence text = mContext.getString(
                     R.string.ext_media_unsupported_notification_message, disk.getDescription());
 
-            Notification.Builder builder = new Notification.Builder(mContext)
-                    .setChannel(NotificationChannels.STORAGE)
-                    .setSmallIcon(getSmallIcon(disk, VolumeInfo.STATE_UNMOUNTABLE))
-                    .setColor(mContext.getColor(R.color.system_notification_accent_color))
-                    .setContentTitle(title)
-                    .setContentText(text)
-                    .setContentIntent(buildInitPendingIntent(disk))
-                    .setStyle(new Notification.BigTextStyle().bigText(text))
-                    .setVisibility(Notification.VISIBILITY_PUBLIC)
-                    .setLocalOnly(true)
-                    .setCategory(Notification.CATEGORY_ERROR);
+            Notification.Builder builder =
+                    new Notification.Builder(mContext, NotificationChannels.STORAGE)
+                            .setSmallIcon(getSmallIcon(disk, VolumeInfo.STATE_UNMOUNTABLE))
+                            .setColor(mContext.getColor(R.color.system_notification_accent_color))
+                            .setContentTitle(title)
+                            .setContentText(text)
+                            .setContentIntent(buildInitPendingIntent(disk))
+                            .setStyle(new Notification.BigTextStyle().bigText(text))
+                            .setVisibility(Notification.VISIBILITY_PUBLIC)
+                            .setLocalOnly(true)
+                            .setCategory(Notification.CATEGORY_ERROR);
             SystemUI.overrideNotificationAppName(mContext, builder);
 
             mNotificationManager.notifyAsUser(disk.getId(), SystemMessage.NOTE_STORAGE_DISK,
@@ -475,19 +476,19 @@
             intent = buildWizardMigratePendingIntent(move);
         }
 
-        Notification.Builder builder = new Notification.Builder(mContext)
-                .setSmallIcon(R.drawable.ic_sd_card_48dp)
-                .setColor(mContext.getColor(R.color.system_notification_accent_color))
-                .setContentTitle(title)
-                .setContentText(text)
-                .setContentIntent(intent)
-                .setStyle(new Notification.BigTextStyle().bigText(text))
-                .setVisibility(Notification.VISIBILITY_PUBLIC)
-                .setLocalOnly(true)
-                .setChannel(NotificationChannels.STORAGE)
-                .setCategory(Notification.CATEGORY_PROGRESS)
-                .setProgress(100, status, false)
-                .setOngoing(true);
+        Notification.Builder builder =
+                new Notification.Builder(mContext, NotificationChannels.STORAGE)
+                        .setSmallIcon(R.drawable.ic_sd_card_48dp)
+                        .setColor(mContext.getColor(R.color.system_notification_accent_color))
+                        .setContentTitle(title)
+                        .setContentText(text)
+                        .setContentIntent(intent)
+                        .setStyle(new Notification.BigTextStyle().bigText(text))
+                        .setVisibility(Notification.VISIBILITY_PUBLIC)
+                        .setLocalOnly(true)
+                        .setCategory(Notification.CATEGORY_PROGRESS)
+                        .setProgress(100, status, false)
+                        .setOngoing(true);
         SystemUI.overrideNotificationAppName(mContext, builder);
 
         mNotificationManager.notifyAsUser(move.packageName, SystemMessage.NOTE_STORAGE_MOVE,
@@ -526,18 +527,18 @@
             intent = null;
         }
 
-        Notification.Builder builder = new Notification.Builder(mContext)
-                .setSmallIcon(R.drawable.ic_sd_card_48dp)
-                .setColor(mContext.getColor(R.color.system_notification_accent_color))
-                .setContentTitle(title)
-                .setContentText(text)
-                .setContentIntent(intent)
-                .setStyle(new Notification.BigTextStyle().bigText(text))
-                .setVisibility(Notification.VISIBILITY_PUBLIC)
-                .setLocalOnly(true)
-                .setCategory(Notification.CATEGORY_SYSTEM)
-                .setChannel(NotificationChannels.STORAGE)
-                .setAutoCancel(true);
+        Notification.Builder builder =
+                new Notification.Builder(mContext, NotificationChannels.STORAGE)
+                        .setSmallIcon(R.drawable.ic_sd_card_48dp)
+                        .setColor(mContext.getColor(R.color.system_notification_accent_color))
+                        .setContentTitle(title)
+                        .setContentText(text)
+                        .setContentIntent(intent)
+                        .setStyle(new Notification.BigTextStyle().bigText(text))
+                        .setVisibility(Notification.VISIBILITY_PUBLIC)
+                        .setLocalOnly(true)
+                        .setCategory(Notification.CATEGORY_SYSTEM)
+                        .setAutoCancel(true);
         SystemUI.overrideNotificationAppName(mContext, builder);
 
         mNotificationManager.notifyAsUser(move.packageName, SystemMessage.NOTE_STORAGE_MOVE,
@@ -562,15 +563,15 @@
 
     private Notification.Builder buildNotificationBuilder(VolumeInfo vol, CharSequence title,
             CharSequence text) {
-        Notification.Builder builder = new Notification.Builder(mContext)
-                .setChannel(NotificationChannels.STORAGE)
-                .setSmallIcon(getSmallIcon(vol.getDisk(), vol.getState()))
-                .setColor(mContext.getColor(R.color.system_notification_accent_color))
-                .setContentTitle(title)
-                .setContentText(text)
-                .setStyle(new Notification.BigTextStyle().bigText(text))
-                .setVisibility(Notification.VISIBILITY_PUBLIC)
-                .setLocalOnly(true);
+        Notification.Builder builder =
+                new Notification.Builder(mContext, NotificationChannels.STORAGE)
+                        .setSmallIcon(getSmallIcon(vol.getDisk(), vol.getState()))
+                        .setColor(mContext.getColor(R.color.system_notification_accent_color))
+                        .setContentTitle(title)
+                        .setContentText(text)
+                        .setStyle(new Notification.BigTextStyle().bigText(text))
+                        .setVisibility(Notification.VISIBILITY_PUBLIC)
+                        .setLocalOnly(true);
         overrideNotificationAppName(mContext, builder);
         return builder;
     }
diff --git a/packages/SystemUI/src/com/android/systemui/usb/UsbResolverActivity.java b/packages/SystemUI/src/com/android/systemui/usb/UsbResolverActivity.java
index cd465ac..ec5030b 100644
--- a/packages/SystemUI/src/com/android/systemui/usb/UsbResolverActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/usb/UsbResolverActivity.java
@@ -120,8 +120,7 @@
         }
 
         CharSequence title = getResources().getText(com.android.internal.R.string.chooseUsbActivity);
-        super.onCreate(savedInstanceState, target, title, null, rList,
-                true /* Set alwaysUseOption to true to enable "always use this app" checkbox. */ );
+        super.onCreate(savedInstanceState, target, title, null, rList, true);
 
         CheckBox alwaysUse = (CheckBox)findViewById(com.android.internal.R.id.alwaysUse);
         if (alwaysUse != null) {
diff --git a/packages/SystemUI/src/com/android/systemui/util/NotificationChannels.java b/packages/SystemUI/src/com/android/systemui/util/NotificationChannels.java
index 6bb8aea..15ad0ce 100644
--- a/packages/SystemUI/src/com/android/systemui/util/NotificationChannels.java
+++ b/packages/SystemUI/src/com/android/systemui/util/NotificationChannels.java
@@ -27,8 +27,7 @@
 public class NotificationChannels extends SystemUI {
     public static String ALERTS      = "ALR";
     public static String SCREENSHOTS = "SCN";
-    public static String SECURITY    = "SEC";
-    public static String USER        = "USR";
+    public static String GENERAL     = "GEN";
     public static String STORAGE     = "DSK";
 
     @VisibleForTesting
@@ -42,14 +41,10 @@
                 new NotificationChannel(
                         SCREENSHOTS,
                         context.getString(R.string.notification_channel_screenshot),
-                        NotificationManager.IMPORTANCE_DEFAULT),
+                        NotificationManager.IMPORTANCE_LOW),
                 new NotificationChannel(
-                        SECURITY,
-                        context.getString(R.string.notification_channel_security),
-                        NotificationManager.IMPORTANCE_HIGH),
-                new NotificationChannel(
-                        USER,
-                        context.getString(R.string.notification_channel_user_status),
+                        GENERAL,
+                        context.getString(R.string.notification_channel_general),
                         NotificationManager.IMPORTANCE_MIN),
                 new NotificationChannel(
                         STORAGE,
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/GarbageMonitor.java b/packages/SystemUI/src/com/android/systemui/util/leak/GarbageMonitor.java
new file mode 100644
index 0000000..ba9e60a
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/util/leak/GarbageMonitor.java
@@ -0,0 +1,99 @@
+/*
+ * 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 android.os.Handler;
+import android.os.Looper;
+import android.os.SystemProperties;
+import android.support.annotation.VisibleForTesting;
+
+import com.android.systemui.Dependency;
+import com.android.systemui.SystemUI;
+
+public class GarbageMonitor {
+
+    private static final String TAG = "GarbageMonitor";
+
+    private static final long GARBAGE_INSPECTION_INTERVAL = 5 * 60 * 1000; // 5min
+    private static final int GARBAGE_ALLOWANCE = 5;
+
+    private final Handler mHandler;
+    private final TrackedGarbage mTrackedGarbage;
+    private final LeakReporter mLeakReporter;
+
+    public GarbageMonitor(Looper bgLooper, LeakDetector leakDetector,
+            LeakReporter leakReporter) {
+        mHandler = bgLooper != null ? new Handler(bgLooper): null;
+        mTrackedGarbage = leakDetector.getTrackedGarbage();
+        mLeakReporter = leakReporter;
+    }
+
+    public void start() {
+        if (mTrackedGarbage == null) {
+            return;
+        }
+
+        scheduleInspectGarbage(this::inspectGarbage);
+    }
+
+    @VisibleForTesting
+    void scheduleInspectGarbage(Runnable runnable) {
+        mHandler.postDelayed(runnable, GARBAGE_INSPECTION_INTERVAL);
+    }
+
+    private void inspectGarbage() {
+        if (mTrackedGarbage.countOldGarbage() > GARBAGE_ALLOWANCE) {
+            Runtime.getRuntime().gc();
+
+            // Allow some time to for ReferenceQueue to catch up.
+            scheduleReinspectGarbage(this::reinspectGarbageAfterGc);
+        }
+        scheduleInspectGarbage(this::inspectGarbage);
+    }
+
+    @VisibleForTesting
+    void scheduleReinspectGarbage(Runnable runnable) {
+        mHandler.postDelayed(runnable, (long) 100);
+    }
+
+    private void reinspectGarbageAfterGc() {
+        int count = mTrackedGarbage.countOldGarbage();
+        if (count > GARBAGE_ALLOWANCE) {
+            mLeakReporter.dumpLeak(count);
+        }
+    }
+
+    public static class Service extends SystemUI {
+
+        // TODO(b/35345376): Turn this back on for debuggable builds after known leak fixed.
+        private static final boolean ENABLED = Build.IS_DEBUGGABLE
+                && SystemProperties.getBoolean("debug.enable_leak_reporting", false);
+
+        private GarbageMonitor mGarbageMonitor;
+
+        @Override
+        public void start() {
+            if (!ENABLED) {
+                return;
+            }
+            mGarbageMonitor = Dependency.get(GarbageMonitor.class);
+            mGarbageMonitor.start();
+        }
+    }
+}
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..574fdb98
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/util/leak/LeakDetector.java
@@ -0,0 +1,143 @@
+/*
+ * 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);
+        }
+    }
+
+    TrackedGarbage getTrackedGarbage() {
+        return mTrackedGarbage;
+    }
+
+    @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/LeakReporter.java b/packages/SystemUI/src/com/android/systemui/util/leak/LeakReporter.java
new file mode 100644
index 0000000..a247f3f
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/util/leak/LeakReporter.java
@@ -0,0 +1,142 @@
+/*
+ * 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.app.Notification;
+import android.app.NotificationChannel;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
+import android.content.ClipData;
+import android.content.Context;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Debug;
+import android.os.SystemProperties;
+import android.os.UserHandle;
+import android.support.v4.content.FileProvider;
+import android.util.Log;
+
+import com.google.android.collect.Lists;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+
+/**
+ * Dumps data to debug leaks and posts a notification to share the data.
+ */
+public class LeakReporter {
+
+    static final String TAG = "LeakReporter";
+
+    public static final String FILEPROVIDER_AUTHORITY = "com.android.systemui.fileprovider";
+
+    static final String LEAK_DIR = "leak";
+    static final String LEAK_HPROF = "leak.hprof";
+    static final String LEAK_DUMP = "leak.dump";
+
+    private final Context mContext;
+    private final LeakDetector mLeakDetector;
+    private final String mLeakReportEmail;
+
+    public LeakReporter(Context context, LeakDetector leakDetector, String leakReportEmail) {
+        mContext = context;
+        mLeakDetector = leakDetector;
+        mLeakReportEmail = leakReportEmail;
+    }
+
+    public void dumpLeak(int garbageCount) {
+        try {
+            File leakDir = new File(mContext.getCacheDir(), LEAK_DIR);
+            leakDir.mkdir();
+
+            File hprofFile = new File(leakDir, LEAK_HPROF);
+            Debug.dumpHprofData(hprofFile.getAbsolutePath());
+
+            File dumpFile = new File(leakDir, LEAK_DUMP);
+            try (FileOutputStream fos = new FileOutputStream(dumpFile)) {
+                PrintWriter w = new PrintWriter(fos);
+                w.print("Build: "); w.println(SystemProperties.get("ro.build.description"));
+                w.println();
+                w.flush();
+                mLeakDetector.dump(fos.getFD(), w, new String[0]);
+                w.close();
+            }
+
+            NotificationManager notiMan = mContext.getSystemService(NotificationManager.class);
+
+            NotificationChannel channel = new NotificationChannel("leak", "Leak Alerts",
+                    NotificationManager.IMPORTANCE_HIGH);
+            channel.enableVibration(true);
+
+            notiMan.createNotificationChannel(channel);
+            Notification.Builder builder = new Notification.Builder(mContext, channel.getId())
+                    .setAutoCancel(true)
+                    .setShowWhen(true)
+                    .setContentTitle("Memory Leak Detected")
+                    .setContentText(String.format(
+                            "SystemUI has detected %d leaked objects. Tap to send", garbageCount))
+                    .setSmallIcon(com.android.internal.R.drawable.stat_sys_adb)
+                    .setContentIntent(PendingIntent.getActivityAsUser(mContext, 0,
+                            getIntent(hprofFile, dumpFile),
+                            PendingIntent.FLAG_UPDATE_CURRENT, null, UserHandle.CURRENT));
+            notiMan.notify(TAG, 0, builder.build());
+        } catch (IOException e) {
+            Log.e(TAG, "Couldn't dump heap for leak", e);
+        }
+    }
+
+    private Intent getIntent(File hprofFile, File dumpFile) {
+        Uri dumpUri = FileProvider.getUriForFile(mContext, FILEPROVIDER_AUTHORITY, dumpFile);
+        Uri hprofUri = FileProvider.getUriForFile(mContext, FILEPROVIDER_AUTHORITY, hprofFile);
+
+        Intent intent = new Intent(Intent.ACTION_SEND_MULTIPLE);
+        String mimeType = "application/vnd.android.leakreport";
+
+        intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
+        intent.addCategory(Intent.CATEGORY_DEFAULT);
+        intent.setType(mimeType);
+
+        final String subject = "SystemUI leak report";
+        intent.putExtra(Intent.EXTRA_SUBJECT, subject);
+
+        // EXTRA_TEXT should be an ArrayList, but some clients are expecting a single String.
+        // So, to avoid an exception on Intent.migrateExtraStreamToClipData(), we need to manually
+        // create the ClipData object with the attachments URIs.
+        final StringBuilder messageBody = new StringBuilder("Build info: ")
+                .append(SystemProperties.get("ro.build.description"));
+        intent.putExtra(Intent.EXTRA_TEXT, messageBody.toString());
+        final ClipData clipData = new ClipData(null, new String[] { mimeType },
+                new ClipData.Item(null, null, null, dumpUri));
+        final ArrayList<Uri> attachments = Lists.newArrayList(dumpUri);
+
+        clipData.addItem(new ClipData.Item(null, null, null, hprofUri));
+        attachments.add(hprofUri);
+
+        intent.setClipData(clipData);
+        intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, attachments);
+
+        String leakReportEmail = mLeakReportEmail;
+        if (leakReportEmail != null) {
+            intent.putExtra(Intent.EXTRA_EMAIL, new String[] { leakReportEmail });
+        }
+
+        return intent;
+    }
+}
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..98a6450
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/util/leak/TrackedGarbage.java
@@ -0,0 +1,126 @@
+/*
+ * 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();
+        }
+    }
+
+    public synchronized int countOldGarbage() {
+        cleanUp();
+
+        long now = SystemClock.uptimeMillis();
+
+        int result = 0;
+        for (LeakReference ref : mGarbage) {
+            if (isOld(ref.createdUptimeMillis, now)) {
+                result++;
+            }
+        }
+        return result;
+    }
+
+    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..88f8b4c
--- /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/src/com/android/systemui/volume/VolumeDialog.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
index d057d863..b9cb575 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
@@ -69,6 +69,7 @@
 import android.widget.TextView;
 
 import com.android.settingslib.Utils;
+import com.android.systemui.Dependency;
 import com.android.systemui.Interpolators;
 import com.android.systemui.R;
 import com.android.systemui.statusbar.policy.ZenModeController;
@@ -165,7 +166,7 @@
 
         controller.addCallback(mControllerCallbackH, mHandler);
         controller.getState();
-        TunerService.get(mContext).addTunable(this, SHOW_FULL_ZEN);
+        Dependency.get(TunerService.class).addTunable(this, SHOW_FULL_ZEN);
 
         final Configuration currentConfig = mContext.getResources().getConfiguration();
         mDensity = currentConfig.densityDpi;
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java
index 78145fe..0a1d34f 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java
@@ -72,7 +72,7 @@
         mDialog = new VolumeDialog(context, WindowManager.LayoutParams.TYPE_VOLUME_OVERLAY,
                 mController, mZenModeController, mVolumeDialogCallback);
         applyConfiguration();
-        TunerService.get(mContext).addTunable(this, VOLUME_DOWN_SILENT, VOLUME_UP_SILENT,
+        Dependency.get(TunerService.class).addTunable(this, VOLUME_DOWN_SILENT, VOLUME_UP_SILENT,
                 VOLUME_SILENT_DO_NOT_DISTURB);
     }
 
diff --git a/packages/SystemUI/tests/Android.mk b/packages/SystemUI/tests/Android.mk
index c627e22..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 \
@@ -43,6 +43,7 @@
     android-support-v17-leanback
 
 LOCAL_STATIC_JAVA_LIBRARIES := \
+    metrics-helper-lib \
     android-support-test \
     mockito-updated-target-minus-junit4 \
     SystemUI-proto \
@@ -51,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/AndroidManifest.xml b/packages/SystemUI/tests/AndroidManifest.xml
index 408e8f3..41b75ff 100644
--- a/packages/SystemUI/tests/AndroidManifest.xml
+++ b/packages/SystemUI/tests/AndroidManifest.xml
@@ -17,6 +17,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.android.systemui.tests">
 
+    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
     <uses-permission android:name="android.permission.ACCESS_VOICE_INTERACTION_SERVICE" />
     <uses-permission android:name="android.permission.INJECT_EVENTS" />
     <uses-permission android:name="android.permission.READ_PHONE_STATE" />
@@ -34,6 +35,7 @@
     <uses-permission android:name="android.permission.CONNECTIVITY_INTERNAL" />
     <uses-permission android:name="android.permission.MANAGE_NETWORK_POLICY" />
     <uses-permission android:name="android.permission.REQUEST_NETWORK_SCORES" />
+    <uses-permission android:name="android.permission.CONTROL_VPN" />
 
     <application>
         <uses-library android:name="android.test.runner" />
diff --git a/packages/SystemUI/tests/res/layout/custom_view_dark.xml b/packages/SystemUI/tests/res/layout/custom_view_dark.xml
new file mode 100644
index 0000000..9e460a5
--- /dev/null
+++ b/packages/SystemUI/tests/res/layout/custom_view_dark.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="#ff000000"
+    />
diff --git a/packages/SystemUI/tests/src/com/android/systemui/BatteryMeterDrawableTest.java b/packages/SystemUI/tests/src/com/android/systemui/BatteryMeterDrawableTest.java
index cb0f7a3..6b47ada 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/BatteryMeterDrawableTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/BatteryMeterDrawableTest.java
@@ -16,7 +16,7 @@
 
 package com.android.systemui;
 
-import static junit.framework.Assert.assertEquals;
+import com.android.settingslib.graph.BatteryMeterDrawableBase;
 
 import static org.mockito.Mockito.any;
 import static org.mockito.Mockito.anyFloat;
@@ -42,35 +42,18 @@
 public class BatteryMeterDrawableTest extends SysuiTestCase {
 
     private Resources mResources;
-    private BatteryMeterDrawable mBatteryMeter;
+    private BatteryMeterDrawableBase mBatteryMeter;
 
     @Before
     public void setUp() throws Exception {
         mResources = mContext.getResources();
-        mBatteryMeter = new BatteryMeterDrawable(mContext, 0);
-    }
-
-    @Test
-    public void testGetIntrinsicSize() {
-        assertEquals(
-                mResources.getDimensionPixelSize(R.dimen.battery_width),
-                mBatteryMeter.getIntrinsicWidth());
-        assertEquals(
-                mResources.getDimensionPixelSize(R.dimen.battery_height),
-                mBatteryMeter.getIntrinsicHeight());
-    }
-
-    @Test
-    public void testDrawNothingBeforeOnBatteryLevelChanged() {
-        final Canvas canvas = mock(Canvas.class);
-        mBatteryMeter.draw(canvas);
-        verify(canvas, never()).drawPath(any(), any());
-        verify(canvas, never()).drawText(anyString(), anyFloat(), anyFloat(), any());
+        mBatteryMeter = new BatteryMeterDrawableBase(mContext, 0);
     }
 
     @Test
     public void testDrawImageButNoTextIfPluggedIn() {
-        mBatteryMeter.onBatteryLevelChanged(0, true, true);
+        mBatteryMeter.setBatteryLevel(0);
+        mBatteryMeter.setPluggedIn(true);
         final Canvas canvas = mock(Canvas.class);
         mBatteryMeter.draw(canvas);
         verify(canvas, atLeastOnce()).drawPath(any(), any());
@@ -79,7 +62,8 @@
 
     @Test
     public void testDrawTextIfNotPluggedIn() {
-        mBatteryMeter.onBatteryLevelChanged(0, false, false);
+        mBatteryMeter.setBatteryLevel(0);
+        mBatteryMeter.setPluggedIn(false);
         final Canvas canvas = mock(Canvas.class);
         mBatteryMeter.draw(canvas);
         verify(canvas, times(1)).drawText(anyString(), anyFloat(), anyFloat(), any());
@@ -87,8 +71,9 @@
 
     @Test
     public void testDrawNoTextIfPowerSaveEnabled() {
-        mBatteryMeter.onBatteryLevelChanged(0, false, false);
-        mBatteryMeter.onPowerSaveChanged(true);
+        mBatteryMeter.setBatteryLevel(0);
+        mBatteryMeter.setPluggedIn(false);
+        mBatteryMeter.setPowerSave(true);
         final Canvas canvas = mock(Canvas.class);
         mBatteryMeter.draw(canvas);
         verify(canvas, never()).drawText(anyString(), anyFloat(), anyFloat(), any());
@@ -98,7 +83,8 @@
     public void testDrawTextWarningAtCriticalLevel() {
         int criticalLevel = mResources.getInteger(
                 com.android.internal.R.integer.config_criticalBatteryWarningLevel);
-        mBatteryMeter.onBatteryLevelChanged(criticalLevel, false, false);
+        mBatteryMeter.setBatteryLevel(criticalLevel);
+        mBatteryMeter.setPluggedIn(false);
         final Canvas canvas = mock(Canvas.class);
         mBatteryMeter.draw(canvas);
         String warningString = mResources.getString(R.string.battery_meter_very_low_overlay_symbol);
@@ -109,7 +95,8 @@
     public void testDrawTextNoWarningAboveCriticalLevel() {
         int criticalLevel = mResources.getInteger(
                 com.android.internal.R.integer.config_criticalBatteryWarningLevel);
-        mBatteryMeter.onBatteryLevelChanged(criticalLevel + 1, false, false);
+        mBatteryMeter.setBatteryLevel(criticalLevel + 1);
+        mBatteryMeter.setPluggedIn(false);
         final Canvas canvas = mock(Canvas.class);
         mBatteryMeter.draw(canvas);
         String warningString = mResources.getString(R.string.battery_meter_very_low_overlay_symbol);
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 447edac..1678d92 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/FragmentTestCase.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/FragmentTestCase.java
@@ -19,13 +19,18 @@
 import android.app.FragmentController;
 import android.app.FragmentHostCallback;
 import android.app.FragmentManagerNonConfig;
+import android.graphics.PixelFormat;
 import android.os.Handler;
-import android.os.HandlerThread;
+import android.os.Looper;
 import android.os.Parcelable;
 import android.view.LayoutInflater;
 import android.view.View;
+import android.view.WindowManager;
+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;
 
 import org.junit.After;
@@ -45,7 +50,6 @@
 
     private static final int VIEW_ID = 42;
     private final Class<? extends Fragment> mCls;
-    private HandlerThread mHandlerThread;
     private Handler mHandler;
     private FrameLayout mView;
     protected FragmentController mFragments;
@@ -56,14 +60,14 @@
     }
 
     @Before
-    public void setupFragment() throws IllegalAccessException, InstantiationException {
+    public void setupFragment() throws Exception {
         mView = new FrameLayout(mContext);
         mView.setId(VIEW_ID);
-        mHandlerThread = new HandlerThread("FragmentTestThread");
-        mHandlerThread.start();
-        mHandler = new Handler(mHandlerThread.getLooper());
-        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()
@@ -72,67 +76,98 @@
         });
     }
 
+    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());
         }
-        mHandlerThread.quit();
     }
 
     @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
+    public void testAttachDetach() {
+        WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
+                LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT,
+                LayoutParams.TYPE_SYSTEM_ALERT,
+                0, PixelFormat.TRANSLUCENT);
+        mFragments.dispatchResume();
+        processAllMessages();
+        attachFragmentToWindow();
+        detachFragmentToWindow();
+        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 f258e5d..6c454e1 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java
@@ -18,29 +18,35 @@
 import static org.mockito.Mockito.mock;
 
 import android.content.Context;
-import android.support.test.InstrumentationRegistry;
 import android.os.Handler;
 import android.os.Looper;
 import android.os.MessageQueue;
+import android.support.test.InstrumentationRegistry;
 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;
 
 import org.junit.After;
 import org.junit.Before;
 
+import java.lang.Thread.UncaughtExceptionHandler;
+
 /**
  * Base class that does System UI specific setup.
  */
 public abstract class SysuiTestCase {
 
+    private Throwable mException;
     private Handler mHandler;
     protected TestableContext mContext;
     protected TestDependency mDependency;
 
     @Before
     public void SysuiSetup() throws Exception {
+        mException = null;
         System.setProperty("dexmaker.share_classloader", "true");
         mContext = new TestableContext(InstrumentationRegistry.getTargetContext(), this);
         SystemUIFactory.createFromConfig(mContext);
@@ -65,7 +71,7 @@
         waitForIdleSync(mHandler);
     }
 
-    protected void waitForIdleSync(Handler h) {
+    public static void waitForIdleSync(Handler h) {
         validateThread(h.getLooper());
         Idler idler = new Idler(null);
         h.getLooper().getQueue().addIdleHandler(idler);
@@ -86,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);
     }
 
@@ -104,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/doze/DozeMachineTest.java b/packages/SystemUI/tests/src/com/android/systemui/doze/DozeMachineTest.java
index c3948258..32afee9 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/doze/DozeMachineTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/doze/DozeMachineTest.java
@@ -289,4 +289,12 @@
 
         assertEquals(DOZE_PULSING, mMachine.getState());
     }
+
+    @Test
+    @UiThreadTest
+    public void testWakeUp_wakesUp() {
+        mMachine.wakeUp();
+
+        assertTrue(mServiceFake.requestedWakeup);
+    }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/doze/DozeServiceFake.java b/packages/SystemUI/tests/src/com/android/systemui/doze/DozeServiceFake.java
index d12fc2c..c1e7fe4 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/doze/DozeServiceFake.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/doze/DozeServiceFake.java
@@ -22,6 +22,7 @@
 
     public boolean finished;
     public int screenState;
+    public boolean requestedWakeup;
 
     public DozeServiceFake() {
         reset();
@@ -41,4 +42,9 @@
         finished = false;
         screenState = Display.STATE_UNKNOWN;
     }
+
+    @Override
+    public void requestWakeUp() {
+        requestedWakeup = true;
+    }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/WorkLockActivityTest.java b/packages/SystemUI/tests/src/com/android/systemui/keyguard/WorkLockActivityTest.java
new file mode 100644
index 0000000..9b868db
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/WorkLockActivityTest.java
@@ -0,0 +1,111 @@
+/*
+ * 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.keyguard;
+
+import static android.app.ActivityManager.TaskDescription;
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.eq;
+import static org.mockito.Mockito.when;
+
+import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
+
+import android.annotation.ColorInt;
+import android.annotation.UserIdInt;
+import android.app.KeyguardManager;
+import android.app.admin.DevicePolicyManager;
+import android.content.Context;
+import android.content.Intent;
+import android.graphics.Color;
+import android.os.Looper;
+
+import com.android.systemui.keyguard.WorkLockActivity;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+/**
+ * runtest systemui -c com.android.systemui.keyguard.WorkLockActivityTest
+ */
+@SmallTest
+@RunWith(AndroidJUnit4.class)
+public class WorkLockActivityTest {
+    private static final @UserIdInt int USER_ID = 270;
+    private static final String TASK_LABEL = "task label";
+
+    private @Mock DevicePolicyManager mDevicePolicyManager;
+    private @Mock KeyguardManager mKeyguardManager;
+    private @Mock Context mContext;
+
+    private WorkLockActivity mActivity;
+
+    private static class WorkLockActivityTestable extends WorkLockActivity {
+        WorkLockActivityTestable(Context baseContext) {
+            super();
+            attachBaseContext(baseContext);
+        }
+    }
+
+    @Before
+    public void setUp() throws Exception {
+        MockitoAnnotations.initMocks(this);
+
+        when(mContext.getSystemService(eq(Context.DEVICE_POLICY_SERVICE)))
+                .thenReturn(mDevicePolicyManager);
+        when(mContext.getSystemService(eq(Context.KEYGUARD_SERVICE)))
+                .thenReturn(mKeyguardManager);
+
+        if (Looper.myLooper() == null) {
+            Looper.prepare();
+        }
+        mActivity = new WorkLockActivityTestable(mContext);
+    }
+
+    @Test
+    public void testBackgroundAlwaysOpaque() throws Exception {
+        final @ColorInt int orgColor = Color.rgb(250, 199, 67);
+        when(mDevicePolicyManager.getOrganizationColorForUser(eq(USER_ID))).thenReturn(orgColor);
+
+        final @ColorInt int opaqueColor= Color.rgb(164, 198, 57);
+        final @ColorInt int transparentColor = Color.argb(0, 0, 0, 0);
+        TaskDescription opaque = new TaskDescription(null, null, opaqueColor);
+        TaskDescription transparent = new TaskDescription(null, null, transparentColor);
+
+        // When a task description is provided with a suitable (opaque) primaryColor, it should be
+        // used as the scrim's background color.
+        mActivity.setIntent(new Intent()
+                .putExtra(Intent.EXTRA_USER_ID, USER_ID)
+                .putExtra(WorkLockActivity.EXTRA_TASK_DESCRIPTION, opaque));
+        assertEquals(opaqueColor, mActivity.getPrimaryColor());
+
+        // When a task description is provided but has no primaryColor / the primaryColor is
+        // transparent, the organization color should be used instead.
+        mActivity.setIntent(new Intent()
+                .putExtra(Intent.EXTRA_USER_ID, USER_ID)
+                .putExtra(WorkLockActivity.EXTRA_TASK_DESCRIPTION, transparent));
+        assertEquals(orgColor, mActivity.getPrimaryColor());
+
+        // When no task description is provided at all, it should be treated like a transparent
+        // description and the organization color shown instead.
+        mActivity.setIntent(new Intent()
+                .putExtra(Intent.EXTRA_USER_ID, USER_ID));
+        assertEquals(orgColor, mActivity.getPrimaryColor());
+    }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/plugins/PluginInstanceManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/plugins/PluginInstanceManagerTest.java
index 3715df2..658966c 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/plugins/PluginInstanceManagerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/plugins/PluginInstanceManagerTest.java
@@ -17,14 +17,27 @@
 import static junit.framework.Assert.assertFalse;
 import static junit.framework.Assert.assertNotNull;
 import static junit.framework.Assert.assertTrue;
-
 import static org.mockito.Matchers.any;
 import static org.mockito.Matchers.anyInt;
 import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
+import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
+import com.android.systemui.SysuiTestCase;
+import com.android.systemui.plugins.PluginInstanceManager.PluginInfo;
+import com.android.systemui.plugins.VersionInfo.InvalidVersionException;
+import com.android.systemui.plugins.annotations.Requires;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Mockito;
+
 import android.app.Activity;
 import android.app.NotificationManager;
 import android.content.BroadcastReceiver;
@@ -35,7 +48,6 @@
 import android.content.IntentFilter;
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageManager;
-import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.pm.ResolveInfo;
 import android.content.pm.ServiceInfo;
 import android.os.HandlerThread;
@@ -44,17 +56,6 @@
 import android.support.test.runner.AndroidJUnit4;
 import android.test.suitebuilder.annotation.SmallTest;
 
-import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.plugins.PluginInstanceManager.PluginInfo;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -72,6 +73,7 @@
     private PluginListener mMockListener;
     private PluginInstanceManager mPluginInstanceManager;
     private PluginManager mMockManager;
+    private VersionInfo mMockVersionInfo;
 
     @Before
     public void setup() throws Exception {
@@ -83,8 +85,10 @@
         mMockManager = mock(PluginManager.class);
         when(mMockManager.getClassLoader(any(), any()))
                 .thenReturn(getClass().getClassLoader());
+        mMockVersionInfo = mock(VersionInfo.class);
         mPluginInstanceManager = new PluginInstanceManager(mContextWrapper, mMockPm, "myAction",
-                mMockListener, true, mHandlerThread.getLooper(), 1, mMockManager, true);
+                mMockListener, true, mHandlerThread.getLooper(), mMockVersionInfo,
+                mMockManager, true);
         sMockPlugin = mock(Plugin.class);
         when(sMockPlugin.getVersion()).thenReturn(1);
     }
@@ -145,7 +149,7 @@
         NotificationManager nm = mock(NotificationManager.class);
         mContext.addMockSystemService(Context.NOTIFICATION_SERVICE, nm);
         setupFakePmQuery();
-        when(sMockPlugin.getVersion()).thenReturn(2);
+        doThrow(new InvalidVersionException("", false)).when(mMockVersionInfo).checkVersion(any());
 
         mPluginInstanceManager.loadAll();
 
@@ -181,7 +185,8 @@
     public void testNonDebuggable() throws Exception {
         // Create a version that thinks the build is not debuggable.
         mPluginInstanceManager = new PluginInstanceManager(mContextWrapper, mMockPm, "myAction",
-                mMockListener, true, mHandlerThread.getLooper(), 1, mMockManager, false);
+                mMockListener, true, mHandlerThread.getLooper(), mMockVersionInfo,
+                mMockManager, false);
         setupFakePmQuery();
 
         mPluginInstanceManager.loadAll();
@@ -270,6 +275,9 @@
         }
     }
 
+    // This target class doesn't matter, it just needs to have a Requires to hit the flow where
+    // the mock version info is called.
+    @Requires(target = PluginManagerTest.class, version = 1)
     public static class TestPlugin implements Plugin {
         @Override
         public int getVersion() {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/plugins/PluginManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/plugins/PluginManagerTest.java
index a58407b..09ac5a6 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/plugins/PluginManagerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/plugins/PluginManagerTest.java
@@ -32,6 +32,7 @@
 
 import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
 import com.android.systemui.SysuiTestCase;
+import com.android.systemui.plugins.annotations.ProvidesInterface;
 import com.android.systemui.plugins.PluginInstanceManager.PluginInfo;
 import com.android.systemui.plugins.PluginManager.PluginInstanceManagerFactory;
 
@@ -63,7 +64,7 @@
         mMockFactory = mock(PluginInstanceManagerFactory.class);
         mMockPluginInstance = mock(PluginInstanceManager.class);
         when(mMockFactory.createPluginInstanceManager(Mockito.any(), Mockito.any(), Mockito.any(),
-                Mockito.anyBoolean(), Mockito.any(), Mockito.anyInt(), Mockito.any()))
+                Mockito.anyBoolean(), Mockito.any(), Mockito.any(), Mockito.any()))
                 .thenReturn(mMockPluginInstance);
         mPluginManager = new PluginManager(getContext(), mMockFactory, true, mMockExceptionHandler);
         resetExceptionHandler();
@@ -76,20 +77,20 @@
         Plugin mockPlugin = mock(Plugin.class);
         when(mMockPluginInstance.getPlugin()).thenReturn(new PluginInfo(null, null, mockPlugin,
                 null));
-        Plugin result = mPluginManager.getOneShotPlugin("myAction", 1);
+        Plugin result = mPluginManager.getOneShotPlugin("myAction", TestPlugin.class);
         assertTrue(result == mockPlugin);
     }
 
     @Test
     public void testAddListener() {
-        mPluginManager.addPluginListener("myAction", mMockListener, 1);
+        mPluginManager.addPluginListener("myAction", mMockListener, TestPlugin.class);
 
         verify(mMockPluginInstance).loadAll();
     }
 
     @Test
     public void testRemoveListener() {
-        mPluginManager.addPluginListener("myAction", mMockListener, 1);
+        mPluginManager.addPluginListener("myAction", mMockListener, TestPlugin.class);
 
         mPluginManager.removePluginListener(mMockListener);
         verify(mMockPluginInstance).destroy();
@@ -101,16 +102,16 @@
                 mMockExceptionHandler);
         resetExceptionHandler();
 
-        mPluginManager.addPluginListener("myAction", mMockListener, 1);
+        mPluginManager.addPluginListener("myAction", mMockListener, TestPlugin.class);
         verify(mMockPluginInstance, Mockito.never()).loadAll();
 
-        assertNull(mPluginManager.getOneShotPlugin("myPlugin", 1));
+        assertNull(mPluginManager.getOneShotPlugin("myPlugin", TestPlugin.class));
         verify(mMockPluginInstance, Mockito.never()).getPlugin();
     }
 
     @Test
     public void testExceptionHandler_foundPlugin() {
-        mPluginManager.addPluginListener("myAction", mMockListener, 1);
+        mPluginManager.addPluginListener("myAction", mMockListener, TestPlugin.class);
         when(mMockPluginInstance.checkAndDisable(Mockito.any())).thenReturn(true);
 
         mPluginExceptionHandler.uncaughtException(Thread.currentThread(), new Throwable());
@@ -125,7 +126,7 @@
 
     @Test
     public void testExceptionHandler_noFoundPlugin() {
-        mPluginManager.addPluginListener("myAction", mMockListener, 1);
+        mPluginManager.addPluginListener("myAction", mMockListener, TestPlugin.class);
         when(mMockPluginInstance.checkAndDisable(Mockito.any())).thenReturn(false);
 
         mPluginExceptionHandler.uncaughtException(Thread.currentThread(), new Throwable());
@@ -161,4 +162,10 @@
         // Set back the real exception handler so the test can crash if it wants to.
         Thread.setDefaultUncaughtExceptionHandler(mRealExceptionHandler);
     }
+
+    @ProvidesInterface(action = TestPlugin.ACTION, version = TestPlugin.VERSION)
+    public static interface TestPlugin extends Plugin {
+        public static final String ACTION = "testAction";
+        public static final int VERSION = 1;
+    }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/plugins/VersionInfoTest.java b/packages/SystemUI/tests/src/com/android/systemui/plugins/VersionInfoTest.java
new file mode 100644
index 0000000..0d87d6b
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/plugins/VersionInfoTest.java
@@ -0,0 +1,103 @@
+/*
+ * 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.plugins;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import com.android.systemui.SysuiTestCase;
+import com.android.systemui.plugins.VersionInfo.InvalidVersionException;
+import com.android.systemui.plugins.annotations.Requires;
+import com.android.systemui.plugins.qs.QS;
+import com.android.systemui.plugins.qs.QS.Callback;
+import com.android.systemui.plugins.qs.QS.DetailAdapter;
+import com.android.systemui.plugins.qs.QS.HeightListener;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+
+public class VersionInfoTest extends SysuiTestCase {
+
+    @Rule
+    public ExpectedException mThrown = ExpectedException.none();
+
+    @Test
+    public void testHasInfo() {
+        VersionInfo info = new VersionInfo();
+        info.addClass(VersionInfoTest.class); // Has no annotations.
+        assertFalse(info.hasVersionInfo());
+
+        info.addClass(OverlayPlugin.class);
+        assertTrue(info.hasVersionInfo());
+    }
+
+    @Test
+    public void testSingleProvides() {
+        VersionInfo overlay = new VersionInfo().addClass(OverlayPlugin.class);
+        VersionInfo impl = new VersionInfo().addClass(OverlayImpl.class);
+        overlay.checkVersion(impl);
+    }
+
+    @Test
+    public void testIncorrectVersion() {
+        VersionInfo overlay = new VersionInfo().addClass(OverlayPlugin.class);
+        VersionInfo impl = new VersionInfo().addClass(OverlayImplIncorrectVersion.class);
+        mThrown.expect(InvalidVersionException.class);
+        overlay.checkVersion(impl);
+    }
+
+    @Test
+    public void testMissingRequired() {
+        VersionInfo overlay = new VersionInfo().addClass(OverlayPlugin.class);
+        VersionInfo impl = new VersionInfo();
+        mThrown.expect(InvalidVersionException.class);
+        overlay.checkVersion(impl);
+    }
+
+    @Test
+    public void testMissingDependencies() {
+        VersionInfo overlay = new VersionInfo().addClass(QS.class);
+        VersionInfo impl = new VersionInfo().addClass(QSImplNoDeps.class);
+        mThrown.expect(InvalidVersionException.class);
+        overlay.checkVersion(impl);
+    }
+
+    @Test
+    public void testHasDependencies() {
+        VersionInfo overlay = new VersionInfo().addClass(QS.class);
+        VersionInfo impl = new VersionInfo().addClass(QSImpl.class);
+        overlay.checkVersion(impl);
+    }
+
+    @Requires(target = OverlayPlugin.class, version = OverlayPlugin.VERSION)
+    public static class OverlayImpl {
+    }
+
+    @Requires(target = OverlayPlugin.class, version = 0)
+    public static class OverlayImplIncorrectVersion {
+    }
+
+    @Requires(target = QS.class, version = QS.VERSION)
+    public static class QSImplNoDeps {
+    }
+
+    @Requires(target = QS.class, version = QS.VERSION)
+    @Requires(target = Callback.class, version = Callback.VERSION)
+    @Requires(target = HeightListener.class, version = HeightListener.VERSION)
+    @Requires(target = DetailAdapter.class, version = DetailAdapter.VERSION)
+    public static class QSImpl {
+    }
+}
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 5345031..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,42 +14,37 @@
 
 package com.android.systemui.qs;
 
+import static org.junit.Assert.assertEquals;
 import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
 
-import android.os.Handler;
 import android.os.Looper;
-import android.support.test.runner.AndroidJUnit4;
 
 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.BatteryController;
-import com.android.systemui.statusbar.policy.BluetoothController;
-import com.android.systemui.statusbar.policy.CastController;
-import com.android.systemui.statusbar.policy.FlashlightController;
-import com.android.systemui.statusbar.policy.HotspotController;
-import com.android.systemui.statusbar.policy.KeyguardMonitor;
-import com.android.systemui.statusbar.policy.LocationController;
-import com.android.systemui.statusbar.policy.NetworkController;
-import com.android.systemui.statusbar.policy.NextAlarmController;
-import com.android.systemui.statusbar.policy.RotationLockController;
-import com.android.systemui.statusbar.policy.SecurityController;
-import com.android.systemui.statusbar.policy.UserInfoController;
 import com.android.systemui.statusbar.policy.UserSwitcherController;
-import com.android.systemui.statusbar.policy.ZenModeController;
 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;
 import org.junit.runner.RunWith;
 
-import java.util.ArrayList;
+import android.content.Context;
+import android.os.Handler;
+import android.os.Looper;
+import android.support.test.runner.AndroidJUnit4;
+import android.view.View;
+import android.widget.FrameLayout;
 
-@RunWith(AndroidJUnit4.class)
+@RunWith(SysUIRunner.class)
+@RunWithLooper(setAsMainLooper = true)
 public class QSFragmentTest extends FragmentTestCase {
 
     public QSFragmentTest() {
@@ -58,36 +53,38 @@
 
     @Before
     public void addLeakCheckDependencies() {
-        injectTestDependency(Dependency.BG_LOOPER, Looper.getMainLooper());
+        mContext.addMockSystemService(Context.LAYOUT_INFLATER_SERVICE,
+                new LayoutInflaterBuilder(mContext)
+                        .replace("com.android.systemui.statusbar.policy.SplitClockView",
+                                FrameLayout.class)
+                        .replace("TextClock", View.class)
+                        .build());
+
+        injectTestDependency(Dependency.BG_LOOPER, TestableLooper.get(this).getLooper());
         injectMockDependency(UserSwitcherController.class);
-        injectLeakCheckedDependencies(BluetoothController.class, LocationController.class,
-                RotationLockController.class, NetworkController.class, ZenModeController.class,
-                HotspotController.class, CastController.class, FlashlightController.class,
-                UserInfoController.class, KeyguardMonitor.class, SecurityController.class,
-                BatteryController.class, NextAlarmController.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.
-        TunerService.get(mContext).destroy();
+        processAllMessages();
     }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/TileLayoutTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/TileLayoutTest.java
index 5401c30..95190e3 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/TileLayoutTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/TileLayoutTest.java
@@ -161,4 +161,10 @@
         assertEquals(top1.getValue().intValue(), top2.getValue().intValue());
         assertEquals(bottom1.getValue().intValue(), bottom2.getValue().intValue());
     }
+
+    @Test
+    public void testEmptyHeight() {
+        mTileLayout.measure(mLayoutSizeForOneTile, mLayoutSizeForOneTile);
+        assertEquals(0, mTileLayout.getMeasuredHeight());
+    }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileServicesTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileServicesTest.java
index 4146cb81..70c7d3e 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileServicesTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileServicesTest.java
@@ -18,26 +18,32 @@
 import static junit.framework.Assert.assertEquals;
 import static junit.framework.Assert.assertTrue;
 
+import static org.mockito.Mockito.mock;
+
 import android.content.ComponentName;
-import android.content.Context;
 import android.os.Looper;
 import android.service.quicksettings.Tile;
-import android.support.test.runner.AndroidJUnit4;
 import android.test.suitebuilder.annotation.SmallTest;
+
+import com.android.systemui.SysUIRunner;
 import com.android.systemui.SysuiTestCase;
 import com.android.systemui.statusbar.phone.QSTileHost;
-import com.android.systemui.statusbar.policy.DataSaverController;
-import com.android.systemui.statusbar.policy.HotspotController;
-import com.android.systemui.statusbar.policy.NetworkController;
-import java.util.ArrayList;
+import com.android.systemui.statusbar.phone.StatusBarIconController;
+import com.android.systemui.utils.TestableLooper;
+import com.android.systemui.utils.TestableLooper.RunWithLooper;
+
+import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.ArgumentCaptor;
 import org.mockito.Mockito;
 
+import java.util.ArrayList;
+
 @SmallTest
-@RunWith(AndroidJUnit4.class)
+@RunWith(SysUIRunner.class)
+@RunWithLooper(setAsMainLooper = true)
 public class TileServicesTest extends SysuiTestCase {
     private static int NUM_FAKES = TileServices.DEFAULT_MAX_BOUND * 2;
 
@@ -46,16 +52,24 @@
 
     @Before
     public void setUp() throws Exception {
+        TestableLooper.get(this).setAsMainLooper();
         mManagers = new ArrayList<>();
-        QSTileHost host = new QSTileHost(mContext, null, null);
+        QSTileHost host = new QSTileHost(mContext, null,
+                mock(StatusBarIconController.class));
         mTileService = new TestTileServices(host, Looper.getMainLooper());
     }
 
+    @After
+    public void tearDown() throws Exception {
+        mTileService.getHost().destroy();
+        TestableLooper.get(this).processAllMessages();
+    }
+
     @Test
     public void testRecalculateBindAllowance() {
         // Add some fake tiles.
         for (int i = 0; i < NUM_FAKES; i++) {
-            mTileService.getTileWrapper(Mockito.mock(CustomTile.class));
+            mTileService.getTileWrapper(mock(CustomTile.class));
         }
         assertEquals(NUM_FAKES, mManagers.size());
 
@@ -91,7 +105,7 @@
     @Test
     public void testCalcFew() {
         for (int i = 0; i < TileServices.DEFAULT_MAX_BOUND - 1; i++) {
-            mTileService.getTileWrapper(Mockito.mock(CustomTile.class));
+            mTileService.getTileWrapper(mock(CustomTile.class));
         }
         mTileService.recalculateBindAllowance();
 
@@ -115,7 +129,7 @@
 
         @Override
         protected TileServiceManager onCreateTileService(ComponentName component, Tile qsTile) {
-            TileServiceManager manager = Mockito.mock(TileServiceManager.class);
+            TileServiceManager manager = mock(TileServiceManager.class);
             mManagers.add(manager);
             return manager;
         }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/CommandQueueTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/CommandQueueTest.java
index 43f8629..930e560 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/CommandQueueTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/CommandQueueTest.java
@@ -41,6 +41,7 @@
         mCommandQueue = new CommandQueue();
         mCallbacks = mock(Callbacks.class);
         mCommandQueue.addCallbacks(mCallbacks);
+        verify(mCallbacks).disable(eq(0), eq(0), eq(false));
     }
 
     @After
@@ -171,27 +172,6 @@
     }
 
     @Test
-    public void testBuzzBeepBlink() {
-        mCommandQueue.buzzBeepBlinked();
-        waitForIdleSync();
-        verify(mCallbacks).buzzBeepBlinked();
-    }
-
-    @Test
-    public void testNotificationLightOff() {
-        mCommandQueue.notificationLightOff();
-        waitForIdleSync();
-        verify(mCallbacks).notificationLightOff();
-    }
-
-    @Test
-    public void testNotificationLightPulse() {
-        mCommandQueue.notificationLightPulse(1, 2, 3);
-        waitForIdleSync();
-        verify(mCallbacks).notificationLightPulse(eq(1), eq(2), eq(3));
-    }
-
-    @Test
     public void testScreenPinRequest() {
         mCommandQueue.showScreenPinningRequest(1);
         waitForIdleSync();
@@ -202,7 +182,7 @@
     public void testAppTransitionPending() {
         mCommandQueue.appTransitionPending();
         waitForIdleSync();
-        verify(mCallbacks).appTransitionPending();
+        verify(mCallbacks).appTransitionPending(eq(false));
     }
 
     @Test
@@ -216,7 +196,7 @@
     public void testAppTransitionStarting() {
         mCommandQueue.appTransitionStarting(1, 2);
         waitForIdleSync();
-        verify(mCallbacks).appTransitionStarting(eq(1L), eq(2L));
+        verify(mCallbacks).appTransitionStarting(eq(1L), eq(2L), eq(false));
     }
 
     @Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationContentViewTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationContentViewTest.java
index 3bb9f5f..77f96b8 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationContentViewTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationContentViewTest.java
@@ -16,9 +16,6 @@
 
 package com.android.systemui.statusbar;
 
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
 import android.content.Context;
 import android.support.test.InstrumentationRegistry;
 import android.support.test.annotation.UiThreadTest;
@@ -31,6 +28,11 @@
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import static org.mockito.ArgumentMatchers.anyFloat;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.spy;
+
 @SmallTest
 @RunWith(AndroidJUnit4.class)
 public class NotificationContentViewTest {
@@ -39,13 +41,16 @@
     Context mContext;
 
     @Before
+    @UiThreadTest
     public void setup() {
-        ExpandableNotificationRow rowMock = mock(ExpandableNotificationRow.class);
-        when(rowMock.getIntrinsicHeight()).thenReturn(10);
-
         mContext = InstrumentationRegistry.getTargetContext();
         mView = new NotificationContentView(mContext, null);
-        mView.setContainingNotification(rowMock);
+        ExpandableNotificationRow row = new ExpandableNotificationRow(mContext, null);
+        ExpandableNotificationRow mockRow = spy(row);
+        doNothing().when(mockRow).updateBackgroundAlpha(anyFloat());
+        doReturn(10).when(mockRow).getIntrinsicHeight();
+
+        mView.setContainingNotification(mockRow);
         mView.setHeights(10, 20, 30, 40);
 
         mView.setContractedChild(createViewWithHeight(10));
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationCustomViewWrapperTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationCustomViewWrapperTest.java
new file mode 100644
index 0000000..d07cea1
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationCustomViewWrapperTest.java
@@ -0,0 +1,62 @@
+/*
+ * 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.statusbar;
+
+import android.content.Context;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.annotation.UiThreadTest;
+import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
+import android.view.View;
+import android.widget.RemoteViews;
+
+import com.android.systemui.R;
+import com.android.systemui.statusbar.notification.NotificationCustomViewWrapper;
+import com.android.systemui.statusbar.notification.NotificationViewWrapper;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@SmallTest
+@RunWith(AndroidJUnit4.class)
+public class NotificationCustomViewWrapperTest {
+
+    private Context mContext;
+    private ExpandableNotificationRow mRow;
+
+    @Before
+    @UiThreadTest
+    public void setUp() {
+        mContext = InstrumentationRegistry.getTargetContext();
+        mRow = new ExpandableNotificationRow(mContext, null);
+    }
+
+    @Test
+    public void testBackgroundPersists() {
+        RemoteViews views = new RemoteViews(mContext.getPackageName(), R.layout.custom_view_dark);
+        View v = views.apply(mContext, null);
+        NotificationViewWrapper wrap = NotificationCustomViewWrapper.wrap(mContext, v, mRow);
+        wrap.notifyContentUpdated(null, false /* isLowPriority */);
+        Assert.assertTrue(wrap.getCustomBackgroundColor() != 0);
+        views.reapply(mContext, v);
+        wrap.notifyContentUpdated(null, false /* isLowPriority */);
+        Assert.assertTrue(wrap.getCustomBackgroundColor() != 0);
+    }
+
+}
\ No newline at end of file
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationGutsTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationGutsTest.java
deleted file mode 100644
index 3e0d15d..0000000
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationGutsTest.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/*
- * Copyright (C) 2016 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.statusbar;
-
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertFalse;
-import static junit.framework.Assert.assertTrue;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.anyInt;
-import static org.mockito.Mockito.anyString;
-import static org.mockito.Mockito.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.app.INotificationManager;
-import android.app.Notification;
-import android.app.NotificationChannel;
-import android.app.NotificationManager;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageInfo;
-import android.content.pm.PackageManager;
-import android.graphics.drawable.Drawable;
-import android.service.notification.StatusBarNotification;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.annotation.UiThreadTest;
-import android.support.test.runner.AndroidJUnit4;
-import android.test.suitebuilder.annotation.SmallTest;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.widget.ImageView;
-import android.widget.RadioButton;
-import android.widget.Switch;
-import android.widget.TextView;
-import com.android.systemui.R;
-import org.junit.Before;
-import org.junit.runner.RunWith;
-import org.junit.Test;
-import org.mockito.Mockito;
-import java.util.Collections;
-import java.util.concurrent.CountDownLatch;
-
-@SmallTest
-@RunWith(AndroidJUnit4.class)
-public class NotificationGutsTest {
-    private static final String TEST_PACKAGE_NAME = "test_package";
-    private static final String TEST_CHANNEL = "test_channel";
-    private static final String TEST_CHANNEL_NAME = "TEST CHANNEL NAME";
-
-    private NotificationGuts mNotificationGuts;
-    private NotificationInfo mNotificationInfo;
-    private final INotificationManager mMockINotificationManager = mock(INotificationManager.class);
-    private final PackageManager mMockPackageManager = mock(PackageManager.class);
-    private NotificationChannel mNotificationChannel;
-    private final StatusBarNotification mMockStatusBarNotification =
-            mock(StatusBarNotification.class);
-
-    @Before
-    @UiThreadTest
-    public void setUp() throws Exception {
-        // Inflate the layout
-        final LayoutInflater layoutInflater =
-                LayoutInflater.from(InstrumentationRegistry.getTargetContext());
-        mNotificationInfo = (NotificationInfo) layoutInflater.inflate(R.layout.notification_info,
-                null);
-        mNotificationGuts = (NotificationGuts) layoutInflater.inflate(R.layout.notification_guts,
-                null);
-        mNotificationInfo.setInteractionListener(mNotificationGuts);
-
-        // PackageManager must return a packageInfo and applicationInfo.
-        final PackageInfo packageInfo = new PackageInfo();
-        packageInfo.packageName = TEST_PACKAGE_NAME;
-        when(mMockPackageManager.getPackageInfo(anyString(), anyInt())).thenReturn(packageInfo);
-        final ApplicationInfo applicationInfo = new ApplicationInfo();
-        applicationInfo.uid = 1;  // non-zero
-        when(mMockPackageManager.getApplicationInfo(anyString(), anyInt())).thenReturn(
-                applicationInfo);
-
-        // mMockStatusBarNotification with a test channel.
-        mNotificationChannel = new NotificationChannel(
-                TEST_CHANNEL, TEST_CHANNEL_NAME, NotificationManager.IMPORTANCE_LOW);
-        when(mMockStatusBarNotification.getPackageName()).thenReturn(TEST_PACKAGE_NAME);
-    }
-
-    @Test
-    @UiThreadTest
-    public void testBindNotification_SetsTextApplicationName() throws Exception {
-        when(mMockPackageManager.getApplicationLabel(any())).thenReturn("App Name");
-        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
-                mMockStatusBarNotification, mNotificationChannel, null, null, null);
-        final TextView textView = (TextView) mNotificationInfo.findViewById(R.id.pkgname);
-        assertTrue(textView.getText().toString().contains("App Name"));
-    }
-
-    @Test
-    @UiThreadTest
-    public void testBindNotification_SetsTextChannelName() throws Exception {
-        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
-                mMockStatusBarNotification, mNotificationChannel, null, null, null);
-        final TextView textView = (TextView) mNotificationInfo.findViewById(R.id.channel_name);
-        assertEquals(TEST_CHANNEL_NAME, textView.getText());
-    }
-
-    @Test
-    @UiThreadTest
-    public void testBindNotification_SetsOnClickListenerForSettings() throws Exception {
-        final CountDownLatch latch = new CountDownLatch(1);
-        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
-                mMockStatusBarNotification, mNotificationChannel,
-                (View v, int appUid) -> { latch.countDown(); }, null, null);
-
-        final TextView settingsButton = 
-                (TextView) mNotificationInfo.findViewById(R.id.more_settings);
-        settingsButton.performClick();
-        // Verify that listener was triggered.
-        assertEquals(0, latch.getCount());
-    }
-
-    @Test
-    @UiThreadTest
-    public void testBindNotification_SetsOnClickListenerForDone() throws Exception {
-        final CountDownLatch latch = new CountDownLatch(1);
-        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
-                mMockStatusBarNotification, mNotificationChannel, null,
-                (View v) -> { latch.countDown(); },
-                null);
-
-        final TextView doneButton = (TextView) mNotificationInfo.findViewById(R.id.done);
-        doneButton.performClick();
-        // Verify that listener was triggered.
-        assertEquals(0, latch.getCount());
-    }
-
-    @Test
-    @UiThreadTest
-    public void testHasImportanceChanged_DefaultsToFalse() throws Exception {
-        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
-                mMockStatusBarNotification, mNotificationChannel, null, null, null);
-        assertFalse(mNotificationInfo.hasImportanceChanged());
-    }
-
-    @Test
-    @UiThreadTest
-    public void testHasImportanceChanged_ReturnsTrueAfterButtonChecked() throws Exception {
-        mNotificationChannel.setImportance(NotificationManager.IMPORTANCE_LOW);
-        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
-                mMockStatusBarNotification, mNotificationChannel, null, null, null);
-        // Find the high button and check it.
-        RadioButton highButton = (RadioButton) mNotificationInfo.findViewById(R.id.high_importance);
-        highButton.setChecked(true);
-        assertTrue(mNotificationInfo.hasImportanceChanged());
-    }
-
-    @Test
-    @UiThreadTest
-    public void testImportanceButtonCheckedBasedOnInitialImportance() throws Exception {
-        mNotificationChannel.setImportance(NotificationManager.IMPORTANCE_HIGH);
-        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
-                mMockStatusBarNotification, mNotificationChannel, null, null, null);
-
-        RadioButton highButton = (RadioButton) mNotificationInfo.findViewById(R.id.high_importance);
-        assertTrue(highButton.isChecked());
-    }
-
-    @Test
-    @UiThreadTest
-    public void testBindNotification_DoesNotUpdateNotificationChannel() throws Exception {
-        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
-                mMockStatusBarNotification, mNotificationChannel, null, null, null);
-        verify(mMockINotificationManager, never()).updateNotificationChannelForPackage(
-                anyString(), anyInt(), any());
-    }
-
-    @Test
-    @UiThreadTest
-    public void testDoesNotUpdateNotificationChannelAfterImportanceChanged() throws Exception {
-        mNotificationChannel.setImportance(NotificationManager.IMPORTANCE_LOW);
-        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
-                mMockStatusBarNotification, mNotificationChannel, null, null, null);
-
-        RadioButton highButton = (RadioButton) mNotificationInfo.findViewById(R.id.high_importance);
-        highButton.setChecked(true);
-        verify(mMockINotificationManager, never()).updateNotificationChannelForPackage(
-                anyString(), anyInt(), any());
-    }
-
-    @Test
-    @UiThreadTest
-    public void testSaveImportance_DoesNotUpdateNotificationChannelIfUnchanged() throws Exception {
-        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
-                mMockStatusBarNotification, mNotificationChannel, null, null, null);
-
-        mNotificationInfo.saveImportance();
-        verify(mMockINotificationManager, never()).updateNotificationChannelForPackage(
-                anyString(), anyInt(), any());
-    }
-
-    @Test
-    @UiThreadTest
-    public void testSaveImportance_DoesNotUpdateNotificationChannelIfUnspecified()
-            throws Exception {
-        mNotificationChannel.setImportance(NotificationManager.IMPORTANCE_UNSPECIFIED);
-        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
-                mMockStatusBarNotification, mNotificationChannel, null, null, null);
-
-        mNotificationInfo.saveImportance();
-        verify(mMockINotificationManager, never()).updateNotificationChannelForPackage(
-                anyString(), anyInt(), any());
-    }
-
-    @Test
-    @UiThreadTest
-    public void testSaveImportance_CallsUpdateNotificationChannelIfChanged() throws Exception {
-        mNotificationChannel.setImportance(NotificationManager.IMPORTANCE_LOW);
-        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
-                mMockStatusBarNotification, mNotificationChannel, null, null, null);
-
-        RadioButton highButton = (RadioButton) mNotificationInfo.findViewById(R.id.high_importance);
-        highButton.setChecked(true);
-        mNotificationInfo.saveImportance();
-        verify(mMockINotificationManager, times(1)).updateNotificationChannelForPackage(
-                eq(TEST_PACKAGE_NAME), anyInt(), eq(mNotificationChannel));
-        assertEquals(NotificationManager.IMPORTANCE_HIGH, mNotificationChannel.getImportance());
-    }
-
-    @Test
-    @UiThreadTest
-    public void testEnabledSwitchOnByDefault() throws Exception {
-        mNotificationChannel.setImportance(NotificationManager.IMPORTANCE_LOW);
-        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
-                mMockStatusBarNotification, mNotificationChannel, null, null, null);
-
-        Switch enabledSwitch = (Switch) mNotificationInfo.findViewById(R.id.channel_enabled_switch);
-        assertTrue(enabledSwitch.isChecked());
-    }
-
-    @Test
-    @UiThreadTest
-    public void testEnabledSwitchVisibleByDefault() throws Exception {
-        mNotificationChannel.setImportance(NotificationManager.IMPORTANCE_LOW);
-        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
-                mMockStatusBarNotification, mNotificationChannel, null, null, null);
-
-        Switch enabledSwitch = (Switch) mNotificationInfo.findViewById(R.id.channel_enabled_switch);
-        assertEquals(View.VISIBLE, enabledSwitch.getVisibility());
-    }
-
-    @Test
-    @UiThreadTest
-    public void testEnabledSwitchInvisibleIfNonBlockable() throws Exception {
-        mNotificationChannel.setImportance(NotificationManager.IMPORTANCE_LOW);
-        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
-                mMockStatusBarNotification, mNotificationChannel, null, null,
-                Collections.singleton(TEST_PACKAGE_NAME));
-
-        Switch enabledSwitch = (Switch) mNotificationInfo.findViewById(R.id.channel_enabled_switch);
-        assertEquals(View.INVISIBLE, enabledSwitch.getVisibility());
-    }
-
-    @Test
-    @UiThreadTest
-    public void testEnabledSwitchChangedCallsUpdateNotificationChannel() throws Exception {
-        mNotificationChannel.setImportance(NotificationManager.IMPORTANCE_LOW);
-        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
-                mMockStatusBarNotification, mNotificationChannel, null, null,
-                Collections.singleton(TEST_PACKAGE_NAME));
-
-        Switch enabledSwitch = (Switch) mNotificationInfo.findViewById(R.id.channel_enabled_switch);
-        enabledSwitch.setChecked(false);
-        mNotificationInfo.saveImportance();
-        verify(mMockINotificationManager, times(1)).updateNotificationChannelForPackage(
-                eq(TEST_PACKAGE_NAME), anyInt(), eq(mNotificationChannel));
-    }
-
-    @Test
-    @UiThreadTest
-    public void testEnabledSwitchOverridesOtherButtons() throws Exception {
-        mNotificationChannel.setImportance(NotificationManager.IMPORTANCE_LOW);
-        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
-                mMockStatusBarNotification, mNotificationChannel, null, null, null);
-
-        Switch enabledSwitch = (Switch) mNotificationInfo.findViewById(R.id.channel_enabled_switch);
-        RadioButton lowButton = (RadioButton) mNotificationInfo.findViewById(R.id.low_importance);
-        lowButton.setChecked(true);
-        enabledSwitch.setChecked(false);
-        mNotificationInfo.saveImportance();
-        assertEquals(NotificationManager.IMPORTANCE_NONE, mNotificationChannel.getImportance());
-    }
-}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationInfoTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationInfoTest.java
new file mode 100644
index 0000000..0491fc4
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationInfoTest.java
@@ -0,0 +1,437 @@
+/*
+ * Copyright (C) 2016 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.statusbar;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertFalse;
+import static junit.framework.Assert.assertTrue;
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.anyBoolean;
+import static org.mockito.Mockito.anyInt;
+import static org.mockito.Mockito.anyString;
+import static org.mockito.Mockito.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.app.INotificationManager;
+import android.app.Notification;
+import android.app.NotificationChannel;
+import android.app.NotificationChannelGroup;
+import android.app.NotificationManager;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.ParceledListSlice;
+import android.graphics.drawable.Drawable;
+import android.service.notification.StatusBarNotification;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.annotation.UiThreadTest;
+import android.support.test.runner.AndroidJUnit4;
+import android.test.suitebuilder.annotation.SmallTest;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.Switch;
+import android.widget.TextView;
+import com.android.internal.util.CharSequences;
+import com.android.systemui.R;
+import com.android.systemui.SysuiTestCase;
+import org.junit.Before;
+import org.junit.runner.RunWith;
+import org.junit.Test;
+import org.mockito.Mockito;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.concurrent.CountDownLatch;
+
+@SmallTest
+@RunWith(AndroidJUnit4.class)
+public class NotificationInfoTest extends SysuiTestCase {
+    private static final String TEST_PACKAGE_NAME = "test_package";
+    private static final String TEST_CHANNEL = "test_channel";
+    private static final String TEST_CHANNEL_NAME = "TEST CHANNEL NAME";
+
+    private NotificationInfo mNotificationInfo;
+    private final INotificationManager mMockINotificationManager = mock(INotificationManager.class);
+    private final PackageManager mMockPackageManager = mock(PackageManager.class);
+    private NotificationChannel mNotificationChannel;
+    private final StatusBarNotification mMockStatusBarNotification =
+            mock(StatusBarNotification.class);
+
+    @Before
+    @UiThreadTest
+    public void setUp() throws Exception {
+        // Inflate the layout
+        final LayoutInflater layoutInflater =
+                LayoutInflater.from(mContext);
+        mNotificationInfo = (NotificationInfo) layoutInflater.inflate(R.layout.notification_info,
+                null);
+
+        // PackageManager must return a packageInfo and applicationInfo.
+        final PackageInfo packageInfo = new PackageInfo();
+        packageInfo.packageName = TEST_PACKAGE_NAME;
+        when(mMockPackageManager.getPackageInfo(anyString(), anyInt())).thenReturn(packageInfo);
+        final ApplicationInfo applicationInfo = new ApplicationInfo();
+        applicationInfo.uid = 1;  // non-zero
+        when(mMockPackageManager.getApplicationInfo(anyString(), anyInt())).thenReturn(
+                applicationInfo);
+
+        // mMockStatusBarNotification with a test channel.
+        mNotificationChannel = new NotificationChannel(
+                TEST_CHANNEL, TEST_CHANNEL_NAME, NotificationManager.IMPORTANCE_LOW);
+        when(mMockStatusBarNotification.getPackageName()).thenReturn(TEST_PACKAGE_NAME);
+
+        when(mMockINotificationManager.getNumNotificationChannelsForPackage(
+                eq(TEST_PACKAGE_NAME), anyInt(), anyBoolean())).thenReturn(1);
+    }
+
+    private CharSequence getStringById(int resId) {
+        return mContext.getString(resId);
+    }
+
+    private CharSequence getNumChannelsString(int numChannels) {
+        return String.format(
+                mContext.getResources().getQuantityString(
+                        R.plurals.notification_num_channels_desc, numChannels),
+                numChannels);
+    }
+
+    @Test
+    @UiThreadTest
+    public void testBindNotification_SetsTextApplicationName() throws Exception {
+        when(mMockPackageManager.getApplicationLabel(any())).thenReturn("App Name");
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                mMockStatusBarNotification, mNotificationChannel, null, null, null);
+        final TextView textView = (TextView) mNotificationInfo.findViewById(R.id.pkgname);
+        assertTrue(textView.getText().toString().contains("App Name"));
+    }
+
+    @Test
+    @UiThreadTest
+    public void testBindNotification_SetsPackageIcon() throws Exception {
+        final Drawable iconDrawable = mock(Drawable.class);
+        when(mMockPackageManager.getApplicationIcon(any(ApplicationInfo.class)))
+                .thenReturn(iconDrawable);
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                mMockStatusBarNotification, mNotificationChannel, null, null, null);
+        final ImageView iconView = (ImageView) mNotificationInfo.findViewById(R.id.pkgicon);
+        assertEquals(iconDrawable, iconView.getDrawable());
+    }
+
+    @Test
+    @UiThreadTest
+    public void testBindNotification_GroupNameHiddenIfNoGroup() throws Exception {
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                mMockStatusBarNotification, mNotificationChannel, null, null, null);
+        final TextView groupNameView = (TextView) mNotificationInfo.findViewById(R.id.group_name);
+        assertEquals(View.GONE, groupNameView.getVisibility());
+        final TextView groupDividerView =
+                (TextView) mNotificationInfo.findViewById(R.id.pkg_group_divider);
+        assertEquals(View.GONE, groupDividerView.getVisibility());
+    }
+
+    @Test
+    @UiThreadTest
+    public void testBindNotification_SetsGroupNameIfNonNull() throws Exception {
+        mNotificationChannel.setGroup("test_group_id");
+        final NotificationChannelGroup notificationChannelGroup =
+                new NotificationChannelGroup("test_group_id", "Test Group Name");
+        when(mMockINotificationManager.getNotificationChannelGroupForPackage(
+                eq("test_group_id"), eq(TEST_PACKAGE_NAME), anyInt()))
+                .thenReturn(notificationChannelGroup);
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                mMockStatusBarNotification, mNotificationChannel, null, null, null);
+        final TextView groupNameView = (TextView) mNotificationInfo.findViewById(R.id.group_name);
+        assertEquals(View.VISIBLE, groupNameView.getVisibility());
+        assertEquals("Test Group Name", groupNameView.getText());
+        final TextView groupDividerView =
+                (TextView) mNotificationInfo.findViewById(R.id.pkg_group_divider);
+        assertEquals(View.VISIBLE, groupDividerView.getVisibility());
+    }
+
+    @Test
+    @UiThreadTest
+    public void testBindNotification_SetsTextChannelName() throws Exception {
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                mMockStatusBarNotification, mNotificationChannel, null, null, null);
+        final TextView textView = (TextView) mNotificationInfo.findViewById(R.id.channel_name);
+        assertEquals(TEST_CHANNEL_NAME, textView.getText());
+    }
+
+    @Test
+    @UiThreadTest
+    public void testBindNotification_SetsOnClickListenerForSettings() throws Exception {
+        final CountDownLatch latch = new CountDownLatch(1);
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                mMockStatusBarNotification, mNotificationChannel,
+                (View v, int appUid) -> { latch.countDown(); }, null, null);
+
+        final TextView settingsButton =
+                (TextView) mNotificationInfo.findViewById(R.id.more_settings);
+        settingsButton.performClick();
+        // Verify that listener was triggered.
+        assertEquals(0, latch.getCount());
+    }
+
+    @Test
+    @UiThreadTest
+    public void testBindNotification_SettingsTextWithOneChannel() throws Exception {
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                mMockStatusBarNotification, mNotificationChannel, (View v, int appUid) -> {}, null,
+                null);
+        final TextView settingsButton =
+                (TextView) mNotificationInfo.findViewById(R.id.more_settings);
+        assertEquals(getStringById(R.string.notification_more_settings), settingsButton.getText());
+    }
+
+    @Test
+    @UiThreadTest
+    public void testBindNotification_SettingsTextWithMultipleChannels() throws Exception {
+        when(mMockINotificationManager.getNumNotificationChannelsForPackage(
+                eq(TEST_PACKAGE_NAME), anyInt(), anyBoolean())).thenReturn(2);
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                mMockStatusBarNotification, mNotificationChannel, (View v, int appUid) -> {}, null,
+                null);
+        final TextView settingsButton =
+                (TextView) mNotificationInfo.findViewById(R.id.more_settings);
+        assertEquals(getStringById(R.string.notification_all_categories), settingsButton.getText());
+    }
+
+    @Test
+    @UiThreadTest
+    public void testBindNotification_SetsOnClickListenerForDone() throws Exception {
+        final CountDownLatch latch = new CountDownLatch(1);
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                mMockStatusBarNotification, mNotificationChannel, null,
+                (View v) -> { latch.countDown(); },
+                null);
+
+        final TextView doneButton = (TextView) mNotificationInfo.findViewById(R.id.done);
+        doneButton.performClick();
+        // Verify that listener was triggered.
+        assertEquals(0, latch.getCount());
+    }
+
+    @Test
+    @UiThreadTest
+    public void testBindNotification_NumChannelsTextHiddenWhenDefaultChannel() throws Exception {
+        final NotificationChannel defaultChannel = new NotificationChannel(
+                NotificationChannel.DEFAULT_CHANNEL_ID, TEST_CHANNEL_NAME,
+                NotificationManager.IMPORTANCE_LOW);
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                mMockStatusBarNotification, defaultChannel, null, null, null);
+        final TextView numChannelsView =
+                (TextView) mNotificationInfo.findViewById(R.id.num_channels_desc);
+        assertTrue(numChannelsView.getVisibility() != View.VISIBLE);
+    }
+
+    @Test
+    @UiThreadTest
+    public void testBindNotification_NumChannelsTextDisplaysWhenNotDefaultChannel()
+            throws Exception {
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                mMockStatusBarNotification, mNotificationChannel, null, null, null);
+        final TextView numChannelsView =
+                (TextView) mNotificationInfo.findViewById(R.id.num_channels_desc);
+        assertEquals(numChannelsView.getVisibility(), View.VISIBLE);
+        assertEquals(getNumChannelsString(1), numChannelsView.getText());
+    }
+
+    @Test
+    @UiThreadTest
+    public void testBindNotification_NumChannelsTextScalesWithNumberOfChannels()
+            throws Exception {
+        when(mMockINotificationManager.getNumNotificationChannelsForPackage(
+                eq(TEST_PACKAGE_NAME), anyInt(), anyBoolean())).thenReturn(2);
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                mMockStatusBarNotification, mNotificationChannel, null, null, null);
+        final TextView numChannelsView =
+                (TextView) mNotificationInfo.findViewById(R.id.num_channels_desc);
+        assertEquals(getNumChannelsString(2), numChannelsView.getText());
+    }
+
+    @Test
+    @UiThreadTest
+    public void testbindNotification_ChannelDisabledTextGoneWhenNotDisabled() throws Exception {
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                mMockStatusBarNotification, mNotificationChannel, null, null, null);
+        final TextView channelDisabledView =
+                (TextView) mNotificationInfo.findViewById(R.id.channel_disabled);
+        assertEquals(channelDisabledView.getVisibility(), View.GONE);
+    }
+
+    @Test
+    @UiThreadTest
+    public void testbindNotification_ChannelDisabledTextVisibleWhenDisabled() throws Exception {
+        mNotificationChannel.setImportance(NotificationManager.IMPORTANCE_NONE);
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                mMockStatusBarNotification, mNotificationChannel, null, null, null);
+        final TextView channelDisabledView =
+                (TextView) mNotificationInfo.findViewById(R.id.channel_disabled);
+        assertEquals(channelDisabledView.getVisibility(), View.VISIBLE);
+        // Replaces the numChannelsView
+        final TextView numChannelsView =
+                (TextView) mNotificationInfo.findViewById(R.id.num_channels_desc);
+        assertEquals(numChannelsView.getVisibility(), View.GONE);
+    }
+
+    @Test
+    @UiThreadTest
+    public void testHasImportanceChanged_DefaultsToFalse() throws Exception {
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                mMockStatusBarNotification, mNotificationChannel, null, null, null);
+        assertFalse(mNotificationInfo.hasImportanceChanged());
+    }
+
+    @Test
+    @UiThreadTest
+    public void testHasImportanceChanged_ReturnsTrueAfterChannelDisabled() throws Exception {
+        mNotificationChannel.setImportance(NotificationManager.IMPORTANCE_LOW);
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                mMockStatusBarNotification, mNotificationChannel, null, null, null);
+        // Find the high button and check it.
+        Switch enabledSwitch = (Switch) mNotificationInfo.findViewById(R.id.channel_enabled_switch);
+        enabledSwitch.setChecked(false);
+        assertTrue(mNotificationInfo.hasImportanceChanged());
+    }
+
+    @Test
+    @UiThreadTest
+    public void testBindNotification_DoesNotUpdateNotificationChannel() throws Exception {
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                mMockStatusBarNotification, mNotificationChannel, null, null, null);
+        verify(mMockINotificationManager, never()).updateNotificationChannelForPackage(
+                anyString(), anyInt(), any());
+    }
+
+    @Test
+    @UiThreadTest
+    public void testDoesNotUpdateNotificationChannelAfterImportanceChanged() throws Exception {
+        mNotificationChannel.setImportance(NotificationManager.IMPORTANCE_LOW);
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                mMockStatusBarNotification, mNotificationChannel, null, null, null);
+
+        Switch enabledSwitch = (Switch) mNotificationInfo.findViewById(R.id.channel_enabled_switch);
+        enabledSwitch.setChecked(false);
+        verify(mMockINotificationManager, never()).updateNotificationChannelForPackage(
+                anyString(), anyInt(), any());
+    }
+
+    @Test
+    @UiThreadTest
+    public void testHandleCloseControls_DoesNotUpdateNotificationChannelIfUnchanged()
+            throws Exception {
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                mMockStatusBarNotification, mNotificationChannel, null, null, null);
+
+        mNotificationInfo.handleCloseControls(true);
+        verify(mMockINotificationManager, never()).updateNotificationChannelForPackage(
+                anyString(), anyInt(), any());
+    }
+
+    @Test
+    @UiThreadTest
+    public void testHandleCloseControls_DoesNotUpdateNotificationChannelIfUnspecified()
+            throws Exception {
+        mNotificationChannel.setImportance(NotificationManager.IMPORTANCE_UNSPECIFIED);
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                mMockStatusBarNotification, mNotificationChannel, null, null, null);
+
+        mNotificationInfo.handleCloseControls(true);
+        verify(mMockINotificationManager, never()).updateNotificationChannelForPackage(
+                anyString(), anyInt(), any());
+    }
+
+    @Test
+    @UiThreadTest
+    public void testEnabledSwitchOnByDefault() throws Exception {
+        mNotificationChannel.setImportance(NotificationManager.IMPORTANCE_LOW);
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                mMockStatusBarNotification, mNotificationChannel, null, null, null);
+
+        Switch enabledSwitch = (Switch) mNotificationInfo.findViewById(R.id.channel_enabled_switch);
+        assertTrue(enabledSwitch.isChecked());
+    }
+
+    @Test
+    @UiThreadTest
+    public void testEnabledButtonOffWhenAlreadyBanned() throws Exception {
+        mNotificationChannel.setImportance(NotificationManager.IMPORTANCE_NONE);
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                mMockStatusBarNotification, mNotificationChannel, null, null, null);
+
+        Switch enabledSwitch = (Switch) mNotificationInfo.findViewById(R.id.channel_enabled_switch);
+        assertFalse(enabledSwitch.isChecked());
+    }
+
+    @Test
+    @UiThreadTest
+    public void testEnabledSwitchVisibleByDefault() throws Exception {
+        mNotificationChannel.setImportance(NotificationManager.IMPORTANCE_LOW);
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                mMockStatusBarNotification, mNotificationChannel, null, null, null);
+
+        Switch enabledSwitch = (Switch) mNotificationInfo.findViewById(R.id.channel_enabled_switch);
+        assertEquals(View.VISIBLE, enabledSwitch.getVisibility());
+    }
+
+    @Test
+    @UiThreadTest
+    public void testEnabledSwitchInvisibleIfNonBlockable() throws Exception {
+        mNotificationChannel.setImportance(NotificationManager.IMPORTANCE_LOW);
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                mMockStatusBarNotification, mNotificationChannel, null, null,
+                Collections.singleton(TEST_PACKAGE_NAME));
+
+        Switch enabledSwitch = (Switch) mNotificationInfo.findViewById(R.id.channel_enabled_switch);
+        assertEquals(View.INVISIBLE, enabledSwitch.getVisibility());
+    }
+
+    @Test
+    @UiThreadTest
+    public void testEnabledSwitchChangedCallsUpdateNotificationChannel() throws Exception {
+        mNotificationChannel.setImportance(NotificationManager.IMPORTANCE_LOW);
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                mMockStatusBarNotification, mNotificationChannel, null, null,
+                Collections.singleton(TEST_PACKAGE_NAME));
+
+        Switch enabledSwitch = (Switch) mNotificationInfo.findViewById(R.id.channel_enabled_switch);
+        enabledSwitch.setChecked(false);
+        mNotificationInfo.handleCloseControls(true);
+        verify(mMockINotificationManager, times(1)).updateNotificationChannelForPackage(
+                eq(TEST_PACKAGE_NAME), anyInt(), eq(mNotificationChannel));
+    }
+
+    @Test
+    @UiThreadTest
+    public void testCloseControlsDoesNotUpdateIfSaveIsFalse() throws Exception {
+        mNotificationChannel.setImportance(NotificationManager.IMPORTANCE_LOW);
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                mMockStatusBarNotification, mNotificationChannel, null, null,
+                Collections.singleton(TEST_PACKAGE_NAME));
+
+        Switch enabledSwitch = (Switch) mNotificationInfo.findViewById(R.id.channel_enabled_switch);
+        enabledSwitch.setChecked(false);
+        mNotificationInfo.handleCloseControls(false);
+        verify(mMockINotificationManager, never()).updateNotificationChannelForPackage(
+                eq(TEST_PACKAGE_NAME), anyInt(), eq(mNotificationChannel));
+    }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationMenuRowTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationMenuRowTest.java
new file mode 100644
index 0000000..72f6ca8
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationMenuRowTest.java
@@ -0,0 +1,44 @@
+/*
+ * 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.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
+    public void setup() {
+        injectLeakCheckedDependencies(ALL_SUPPORTED_CLASSES);
+    }
+
+    @Test
+    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/StatusBarIconViewTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/StatusBarIconViewTest.java
index 7d9e073..68f9cb05 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/StatusBarIconViewTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/StatusBarIconViewTest.java
@@ -16,36 +16,74 @@
 
 package com.android.systemui.statusbar;
 
+import static junit.framework.Assert.assertFalse;
+import static junit.framework.Assert.assertNull;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.argThat;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.when;
+
+import android.content.Context;
+import android.content.ContextWrapper;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.content.res.Resources;
 import android.graphics.drawable.Icon;
-import android.os.Debug;
 import android.os.UserHandle;
+import android.support.test.filters.SmallTest;
 import android.support.test.runner.AndroidJUnit4;
-import android.test.suitebuilder.annotation.SmallTest;
 
 import com.android.internal.statusbar.StatusBarIcon;
 import com.android.systemui.R;
 import com.android.systemui.SysuiTestCase;
 
 import org.junit.Before;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.ExpectedException;
 import org.junit.runner.RunWith;
-
-import static junit.framework.Assert.assertNull;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
+import org.mockito.ArgumentMatcher;
 
 @SmallTest
 @RunWith(AndroidJUnit4.class)
 public class StatusBarIconViewTest extends SysuiTestCase {
 
+    @Rule
+    public ExpectedException mThrown = ExpectedException.none();
+
     private StatusBarIconView mIconView;
     private StatusBarIcon mStatusBarIcon = mock(StatusBarIcon.class);
 
+    private PackageManager mPackageManagerSpy;
+    private Context mContext;
+    private Resources mMockResources;
+
     @Before
-    public void setUp() {
-        mIconView = new StatusBarIconView(getContext(), "slot", null);
-        mStatusBarIcon = new StatusBarIcon(UserHandle.ALL, getContext().getPackageName(),
-                Icon.createWithResource(getContext(), R.drawable.ic_android), 0, 0, "");
+    public void setUp() throws Exception {
+        // Set up context such that asking for "mockPackage" resources returns mMockResources.
+        mMockResources = mock(Resources.class);
+        mPackageManagerSpy = spy(getContext().getPackageManager());
+        doReturn(mMockResources).when(mPackageManagerSpy)
+                .getResourcesForApplicationAsUser(eq("mockPackage"), anyInt());
+        doReturn(mMockResources).when(mPackageManagerSpy)
+                .getResourcesForApplication(eq("mockPackage"));
+        doReturn(mMockResources).when(mPackageManagerSpy).getResourcesForApplication(argThat(
+                (ArgumentMatcher<ApplicationInfo>) o -> "mockPackage".equals(o.packageName)));
+        mContext = new ContextWrapper(getContext()) {
+            @Override
+            public PackageManager getPackageManager() {
+                return mPackageManagerSpy;
+            }
+        };
+
+        mIconView = new StatusBarIconView(mContext, "test_slot", null);
+        mStatusBarIcon = new StatusBarIcon(UserHandle.ALL, "mockPackage",
+                Icon.createWithResource(mContext, R.drawable.ic_android), 0, 0, "");
     }
 
     @Test
@@ -55,4 +93,11 @@
         assertNull(mIconView.getTag(R.id.icon_is_grayscale));
     }
 
+    @Test
+    public void testSettingOomingIconDoesNotThrowOom() {
+        when(mMockResources.getDrawable(anyInt(), any())).thenThrow(new OutOfMemoryError("mocked"));
+        mStatusBarIcon.icon = Icon.createWithResource("mockPackage", R.drawable.ic_android);
+
+        assertFalse(mIconView.set(mStatusBarIcon));
+    }
 }
\ No newline at end of file
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
new file mode 100644
index 0000000..f55115e
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragmentTest.java
@@ -0,0 +1,111 @@
+/*
+ * 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.statusbar.phone;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import android.app.StatusBarManager;
+import android.view.View;
+import android.view.ViewPropertyAnimator;
+
+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;
+    private View mNotificationAreaInner;
+
+    public CollapsedStatusBarFragmentTest() {
+        super(CollapsedStatusBarFragment.class);
+    }
+
+    @Before
+    public void setup() {
+        mContext.putComponent(CommandQueue.class, mock(CommandQueue.class));
+        mContext.putComponent(StatusBar.class, mock(StatusBar.class));
+        mContext.putComponent(TunerService.class, mock(TunerService.class));
+        injectLeakCheckedDependencies(ALL_SUPPORTED_CLASSES);
+        mMockNotificiationAreaController = mock(NotificationIconAreaController.class);
+        mNotificationAreaInner = mock(View.class);
+        when(mNotificationAreaInner.animate()).thenReturn(mock(ViewPropertyAnimator.class));
+        when(mMockNotificiationAreaController.getNotificationInnerAreaView()).thenReturn(
+                mNotificationAreaInner);
+    }
+
+    @Test
+    public void testDisableNone() throws Exception {
+        mFragments.dispatchResume();
+        processAllMessages();
+
+        CollapsedStatusBarFragment fragment = (CollapsedStatusBarFragment) mFragment;
+        fragment.initNotificationIconArea(mMockNotificiationAreaController);
+        fragment.disable(0, 0, false);
+
+        assertEquals(View.VISIBLE, mFragment.getView().findViewById(R.id.system_icon_area)
+                .getVisibility());
+    }
+
+    @Test
+    public void testDisableSystemInfo() throws Exception {
+        mFragments.dispatchResume();
+        processAllMessages();
+
+        CollapsedStatusBarFragment fragment = (CollapsedStatusBarFragment) mFragment;
+        fragment.initNotificationIconArea(mMockNotificiationAreaController);
+        fragment.disable(StatusBarManager.DISABLE_SYSTEM_INFO, 0, false);
+
+        assertEquals(View.INVISIBLE, mFragment.getView().findViewById(R.id.system_icon_area)
+                .getVisibility());
+
+        fragment.disable(0, 0, false);
+
+        assertEquals(View.VISIBLE, mFragment.getView().findViewById(R.id.system_icon_area)
+                .getVisibility());
+    }
+
+    @Test
+    public void testDisableNotifications() throws Exception {
+        mFragments.dispatchResume();
+        processAllMessages();
+
+        CollapsedStatusBarFragment fragment = (CollapsedStatusBarFragment) mFragment;
+        fragment.initNotificationIconArea(mMockNotificiationAreaController);
+        fragment.disable(StatusBarManager.DISABLE_NOTIFICATION_ICONS, 0, false);
+
+        Mockito.verify(mNotificationAreaInner).setVisibility(eq(View.INVISIBLE));
+
+        fragment.disable(0, 0, false);
+
+        Mockito.verify(mNotificationAreaInner).setVisibility(eq(View.VISIBLE));
+    }
+}
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 e28d077..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
@@ -15,18 +15,27 @@
 package com.android.systemui.statusbar.phone;
 
 import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
 
 import android.content.Context;
+import android.os.Looper;
+import android.view.Display;
 import android.view.WindowManager;
 
+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() {
@@ -35,19 +44,25 @@
 
     @Before
     public void setup() {
+        injectTestDependency(Dependency.BG_LOOPER, Looper.getMainLooper());
         mContext.putComponent(CommandQueue.class, mock(CommandQueue.class));
         mContext.putComponent(StatusBar.class, mock(StatusBar.class));
         mContext.putComponent(Recents.class, mock(Recents.class));
         mContext.putComponent(Divider.class, mock(Divider.class));
-        mContext.addMockSystemService(Context.WINDOW_SERVICE, mock(WindowManager.class));
+        injectLeakCheckedDependencies(ALL_SUPPORTED_CLASSES);
+        WindowManager windowManager = mock(WindowManager.class);
+        Display defaultDisplay = mContext.getSystemService(WindowManager.class).getDefaultDisplay();
+        when(windowManager.getDefaultDisplay()).thenReturn(
+                defaultDisplay);
+        mContext.addMockSystemService(Context.WINDOW_SERVICE, windowManager);
     }
 
     @Test
     public void testHomeLongPress() {
-        mContext.addMockSystemService(Context.WINDOW_SERVICE, mock(WindowManager.class));
         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 309559b..9f56da7 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
@@ -22,27 +22,51 @@
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
+import android.metrics.LogMaker;
+import android.metrics.MetricsReader;
+import android.support.test.filters.FlakyTest;
 import android.support.test.filters.SmallTest;
+import android.support.test.metricshelper.MetricsAsserts;
 import android.support.test.runner.AndroidJUnit4;
+import android.util.DisplayMetrics;
 
+import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
 import com.android.keyguard.KeyguardHostView.OnDismissAction;
 import com.android.systemui.SysuiTestCase;
+import com.android.systemui.statusbar.ActivatableNotificationView;
+import com.android.systemui.statusbar.KeyguardIndicationController;
+import com.android.systemui.statusbar.NotificationData;
+import com.android.systemui.statusbar.stack.NotificationStackScrollLayout;
 
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+// TODO(gpitsch): We have seen some flakes in these tests, needs some investigation.
+// Q: How is mMetricsReader being used by the tested code?
+// A: StatusBar uses MetricsLogger to write to the event log, then read back by MetricsReader
 @SmallTest
 @RunWith(AndroidJUnit4.class)
 public class StatusBarTest extends SysuiTestCase {
 
     StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
+    UnlockMethodCache mUnlockMethodCache;
+    KeyguardIndicationController mKeyguardIndicationController;
+    NotificationStackScrollLayout mStackScroller;
     StatusBar mStatusBar;
 
+    private MetricsReader mMetricsReader;
+    private DisplayMetrics mDisplayMetrics = new DisplayMetrics();
+
     @Before
     public void setup() {
         mStatusBarKeyguardViewManager = mock(StatusBarKeyguardViewManager.class);
-        mStatusBar = new TestableStatusBar(mStatusBarKeyguardViewManager);
+        mUnlockMethodCache = mock(UnlockMethodCache.class);
+        mKeyguardIndicationController = mock(KeyguardIndicationController.class);
+        mStackScroller = mock(NotificationStackScrollLayout.class);
+        mStatusBar = new TestableStatusBar(mStatusBarKeyguardViewManager, mUnlockMethodCache,
+                mKeyguardIndicationController, mStackScroller);
 
         doAnswer(invocation -> {
             OnDismissAction onDismissAction = (OnDismissAction) invocation.getArguments()[0];
@@ -55,6 +79,17 @@
             runnable.run();
             return null;
         }).when(mStatusBarKeyguardViewManager).addAfterKeyguardGoneRunnable(any());
+
+        when(mStackScroller.getActivatedChild()).thenReturn(null);
+
+        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
@@ -81,9 +116,126 @@
         mStatusBar.executeRunnableDismissingKeyguard(null, null, false, false, false);
     }
 
+    @Ignore("flaky test")
+    @FlakyTest
+    @Test
+    public void lockscreenStateMetrics_notShowing() {
+        // uninteresting state, except that fingerprint must be non-zero
+        when(mStatusBarKeyguardViewManager.isOccluded()).thenReturn(false);
+        when(mUnlockMethodCache.canSkipBouncer()).thenReturn(true);
+        // interesting state
+        when(mStatusBarKeyguardViewManager.isShowing()).thenReturn(false);
+        when(mStatusBarKeyguardViewManager.isBouncerShowing()).thenReturn(false);
+        when(mUnlockMethodCache.isMethodSecure()).thenReturn(false);
+
+        mStatusBar.onKeyguardViewManagerStatesUpdated();
+
+        MetricsAsserts.assertHasLog("missing hidden insecure lockscreen log", mMetricsReader,
+                new LogMaker(MetricsEvent.LOCKSCREEN)
+                        .setType(MetricsEvent.TYPE_CLOSE)
+                        .setSubtype(0));
+    }
+
+    @Ignore("flaky test")
+    @FlakyTest
+    @Test
+    public void lockscreenStateMetrics_notShowing_secure() {
+        // uninteresting state, except that fingerprint must be non-zero
+        when(mStatusBarKeyguardViewManager.isOccluded()).thenReturn(false);
+        when(mUnlockMethodCache.canSkipBouncer()).thenReturn(true);
+        // interesting state
+        when(mStatusBarKeyguardViewManager.isShowing()).thenReturn(false);
+        when(mStatusBarKeyguardViewManager.isBouncerShowing()).thenReturn(false);
+        when(mUnlockMethodCache.isMethodSecure()).thenReturn(true);
+
+        mStatusBar.onKeyguardViewManagerStatesUpdated();
+
+        MetricsAsserts.assertHasLog("missing hidden secure lockscreen log", mMetricsReader,
+                new LogMaker(MetricsEvent.LOCKSCREEN)
+                        .setType(MetricsEvent.TYPE_CLOSE)
+                        .setSubtype(1));
+    }
+
+    @Ignore("flaky test")
+    @FlakyTest
+    @Test
+    public void lockscreenStateMetrics_isShowing() {
+        // uninteresting state, except that fingerprint must be non-zero
+        when(mStatusBarKeyguardViewManager.isOccluded()).thenReturn(false);
+        when(mUnlockMethodCache.canSkipBouncer()).thenReturn(true);
+        // interesting state
+        when(mStatusBarKeyguardViewManager.isShowing()).thenReturn(true);
+        when(mStatusBarKeyguardViewManager.isBouncerShowing()).thenReturn(false);
+        when(mUnlockMethodCache.isMethodSecure()).thenReturn(false);
+
+        mStatusBar.onKeyguardViewManagerStatesUpdated();
+
+        MetricsAsserts.assertHasLog("missing insecure lockscreen showing", mMetricsReader,
+                new LogMaker(MetricsEvent.LOCKSCREEN)
+                        .setType(MetricsEvent.TYPE_OPEN)
+                        .setSubtype(0));
+    }
+
+    @Ignore("flaky test")
+    @FlakyTest
+    @Test
+    public void lockscreenStateMetrics_isShowing_secure() {
+        // uninteresting state, except that fingerprint must be non-zero
+        when(mStatusBarKeyguardViewManager.isOccluded()).thenReturn(false);
+        when(mUnlockMethodCache.canSkipBouncer()).thenReturn(true);
+        // interesting state
+        when(mStatusBarKeyguardViewManager.isShowing()).thenReturn(true);
+        when(mStatusBarKeyguardViewManager.isBouncerShowing()).thenReturn(false);
+        when(mUnlockMethodCache.isMethodSecure()).thenReturn(true);
+
+        mStatusBar.onKeyguardViewManagerStatesUpdated();
+
+        MetricsAsserts.assertHasLog("missing secure lockscreen showing log", mMetricsReader,
+                new LogMaker(MetricsEvent.LOCKSCREEN)
+                        .setType(MetricsEvent.TYPE_OPEN)
+                        .setSubtype(1));
+    }
+
+    @Ignore("flaky test")
+    @FlakyTest
+    @Test
+    public void lockscreenStateMetrics_isShowingBouncer() {
+        // uninteresting state, except that fingerprint must be non-zero
+        when(mStatusBarKeyguardViewManager.isOccluded()).thenReturn(false);
+        when(mUnlockMethodCache.canSkipBouncer()).thenReturn(true);
+        // interesting state
+        when(mStatusBarKeyguardViewManager.isShowing()).thenReturn(true);
+        when(mStatusBarKeyguardViewManager.isBouncerShowing()).thenReturn(true);
+        when(mUnlockMethodCache.isMethodSecure()).thenReturn(true);
+
+        mStatusBar.onKeyguardViewManagerStatesUpdated();
+
+        MetricsAsserts.assertHasLog("missing bouncer log", mMetricsReader,
+                new LogMaker(MetricsEvent.BOUNCER)
+                        .setType(MetricsEvent.TYPE_OPEN)
+                        .setSubtype(1));
+    }
+
+    @Ignore("flaky test")
+    @FlakyTest
+    @Test
+    public void onActivatedMetrics() {
+        ActivatableNotificationView view =  mock(ActivatableNotificationView.class);
+        mStatusBar.onActivated(view);
+
+        MetricsAsserts.assertHasLog("missing lockscreen note tap log", mMetricsReader,
+                new LogMaker(MetricsEvent.ACTION_LS_NOTE)
+                        .setType(MetricsEvent.TYPE_ACTION));
+    }
+
     static class TestableStatusBar extends StatusBar {
-        public TestableStatusBar(StatusBarKeyguardViewManager man) {
+        public TestableStatusBar(StatusBarKeyguardViewManager man,
+                UnlockMethodCache unlock, KeyguardIndicationController key,
+                NotificationStackScrollLayout stack) {
             mStatusBarKeyguardViewManager = man;
+            mUnlockMethodCache = unlock;
+            mKeyguardIndicationController = key;
+            mStackScroller = stack;
         }
 
         @Override
diff --git a/packages/SystemUI/tests/src/com/android/systemui/util/ChannelsTest.java b/packages/SystemUI/tests/src/com/android/systemui/util/ChannelsTest.java
index 8949598..f67296d 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/util/ChannelsTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/util/ChannelsTest.java
@@ -55,9 +55,8 @@
         Set<String> ALL_CHANNELS = new ArraySet<>(Arrays.asList(
                 NotificationChannels.ALERTS,
                 NotificationChannels.SCREENSHOTS,
-                NotificationChannels.SECURITY,
-                NotificationChannels.USER,
-                NotificationChannels.STORAGE
+                NotificationChannels.STORAGE,
+                NotificationChannels.GENERAL
         ));
         NotificationChannels.createAll(mContext);
         ArgumentCaptor<List> captor = ArgumentCaptor.forClass(List.class);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/util/leak/GarbageMonitorTest.java b/packages/SystemUI/tests/src/com/android/systemui/util/leak/GarbageMonitorTest.java
new file mode 100644
index 0000000..9a825c1
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/util/leak/GarbageMonitorTest.java
@@ -0,0 +1,153 @@
+/*
+ * 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.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@SmallTest
+@RunWith(AndroidJUnit4.class)
+public class GarbageMonitorTest {
+
+    private LeakReporter mLeakReporter;
+    private TrackedGarbage mTrackedGarbage;
+    private TestableGarbageMonitor mGarbageMonitor;
+
+    @Before
+    public void setup() {
+        mTrackedGarbage = mock(TrackedGarbage.class);
+        mLeakReporter = mock(LeakReporter.class);
+        mGarbageMonitor = new TestableGarbageMonitor(
+                new LeakDetector(null, mTrackedGarbage, null),
+                mLeakReporter);
+    }
+
+    @Test
+    public void testCallbacks_getScheduled() {
+        mGarbageMonitor.start();
+        mGarbageMonitor.runCallbacksOnce();
+        mGarbageMonitor.runCallbacksOnce();
+        mGarbageMonitor.runCallbacksOnce();
+    }
+
+    @Test
+    public void testNoGarbage_doesntDump() {
+        when(mTrackedGarbage.countOldGarbage()).thenReturn(0);
+
+        mGarbageMonitor.start();
+        mGarbageMonitor.runCallbacksOnce();
+        mGarbageMonitor.runCallbacksOnce();
+        mGarbageMonitor.runCallbacksOnce();
+
+        verify(mLeakReporter, never()).dumpLeak(anyInt());
+    }
+
+    @Test
+    public void testALittleGarbage_doesntDump() {
+        when(mTrackedGarbage.countOldGarbage()).thenReturn(4);
+
+        mGarbageMonitor.start();
+        mGarbageMonitor.runCallbacksOnce();
+        mGarbageMonitor.runCallbacksOnce();
+        mGarbageMonitor.runCallbacksOnce();
+
+        verify(mLeakReporter, never()).dumpLeak(anyInt());
+    }
+
+    @Test
+    public void testTransientGarbage_doesntDump() {
+        when(mTrackedGarbage.countOldGarbage()).thenReturn(100);
+
+        mGarbageMonitor.start();
+        mGarbageMonitor.runInspectCallback();
+
+        when(mTrackedGarbage.countOldGarbage()).thenReturn(0);
+
+        mGarbageMonitor.runReinspectCallback();
+
+        verify(mLeakReporter, never()).dumpLeak(anyInt());
+    }
+
+    @Test
+    public void testLotsOfPersistentGarbage_dumps() {
+        when(mTrackedGarbage.countOldGarbage()).thenReturn(100);
+
+        mGarbageMonitor.start();
+        mGarbageMonitor.runCallbacksOnce();
+
+        verify(mLeakReporter).dumpLeak(anyInt());
+    }
+
+    private static class TestableGarbageMonitor extends GarbageMonitor {
+        Runnable mInspectCallback;
+        Runnable mReinspectCallback;
+
+        public TestableGarbageMonitor(LeakDetector leakDetector,
+                LeakReporter leakReporter) {
+            super(null /* bgLooper */, leakDetector, leakReporter);
+        }
+
+        @Override
+        void scheduleInspectGarbage(Runnable runnable) {
+            assertNull("must not have more than one pending inspect callback", mInspectCallback);
+            mInspectCallback = runnable;
+        }
+
+        void runInspectCallback() {
+            assertNotNull("expected an inspect callback to be scheduled", mInspectCallback);
+            Runnable callback = mInspectCallback;
+            mInspectCallback = null;
+            callback.run();
+        }
+
+        @Override
+        void scheduleReinspectGarbage(Runnable runnable) {
+            assertNull("must not have more than one reinspect callback", mReinspectCallback);
+            mReinspectCallback = runnable;
+        }
+
+        void runReinspectCallback() {
+            assertNotNull("expected a reinspect callback to be scheduled", mInspectCallback);
+            maybeRunReinspectCallback();
+        }
+
+        void maybeRunReinspectCallback() {
+            Runnable callback = mReinspectCallback;
+            mReinspectCallback = null;
+            if (callback != null) {
+                callback.run();
+            }
+        }
+
+        void runCallbacksOnce() {
+            runInspectCallback();
+            maybeRunReinspectCallback();
+        }
+    }
+}
\ 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/LeakReporterTest.java b/packages/SystemUI/tests/src/com/android/systemui/util/leak/LeakReporterTest.java
new file mode 100644
index 0000000..1194849
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/util/leak/LeakReporterTest.java
@@ -0,0 +1,100 @@
+/*
+ * 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.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+
+import android.app.NotificationManager;
+import android.support.test.runner.AndroidJUnit4;
+
+import com.android.systemui.SysuiTestCase;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.io.File;
+import java.io.PrintWriter;
+
+@RunWith(AndroidJUnit4.class)
+public class LeakReporterTest extends SysuiTestCase {
+
+    private LeakDetector mLeakDetector;
+    private LeakReporter mLeakReporter;
+    private File mLeakDir;
+    private File mLeakDump;
+    private File mLeakHprof;
+    private NotificationManager mNotificationManager;
+
+    @Before
+    public void setup() {
+        mLeakDir = new File(mContext.getCacheDir(), LeakReporter.LEAK_DIR);
+        mLeakDump = new File(mLeakDir, LeakReporter.LEAK_DUMP);
+        mLeakHprof = new File(mLeakDir, LeakReporter.LEAK_HPROF);
+
+        mNotificationManager = mock(NotificationManager.class);
+        mContext.addMockSystemService(NotificationManager.class, mNotificationManager);
+
+        mLeakDetector = mock(LeakDetector.class);
+        doAnswer(invocation -> {
+            invocation.<PrintWriter>getArgument(1).println("test");
+            return null;
+        }).when(mLeakDetector).dump(any(), any(), any());
+
+        mLeakReporter = new LeakReporter(mContext, mLeakDetector, "test@example.com");
+    }
+
+    @After
+    public void teardown() {
+        mLeakDump.delete();
+        mLeakHprof.delete();
+        mLeakDir.delete();
+    }
+
+    @Ignore("slow")
+    @Test
+    public void testDump_postsNotification() {
+        mLeakReporter.dumpLeak(5);
+        verify(mNotificationManager).notify(any(), anyInt(), any());
+    }
+
+    @Ignore("slow")
+    @Test
+    public void testDump_Repeated() {
+        mLeakReporter.dumpLeak(1);
+        mLeakReporter.dumpLeak(2);
+    }
+
+    @Ignore("slow")
+    @Test
+    public void testDump_ProducesNonZeroFiles() {
+        mLeakReporter.dumpLeak(5);
+
+        assertTrue(mLeakDump.exists());
+        assertTrue(mLeakDump.length() > 0);
+
+        assertTrue(mLeakHprof.exists());
+        assertTrue(mLeakHprof.length() > 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/TestableContext.java b/packages/SystemUI/tests/src/com/android/systemui/utils/TestableContext.java
index 62c007f..1429390 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/utils/TestableContext.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/utils/TestableContext.java
@@ -30,10 +30,11 @@
 import android.os.UserHandle;
 import android.provider.Settings;
 import android.util.ArrayMap;
+import android.view.LayoutInflater;
 
 import com.android.systemui.SysUiServiceProvider;
-import com.android.systemui.utils.leaks.Tracker;
 import com.android.systemui.SysuiTestCase;
+import com.android.systemui.utils.leaks.Tracker;
 
 public class TestableContext extends ContextWrapper implements SysUiServiceProvider {
 
@@ -80,6 +81,10 @@
         return super.getResources();
     }
 
+    public <T> void addMockSystemService(Class<T> service, T mock) {
+        addMockSystemService(getSystemServiceName(service), mock);
+    }
+
     public void addMockSystemService(String name, Object service) {
         mMockSystemServices = lazyInit(mMockSystemServices);
         mMockSystemServices.put(name, service);
@@ -99,6 +104,9 @@
         if (mMockSystemServices != null && mMockSystemServices.containsKey(name)) {
             return mMockSystemServices.get(name);
         }
+        if (name.equals(LAYOUT_INFLATER_SERVICE)) {
+            return getBaseContext().getSystemService(LayoutInflater.class).cloneInContext(this);
+        }
         return super.getSystemService(name);
     }
 
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
new file mode 100644
index 0000000..07e5f66
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/utils/ViewUtils.java
@@ -0,0 +1,44 @@
+/*
+ * 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.graphics.PixelFormat;
+import android.os.Handler;
+import android.os.Looper;
+import android.view.View;
+import android.view.WindowManager;
+import android.view.WindowManager.LayoutParams;
+import android.support.test.InstrumentationRegistry;
+
+import com.android.systemui.SysuiTestCase;
+
+public class ViewUtils {
+
+    public static void attachView(View view) {
+        WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
+                LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT,
+                LayoutParams.TYPE_APPLICATION_OVERLAY,
+                0, PixelFormat.TRANSLUCENT);
+        Handler handler = new Handler(Looper.getMainLooper());
+        handler.post(() -> InstrumentationRegistry.getContext()
+                .getSystemService(WindowManager.class).addView(view, lp));
+    }
+
+    public static void detachView(View view) {
+        Handler handler = new Handler(Looper.getMainLooper());
+        handler.post(() -> InstrumentationRegistry.getContext()
+                .getSystemService(WindowManager.class).removeView(view));
+    }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeKeyguardMonitor.java b/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeKeyguardMonitor.java
index 39bbf2d..21871fc 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeKeyguardMonitor.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeKeyguardMonitor.java
@@ -45,6 +45,26 @@
     }
 
     @Override
+    public boolean isKeyguardFadingAway() {
+        return false;
+    }
+
+    @Override
+    public boolean isKeyguardGoingAway() {
+        return false;
+    }
+
+    @Override
+    public long getKeyguardFadingAwayDuration() {
+        return 0;
+    }
+
+    @Override
+    public long getKeyguardFadingAwayDelay() {
+        return 0;
+    }
+
+    @Override
     public boolean canSkipBouncer() {
         return false;
     }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakePluginManager.java b/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakePluginManager.java
new file mode 100644
index 0000000..59a9361
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakePluginManager.java
@@ -0,0 +1,47 @@
+/*
+ * 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.leaks;
+
+import android.content.Context;
+
+import com.android.systemui.plugins.Plugin;
+import com.android.systemui.plugins.PluginListener;
+import com.android.systemui.plugins.PluginManager;
+
+public class FakePluginManager extends PluginManager {
+
+    private final BaseLeakChecker<PluginListener> mLeakChecker;
+
+    public FakePluginManager(Context context, LeakCheckedTest test) {
+        super(context);
+        mLeakChecker = new BaseLeakChecker<>(test, "Plugin");
+    }
+
+    @Override
+    public <T extends Plugin> void addPluginListener(String action, PluginListener<T> listener,
+            Class cls, boolean allowMultiple) {
+        mLeakChecker.addCallback(listener);
+    }
+
+    @Override
+    public void removePluginListener(PluginListener<?> listener) {
+        mLeakChecker.removeCallback(listener);
+    }
+
+    @Override
+    public <T extends Plugin> T getOneShotPlugin(String action, Class<?> cls) {
+        return null;
+    }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeStatusBarIconController.java b/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeStatusBarIconController.java
new file mode 100644
index 0000000..b13535f
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeStatusBarIconController.java
@@ -0,0 +1,62 @@
+/*
+ * 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.leaks;
+
+import com.android.internal.statusbar.StatusBarIcon;
+import com.android.systemui.statusbar.phone.StatusBarIconController;
+import com.android.systemui.statusbar.phone.StatusBarIconController.IconManager;
+
+public class FakeStatusBarIconController extends BaseLeakChecker<IconManager>
+        implements StatusBarIconController {
+
+    public FakeStatusBarIconController(LeakCheckedTest test) {
+        super(test, "StatusBarGroup");
+    }
+
+    @Override
+    public void addIconGroup(IconManager iconManager) {
+        addCallback(iconManager);
+    }
+
+    @Override
+    public void removeIconGroup(IconManager iconManager) {
+        removeCallback(iconManager);
+    }
+
+    @Override
+    public void setExternalIcon(String slot) {
+
+    }
+
+    @Override
+    public void setIcon(String slot, int resourceId, CharSequence contentDescription) {
+
+    }
+
+    @Override
+    public void setIcon(String slot, StatusBarIcon icon) {
+
+    }
+
+    @Override
+    public void setIconVisibility(String slotTty, boolean b) {
+
+    }
+
+    @Override
+    public void removeIcon(String slot) {
+
+    }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeTunerService.java b/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeTunerService.java
new file mode 100644
index 0000000..b841ce9
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeTunerService.java
@@ -0,0 +1,43 @@
+/*
+ * 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.leaks;
+
+import android.content.Context;
+
+import com.android.systemui.tuner.TunerService;
+
+public class FakeTunerService extends TunerService {
+
+    private final BaseLeakChecker<Tunable> mBaseLeakChecker;
+
+    public FakeTunerService(Context context, LeakCheckedTest test) {
+        super(context);
+        mBaseLeakChecker = new BaseLeakChecker<>(test, "tunable");
+        destroy();
+    }
+
+    @Override
+    public void addTunable(Tunable tunable, String... keys) {
+        for (String key : keys) {
+            tunable.onTuningChanged(key, null);
+        }
+        mBaseLeakChecker.addCallback(tunable);
+    }
+
+    @Override
+    public void removeTunable(Tunable tunable) {
+        mBaseLeakChecker.removeCallback(tunable);
+    }
+}
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 c182493..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
@@ -20,7 +20,9 @@
 import android.util.ArrayMap;
 
 import com.android.systemui.SysuiTestCase;
+import com.android.systemui.plugins.PluginManager;
 import com.android.systemui.statusbar.phone.ManagedProfileController;
+import com.android.systemui.statusbar.phone.StatusBarIconController;
 import com.android.systemui.statusbar.policy.BatteryController;
 import com.android.systemui.statusbar.policy.BluetoothController;
 import com.android.systemui.statusbar.policy.CallbackController;
@@ -35,6 +37,7 @@
 import com.android.systemui.statusbar.policy.SecurityController;
 import com.android.systemui.statusbar.policy.UserInfoController;
 import com.android.systemui.statusbar.policy.ZenModeController;
+import com.android.systemui.tuner.TunerService;
 
 import org.junit.Assert;
 import org.junit.Rule;
@@ -56,6 +59,26 @@
     private final Map<String, Tracker> mTrackers = new HashMap<>();
     private final Map<Class, Object> mLeakCheckers = new ArrayMap<>();
 
+    public static final Class<?>[] ALL_SUPPORTED_CLASSES = new Class[] {
+            BluetoothController.class,
+            LocationController.class,
+            RotationLockController.class,
+            ZenModeController.class,
+            CastController.class,
+            HotspotController.class,
+            FlashlightController.class,
+            UserInfoController.class,
+            KeyguardMonitor.class,
+            BatteryController.class,
+            SecurityController.class,
+            ManagedProfileController.class,
+            NextAlarmController.class,
+            NetworkController.class,
+            PluginManager.class,
+            TunerService.class,
+            StatusBarIconController.class,
+    };
+
     @Rule
     public TestWatcher successWatcher = new TestWatcher() {
         @Override
@@ -96,6 +119,12 @@
                 obj = new FakeNextAlarmController(this);
             } else if (cls == NetworkController.class) {
                 obj = new FakeNetworkController(this);
+            } else if (cls == PluginManager.class) {
+                obj = new FakePluginManager(mContext, this);
+            } else if (cls == TunerService.class) {
+                obj = new FakeTunerService(mContext, this);
+            } else if (cls == StatusBarIconController.class) {
+                obj = new FakeStatusBarIconController(this);
             } else {
                 Assert.fail(cls.getName() + " is not supported by LeakCheckedTest yet");
             }
@@ -120,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/packages/WallpaperBackup/src/com/android/wallpaperbackup/WallpaperBackupAgent.java b/packages/WallpaperBackup/src/com/android/wallpaperbackup/WallpaperBackupAgent.java
index ff934ef..4254a0b 100644
--- a/packages/WallpaperBackup/src/com/android/wallpaperbackup/WallpaperBackupAgent.java
+++ b/packages/WallpaperBackup/src/com/android/wallpaperbackup/WallpaperBackupAgent.java
@@ -217,9 +217,6 @@
         final int sysWhich = FLAG_SYSTEM | (lockImageStage.exists() ? 0 : FLAG_LOCK);
 
         try {
-            // First off, revert to the factory state
-            mWm.clear(FLAG_SYSTEM | FLAG_LOCK);
-
             // It is valid for the imagery to be absent; it means that we were not permitted
             // to back up the original image on the source device, or there was no user-supplied
             // wallpaper image present.
@@ -233,6 +230,11 @@
                     Slog.i(TAG, "Using wallpaper service " + wpService);
                 }
                 mWm.setWallpaperComponent(wpService, UserHandle.USER_SYSTEM);
+                if (!lockImageStage.exists()) {
+                    // We have a live wallpaper and no static lock image,
+                    // allow live wallpaper to show "through" on lock screen.
+                    mWm.clear(FLAG_LOCK);
+                }
             } else {
                 if (DEBUG) {
                     Slog.v(TAG, "Can't use wallpaper service " + wpService);
diff --git a/preloaded-classes b/preloaded-classes
index 2fad5dd..7dc5a25 100644
--- a/preloaded-classes
+++ b/preloaded-classes
@@ -1,3 +1,28 @@
+#
+# 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.
+#
+#
+#
+# Preloaded-classes filter file for phones.
+#
+# Classes in this file will be allocated into the boot image, and forcibly initialized in
+# the zygote during initialization. This is a trade-off, using virtual address space to share
+# common heap between apps.
+#
+# This file has been derived for mainline phone (and tablet) usage.
+#
 [B
 [C
 [D
@@ -9,7 +34,6 @@
 [Landroid.animation.Keyframe$FloatKeyframe;
 [Landroid.animation.Keyframe$IntKeyframe;
 [Landroid.animation.Keyframe$ObjectKeyframe;
-[Landroid.animation.Keyframe;
 [Landroid.animation.PropertyValuesHolder;
 [Landroid.app.LoaderManagerImpl;
 [Landroid.content.ContentProviderResult;
@@ -57,45 +81,45 @@
 [Landroid.hardware.soundtrigger.SoundTrigger$Keyphrase;
 [Landroid.hardware.soundtrigger.SoundTrigger$KeyphraseRecognitionExtra;
 [Landroid.icu.impl.CacheValue$Strength;
+[Landroid.icu.impl.CacheValue;
+[Landroid.icu.impl.CurrencyData$CurrencySpacingInfo$SpacingPattern;
+[Landroid.icu.impl.CurrencyData$CurrencySpacingInfo$SpacingType;
 [Landroid.icu.impl.ICUResourceBundle$OpenType;
 [Landroid.icu.impl.StandardPlural;
 [Landroid.icu.impl.Trie2$ValueWidth;
 [Landroid.icu.impl.UCharacterProperty$BinaryProperty;
 [Landroid.icu.impl.UCharacterProperty$IntProperty;
-[Landroid.icu.lang.UScript$ScriptUsage;
-[Landroid.icu.text.DateFormat$BooleanAttribute;
-[Landroid.icu.text.DateFormat$Field;
+[Landroid.icu.text.DateFormatSymbols$CalendarDataSink$AliasType;
 [Landroid.icu.text.DateFormatSymbols$CapitalizationContextUsage;
-[Landroid.icu.text.DateTimePatternGenerator$DTPGflags;
 [Landroid.icu.text.DisplayContext$Type;
 [Landroid.icu.text.DisplayContext;
-[Landroid.icu.text.MessagePattern$ApostropheMode;
-[Landroid.icu.text.MessagePattern$ArgType;
-[Landroid.icu.text.MessagePattern$Part$Type;
 [Landroid.icu.text.PluralRules$Operand;
 [Landroid.icu.text.PluralRules$PluralType;
 [Landroid.icu.text.PluralRules$SampleType;
+[Landroid.icu.text.TimeZoneNames$NameType;
 [Landroid.icu.text.UnicodeSet;
 [Landroid.icu.util.BytesTrie$Result;
-[Landroid.icu.util.Calendar$CalType;
 [Landroid.icu.util.Currency$CurrencyUsage;
 [Landroid.icu.util.ULocale$Category;
 [Landroid.icu.util.ULocale;
+[Landroid.icu.util.UResourceBundle$RootType;
 [Landroid.media.AudioGain;
+[Landroid.media.MediaCodecInfo$CodecProfileLevel;
 [Landroid.net.Network;
 [Landroid.net.NetworkInfo$DetailedState;
 [Landroid.net.NetworkInfo$State;
+[Landroid.net.NetworkRequest$Type;
 [Landroid.net.Uri;
 [Landroid.net.wifi.SupplicantState;
 [Landroid.os.AsyncTask$Status;
-[Landroid.os.Bundle;
+[Landroid.os.IBinder;
 [Landroid.os.MessageQueue$IdleHandler;
 [Landroid.os.Parcel;
-[Landroid.os.ParcelFileDescriptor;
 [Landroid.os.Parcelable;
 [Landroid.os.PatternMatcher;
 [Landroid.os.storage.StorageVolume;
 [Landroid.system.StructPollfd;
+[Landroid.telephony.TelephonyManager$MultiSimVariants;
 [Landroid.text.DynamicLayout$ChangeWatcher;
 [Landroid.text.InputFilter;
 [Landroid.text.Layout$Alignment;
@@ -124,9 +148,7 @@
 [Landroid.util.Range;
 [Landroid.util.Rational;
 [Landroid.view.Choreographer$CallbackQueue;
-[Landroid.view.Display$ColorTransform;
 [Landroid.view.Display$Mode;
-[Landroid.view.Display;
 [Landroid.view.HandlerActionQueue$HandlerAction;
 [Landroid.view.MenuItem;
 [Landroid.view.View;
@@ -146,18 +168,22 @@
 [Lcom.android.org.bouncycastle.asn1.ASN1ObjectIdentifier;
 [Lcom.android.org.conscrypt.OpenSSLX509CertPath$Encoding;
 [Lcom.android.org.conscrypt.OpenSSLX509Certificate;
+[Lcom.android.org.conscrypt.ct.CTLogInfo;
 [Ldalvik.system.DexPathList$Element;
-[Ljava.beans.PropertyChangeListener;
+[Ldalvik.system.DexPathList$NativeLibraryElement;
 [Ljava.io.File$PathStatus;
 [Ljava.io.File;
 [Ljava.io.FileDescriptor;
 [Ljava.io.IOException;
+[Ljava.io.ObjectInputStream$HandleTable$HandleList;
 [Ljava.io.ObjectStreamField;
+[Ljava.lang.Boolean;
 [Ljava.lang.Byte;
 [Ljava.lang.CharSequence;
 [Ljava.lang.Character$UnicodeBlock;
 [Ljava.lang.Character;
 [Ljava.lang.Class;
+[Ljava.lang.Comparable;
 [Ljava.lang.Enum;
 [Ljava.lang.Integer;
 [Ljava.lang.Long;
@@ -174,21 +200,20 @@
 [Ljava.lang.Throwable;
 [Ljava.lang.Void;
 [Ljava.lang.annotation.Annotation;
-[Ljava.lang.ref.SoftReference;
+[Ljava.lang.invoke.MethodType;
 [Ljava.lang.ref.WeakReference;
 [Ljava.lang.reflect.AccessibleObject;
 [Ljava.lang.reflect.Constructor;
 [Ljava.lang.reflect.Field;
 [Ljava.lang.reflect.Method;
+[Ljava.lang.reflect.Parameter;
 [Ljava.lang.reflect.Type;
 [Ljava.lang.reflect.TypeVariable;
-[Ljava.math.BigDecimal;
 [Ljava.math.BigInteger;
 [Ljava.math.RoundingMode;
 [Ljava.net.InetAddress;
-[Ljava.net.InterfaceAddress;
-[Ljava.net.NetworkInterface;
 [Ljava.net.Proxy$Type;
+[Ljava.nio.file.attribute.FileAttribute;
 [Ljava.security.CryptoPrimitive;
 [Ljava.security.Provider;
 [Ljava.security.cert.Certificate;
@@ -200,30 +225,31 @@
 [Ljava.util.Enumeration;
 [Ljava.util.Formatter$Flags;
 [Ljava.util.Formatter$FormatString;
-[Ljava.util.HashMap$HashMapEntry;
+[Ljava.util.HashMap$Node;
 [Ljava.util.Hashtable$HashtableEntry;
-[Ljava.util.List;
 [Ljava.util.Locale$Category;
 [Ljava.util.Locale;
 [Ljava.util.Map$Entry;
 [Ljava.util.WeakHashMap$Entry;
+[Ljava.util.concurrent.ConcurrentHashMap$CounterCell;
 [Ljava.util.concurrent.ConcurrentHashMap$Node;
 [Ljava.util.concurrent.ConcurrentHashMap$Segment;
+[Ljava.util.concurrent.ForkJoinTask$ExceptionNode;
 [Ljava.util.concurrent.RunnableScheduledFuture;
 [Ljava.util.concurrent.TimeUnit;
 [Ljava.util.logging.Handler;
 [Ljava.util.regex.Pattern;
-[Ljavax.crypto.Cipher$InitType;
-[Ljavax.crypto.Cipher$NeedToSet;
 [Ljavax.net.ssl.KeyManager;
 [Ljavax.net.ssl.TrustManager;
 [Ljavax.security.cert.X509Certificate;
 [Llibcore.io.ClassPathURLStreamHandler;
+[Llibcore.io.IoTracker$Mode;
 [Llibcore.reflect.AnnotationMember$DefaultValues;
 [Llibcore.reflect.AnnotationMember;
 [Lorg.apache.http.Header;
 [Lorg.json.JSONStringer$Scope;
 [Lorg.kxml2.io.KXmlParser$ValueContext;
+[Lsun.misc.FDBigInteger;
 [Lsun.misc.FormattedFloatingDecimal$Form;
 [Lsun.security.jca.ProviderConfig;
 [Lsun.security.jca.ServiceId;
@@ -244,31 +270,22 @@
 [[Ljava.lang.Object;
 [[Ljava.lang.String;
 [[Ljava.lang.annotation.Annotation;
-[[S
 [[[I
 android.R$styleable
 android.accounts.Account
 android.accounts.Account$1
 android.accounts.AccountManager
 android.accounts.AccountManager$1
-android.accounts.AccountManager$11
-android.accounts.AccountManager$AmsTask
-android.accounts.AccountManager$AmsTask$1
-android.accounts.AccountManager$AmsTask$Response
-android.accounts.AccountManagerCallback
 android.accounts.AccountManagerFuture
 android.accounts.AccountsException
 android.accounts.AuthenticatorException
 android.accounts.IAccountManager
 android.accounts.IAccountManager$Stub
 android.accounts.IAccountManager$Stub$Proxy
-android.accounts.IAccountManagerResponse
-android.accounts.IAccountManagerResponse$Stub
 android.accounts.OnAccountsUpdateListener
 android.accounts.OperationCanceledException
 android.animation.AnimationHandler
 android.animation.AnimationHandler$1
-android.animation.AnimationHandler$2
 android.animation.AnimationHandler$AnimationFrameCallback
 android.animation.AnimationHandler$AnimationFrameCallbackProvider
 android.animation.AnimationHandler$MyFrameCallbackProvider
@@ -277,12 +294,15 @@
 android.animation.Animator$AnimatorListener
 android.animation.Animator$AnimatorPauseListener
 android.animation.AnimatorInflater
-android.animation.AnimatorInflater$PathDataEvaluator
 android.animation.AnimatorListenerAdapter
 android.animation.AnimatorSet
-android.animation.AnimatorSet$AnimatorSetListener
+android.animation.AnimatorSet$1
+android.animation.AnimatorSet$2
+android.animation.AnimatorSet$3
+android.animation.AnimatorSet$AnimationEvent
 android.animation.AnimatorSet$Builder
 android.animation.AnimatorSet$Node
+android.animation.AnimatorSet$SeekState
 android.animation.ArgbEvaluator
 android.animation.FloatEvaluator
 android.animation.FloatKeyframeSet
@@ -299,14 +319,13 @@
 android.animation.LayoutTransition
 android.animation.LayoutTransition$TransitionListener
 android.animation.ObjectAnimator
-android.animation.PathKeyframes
-android.animation.PathKeyframes$1
-android.animation.PathKeyframes$2
 android.animation.PathKeyframes$FloatKeyframesBase
+android.animation.PathKeyframes$IntKeyframesBase
 android.animation.PathKeyframes$SimpleKeyframes
 android.animation.PropertyValuesHolder
 android.animation.PropertyValuesHolder$FloatPropertyValuesHolder
 android.animation.PropertyValuesHolder$IntPropertyValuesHolder
+android.animation.PropertyValuesHolder$PropertyValues
 android.animation.RectEvaluator
 android.animation.StateListAnimator
 android.animation.StateListAnimator$1
@@ -316,12 +335,15 @@
 android.animation.TypeEvaluator
 android.animation.ValueAnimator
 android.animation.ValueAnimator$AnimatorUpdateListener
+android.app.-$Lambda$36$c44uHH2WE4sJvw5tZZB6gRzEaHI
+android.app.-$Lambda$39$c44uHH2WE4sJvw5tZZB6gRzEaHI
+android.app.-$Lambda$7$u_rp3dnwvfyMTggc6hVftcuYJ3E
 android.app.ActionBar
 android.app.ActionBar$LayoutParams
 android.app.Activity
 android.app.Activity$HostCallbacks
 android.app.ActivityManager
-android.app.ActivityManager$MemoryInfo
+android.app.ActivityManager$1
 android.app.ActivityManager$RunningAppProcessInfo
 android.app.ActivityManager$RunningAppProcessInfo$1
 android.app.ActivityManager$StackId
@@ -357,20 +379,17 @@
 android.app.AppOpsManager
 android.app.Application
 android.app.Application$ActivityLifecycleCallbacks
-android.app.ApplicationErrorReport
 android.app.ApplicationErrorReport$CrashInfo
 android.app.ApplicationLoaders
 android.app.ApplicationPackageManager
 android.app.ApplicationPackageManager$ResourceName
 android.app.BackStackRecord
 android.app.BackStackRecord$Op
-android.app.BackStackRecord$TransitionState
 android.app.ContentProviderHolder
 android.app.ContentProviderHolder$1
 android.app.ContextImpl
 android.app.ContextImpl$ApplicationContentResolver
 android.app.Dialog
-android.app.Dialog$-void__init__android_content_Context_context_int_themeResId_boolean_createContextThemeWrapper_LambdaImpl0
 android.app.Dialog$ListenersHandler
 android.app.DialogFragment
 android.app.DownloadManager
@@ -383,7 +402,10 @@
 android.app.FragmentManager$BackStackEntry
 android.app.FragmentManagerImpl
 android.app.FragmentManagerImpl$1
+android.app.FragmentManagerImpl$OpGenerator
 android.app.FragmentTransaction
+android.app.FragmentTransition
+android.app.FragmentTransition$FragmentContainerTransition
 android.app.IActivityManager
 android.app.IActivityManager$Stub
 android.app.IActivityManager$Stub$Proxy
@@ -392,7 +414,6 @@
 android.app.IAlarmManager$Stub$Proxy
 android.app.IApplicationThread
 android.app.IApplicationThread$Stub
-android.app.IApplicationThread$Stub$Proxy
 android.app.IInstrumentationWatcher
 android.app.IInstrumentationWatcher$Stub
 android.app.INotificationManager
@@ -409,10 +430,10 @@
 android.app.IntentReceiverLeaked
 android.app.IntentService
 android.app.IntentService$ServiceHandler
-android.app.JobSchedulerImpl
 android.app.KeyguardManager
 android.app.ListActivity
 android.app.LoadedApk
+android.app.LoadedApk$DexLoadReporter
 android.app.LoadedApk$ReceiverDispatcher
 android.app.LoadedApk$ReceiverDispatcher$Args
 android.app.LoadedApk$ReceiverDispatcher$InnerReceiver
@@ -426,19 +447,17 @@
 android.app.LoaderManagerImpl
 android.app.NativeActivity
 android.app.Notification
-android.app.Notification$1
 android.app.Notification$Action
 android.app.Notification$BigTextStyle
 android.app.Notification$Builder
-android.app.Notification$BuilderRemoteViews
 android.app.Notification$Style
 android.app.NotificationManager
-android.app.OnActivityPausedListener
 android.app.PendingIntent
 android.app.PendingIntent$1
 android.app.PendingIntent$CanceledException
-android.app.ProgressDialog
+android.app.PendingIntent$OnMarshaledListener
 android.app.QueuedWork
+android.app.QueuedWork$QueuedWorkHandler
 android.app.ReceiverRestrictedContext
 android.app.ResourcesManager
 android.app.ResourcesManager$1
@@ -530,6 +549,11 @@
 android.app.SystemServiceRegistry$72
 android.app.SystemServiceRegistry$73
 android.app.SystemServiceRegistry$74
+android.app.SystemServiceRegistry$75
+android.app.SystemServiceRegistry$76
+android.app.SystemServiceRegistry$77
+android.app.SystemServiceRegistry$78
+android.app.SystemServiceRegistry$79
 android.app.SystemServiceRegistry$8
 android.app.SystemServiceRegistry$9
 android.app.SystemServiceRegistry$CachedServiceFetcher
@@ -550,13 +574,11 @@
 android.app.backup.BackupDataOutput
 android.app.backup.BackupHelperDispatcher
 android.app.backup.BackupHelperDispatcher$Header
+android.app.backup.BackupManager
 android.app.backup.FileBackupHelperBase
 android.app.backup.FullBackup
 android.app.backup.FullBackupDataOutput
-android.app.job.IJobScheduler
-android.app.job.IJobScheduler$Stub
 android.app.job.JobInfo
-android.app.job.JobInfo$Builder
 android.app.job.JobScheduler
 android.app.job.JobService
 android.app.trust.ITrustManager
@@ -564,14 +586,15 @@
 android.app.trust.ITrustManager$Stub$Proxy
 android.app.trust.TrustManager
 android.app.usage.NetworkStatsManager
+android.app.usage.StorageStatsManager
 android.app.usage.UsageStatsManager
 android.appwidget.AppWidgetManager
-android.appwidget.AppWidgetProvider
 android.bluetooth.BluetoothAdapter
 android.bluetooth.BluetoothAdapter$1
 android.bluetooth.BluetoothManager
 android.bluetooth.IBluetooth
 android.bluetooth.IBluetooth$Stub
+android.bluetooth.IBluetooth$Stub$Proxy
 android.bluetooth.IBluetoothManager
 android.bluetooth.IBluetoothManager$Stub
 android.bluetooth.IBluetoothManager$Stub$Proxy
@@ -582,8 +605,6 @@
 android.content.BroadcastReceiver$PendingResult
 android.content.BroadcastReceiver$PendingResult$1
 android.content.ClipData
-android.content.ClipData$Item
-android.content.ClipDescription
 android.content.ClipboardManager
 android.content.ComponentCallbacks
 android.content.ComponentCallbacks2
@@ -594,7 +615,6 @@
 android.content.ContentProviderClient
 android.content.ContentProviderNative
 android.content.ContentProviderOperation
-android.content.ContentProviderOperation$Builder
 android.content.ContentProviderProxy
 android.content.ContentProviderResult
 android.content.ContentResolver
@@ -618,10 +638,6 @@
 android.content.IIntentSender
 android.content.IIntentSender$Stub
 android.content.IIntentSender$Stub$Proxy
-android.content.ISyncAdapter
-android.content.ISyncAdapter$Stub
-android.content.ISyncContext
-android.content.ISyncContext$Stub
 android.content.Intent
 android.content.Intent$1
 android.content.IntentFilter
@@ -635,13 +651,7 @@
 android.content.SharedPreferences
 android.content.SharedPreferences$Editor
 android.content.SharedPreferences$OnSharedPreferenceChangeListener
-android.content.SyncResult
-android.content.SyncResult$1
-android.content.SyncStats
-android.content.SyncStats$1
 android.content.UndoManager
-android.content.UndoManager$UndoState
-android.content.UndoOperation
 android.content.UndoOwner
 android.content.UriMatcher
 android.content.pm.ActivityInfo
@@ -714,7 +724,6 @@
 android.content.res.ResourcesImpl$ThemeImpl
 android.content.res.ResourcesKey
 android.content.res.StringBlock
-android.content.res.StringBlock$StyleIDs
 android.content.res.ThemedResourceCache
 android.content.res.TypedArray
 android.content.res.XmlBlock
@@ -752,7 +761,6 @@
 android.database.IContentObserver$Stub
 android.database.IContentObserver$Stub$Proxy
 android.database.MatrixCursor
-android.database.MatrixCursor$RowBuilder
 android.database.Observable
 android.database.SQLException
 android.database.sqlite.DatabaseObjectNotClosedException
@@ -796,6 +804,7 @@
 android.ddm.DdmHandleThread
 android.ddm.DdmHandleViewDebug
 android.ddm.DdmRegister
+android.graphics.BaseCanvas
 android.graphics.Bitmap
 android.graphics.Bitmap$1
 android.graphics.Bitmap$CompressFormat
@@ -812,7 +821,6 @@
 android.graphics.CanvasProperty
 android.graphics.Color
 android.graphics.ColorFilter
-android.graphics.ColorMatrix
 android.graphics.ColorMatrixColorFilter
 android.graphics.ComposePathEffect
 android.graphics.ComposeShader
@@ -823,15 +831,17 @@
 android.graphics.EmbossMaskFilter
 android.graphics.FontFamily
 android.graphics.FontListParser
+android.graphics.GraphicBuffer
+android.graphics.GraphicBuffer$1
 android.graphics.Insets
 android.graphics.Interpolator
 android.graphics.Interpolator$Result
-android.graphics.LayerRasterizer
 android.graphics.LightingColorFilter
 android.graphics.LinearGradient
 android.graphics.MaskFilter
 android.graphics.Matrix
 android.graphics.Matrix$1
+android.graphics.Matrix$NoImagePreloadHolder
 android.graphics.Matrix$ScaleToFit
 android.graphics.Movie
 android.graphics.NinePatch
@@ -863,7 +873,6 @@
 android.graphics.PorterDuffColorFilter
 android.graphics.PorterDuffXfermode
 android.graphics.RadialGradient
-android.graphics.Rasterizer
 android.graphics.Rect
 android.graphics.Rect$1
 android.graphics.RectF
@@ -876,7 +885,6 @@
 android.graphics.Shader$TileMode
 android.graphics.SumPathEffect
 android.graphics.SurfaceTexture
-android.graphics.SurfaceTexture$OnFrameAvailableListener
 android.graphics.SweepGradient
 android.graphics.TableMaskFilter
 android.graphics.TemporaryBuffer
@@ -893,7 +901,6 @@
 android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState$PendingAnimator
 android.graphics.drawable.AnimatedVectorDrawable$VectorDrawableAnimator
 android.graphics.drawable.AnimatedVectorDrawable$VectorDrawableAnimatorRT
-android.graphics.drawable.AnimatedVectorDrawable$VectorDrawableAnimatorUI
 android.graphics.drawable.AnimationDrawable
 android.graphics.drawable.AnimationDrawable$AnimationState
 android.graphics.drawable.BitmapDrawable
@@ -904,6 +911,7 @@
 android.graphics.drawable.Drawable$Callback
 android.graphics.drawable.Drawable$ConstantState
 android.graphics.drawable.DrawableContainer
+android.graphics.drawable.DrawableContainer$BlockInvalidateCallback
 android.graphics.drawable.DrawableContainer$DrawableContainerState
 android.graphics.drawable.DrawableInflater
 android.graphics.drawable.DrawableWrapper
@@ -943,11 +951,30 @@
 android.graphics.drawable.VectorDrawable
 android.graphics.drawable.VectorDrawable$VFullPath
 android.graphics.drawable.VectorDrawable$VFullPath$1
+android.graphics.drawable.VectorDrawable$VFullPath$10
+android.graphics.drawable.VectorDrawable$VFullPath$2
+android.graphics.drawable.VectorDrawable$VFullPath$3
+android.graphics.drawable.VectorDrawable$VFullPath$4
+android.graphics.drawable.VectorDrawable$VFullPath$5
+android.graphics.drawable.VectorDrawable$VFullPath$6
+android.graphics.drawable.VectorDrawable$VFullPath$7
+android.graphics.drawable.VectorDrawable$VFullPath$8
+android.graphics.drawable.VectorDrawable$VFullPath$9
 android.graphics.drawable.VectorDrawable$VGroup
 android.graphics.drawable.VectorDrawable$VGroup$1
+android.graphics.drawable.VectorDrawable$VGroup$2
+android.graphics.drawable.VectorDrawable$VGroup$3
+android.graphics.drawable.VectorDrawable$VGroup$4
+android.graphics.drawable.VectorDrawable$VGroup$5
+android.graphics.drawable.VectorDrawable$VGroup$6
+android.graphics.drawable.VectorDrawable$VGroup$7
+android.graphics.drawable.VectorDrawable$VGroup$8
+android.graphics.drawable.VectorDrawable$VGroup$9
 android.graphics.drawable.VectorDrawable$VObject
 android.graphics.drawable.VectorDrawable$VPath
+android.graphics.drawable.VectorDrawable$VPath$1
 android.graphics.drawable.VectorDrawable$VectorDrawableState
+android.graphics.drawable.VectorDrawable$VectorDrawableState$1
 android.graphics.drawable.shapes.OvalShape
 android.graphics.drawable.shapes.RectShape
 android.graphics.drawable.shapes.Shape
@@ -958,6 +985,8 @@
 android.hardware.Camera$CameraInfo
 android.hardware.Camera$Face
 android.hardware.ConsumerIrManager
+android.hardware.HardwareBuffer
+android.hardware.HardwareBuffer$1
 android.hardware.Sensor
 android.hardware.SensorEvent
 android.hardware.SensorEventListener
@@ -966,7 +995,6 @@
 android.hardware.SerialPort
 android.hardware.SystemSensorManager
 android.hardware.SystemSensorManager$BaseEventQueue
-android.hardware.SystemSensorManager$SensorEventQueue
 android.hardware.camera2.CameraCharacteristics$Key
 android.hardware.camera2.CameraManager
 android.hardware.camera2.CaptureRequest$Key
@@ -996,9 +1024,10 @@
 android.hardware.input.InputDeviceIdentifier$1
 android.hardware.input.InputManager
 android.hardware.input.InputManager$InputDevicesChangedListener
+android.hardware.location.ActivityRecognitionHardware
 android.hardware.location.ContextHubManager
-android.hardware.location.IContextHubService
-android.hardware.location.IContextHubService$Stub
+android.hardware.location.IActivityRecognitionHardware
+android.hardware.location.IActivityRecognitionHardware$Stub
 android.hardware.radio.RadioManager
 android.hardware.radio.RadioManager$AmBandConfig
 android.hardware.radio.RadioManager$AmBandConfig$1
@@ -1044,8 +1073,6 @@
 android.hardware.soundtrigger.SoundTrigger$SoundModelEvent
 android.hardware.soundtrigger.SoundTrigger$SoundModelEvent$1
 android.hardware.soundtrigger.SoundTriggerModule
-android.hardware.usb.IUsbManager
-android.hardware.usb.IUsbManager$Stub
 android.hardware.usb.UsbDevice
 android.hardware.usb.UsbDeviceConnection
 android.hardware.usb.UsbManager
@@ -1056,16 +1083,16 @@
 android.icu.impl.CacheValue$NullValue
 android.icu.impl.CacheValue$SoftValue
 android.icu.impl.CacheValue$Strength
-android.icu.impl.CalendarData
 android.icu.impl.CalendarUtil
+android.icu.impl.CalendarUtil$CalendarPreferences
 android.icu.impl.CharTrie
 android.icu.impl.ClassLoaderUtil
 android.icu.impl.CurrencyData
 android.icu.impl.CurrencyData$CurrencyDisplayInfo
 android.icu.impl.CurrencyData$CurrencyDisplayInfoProvider
 android.icu.impl.CurrencyData$CurrencySpacingInfo
-android.icu.impl.DateNumberFormat
-android.icu.impl.Grego
+android.icu.impl.CurrencyData$CurrencySpacingInfo$SpacingPattern
+android.icu.impl.CurrencyData$CurrencySpacingInfo$SpacingType
 android.icu.impl.ICUBinary
 android.icu.impl.ICUBinary$Authenticate
 android.icu.impl.ICUBinary$DatPackageReader
@@ -1076,6 +1103,7 @@
 android.icu.impl.ICUConfig
 android.icu.impl.ICUCurrencyDisplayInfoProvider
 android.icu.impl.ICUCurrencyDisplayInfoProvider$ICUCurrencyDisplayInfo
+android.icu.impl.ICUCurrencyDisplayInfoProvider$ICUCurrencyDisplayInfo$SpacingInfoSink
 android.icu.impl.ICUCurrencyMetaInfo
 android.icu.impl.ICUCurrencyMetaInfo$Collector
 android.icu.impl.ICUCurrencyMetaInfo$CurrencyCollector
@@ -1091,13 +1119,15 @@
 android.icu.impl.ICUResourceBundle
 android.icu.impl.ICUResourceBundle$1
 android.icu.impl.ICUResourceBundle$2
-android.icu.impl.ICUResourceBundle$2$1
+android.icu.impl.ICUResourceBundle$3
+android.icu.impl.ICUResourceBundle$3$1
+android.icu.impl.ICUResourceBundle$4
 android.icu.impl.ICUResourceBundle$AvailEntry
+android.icu.impl.ICUResourceBundle$Loader
 android.icu.impl.ICUResourceBundle$OpenType
 android.icu.impl.ICUResourceBundle$WholeBundle
 android.icu.impl.ICUResourceBundleImpl
 android.icu.impl.ICUResourceBundleImpl$ResourceArray
-android.icu.impl.ICUResourceBundleImpl$ResourceBinary
 android.icu.impl.ICUResourceBundleImpl$ResourceContainer
 android.icu.impl.ICUResourceBundleImpl$ResourceInt
 android.icu.impl.ICUResourceBundleImpl$ResourceIntVector
@@ -1111,6 +1141,7 @@
 android.icu.impl.ICUResourceBundleReader$IsAcceptable
 android.icu.impl.ICUResourceBundleReader$ReaderCache
 android.icu.impl.ICUResourceBundleReader$ReaderCacheKey
+android.icu.impl.ICUResourceBundleReader$ReaderValue
 android.icu.impl.ICUResourceBundleReader$ResourceCache
 android.icu.impl.ICUResourceBundleReader$ResourceCache$Level
 android.icu.impl.ICUResourceBundleReader$Table
@@ -1121,7 +1152,6 @@
 android.icu.impl.ICUService$Factory
 android.icu.impl.ICUService$Key
 android.icu.impl.IDNA2003
-android.icu.impl.JavaTimeZone
 android.icu.impl.LocaleIDParser
 android.icu.impl.LocaleIDs
 android.icu.impl.Norm2AllModes
@@ -1129,7 +1159,6 @@
 android.icu.impl.Norm2AllModes$ComposeNormalizer2
 android.icu.impl.Norm2AllModes$DecomposeNormalizer2
 android.icu.impl.Norm2AllModes$FCDNormalizer2
-android.icu.impl.Norm2AllModes$NFCSingleton
 android.icu.impl.Norm2AllModes$NFKCSingleton
 android.icu.impl.Norm2AllModes$NoopNormalizer2
 android.icu.impl.Norm2AllModes$Norm2AllModesSingleton
@@ -1137,14 +1166,13 @@
 android.icu.impl.Normalizer2Impl
 android.icu.impl.Normalizer2Impl$1
 android.icu.impl.Normalizer2Impl$IsAcceptable
-android.icu.impl.OlsonTimeZone
 android.icu.impl.Pair
 android.icu.impl.PatternProps
-android.icu.impl.PatternTokenizer
 android.icu.impl.PluralRulesLoader
 android.icu.impl.ReplaceableUCharacterIterator
 android.icu.impl.RuleCharacterIterator
 android.icu.impl.SimpleCache
+android.icu.impl.SimpleFormatterImpl
 android.icu.impl.SoftCache
 android.icu.impl.StandardPlural
 android.icu.impl.StringPrepDataReader
@@ -1159,7 +1187,6 @@
 android.icu.impl.Trie2$ValueMapper
 android.icu.impl.Trie2$ValueWidth
 android.icu.impl.Trie2_16
-android.icu.impl.Trie2_32
 android.icu.impl.UBiDiProps
 android.icu.impl.UBiDiProps$IsAcceptable
 android.icu.impl.UCharacterProperty
@@ -1194,24 +1221,13 @@
 android.icu.impl.UCharacterProperty$IsAcceptable
 android.icu.impl.UCharacterProperty$NormInertBinaryProperty
 android.icu.impl.UCharacterProperty$NormQuickCheckIntProperty
-android.icu.impl.UPropertyAliases
-android.icu.impl.UPropertyAliases$IsAcceptable
 android.icu.impl.URLHandler$URLVisitor
-android.icu.impl.USerializedSet
+android.icu.impl.UResource$Array
+android.icu.impl.UResource$Key
+android.icu.impl.UResource$Sink
+android.icu.impl.UResource$Table
+android.icu.impl.UResource$Value
 android.icu.impl.Utility
-android.icu.impl.ZoneMeta
-android.icu.impl.ZoneMeta$CustomTimeZoneCache
-android.icu.impl.ZoneMeta$SystemTimeZoneCache
-android.icu.impl.coll.CollationData
-android.icu.impl.coll.CollationDataReader
-android.icu.impl.coll.CollationDataReader$IsAcceptable
-android.icu.impl.coll.CollationFastLatin
-android.icu.impl.coll.CollationLoader
-android.icu.impl.coll.CollationRoot
-android.icu.impl.coll.CollationSettings
-android.icu.impl.coll.CollationTailoring
-android.icu.impl.coll.SharedObject
-android.icu.impl.coll.SharedObject$Reference
 android.icu.impl.locale.AsciiUtil
 android.icu.impl.locale.BaseLocale
 android.icu.impl.locale.BaseLocale$Cache
@@ -1222,8 +1238,6 @@
 android.icu.lang.UCharacter
 android.icu.lang.UCharacterEnums$ECharacterCategory
 android.icu.lang.UCharacterEnums$ECharacterDirection
-android.icu.lang.UScript
-android.icu.lang.UScript$ScriptUsage
 android.icu.math.BigDecimal
 android.icu.math.MathContext
 android.icu.text.BreakIterator
@@ -1232,51 +1246,26 @@
 android.icu.text.BreakIteratorFactory
 android.icu.text.BreakIteratorFactory$BFService
 android.icu.text.BreakIteratorFactory$BFService$1RBBreakIteratorFactory
-android.icu.text.Collator
-android.icu.text.Collator$ServiceShim
-android.icu.text.CollatorServiceShim
-android.icu.text.CollatorServiceShim$CService
-android.icu.text.CollatorServiceShim$CService$1CollatorFactory
 android.icu.text.CurrencyDisplayNames
 android.icu.text.CurrencyMetaInfo
 android.icu.text.CurrencyMetaInfo$CurrencyDigits
 android.icu.text.CurrencyMetaInfo$CurrencyFilter
-android.icu.text.DateFormat
-android.icu.text.DateFormat$BooleanAttribute
-android.icu.text.DateFormat$Field
 android.icu.text.DateFormatSymbols
+android.icu.text.DateFormatSymbols$1
+android.icu.text.DateFormatSymbols$CalendarDataSink
+android.icu.text.DateFormatSymbols$CalendarDataSink$AliasType
 android.icu.text.DateFormatSymbols$CapitalizationContextUsage
-android.icu.text.DateIntervalFormat
-android.icu.text.DateIntervalFormat$BestMatchInfo
-android.icu.text.DateIntervalInfo
-android.icu.text.DateIntervalInfo$PatternInfo
-android.icu.text.DateTimePatternGenerator
-android.icu.text.DateTimePatternGenerator$DTPGflags
-android.icu.text.DateTimePatternGenerator$DateTimeMatcher
-android.icu.text.DateTimePatternGenerator$DistanceInfo
-android.icu.text.DateTimePatternGenerator$FormatParser
-android.icu.text.DateTimePatternGenerator$PatternInfo
-android.icu.text.DateTimePatternGenerator$PatternWithMatcher
-android.icu.text.DateTimePatternGenerator$PatternWithSkeletonFlag
-android.icu.text.DateTimePatternGenerator$VariableField
 android.icu.text.DecimalFormat
 android.icu.text.DecimalFormat$Unit
 android.icu.text.DecimalFormatSymbols
 android.icu.text.DecimalFormatSymbols$1
 android.icu.text.DecimalFormatSymbols$CacheData
+android.icu.text.DecimalFormatSymbols$DecFmtDataSink
 android.icu.text.DigitList
 android.icu.text.DisplayContext
 android.icu.text.DisplayContext$Type
 android.icu.text.IDNA
 android.icu.text.LanguageBreakEngine
-android.icu.text.MessageFormat
-android.icu.text.MessageFormat$AppendableWrapper
-android.icu.text.MessageFormat$Field
-android.icu.text.MessagePattern
-android.icu.text.MessagePattern$ApostropheMode
-android.icu.text.MessagePattern$ArgType
-android.icu.text.MessagePattern$Part
-android.icu.text.MessagePattern$Part$Type
 android.icu.text.Normalizer
 android.icu.text.Normalizer$FCDMode
 android.icu.text.Normalizer$Mode
@@ -1292,6 +1281,9 @@
 android.icu.text.NumberFormat
 android.icu.text.NumberFormat$Field
 android.icu.text.NumberingSystem
+android.icu.text.NumberingSystem$1
+android.icu.text.NumberingSystem$2
+android.icu.text.NumberingSystem$LocaleLookupData
 android.icu.text.PluralRanges
 android.icu.text.PluralRanges$Matrix
 android.icu.text.PluralRules
@@ -1317,11 +1309,10 @@
 android.icu.text.Replaceable
 android.icu.text.ReplaceableString
 android.icu.text.RuleBasedBreakIterator
-android.icu.text.RuleBasedCollator
-android.icu.text.SimpleDateFormat
-android.icu.text.SimpleDateFormat$PatternItem
+android.icu.text.RuleBasedBreakIterator$LookAheadResults
 android.icu.text.StringPrep
 android.icu.text.StringPrepParseException
+android.icu.text.TimeZoneNames$NameType
 android.icu.text.UCharacterIterator
 android.icu.text.UFieldPosition
 android.icu.text.UFormat
@@ -1331,48 +1322,36 @@
 android.icu.text.UnicodeFilter
 android.icu.text.UnicodeMatcher
 android.icu.text.UnicodeSet
-android.icu.text.UnicodeSet$Filter
-android.icu.text.UnicodeSet$GeneralCategoryMaskFilter
-android.icu.text.UnicodeSet$IntPropertyFilter
-android.icu.util.BasicTimeZone
-android.icu.util.BytesTrie
 android.icu.util.BytesTrie$Result
-android.icu.util.Calendar
-android.icu.util.Calendar$CalType
-android.icu.util.Calendar$FormatConfiguration
-android.icu.util.Calendar$PatternData
-android.icu.util.Calendar$WeekData
-android.icu.util.Calendar$WeekDataCache
 android.icu.util.Currency
+android.icu.util.Currency$1
 android.icu.util.Currency$CurrencyUsage
 android.icu.util.Currency$EquivalenceRelation
 android.icu.util.Freezable
-android.icu.util.GregorianCalendar
 android.icu.util.MeasureUnit
 android.icu.util.MeasureUnit$1
 android.icu.util.MeasureUnit$2
 android.icu.util.MeasureUnit$3
 android.icu.util.MeasureUnit$Factory
-android.icu.util.Output
-android.icu.util.SimpleTimeZone
 android.icu.util.TimeUnit
 android.icu.util.TimeZone
 android.icu.util.TimeZone$ConstantZone
 android.icu.util.ULocale
+android.icu.util.ULocale$1
+android.icu.util.ULocale$2
 android.icu.util.ULocale$Category
 android.icu.util.ULocale$JDKLocaleHelper
 android.icu.util.ULocale$Type
 android.icu.util.UResourceBundle
-android.icu.util.UResourceBundle$ResourceCacheKey
+android.icu.util.UResourceBundle$RootType
 android.icu.util.UResourceBundleIterator
 android.icu.util.UResourceTypeMismatchException
 android.icu.util.VersionInfo
 android.location.CountryDetector
-android.location.ILocationManager
-android.location.ILocationManager$Stub
 android.location.Location
+android.location.Location$1
+android.location.Location$2
 android.location.LocationManager
-android.media.AmrInputStream
 android.media.AudioAttributes
 android.media.AudioAttributes$1
 android.media.AudioAttributes$Builder
@@ -1386,7 +1365,7 @@
 android.media.AudioManager
 android.media.AudioManager$1
 android.media.AudioManager$2
-android.media.AudioManager$OnAudioFocusChangeListener
+android.media.AudioManager$3
 android.media.AudioManager$ServiceEventHandlerDelegate
 android.media.AudioManager$ServiceEventHandlerDelegate$1
 android.media.AudioMixPort
@@ -1404,7 +1383,6 @@
 android.media.CameraProfile
 android.media.DecoderCapabilities
 android.media.EncoderCapabilities
-android.media.ExifInterface
 android.media.IAudioFocusDispatcher
 android.media.IAudioFocusDispatcher$Stub
 android.media.IAudioService
@@ -1412,6 +1390,10 @@
 android.media.IAudioService$Stub$Proxy
 android.media.IMediaHTTPConnection
 android.media.IMediaHTTPConnection$Stub
+android.media.IPlaybackConfigDispatcher
+android.media.IPlaybackConfigDispatcher$Stub
+android.media.IPlayer
+android.media.IPlayer$Stub
 android.media.IRecordingConfigDispatcher
 android.media.IRecordingConfigDispatcher$Stub
 android.media.Image
@@ -1422,6 +1404,8 @@
 android.media.JetPlayer
 android.media.MediaCodec
 android.media.MediaCodecInfo
+android.media.MediaCodecInfo$CodecCapabilities
+android.media.MediaCodecInfo$CodecProfileLevel
 android.media.MediaCodecList
 android.media.MediaCrypto
 android.media.MediaDrm
@@ -1432,21 +1416,17 @@
 android.media.MediaMuxer
 android.media.MediaPlayer
 android.media.MediaPlayer$OnCompletionListener
-android.media.MediaPlayer$OnErrorListener
-android.media.MediaPlayer$OnPreparedListener
-android.media.MediaPlayer$OnSeekCompleteListener
-android.media.MediaPlayer$OnVideoSizeChangedListener
 android.media.MediaRecorder
 android.media.MediaRouter
-android.media.MediaRouter$Callback
-android.media.MediaRouter$RouteCategory
-android.media.MediaRouter$RouteInfo
 android.media.MediaScanner
 android.media.MediaSync
 android.media.PlaybackParams
 android.media.PlaybackParams$1
 android.media.PlayerBase
 android.media.PlayerBase$1
+android.media.PlayerBase$2
+android.media.PlayerBase$PlayerIdCard
+android.media.PlayerBase$PlayerIdCard$1
 android.media.RemoteDisplay
 android.media.ResampleInputStream
 android.media.SubtitleController$Listener
@@ -1456,12 +1436,10 @@
 android.media.audiopolicy.AudioMixingRule$AudioMixMatchCriterion
 android.media.midi.MidiManager
 android.media.projection.MediaProjectionManager
-android.media.session.MediaController
-android.media.session.MediaController$TransportControls
-android.media.session.MediaSession$Token
 android.media.session.MediaSessionManager
 android.media.soundtrigger.SoundTriggerManager
 android.media.tv.TvInputManager
+android.metrics.LogMaker
 android.mtp.MtpDatabase
 android.mtp.MtpDevice
 android.mtp.MtpDeviceInfo
@@ -1476,6 +1454,8 @@
 android.net.ConnectivityManager$CallbackHandler
 android.net.ConnectivityManager$NetworkCallback
 android.net.ConnectivityThread
+# Must not be initialized, creates a thread.
+# android.net.ConnectivityThread$Singleton
 android.net.Credentials
 android.net.EthernetManager
 android.net.IConnectivityManager
@@ -1504,6 +1484,7 @@
 android.net.NetworkRequest
 android.net.NetworkRequest$1
 android.net.NetworkRequest$Builder
+android.net.NetworkRequest$Type
 android.net.NetworkScoreManager
 android.net.NetworkStats
 android.net.NetworkStats$1
@@ -1512,9 +1493,6 @@
 android.net.ProxyInfo
 android.net.RouteInfo
 android.net.RouteInfo$1
-android.net.SSLCertificateSocketFactory
-android.net.SSLCertificateSocketFactory$1
-android.net.SSLSessionCache
 android.net.TrafficStats
 android.net.Uri
 android.net.Uri$1
@@ -1539,29 +1517,13 @@
 android.net.wifi.WifiInfo
 android.net.wifi.WifiInfo$1
 android.net.wifi.WifiManager
-android.net.wifi.WifiManager$WifiLock
 android.net.wifi.WifiScanner
 android.net.wifi.WifiSsid
 android.net.wifi.WifiSsid$1
-android.net.wifi.nan.WifiNanManager
+android.net.wifi.aware.WifiAwareManager
 android.net.wifi.p2p.WifiP2pManager
-android.nfc.IAppCallback
-android.nfc.IAppCallback$Stub
 android.nfc.INfcAdapter
 android.nfc.INfcAdapter$Stub
-android.nfc.INfcAdapter$Stub$Proxy
-android.nfc.INfcCardEmulation
-android.nfc.INfcCardEmulation$Stub
-android.nfc.INfcCardEmulation$Stub$Proxy
-android.nfc.INfcFCardEmulation
-android.nfc.INfcFCardEmulation$Stub
-android.nfc.INfcFCardEmulation$Stub$Proxy
-android.nfc.INfcTag
-android.nfc.INfcTag$Stub
-android.nfc.INfcTag$Stub$Proxy
-android.nfc.NfcActivityManager
-android.nfc.NfcAdapter
-android.nfc.NfcAdapter$1
 android.nfc.NfcManager
 android.opengl.EGL14
 android.opengl.EGLConfig
@@ -1583,6 +1545,7 @@
 android.opengl.GLUtils
 android.opengl.Matrix
 android.opengl.Visibility
+android.os.-$Lambda$5$6x30vPJhBKUfNY8tswxuZo3DCe0
 android.os.AsyncTask$1
 android.os.AsyncTask$2
 android.os.AsyncTask$3
@@ -1614,17 +1577,24 @@
 android.os.DropBoxManager
 android.os.Environment
 android.os.Environment$UserEnvironment
+android.os.FactoryTest
 android.os.FileObserver$ObserverThread
 android.os.FileUtils
+android.os.GraphicsEnvironment
 android.os.Handler
 android.os.Handler$Callback
 android.os.Handler$MessengerImpl
 android.os.HandlerThread
 android.os.HardwarePropertiesManager
+android.os.HwBinder
+android.os.HwBlob
+android.os.HwParcel
+android.os.HwRemoteBinder
 android.os.IBinder
 android.os.IBinder$DeathRecipient
 android.os.ICancellationSignal
 android.os.ICancellationSignal$Stub
+android.os.IHwBinder
 android.os.IInterface
 android.os.IMessenger
 android.os.IMessenger$Stub
@@ -1641,7 +1611,7 @@
 android.os.IUserManager$Stub$Proxy
 android.os.IVibratorService
 android.os.IVibratorService$Stub
-android.os.IVibratorService$Stub$Proxy
+android.os.IncidentManager
 android.os.LocaleList
 android.os.LocaleList$1
 android.os.Looper
@@ -1658,7 +1628,6 @@
 android.os.ParcelFileDescriptor
 android.os.ParcelFileDescriptor$1
 android.os.ParcelFileDescriptor$AutoCloseInputStream
-android.os.ParcelFileDescriptor$AutoCloseOutputStream
 android.os.Parcelable
 android.os.Parcelable$ClassLoaderCreator
 android.os.Parcelable$Creator
@@ -1677,8 +1646,11 @@
 android.os.ResultReceiver
 android.os.SELinux
 android.os.ServiceManager
+android.os.ServiceManager$ServiceNotFoundException
 android.os.ServiceManagerNative
 android.os.ServiceManagerProxy
+android.os.ServiceSpecificException
+android.os.ShellCallback
 android.os.StatFs
 android.os.StrictMode
 android.os.StrictMode$1
@@ -1704,6 +1676,7 @@
 android.os.StrictMode$ThreadPolicy$Builder
 android.os.StrictMode$ThreadSpanState
 android.os.StrictMode$ViolationInfo
+android.os.StrictMode$ViolationInfo$1
 android.os.StrictMode$VmPolicy
 android.os.StrictMode$VmPolicy$Builder
 android.os.SystemClock
@@ -1716,6 +1689,7 @@
 android.os.UserHandle$1
 android.os.UserManager
 android.os.Vibrator
+android.os.ZygoteProcess
 android.os.ZygoteStartFailedEx
 android.os.health.SystemHealthManager
 android.os.storage.IStorageManager
@@ -1724,17 +1698,16 @@
 android.os.storage.StorageManager
 android.os.storage.StorageVolume
 android.os.storage.StorageVolume$1
-android.preference.Preference$OnPreferenceChangeListener
 android.preference.PreferenceActivity
 android.preference.PreferenceFragment$OnPreferenceStartFragmentCallback
 android.preference.PreferenceManager
 android.preference.PreferenceManager$OnPreferenceTreeClickListener
 android.print.PrintManager
+android.provider.-$Lambda$46$87WmhkvObehVg0OMBzwa_MTVV8g
 android.provider.BaseColumns
 android.provider.ContactsContract
 android.provider.ContactsContract$CommonDataKinds$BaseTypes
 android.provider.ContactsContract$CommonDataKinds$CommonColumns
-android.provider.ContactsContract$CommonDataKinds$Email
 android.provider.ContactsContract$CommonDataKinds$Phone
 android.provider.ContactsContract$ContactCounts
 android.provider.ContactsContract$ContactNameColumns
@@ -1748,13 +1721,12 @@
 android.provider.ContactsContract$DataUsageStatColumns
 android.provider.ContactsContract$RawContactsColumns
 android.provider.ContactsContract$StatusColumns
-android.provider.MediaStore$Images$ImageColumns
-android.provider.MediaStore$Images$Media
 android.provider.MediaStore$MediaColumns
+android.provider.Settings
+android.provider.Settings$ContentProviderHolder
 android.provider.Settings$GenerationTracker
 android.provider.Settings$Global
 android.provider.Settings$NameValueCache
-android.provider.Settings$NameValueCache$-java_lang_String_getStringForUser_android_content_ContentResolver_cr_java_lang_String_name_int_userHandle_LambdaImpl0
 android.provider.Settings$NameValueTable
 android.provider.Settings$Secure
 android.provider.Settings$SettingNotFoundException
@@ -1773,8 +1745,6 @@
 android.provider.Settings$System$InclusiveIntegerRangeValidator
 android.provider.Settings$System$Validator
 android.renderscript.RenderScriptCacheDir
-android.security.FrameworkNetworkSecurityPolicy
-android.security.NetworkSecurityPolicy
 android.security.keystore.AndroidKeyStoreBCWorkaroundProvider
 android.security.keystore.AndroidKeyStoreProvider
 android.security.net.config.ApplicationConfig
@@ -1797,9 +1767,7 @@
 android.security.net.config.RootTrustManager
 android.security.net.config.RootTrustManagerFactorySpi
 android.security.net.config.SystemCertificateSource
-android.security.net.config.TrustAnchor
 android.security.net.config.TrustedCertificateStoreAdapter
-android.security.net.config.UserCertificateSource
 android.service.persistentdata.PersistentDataBlockManager
 android.system.ErrnoException
 android.system.GaiException
@@ -1811,6 +1779,7 @@
 android.system.StructFlock
 android.system.StructGroupReq
 android.system.StructGroupSourceReq
+android.system.StructIfaddrs
 android.system.StructLinger
 android.system.StructPasswd
 android.system.StructPollfd
@@ -1824,11 +1793,11 @@
 android.telephony.CarrierConfigManager
 android.telephony.PhoneNumberUtils
 android.telephony.PhoneStateListener
-android.telephony.PhoneStateListener$1
-android.telephony.PhoneStateListener$IPhoneStateListenerStub
 android.telephony.Rlog
+android.telephony.ServiceState
 android.telephony.SubscriptionManager
 android.telephony.TelephonyManager
+android.telephony.TelephonyManager$MultiSimVariants
 android.text.AndroidBidi
 android.text.AndroidCharacter
 android.text.BoringLayout
@@ -1839,15 +1808,19 @@
 android.text.Editable
 android.text.Editable$Factory
 android.text.FontConfig
+android.text.FontConfig$1
 android.text.FontConfig$Alias
+android.text.FontConfig$Alias$1
 android.text.FontConfig$Axis
+android.text.FontConfig$Axis$1
 android.text.FontConfig$Family
+android.text.FontConfig$Family$1
 android.text.FontConfig$Font
+android.text.FontConfig$Font$1
+android.text.FontManager
 android.text.GetChars
 android.text.GraphicsOperations
 android.text.Html
-android.text.Html$HtmlParser
-android.text.HtmlToSpannedConverter
 android.text.Hyphenator
 android.text.InputFilter
 android.text.InputType
@@ -1889,15 +1862,11 @@
 android.text.TextUtils
 android.text.TextUtils$1
 android.text.TextUtils$EllipsizeCallback
-android.text.TextUtils$SimpleStringSplitter
-android.text.TextUtils$StringSplitter
 android.text.TextUtils$TruncateAt
 android.text.TextWatcher
 android.text.format.DateFormat
 android.text.format.DateUtils
-android.text.format.Formatter
 android.text.format.Time
-android.text.format.Time$TimeCalculator
 android.text.method.AllCapsTransformationMethod
 android.text.method.ArrowKeyMovementMethod
 android.text.method.BaseKeyListener
@@ -1919,10 +1888,8 @@
 android.text.style.AlignmentSpan
 android.text.style.CharacterStyle
 android.text.style.ClickableSpan
-android.text.style.DynamicDrawableSpan
 android.text.style.EasyEditSpan
 android.text.style.ForegroundColorSpan
-android.text.style.ImageSpan
 android.text.style.LeadingMarginSpan
 android.text.style.LineBackgroundSpan
 android.text.style.LineHeightSpan
@@ -1933,9 +1900,7 @@
 android.text.style.StyleSpan
 android.text.style.SuggestionSpan
 android.text.style.TabStopSpan
-android.text.style.TextAppearanceSpan
 android.text.style.URLSpan
-android.text.style.UnderlineSpan
 android.text.style.UpdateAppearance
 android.text.style.UpdateLayout
 android.text.style.WrapTogetherSpan
@@ -1956,7 +1921,6 @@
 android.transition.ChangeTransform$2
 android.transition.Fade
 android.transition.PathMotion
-android.transition.Scene
 android.transition.Transition
 android.transition.Transition$1
 android.transition.Transition$EpicenterCallback
@@ -1976,18 +1940,20 @@
 android.util.Base64$Coder
 android.util.Base64$Decoder
 android.util.Base64$Encoder
+android.util.BootTimingsTraceLog
 android.util.ContainerHelpers
 android.util.DisplayMetrics
 android.util.EventLog
 android.util.EventLog$Event
 android.util.FloatProperty
+android.util.IntArray
 android.util.IntProperty
-android.util.JsonReader
 android.util.Log
 android.util.Log$1
 android.util.Log$ImmediateLogWriter
 android.util.Log$TerribleFailureHandler
 android.util.LogPrinter
+android.util.LongArray
 android.util.LongSparseArray
 android.util.LongSparseLongArray
 android.util.LruCache
@@ -2002,6 +1968,7 @@
 android.util.Pair
 android.util.PathParser
 android.util.PathParser$PathData
+android.util.Patterns
 android.util.Pools$Pool
 android.util.Pools$SimplePool
 android.util.Pools$SynchronizedPool
@@ -2011,24 +1978,24 @@
 android.util.Rational
 android.util.Singleton
 android.util.Size
+android.util.SizeF
 android.util.Slog
 android.util.SparseArray
 android.util.SparseBooleanArray
 android.util.SparseIntArray
-android.util.SparseLongArray
 android.util.StateSet
 android.util.SuperNotCalledException
-android.util.TimeFormatException
 android.util.TypedValue
 android.util.Xml
 android.util.jar.StrictJarFile
+android.view.-$Lambda$48$iU_USrtPm1XIm5H9QYQvXfBGDE4
+android.view.-$Lambda$49$iU_USrtPm1XIm5H9QYQvXfBGDE4
 android.view.AbsSavedState
 android.view.AbsSavedState$1
 android.view.AbsSavedState$2
 android.view.ActionMode
 android.view.ActionMode$Callback
 android.view.ActionProvider
-android.view.ActionProvider$SubUiVisibilityListener
 android.view.Choreographer
 android.view.Choreographer$1
 android.view.Choreographer$2
@@ -2041,8 +2008,6 @@
 android.view.ContextMenu$ContextMenuInfo
 android.view.ContextThemeWrapper
 android.view.Display
-android.view.Display$ColorTransform
-android.view.Display$ColorTransform$1
 android.view.Display$HdrCapabilities
 android.view.Display$HdrCapabilities$1
 android.view.Display$Mode
@@ -2052,6 +2017,7 @@
 android.view.DisplayInfo
 android.view.DisplayInfo$1
 android.view.DisplayListCanvas
+android.view.DragEvent
 android.view.FallbackEventHandler
 android.view.FocusFinder
 android.view.FocusFinder$1
@@ -2066,8 +2032,6 @@
 android.view.GestureDetector$OnDoubleTapListener
 android.view.GestureDetector$OnGestureListener
 android.view.GestureDetector$SimpleOnGestureListener
-android.view.GraphicBuffer
-android.view.GraphicBuffer$1
 android.view.Gravity
 android.view.HandlerActionQueue
 android.view.HandlerActionQueue$HandlerAction
@@ -2092,7 +2056,6 @@
 android.view.InputChannel$1
 android.view.InputDevice
 android.view.InputDevice$1
-android.view.InputDevice$MotionRange
 android.view.InputEvent
 android.view.InputEvent$1
 android.view.InputEventConsistencyVerifier
@@ -2125,9 +2088,12 @@
 android.view.MotionEvent$PointerProperties
 android.view.PointerIcon
 android.view.PointerIcon$1
+android.view.RecordingCanvas
 android.view.RenderNode
+android.view.RenderNode$NoImagePreloadHolder
 android.view.RenderNodeAnimator
 android.view.RenderNodeAnimator$1
+android.view.RenderNodeAnimatorSetHelper
 android.view.SearchEvent
 android.view.SoundEffectConstants
 android.view.SubMenu
@@ -2143,9 +2109,8 @@
 android.view.SurfaceSession
 android.view.SurfaceView
 android.view.TextureView
-android.view.TextureView$SurfaceTextureListener
 android.view.ThreadedRenderer
-android.view.ThreadedRenderer$HardwareDrawCallbacks
+android.view.ThreadedRenderer$DrawCallbacks
 android.view.ThreadedRenderer$ProcessInitializer
 android.view.VelocityTracker
 android.view.VelocityTracker$Estimator
@@ -2182,6 +2147,7 @@
 android.view.View$OnTouchListener
 android.view.View$PerformClick
 android.view.View$ScrollabilityCache
+android.view.View$TooltipInfo
 android.view.View$TransformationInfo
 android.view.View$UnsetPressedState
 android.view.ViewConfiguration
@@ -2193,11 +2159,13 @@
 android.view.ViewGroup$MarginLayoutParams
 android.view.ViewGroup$OnHierarchyChangeListener
 android.view.ViewGroup$TouchTarget
+android.view.ViewGroupOverlay
 android.view.ViewManager
 android.view.ViewOutlineProvider
 android.view.ViewOutlineProvider$1
 android.view.ViewOutlineProvider$2
 android.view.ViewOutlineProvider$3
+android.view.ViewOverlay
 android.view.ViewParent
 android.view.ViewPropertyAnimator
 android.view.ViewPropertyAnimator$1
@@ -2245,6 +2213,7 @@
 android.view.Window
 android.view.Window$Callback
 android.view.Window$OnWindowDismissedCallback
+android.view.Window$OnWindowSwipeDismissedCallback
 android.view.Window$WindowControllerCallback
 android.view.WindowAnimationFrameStats
 android.view.WindowAnimationFrameStats$1
@@ -2254,7 +2223,6 @@
 android.view.WindowInsets
 android.view.WindowLeaked
 android.view.WindowManager
-android.view.WindowManager$BadTokenException
 android.view.WindowManager$LayoutParams
 android.view.WindowManager$LayoutParams$1
 android.view.WindowManagerGlobal
@@ -2272,9 +2240,6 @@
 android.view.accessibility.AccessibilityNodeProvider
 android.view.accessibility.AccessibilityRecord
 android.view.accessibility.CaptioningManager
-android.view.accessibility.CaptioningManager$1
-android.view.accessibility.CaptioningManager$CaptioningChangeListener
-android.view.accessibility.CaptioningManager$MyContentObserver
 android.view.accessibility.IAccessibilityManager
 android.view.accessibility.IAccessibilityManager$Stub
 android.view.accessibility.IAccessibilityManager$Stub$Proxy
@@ -2291,24 +2256,23 @@
 android.view.animation.Animation$NoImagePreloadHolder
 android.view.animation.AnimationSet
 android.view.animation.AnimationUtils
+android.view.animation.AnimationUtils$1
+android.view.animation.AnimationUtils$AnimationState
 android.view.animation.BaseInterpolator
 android.view.animation.DecelerateInterpolator
 android.view.animation.Interpolator
 android.view.animation.LinearInterpolator
-android.view.animation.OvershootInterpolator
 android.view.animation.PathInterpolator
 android.view.animation.ScaleAnimation
 android.view.animation.Transformation
 android.view.animation.TranslateAnimation
+android.view.autofill.AutoFillManager
 android.view.inputmethod.BaseInputConnection
 android.view.inputmethod.ComposingText
 android.view.inputmethod.CursorAnchorInfo$Builder
 android.view.inputmethod.EditorInfo
 android.view.inputmethod.EditorInfo$1
-android.view.inputmethod.ExtractedText
-android.view.inputmethod.ExtractedText$1
 android.view.inputmethod.InputConnection
-android.view.inputmethod.InputConnectionInspector
 android.view.inputmethod.InputMethodManager
 android.view.inputmethod.InputMethodManager$1
 android.view.inputmethod.InputMethodManager$ControlledInputConnectionWrapper
@@ -2316,6 +2280,7 @@
 android.view.inputmethod.InputMethodManager$H
 android.view.inputmethod.InputMethodManager$ImeInputEventSender
 android.view.inputmethod.InputMethodManager$PendingEvent
+android.view.textclassifier.TextClassificationManager
 android.view.textservice.SpellCheckerSubtype
 android.view.textservice.SpellCheckerSubtype$1
 android.view.textservice.TextServicesManager
@@ -2323,7 +2288,6 @@
 android.webkit.IWebViewUpdateService$Stub
 android.webkit.IWebViewUpdateService$Stub$Proxy
 android.webkit.MimeTypeMap
-android.webkit.WebSettings
 android.webkit.WebView
 android.webkit.WebViewFactory
 android.webkit.WebViewFactory$MissingWebViewPackageException
@@ -2339,14 +2303,6 @@
 android.widget.AbsSeekBar
 android.widget.AbsSpinner
 android.widget.AbsoluteLayout
-android.widget.ActionMenuPresenter
-android.widget.ActionMenuPresenter$1
-android.widget.ActionMenuPresenter$2
-android.widget.ActionMenuPresenter$OverflowMenuButton
-android.widget.ActionMenuPresenter$OverflowMenuButton$1
-android.widget.ActionMenuPresenter$PopupPresenterCallback
-android.widget.ActionMenuView
-android.widget.ActionMenuView$ActionMenuChildView
 android.widget.ActionMenuView$OnMenuItemClickListener
 android.widget.Adapter
 android.widget.AdapterView
@@ -2367,24 +2323,16 @@
 android.widget.Editor
 android.widget.Editor$1
 android.widget.Editor$2
-android.widget.Editor$Blink
 android.widget.Editor$CursorAnchorInfoNotifier
-android.widget.Editor$CursorController
-android.widget.Editor$EditOperation
-android.widget.Editor$EditOperation$1
 android.widget.Editor$InputContentType
-android.widget.Editor$InputMethodState
-android.widget.Editor$InsertionPointCursorController
 android.widget.Editor$PositionListener
 android.widget.Editor$ProcessTextIntentActionsHandler
-android.widget.Editor$SelectionModifierCursorController
 android.widget.Editor$SpanController
 android.widget.Editor$SuggestionHelper
 android.widget.Editor$SuggestionHelper$SuggestionSpanComparator
 android.widget.Editor$TextRenderNode
 android.widget.Editor$TextViewPositionListener
 android.widget.Editor$UndoInputFilter
-android.widget.Filter
 android.widget.Filter$FilterListener
 android.widget.Filterable
 android.widget.ForwardingListener
@@ -2392,8 +2340,6 @@
 android.widget.FrameLayout$LayoutParams
 android.widget.HeaderViewListAdapter
 android.widget.HorizontalScrollView
-android.widget.HorizontalScrollView$SavedState
-android.widget.HorizontalScrollView$SavedState$1
 android.widget.ImageButton
 android.widget.ImageView
 android.widget.ImageView$ScaleType
@@ -2402,12 +2348,12 @@
 android.widget.ListAdapter
 android.widget.ListPopupWindow
 android.widget.ListPopupWindow$ListSelectorHider
+android.widget.ListPopupWindow$PopupDataSetObserver
 android.widget.ListPopupWindow$PopupScrollListener
 android.widget.ListPopupWindow$PopupTouchInterceptor
 android.widget.ListPopupWindow$ResizePopupRunnable
 android.widget.ListView
 android.widget.ListView$ArrowScrollFocusResult
-android.widget.ListView$FixedViewInfo
 android.widget.MultiAutoCompleteTextView
 android.widget.OverScroller
 android.widget.OverScroller$SplineOverScroller
@@ -2415,8 +2361,6 @@
 android.widget.PopupWindow$1
 android.widget.PopupWindow$2
 android.widget.PopupWindow$OnDismissListener
-android.widget.PopupWindow$PopupDecorView
-android.widget.PopupWindow$PopupDecorView$1
 android.widget.ProgressBar
 android.widget.ProgressBar$1
 android.widget.ProgressBar$SavedState
@@ -2428,30 +2372,17 @@
 android.widget.RelativeLayout$DependencyGraph$Node
 android.widget.RelativeLayout$LayoutParams
 android.widget.RemoteViews
-android.widget.RemoteViews$1
-android.widget.RemoteViews$2
-android.widget.RemoteViews$3
-android.widget.RemoteViews$Action
-android.widget.RemoteViews$ActionException
-android.widget.RemoteViews$BitmapCache
-android.widget.RemoteViews$MemoryUsageCounter
-android.widget.RemoteViews$MutablePair
-android.widget.RemoteViews$OnClickHandler
-android.widget.RemoteViews$ReflectionAction
-android.widget.RemoteViews$RuntimeAction
-android.widget.RemoteViews$SetOnClickPendingIntent
+android.widget.RemoteViews$RemoteView
 android.widget.RemoteViewsAdapter$RemoteAdapterConnectionCallback
 android.widget.RtlSpacingHelper
 android.widget.ScrollBarDrawable
 android.widget.ScrollView
 android.widget.Scroller
 android.widget.Scroller$ViscousFluidInterpolator
-android.widget.SectionIndexer
 android.widget.SeekBar
 android.widget.Space
 android.widget.Spinner
 android.widget.SpinnerAdapter
-android.widget.Switch
 android.widget.TextView
 android.widget.TextView$BufferType
 android.widget.TextView$ChangeWatcher
@@ -2465,7 +2396,6 @@
 android.widget.Toolbar
 android.widget.Toolbar$1
 android.widget.Toolbar$2
-android.widget.Toolbar$ExpandedActionViewMenuPresenter
 android.widget.Toolbar$LayoutParams
 android.widget.WrapperListAdapter
 com.android.dex.ClassData
@@ -2497,9 +2427,6 @@
 com.android.i18n.phonenumbers.NumberParseException
 com.android.i18n.phonenumbers.PhoneNumberUtil
 com.android.internal.R$styleable
-com.android.internal.app.AlertController
-com.android.internal.app.AlertController$1
-com.android.internal.app.AlertController$ButtonHandler
 com.android.internal.app.IAppOpsCallback
 com.android.internal.app.IAppOpsCallback$Stub
 com.android.internal.app.IAppOpsService
@@ -2507,42 +2434,47 @@
 com.android.internal.app.IAppOpsService$Stub$Proxy
 com.android.internal.app.IBatteryStats
 com.android.internal.app.IBatteryStats$Stub
+com.android.internal.app.IBatteryStats$Stub$Proxy
 com.android.internal.app.IVoiceInteractor
 com.android.internal.app.IVoiceInteractor$Stub
-com.android.internal.appwidget.IAppWidgetService
-com.android.internal.appwidget.IAppWidgetService$Stub
-com.android.internal.appwidget.IAppWidgetService$Stub$Proxy
 com.android.internal.content.NativeLibraryHelper
 com.android.internal.content.ReferrerIntent
 com.android.internal.content.ReferrerIntent$1
+com.android.internal.graphics.drawable.AnimationScaleListDrawable
+com.android.internal.graphics.drawable.AnimationScaleListDrawable$AnimationScaleListState
 com.android.internal.inputmethod.InputMethodUtils
 com.android.internal.inputmethod.InputMethodUtils$1
 com.android.internal.inputmethod.LocaleUtils$LocaleExtractor
 com.android.internal.logging.AndroidConfig
 com.android.internal.logging.AndroidHandler
 com.android.internal.logging.AndroidHandler$1
+com.android.internal.logging.EventLogTags
+com.android.internal.logging.MetricsLogger
 com.android.internal.net.NetworkStatsFactory
 com.android.internal.os.AndroidPrintStream
 com.android.internal.os.BinderInternal
 com.android.internal.os.BinderInternal$GcWatcher
-com.android.internal.os.InstallerConnection$InstallerException
+com.android.internal.os.FuseAppLoop
+com.android.internal.os.FuseAppLoop$1
+com.android.internal.os.FuseAppLoop$UnmountedException
 com.android.internal.os.LoggingPrintStream
 com.android.internal.os.LoggingPrintStream$1
 com.android.internal.os.PathClassLoaderFactory
+com.android.internal.os.RoSystemProperties
 com.android.internal.os.RuntimeInit
 com.android.internal.os.RuntimeInit$1
 com.android.internal.os.RuntimeInit$Arguments
 com.android.internal.os.RuntimeInit$KillApplicationHandler
 com.android.internal.os.RuntimeInit$LoggingHandler
-com.android.internal.os.RoSystemProperties
 com.android.internal.os.SamplingProfilerIntegration
 com.android.internal.os.SomeArgs
 com.android.internal.os.Zygote
+com.android.internal.os.Zygote$MethodAndArgsCaller
 com.android.internal.os.ZygoteConnection
 com.android.internal.os.ZygoteConnection$Arguments
 com.android.internal.os.ZygoteInit
-com.android.internal.os.ZygoteInit$MethodAndArgsCaller
 com.android.internal.os.ZygoteSecurityException
+com.android.internal.os.ZygoteServer
 com.android.internal.policy.DecorContext
 com.android.internal.policy.DecorView
 com.android.internal.policy.DecorView$ColorViewState
@@ -2554,8 +2486,6 @@
 com.android.internal.policy.PhoneWindow$PhoneWindowMenuCallback
 com.android.internal.policy.PhoneWindow$RotationWatcher
 com.android.internal.policy.PhoneWindow$RotationWatcher$1
-com.android.internal.telephony.IPhoneStateListener
-com.android.internal.telephony.IPhoneStateListener$Stub
 com.android.internal.telephony.ISub
 com.android.internal.telephony.ISub$Stub
 com.android.internal.telephony.ISub$Stub$Proxy
@@ -2569,6 +2499,8 @@
 com.android.internal.textservice.ITextServicesManager
 com.android.internal.textservice.ITextServicesManager$Stub
 com.android.internal.textservice.ITextServicesManager$Stub$Proxy
+com.android.internal.transition.EpicenterTranslateClipReveal
+com.android.internal.transition.TransitionConstants
 com.android.internal.util.ArrayUtils
 com.android.internal.util.FastPrintWriter
 com.android.internal.util.FastPrintWriter$DummyWriter
@@ -2579,15 +2511,10 @@
 com.android.internal.util.VirtualRefBasePtr
 com.android.internal.util.XmlUtils
 com.android.internal.util.XmlUtils$WriteMapCallback
-com.android.internal.view.ActionBarPolicy
 com.android.internal.view.IInputConnectionWrapper
 com.android.internal.view.IInputConnectionWrapper$MyHandler
-com.android.internal.view.IInputConnectionWrapper$SomeArgs
 com.android.internal.view.IInputContext
 com.android.internal.view.IInputContext$Stub
-com.android.internal.view.IInputContextCallback
-com.android.internal.view.IInputContextCallback$Stub
-com.android.internal.view.IInputContextCallback$Stub$Proxy
 com.android.internal.view.IInputMethodClient
 com.android.internal.view.IInputMethodClient$Stub
 com.android.internal.view.IInputMethodManager
@@ -2603,23 +2530,13 @@
 com.android.internal.view.animation.HasNativeInterpolator
 com.android.internal.view.animation.NativeInterpolatorFactory
 com.android.internal.view.animation.NativeInterpolatorFactoryHelper
-com.android.internal.view.menu.ActionMenuItem
-com.android.internal.view.menu.BaseMenuPresenter
 com.android.internal.view.menu.MenuBuilder
 com.android.internal.view.menu.MenuBuilder$Callback
-com.android.internal.view.menu.MenuBuilder$ItemInvoker
 com.android.internal.view.menu.MenuItemImpl
-com.android.internal.view.menu.MenuPresenter
 com.android.internal.view.menu.MenuPresenter$Callback
-com.android.internal.view.menu.MenuView
 com.android.internal.view.menu.ShowableListMenu
 com.android.internal.widget.BackgroundFallback
 com.android.internal.widget.DecorContentParent
-com.android.internal.widget.DecorToolbar
-com.android.internal.widget.EditableInputConnection
-com.android.internal.widget.ScrollBarUtils
-com.android.internal.widget.ToolbarWidgetWrapper
-com.android.internal.widget.ToolbarWidgetWrapper$1
 com.android.okhttp.Address
 com.android.okhttp.Authenticator
 com.android.okhttp.CacheControl
@@ -2635,6 +2552,8 @@
 com.android.okhttp.ConnectionSpec
 com.android.okhttp.ConnectionSpec$Builder
 com.android.okhttp.Dispatcher
+com.android.okhttp.Dns
+com.android.okhttp.Dns$1
 com.android.okhttp.Handshake
 com.android.okhttp.Headers
 com.android.okhttp.Headers$Builder
@@ -2659,8 +2578,6 @@
 com.android.okhttp.TlsVersion
 com.android.okhttp.internal.ConnectionSpecSelector
 com.android.okhttp.internal.Internal
-com.android.okhttp.internal.Network
-com.android.okhttp.internal.Network$1
 com.android.okhttp.internal.OptionalMethod
 com.android.okhttp.internal.Platform
 com.android.okhttp.internal.RouteDatabase
@@ -2670,14 +2587,14 @@
 com.android.okhttp.internal.http.AuthenticatorAdapter
 com.android.okhttp.internal.http.CacheStrategy
 com.android.okhttp.internal.http.CacheStrategy$Factory
-com.android.okhttp.internal.http.HttpConnection
-com.android.okhttp.internal.http.HttpConnection$AbstractSource
-com.android.okhttp.internal.http.HttpConnection$ChunkedSource
-com.android.okhttp.internal.http.HttpConnection$FixedLengthSource
+com.android.okhttp.internal.http.Http1xStream
+com.android.okhttp.internal.http.Http1xStream$AbstractSource
+com.android.okhttp.internal.http.Http1xStream$ChunkedSource
+com.android.okhttp.internal.http.Http1xStream$FixedLengthSource
 com.android.okhttp.internal.http.HttpEngine
 com.android.okhttp.internal.http.HttpEngine$1
 com.android.okhttp.internal.http.HttpMethod
-com.android.okhttp.internal.http.HttpTransport
+com.android.okhttp.internal.http.HttpStream
 com.android.okhttp.internal.http.OkHeaders
 com.android.okhttp.internal.http.OkHeaders$1
 com.android.okhttp.internal.http.RealResponseBody
@@ -2687,10 +2604,11 @@
 com.android.okhttp.internal.http.RouteException
 com.android.okhttp.internal.http.RouteSelector
 com.android.okhttp.internal.http.StatusLine
-com.android.okhttp.internal.http.Transport
+com.android.okhttp.internal.http.StreamAllocation
 com.android.okhttp.internal.huc.DelegatingHttpsURLConnection
 com.android.okhttp.internal.huc.HttpURLConnectionImpl
 com.android.okhttp.internal.huc.HttpsURLConnectionImpl
+com.android.okhttp.internal.io.RealConnection
 com.android.okhttp.internal.tls.OkHostnameVerifier
 com.android.okhttp.okio.AsyncTimeout
 com.android.okhttp.okio.AsyncTimeout$1
@@ -2771,8 +2689,12 @@
 com.android.org.bouncycastle.jcajce.provider.symmetric.DES$Mappings
 com.android.org.bouncycastle.jcajce.provider.symmetric.DESede
 com.android.org.bouncycastle.jcajce.provider.symmetric.DESede$Mappings
+com.android.org.bouncycastle.jcajce.provider.symmetric.PBEPBKDF2
+com.android.org.bouncycastle.jcajce.provider.symmetric.PBEPBKDF2$Mappings
 com.android.org.bouncycastle.jcajce.provider.symmetric.PBEPKCS12
 com.android.org.bouncycastle.jcajce.provider.symmetric.PBEPKCS12$Mappings
+com.android.org.bouncycastle.jcajce.provider.symmetric.PBES2AlgorithmParameters
+com.android.org.bouncycastle.jcajce.provider.symmetric.PBES2AlgorithmParameters$Mappings
 com.android.org.bouncycastle.jcajce.provider.symmetric.RC2
 com.android.org.bouncycastle.jcajce.provider.symmetric.RC2$Mappings
 com.android.org.bouncycastle.jcajce.provider.symmetric.SymmetricAlgorithmProvider
@@ -2792,18 +2714,20 @@
 com.android.org.bouncycastle.util.Encodable
 com.android.org.bouncycastle.util.Strings
 com.android.org.bouncycastle.util.Strings$1
+com.android.org.conscrypt.AbstractOpenSSLSession
 com.android.org.conscrypt.AbstractSessionContext
 com.android.org.conscrypt.AbstractSessionContext$1
 com.android.org.conscrypt.AddressUtils
 com.android.org.conscrypt.ByteArray
-com.android.org.conscrypt.CertPinManager
+com.android.org.conscrypt.CertBlacklist
 com.android.org.conscrypt.CertificatePriorityComparator
 com.android.org.conscrypt.ChainStrengthAnalyzer
 com.android.org.conscrypt.ClientSessionContext
 com.android.org.conscrypt.ClientSessionContext$HostAndPort
 com.android.org.conscrypt.CryptoUpcalls
-com.android.org.conscrypt.FileClientSessionCache
-com.android.org.conscrypt.FileClientSessionCache$Impl
+com.android.org.conscrypt.EvpMdRef$MD5
+com.android.org.conscrypt.EvpMdRef$SHA1
+com.android.org.conscrypt.EvpMdRef$SHA256
 com.android.org.conscrypt.Hex
 com.android.org.conscrypt.JSSEProvider
 com.android.org.conscrypt.KeyManagerFactoryImpl
@@ -2817,10 +2741,7 @@
 com.android.org.conscrypt.NativeRef$EVP_MD_CTX
 com.android.org.conscrypt.NativeRef$EVP_PKEY
 com.android.org.conscrypt.OpenSSLBIOInputStream
-com.android.org.conscrypt.OpenSSLContextImpl
-com.android.org.conscrypt.OpenSSLContextImpl$TLSv12
 com.android.org.conscrypt.OpenSSLECGroupContext
-com.android.org.conscrypt.OpenSSLECKeyFactory
 com.android.org.conscrypt.OpenSSLECPointContext
 com.android.org.conscrypt.OpenSSLECPublicKey
 com.android.org.conscrypt.OpenSSLExtendedSessionImpl
@@ -2829,6 +2750,7 @@
 com.android.org.conscrypt.OpenSSLMessageDigestJDK
 com.android.org.conscrypt.OpenSSLMessageDigestJDK$MD5
 com.android.org.conscrypt.OpenSSLMessageDigestJDK$SHA1
+com.android.org.conscrypt.OpenSSLMessageDigestJDK$SHA256
 com.android.org.conscrypt.OpenSSLProvider
 com.android.org.conscrypt.OpenSSLRSAKeyFactory
 com.android.org.conscrypt.OpenSSLRSAPublicKey
@@ -2847,11 +2769,7 @@
 com.android.org.conscrypt.OpenSSLX509CertificateFactory$2
 com.android.org.conscrypt.OpenSSLX509CertificateFactory$Parser
 com.android.org.conscrypt.OpenSSLX509CertificateFactory$ParsingException
-com.android.org.conscrypt.PinEntryException
-com.android.org.conscrypt.PinListEntry
-com.android.org.conscrypt.PinManagerException
 com.android.org.conscrypt.Platform
-com.android.org.conscrypt.SSLClientSessionCache
 com.android.org.conscrypt.SSLParametersImpl
 com.android.org.conscrypt.SSLParametersImpl$AliasChooser
 com.android.org.conscrypt.SSLParametersImpl$PSKCallbacks
@@ -2863,6 +2781,17 @@
 com.android.org.conscrypt.TrustedCertificateIndex
 com.android.org.conscrypt.TrustedCertificateKeyStoreSpi
 com.android.org.conscrypt.TrustedCertificateStore
+com.android.org.conscrypt.TrustedCertificateStore$1
+com.android.org.conscrypt.TrustedCertificateStore$CertSelector
+com.android.org.conscrypt.ct.CTLogInfo
+com.android.org.conscrypt.ct.CTLogStore
+com.android.org.conscrypt.ct.CTLogStoreImpl
+com.android.org.conscrypt.ct.CTLogStoreImpl$InvalidLogFileException
+com.android.org.conscrypt.ct.CTPolicy
+com.android.org.conscrypt.ct.CTPolicyImpl
+com.android.org.conscrypt.ct.CTVerifier
+com.android.org.conscrypt.ct.KnownLogs
+com.android.org.conscrypt.ct.SerializationException
 com.android.org.conscrypt.util.ArrayUtils
 com.android.server.NetworkManagementSocketTagger
 com.android.server.NetworkManagementSocketTagger$1
@@ -2871,20 +2800,31 @@
 com.google.android.collect.Maps
 com.google.android.gles_jni.EGLImpl
 com.google.android.gles_jni.GLImpl
+dalvik.annotation.optimization.CriticalNative
+dalvik.annotation.optimization.FastNative
 dalvik.system.BaseDexClassLoader
+dalvik.system.BaseDexClassLoader$Reporter
 dalvik.system.BlockGuard
 dalvik.system.BlockGuard$1
 dalvik.system.BlockGuard$2
 dalvik.system.BlockGuard$BlockGuardPolicyException
 dalvik.system.BlockGuard$Policy
+dalvik.system.ClassExt
 dalvik.system.CloseGuard
 dalvik.system.CloseGuard$DefaultReporter
+dalvik.system.CloseGuard$DefaultTracker
 dalvik.system.CloseGuard$Reporter
+dalvik.system.CloseGuard$Tracker
 dalvik.system.DalvikLogHandler
+dalvik.system.DexClassLoader
 dalvik.system.DexFile
 dalvik.system.DexFile$DFEnum
 dalvik.system.DexPathList
 dalvik.system.DexPathList$Element
+dalvik.system.DexPathList$NativeLibraryElement
+dalvik.system.EmulatedStackFrame
+dalvik.system.EmulatedStackFrame$Range
+dalvik.system.InMemoryDexClassLoader$DexData
 dalvik.system.PathClassLoader
 dalvik.system.SocketTagger
 dalvik.system.SocketTagger$1
@@ -2892,11 +2832,6 @@
 dalvik.system.VMRuntime
 dalvik.system.VMStack
 dalvik.system.ZygoteHooks
-java.beans.ChangeListenerMap
-java.beans.PropertyChangeEvent
-java.beans.PropertyChangeListener
-java.beans.PropertyChangeSupport
-java.beans.PropertyChangeSupport$PropertyChangeListenerMap
 java.io.Bits
 java.io.BufferedInputStream
 java.io.BufferedOutputStream
@@ -2911,6 +2846,7 @@
 java.io.DataInputStream
 java.io.DataOutput
 java.io.DataOutputStream
+java.io.DefaultFileSystem
 java.io.EOFException
 java.io.ExpiringCache
 java.io.ExpiringCache$1
@@ -2919,6 +2855,7 @@
 java.io.File
 java.io.File$PathStatus
 java.io.FileDescriptor
+java.io.FileDescriptor$1
 java.io.FileFilter
 java.io.FileInputStream
 java.io.FileInputStream$UseManualSkipException
@@ -2930,18 +2867,33 @@
 java.io.FilenameFilter
 java.io.FilterInputStream
 java.io.FilterOutputStream
-java.io.FilterReader
 java.io.Flushable
 java.io.IOException
 java.io.InputStream
 java.io.InputStreamReader
 java.io.InterruptedIOException
+java.io.InvalidClassException
 java.io.InvalidObjectException
 java.io.ObjectInput
 java.io.ObjectInputStream
+java.io.ObjectInputStream$BlockDataInputStream
+java.io.ObjectInputStream$HandleTable
+java.io.ObjectInputStream$HandleTable$HandleList
+java.io.ObjectInputStream$PeekInputStream
+java.io.ObjectInputStream$ValidationList
 java.io.ObjectOutput
 java.io.ObjectOutputStream
+java.io.ObjectOutputStream$BlockDataOutputStream
+java.io.ObjectOutputStream$HandleTable
+java.io.ObjectOutputStream$PutField
+java.io.ObjectOutputStream$ReplaceTable
 java.io.ObjectStreamClass
+java.io.ObjectStreamClass$2
+java.io.ObjectStreamClass$Caches
+java.io.ObjectStreamClass$EntryFuture
+java.io.ObjectStreamClass$FieldReflector
+java.io.ObjectStreamClass$FieldReflectorKey
+java.io.ObjectStreamClass$WeakClassKey
 java.io.ObjectStreamConstants
 java.io.ObjectStreamException
 java.io.ObjectStreamField
@@ -2950,7 +2902,6 @@
 java.io.PrintStream
 java.io.PrintWriter
 java.io.PushbackInputStream
-java.io.PushbackReader
 java.io.RandomAccessFile
 java.io.Reader
 java.io.SequenceInputStream
@@ -2962,10 +2913,13 @@
 java.io.UnixFileSystem
 java.io.UnsupportedEncodingException
 java.io.Writer
+java.lang.-$Lambda$250$S9HjrJh0nDg7IyU6wZdPArnZWRQ
+java.lang.-$Lambda$251$S9HjrJh0nDg7IyU6wZdPArnZWRQ
 java.lang.AbstractMethodError
 java.lang.AbstractStringBuilder
 java.lang.AndroidHardcodedSystemProperties
 java.lang.Appendable
+java.lang.ArithmeticException
 java.lang.ArrayIndexOutOfBoundsException
 java.lang.ArrayStoreException
 java.lang.AssertionError
@@ -2977,8 +2931,6 @@
 java.lang.CaseMapper
 java.lang.CaseMapper$1
 java.lang.CharSequence
-java.lang.CharSequence$-java_util_stream_IntStream_chars__LambdaImpl0
-java.lang.CharSequence$-java_util_stream_IntStream_codePoints__LambdaImpl0
 java.lang.CharSequence$1CharIterator
 java.lang.CharSequence$1CodePointIterator
 java.lang.Character
@@ -3008,9 +2960,7 @@
 java.lang.Error
 java.lang.Exception
 java.lang.Float
-java.lang.FloatingDecimal
-java.lang.FloatingDecimal$1
-java.lang.FloatingDecimal$2
+java.lang.IllegalAccessError
 java.lang.IllegalAccessException
 java.lang.IllegalArgumentException
 java.lang.IllegalStateException
@@ -3029,7 +2979,7 @@
 java.lang.Long
 java.lang.Long$LongCache
 java.lang.Math
-java.lang.Math$NoImagePreloadHolder
+java.lang.Math$RandomNumberGeneratorHolder
 java.lang.NoClassDefFoundError
 java.lang.NoSuchFieldError
 java.lang.NoSuchFieldException
@@ -3042,6 +2992,7 @@
 java.lang.OutOfMemoryError
 java.lang.Package
 java.lang.Process
+java.lang.ProcessBuilder
 java.lang.ProcessEnvironment
 java.lang.Readable
 java.lang.ReflectiveOperationException
@@ -3053,7 +3004,6 @@
 java.lang.SecurityManager
 java.lang.Short
 java.lang.Short$ShortCache
-java.lang.Shutdown
 java.lang.StackOverflowError
 java.lang.StackTraceElement
 java.lang.StrictMath
@@ -3061,7 +3011,6 @@
 java.lang.String$CaseInsensitiveComparator
 java.lang.StringBuffer
 java.lang.StringBuilder
-java.lang.StringCoding
 java.lang.StringFactory
 java.lang.StringIndexOutOfBoundsException
 java.lang.System
@@ -3095,6 +3044,22 @@
 java.lang.annotation.Inherited
 java.lang.annotation.Retention
 java.lang.annotation.Target
+java.lang.invoke.MethodHandle
+java.lang.invoke.MethodHandleImpl
+java.lang.invoke.MethodHandleImpl$HandleInfo
+java.lang.invoke.MethodHandleInfo
+java.lang.invoke.MethodHandleStatics
+java.lang.invoke.MethodHandles
+java.lang.invoke.MethodType
+java.lang.invoke.MethodType$ConcurrentWeakInternSet
+java.lang.invoke.MethodType$ConcurrentWeakInternSet$WeakEntry
+java.lang.invoke.MethodTypeForm
+java.lang.invoke.Transformers$BindTo
+java.lang.invoke.Transformers$Collector
+java.lang.invoke.Transformers$Spreader
+java.lang.invoke.Transformers$Transformer
+java.lang.invoke.Transformers$VarargsCollector
+java.lang.invoke.WrongMethodTypeException
 java.lang.ref.FinalizerReference
 java.lang.ref.FinalizerReference$Sentinel
 java.lang.ref.PhantomReference
@@ -3102,47 +3067,54 @@
 java.lang.ref.ReferenceQueue
 java.lang.ref.SoftReference
 java.lang.ref.WeakReference
-java.lang.reflect.AbstractMethod
-java.lang.reflect.AbstractMethod$GenericInfo
 java.lang.reflect.AccessibleObject
 java.lang.reflect.AnnotatedElement
 java.lang.reflect.Array
 java.lang.reflect.Constructor
+java.lang.reflect.Executable
+java.lang.reflect.Executable$GenericInfo
 java.lang.reflect.Field
-java.lang.reflect.GenericArrayType
 java.lang.reflect.GenericDeclaration
 java.lang.reflect.InvocationHandler
 java.lang.reflect.InvocationTargetException
+java.lang.reflect.MalformedParametersException
 java.lang.reflect.Member
 java.lang.reflect.Method
 java.lang.reflect.Method$1
 java.lang.reflect.Modifier
+java.lang.reflect.Parameter
 java.lang.reflect.ParameterizedType
 java.lang.reflect.Proxy
 java.lang.reflect.Proxy$1
+java.lang.reflect.Proxy$Key1
+java.lang.reflect.Proxy$Key2
+java.lang.reflect.Proxy$KeyFactory
+java.lang.reflect.Proxy$KeyX
+java.lang.reflect.Proxy$ProxyClassFactory
 java.lang.reflect.Type
 java.lang.reflect.TypeVariable
-java.lang.reflect.WildcardType
+java.lang.reflect.WeakCache
+java.lang.reflect.WeakCache$CacheKey
+java.lang.reflect.WeakCache$CacheValue
+java.lang.reflect.WeakCache$Factory
+java.lang.reflect.WeakCache$LookupValue
+java.lang.reflect.WeakCache$Value
 java.math.BigDecimal
 java.math.BigInt
 java.math.BigInteger
-java.math.BitLevel
 java.math.NativeBN
 java.math.RoundingMode
-java.net.AbstractPlainDatagramSocketImpl
 java.net.AbstractPlainSocketImpl
 java.net.AddressCache
 java.net.AddressCache$AddressCacheEntry
 java.net.AddressCache$AddressCacheKey
 java.net.ConnectException
 java.net.CookieHandler
-java.net.DatagramPacket
-java.net.DatagramSocketImpl
-java.net.DefaultInterface
 java.net.HttpURLConnection
 java.net.IDN
 java.net.Inet4Address
 java.net.Inet6Address
+java.net.Inet6Address$Inet6AddressHolder
 java.net.Inet6AddressImpl
 java.net.InetAddress
 java.net.InetAddress$1
@@ -3150,12 +3122,10 @@
 java.net.InetAddressImpl
 java.net.InetSocketAddress
 java.net.InetSocketAddress$InetSocketAddressHolder
-java.net.InterfaceAddress
 java.net.JarURLConnection
 java.net.MalformedURLException
 java.net.NetworkInterface
 java.net.Parts
-java.net.PlainDatagramSocketImpl
 java.net.PlainSocketImpl
 java.net.ProtocolException
 java.net.Proxy
@@ -3164,6 +3134,8 @@
 java.net.ResponseCache
 java.net.ServerSocket
 java.net.Socket
+java.net.Socket$2
+java.net.Socket$3
 java.net.SocketAddress
 java.net.SocketException
 java.net.SocketImpl
@@ -3173,7 +3145,6 @@
 java.net.SocketTimeoutException
 java.net.SocksConsts
 java.net.SocksSocketImpl
-java.net.SocksSocketImpl$3
 java.net.URI
 java.net.URI$Parser
 java.net.URISyntaxException
@@ -3222,6 +3193,7 @@
 java.nio.channels.FileLock
 java.nio.channels.GatheringByteChannel
 java.nio.channels.InterruptibleChannel
+java.nio.channels.MulticastChannel
 java.nio.channels.NetworkChannel
 java.nio.channels.ReadableByteChannel
 java.nio.channels.ScatteringByteChannel
@@ -3248,6 +3220,7 @@
 java.nio.charset.IllegalCharsetNameException
 java.nio.charset.StandardCharsets
 java.nio.charset.UnsupportedCharsetException
+java.nio.file.attribute.FileAttribute
 java.security.AccessControlContext
 java.security.AccessControlException
 java.security.AccessController
@@ -3338,7 +3311,6 @@
 java.security.interfaces.RSAPublicKey
 java.security.spec.AlgorithmParameterSpec
 java.security.spec.ECField
-java.security.spec.ECFieldF2m
 java.security.spec.ECFieldFp
 java.security.spec.ECParameterSpec
 java.security.spec.ECPoint
@@ -3346,15 +3318,12 @@
 java.security.spec.EllipticCurve
 java.security.spec.EncodedKeySpec
 java.security.spec.InvalidKeySpecException
-java.security.spec.InvalidParameterSpecException
 java.security.spec.KeySpec
 java.security.spec.RSAPublicKeySpec
 java.security.spec.X509EncodedKeySpec
-java.sql.Timestamp
 java.text.AttributedCharacterIterator$Attribute
 java.text.CalendarBuilder
 java.text.CharacterIterator
-java.text.Collator
 java.text.DateFormat
 java.text.DateFormat$Field
 java.text.DateFormatSymbols
@@ -3371,13 +3340,19 @@
 java.text.NumberFormat
 java.text.ParseException
 java.text.ParsePosition
-java.text.RuleBasedCollator
 java.text.SimpleDateFormat
 java.text.StringCharacterIterator
-java.text.spi.DateFormatProvider
-java.text.spi.DateFormatSymbolsProvider
-java.text.spi.DecimalFormatSymbolsProvider
-java.text.spi.NumberFormatProvider
+java.time.DateTimeException
+java.util.-$Lambda$181$4EqhxufgNKat19m0CB0-toH_lzo
+java.util.-$Lambda$182$4EqhxufgNKat19m0CB0-toH_lzo
+java.util.-$Lambda$183$4EqhxufgNKat19m0CB0-toH_lzo
+java.util.-$Lambda$184$4EqhxufgNKat19m0CB0-toH_lzo
+java.util.-$Lambda$267$4EqhxufgNKat19m0CB0-toH_lzo
+java.util.-$Lambda$268$4EqhxufgNKat19m0CB0-toH_lzo
+java.util.-$Lambda$291$aUGKT4ItCOku5-JSG-x8Aqj2pJw
+java.util.-$Lambda$292$aUGKT4ItCOku5-JSG-x8Aqj2pJw
+java.util.-$Lambda$293$aUGKT4ItCOku5-JSG-x8Aqj2pJw
+java.util.-$Lambda$294$aUGKT4ItCOku5-JSG-x8Aqj2pJw
 java.util.AbstractCollection
 java.util.AbstractList
 java.util.AbstractList$Itr
@@ -3397,8 +3372,21 @@
 java.util.ArrayList$ListItr
 java.util.ArrayList$SubList
 java.util.ArrayList$SubList$1
+java.util.ArrayPrefixHelpers$CumulateTask
+java.util.ArrayPrefixHelpers$DoubleCumulateTask
+java.util.ArrayPrefixHelpers$IntCumulateTask
+java.util.ArrayPrefixHelpers$LongCumulateTask
 java.util.Arrays
 java.util.Arrays$ArrayList
+java.util.Arrays$NaturalOrder
+java.util.ArraysParallelSortHelpers$FJByte$Sorter
+java.util.ArraysParallelSortHelpers$FJChar$Sorter
+java.util.ArraysParallelSortHelpers$FJDouble$Sorter
+java.util.ArraysParallelSortHelpers$FJFloat$Sorter
+java.util.ArraysParallelSortHelpers$FJInt$Sorter
+java.util.ArraysParallelSortHelpers$FJLong$Sorter
+java.util.ArraysParallelSortHelpers$FJObject$Sorter
+java.util.ArraysParallelSortHelpers$FJShort$Sorter
 java.util.BitSet
 java.util.Calendar
 java.util.Collection
@@ -3410,6 +3398,9 @@
 java.util.Collections$CheckedCollection
 java.util.Collections$CheckedList
 java.util.Collections$CheckedMap
+java.util.Collections$CheckedNavigableMap
+java.util.Collections$CheckedNavigableSet
+java.util.Collections$CheckedQueue
 java.util.Collections$CheckedRandomAccessList
 java.util.Collections$CheckedSet
 java.util.Collections$CheckedSortedMap
@@ -3430,6 +3421,8 @@
 java.util.Collections$SynchronizedCollection
 java.util.Collections$SynchronizedList
 java.util.Collections$SynchronizedMap
+java.util.Collections$SynchronizedNavigableMap
+java.util.Collections$SynchronizedNavigableSet
 java.util.Collections$SynchronizedRandomAccessList
 java.util.Collections$SynchronizedSet
 java.util.Collections$SynchronizedSortedMap
@@ -3442,18 +3435,16 @@
 java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet
 java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1
 java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$UnmodifiableEntry
+java.util.Collections$UnmodifiableNavigableMap
+java.util.Collections$UnmodifiableNavigableMap$EmptyNavigableMap
+java.util.Collections$UnmodifiableNavigableSet
+java.util.Collections$UnmodifiableNavigableSet$EmptyNavigableSet
 java.util.Collections$UnmodifiableRandomAccessList
 java.util.Collections$UnmodifiableSet
 java.util.Collections$UnmodifiableSortedMap
 java.util.Collections$UnmodifiableSortedSet
 java.util.ComparableTimSort
 java.util.Comparator
-java.util.Comparator$-java_util_Comparator_comparingDouble_java_util_function_ToDoubleFunction_keyExtractor_LambdaImpl0
-java.util.Comparator$-java_util_Comparator_comparingInt_java_util_function_ToIntFunction_keyExtractor_LambdaImpl0
-java.util.Comparator$-java_util_Comparator_comparingLong_java_util_function_ToLongFunction_keyExtractor_LambdaImpl0
-java.util.Comparator$-java_util_Comparator_comparing_java_util_function_Function_keyExtractor_LambdaImpl0
-java.util.Comparator$-java_util_Comparator_comparing_java_util_function_Function_keyExtractor_java_util_Comparator_keyComparator_LambdaImpl0
-java.util.Comparator$-java_util_Comparator_thenComparing_java_util_Comparator_other_LambdaImpl0
 java.util.Comparators$NaturalOrderComparator
 java.util.Comparators$NullComparator
 java.util.ConcurrentModificationException
@@ -3467,7 +3458,6 @@
 java.util.EnumSet
 java.util.Enumeration
 java.util.EventListener
-java.util.EventObject
 java.util.Formattable
 java.util.Formatter
 java.util.Formatter$Conversion
@@ -3481,14 +3471,14 @@
 java.util.HashMap$EntryIterator
 java.util.HashMap$EntrySet
 java.util.HashMap$HashIterator
-java.util.HashMap$HashMapEntry
 java.util.HashMap$KeyIterator
 java.util.HashMap$KeySet
+java.util.HashMap$Node
+java.util.HashMap$TreeNode
 java.util.HashMap$ValueIterator
 java.util.HashMap$Values
 java.util.HashSet
 java.util.Hashtable
-java.util.Hashtable$EntrySet
 java.util.Hashtable$Enumerator
 java.util.Hashtable$HashtableEntry
 java.util.IdentityHashMap
@@ -3498,11 +3488,14 @@
 java.util.IllformedLocaleException
 java.util.Iterator
 java.util.LinkedHashMap
-java.util.LinkedHashMap$EntryIterator
-java.util.LinkedHashMap$KeyIterator
+java.util.LinkedHashMap$LinkedEntryIterator
+java.util.LinkedHashMap$LinkedEntrySet
 java.util.LinkedHashMap$LinkedHashIterator
 java.util.LinkedHashMap$LinkedHashMapEntry
-java.util.LinkedHashMap$ValueIterator
+java.util.LinkedHashMap$LinkedKeyIterator
+java.util.LinkedHashMap$LinkedKeySet
+java.util.LinkedHashMap$LinkedValueIterator
+java.util.LinkedHashMap$LinkedValues
 java.util.LinkedHashSet
 java.util.LinkedList
 java.util.LinkedList$ListItr
@@ -3513,6 +3506,8 @@
 java.util.Locale$Builder
 java.util.Locale$Cache
 java.util.Locale$Category
+java.util.Locale$FilteringMode
+java.util.Locale$LanguageRange
 java.util.Locale$LocaleKey
 java.util.Map
 java.util.Map$Entry
@@ -3524,30 +3519,16 @@
 java.util.PrimitiveIterator
 java.util.PrimitiveIterator$OfInt
 java.util.PriorityQueue
-java.util.PriorityQueue$Itr
 java.util.Properties
 java.util.Properties$LineReader
-java.util.PropertyResourceBundle
 java.util.Queue
 java.util.Random
 java.util.RandomAccess
 java.util.RandomAccessSubList
 java.util.RegularEnumSet
-java.util.RegularEnumSet$EnumSetIterator
 java.util.ResourceBundle
 java.util.ResourceBundle$1
-java.util.ResourceBundle$BundleReference
-java.util.ResourceBundle$CacheKey
-java.util.ResourceBundle$CacheKeyReference
-java.util.ResourceBundle$Control
-java.util.ResourceBundle$Control$1
-java.util.ResourceBundle$Control$CandidateListCache
-java.util.ResourceBundle$LoaderReference
-java.util.ResourceBundle$RBClassLoader
-java.util.ResourceBundle$RBClassLoader$1
-java.util.ServiceLoader
-java.util.ServiceLoader$1
-java.util.ServiceLoader$LazyIterator
+java.util.Scanner
 java.util.Set
 java.util.SimpleTimeZone
 java.util.SortedMap
@@ -3564,12 +3545,11 @@
 java.util.Spliterators$EmptySpliterator$OfLong
 java.util.Spliterators$EmptySpliterator$OfRef
 java.util.Stack
+java.util.StringJoiner
 java.util.StringTokenizer
 java.util.SubList
 java.util.TimSort
 java.util.TimeZone
-java.util.Timer
-java.util.TimerTask
 java.util.TreeMap
 java.util.TreeMap$EntryIterator
 java.util.TreeMap$EntrySet
@@ -3591,31 +3571,69 @@
 java.util.WeakHashMap$KeyIterator
 java.util.WeakHashMap$KeySet
 java.util.WeakHashMap$Values
+java.util.concurrent.-$Lambda$269$xR9BLpu6SifNikvFgr4lEiECBsk
 java.util.concurrent.AbstractExecutorService
 java.util.concurrent.BlockingQueue
 java.util.concurrent.Callable
 java.util.concurrent.CancellationException
 java.util.concurrent.ConcurrentHashMap
 java.util.concurrent.ConcurrentHashMap$BaseIterator
+java.util.concurrent.ConcurrentHashMap$BulkTask
 java.util.concurrent.ConcurrentHashMap$CollectionView
+java.util.concurrent.ConcurrentHashMap$CounterCell
 java.util.concurrent.ConcurrentHashMap$EntryIterator
 java.util.concurrent.ConcurrentHashMap$EntrySetView
+java.util.concurrent.ConcurrentHashMap$ForEachEntryTask
+java.util.concurrent.ConcurrentHashMap$ForEachKeyTask
+java.util.concurrent.ConcurrentHashMap$ForEachMappingTask
+java.util.concurrent.ConcurrentHashMap$ForEachTransformedEntryTask
+java.util.concurrent.ConcurrentHashMap$ForEachTransformedKeyTask
+java.util.concurrent.ConcurrentHashMap$ForEachTransformedMappingTask
+java.util.concurrent.ConcurrentHashMap$ForEachTransformedValueTask
+java.util.concurrent.ConcurrentHashMap$ForEachValueTask
 java.util.concurrent.ConcurrentHashMap$ForwardingNode
 java.util.concurrent.ConcurrentHashMap$KeyIterator
 java.util.concurrent.ConcurrentHashMap$KeySetView
+java.util.concurrent.ConcurrentHashMap$MapReduceEntriesTask
+java.util.concurrent.ConcurrentHashMap$MapReduceEntriesToDoubleTask
+java.util.concurrent.ConcurrentHashMap$MapReduceEntriesToIntTask
+java.util.concurrent.ConcurrentHashMap$MapReduceEntriesToLongTask
+java.util.concurrent.ConcurrentHashMap$MapReduceKeysTask
+java.util.concurrent.ConcurrentHashMap$MapReduceKeysToDoubleTask
+java.util.concurrent.ConcurrentHashMap$MapReduceKeysToIntTask
+java.util.concurrent.ConcurrentHashMap$MapReduceKeysToLongTask
+java.util.concurrent.ConcurrentHashMap$MapReduceMappingsTask
+java.util.concurrent.ConcurrentHashMap$MapReduceMappingsToDoubleTask
+java.util.concurrent.ConcurrentHashMap$MapReduceMappingsToIntTask
+java.util.concurrent.ConcurrentHashMap$MapReduceMappingsToLongTask
+java.util.concurrent.ConcurrentHashMap$MapReduceValuesTask
+java.util.concurrent.ConcurrentHashMap$MapReduceValuesToDoubleTask
+java.util.concurrent.ConcurrentHashMap$MapReduceValuesToIntTask
+java.util.concurrent.ConcurrentHashMap$MapReduceValuesToLongTask
 java.util.concurrent.ConcurrentHashMap$Node
+java.util.concurrent.ConcurrentHashMap$ReduceEntriesTask
+java.util.concurrent.ConcurrentHashMap$ReduceKeysTask
+java.util.concurrent.ConcurrentHashMap$ReduceValuesTask
+java.util.concurrent.ConcurrentHashMap$ReservationNode
+java.util.concurrent.ConcurrentHashMap$SearchEntriesTask
+java.util.concurrent.ConcurrentHashMap$SearchKeysTask
+java.util.concurrent.ConcurrentHashMap$SearchMappingsTask
+java.util.concurrent.ConcurrentHashMap$SearchValuesTask
 java.util.concurrent.ConcurrentHashMap$Segment
 java.util.concurrent.ConcurrentHashMap$Traverser
 java.util.concurrent.ConcurrentHashMap$TreeBin
 java.util.concurrent.ConcurrentHashMap$TreeNode
+java.util.concurrent.ConcurrentHashMap$ValueIterator
+java.util.concurrent.ConcurrentHashMap$ValuesView
 java.util.concurrent.ConcurrentLinkedQueue
 java.util.concurrent.ConcurrentLinkedQueue$Node
 java.util.concurrent.ConcurrentMap
 java.util.concurrent.CopyOnWriteArrayList
-java.util.concurrent.CopyOnWriteArrayList$CowIterator
+java.util.concurrent.CopyOnWriteArrayList$COWIterator
 java.util.concurrent.CopyOnWriteArraySet
 java.util.concurrent.CountDownLatch
 java.util.concurrent.CountDownLatch$Sync
+java.util.concurrent.CountedCompleter
 java.util.concurrent.Delayed
 java.util.concurrent.ExecutionException
 java.util.concurrent.Executor
@@ -3626,6 +3644,9 @@
 java.util.concurrent.Executors$DelegatedScheduledExecutorService
 java.util.concurrent.Executors$FinalizableDelegatedExecutorService
 java.util.concurrent.Executors$RunnableAdapter
+java.util.concurrent.ForkJoinPool
+java.util.concurrent.ForkJoinTask
+java.util.concurrent.ForkJoinTask$ExceptionNode
 java.util.concurrent.Future
 java.util.concurrent.FutureTask
 java.util.concurrent.FutureTask$WaitNode
@@ -3649,6 +3670,7 @@
 java.util.concurrent.SynchronousQueue$TransferStack$SNode
 java.util.concurrent.SynchronousQueue$Transferer
 java.util.concurrent.ThreadFactory
+java.util.concurrent.ThreadLocalRandom
 java.util.concurrent.ThreadPoolExecutor
 java.util.concurrent.ThreadPoolExecutor$AbortPolicy
 java.util.concurrent.ThreadPoolExecutor$Worker
@@ -3684,19 +3706,33 @@
 java.util.concurrent.locks.ReentrantReadWriteLock$Sync
 java.util.concurrent.locks.ReentrantReadWriteLock$Sync$ThreadLocalHoldCounter
 java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock
+java.util.function.-$Lambda$276$1MZdIZ-DL_fjy9l0o8IMJk57T2g
 java.util.function.BiConsumer
 java.util.function.BiFunction
+java.util.function.BinaryOperator
 java.util.function.Consumer
+java.util.function.DoubleBinaryOperator
 java.util.function.Function
+java.util.function.IntBinaryOperator
+java.util.function.IntConsumer
+java.util.function.IntFunction
+java.util.function.IntToDoubleFunction
+java.util.function.IntToLongFunction
+java.util.function.IntUnaryOperator
+java.util.function.LongBinaryOperator
+java.util.function.LongUnaryOperator
 java.util.function.Predicate
 java.util.function.Supplier
+java.util.function.ToDoubleBiFunction
 java.util.function.ToDoubleFunction
+java.util.function.ToIntBiFunction
 java.util.function.ToIntFunction
+java.util.function.ToLongBiFunction
 java.util.function.ToLongFunction
 java.util.function.UnaryOperator
 java.util.jar.JarEntry
 java.util.jar.JarFile
-java.util.jar.JarFile$1
+java.util.jar.JarFile$JarEntryIterator
 java.util.jar.JarFile$JarFileEntry
 java.util.logging.ErrorManager
 java.util.logging.Formatter
@@ -3706,7 +3742,8 @@
 java.util.logging.LogManager
 java.util.logging.LogManager$1
 java.util.logging.LogManager$2
-java.util.logging.LogManager$4
+java.util.logging.LogManager$3
+java.util.logging.LogManager$5
 java.util.logging.LogManager$Cleaner
 java.util.logging.LogManager$LogNode
 java.util.logging.LogManager$LoggerContext
@@ -3714,8 +3751,8 @@
 java.util.logging.LogManager$LoggerWeakRef
 java.util.logging.LogManager$RootLogger
 java.util.logging.LogManager$SystemLoggerContext
-java.util.logging.LogRecord
 java.util.logging.Logger
+java.util.logging.Logger$LoggerBundle
 java.util.logging.LoggingPermission
 java.util.logging.LoggingProxyImpl
 java.util.prefs.AbstractPreferences
@@ -3725,9 +3762,10 @@
 java.util.regex.Matcher
 java.util.regex.Pattern
 java.util.regex.PatternSyntaxException
-java.util.spi.LocaleServiceProvider
 java.util.stream.BaseStream
+java.util.stream.DoubleStream
 java.util.stream.IntStream
+java.util.stream.LongStream
 java.util.stream.Stream
 java.util.stream.StreamSupport
 java.util.zip.Adler32
@@ -3746,24 +3784,15 @@
 java.util.zip.ZipConstants
 java.util.zip.ZipEntry
 java.util.zip.ZipFile
-java.util.zip.ZipFile$1
+java.util.zip.ZipFile$ZipEntryIterator
 java.util.zip.ZipFile$ZipFileInflaterInputStream
 java.util.zip.ZipFile$ZipFileInputStream
+java.util.zip.ZipUtils
 javax.crypto.BadPaddingException
 javax.crypto.Cipher
-javax.crypto.Cipher$CipherSpiAndProvider
-javax.crypto.Cipher$InitParams
-javax.crypto.Cipher$InitType
-javax.crypto.Cipher$NeedToSet
-javax.crypto.Cipher$SpiAndProviderUpdater
-javax.crypto.Cipher$Transform
-javax.crypto.CipherSpi
 javax.crypto.IllegalBlockSizeException
-javax.crypto.JceSecurity
 javax.crypto.NoSuchPaddingException
-javax.crypto.NullCipher
 javax.crypto.SecretKey
-javax.crypto.ShortBufferException
 javax.crypto.spec.IvParameterSpec
 javax.crypto.spec.SecretKeySpec
 javax.microedition.khronos.egl.EGL
@@ -3799,7 +3828,6 @@
 javax.net.ssl.SSLSessionContext
 javax.net.ssl.SSLSocket
 javax.net.ssl.SSLSocketFactory
-javax.net.ssl.SSLSocketFactory$1
 javax.net.ssl.TrustManager
 javax.net.ssl.TrustManagerFactory
 javax.net.ssl.TrustManagerFactory$1
@@ -3808,13 +3836,12 @@
 javax.net.ssl.X509ExtendedTrustManager
 javax.net.ssl.X509KeyManager
 javax.net.ssl.X509TrustManager
+javax.security.auth.Destroyable
 javax.security.auth.callback.UnsupportedCallbackException
 javax.security.auth.x500.X500Principal
 javax.security.cert.Certificate
 javax.security.cert.CertificateException
 javax.security.cert.X509Certificate
-libcore.icu.DateIntervalFormat
-libcore.icu.DateUtilsBridge
 libcore.icu.ICU
 libcore.icu.LocaleData
 libcore.icu.NativeConverter
@@ -3834,8 +3861,9 @@
 libcore.io.EventLogger$Reporter
 libcore.io.ForwardingOs
 libcore.io.IoBridge
+libcore.io.IoTracker
+libcore.io.IoTracker$Mode
 libcore.io.IoUtils
-libcore.io.IoUtils$FileReader
 libcore.io.Libcore
 libcore.io.Memory
 libcore.io.MemoryMappedFile
@@ -3854,8 +3882,6 @@
 libcore.reflect.GenericSignatureParser
 libcore.reflect.InternalNames
 libcore.reflect.ListOfTypes
-libcore.reflect.ListOfVariables
-libcore.reflect.ParameterizedTypeImpl
 libcore.reflect.Types
 libcore.util.BasicLruCache
 libcore.util.CharsetUtils
@@ -3865,8 +3891,6 @@
 libcore.util.NativeAllocationRegistry$CleanerRunner
 libcore.util.NativeAllocationRegistry$CleanerThunk
 libcore.util.ZoneInfo
-libcore.util.ZoneInfo$CheckedArithmeticException
-libcore.util.ZoneInfo$WallTime
 libcore.util.ZoneInfoDB
 libcore.util.ZoneInfoDB$TzData
 libcore.util.ZoneInfoDB$TzData$1
@@ -3879,54 +3903,22 @@
 org.apache.harmony.xml.ExpatAttributes
 org.apache.harmony.xml.ExpatParser
 org.apache.http.Header
-org.apache.http.HeaderIterator
 org.apache.http.HttpEntity
 org.apache.http.HttpEntityEnclosingRequest
-org.apache.http.HttpHost
 org.apache.http.HttpMessage
 org.apache.http.HttpRequest
 org.apache.http.HttpResponse
-org.apache.http.HttpVersion
-org.apache.http.NameValuePair
 org.apache.http.ProtocolVersion
 org.apache.http.StatusLine
 org.apache.http.client.HttpClient
-org.apache.http.client.ResponseHandler
-org.apache.http.client.methods.AbortableHttpRequest
-org.apache.http.client.methods.HttpEntityEnclosingRequestBase
-org.apache.http.client.methods.HttpPost
-org.apache.http.client.methods.HttpRequestBase
 org.apache.http.client.methods.HttpUriRequest
-org.apache.http.client.utils.URLEncodedUtils
-org.apache.http.conn.ClientConnectionManager
 org.apache.http.conn.ConnectTimeoutException
 org.apache.http.entity.AbstractHttpEntity
-org.apache.http.entity.BasicHttpEntity
-org.apache.http.impl.cookie.DateParseException
-org.apache.http.impl.cookie.DateUtils
 org.apache.http.message.AbstractHttpMessage
 org.apache.http.message.BasicHeader
 org.apache.http.message.BasicHttpResponse
 org.apache.http.message.BasicStatusLine
 org.apache.http.message.HeaderGroup
-org.apache.http.params.AbstractHttpParams
-org.apache.http.params.BasicHttpParams
-org.apache.http.params.CoreConnectionPNames
-org.apache.http.params.HttpConnectionParams
-org.apache.http.params.HttpParams
-org.apache.http.protocol.HttpContext
-org.ccil.cowan.tagsoup.AttributesImpl
-org.ccil.cowan.tagsoup.AutoDetector
-org.ccil.cowan.tagsoup.Element
-org.ccil.cowan.tagsoup.ElementType
-org.ccil.cowan.tagsoup.HTMLModels
-org.ccil.cowan.tagsoup.HTMLScanner
-org.ccil.cowan.tagsoup.HTMLSchema
-org.ccil.cowan.tagsoup.Parser
-org.ccil.cowan.tagsoup.Parser$1
-org.ccil.cowan.tagsoup.ScanHandler
-org.ccil.cowan.tagsoup.Scanner
-org.ccil.cowan.tagsoup.Schema
 org.json.JSON
 org.json.JSONArray
 org.json.JSONException
@@ -3938,31 +3930,30 @@
 org.kxml2.io.KXmlParser
 org.kxml2.io.KXmlParser$ValueContext
 org.xml.sax.Attributes
-org.xml.sax.ContentHandler
-org.xml.sax.DTDHandler
-org.xml.sax.EntityResolver
-org.xml.sax.ErrorHandler
-org.xml.sax.InputSource
-org.xml.sax.Locator
 org.xml.sax.SAXException
-org.xml.sax.SAXNotRecognizedException
-org.xml.sax.SAXNotSupportedException
-org.xml.sax.XMLReader
-org.xml.sax.ext.LexicalHandler
-org.xml.sax.helpers.DefaultHandler
 org.xmlpull.v1.XmlPullParser
 org.xmlpull.v1.XmlPullParserException
 org.xmlpull.v1.XmlSerializer
+sun.invoke.util.BytecodeDescriptor
+sun.invoke.util.Wrapper
 sun.misc.Cleaner
 sun.misc.CompoundEnumeration
+sun.misc.FDBigInteger
+sun.misc.FloatingDecimal
+sun.misc.FloatingDecimal$1
+sun.misc.FloatingDecimal$ASCIIToBinaryBuffer
+sun.misc.FloatingDecimal$ASCIIToBinaryConverter
+sun.misc.FloatingDecimal$BinaryToASCIIBuffer
+sun.misc.FloatingDecimal$BinaryToASCIIConverter
+sun.misc.FloatingDecimal$ExceptionalBinaryToASCIIBuffer
+sun.misc.FloatingDecimal$PreparedASCIIToBinaryBuffer
 sun.misc.FormattedFloatingDecimal
 sun.misc.FormattedFloatingDecimal$1
 sun.misc.FormattedFloatingDecimal$Form
-sun.misc.FpUtils
-sun.misc.Hashing
 sun.misc.IOUtils
-sun.misc.IoTrace
+sun.misc.JavaIOFileDescriptorAccess
 sun.misc.REException
+sun.misc.SharedSecrets
 sun.misc.Unsafe
 sun.misc.VM
 sun.misc.Version
@@ -3978,10 +3969,10 @@
 sun.net.www.ParseUtil
 sun.net.www.protocol.file.Handler
 sun.net.www.protocol.jar.Handler
-sun.nio.ch.AbstractPollArrayWrapper
 sun.nio.ch.DatagramChannelImpl
 sun.nio.ch.DatagramDispatcher
 sun.nio.ch.DirectBuffer
+sun.nio.ch.EPollArrayWrapper
 sun.nio.ch.FileChannelImpl
 sun.nio.ch.FileChannelImpl$Unmapper
 sun.nio.ch.FileDispatcher
@@ -3991,13 +3982,11 @@
 sun.nio.ch.FileLockTable
 sun.nio.ch.IOStatus
 sun.nio.ch.IOUtil
-sun.nio.ch.InheritedChannel
 sun.nio.ch.Interruptible
 sun.nio.ch.NativeDispatcher
 sun.nio.ch.NativeThread
 sun.nio.ch.NativeThreadSet
 sun.nio.ch.Net
-sun.nio.ch.PollArrayWrapper
 sun.nio.ch.SelChImpl
 sun.nio.ch.ServerSocketChannelImpl
 sun.nio.ch.SharedFileLockTable
@@ -4006,14 +3995,8 @@
 sun.nio.cs.ArrayEncoder
 sun.nio.cs.StreamDecoder
 sun.nio.cs.StreamEncoder
-sun.reflect.annotation.AnnotationType
 sun.security.action.GetBooleanAction
 sun.security.action.GetPropertyAction
-sun.security.ec.ECKeyFactory
-sun.security.ec.ECKeyFactory$1
-sun.security.ec.ECKeyFactory$2
-sun.security.ec.ECParameters
-sun.security.ec.NamedCurve
 sun.security.jca.GetInstance
 sun.security.jca.GetInstance$Instance
 sun.security.jca.ProviderConfig
@@ -4027,7 +4010,6 @@
 sun.security.jca.Providers
 sun.security.jca.ServiceId
 sun.security.pkcs.PKCS9Attribute
-sun.security.pkcs.ParsingException
 sun.security.pkcs.SignerInfo
 sun.security.provider.CertPathProvider
 sun.security.provider.X509Factory
@@ -4043,7 +4025,9 @@
 sun.security.provider.certpath.PKIXMasterCertPathValidator
 sun.security.provider.certpath.PolicyChecker
 sun.security.provider.certpath.PolicyNodeImpl
-sun.security.provider.certpath.UntrustedChecker
+sun.security.util.-$Lambda$179$Kli5xKA4dAwmFO1sy_hpNWmbfH4
+sun.security.util.AbstractAlgorithmConstraints
+sun.security.util.AlgorithmDecomposer
 sun.security.util.BitArray
 sun.security.util.ByteArrayLexOrder
 sun.security.util.ByteArrayTagOrder
@@ -4057,7 +4041,6 @@
 sun.security.util.DerOutputStream
 sun.security.util.DerValue
 sun.security.util.DisabledAlgorithmConstraints
-sun.security.util.DisabledAlgorithmConstraints$1
 sun.security.util.DisabledAlgorithmConstraints$KeySizeConstraint
 sun.security.util.DisabledAlgorithmConstraints$KeySizeConstraint$Operator
 sun.security.util.DisabledAlgorithmConstraints$KeySizeConstraints
@@ -4067,7 +4050,6 @@
 sun.security.util.MemoryCache$CacheEntry
 sun.security.util.MemoryCache$SoftCacheEntry
 sun.security.util.ObjectIdentifier
-sun.security.util.UntrustedCertificates
 sun.security.x509.AVA
 sun.security.x509.AVAKeyword
 sun.security.x509.AccessDescription
@@ -4124,8 +4106,6 @@
 sun.security.x509.X509CertImpl
 sun.security.x509.X509CertInfo
 sun.security.x509.X509Key
-sun.util.LocaleServiceProviderPool
-sun.util.LocaleServiceProviderPool$1
 sun.util.calendar.AbstractCalendar
 sun.util.calendar.BaseCalendar
 sun.util.calendar.BaseCalendar$Date
@@ -4139,18 +4119,15 @@
 sun.util.locale.BaseLocale
 sun.util.locale.BaseLocale$Cache
 sun.util.locale.BaseLocale$Key
-sun.util.locale.Extension
 sun.util.locale.InternalLocaleBuilder
 sun.util.locale.InternalLocaleBuilder$CaseInsensitiveChar
 sun.util.locale.LanguageTag
-sun.util.locale.LocaleExtensions
 sun.util.locale.LocaleObjectCache
 sun.util.locale.LocaleObjectCache$CacheEntry
 sun.util.locale.LocaleSyntaxException
 sun.util.locale.LocaleUtils
 sun.util.locale.ParseStatus
 sun.util.locale.StringTokenIterator
-sun.util.locale.UnicodeLocaleExtension
 sun.util.logging.LoggingProxy
 sun.util.logging.LoggingSupport
 sun.util.logging.LoggingSupport$1
diff --git a/proto/src/metrics_constants.proto b/proto/src/metrics_constants.proto
index 59d982a..8d2f0c3 100644
--- a/proto/src/metrics_constants.proto
+++ b/proto/src/metrics_constants.proto
@@ -41,6 +41,9 @@
 
     // The view or control was dismissed.
     TYPE_DISMISS = 5;
+
+    // The view or control was updated.
+    TYPE_UPDATE = 6;
   }
 
   // Known visual elements: views or controls.
@@ -3275,7 +3278,6 @@
     // OPEN: Settings > Apps > Default Apps > Warning dialog to confirm selection
     DEFAULT_APP_PICKER_CONFIRMATION_DIALOG = 791;
 
-
     // OPEN: Settings > Apps > Default Apps > Default autofill app
     DEFAULT_AUTOFILL_PICKER = 792;
 
@@ -3352,7 +3354,8 @@
     BACKUP_SETTINGS = 818;
 
     // ACTION: Picture-in-picture was explicitly entered for an activity
-    // VALUE: true if it was entered while hiding as a result of moving to another task, false otherwise
+    // VALUE: true if it was entered while hiding as a result of moving to
+    // another task, false otherwise
     ACTION_PICTURE_IN_PICTURE_ENTERED = 819;
 
     // ACTION: The activity currently in picture-in-picture was expanded back to fullscreen
@@ -3378,6 +3381,54 @@
     // The current aspect ratio of the PiP, logged when it changes.
     PICTURE_IN_PICTURE_ASPECT_RATIO = 825;
 
+    // FIELD - length in dp of ACTION_LS_* gestures, or zero if not applicable
+    // CATEGORY: GLOBAL_SYSTEM_UI
+    // OS: O
+    FIELD_GESTURE_LENGTH = 826;
+
+    // FIELD - velocity in dp (per second?) of ACTION_LS_* gestures, or zero if not applicable
+    // CATEGORY: GLOBAL_SYSTEM_UI
+    // OS: O
+    FIELD_GESTURE_VELOCITY = 827;
+
+    // OPEN: Carrier demo mode password dialog
+    CARRIER_DEMO_MODE_PASSWORD = 828;
+
+    // ACTION: Create a Settings shortcut item.
+    ACTION_SETTINGS_CREATE_SHORTCUT = 829;
+
+    // ACTION: A tile in Settings information architecture is clicked
+    ACTION_SETTINGS_TILE_CLICK = 830;
+
+    // OPEN: Notification unsnoozed. CLOSE: Notification snoozed. UPDATE: snoozed notification
+    // updated
+    // CATEGORY: NOTIFICATION
+    // OS: O
+    NOTIFICATION_SNOOZED = 831;
+
+    // Tagged data for NOTIFICATION_SNOOZED. TRUE: snoozed until context, FALSE: snoozed for time.
+    // OS: O
+    NOTIFICATION_SNOOZED_CRITERIA = 832;
+
+    // FIELD - The context (source) from which an action is performed
+    FIELD_CONTEXT = 833;
+
+    // ACTION: Settings advanced button is expanded
+    ACTION_SETTINGS_ADVANCED_BUTTON_EXPAND = 834;
+
+    // ACTION: Logs the number of times the saved network evaluator was used to
+    // recommend a wifi network
+    WIFI_NETWORK_RECOMMENDATION_SAVED_NETWORK_EVALUATOR = 835;
+
+    // ACTION: Logs the number of times the recommended network evaluator was
+    // used to recommend a wifi network
+    WIFI_NETWORK_RECOMMENDATION_RECOMMENDED_NETWORK_EVALUATOR = 836;
+
+    // ACTION: Logs the number of times a recommended network was resulted in a
+    // successful connection
+    // VALUE: true if the connection was successful, false if the connection failed
+    WIFI_NETWORK_RECOMMENDATION_CONNECTION_SUCCESS = 837;
+
     // ---- End O Constants, all O constants go above this line ----
 
     // Add new aosp constants above this line.
diff --git a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
index 3ba8915..aae5dd8 100644
--- a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
+++ b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
@@ -70,6 +70,8 @@
 import android.os.UserManagerInternal;
 import android.provider.Settings;
 import android.hardware.fingerprint.IFingerprintService;
+import android.provider.SettingsStringUtil.ComponentNameSet;
+import android.provider.SettingsStringUtil.SettingStringHelper;
 import android.text.TextUtils;
 import android.text.TextUtils.SimpleStringSplitter;
 import android.util.Slog;
@@ -98,9 +100,9 @@
 import com.android.internal.content.PackageMonitor;
 import com.android.internal.os.SomeArgs;
 import com.android.server.LocalServices;
-
 import com.android.server.policy.AccessibilityShortcutController;
 import com.android.server.statusbar.StatusBarManagerInternal;
+
 import org.xmlpull.v1.XmlPullParserException;
 
 import java.io.FileDescriptor;
@@ -445,7 +447,7 @@
                 }
                 return userState.getClientState();
             } else {
-                userState.mClients.register(client);
+                userState.mUserClients.register(client);
                 // If this client is not for the current user we do not
                 // return a state since it is not for the foreground user.
                 // We will send the state to the client on a user switch.
@@ -813,6 +815,42 @@
         }
     }
 
+    /**
+     * Invoked remotely over AIDL by SysUi when the accessibility button within the system's
+     * navigation area has been clicked.
+     */
+    @Override
+    public void notifyAccessibilityButtonClicked() {
+        if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.STATUS_BAR)
+                != PackageManager.PERMISSION_GRANTED) {
+            throw new SecurityException("Caller does not hold permission "
+                    + android.Manifest.permission.STATUS_BAR);
+        }
+        synchronized (mLock) {
+            notifyAccessibilityButtonClickedLocked();
+        }
+    }
+
+    /**
+     * Invoked remotely over AIDL by SysUi when the availability of the accessibility
+     * button within the system's navigation area has changed.
+     *
+     * @param available {@code true} if the accessibility button is available to the
+     *                  user, {@code false} otherwise
+     */
+    @Override
+    public void notifyAccessibilityButtonAvailabilityChanged(boolean available) {
+        if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.STATUS_BAR)
+                != PackageManager.PERMISSION_GRANTED) {
+            throw new SecurityException("Caller does not hold permission "
+                    + android.Manifest.permission.STATUS_BAR);
+        }
+        synchronized (mLock) {
+            notifyAccessibilityButtonAvailabilityChangedLocked(available);
+        }
+    }
+
+
     boolean onGesture(int gestureId) {
         synchronized (mLock) {
             boolean handled = notifyGestureLocked(gestureId, false);
@@ -927,7 +965,7 @@
             oldUserState.onSwitchToAnotherUser();
 
             // Disable the local managers for the old user.
-            if (oldUserState.mClients.getRegisteredCallbackCount() > 0) {
+            if (oldUserState.mUserClients.getRegisteredCallbackCount() > 0) {
                 mMainHandler.obtainMessage(MainHandler.MSG_SEND_CLEARED_STATE_TO_CLIENTS_FOR_USER,
                         oldUserState.mUserId, 0).sendToTarget();
             }
@@ -1044,6 +1082,28 @@
         }
     }
 
+    private void notifyAccessibilityButtonClickedLocked() {
+        final UserState state = getCurrentUserStateLocked();
+        for (int i = state.mBoundServices.size() - 1; i >= 0; i--) {
+            final Service service = state.mBoundServices.get(i);
+            // TODO(b/34720082): Only notify a single user-defined service
+            if (service.mRequestAccessibilityButton) {
+                service.notifyAccessibilityButtonClickedLocked();
+            }
+        }
+    }
+
+    private void notifyAccessibilityButtonAvailabilityChangedLocked(boolean available) {
+        final UserState state = getCurrentUserStateLocked();
+        state.mIsAccessibilityButtonAvailable = available;
+        for (int i = state.mBoundServices.size() - 1; i >= 0; i--) {
+            final Service service = state.mBoundServices.get(i);
+            if (service.mRequestAccessibilityButton) {
+                service.notifyAccessibilityButtonAvailabilityChangedLocked(available);
+            }
+        }
+    }
+
     /**
      * Removes an AccessibilityInteractionConnection.
      *
@@ -1178,7 +1238,7 @@
                 service.onAdded();
                 userState.mBoundServices.add(service);
                 userState.mComponentNameToServiceMap.put(service.mComponentName, service);
-                scheduleNotifyClientsOfServicesStateChange();
+                scheduleNotifyClientsOfServicesStateChange(userState);
             }
         } catch (RemoteException re) {
             /* do nothing */
@@ -1200,7 +1260,7 @@
             Service boundService = userState.mBoundServices.get(i);
             userState.mComponentNameToServiceMap.put(boundService.mComponentName, boundService);
         }
-        scheduleNotifyClientsOfServicesStateChange();
+        scheduleNotifyClientsOfServicesStateChange(userState);
     }
 
     /**
@@ -1362,16 +1422,16 @@
         final int clientState = userState.getClientState();
         if (userState.mLastSentClientState != clientState
                 && (mGlobalClients.getRegisteredCallbackCount() > 0
-                        || userState.mClients.getRegisteredCallbackCount() > 0)) {
+                        || userState.mUserClients.getRegisteredCallbackCount() > 0)) {
             userState.mLastSentClientState = clientState;
             mMainHandler.obtainMessage(MainHandler.MSG_SEND_STATE_TO_CLIENTS,
                     clientState, userState.mUserId).sendToTarget();
         }
     }
 
-    private void scheduleNotifyClientsOfServicesStateChange() {
-        mMainHandler.obtainMessage(MainHandler.MSG_SEND_SERVICES_STATE_CHANGED_TO_CLIENTS)
-                .sendToTarget();
+    private void scheduleNotifyClientsOfServicesStateChange(UserState userState) {
+        mMainHandler.obtainMessage(MainHandler.MSG_SEND_SERVICES_STATE_CHANGED_TO_CLIENTS,
+                userState.mUserId).sendToTarget();
     }
 
     private void scheduleUpdateInputFilter(UserState userState) {
@@ -2013,10 +2073,12 @@
      * Enables accessibility service specified by {@param componentName} for the {@param userId}.
      */
     private void enableAccessibilityServiceLocked(ComponentName componentName, int userId) {
-        SettingsStringHelper settingsHelper = new SettingsStringHelper(
-                Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES, userId);
-        settingsHelper.addService(componentName);
-        settingsHelper.writeToSettings();
+        final SettingStringHelper setting =
+                new SettingStringHelper(
+                        mContext.getContentResolver(),
+                        Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES,
+                        userId);
+        setting.write(ComponentNameSet.add(setting.read(), componentName));
 
         UserState userState = getUserStateLocked(userId);
         if (userState.mEnabledServices.add(componentName)) {
@@ -2028,10 +2090,12 @@
      * Disables accessibility service specified by {@param componentName} for the {@param userId}.
      */
     private void disableAccessibilityServiceLocked(ComponentName componentName, int userId) {
-        SettingsStringHelper settingsHelper = new SettingsStringHelper(
-                Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES, userId);
-        settingsHelper.deleteService(componentName);
-        settingsHelper.writeToSettings();
+        final SettingStringHelper setting =
+                new SettingStringHelper(
+                        mContext.getContentResolver(),
+                        Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES,
+                        userId);
+        setting.write(ComponentNameSet.remove(setting.read(), componentName));
 
         UserState userState = getUserStateLocked(userId);
         if (userState.mEnabledServices.remove(componentName)) {
@@ -2060,45 +2124,6 @@
         return mFingerprintGestureDispatcher.onFingerprintGesture(gestureKeyCode);
     }
 
-    private class SettingsStringHelper {
-        private static final String SETTINGS_DELIMITER = ":";
-        private ContentResolver mContentResolver;
-        private final String mSettingsName;
-        private Set<String> mServices;
-        private final int mUserId;
-
-        public SettingsStringHelper(String name, int userId) {
-            mUserId = userId;
-            mSettingsName = name;
-            mContentResolver = mContext.getContentResolver();
-            String servicesString = Settings.Secure.getStringForUser(
-                    mContentResolver, mSettingsName, userId);
-            mServices = new HashSet();
-            if (!TextUtils.isEmpty(servicesString)) {
-                final TextUtils.SimpleStringSplitter colonSplitter =
-                        new TextUtils.SimpleStringSplitter(SETTINGS_DELIMITER.charAt(0));
-                colonSplitter.setString(servicesString);
-                while (colonSplitter.hasNext()) {
-                    final String serviceName = colonSplitter.next();
-                    mServices.add(serviceName);
-                }
-            }
-        }
-
-        public void addService(ComponentName component) {
-            mServices.add(component.flattenToString());
-        }
-
-        public void deleteService(ComponentName component) {
-            mServices.remove(component.flattenToString());
-        }
-
-        public void writeToSettings() {
-            Settings.Secure.putStringForUser(mContentResolver, mSettingsName,
-                    TextUtils.join(SETTINGS_DELIMITER, mServices), mUserId);
-        }
-    }
-
     @Override
     public void dump(FileDescriptor fd, final PrintWriter pw, String[] args) {
         mSecurityPolicy.enforceCallingPermission(Manifest.permission.DUMP, FUNCTION_DUMP);
@@ -2225,12 +2250,12 @@
                     final int clientState = msg.arg1;
                     final int userId = msg.arg2;
                     sendStateToClients(clientState, mGlobalClients);
-                    sendStateToClientsForUser(clientState, userId);
+                    sendStateToClients(clientState, getUserClientsForId(userId));
                 } break;
 
                 case MSG_SEND_CLEARED_STATE_TO_CLIENTS_FOR_USER: {
                     final int userId = msg.arg1;
-                    sendStateToClientsForUser(0, userId);
+                    sendStateToClients(0, getUserClientsForId(userId));
                 } break;
 
                 case MSG_ANNOUNCE_NEW_USER_IF_NEEDED: {
@@ -2257,7 +2282,9 @@
                 } break;
 
                 case MSG_SEND_SERVICES_STATE_CHANGED_TO_CLIENTS: {
-                    notifyClientsOfServicesStateChange();
+                    final int userId = msg.arg1;
+                    notifyClientsOfServicesStateChange(mGlobalClients);
+                    notifyClientsOfServicesStateChange(getUserClientsForId(userId));
                 } break;
 
                 case MSG_UPDATE_FINGERPRINT: {
@@ -2282,12 +2309,12 @@
             }
         }
 
-        private void sendStateToClientsForUser(int clientState, int userId) {
+        private RemoteCallbackList<IAccessibilityManagerClient> getUserClientsForId(int userId) {
             final UserState userState;
             synchronized (mLock) {
                 userState = getUserStateLocked(userId);
             }
-            sendStateToClients(clientState, userState.mClients);
+            return userState.mUserClients;
         }
 
         private void sendStateToClients(int clientState,
@@ -2307,11 +2334,8 @@
             }
         }
 
-        private void notifyClientsOfServicesStateChange() {
-            RemoteCallbackList<IAccessibilityManagerClient> clients;
-            synchronized (mLock) {
-                clients = getCurrentUserStateLocked().mClients;
-            }
+        private void notifyClientsOfServicesStateChange(
+                RemoteCallbackList<IAccessibilityManagerClient> clients) {
             try {
                 final int userClientCount = clients.beginBroadcast();
                 for (int i = 0; i < userClientCount; i++) {
@@ -2426,6 +2450,8 @@
 
         boolean mCaptureFingerprintGestures;
 
+        boolean mRequestAccessibilityButton;
+
         int mFetchFlags;
 
         long mNotificationTimeout;
@@ -2581,6 +2607,8 @@
                     & AccessibilityServiceInfo.FLAG_RETRIEVE_INTERACTIVE_WINDOWS) != 0;
             mCaptureFingerprintGestures = (info.flags
                     & AccessibilityServiceInfo.FLAG_CAPTURE_FINGERPRINT_GESTURES) != 0;
+            mRequestAccessibilityButton = (info.flags
+                    & AccessibilityServiceInfo.FLAG_REQUEST_ACCESSIBILITY_BUTTON) != 0;
         }
 
         /**
@@ -2694,7 +2722,7 @@
                     }
                     UserState userState = getUserStateLocked(mUserId);
                     onUserStateChangedLocked(userState);
-                    scheduleNotifyClientsOfServicesStateChange();
+                    scheduleNotifyClientsOfServicesStateChange(userState);
                 }
             } finally {
                 Binder.restoreCallingIdentity(identity);
@@ -2904,7 +2932,7 @@
         public boolean findAccessibilityNodeInfoByAccessibilityId(
                 int accessibilityWindowId, long accessibilityNodeId, int interactionId,
                 IAccessibilityInteractionConnectionCallback callback, int flags,
-                long interrogatingTid) throws RemoteException {
+                long interrogatingTid, Bundle arguments) throws RemoteException {
             final int resolvedWindowId;
             IAccessibilityInteractionConnection connection = null;
             Region partialInteractiveRegion = Region.obtain();
@@ -2936,7 +2964,7 @@
             try {
                 connection.findAccessibilityNodeInfoByAccessibilityId(accessibilityNodeId,
                         partialInteractiveRegion, interactionId, callback, mFetchFlags | flags,
-                        interrogatingPid, interrogatingTid, spec);
+                        interrogatingPid, interrogatingTid, spec, arguments);
                 return true;
             } catch (RemoteException re) {
                 if (DEBUG) {
@@ -3332,6 +3360,19 @@
         }
 
         @Override
+        public boolean isAccessibilityButtonAvailable() {
+            final UserState userState;
+            synchronized (mLock) {
+                if (!isCalledForCurrentUserLocked()) {
+                    return false;
+                }
+                userState = getCurrentUserStateLocked();
+            }
+
+            return mRequestAccessibilityButton && userState.mIsAccessibilityButtonAvailable;
+        }
+
+        @Override
         public void dump(FileDescriptor fd, final PrintWriter pw, String[] args) {
             mSecurityPolicy.enforceCallingPermission(Manifest.permission.DUMP, FUNCTION_DUMP);
             synchronized (mLock) {
@@ -3544,6 +3585,14 @@
             mInvocationHandler.notifySoftKeyboardShowModeChangedLocked(showState);
         }
 
+        public void notifyAccessibilityButtonClickedLocked() {
+            mInvocationHandler.notifyAccessibilityButtonClickedLocked();
+        }
+
+        public void notifyAccessibilityButtonAvailabilityChangedLocked(boolean available) {
+            mInvocationHandler.notifyAccessibilityButtonAvailabilityChangedLocked(available);
+        }
+
         /**
          * Called by the invocation handler to notify the service that the
          * state of magnification has changed.
@@ -3582,6 +3631,36 @@
             }
         }
 
+        private void notifyAccessibilityButtonClickedInternal() {
+            final IAccessibilityServiceClient listener;
+            synchronized (mLock) {
+                listener = mServiceInterface;
+            }
+            if (listener != null) {
+                try {
+                    listener.onAccessibilityButtonClicked();
+                } catch (RemoteException re) {
+                    Slog.e(LOG_TAG, "Error sending accessibility button click to " + mService, re);
+                }
+            }
+        }
+
+        private void notifyAccessibilityButtonAvailabilityChangedInternal(boolean available) {
+            final IAccessibilityServiceClient listener;
+            synchronized (mLock) {
+                listener = mServiceInterface;
+            }
+            if (listener != null) {
+                try {
+                    listener.onAccessibilityButtonAvailabilityChanged(available);
+                } catch (RemoteException re) {
+                    Slog.e(LOG_TAG,
+                            "Error sending accessibility button availability change to " + mService,
+                            re);
+                }
+            }
+        }
+
         private void notifyGestureInternal(int gestureId) {
             final IAccessibilityServiceClient listener;
             synchronized (mLock) {
@@ -3723,6 +3802,8 @@
 
             private static final int MSG_ON_MAGNIFICATION_CHANGED = 5;
             private static final int MSG_ON_SOFT_KEYBOARD_STATE_CHANGED = 6;
+            private static final int MSG_ON_ACCESSIBILITY_BUTTON_CLICKED = 7;
+            private static final int MSG_ON_ACCESSIBILITY_BUTTON_AVAILABILITY_CHANGED = 8;
 
             private boolean mIsMagnificationCallbackEnabled = false;
             private boolean mIsSoftKeyboardCallbackEnabled = false;
@@ -3758,6 +3839,15 @@
                         notifySoftKeyboardShowModeChangedInternal(showState);
                     } break;
 
+                    case MSG_ON_ACCESSIBILITY_BUTTON_CLICKED: {
+                        notifyAccessibilityButtonClickedInternal();
+                    } break;
+
+                    case MSG_ON_ACCESSIBILITY_BUTTON_AVAILABILITY_CHANGED: {
+                        final boolean available = (message.arg1 != 0);
+                        notifyAccessibilityButtonAvailabilityChangedInternal(available);
+                    } break;
+
                     default: {
                         throw new IllegalArgumentException("Unknown message: " + type);
                     }
@@ -3797,6 +3887,17 @@
             public void setSoftKeyboardCallbackEnabled(boolean enabled) {
                 mIsSoftKeyboardCallbackEnabled = enabled;
             }
+
+            public void notifyAccessibilityButtonClickedLocked() {
+                final Message msg = obtainMessage(MSG_ON_ACCESSIBILITY_BUTTON_CLICKED);
+                msg.sendToTarget();
+            }
+
+            public void notifyAccessibilityButtonAvailabilityChangedLocked(boolean available) {
+                final Message msg = obtainMessage(MSG_ON_ACCESSIBILITY_BUTTON_AVAILABILITY_CHANGED,
+                        (available ? 1 : 0), 0);
+                msg.sendToTarget();
+            }
         }
     }
 
@@ -3899,6 +4000,7 @@
                 case WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG:
                 case WindowManager.LayoutParams.TYPE_SYSTEM_ERROR:
                 case WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY:
+                case WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY:
                 case WindowManager.LayoutParams.TYPE_SCREENSHOT: {
                     return AccessibilityWindowInfo.TYPE_SYSTEM;
                 }
@@ -4466,7 +4568,7 @@
 
         // Non-transient state.
 
-        public final RemoteCallbackList<IAccessibilityManagerClient> mClients =
+        public final RemoteCallbackList<IAccessibilityManagerClient> mUserClients =
             new RemoteCallbackList<>();
 
         public final SparseArray<AccessibilityConnectionWrapper> mInteractionConnections =
@@ -4500,6 +4602,8 @@
 
         public int mSoftKeyboardShowMode = 0;
 
+        public boolean mIsAccessibilityButtonAvailable;
+
         public boolean mIsTouchExplorationEnabled;
         public boolean mIsTextHighContrastEnabled;
         public boolean mIsEnhancedWebAccessibilityEnabled;
@@ -4574,6 +4678,9 @@
             mIsDisplayMagnificationEnabled = false;
             mIsAutoclickEnabled = false;
             mSoftKeyboardShowMode = 0;
+
+            // Clear state tracked from system UI
+            mIsAccessibilityButtonAvailable = false;
         }
 
         public void destroyUiAutomationService() {
diff --git a/services/autofill/java/com/android/server/autofill/AnchoredWindow.java b/services/autofill/java/com/android/server/autofill/AnchoredWindow.java
index c68ac60..64c6abd 100644
--- a/services/autofill/java/com/android/server/autofill/AnchoredWindow.java
+++ b/services/autofill/java/com/android/server/autofill/AnchoredWindow.java
@@ -17,134 +17,276 @@
 
 import static com.android.server.autofill.Helper.DEBUG;
 
+import android.annotation.Nullable;
 import android.content.Context;
+import android.graphics.PixelFormat;
 import android.graphics.Rect;
+import android.os.IBinder;
 import android.util.Slog;
 import android.view.Gravity;
 import android.view.MotionEvent;
 import android.view.View;
-import android.view.ViewGroup;
+import android.view.View.MeasureSpec;
 import android.view.WindowManager;
 import android.view.WindowManager.LayoutParams;
 import android.widget.FrameLayout;
 
-import java.io.PrintWriter;
 /**
  * A window above the application that is smartly anchored to a rectangular region.
  */
-final class AnchoredWindow {
+final class AnchoredWindow implements View.OnLayoutChangeListener, View.OnTouchListener {
     private static final String TAG = "AutoFill";
 
+    private static final int NULL_HEIGHT = -1;
+
     private final WindowManager mWm;
-    private final View mRootView;
-    private final View mView;
-    private final int mWidth;
-    private final int mHeight;
-    private boolean mIsShowing = false;
+    private final IBinder mAppToken;
+    private final View mContentView;
+
+    private final View mWindowSizeListenerView;
+    private final int mMinMargin;
+
+    private int mLastHeight = NULL_HEIGHT;
+    @Nullable
+    private Rect mLastBounds;
+    @Nullable
+    private Rect mLastDisplayBounds;
 
     /**
      * Constructor.
      *
-     * @param wm window manager that draws the view on a window
-     * @param view singleton view in the window
-     * @param width requested width of the view
-     * @param height requested height of the view
+     * @param wm window manager that draws the content on a window
+     * @param appToken token to pass to window manager
+     * @param contentView content of the window
      */
-    AnchoredWindow(WindowManager wm, View view, int width, int height) {
+    AnchoredWindow(WindowManager wm, IBinder appToken, View contentView) {
         mWm = wm;
-        mRootView = wrapView(view, width, height);
-        mView = view;
-        mWidth = width;
-        mHeight = height;
+        mAppToken = appToken;
+        mContentView = contentView;
+
+        mContentView.addOnLayoutChangeListener(this);
+
+        Context context = contentView.getContext();
+
+        mWindowSizeListenerView = new FrameLayout(context);
+        mWindowSizeListenerView.addOnLayoutChangeListener(this);
+
+        mMinMargin = context.getResources().getDimensionPixelSize(
+                com.android.internal.R.dimen.autofill_fill_min_margin);
     }
 
     /**
      * Shows the window.
      *
-     * @param bounds the rectangular region this window should be anchored to
+     * @param bounds the region the window should be anchored to
      */
     void show(Rect bounds) {
-        final LayoutParams params = createBaseLayoutParams();
-        params.x = bounds.left;
-        params.y = bounds.bottom;
+        if (DEBUG) Slog.d(TAG, "show bounds=" + bounds);
 
-        if (!mIsShowing) {
-            if (DEBUG) Slog.d(TAG, "adding view " + mView);
-            mWm.addView(mRootView, params);
-        } else {
-            if (DEBUG) Slog.d(TAG, "updating view " + mView);
-            mWm.updateViewLayout(mRootView, params);
+        if (!mWindowSizeListenerView.isAttachedToWindow()) {
+            if (DEBUG) Slog.d(TAG, "adding mWindowSizeListenerView");
+            LayoutParams params = createWindowLayoutParams(
+                    mAppToken,
+                    LayoutParams.FLAG_NOT_TOUCHABLE); // not touchable
+            params.gravity = Gravity.LEFT | Gravity.TOP;
+            params.x = 0;
+            params.y = 0;
+            params.width = LayoutParams.MATCH_PARENT;
+            params.height = LayoutParams.MATCH_PARENT;
+            mWm.addView(mWindowSizeListenerView, params);
         }
-        mIsShowing = true;
+
+        updateBounds(bounds);
     }
 
     /**
      * Hides the window.
      */
     void hide() {
-        if (DEBUG) Slog.d(TAG, "removing view " + mView);
+        if (DEBUG) Slog.d(TAG, "hide");
 
-        if (mIsShowing) {
-            mWm.removeView(mRootView);
+        mLastHeight = NULL_HEIGHT;
+        mLastBounds = null;
+        mLastDisplayBounds = null;
+
+        if (mWindowSizeListenerView.isAttachedToWindow()) {
+            if (DEBUG) Slog.d(TAG, "removing mWindowSizeListenerView");
+            mWm.removeView(mWindowSizeListenerView);
         }
-        mIsShowing = false;
-    }
 
-    /**
-     * Wraps a view with a SelfRemovingView and sets its requested width and height.
-     */
-    private View wrapView(View view, int width, int height) {
-        final ViewGroup viewGroup = new SelfRemovingView(view.getContext());
-        viewGroup.addView(view, new ViewGroup.LayoutParams(width, height));
-        return viewGroup;
-    }
-
-    private static LayoutParams createBaseLayoutParams() {
-        final LayoutParams params = new LayoutParams();
-        // TODO(b/33197203): LayoutParams.TYPE_AUTOFILL
-        params.type = LayoutParams.TYPE_SYSTEM_ALERT;
-        params.flags =
-                LayoutParams.SOFT_INPUT_STATE_UNCHANGED
-                | LayoutParams.FLAG_LAYOUT_IN_SCREEN
-                | LayoutParams.FLAG_LAYOUT_NO_LIMITS
-                | LayoutParams.FLAG_NOT_FOCUSABLE
-                | LayoutParams.FLAG_NOT_TOUCH_MODAL
-                | LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH;
-        params.gravity = Gravity.TOP | Gravity.LEFT;
-        params.width = LayoutParams.WRAP_CONTENT;
-        params.height = LayoutParams.WRAP_CONTENT;
-        return params;
+        if (mContentView.isAttachedToWindow()) {
+            if (DEBUG) Slog.d(TAG, "removing mContentView");
+            mContentView.setOnTouchListener(null);
+            mWm.removeView(mContentView);
+        }
     }
 
     @Override
-    public String toString() {
-        if (!DEBUG) return super.toString();
-
-        return "AnchoredWindow: [width=" + mWidth + ", height=" + mHeight + ", view=" + mView + "]";
+    public void onLayoutChange(View view, int left, int top, int right, int bottom,
+            int oldLeft, int oldTop, int oldRight, int oldBottom) {
+        if (view == mWindowSizeListenerView) {
+            if (DEBUG) Slog.d(TAG, "onLayoutChange() for mWindowSizeListenerView");
+            // mWindowSizeListenerView layout changed, get the size of the display bounds and updateLocked
+            // the window.
+            final Rect displayBounds = new Rect();
+            view.getBoundsOnScreen(displayBounds);
+            updateDisplayBounds(displayBounds);
+        } else if (view == mContentView) {
+            // mContentView layout changed, updateLocked the window in case its height changed.
+            if (DEBUG) Slog.d(TAG, "onLayoutChange() for mContentView");
+            updateHeight();
+        }
     }
 
-    void dump(PrintWriter pw) {
-        pw.println("Anchored Window");
-        final String prefix = "  ";
-        pw.print(prefix); pw.print("width: "); pw.println(mWidth);
-        pw.print(prefix); pw.print("height: "); pw.println(mHeight);
-        pw.print(prefix); pw.print("visible: "); pw.println(mIsShowing);
+    // When the window is touched outside, hide the window.
+    @Override
+    public boolean onTouch(View view, MotionEvent event) {
+        if (view == mContentView && event.getAction() == MotionEvent.ACTION_OUTSIDE) {
+            hide();
+            return true;
+        }
+        return false;
     }
 
-    /** FrameLayout that listens for touch events removes itself if the touch event is outside. */
-    private final class SelfRemovingView extends FrameLayout {
-        public SelfRemovingView(Context context) {
-            super(context);
+    private boolean updateHeight() {
+        final Rect displayBounds = mLastDisplayBounds;
+        if (displayBounds == null) {
+            return false;
         }
 
-        @Override
-        public boolean onTouchEvent(MotionEvent event) {
-            if (event.getAction() == MotionEvent.ACTION_OUTSIDE) {
-                hide();
-                return true;
-            } else {
-                return super.onTouchEvent(event);
+        mContentView.measure(
+                MeasureSpec.makeMeasureSpec(displayBounds.width(), MeasureSpec.AT_MOST),
+                MeasureSpec.makeMeasureSpec(displayBounds.height(), MeasureSpec.AT_MOST));
+        int height = mContentView.getMeasuredHeight();
+        if (height != mLastHeight) {
+            if (DEBUG) Slog.d(TAG, "updateLocked height=" + height);
+            mLastHeight = height;
+            update(height, mLastBounds, displayBounds);
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    private void updateBounds(Rect bounds) {
+        if (!bounds.equals(mLastBounds)) {
+            if (DEBUG) Slog.d(TAG, "updateLocked bounds=" + bounds);
+            mLastBounds = bounds;
+
+            update(mLastHeight, bounds, mLastDisplayBounds);
+        }
+    }
+
+    private void updateDisplayBounds(Rect displayBounds) {
+        if (!displayBounds.equals(mLastDisplayBounds)) {
+            if (DEBUG) Slog.d(TAG, "updateLocked displayBounds=" + displayBounds);
+            mLastDisplayBounds = displayBounds;
+
+            if (!updateHeight()) {
+                update(mLastHeight, mLastBounds, displayBounds);
             }
         }
     }
+
+    // Updates the window if height, bounds, and displayBounds are not null.
+    // Caller should ensure that something changed before calling.
+    private void update(int height, @Nullable Rect bounds, @Nullable Rect displayBounds) {
+        if (height == NULL_HEIGHT || bounds == null || displayBounds == null) {
+            return;
+        }
+
+        if (DEBUG) Slog.d(TAG, "updateLocked height=" + height + ", bounds=" + bounds
+                + ", displayBounds=" + displayBounds);
+
+        final LayoutParams params = createWindowLayoutParams(mAppToken,
+                LayoutParams.FLAG_NOT_TOUCH_MODAL // outside touches go to windows behind us
+                | LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH); // outside touches trigger MotionEvent
+        params.setTitle("AutoFill Fill"); // used for debugging
+        updatePosition(params, height, mMinMargin, bounds, displayBounds);
+        if (!mContentView.isAttachedToWindow()) {
+            if (DEBUG) Slog.d(TAG, "adding mContentView");
+            mWm.addView(mContentView, params);
+            mContentView.setOnTouchListener(this);
+        } else {
+            if (DEBUG) Slog.d(TAG, "updating mContentView");
+            mWm.updateViewLayout(mContentView, params);
+        }
+    }
+
+    /**
+     * Updates the position of the window by altering the {@link LayoutParams}.
+     *
+     * <p>The window can be anchored either above or below the bounds. Anchoring the window below
+     * the bounds is preferred, if it fits. Otherwise, anchor the window on the side with more
+     * space.
+     *
+     * @param params the params to updateLocked
+     * @param height the requested height of the window
+     * @param minMargin the minimum margin between the window and the display bounds
+     * @param bounds the region the window should be anchored to
+     * @param displayBounds the region in which the window may be displayed
+     */
+    private static void updatePosition(
+            LayoutParams params,
+            int height,
+            int minMargin,
+            Rect bounds,
+            Rect displayBounds) {
+        boolean below;
+        int verticalSpace;
+        final int verticalSpaceBelow = displayBounds.bottom - bounds.bottom - minMargin;
+        if (height <= verticalSpaceBelow) {
+            // Fits below bounds.
+            below = true;
+            verticalSpace = height;
+        } else {
+            final int verticalSpaceAbove = bounds.top - displayBounds.top - minMargin;
+            if (height <= verticalSpaceAbove) {
+                // Fits above bounds.
+                below = false;
+                verticalSpace = height;
+            } else {
+                // Pick above/below based on which has the most space.
+                if (verticalSpaceBelow >= verticalSpaceAbove) {
+                    below = true;
+                    verticalSpace = verticalSpaceBelow;
+                } else {
+                    below = false;
+                    verticalSpace = verticalSpaceAbove;
+                }
+            }
+        }
+
+        int gravity;
+        int y;
+        if (below) {
+            if (DEBUG) Slog.d(TAG, "anchorBelow");
+            gravity = Gravity.TOP | Gravity.LEFT;
+            y = bounds.bottom - displayBounds.top;
+        } else {
+            if (DEBUG) Slog.d(TAG, "anchorAbove");
+            gravity = Gravity.BOTTOM | Gravity.LEFT;
+            y = displayBounds.bottom - bounds.top;
+        }
+
+        final int x = bounds.left - displayBounds.left;
+
+        params.gravity = gravity;
+        params.x = x;
+        params.y = y;
+        params.width = bounds.width();
+        params.height = verticalSpace;
+    }
+
+    private static LayoutParams createWindowLayoutParams(IBinder appToken, int flags) {
+        final LayoutParams params = new LayoutParams();
+        params.token = appToken;
+        params.type = LayoutParams.TYPE_PHONE;
+        params.flags =
+                flags
+                | LayoutParams.FLAG_NOT_FOCUSABLE // don't receive input events
+                | LayoutParams.FLAG_ALT_FOCUSABLE_IM; // resize for soft input
+        params.format = PixelFormat.TRANSLUCENT;
+        return params;
+    }
 }
diff --git a/services/autofill/java/com/android/server/autofill/AutoFillManagerService.java b/services/autofill/java/com/android/server/autofill/AutoFillManagerService.java
index 78436f7..3257812 100644
--- a/services/autofill/java/com/android/server/autofill/AutoFillManagerService.java
+++ b/services/autofill/java/com/android/server/autofill/AutoFillManagerService.java
@@ -18,32 +18,30 @@
 
 import static android.Manifest.permission.MANAGE_AUTO_FILL;
 import static android.content.Context.AUTO_FILL_MANAGER_SERVICE;
+import static com.android.server.autofill.Helper.DEBUG;
+import static com.android.server.autofill.Helper.VERBOSE;
 
 import android.Manifest;
+import android.annotation.NonNull;
 import android.app.ActivityManagerInternal;
-import android.app.AppGlobals;
-import android.content.ComponentName;
+import android.content.BroadcastReceiver;
 import android.content.ContentResolver;
 import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
 import android.content.pm.PackageManager;
-import android.content.pm.ServiceInfo;
 import android.database.ContentObserver;
 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;
-import android.os.Message;
-import android.os.Process;
 import android.os.RemoteException;
 import android.os.ResultReceiver;
 import android.os.ShellCallback;
 import android.os.UserHandle;
 import android.provider.Settings;
-import android.service.autofill.IAutoFillManagerService;
-import android.text.TextUtils;
-import android.text.format.DateUtils;
 import android.util.LocalLog;
 import android.util.Log;
 import android.util.Slog;
@@ -51,93 +49,39 @@
 import android.view.autofill.AutoFillId;
 import android.view.autofill.AutoFillValue;
 
+import android.view.autofill.IAutoFillManager;
+import android.view.autofill.IAutoFillManagerClient;
 import com.android.internal.annotations.GuardedBy;
 import com.android.internal.os.BackgroundThread;
-import com.android.internal.os.HandlerCaller;
-import com.android.internal.os.SomeArgs;
+import com.android.internal.os.IResultReceiver;
+import com.android.server.FgThread;
 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;
 
 /**
  * Entry point service for auto-fill management.
  *
- * <p>This service provides the {@link IAutoFillManagerService} implementation and keeps a list of
+ * <p>This service provides the {@link IAutoFillManager} implementation and keeps a list of
  * {@link AutoFillManagerServiceImpl} per user; the real work is done by
  * {@link AutoFillManagerServiceImpl} itself.
  */
+// TODO(b/33197203): Handle removing of packages
 public final class AutoFillManagerService extends SystemService {
 
     private static final String TAG = "AutoFillManagerService";
-    static final boolean DEBUG = true; // TODO(b/33197203): change to false once stable
 
-    private static final long SERVICE_BINDING_LIFETIME_MS = 5 * DateUtils.MINUTE_IN_MILLIS;
+    static final String RECEIVER_BUNDLE_EXTRA_SESSIONS = "sessions";
 
-    private static final int MSG_UNBIND = 1;
-    private static final int MSG_REQUEST_AUTO_FILL_FOR_USER = 2;
-    private static final int MSG_REQUEST_AUTO_FILL = 3;
-    private static final int MSG_ON_VALUE_CHANGED = 4;
-    private static final int MSG_REQUEST_SAVE_FOR_USER = 5;
-
-    private final AutoFillManagerServiceStub mServiceStub;
     private final Context mContext;
-    private final ContentResolver mResolver;
+    private final AutoFillUI mUi;
 
     private final Object mLock = new Object();
 
-    private final HandlerCaller.Callback mHandlerCallback = new HandlerCaller.Callback() {
-
-        @Override
-        public void executeMessage(Message msg) {
-            switch (msg.what) {
-                case MSG_UNBIND: {
-                    synchronized (mLock) {
-                        removeCachedServiceLocked(msg.arg1);
-                    }
-                    return;
-                } case MSG_REQUEST_AUTO_FILL_FOR_USER: {
-                    handleAutoFillForUser(msg.arg1);
-                    return;
-                } case MSG_REQUEST_SAVE_FOR_USER: {
-                    handleSaveForUser(msg.arg1);
-                    return;
-                } case MSG_REQUEST_AUTO_FILL: {
-                    final SomeArgs args = (SomeArgs) msg.obj;
-                    try {
-                        final int userId = msg.arg1;
-                        final int flags = msg.arg2;
-                        final IBinder activityToken = (IBinder) args.arg1;
-                        final AutoFillId autoFillId = (AutoFillId) args.arg2;
-                        final Rect bounds = (Rect) args.arg3;
-                        handleAutoFill(activityToken, userId, autoFillId, bounds, flags);
-                    } finally {
-                        args.recycle();
-                    }
-                    return;
-                } case MSG_ON_VALUE_CHANGED: {
-                    final SomeArgs args = (SomeArgs) msg.obj;
-                    try {
-                        final int userId = msg.arg1;
-                        final IBinder activityToken = (IBinder) args.arg1;
-                        final AutoFillId autoFillId = (AutoFillId) args.arg2;
-                        final AutoFillValue newValue = (AutoFillValue) args.arg3;
-                        handleValueChanged(activityToken, userId, autoFillId, newValue);
-                    } finally {
-                        args.recycle();
-                    }
-                    return;
-                } default: {
-                    Slog.w(TAG, "Invalid message: " + msg);
-                }
-            }
-        }
-    };
-
-    private HandlerCaller mHandlerCaller;
-
     /**
      * Cache of {@link AutoFillManagerServiceImpl} per user id.
      * <p>
@@ -148,31 +92,41 @@
      * Entries on this cache are added on demand and removed when:
      * <ol>
      *   <li>An auto-fill service app is removed.
-     *   <li>The {@link android.provider.Settings.Secure#AUTO_FILL_SERVICE} for an user change.
-     *   <li>It has not been interacted with for {@link #SERVICE_BINDING_LIFETIME_MS} ms.
+     *   <li>The {@link android.provider.Settings.Secure#AUTO_FILL_SERVICE} for an user change.\
      * </ol>
      */
+    // TODO(b/33197203): Update the above comment
     @GuardedBy("mLock")
     private SparseArray<AutoFillManagerServiceImpl> mServicesCache = new SparseArray<>();
 
     // TODO(b/33197203): set a different max (or disable it) on low-memory devices.
     private final LocalLog mRequestsHistory = new LocalLog(100);
 
+    private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            if (Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(intent.getAction())) {
+                final String reason = intent.getStringExtra("reason");
+                if (DEBUG) Slog.d(TAG, "close system dialogs: " + reason);
+                mUi.hideAll();
+            }
+        }
+    };
+
     public AutoFillManagerService(Context context) {
         super(context);
-
-        mHandlerCaller = new HandlerCaller(null, Looper.getMainLooper(), mHandlerCallback, true);
-
         mContext = context;
+        mUi = new AutoFillUI(mContext);
 
-        mResolver = context.getContentResolver();
-        mServiceStub = new AutoFillManagerServiceStub();
+        IntentFilter filter = new IntentFilter();
+        filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
+        mContext.registerReceiver(mBroadcastReceiver, filter, null,
+                FgThread.getHandler());
     }
 
     @Override
     public void onStart() {
-        if (DEBUG) Slog.d(TAG, "onStart(): binding as " + AUTO_FILL_MANAGER_SERVICE);
-        publishBinderService(AUTO_FILL_MANAGER_SERVICE, mServiceStub);
+        publishBinderService(AUTO_FILL_MANAGER_SERVICE, new AutoFillManagerServiceStub());
     }
 
     @Override
@@ -182,101 +136,110 @@
         }
     }
 
-    private AutoFillManagerServiceImpl newServiceForUser(int userId) {
-        ComponentName serviceComponent = null;
-        ServiceInfo serviceInfo = null;
-        final String componentName = Settings.Secure.getStringForUser(
-                mResolver, Settings.Secure.AUTO_FILL_SERVICE, userId);
-        if (!TextUtils.isEmpty(componentName)) {
-            try {
-                serviceComponent = ComponentName.unflattenFromString(componentName);
-                serviceInfo = AppGlobals.getPackageManager().getServiceInfo(serviceComponent, 0,
-                        userId);
-            } catch (RuntimeException | RemoteException e) {
-                Slog.wtf(TAG, "Bad auto-fill service name " + componentName, e);
-                return null;
-            }
+    @Override
+    public void onUnlockUser(int userId) {
+        synchronized (mLock) {
+            updateCachedServiceLocked(userId);
         }
+    }
 
-        if (DEBUG) {
-            Slog.d(TAG, "getServiceComponentForUser(" + userId + "): component="
-                    + serviceComponent + ", info: " + serviceInfo);
+    @Override
+    public void onStopUser(int userId) {
+        synchronized (mLock) {
+            removeCachedServiceLocked(userId);
         }
-        if (serviceInfo == null) {
-            if (DEBUG) Slog.d(TAG, "no service info for " + serviceComponent);
-            return null;
-        }
-        return new AutoFillManagerServiceImpl(this, mContext, mLock, mRequestsHistory,
-                userId, serviceInfo.applicationInfo.uid, serviceComponent,
-                SERVICE_BINDING_LIFETIME_MS);
     }
 
     /**
      * Gets the service instance for an user.
-     * <p>
-     * First it tries to return the existing instance from the cache; if it's not cached, it creates
-     * a new instance and caches it.
+     *
+     * @return service instance.
      */
-    // TODO(b/33197203): make private once AutoFillUi does not uses notifications
-    AutoFillManagerServiceImpl getServiceForUserLocked(int userId) {
+    @NonNull AutoFillManagerServiceImpl getServiceForUserLocked(int userId) {
         AutoFillManagerServiceImpl service = mServicesCache.get(userId);
-        if (service != null) {
-            if (DEBUG)
-                Log.d(TAG, "reusing cached service for userId " + userId);
-            service.setLifeExpectancy(SERVICE_BINDING_LIFETIME_MS);
-        } else {
-            service = newServiceForUser(userId);
-            if (service == null) {
-                // Already logged
-                return null;
-            }
-            if (DEBUG) Log.d(TAG, "creating new cached service for userId " + userId);
-            service.startLocked();
+        if (service == null) {
+            service = new AutoFillManagerServiceImpl(mContext, mLock,
+                    mRequestsHistory, userId, mUi);
             mServicesCache.put(userId, service);
         }
-        // Keep service connection alive for a while, in case user needs to interact with it
-        // (for example, to save the data that was inputted in)
-        if (mHandlerCaller.hasMessages(MSG_UNBIND)) {
-            mHandlerCaller.removeMessages(MSG_UNBIND);
-        }
-        mHandlerCaller.sendMessageDelayed(mHandlerCaller.obtainMessageI(MSG_UNBIND, userId),
-                SERVICE_BINDING_LIFETIME_MS);
         return service;
     }
 
+    // Called by Shell command.
+    void requestSaveForUser(int userId) {
+        Slog.i(TAG, "requestSaveForUser(): " + userId);
+        mContext.enforceCallingPermission(MANAGE_AUTO_FILL, TAG);
+        final IBinder activityToken = getTopActivityForUser();
+        if (activityToken != null) {
+            synchronized (mLock) {
+                final AutoFillManagerServiceImpl service = mServicesCache.get(userId);
+                if (service == null) {
+                    Log.w(TAG, "handleSaveForUser(): no cached service for userId " + userId);
+                    return;
+                }
+
+                service.requestSaveForUserLocked(activityToken);
+            }
+        }
+    }
+
+    // Called by Shell command.
+    void listSessions(int userId, IResultReceiver receiver) {
+        Slog.i(TAG, "listSessions() for userId " + userId);
+        mContext.enforceCallingPermission(MANAGE_AUTO_FILL, TAG);
+        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...
+        }
+    }
+
+    // Called by Shell command.
+    void reset() {
+        Slog.i(TAG, "reset()");
+        mContext.enforceCallingPermission(MANAGE_AUTO_FILL, TAG);
+        synchronized (mLock) {
+            final int size = mServicesCache.size();
+            for (int i = 0; i < size; i++) {
+                mServicesCache.valueAt(i).destroyLocked();
+            }
+            mServicesCache.clear();
+        }
+    }
+
     /**
      * Removes a cached service for a given user.
      */
-    void removeCachedServiceLocked(int userId) {
-        if (DEBUG) Log.d(TAG, "removing cached service for userId " + userId);
+    private void removeCachedServiceLocked(int userId) {
         final AutoFillManagerServiceImpl service = mServicesCache.get(userId);
-        if (service == null) {
-            if (DEBUG) {
-                Log.d(TAG, "removeCachedServiceForUser(): no cached service for userId " + userId);
-            }
-            return;
-        }
-        mServicesCache.delete(userId);
-        service.stopLocked();
-    }
-
-    private void handleAutoFill(IBinder activityToken, int userId, AutoFillId autoFillId,
-            Rect bounds, int flags) {
-        synchronized (mLock) {
-            final AutoFillManagerServiceImpl service = getServiceForUserLocked(userId);
-            if (service != null) {
-                service.requestAutoFillLocked(activityToken, autoFillId, bounds, flags);
-            }
+        if (service != null) {
+            mServicesCache.delete(userId);
+            service.destroyLocked();
         }
     }
 
-    private void handleValueChanged(IBinder activityToken, int userId, AutoFillId autoFillId,
-            AutoFillValue newValue) {
-        synchronized (mLock) {
-            final AutoFillManagerServiceImpl service = getServiceForUserLocked(userId);
-            if (service != null) {
-                service.onValueChangeLocked(activityToken, autoFillId, newValue);
-            }
+    /**
+     * Updates a cached service for a given user.
+     */
+    private void updateCachedServiceLocked(int userId) {
+        AutoFillManagerServiceImpl service = mServicesCache.get(userId);
+        if (service != null) {
+            service.updateLocked();
         }
     }
 
@@ -291,97 +254,65 @@
         return topActivities.get(0);
     }
 
-    private void handleAutoFillForUser(int userId) {
-        if (DEBUG) Slog.d(TAG, "handler.requestAutoFillForUser(): id=" + userId);
-        final IBinder activityToken = getTopActivityForUser();
-        if (activityToken == null) {
-            return;
-        }
-
-        synchronized (mLock) {
-            final AutoFillManagerServiceImpl service = getServiceForUserLocked(userId);
-            if (service == null) {
-                Slog.w(TAG, "no service for user " + userId);
-                return;
-            }
-            service.requestAutoFillLocked(activityToken, null, null, 0);
-        }
-    }
-
-    private void handleSaveForUser(int userId) {
-        if (DEBUG) Slog.d(TAG, "handler.handleSaveForUser(): id=" + userId);
-        final IBinder activityToken = getTopActivityForUser();
-        if (activityToken == null) {
-            return;
-        }
-
-        synchronized (mLock) {
-            final AutoFillManagerServiceImpl service = getServiceForUserLocked(userId);
-            if (service == null) {
-                Slog.w(TAG, "no service for user " + userId);
-                return;
-            }
-            service.requestSaveForUserLocked(activityToken);
-        }
-    }
-
-    private IBinder getTopActivity() {
-        final int uid = Binder.getCallingUid();
-        final IBinder activityToken = LocalServices.getService(ActivityManagerInternal.class)
-                .getTopVisibleActivity(uid);
-        if (activityToken == null) {
-            // Make sure its called by the top activity.
-            if (uid == Process.SYSTEM_UID) {
-                // TODO(b/33197203, b/34819567, b/34171325): figure out proper way to handle it
-                if (DEBUG) Log.w(TAG, "requestAutoFill(): ignoring call from system");
-
-                return null;
-            }
-            throw new SecurityException("uid " + uid + " does not own the top activity");
-        }
-
-        return activityToken;
-    }
-
-    final class AutoFillManagerServiceStub extends IAutoFillManagerService.Stub {
-
+    final class AutoFillManagerServiceStub extends IAutoFillManager.Stub {
         @Override
-        public void requestAutoFill(AutoFillId id, Rect bounds, int flags) {
-            if (DEBUG) Slog.d(TAG, "requestAutoFill: flags=" + flags + ", autoFillId=" + id
-                    + ", bounds=" + bounds);
-
-            final IBinder activityToken = getTopActivity();
-            if (activityToken != null) {
-                mHandlerCaller.sendMessage(mHandlerCaller.obtainMessageIIOOO(MSG_REQUEST_AUTO_FILL,
-                        UserHandle.getCallingUserId(), flags, activityToken, id, bounds));
+        public boolean addClient(IAutoFillManagerClient client, int userId) {
+            synchronized (mLock) {
+                return getServiceForUserLocked(userId).addClientLocked(client);
             }
         }
 
         @Override
-        public void requestAutoFillForUser(int userId) {
-            mContext.enforceCallingPermission(MANAGE_AUTO_FILL, TAG);
-
-            mHandlerCaller.sendMessage(
-                    mHandlerCaller.obtainMessageI(MSG_REQUEST_AUTO_FILL_FOR_USER, userId));
+        public void setAuthenticationResult(Bundle data, IBinder activityToken, int userId) {
+            synchronized (mLock) {
+                final AutoFillManagerServiceImpl service = getServiceForUserLocked(userId);
+                service.setAuthenticationResultLocked(data, activityToken);
+            }
         }
 
         @Override
-        public void requestSaveForUser(int userId) {
-            mContext.enforceCallingPermission(MANAGE_AUTO_FILL, TAG);
+        public void startSession(IBinder activityToken, IBinder appCallback, AutoFillId autoFillId,
+                Rect bounds, AutoFillValue value, int userId) {
+            // TODO(b/33197203): make sure it's called by resumed / focused activity
 
-            mHandlerCaller.sendMessage(
-                    mHandlerCaller.obtainMessageI(MSG_REQUEST_SAVE_FOR_USER, userId));
+            if (VERBOSE) {
+                Slog.v(TAG, "startSession: autoFillId=" + autoFillId + ", bounds=" + bounds
+                        + ", value=" + value);
+            }
+
+            synchronized (mLock) {
+                final AutoFillManagerServiceImpl service = getServiceForUserLocked(userId);
+                service.startSessionLocked(activityToken, appCallback, autoFillId, bounds, value);
+            }
         }
 
         @Override
-        public void onValueChanged(AutoFillId id, AutoFillValue value) {
-            if (DEBUG) Slog.d(TAG, "onValueChanged(): id=" + id + ", value=" + value);
+        public void updateSession(IBinder activityToken, AutoFillId id, Rect bounds,
+                AutoFillValue value, int flags, int userId) {
+            if (DEBUG) {
+                Slog.d(TAG, "updateSession: flags=" + flags + ", autoFillId=" + id
+                        + ", bounds=" + bounds + ", value=" + value);
+            }
 
-            final IBinder activityToken = getTopActivity();
+            synchronized (mLock) {
+                final AutoFillManagerServiceImpl service = mServicesCache.get(
+                        UserHandle.getCallingUserId());
+                if (service != null) {
+                    service.updateSessionLocked(activityToken, id, bounds, value, flags);
+                }
+            }
+        }
 
-            if (activityToken != null) {
-                mHandlerCaller.sendMessage(mHandlerCaller.obtainMessageIOOO(MSG_ON_VALUE_CHANGED,
-                        UserHandle.getCallingUserId(), activityToken, id, value));
+        @Override
+        public void finishSession(IBinder activityToken, int userId) {
+            if (VERBOSE) Slog.v(TAG, "finishSession(): " + activityToken);
+
+            synchronized (mLock) {
+                final AutoFillManagerServiceImpl service = mServicesCache.get(
+                        UserHandle.getCallingUserId());
+                if (service != null) {
+                    service.finishSessionLocked(activityToken);
+                }
             }
         }
 
@@ -407,6 +338,7 @@
                         impl.dumpLocked("  ", pw);
                     }
                 }
+                mUi.dump(pw);
             }
             pw.println("Requests history:");
             mRequestsHistory.reverseDump(fd, pw, args);
@@ -415,7 +347,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);
         }
     }
@@ -430,9 +362,8 @@
 
         @Override
         public void onChange(boolean selfChange, Uri uri, int userId) {
-            if (DEBUG) Slog.d(TAG, "settings (" + uri + " changed for " + userId);
             synchronized (mLock) {
-                removeCachedServiceLocked(userId);
+                updateCachedServiceLocked(userId);
             }
         }
     }
diff --git a/services/autofill/java/com/android/server/autofill/AutoFillManagerServiceImpl.java b/services/autofill/java/com/android/server/autofill/AutoFillManagerServiceImpl.java
index 42e4fd3..a697a8e 100644
--- a/services/autofill/java/com/android/server/autofill/AutoFillManagerServiceImpl.java
+++ b/services/autofill/java/com/android/server/autofill/AutoFillManagerServiceImpl.java
@@ -16,69 +16,63 @@
 
 package com.android.server.autofill;
 
-import static android.service.autofill.AutoFillService.FLAG_AUTHENTICATION_ERROR;
-import static android.service.autofill.AutoFillService.FLAG_AUTHENTICATION_REQUESTED;
-import static android.service.autofill.AutoFillService.FLAG_AUTHENTICATION_SUCCESS;
-import static android.view.autofill.AutoFillManager.FLAG_UPDATE_UI_SHOW;
-import static android.view.autofill.AutoFillManager.FLAG_UPDATE_UI_HIDE;
+import static android.service.autofill.AutoFillService.EXTRA_ACTIVITY_TOKEN;
+import static android.service.voice.VoiceInteractionSession.KEY_RECEIVER_EXTRAS;
+import static android.service.voice.VoiceInteractionSession.KEY_STRUCTURE;
+import static android.view.autofill.AutoFillManager.FLAG_FOCUS_GAINED;
+import static android.view.autofill.AutoFillManager.FLAG_FOCUS_LOST;
+import static android.view.autofill.AutoFillManager.FLAG_START_SESSION;
+import static android.view.autofill.AutoFillManager.FLAG_VALUE_CHANGED;
 
 import static com.android.server.autofill.Helper.DEBUG;
 import static com.android.server.autofill.Helper.VERBOSE;
-import static com.android.server.autofill.Helper.bundleToString;
+import static com.android.server.autofill.Helper.findValue;
 
 import android.annotation.Nullable;
 import android.app.Activity;
 import android.app.ActivityManager;
-import android.app.IActivityManager;
+import android.app.AppGlobals;
 import android.app.assist.AssistStructure;
 import android.app.assist.AssistStructure.ViewNode;
 import android.app.assist.AssistStructure.WindowNode;
-import android.content.BroadcastReceiver;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.ServiceConnection;
+import android.content.IntentSender;
+import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageManager;
+import android.content.pm.ServiceInfo;
 import android.graphics.Rect;
-import android.hardware.fingerprint.Fingerprint;
-import android.hardware.fingerprint.IFingerprintService;
-import android.hardware.fingerprint.IFingerprintServiceReceiver;
 import android.os.Binder;
 import android.os.Bundle;
-import android.os.DeadObjectException;
 import android.os.IBinder;
+import android.os.Looper;
+import android.os.Parcelable;
+import android.os.RemoteCallbackList;
 import android.os.RemoteException;
-import android.os.ServiceManager;
-import android.os.SystemClock;
-import android.os.UserHandle;
+import android.provider.Settings;
 import android.service.autofill.AutoFillService;
 import android.service.autofill.AutoFillServiceInfo;
-import android.service.autofill.IAutoFillAppCallback;
-import android.service.autofill.IAutoFillServerCallback;
+import android.service.autofill.Dataset;
+import android.service.autofill.FillResponse;
 import android.service.autofill.IAutoFillService;
-import android.service.voice.VoiceInteractionSession;
+import android.text.TextUtils;
 import android.util.ArrayMap;
+import android.util.ArraySet;
 import android.util.LocalLog;
-import android.util.Log;
 import android.util.PrintWriterPrinter;
 import android.util.Slog;
-import android.util.SparseArray;
-import android.util.TimeUtils;
 import android.view.autofill.AutoFillId;
+import android.view.autofill.AutoFillManager;
 import android.view.autofill.AutoFillValue;
-import android.view.autofill.Dataset;
-import android.view.autofill.FillResponse;
 
+import android.view.autofill.IAutoFillManagerClient;
 import com.android.internal.annotations.GuardedBy;
+import com.android.internal.os.HandlerCaller;
 import com.android.internal.os.IResultReceiver;
-import com.android.server.FgThread;
 
 import java.io.PrintWriter;
-import java.lang.ref.WeakReference;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
+import java.util.ArrayList;
 import java.util.Map;
 import java.util.Map.Entry;
 
@@ -91,52 +85,33 @@
 
     private static final String TAG = "AutoFillManagerServiceImpl";
 
-    /** Used do assign ids to new ServerCallback instances. */
-    private static int sSessionIdCounter = 0;
+    private static final int MSG_SERVICE_SAVE = 1;
 
     private final int mUserId;
-    private final int mUid;
-    private final ComponentName mComponent;
-    private final String mComponentName;
     private final Context mContext;
-    private final IActivityManager mAm;
     private final Object mLock;
-    private final AutoFillServiceInfo mInfo;
-    private final AutoFillManagerService mManagerService;
+    private final AutoFillUI mUi;
 
-    // Token used for fingerprint authentication
-    // TODO(b/33197203): create on demand?
-    private final IBinder mAuthToken = new Binder();
-
-    private final IFingerprintService mFingerprintService =
-            IFingerprintService.Stub.asInterface(ServiceManager.getService("fingerprint"));
-
-    @GuardedBy("mLock")
-    private final List<QueuedRequest> mQueuedRequests = new LinkedList<>();
+    private RemoteCallbackList<IAutoFillManagerClient> mClients;
+    private AutoFillServiceInfo mInfo;
 
     private final LocalLog mRequestsHistory;
 
-    private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            if (Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(intent.getAction())) {
-                final String reason = intent.getStringExtra("reason");
-                if (DEBUG) Slog.d(TAG, "close system dialogs: " + reason);
-
-                synchronized (mLock) {
-                    final int size = mSessions.size();
-                    for (int i = 0; i < size; i++) {
-                        final Session session = mSessions.valueAt(i);
-                        // TODO(b/33197203): invalidate the sessions instead?
-                        session.mUi.closeAll();
-                    }
-                }
-            }
+    private final HandlerCaller.Callback mHandlerCallback = (msg) -> {
+        switch (msg.what) {
+            case MSG_SERVICE_SAVE:
+                handleSessionSave((IBinder) msg.obj);
+                break;
+            default:
+                Slog.d(TAG, "invalid msg: " + msg);
         }
     };
 
+    private final HandlerCaller mHandlerCaller = new HandlerCaller(null, Looper.getMainLooper(),
+            mHandlerCallback, true);
+
     /**
-     * Cache of pending {@link Session}s, keyed by {@link Session#mId}.
+     * Cache of pending {@link Session}s, keyed by {@code activityToken}.
      *
      * <p>They're kept until the {@link AutoFillService} finished handling a request, an error
      * occurs, or the session times out.
@@ -144,237 +119,198 @@
     // TODO(b/33197203): need to make sure service is bound while callback is pending and/or
     // use WeakReference
     @GuardedBy("mLock")
-    private static final SparseArray<Session> mSessions = new SparseArray<>();
-
-    private final ServiceConnection mConnection = new ServiceConnection() {
-        @Override
-        public void onServiceConnected(ComponentName name, IBinder service) {
-            if (DEBUG) Slog.d(TAG, "onServiceConnected():" + name);
-            synchronized (mLock) {
-                mService = IAutoFillService.Stub.asInterface(service);
-                try {
-                    mService.onConnected();
-                } catch (RemoteException e) {
-                    Slog.w(TAG, "Exception on service.onConnected(): " + e);
-                    return;
-                }
-                if (!mQueuedRequests.isEmpty()) {
-                    if (DEBUG) Slog.d(TAG, "queued requests:" + mQueuedRequests.size());
-                }
-                for (final QueuedRequest request: mQueuedRequests) {
-                    requestAutoFillLocked(request.activityToken, request.autoFillId,
-                            request.bounds, request.flags, false);
-                }
-                mQueuedRequests.clear();
-            }
-        }
-
-        @Override
-        public void onServiceDisconnected(ComponentName name) {
-            if (DEBUG) Slog.d(TAG, name + " disconnected");
-            synchronized (mLock) {
-                mService = null;
-                mManagerService.removeCachedServiceLocked(mUserId);
-            }
-        }
-    };
+    private final ArrayMap<IBinder, Session> mSessions = new ArrayMap<>();
 
     /**
-     * Receiver of assist data from the app's {@link Activity}, uses the {@code resultData} as
-     * the {@link Session#mId}.
+     * Receiver of assist data from the app's {@link Activity}.
      */
     private final IResultReceiver mAssistReceiver = new IResultReceiver.Stub() {
         @Override
         public void send(int resultCode, Bundle resultData) throws RemoteException {
             if (DEBUG) Slog.d(TAG, "resultCode on mAssistReceiver: " + resultCode);
 
-            final IBinder appBinder = resultData.getBinder(AutoFillService.KEY_CALLBACK);
-            if (appBinder == null) {
-                Slog.w(TAG, "no app callback on mAssistReceiver's resultData");
+            final AssistStructure structure = resultData.getParcelable(KEY_STRUCTURE);
+            if (structure == null) {
+                Slog.w(TAG, "no assist structure for id " + resultCode);
                 return;
             }
-            final AssistStructure structure = resultData
-                    .getParcelable(VoiceInteractionSession.KEY_STRUCTURE);
 
+            final Bundle receiverExtras = resultData.getBundle(KEY_RECEIVER_EXTRAS);
+            if (receiverExtras == null) {
+                // Should not happen
+                Slog.wtf(TAG, "No " + KEY_RECEIVER_EXTRAS + " on receiver");
+                return;
+            }
+
+            final IBinder activityToken = receiverExtras.getBinder(EXTRA_ACTIVITY_TOKEN);
             final Session session;
             synchronized (mLock) {
-                session = mSessions.get(resultCode);
+                session = mSessions.get(activityToken);
                 if (session == null) {
-                    Slog.w(TAG, "no server callback for id " + resultCode);
+                    Slog.w(TAG, "no server session for activityToken " + activityToken);
                     return;
                 }
-                session.setAppCallbackLocked(appBinder);
                 // TODO(b/33197203): since service is fetching the data (to use for save later),
                 // we should optimize what's sent (for example, remove layout containers,
                 // color / font info, etc...)
                 session.mStructure = structure;
-
-                // TODO(b/33197203, b/33269702): Must fetch the data so it's available later on
-                // handleSave(), even if if the activity is gone by then, but structure.ensureData()
-                // gives a ONE_WAY warning because system_service could block on app calls.
-                // We need to change AssistStructure so it provides a "one-way" writeToParcel()
-                // method that sends all the data
-                structure.ensureData();
-
-                structure.sanitizeForParceling(true);
-                if (VERBOSE) {
-                    Slog.v(TAG, "Dumping " + structure + " before calling service.autoFill()");
-                    structure.dump();
-                }
-                mService.autoFill(structure, session.mServerCallback);
             }
+
+
+            // TODO(b/33197203, b/33269702): Must fetch the data so it's available later on
+            // handleSave(), even if if the activity is gone by then, but structure.ensureData()
+            // gives a ONE_WAY warning because system_service could block on app calls.
+            // We need to change AssistStructure so it provides a "one-way" writeToParcel()
+            // method that sends all the data
+            structure.ensureData();
+
+            // Sanitize structure before it's sent to service.
+            structure.sanitizeForParceling(true);
+
+            // TODO(b/33197203): Need to pipe the bundle
+            session.mRemoteFillService.onFillRequest(structure, null);
         }
     };
 
-    @GuardedBy("mLock")
-    private IAutoFillService mService;
-    @GuardedBy("mLock")
-    private boolean mBound;
-    @GuardedBy("mLock")
-    private boolean mValid;
-
-    // Estimated time when the service will be evicted from the cache.
-    long mEstimateTimeOfDeath;
-
-    AutoFillManagerServiceImpl(AutoFillManagerService managerService, Context context, Object lock,
-            LocalLog requestsHistory, int userId, int uid, ComponentName component, long ttl) {
-        mManagerService = managerService;
+    AutoFillManagerServiceImpl(Context context, Object lock, LocalLog requestsHistory,
+            int userId, AutoFillUI ui) {
         mContext = context;
         mLock = lock;
         mRequestsHistory = requestsHistory;
         mUserId = userId;
-        mUid = uid;
-        mComponent = component;
-        mComponentName = mComponent.flattenToShortString();
-        mAm = ActivityManager.getService();
-        setLifeExpectancy(ttl);
+        mUi = ui;
+        updateLocked();
+    }
 
-        final AutoFillServiceInfo info;
+    CharSequence getServiceName() {
+        if (mInfo == null) {
+            return null;
+        }
+        final ComponentName serviceComponent = mInfo.getServiceInfo().getComponentName();
+        final String packageName = serviceComponent.getPackageName();
+
         try {
-            info = new AutoFillServiceInfo(context.getPackageManager(), component, mUserId);
+            final PackageManager pm = mContext.getPackageManager();
+            final ApplicationInfo info = pm.getApplicationInfo(packageName, 0);
+            return pm.getApplicationLabel(info);
+        } catch (Exception e) {
+            Slog.w(TAG, "Could not get label for " + packageName + ": " + e);
+            return packageName;
+        }
+    }
+
+    void updateLocked() {
+        ComponentName serviceComponent = null;
+        ServiceInfo serviceInfo = null;
+        final String componentName = Settings.Secure.getStringForUser(
+                mContext.getContentResolver(), Settings.Secure.AUTO_FILL_SERVICE, mUserId);
+        if (!TextUtils.isEmpty(componentName)) {
+            try {
+                serviceComponent = ComponentName.unflattenFromString(componentName);
+                serviceInfo = AppGlobals.getPackageManager().getServiceInfo(serviceComponent,
+                        0, mUserId);
+            } catch (RuntimeException | RemoteException e) {
+                Slog.e(TAG, "Bad auto-fill service name " + componentName, e);
+                return;
+            }
+        }
+        try {
+            final boolean hadService = hasService();
+            if (serviceInfo != null) {
+                mInfo = new AutoFillServiceInfo(mContext.getPackageManager(),
+                        serviceComponent, mUserId);
+            } else {
+                mInfo = null;
+            }
+            if (hadService != hasService()) {
+                if (!hasService()) {
+                    final int sessionCount = mSessions.size();
+                    for (int i = sessionCount - 1; i >= 0; i--) {
+                        Session session = mSessions.valueAt(i);
+                        session.destroyLocked();
+                        mSessions.removeAt(i);
+                    }
+                }
+                sendStateToClients();
+            }
         } catch (PackageManager.NameNotFoundException e) {
-            Slog.w(TAG, "Auto-fill service not found: " + component, e);
-            mInfo = null;
-            mValid = false;
-            return;
+            Slog.e(TAG, "Bad auto-fill service name " + componentName, e);
         }
-        mInfo = info;
-        if (mInfo.getParseError() != null) {
-            Slog.w(TAG, "Bad auto-fill service: " + mInfo.getParseError());
-            mValid = false;
-            return;
-        }
-
-        mValid = true;
-        IntentFilter filter = new IntentFilter();
-        filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
-        mContext.registerReceiver(mBroadcastReceiver, filter, null, FgThread.getHandler());
-    }
-
-    void setLifeExpectancy(long ttl) {
-        mEstimateTimeOfDeath = SystemClock.uptimeMillis() + ttl;
-    }
-
-    void startLocked() {
-        if (DEBUG) Slog.d(TAG, "startLocked()");
-
-        final Intent intent = new Intent(AutoFillService.SERVICE_INTERFACE);
-        intent.setComponent(mComponent);
-        mBound = mContext.bindServiceAsUser(intent, mConnection,
-                Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE, new UserHandle(mUserId));
-
-        if (!mBound) {
-            Slog.w(TAG, "Failed binding to auto-fill service " + mComponent);
-            return;
-        }
-        if (DEBUG) Slog.d(TAG, "Bound to " + mComponent);
-    }
-
-    /**
-     * Asks service to auto-fill an activity.
-     *
-     * @param activityToken activity token.
-     * @param autoFillId id of the view that requested auto-fill.
-     * @param bounds boundaries of the view that requested auto-fill.
-     * @param flags optional flags.
-     */
-    void requestAutoFillLocked(IBinder activityToken, @Nullable AutoFillId autoFillId,
-            @Nullable Rect bounds, int flags) {
-        if (!mBound) {
-            Slog.w(TAG, "requestAutoFillLocked() failed because it's not bound to service");
-            return;
-        }
-
-        requestAutoFillLocked(activityToken, autoFillId, bounds, flags, true);
     }
 
     /**
      * Used by {@link AutoFillManagerServiceShellCommand} to request save for the current top app.
      */
     void requestSaveForUserLocked(IBinder activityToken) {
-        if (!mBound) {
-            Slog.w(TAG, "requestSaveForUserLocked() failed because it's not bound to service");
+        if (!hasService()) {
             return;
         }
-        if (mService == null) {
-            Slog.w(TAG, "requestSaveForUserLocked: service not set");
-            return;
-        }
-
-        final Session session = getSessionByTokenLocked(activityToken);
+        final Session session = mSessions.get(activityToken);
         if (session == null) {
             Slog.w(TAG, "requestSaveForUserLocked(): no session for " + activityToken);
             return;
         }
 
-        session.onSaveLocked();
+        session.callSaveLocked();
     }
 
-    private void requestAutoFillLocked(IBinder activityToken, @Nullable AutoFillId autoFillId,
-            @Nullable Rect bounds, int flags, boolean queueIfNecessary) {
-        if (mService == null) {
-            if (!queueIfNecessary) {
-                Slog.w(TAG, "requestAutoFillLocked(): service is null");
-                return;
-            }
-            if (DEBUG) Slog.d(TAG, "requestAutoFillLocked(): service not set yet, queuing it");
-            mQueuedRequests.add(new QueuedRequest(activityToken, autoFillId, bounds, flags));
+    boolean addClientLocked(IAutoFillManagerClient client) {
+        if (mClients == null) {
+            mClients = new RemoteCallbackList<>();
+        }
+        mClients.register(client);
+        return hasService();
+    }
+
+    void setAuthenticationResultLocked(Bundle data, IBinder activityToken) {
+        if (!hasService()) {
+            return;
+        }
+        final Session session = mSessions.get(activityToken);
+        if (session != null) {
+            session.setAuthenticationResultLocked(data);
+        }
+    }
+
+    void startSessionLocked(IBinder activityToken, IBinder appCallbackToken, AutoFillId autoFillId,
+            Rect bounds, AutoFillValue value) {
+        if (!hasService()) {
             return;
         }
 
-        final String historyItem = "s=" + mComponentName + " u=" + mUserId + " f=" + flags
-                + " a=" + activityToken + " i=" + autoFillId + " b=" + bounds;
+        final String historyItem = "s=" + new ComponentName(mInfo.getServiceInfo().packageName,
+                mInfo.getServiceInfo().name) + " u=" + mUserId + " a=" + activityToken
+                + " i=" + autoFillId + " b=" + bounds + " v=" + value;
         mRequestsHistory.log(historyItem);
 
         // TODO(b/33197203): Handle partitioning
-        Session session = getSessionByTokenLocked(activityToken);
+        final Session session = mSessions.get(activityToken);
+        if (session != null) {
+            // Already started...
+            return;
+        }
 
+        final Session newSession = createSessionByTokenLocked(activityToken, appCallbackToken);
+        newSession.updateLocked(autoFillId, bounds, value, FLAG_START_SESSION);
+    }
+
+    void finishSessionLocked(IBinder activityToken) {
+        if (!hasService()) {
+            return;
+        }
+
+        final Session session = mSessions.get(activityToken);
         if (session == null) {
-            session = createSessionByTokenLocked(activityToken);
-        } else {
-            if (DEBUG) Slog.d(TAG, "reusing session for " + activityToken + ": " + session.mId);
+            Slog.w(TAG, "finishSessionLocked(): no session for " + activityToken);
+            return;
         }
 
-        session.updateAutoFillInput(flags, autoFillId, null, bounds);
+        session.showSaveLocked();
     }
 
-    private Session getSessionByTokenLocked(IBinder activityToken) {
-        final int size = mSessions.size();
-        for (int i = 0; i < size; i++) {
-            final Session session = mSessions.valueAt(i);
-            if (activityToken.equals(session.mActivityToken.get())) {
-                return session;
-            }
-        }
-        return null;
-    }
-
-    private Session createSessionByTokenLocked(IBinder activityToken) {
-        final int sessionId = ++sSessionIdCounter;
-        if (DEBUG) Slog.d(TAG, "creating session for " + activityToken + ": " + sessionId);
-
-        final Session newSession = new Session(sessionId, activityToken);
-        mSessions.put(sessionId, newSession);
+    private Session createSessionByTokenLocked(IBinder activityToken, IBinder appCallbackToken) {
+        final Session newSession = new Session(mContext, activityToken, appCallbackToken);
+        mSessions.put(activityToken, newSession);
 
         /*
          * TODO(b/33197203): apply security checks below:
@@ -385,10 +321,18 @@
          */
         try {
             // TODO(b/33197203): add MetricsLogger call
-            if (!mAm.requestAutoFillData(mAssistReceiver, null, sessionId, activityToken)) {
-                // TODO(b/33197203): might need a way to warn user (perhaps a new method on
-                // AutoFillService).
-                Slog.w(TAG, "failed to request auto-fill data for " + activityToken);
+            final Bundle receiverExtras = new Bundle();
+            receiverExtras.putBinder(EXTRA_ACTIVITY_TOKEN, activityToken);
+            final long identity = Binder.clearCallingIdentity();
+            try {
+                if (!ActivityManager.getService().requestAutoFillData(mAssistReceiver,
+                        receiverExtras, activityToken)) {
+                    // TODO(b/33197203): might need a way to warn user (perhaps a new method on
+                    // AutoFillService).
+                    Slog.w(TAG, "failed to request auto-fill data for " + activityToken);
+                }
+            } finally {
+                Binder.restoreCallingIdentity(identity);
             }
         } catch (RemoteException e) {
             // Should not happen, it's a local call.
@@ -396,94 +340,51 @@
         return newSession;
     }
 
-    /**
-     * Callback indicating the value of a field change in the app.
-     */
-    void onValueChangeLocked(IBinder activityToken, AutoFillId autoFillId, AutoFillValue newValue) {
+    void updateSessionLocked(IBinder activityToken, AutoFillId autoFillId, Rect bounds,
+            AutoFillValue value, int flags) {
         // TODO(b/33197203): add MetricsLogger call
-        final Session session = getSessionByTokenLocked(activityToken);
+        final Session session = mSessions.get(activityToken);
         if (session == null) {
-            Slog.w(TAG, "onValueChangeLocked(): session gone for " + activityToken);
+            Slog.w(TAG, "updateSessionLocked(): session gone for " + activityToken);
             return;
         }
 
-        session.updateValueLocked(autoFillId, newValue);
+        session.updateLocked(autoFillId, bounds, value, flags);
     }
 
-    void stopLocked() {
-        if (DEBUG) Slog.d(TAG, "stopLocked()");
+    private void handleSessionSave(IBinder activityToken) {
+        synchronized (mLock) {
+            final Session session = mSessions.get(activityToken);
+            if (session == null) {
+                Slog.w(TAG, "handleSessionSave(): already gone: " + activityToken);
 
-        // Sanity check.
-        if (mService == null) {
-            Slog.w(TAG, "service already null on shutdown");
-            return;
-        }
-        try {
-            mService.onDisconnected();
-        } catch (RemoteException e) {
-            if (! (e instanceof DeadObjectException)) {
-                Slog.w(TAG, "Exception calling service.onDisconnected(): " + e);
+                return;
             }
-        } finally {
-            mService = null;
-        }
-
-        if (mBound) {
-            mContext.unbindService(mConnection);
-            mBound = false;
-        }
-        if (mValid) {
-            mContext.unregisterReceiver(mBroadcastReceiver);
+            session.callSaveLocked();
         }
     }
 
-    void removeSessionLocked(int id) {
-        if (DEBUG) Slog.d(TAG, "Removing session " + id);
-        mSessions.remove(id);
+    void destroyLocked() {
+        if (VERBOSE) Slog.v(TAG, "destroyLocked()");
 
-        // TODO(b/33197203): notify mService so it can invalidate the FillCallback / SaveCallback
-        // and cached AssistStructures
+        for (Session session : mSessions.values()) {
+            session.destroyLocked();
+        }
+        mSessions.clear();
     }
 
     void dumpLocked(String prefix, PrintWriter pw) {
-        if (!mValid) {
-            pw.print("  NOT VALID: ");
-            if (mInfo == null) {
-                pw.println("no info");
-            } else {
-                pw.println(mInfo.getParseError());
-            }
-            return;
-        }
-
         final String prefix2 = prefix + "  ";
 
-        pw.print(prefix); pw.print("mUserId="); pw.println(mUserId);
-        pw.print(prefix); pw.print("mUid="); pw.println(mUid);
-        pw.print(prefix); pw.print("mComponent="); pw.println(mComponentName);
-        pw.print(prefix); pw.print("mService: "); pw.println(mService);
-        pw.print(prefix); pw.print("mBound="); pw.println(mBound);
-        pw.print(prefix); pw.print("mEstimateTimeOfDeath=");
-            TimeUtils.formatDuration(mEstimateTimeOfDeath, SystemClock.uptimeMillis(), pw);
-            pw.println();
-        pw.print(prefix); pw.print("mAuthToken: "); pw.println(mAuthToken);
+        pw.print(prefix); pw.println("Component:"); pw.println(mInfo != null
+                ? mInfo.getServiceInfo().getComponentName() : null);
 
-        if (DEBUG) {
+        if (VERBOSE) {
             // ServiceInfo dump is too noisy and redundant (it can be obtained through other dumps)
             pw.print(prefix); pw.println("ServiceInfo:");
             mInfo.getServiceInfo().dump(new PrintWriterPrinter(pw), prefix + prefix);
         }
 
-        if (mQueuedRequests.isEmpty()) {
-            pw.print(prefix); pw.println("No queued requests");
-        } else {
-            pw.print(prefix); pw.println("Queued requests:");
-            for (int i = 0; i < mQueuedRequests.size(); i++) {
-                pw.print(prefix2); pw.print(i); pw.print(": "); pw.println(mQueuedRequests.get(i));
-            }
-        }
-
-        pw.print(prefix); pw.print("sSessionIdCounter="); pw.println(sSessionIdCounter);
         final int size = mSessions.size();
         if (size == 0) {
             pw.print(prefix); pw.println("No sessions");
@@ -496,34 +397,48 @@
         }
     }
 
-    @Override
-    public String toString() {
-        return "AutoFillManagerServiceImpl: [userId=" + mUserId + ", uid=" + mUid
-                + ", component=" + mComponentName + "]";
+    void listSessionsLocked(ArrayList<String> output) {
+        for (IBinder activityToken : mSessions.keySet()) {
+            output.add((mInfo != null ? mInfo.getServiceInfo().getComponentName()
+                    : null) + ":" + activityToken);
+        }
     }
 
-    private static final class QueuedRequest {
-        final IBinder activityToken;
-        final AutoFillId autoFillId;
-        final Rect bounds;
-        final int flags;
-
-        QueuedRequest(IBinder activityToken, AutoFillId autoFillId, Rect bounds, int flags) {
-            this.activityToken = activityToken;
-            this.autoFillId = autoFillId;
-            this.bounds = bounds;
-            this.flags = flags;
+    private void sendStateToClients() {
+        final RemoteCallbackList<IAutoFillManagerClient> clients;
+        final int userClientCount;
+        synchronized (mLock) {
+            if (mClients == null) {
+                return;
+            }
+            clients = mClients;
+            userClientCount = clients.beginBroadcast();
         }
-
-        @Override
-        public String toString() {
-            if (!DEBUG) return super.toString();
-
-            return "QueuedRequest: [flags=" + flags + ", token=" + activityToken
-                    + ", id=" + autoFillId + ", bounds=" + bounds;
+        try {
+            for (int i = 0; i < userClientCount; i++) {
+                IAutoFillManagerClient client = clients.getBroadcastItem(i);
+                try {
+                    client.setState(hasService());
+                } catch (RemoteException re) {
+                    /* ignore */
+                }
+            }
+        } finally {
+            clients.finishBroadcast();
         }
     }
 
+    private boolean hasService() {
+        return mInfo != null;
+    }
+
+    @Override
+    public String toString() {
+        return "AutoFillManagerServiceImpl: [userId=" + mUserId
+                + ", component=" + (mInfo != null
+                ? mInfo.getServiceInfo().getComponentName() : null) + "]";
+    }
+
     /**
      * State for a given view with a AutoFillId.
      *
@@ -539,13 +454,23 @@
                     @Nullable AutoFillValue value);
         }
 
+        final AutoFillId mId;
         private final Listener mListener;
-        // // TODO(b/33197203): does it really need a reference to the session's response?
-        private FillResponse mResponse;
+        // TODO(b/33197203): would not need a reference to response and session if it was an inner
+        // class of Session...
+        private final Session mSession;
+        // TODO(b/33197203): encapsulate access so it's not called by UI
+        FillResponse mResponse;
+        Intent mAuthIntent;
+
         private AutoFillValue mAutoFillValue;
         private Rect mBounds;
 
-        ViewState(Listener listener) {
+        private boolean mValueUpdated;
+
+        ViewState(Session session, AutoFillId id, Listener listener) {
+            mSession = session;
+            mId = id;
             mListener = listener;
         }
 
@@ -553,15 +478,25 @@
          * Response should only be set once.
          */
         void setResponse(FillResponse response) {
-            if (mResponse != null) {
-                Slog.e(TAG, "ViewState response set more than once");
-                return;
-            }
             mResponse = response;
-
             maybeCallOnFillReady();
         }
 
+        /**
+         * Used when a {@link FillResponse} requires authentication to be unlocked.
+         */
+        void setResponse(FillResponse response, Intent authIntent) {
+            mAuthIntent = authIntent;
+            setResponse(response);
+        }
+
+        CharSequence getServiceName() {
+            return mSession.getServiceName();
+        }
+
+        // TODO(b/33197203): need to refactor / rename / document this method to make it clear that
+        // it can change  the value and update the UI; similarly, should replace code that
+        // directly sets mAutoFilLValue to use encapsulation.
         void update(@Nullable AutoFillValue autoFillValue, @Nullable Rect bounds) {
             if (autoFillValue != null) {
                 mAutoFillValue = autoFillValue;
@@ -587,8 +522,16 @@
         public String toString() {
             if (!DEBUG) return super.toString();
 
-            return "ViewState: [response=" + mResponse + ", value=" + mAutoFillValue
-                    + ", bounds=" + mBounds + "]";
+            return "ViewState: [id=" + mId + ", value=" + mAutoFillValue + ", bounds=" + mBounds
+                    + ", updated = " + mValueUpdated + "]";
+        }
+
+        void dump(String prefix, PrintWriter pw) {
+            pw.print(prefix); pw.print("id:" ); pw.println(mId);
+            pw.print(prefix); pw.print("value:" ); pw.println(mAutoFillValue);
+            pw.print(prefix); pw.print("updated:" ); pw.println(mValueUpdated);
+            pw.print(prefix); pw.print("bounds:" ); pw.println(mBounds);
+            pw.print(prefix); pw.print("authIntent:" ); pw.println(mAuthIntent);
         }
     }
 
@@ -608,280 +551,208 @@
     // - On all authentication scenarios.
     // - When user does not interact back after a while.
     // - When service is unbound.
-    final class Session implements ViewState.Listener {
-
-        private final AutoFillUI mUi;
-        private final WeakReference<IBinder> mActivityToken;
+    final class Session implements RemoteFillService.FillServiceCallbacks, ViewState.Listener,
+            AutoFillUI.AutoFillUiCallback {
+        private final IBinder mActivityToken;
 
         @GuardedBy("mLock")
         private final Map<AutoFillId, ViewState> mViewStates = new ArrayMap<>();
+
         @GuardedBy("mLock")
         @Nullable
         private ViewState mCurrentViewState;
 
-        private IAutoFillAppCallback mAppCallback;
+        private final IAutoFillManagerClient mClient;
+
+        @GuardedBy("mLock")
+        RemoteFillService mRemoteFillService;
 
         // TODO(b/33197203): Get a response per view instead of per activity.
         @GuardedBy("mLock")
         private FillResponse mCurrentResponse;
-        @GuardedBy("mLock")
-        private FillResponse mResponseRequiringAuth;
-        @GuardedBy("mLock")
-        private Dataset mDatasetRequiringAuth;
-
-        /**
-         * Used to auto-fill the activity directly when the FillCallback.onResponse() is called as
-         * the result of a successful user authentication on service's side.
-         */
-        @GuardedBy("mLock")
-        private boolean mAutoFillDirectly;
 
         /**
          * Used to remember which {@link Dataset} filled the session.
          */
+        // TODO(b/33197203): might need more than one once we support partitions
         @GuardedBy("mLock")
         private Dataset mAutoFilledDataset;
 
         /**
-         * Map of ids that must be updated so they're send to {@link #onSaveLocked()}.
-         */
-        @GuardedBy("mLock")
-        private Map<AutoFillId, AutoFillValue> mUpdatedValues;
-
-        /**
          * Assist structure sent by the app; it will be updated (sanitized, change values for save)
          * before sent to {@link AutoFillService}.
          */
+        @GuardedBy("mLock")
         private AssistStructure mStructure;
 
-        // TODO(b/33197203): use handler to handle results?
-        // TODO(b/33197203): handle all callback methods and/or cancelation?
-        private IFingerprintServiceReceiver mServiceReceiver =
-                new IFingerprintServiceReceiver.Stub() {
+        private Session(Context context, IBinder activityToken, IBinder client) {
+            mRemoteFillService = new RemoteFillService(context,
+                    mInfo.getServiceInfo().getComponentName(), mUserId, this);
+            mActivityToken = activityToken;
 
-            @Override
-            public void onEnrollResult(long deviceId, int fingerId, int groupId, int remaining) {
-                if (DEBUG) Slog.d(TAG, "onEnrollResult()");
-            }
-
-            @Override
-            public void onAcquired(long deviceId, int acquiredInfo, int vendorCode) {
-                if (DEBUG) Slog.d(TAG, "onAcquired()");
-            }
-
-            @Override
-            public void onAuthenticationSucceeded(long deviceId, Fingerprint fp, int userId) {
-                if (DEBUG) Slog.d(TAG, "onAuthenticationSucceeded(): " + fp.getGroupId());
-
-                // First, check what was authenticated, a response or a dataset.
-                // Then, decide how to handle it:
-                // - If service provided data, handle them directly.
-                // - Otherwise, notify service.
-
-                mAutoFillDirectly = true;
-
-                if (mDatasetRequiringAuth != null) {
-                    if (mDatasetRequiringAuth.isEmpty()) {
-                        notifyDatasetAuthenticationResult(mDatasetRequiringAuth.getExtras(),
-                                FLAG_AUTHENTICATION_SUCCESS);
-                    } else {
-                        autoFillApp(mDatasetRequiringAuth);
-                    }
-                } else if (mResponseRequiringAuth != null) {
-                    final List<Dataset> datasets = mResponseRequiringAuth.getDatasets();
-                    if (datasets.isEmpty()) {
-                        notifyResponseAuthenticationResult(mResponseRequiringAuth.getExtras(),
-                                FLAG_AUTHENTICATION_SUCCESS);
-                    } else {
-                        showResponseLocked(mResponseRequiringAuth, true);
-                    }
-                } else {
-                    Slog.w(TAG, "onAuthenticationSucceeded(): no response or dataset");
-                }
-
-                mUi.dismissFingerprintRequest(true);
-            }
-
-            @Override
-            public void onAuthenticationFailed(long deviceId) {
-                if (DEBUG) Slog.d(TAG, "onAuthenticationFailed()");
-                // Do nothing - onError() will be called after a few failures...
-            }
-
-            @Override
-            public void onError(long deviceId, int error, int vendorCode) {
-                if (DEBUG) Slog.d(TAG, "onError()");
-
-                // Notify service so it can fallback to its own authentication
-                if (mDatasetRequiringAuth != null) {
-                    notifyDatasetAuthenticationResult(mDatasetRequiringAuth.getExtras(),
-                            FLAG_AUTHENTICATION_ERROR);
-                } else if (mResponseRequiringAuth != null) {
-                    notifyResponseAuthenticationResult(mResponseRequiringAuth.getExtras(),
-                            FLAG_AUTHENTICATION_ERROR);
-                } else {
-                    Slog.w(TAG, "onError(): no response or dataset");
-                }
-
-                mUi.dismissFingerprintRequest(false);
-            }
-
-            @Override
-            public void onRemoved(long deviceId, int fingerId, int groupId, int remaining) {
-                if (DEBUG) Slog.d(TAG, "onRemoved()");
-            }
-
-            @Override
-            public void onEnumerated(long deviceId, int fingerId, int groupId, int remaining) {
-                if (DEBUG) Slog.d(TAG, "onEnumerated()");
-            }
-        };
-
-        private IAutoFillServerCallback mServerCallback = new IAutoFillServerCallback.Stub() {
-            @Override
-            public void showResponse(FillResponse response) {
-                // TODO(b/33197203): add MetricsLogger call
-                if (response == null) {
-                    if (DEBUG) Slog.d(TAG, "showResponse(): null response");
+            mClient = IAutoFillManagerClient.Stub.asInterface(client);
+            try {
+                client.linkToDeath(() -> {
+                    if (DEBUG) Slog.d(TAG, "app binder died");
 
                     removeSelf();
-                    return;
-                }
-
-                synchronized (mLock) {
-                    showResponseLocked(response, response.isAuthRequired());
-                }
+                }, 0);
+            } catch (RemoteException e) {
+                Slog.w(TAG, "linkToDeath() on mClient failed: " + e);
             }
+        }
 
-            @Override
-            public void showError(CharSequence message) {
-                // TODO(b/33197203): add MetricsLogger call
-                if (DEBUG) Slog.d(TAG, "showError(): " + message);
-
-                mUi.showError(message);
+        // FillServiceCallbacks
+        @Override
+        public void onFillRequestSuccess(FillResponse response) {
+            // TODO(b/33197203): add MetricsLogger call
+            if (response == null) {
                 removeSelf();
+                return;
             }
+            synchronized (mLock) {
+                processResponseLocked(response);
+            }
+        }
 
-            @Override
-            public void onSaved() {
-                // TODO(b/33197203): add MetricsLogger call
-                if (DEBUG) Slog.d(TAG, "onSaved()");
+        // FillServiceCallbacks
+        @Override
+        public void onFillRequestFailure(CharSequence message) {
+            // TODO(b/33197203): add MetricsLogger call
+            getUiForShowing().showError(message);
+            removeSelf();
+        }
 
+        // FillServiceCallbacks
+        @Override
+        public void onSaveRequestSuccess() {
+            // TODO(b/33197203): add MetricsLogger call
+            // Nothing left to do...
+            removeSelf();
+        }
+
+        // FillServiceCallbacks
+        @Override
+        public void onSaveRequestFailure(CharSequence message) {
+            // TODO(b/33197203): add MetricsLogger call
+            getUiForShowing().showError(message);
+            removeSelf();
+        }
+
+        // FillServiceCallbacks
+        @Override
+        public void authenticate(IntentSender intent, Intent fillInIntent) {
+            startAuthentication(intent, fillInIntent);
+        }
+
+        // FillServiceCallbacks
+        @Override
+        public void onServiceDied(RemoteFillService service) {
+            // TODO(b/33197203): implement
+        }
+
+        // AutoFillUiCallback
+        @Override
+        public void fill(Dataset dataset) {
+            autoFill(dataset);
+        }
+
+        // AutoFillUiCallback
+        @Override
+        public void save() {
+            mHandlerCaller.getHandler().obtainMessage(MSG_SERVICE_SAVE, mActivityToken)
+                    .sendToTarget();
+        }
+
+        public void setAuthenticationResultLocked(Bundle data) {
+            if (mCurrentResponse == null || data == null) {
                 removeSelf();
-            }
-
-            @Override
-            public void unlockFillResponse(int flags) {
-                // TODO(b/33197203): add proper MetricsLogger calls?
-                if (DEBUG) Log.d(TAG, "unlockUser(): flags=" + flags);
-
-                synchronized (mLock) {
-                    if ((flags & FLAG_AUTHENTICATION_SUCCESS) != 0) {
-                        if (mResponseRequiringAuth == null) {
-                            Log.wtf(TAG, "unlockUser(): no mResponseRequiringAuth on flags "
-                                    + flags);
-                            removeSelf();
-                            return;
-                        }
-                        final List<Dataset> datasets = mResponseRequiringAuth.getDatasets();
-                        if (datasets.isEmpty()) {
-                            Log.w(TAG, "unlockUser(): no dataset on previous response: "
-                                    + mResponseRequiringAuth);
-                            removeSelf();
-                            return;
-                        }
-                        mAutoFillDirectly = true;
-                        showResponseLocked(mResponseRequiringAuth, false);
+            } else {
+                Parcelable result = data.getParcelable(
+                        AutoFillManager.EXTRA_AUTHENTICATION_RESULT);
+                if (result instanceof FillResponse) {
+                    mCurrentResponse = (FillResponse) result;
+                    processResponseLocked(mCurrentResponse);
+                } else if (result instanceof Dataset) {
+                    Dataset dataset = (Dataset) result;
+                    final int datasetIndex = Helper.indexOfDataset(
+                            dataset.getName(), mCurrentResponse);
+                    if (datasetIndex <= 0) {
+                        Slog.e(TAG, "Response for a dataset auth has"
+                                + " an invalid dataset result: " + dataset.getName());
                     }
-                    // TODO(b/33197203): show UI error on authentication failure?
-                    // Or let service handle it?
+                    mCurrentResponse.getDatasets().removeAt(datasetIndex);
+                    mCurrentResponse.getDatasets().add(dataset);
+                    autoFill(dataset);
                 }
             }
-
-            @Override
-            public void unlockDataset(Dataset dataset, int flags) {
-                // TODO(b/33197203): add proper MetricsLogger calls?
-                if (DEBUG) Log.d(TAG, "unlockDataset(): dataset=" + dataset + ", flags=" + flags);
-
-                if ((flags & FLAG_AUTHENTICATION_SUCCESS) != 0) {
-                    autoFillApp(dataset != null ? dataset : mDatasetRequiringAuth);
-                    return;
-                }
-            }
-        };
-
-        final int mId;
-
-        private Session(int id, IBinder activityToken) {
-            mUi = new AutoFillUI(mContext, this);
-            mId = id;
-            mActivityToken = new WeakReference<>(activityToken);
         }
 
         /**
-         * Callback used to indivate a field has been updated.
+         * Show the save UI, when session can be saved.
          */
-        void updateValueLocked(AutoFillId id, AutoFillValue newValue) {
-          if (DEBUG) Slog.d(TAG, "updateValueLocked(): id=" + id + ", newValue=" + newValue);
-
-          // TODO(b/33197203): ignore if not part of the savable ids.
-          if (mUpdatedValues == null) {
-                // Lazy intializes it
-                mUpdatedValues = new HashMap<>();
+        public void showSaveLocked() {
+            if (mStructure == null) {
+                // Sanity check; should not happen...
+                Slog.wtf(TAG, "showSaveLocked(): no mStructure");
+                return;
             }
-            mUpdatedValues.put(id, newValue);
+            if (mCurrentResponse == null) {
+                // Happens when the activity / session was finished before the service replied.
+                Slog.d(TAG, "showSaveLocked(): no mCurrentResponse yet");
+                return;
+            }
+            final ArraySet<AutoFillId> savableIds = mCurrentResponse.getSavableIds();
+            if (VERBOSE) Slog.v(TAG, "showSaveLocked(): savableIds=" + savableIds);
+
+            if (savableIds.isEmpty()) {
+                if (DEBUG) Slog.d(TAG, "showSaveLocked(): service doesn't want to save");
+                return;
+            }
+
+            final int size = savableIds.size();
+            for (int i = 0; i < size; i++) {
+                final AutoFillId id = savableIds.valueAt(i);
+                final ViewState state = mViewStates.get(id);
+                if (state != null && state.mValueUpdated) {
+                    final AutoFillValue filledValue = findValue(mAutoFilledDataset, id);
+                    if (state.mAutoFillValue == null || state.mAutoFillValue.equals(filledValue)) {
+                        continue;
+                    }
+                    if (DEBUG) {
+                        Slog.d(TAG, "finishSessionLocked(): found a change on " + id + ": "
+                                + state.mAutoFillValue);
+                    }
+                    mUi.showSaveUi();
+                    return;
+                }
+            }
+            // Nothing changed...
+            if (DEBUG) Slog.d(TAG, "showSaveLocked(): with no changes, comes no responsibilities");
         }
 
         /**
          * Calls service when user requested save.
          */
-        void onSaveLocked() {
-            if (DEBUG) Slog.d(TAG, "onSaveLocked(): mUpdateValues=" + mUpdatedValues);
+        private void callSaveLocked() {
+            if (DEBUG) Slog.d(TAG, "callSaveLocked(): mViewStates=" + mViewStates);
 
-            if (mStructure == null) {
-                // Sanity check; should not happen...
-                Slog.wtf(TAG, "onSaveLocked(): no mStructure");
-                return;
-            }
+            final Bundle extras = this.mCurrentResponse.getExtras();
 
-            if (mUpdatedValues == null || mUpdatedValues.isEmpty()) {
-                // Nothing changed
-                if (DEBUG) Slog.d(TAG, "onSave(): when no changes, comes no responsibilities");
-
-                return;
-            }
-
-            // TODO(b/33197203): make sure the extras are tested by CTS
-            final Bundle responseExtras = mCurrentResponse == null ? null
-                    : mCurrentResponse.getExtras();
-            final Bundle datasetExtras = mAutoFilledDataset == null ? null
-                    : mAutoFilledDataset.getExtras();
-            final Bundle extras = (responseExtras == null && datasetExtras == null)
-                    ? null : new Bundle();
-            if (responseExtras != null) {
-                if (DEBUG) {
-                    Slog.d(TAG, "response extras on save extras: "
-                            + bundleToString(responseExtras));
+            for (Entry<AutoFillId, ViewState> entry : mViewStates.entrySet()) {
+                final AutoFillValue value = entry.getValue().mAutoFillValue;
+                if (value == null) {
+                    if (VERBOSE) Slog.v(TAG, "callSaveLocked(): skipping " + entry.getKey());
+                    continue;
                 }
-                extras.putBundle(AutoFillService.EXTRA_RESPONSE_EXTRAS, responseExtras);
-            }
-            if (datasetExtras != null) {
-                if (DEBUG) {
-                    Slog.d(TAG, "dataset extras on save extras: " + bundleToString(datasetExtras));
-                }
-                extras.putBundle(AutoFillService.EXTRA_DATASET_EXTRAS, datasetExtras);
-            }
-
-
-            for (Entry<AutoFillId, AutoFillValue> entry : mUpdatedValues.entrySet()) {
                 final AutoFillId id = entry.getKey();
                 final ViewNode node = findViewNodeByIdLocked(id);
                 if (node == null) {
-                    Slog.w(TAG, "onSaveLocked(): did not find node with id " + id);
+                    Slog.w(TAG, "callSaveLocked(): did not find node with id " + id);
                     continue;
                 }
-                final AutoFillValue value = entry.getValue();
-                if (DEBUG) Slog.d(TAG, "onSaveLocked(): updating " + id + " to " + value);
+                if (DEBUG) Slog.d(TAG, "callSaveLocked(): updating " + id + " to " + value);
+
                 node.updateAutoFillValue(value);
             }
 
@@ -891,59 +762,78 @@
                 Slog.v(TAG, "Dumping " + mStructure + " before calling service.save()");
                 mStructure.dump();
             }
-            try {
-                mService.save(mStructure, mServerCallback, extras);
-            } catch (RemoteException e) {
-                Slog.w(TAG, "Error calling save on service: " + e);
-                // TODO(b/33197203): invalidate session?
-            }
+
+            mRemoteFillService.onSaveRequest(mStructure, extras);
         }
 
-        void setAppCallbackLocked(IBinder appBinder) {
-            try {
-                appBinder.linkToDeath(() -> {
-                    if (DEBUG) Slog.d(TAG, "app callback died");
-                    // TODO(b/33197203): more cleanup here?
-                    mAppCallback = null;
-                }, 0);
-            } catch (RemoteException e) {
-                Slog.w(TAG, "linkToDeath() failed: " + e);
-            }
-            mAppCallback = IAutoFillAppCallback.Stub.asInterface(appBinder);
-        }
+        void updateLocked(AutoFillId id, Rect bounds, AutoFillValue value, int flags) {
+            if (DEBUG) Slog.d(TAG, "updateLocked(): id=" + id + ", flags=" + flags);
 
-        void updateAutoFillInput(int flags, AutoFillId autoFillId,
-                @Nullable AutoFillValue autoFillValue, @Nullable Rect bounds) {
-            synchronized (mLock) {
-                ViewState viewState = mViewStates.get(autoFillId);
-                if (viewState == null) {
-                    viewState = new ViewState(this);
-                    mViewStates.put(autoFillId, viewState);
+            if (mAutoFilledDataset != null && (flags & FLAG_VALUE_CHANGED) == 0) {
+                // TODO(b/33197203): ignoring because we don't support partitions yet
+                if (DEBUG) Slog.d(TAG, "updateLocked(): ignoring " + flags + " after auto-filled");
+                return;
+            }
+
+            ViewState viewState = mViewStates.get(id);
+            if (viewState == null) {
+                viewState = new ViewState(this, id, this);
+                mViewStates.put(id, viewState);
+            }
+
+            if ((flags & FLAG_START_SESSION) != 0) {
+                // View is triggering auto-fill.
+                mCurrentViewState = viewState;
+                viewState.update(value, bounds);
+                return;
+            }
+
+            if ((flags & FLAG_VALUE_CHANGED) != 0 && value != null &&
+                    !value.equals(viewState.mAutoFillValue)) {
+                viewState.mValueUpdated = true;
+
+                // Must check if this update was caused by auto-filling the view, in which
+                // case we just update the value, but not the UI.
+                if (mAutoFilledDataset != null) {
+                    final AutoFillValue filledValue = findValue(mAutoFilledDataset, id);
+                    if (value.equals(filledValue)) {
+                        viewState.mAutoFillValue = value;
+                        return;
+                    }
                 }
 
-                if ((flags & FLAG_UPDATE_UI_SHOW) != 0) {
-                    // Remove the UI if the ViewState has changed.
-                    if (mCurrentViewState != viewState) {
-                        mUi.hideFillUi();
-                        mCurrentViewState = viewState;
-                    }
-
-                    // If the ViewState is ready to be displayed, onReady() will be called.
-                    viewState.update(autoFillValue, bounds);
-
-                    // TODO(b/33197203): Remove when there is a response per activity.
-                    if (mCurrentResponse != null) {
-                        viewState.setResponse(mCurrentResponse);
-                    }
-                } else if ((flags & FLAG_UPDATE_UI_HIDE) != 0) {
-                    if (mCurrentViewState == viewState) {
-                        mUi.hideFillUi();
-                        mCurrentViewState = null;
-                    }
-                } else {
-                    Slog.w(TAG, "unknown flags " + flags);
-                }
+                // Just change value, don't update the UI
+                viewState.mAutoFillValue = value;
+                return;
             }
+
+            if ((flags & FLAG_FOCUS_GAINED) != 0) {
+                // Remove the UI if the ViewState has changed.
+                if (mCurrentViewState != viewState) {
+                    mUi.hideFillUi();
+                    mCurrentViewState = viewState;
+                }
+
+                // If the ViewState is ready to be displayed, onReady() will be called.
+                viewState.update(value, bounds);
+
+                // TODO(b/33197203): Remove when there is a response per activity.
+                if (mCurrentResponse != null) {
+                    viewState.setResponse(mCurrentResponse);
+                }
+
+                return;
+            }
+
+            if ((flags & FLAG_FOCUS_LOST) != 0) {
+                if (mCurrentViewState == viewState) {
+                    mUi.hideFillUi();
+                    mCurrentViewState = null;
+                }
+                return;
+            }
+
+            Slog.w(TAG, "unknown flags " + flags);
         }
 
         @Override
@@ -957,180 +847,120 @@
                     filterText = text.toString();
                 }
             }
-            mUi.showFillUi(viewState, response.getDatasets(), bounds, filterText);
+
+            getUiForShowing().showFillUi(mActivityToken, viewState, response.getDatasets(),
+                    bounds, filterText);
         }
 
-        private void showResponseLocked(FillResponse response, boolean authRequired) {
-            if (DEBUG) Slog.d(TAG, "showResponse(directly=" + mAutoFillDirectly
-                    + ", authRequired=" + authRequired +"):" + response);
+        private void processResponseLocked(FillResponse response) {
+            if (DEBUG) Slog.d(TAG, "processResponseLocked(authRequired="
+                    + response.getAuthentication() + "):" + response);
 
-            if (mAutoFillDirectly && response != null) {
-                final List<Dataset> datasets = response.getDatasets();
-                if (datasets.size() == 1) {
-                    // User authenticated and provider returned just 1 dataset - auto-fill it now!
-                    final Dataset dataset = datasets.get(0);
-                    if (DEBUG) Slog.d(TAG, "auto-filling directly from auth: " + dataset);
+            // TODO(b/33197203): add MetricsLogger calls
 
-                    autoFillApp(dataset);
-                    return;
-                }
-            }
-
-            if (!authRequired) {
-                // TODO(b/33197203): add MetricsLogger call
-                mCurrentResponse = response;
-                // TODO(b/33197203): Consider using mCurrentResponse, depends on partitioning design
-                if (mCurrentViewState != null) {
-                    mCurrentViewState.setResponse(mCurrentResponse);
-                }
+            if (mCurrentViewState == null) {
+                // TODO(b/33197203): temporary sanity check; should never happen
+                Slog.w(TAG, "processResponseLocked(): mCurrentResponse is null");
                 return;
             }
 
-            // Handles response that requires authentication.
-            // TODO(b/33197203): add MetricsLogger call, including if fingerprint requested
+            mCurrentResponse = response;
 
-            mResponseRequiringAuth = response;
-            final boolean requiresFingerprint = response.hasCryptoObject();
-            if (requiresFingerprint) {
-                // TODO(b/33197203): check if fingerprint is available first and call error callback
-                // with FLAG_FINGERPRINT_AUTHENTICATION_NOT_AVAILABLE if it's not.
-                // Start scanning for the fingerprint.
-                scanFingerprint(response.getCryptoObjectOpId());
+            if (mCurrentResponse.getAuthentication() != null) {
+                // Handle authentication.
+                final Intent fillInIntent = createAuthFillInIntent(mStructure);
+
+                mCurrentViewState.setResponse(mCurrentResponse, fillInIntent);
+                return;
             }
-            // Displays the message asking the user to tap (or fingerprint) for AutoFill.
-            mUi.showFillResponseAuthenticationRequest(requiresFingerprint,
-                    response.getExtras(), response.getFlags());
+
+            final ArraySet<AutoFillId> savableIds = mCurrentResponse.getSavableIds();
+            if (savableIds == null || savableIds.isEmpty()) {
+                // NOTE: it's assuming the response has no datasets, since when a dataset is added
+                // it's view id is automatically added to savable_ids
+                if (DEBUG) Slog.d(TAG, "processResponseLocked(): nothing to do");
+
+                removeSelf();
+                return;
+            }
+
+            mCurrentViewState.setResponse(mCurrentResponse);
         }
 
         void autoFill(Dataset dataset) {
             synchronized (mLock) {
                 // Autofill it directly...
-                if (!dataset.isAuthRequired()) {
+                if (dataset.getAuthentication() == null) {
                     autoFillApp(dataset);
                     return;
                 }
 
                 // ...or handle authentication.
+                Intent fillInIntent = createAuthFillInIntent(mStructure);
+                startAuthentication(dataset.getAuthentication(), fillInIntent);
+            }
+        }
 
-                mDatasetRequiringAuth = dataset;
-                final boolean requiresFingerprint = dataset.hasCryptoObject();
-                if (requiresFingerprint) {
-                    // TODO(b/33197203): check if fingerprint is available first and call error
-                    // callback with FLAG_FINGERPRINT_AUTHENTICATION_NOT_AVAILABLE if it's not.
-                    // Start scanning for the fingerprint.
-                    scanFingerprint(dataset.getCryptoObjectOpId());
-                    // Displays the message asking the user to tap (or fingerprint) for AutoFill.
-                    mUi.showDatasetFingerprintAuthenticationRequest(dataset);
-                } else {
-                    try {
-                        mService.authenticateDataset(dataset.getExtras(),
-                                FLAG_AUTHENTICATION_REQUESTED);
-                    } catch (RemoteException e) {
-                        Slog.w(TAG, "Error authenticating dataset: " + e);
-                    }
-                }
+        CharSequence getServiceName() {
+            return AutoFillManagerServiceImpl.this.getServiceName();
+        }
+
+        private Intent createAuthFillInIntent(AssistStructure structure) {
+            Intent fillInIntent = new Intent();
+            fillInIntent.putExtra(AutoFillManager.EXTRA_ASSIST_STRUCTURE, structure);
+            return fillInIntent;
+        }
+
+        private void startAuthentication(IntentSender intent, Intent fillInIntent) {
+            try {
+                mClient.authenticate(intent, fillInIntent);
+            } catch (RemoteException e) {
+                Slog.e(TAG, "Error launching auth intent", e);
             }
         }
 
         void dumpLocked(String prefix, PrintWriter pw) {
-            pw.print(prefix); pw.print("mId: "); pw.println(mId);
-            pw.print(prefix); pw.print("mActivityToken: "); pw.println(mActivityToken.get());
+            pw.print(prefix); pw.print("mActivityToken: "); pw.println(mActivityToken);
             pw.print(prefix); pw.print("mCurrentResponse: "); pw.println(mCurrentResponse);
-            pw.print(prefix);
-                pw.print("mResponseRequiringAuth: "); pw.println(mResponseRequiringAuth);
-            pw.print(prefix);
-                pw.print("mDatasetRequiringAuth: "); pw.println(mDatasetRequiringAuth);
-            pw.print(prefix); pw.print("mAutoFillDirectly: "); pw.println(mAutoFillDirectly);
+            pw.print(prefix); pw.print("mAutoFilledDataset: "); pw.println(mAutoFilledDataset);
             pw.print(prefix); pw.print("mCurrentViewStates: "); pw.println(mCurrentViewState);
             pw.print(prefix); pw.print("mViewStates: "); pw.println(mViewStates.size());
             final String prefix2 = prefix + "  ";
             for (Map.Entry<AutoFillId, ViewState> entry : mViewStates.entrySet()) {
-                pw.print(prefix2);
-                pw.print(entry.getKey()); pw.print(": " ); pw.println(entry.getValue());
+                pw.print(prefix); pw.print("State for id "); pw.println(entry.getKey());
+                entry.getValue().dump(prefix2, pw);
             }
-            pw.print(prefix); pw.print("mUpdatedValues: "); pw.println(mUpdatedValues);
-            pw.print(prefix); pw.print("mStructure: " );
-            // TODO(b/33197203): add method do dump AssistStructure on pw
-            if (mStructure != null) {
-                pw.println("look at logcat" );
-                mStructure.dump(); // dumps to logcat
-            } else {
-                pw.println("null");
-            }
-        }
-
-        /**
-         * Notifies the result of a {@link FillResponse} authentication request to the service.
-         *
-         * <p>Typically called by the UI after user taps the "Tap to autofill" affordance, or after user
-         * used the fingerprint sensors to authenticate.
-         */
-        void notifyResponseAuthenticationResult(Bundle extras, int flags) {
-            if (DEBUG) Slog.d(TAG, "notifyResponseAuthenticationResult(): flags=" + flags
-                    + ", extras=" + bundleToString(extras));
-            synchronized (mLock) {
-                try {
-                    mService.authenticateFillResponse(extras, flags);
-                } catch (RemoteException e) {
-                    Slog.w(TAG, "Error sending authentication result back to service: " + e);
+            if (VERBOSE) {
+                pw.print(prefix); pw.print("mStructure: " );
+                // TODO(b/33197203): add method do dump AssistStructure on pw
+                if (mStructure != null) {
+                    pw.println("look at logcat" );
+                    mStructure.dump(); // dumps to logcat
+                } else {
+                    pw.println("null");
                 }
             }
-        }
 
-        /**
-         * Notifies the result of a {@link Dataset} authentication request to the service.
-         *
-         * <p>Typically called by the UI after user taps the "Tap to autofill" affordance, or after
-         * it gets the results from a fingerprint authentication.
-         */
-        void notifyDatasetAuthenticationResult(Bundle extras, int flags) {
-            if (DEBUG) Slog.d(TAG, "notifyDatasetAuthenticationResult(): flags=" + flags
-                    + ", extras=" + bundleToString(extras));
-            synchronized (mLock) {
-                try {
-                    mService.authenticateDataset(extras, flags);
-                } catch (RemoteException e) {
-                    Slog.w(TAG, "Error sending authentication result back to service: " + e);
-                }
-            }
+            mRemoteFillService.dump(prefix, pw);
         }
 
         void autoFillApp(Dataset dataset) {
             synchronized (mLock) {
                 try {
                     if (DEBUG) Slog.d(TAG, "autoFillApp(): the buck is on the app: " + dataset);
-                    mAppCallback.autoFill(dataset);
+
+                    mClient.autoFill(dataset.getFieldIds(), dataset.getFieldValues());
+                    mAutoFilledDataset = dataset;
                 } catch (RemoteException e) {
                     Slog.w(TAG, "Error auto-filling activity: " + e);
                 }
             }
         }
 
-        /**
-         * Called by UI to trigger a save request to the service.
-         */
-        void requestSave() {
+        private AutoFillUI getUiForShowing() {
             synchronized (mLock) {
-                onSaveLocked();
-            }
-        }
-
-        private void scanFingerprint(long opId) {
-            // TODO(b/33197203): add MetricsLogger call
-            if (DEBUG) Slog.d(TAG, "Starting fingerprint scan for op id: " + opId);
-
-            // TODO(b/33197203): since we're clearing the AutoFillService's identity, make sure
-            // this method is only called at the proper times, otherwise a malicious provider could
-            // keep the callback refence to bypass the check
-            final long token = Binder.clearCallingIdentity();
-            try {
-                // TODO(b/33197203): set a timeout?
-                mFingerprintService.authenticate(mAuthToken, opId, mUserId, mServiceReceiver, 0,
-                        null);
-            } catch (RemoteException e) {
-                // Local call, shouldn't happen.
-            } finally {
-                Binder.restoreCallingIdentity(token);
+                mUi.setCallbackLocked(this, mActivityToken);
+                return mUi;
             }
         }
 
@@ -1167,9 +997,18 @@
             return null;
         }
 
+        private void destroyLocked() {
+            mRemoteFillService.destroy();
+            mUi.hideAll();
+            mUi.setCallbackLocked(null, null);
+        }
+
         private void removeSelf() {
+            if (VERBOSE) Slog.v(TAG, "removeSelf()");
+
             synchronized (mLock) {
-                removeSessionLocked(mId);
+                destroyLocked();
+                mSessions.remove(mActivityToken);
             }
         }
     }
diff --git a/services/autofill/java/com/android/server/autofill/AutoFillManagerServiceShellCommand.java b/services/autofill/java/com/android/server/autofill/AutoFillManagerServiceShellCommand.java
index 5c6009a..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,19 +45,16 @@
             return handleDefaultCommands(cmd);
         }
         final PrintWriter pw = getOutPrintWriter();
-        try {
-            switch (cmd) {
-                case "fill":
-                    return requestAutoFill();
-                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
@@ -60,30 +64,79 @@
             pw.println("  help");
             pw.println("    Prints this help text.");
             pw.println("");
-            pw.println("  fill [--user USER_ID]");
-            pw.println("    Request provider to auto-fill the top activity. ");
+            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 requestAutoFill() throws RemoteException {
-        final int userId = getUserIdFromArgs();
-        mService.requestAutoFillForUser(userId);
-        return 0;
-    }
-
-    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 76c2916..e83dc1e 100644
--- a/services/autofill/java/com/android/server/autofill/AutoFillUI.java
+++ b/services/autofill/java/com/android/server/autofill/AutoFillUI.java
@@ -15,13 +15,10 @@
  */
 package com.android.server.autofill;
 
-
 import static com.android.server.autofill.Helper.DEBUG;
 
 import android.annotation.Nullable;
-import android.app.Activity;
 import android.app.Notification;
-import android.app.Notification.Action;
 import android.app.NotificationManager;
 import android.app.PendingIntent;
 import android.app.StatusBarManager;
@@ -29,64 +26,88 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
+import android.content.IntentSender;
 import android.graphics.Rect;
-import android.graphics.PixelFormat;
 import android.os.Binder;
-import android.os.Bundle;
+import android.os.IBinder;
+import android.service.autofill.Dataset;
+import android.util.ArraySet;
+import android.os.Looper;
+import android.text.format.DateUtils;
 import android.util.Slog;
-import android.view.autofill.AutoFillId;
-import android.view.autofill.Dataset;
-import android.view.autofill.FillResponse;
 import android.view.Gravity;
 import android.view.View;
-import android.view.ViewGroup;
 import android.view.WindowManager;
 import android.view.WindowManager.LayoutParams;
 import android.widget.Toast;
 
-import com.android.internal.annotations.GuardedBy;
+import com.android.internal.os.HandlerCaller;
 import com.android.server.UiThread;
-import com.android.server.autofill.AutoFillManagerServiceImpl.Session;
 import com.android.server.autofill.AutoFillManagerServiceImpl.ViewState;
 
 import java.io.PrintWriter;
-import java.util.Arrays;
-import java.util.List;
 
 /**
  * Handles all auto-fill related UI tasks.
  */
 // TODO(b/33197203): document exactly what once the auto-fill bar is implemented
 final class AutoFillUI {
-
     private static final String TAG = "AutoFillUI";
+    private static final long SNACK_BAR_LIFETIME_MS = 30 * DateUtils.SECOND_IN_MILLIS;
+    private static final int MSG_HIDE_SNACK_BAR = 1;
 
     private final Context mContext;
-    private final Session mSession;
     private final WindowManager mWm;
 
+    // TODO(b/33197203) Fix locking - some state requires lock and some not - requires refactoring
+    private final Object mLock = new Object();
+
     // Fill UI variables
     private AnchoredWindow mFillWindow;
-    private DatasetPicker mFillView;
+    private View mFillView;
     private ViewState mViewState;
-    private Rect mBounds;
-    private String mFilterText;
+
+    private AutoFillUiCallback mCallback;
+    private IBinder mActivityToken;
+
+    private final HandlerCaller.Callback mHandlerCallback = (msg) -> {
+        switch (msg.what) {
+            case MSG_HIDE_SNACK_BAR: {
+                hideSnackbarUiThread();
+                return;
+            }
+            default: {
+                Slog.w(TAG, "Invalid message: " + msg);
+            }
+        }
+    };
+    private final HandlerCaller mHandlerCaller = new HandlerCaller(null, Looper.getMainLooper(),
+            mHandlerCallback, true);
 
     /**
      * Custom snackbar UI used for saving autofill or other informational messages.
      */
     private View mSnackbar;
 
-    AutoFillUI(Context context, Session session) {
+    AutoFillUI(Context context) {
         mContext = context;
-        mSession = session;
         mWm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
     }
 
+    void setCallbackLocked(AutoFillUiCallback callback, IBinder activityToken) {
+        hideAll();
+        mCallback = callback;
+        mActivityToken = activityToken;
+    }
+
     /**
      * Displays an error message to the user.
      */
     void showError(CharSequence message) {
+        if (!hasCallback()) {
+            return;
+        }
+        hideAll();
         // TODO(b/33197203): proper implementation
         UiThread.getHandler().runWithScissors(() -> {
             Toast.makeText(mContext, "AutoFill error: " + message, Toast.LENGTH_LONG).show();
@@ -95,102 +116,112 @@
 
     /**
      * Hides the fill UI.
-     * Shows the options from a {@link FillResponse} so the user can pick up the proper
-     * {@link Dataset} (when the response has one) for a given view (identified by
-     * {@code autoFillId}).
      */
     void hideFillUi() {
         UiThread.getHandler().runWithScissors(() -> {
-            hideFillUiLocked();
+            hideFillUiUiThread();
         }, 0);
     }
 
-    // Must be called in inside UI Thread
-    private void hideFillUiLocked() {
+    @android.annotation.UiThread
+    private void hideFillUiUiThread() {
         if (mFillWindow != null) {
-            if (DEBUG) Slog.d(TAG, "hideFillUiLocked(): hide" + mFillWindow);
-
+            if (DEBUG) Slog.d(TAG, "hideFillUiUiThread(): hide" + mFillWindow);
             mFillWindow.hide();
         }
 
         mViewState = null;
-        mBounds = null;
-        mFilterText = null;
         mFillView = null;
         mFillWindow = null;
     }
 
-
     /**
      * Shows the fill UI, removing the previous fill UI if the has changed.
      *
+     * @param appToken the token of the app to be autofilled
      * @param viewState the view state, compared by reference to know if new UI should be shown
      * @param datasets the datasets to show, not used if viewState is the same
      * @param bounds bounds of the view to be filled, used if changed
      * @param filterText text of the view to be filled, used if changed
      */
-    void showFillUi(ViewState viewState, List<Dataset> datasets, Rect bounds,
-            String filterText) {
+    void showFillUi(IBinder appToken, ViewState viewState, @Nullable ArraySet<Dataset> datasets,
+            Rect bounds, String filterText) {
+        if (!hasCallback()) {
+            return;
+        }
+
         UiThread.getHandler().runWithScissors(() -> {
-            if (mViewState != viewState) {
-                // new
-                hideFillUi();
+            hideSnackbarUiThread();
+        }, 0);
+
+        if (datasets == null && viewState.mAuthIntent == null) {
+            // TODO(b/33197203): shouldn't be called, but keeping the WTF for a while just to be
+            // safe, otherwise it would crash system server...
+            Slog.wtf(TAG, "showFillUI(): no dataset");
+            return;
+        }
+
+        // TODO(b/33197203): should not display UI after we launched an authentication intent, since
+        // we have no warranty the provider will call onFailure() if the authentication failed or
+        // user dismissed the auth window
+        // because if the service does not handle calling the callback,
+
+
+        UiThread.getHandler().runWithScissors(() -> {
+            // The dataset picker is only shown when authentication is not required...
+            DatasetPicker datasetPicker = null;
+
+            if (mViewState == null || !mViewState.mId.equals(viewState.mId)) {
+                hideFillUiUiThread();
 
                 mViewState = viewState;
+                if (viewState.mAuthIntent != null) {
+                    final CharSequence serviceName = viewState.getServiceName();
 
-                mFillView = new DatasetPicker(mContext, datasets,
-                        (dataset) -> {
-                            mSession.autoFillApp(dataset);
-                            hideFillUi();
-                        });
-                mFillWindow = new AnchoredWindow(
-                        mWm, mFillView, 800, ViewGroup.LayoutParams.WRAP_CONTENT);
+                    mFillView = new SignInPrompt(mContext, serviceName, (e) -> {
+                        final IntentSender intentSender = viewState.mResponse.getAuthentication();
+                        final AutoFillUiCallback callback;
+                        final Intent authIntent;
+                        synchronized (mLock) {
+                            callback = mCallback;
+                            authIntent = viewState.mAuthIntent;
+                            // Must reset the authentication intent so UI display the datasets after
+                            // the user authenticated.
+                            viewState.mAuthIntent = null;
+                        }
+                        if (callback != null) {
+                            callback.authenticate(intentSender, authIntent);
+                        } else {
+                            // TODO(b/33197203): need to figure out why it's null sometimes
+                            Slog.w(TAG, "no callback on showFillUi().auth for " + viewState.mId);
+                        }
+                    });
 
-                if (DEBUG) Slog.d(TAG, "show FillUi");
+                } else {
+                    mFillView = datasetPicker = new DatasetPicker(mContext, datasets,
+                            (dataset) -> {
+                                final AutoFillUiCallback callback;
+                                synchronized (mLock) {
+                                    callback = mCallback;
+                                }
+                                if (callback != null) {
+                                    callback.fill(dataset);
+                                } else {
+                                    // TODO(b/33197203): need to figure out why it's null sometimes
+                                    Slog.w(TAG, "no callback on showFillUi() for " + viewState.mId);
+                                }
+                                hideFillUiUiThread();
+                            });
+                }
+                mFillWindow = new AnchoredWindow(mWm, appToken, mFillView);
+
+                if (DEBUG) Slog.d(TAG, "showFillUi(): view changed for: " + viewState.mId);
             }
-
-            if (!bounds.equals(mBounds)) {
-                if (DEBUG) Slog.d(TAG, "update FillUi bounds: " + mBounds);
-                mBounds = bounds;
-                mFillWindow.show(mBounds);
+            if (datasetPicker != null) {
+                datasetPicker.update(filterText);
             }
+            mFillWindow.show(bounds);
 
-            if (!filterText.equals(mFilterText)) {
-                if (DEBUG) Slog.d(TAG, "update FillUi filter text: " + mFilterText);
-                mFilterText = filterText;
-                mFillView.update(mFilterText);
-            }
-        }, 0);
-    }
-
-    /**
-     * Shows an UI affordance indicating that user action is required before a {@link FillResponse}
-     * can be used.
-     *
-     * <p>It typically replaces the auto-fill bar with a message saying "Press fingerprint or tap to
-     * autofill" or "Tap to autofill", depending on the value of {@code usesFingerprint}.
-     */
-    void showFillResponseAuthenticationRequest(boolean usesFingerprint,
-            Bundle extras, int flags) {
-        // TODO(b/33197203): proper implementation
-        showAuthNotification(usesFingerprint, extras, flags);
-    }
-
-    /**
-     * Shows an UI affordance asking indicating that user action is required before a
-     * {@link Dataset} can be used.
-     *
-     * <p>It typically replaces the auto-fill bar with a message saying "Press fingerprint to
-     * autofill".
-     */
-    void showDatasetFingerprintAuthenticationRequest(Dataset dataset) {
-        if (DEBUG) Slog.d(TAG, "showDatasetAuthenticationRequest(): dataset=" + dataset);
-
-        // TODO(b/33197203): proper implementation (either pop up a fingerprint dialog or replace
-        // the auto-fill bar with a new message.
-        UiThread.getHandler().runWithScissors(() -> {
-            Toast.makeText(mContext, "AutoFill: press fingerprint to unlock " + dataset.getName(),
-                    Toast.LENGTH_LONG).show();
         }, 0);
     }
 
@@ -198,63 +229,50 @@
      * Shows the UI asking the user to save for auto-fill.
      */
     void showSaveUi() {
-        showSnackbar(new SavePrompt(mContext, new SavePrompt.OnSaveListener() {
-            @Override
-            public void onSaveClick() {
-                hideSnackbar();
-
-                // TODO(b/33197203): add MetricsLogger call
-                mSession.requestSave();
-            }
-            @Override
-            public void onCancelClick() {
-                hideSnackbar();
-            }
-        }));
-    }
-
-    /**
-     * Called by service after the user user the fingerprint sensors to authenticate.
-     */
-    void dismissFingerprintRequest(boolean success) {
-        if (DEBUG) Slog.d(TAG, "dismissFingerprintRequest(): ok=" + success);
-
-        dismissAuthNotification();
-
-        if (!success) {
-            // TODO(b/33197203): proper implementation (snack bar / i18n string)
-            UiThread.getHandler().runWithScissors(() -> {
-                Toast.makeText(mContext, "AutoFill: fingerprint failed", Toast.LENGTH_LONG).show();
-            }, 0);
+        if (!hasCallback()) {
+            return;
         }
+        hideAll();
+        UiThread.getHandler().runWithScissors(() -> {
+            showSnackbarUiThread(new SavePrompt(mContext,
+                    new SavePrompt.OnSaveListener() {
+                @Override
+                public void onSaveClick() {
+                    hideSnackbarUiThread();
+                    // TODO(b/33197203): add MetricsLogger call
+                    mCallback.save();
+                }
+
+                @Override
+                public void onCancelClick() {
+                    // TODO(b/33197203): add MetricsLogger call
+                    hideSnackbarUiThread();
+                }
+            }));
+        }, 0);
     }
 
     /**
-     * Closes all UI affordances.
+     * Hides all UI affordances.
      */
-    void closeAll() {
-        if (DEBUG) Slog.d(TAG, "closeAll()");
-
+    void hideAll() {
         UiThread.getHandler().runWithScissors(() -> {
-            hideSnackbarLocked();
-            hideFillUiLocked();
+            hideSnackbarUiThread();
+            hideFillUiUiThread();
         }, 0);
     }
 
     void dump(PrintWriter pw) {
         pw.println("AufoFill UI");
         final String prefix = "  ";
-        pw.print(prefix); pw.print("sResultCode: "); pw.println(sResultCode);
-        pw.print(prefix); pw.print("mSessionId: "); pw.println(mSession.mId);
+        pw.print(prefix); pw.print("mActivityToken: "); pw.println(mActivityToken);
         pw.print(prefix); pw.print("mSnackBar: "); pw.println(mSnackbar);
         pw.print(prefix); pw.print("mViewState: "); pw.println(mViewState);
-        pw.print(prefix); pw.print("mBounds: "); pw.println(mBounds);
-        pw.print(prefix); pw.print("mFilterText: "); pw.println(mFilterText);
     }
 
     //similar to a snackbar, but can be a bit custom since it is more than just text. This will
     //allow two buttons for saving or not saving the autofill for instance as well.
-    private void showSnackbar(View snackBar) {
+    private void showSnackbarUiThread(View snackBar) {
         final LayoutParams params = new LayoutParams();
         params.setTitle("AutoFill Save");
         params.type = LayoutParams.TYPE_PHONE; // TODO(b/33197203) use app window token
@@ -272,155 +290,31 @@
             mSnackbar = snackBar;
             mWm.addView(mSnackbar, params);
         }, 0);
+
+        if (DEBUG) {
+            Slog.d(TAG, "showSnackbar(): auto dismissing it in " + SNACK_BAR_LIFETIME_MS + " ms");
+        }
+        mHandlerCaller.sendMessageDelayed(mHandlerCaller.obtainMessage(MSG_HIDE_SNACK_BAR),
+                SNACK_BAR_LIFETIME_MS);
     }
 
-    private void hideSnackbar() {
-        UiThread.getHandler().runWithScissors(() -> {
-            hideSnackbarLocked();
-        }, 0);
-    }
-
-    // Must be called in inside UI Thread
-    private void hideSnackbarLocked() {
+    private void hideSnackbarUiThread() {
+        mHandlerCaller.getHandler().removeMessages(MSG_HIDE_SNACK_BAR);
         if (mSnackbar != null) {
             mWm.removeView(mSnackbar);
             mSnackbar = null;
         }
     }
 
-    /////////////////////////////////////////////////////////////////////////////////
-    // TODO(b/33197203): temporary code using a notification to request auto-fill. //
-    // Will be removed once UX decide the right way to present it to the user.     //
-    /////////////////////////////////////////////////////////////////////////////////
-
-    // TODO(b/33197203): remove from frameworks/base/core/res/AndroidManifest.xml once not used
-    private static final String NOTIFICATION_AUTO_FILL_INTENT =
-            "com.android.internal.autofill.action.REQUEST_AUTOFILL";
-
-    // Extras used in the notification intents
-    private static final String EXTRA_USER_ID = "user_id";
-    private static final String EXTRA_NOTIFICATION_TYPE = "notification_type";
-    private static final String EXTRA_SESSION_ID = "session_id";
-    private static final String EXTRA_FILL_RESPONSE = "fill_response";
-    private static final String EXTRA_DATASET = "dataset";
-    private static final String EXTRA_AUTH_REQUIRED_EXTRAS = "auth_required_extras";
-    private static final String EXTRA_FLAGS = "flags";
-
-    private static final String TYPE_OPTIONS = "options";
-    private static final String TYPE_AUTH_RESPONSE = "auth_response";
-
-    private BroadcastReceiver mNotificationReceiver;
-    private final Object mLock = new Object();
-
-    // Hack used to generate unique pending intents
-    static int sResultCode = 0;
-
-    private void setNotificationListener() {
+    private boolean hasCallback() {
         synchronized (mLock) {
-            if (mNotificationReceiver == null) {
-                mNotificationReceiver = new NotificationReceiver();
-                mContext.registerReceiver(mNotificationReceiver,
-                        new IntentFilter(NOTIFICATION_AUTO_FILL_INTENT));
-            }
+            return mCallback != null;
         }
     }
 
-    final class NotificationReceiver extends BroadcastReceiver {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            final String type = intent.getStringExtra(EXTRA_NOTIFICATION_TYPE);
-            if (type == null) {
-                Slog.wtf(TAG, "No extra " + EXTRA_NOTIFICATION_TYPE + " on intent " + intent);
-                return;
-            }
-            final Dataset dataset = intent.getParcelableExtra(EXTRA_DATASET);
-            final int flags = intent.getIntExtra(EXTRA_FLAGS, 0);
-
-            if (DEBUG) Slog.d(TAG, "Notification received: type=" + type
-                    + ", sessionId=" + mSession.mId);
-            synchronized (mLock) {
-                switch (type) {
-                    case TYPE_AUTH_RESPONSE:
-                        mSession.notifyResponseAuthenticationResult(
-                                intent.getBundleExtra(EXTRA_AUTH_REQUIRED_EXTRAS), flags);
-                        break;
-                    default: {
-                        Slog.w(TAG, "Unknown notification type: " + type);
-                    }
-                }
-            }
-            collapseStatusBar();
-        }
+    interface AutoFillUiCallback {
+        void authenticate(IntentSender intent, Intent fillInIntent);
+        void fill(Dataset dataset);
+        void save();
     }
-
-    private static Intent newNotificationIntent(String type) {
-        final Intent intent = new Intent(NOTIFICATION_AUTO_FILL_INTENT);
-        intent.putExtra(EXTRA_NOTIFICATION_TYPE, type);
-        return intent;
-    }
-
-    private void showAuthNotification(boolean usesFingerprint,
-            Bundle extras, int flags) {
-        final long token = Binder.clearCallingIdentity();
-        try {
-            showAuthNotificationAsSystem(usesFingerprint, extras, flags);
-        } finally {
-            Binder.restoreCallingIdentity(token);
-        }
-    }
-
-    private void showAuthNotificationAsSystem(
-            boolean usesFingerprint, Bundle extras, int flags) {
-        final String title = "AutoFill Authentication";
-        final StringBuilder subTitle = new StringBuilder("Provider require user authentication.\n");
-
-        final Intent authIntent = newNotificationIntent(TYPE_AUTH_RESPONSE);
-        if (extras != null) {
-            authIntent.putExtra(EXTRA_AUTH_REQUIRED_EXTRAS, extras);
-        }
-        if (flags != 0) {
-            authIntent.putExtra(EXTRA_FLAGS, flags);
-        }
-        final PendingIntent authPendingIntent = PendingIntent.getBroadcast(mContext, ++sResultCode,
-                authIntent, PendingIntent.FLAG_ONE_SHOT);
-
-        if (usesFingerprint) {
-            subTitle.append("But kindly accepts your fingerprint instead"
-                    + "\n(tap fingerprint sensor to trigger it)");
-
-        } else {
-            subTitle.append("Tap notification to launch its authentication UI.");
-        }
-
-        final Notification.Builder notification = newNotificationBuilder()
-                .setAutoCancel(true)
-                .setOngoing(false)
-                .setContentTitle(title)
-                .setStyle(new Notification.BigTextStyle().bigText(subTitle.toString()));
-        if (authPendingIntent != null) {
-            notification.setContentIntent(authPendingIntent);
-        }
-        NotificationManager.from(mContext).notify(mSession.mId, notification.build());
-    }
-
-    private void dismissAuthNotification() {
-        NotificationManager.from(mContext).cancel(mSession.mId);
-    }
-
-    private Notification.Builder newNotificationBuilder() {
-        return new Notification.Builder(mContext)
-                .setCategory(Notification.CATEGORY_SYSTEM)
-                .setSmallIcon(com.android.internal.R.drawable.stat_sys_adb)
-                .setLocalOnly(true)
-                .setColor(mContext.getColor(
-                        com.android.internal.R.color.system_notification_accent_color));
-    }
-
-    private void collapseStatusBar() {
-        final StatusBarManager sbm = (StatusBarManager) mContext.getSystemService("statusbar");
-        sbm.collapsePanels();
-    }
-    /////////////////////////////////////////
-    // End of temporary notification code. //
-    /////////////////////////////////////////
 }
diff --git a/services/autofill/java/com/android/server/autofill/DatasetPicker.java b/services/autofill/java/com/android/server/autofill/DatasetPicker.java
index 7245aaa..a54cab9 100644
--- a/services/autofill/java/com/android/server/autofill/DatasetPicker.java
+++ b/services/autofill/java/com/android/server/autofill/DatasetPicker.java
@@ -17,7 +17,9 @@
 
 import android.content.Context;
 import android.graphics.Color;
-import android.view.autofill.Dataset;
+import android.service.autofill.Dataset;
+import android.text.TextUtils;
+import android.util.ArraySet;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.AdapterView;
@@ -38,15 +40,13 @@
  * 3) the View is detached.
  */
 final class DatasetPicker extends ListView implements OnItemClickListener {
-    private static final String TAG = "DatasetPicker";
-
     interface Listener {
         void onDatasetPicked(Dataset dataset);
     }
 
     private final Listener mListener;
 
-    DatasetPicker(Context context, List<Dataset> datasets, Listener listener) {
+    DatasetPicker(Context context, ArraySet<Dataset> datasets, Listener listener) {
         super(context);
         mListener = listener;
 
@@ -63,8 +63,10 @@
             @Override
             public View getView(int position, View convertView, ViewGroup parent) {
                 final TextView textView = (TextView) super.getView(position, convertView, parent);
+                textView.setSingleLine();
+                textView.setEllipsize(TextUtils.TruncateAt.END);
                 textView.setMinHeight(
-                    getDimen(com.android.internal.R.dimen.autofill_fill_item_height));
+                        getDimen(com.android.internal.R.dimen.autofill_fill_item_height));
                 return textView;
             }
         };
@@ -80,7 +82,7 @@
         adapter.getFilter().filter(prefix, new FilterListener() {
             @Override
             public void onFilterComplete(int count) {
-                DatasetPicker.this.requestLayout();
+                setVisibility(count > 0 ? View.VISIBLE : View.GONE);
             }
         });
     }
diff --git a/services/autofill/java/com/android/server/autofill/Helper.java b/services/autofill/java/com/android/server/autofill/Helper.java
index 9171dac..48ae635 100644
--- a/services/autofill/java/com/android/server/autofill/Helper.java
+++ b/services/autofill/java/com/android/server/autofill/Helper.java
@@ -16,8 +16,15 @@
 
 package com.android.server.autofill;
 
+import android.annotation.Nullable;
 import android.os.Bundle;
+import android.service.autofill.Dataset;
+import android.service.autofill.FillResponse;
+import android.util.ArraySet;
+import android.view.autofill.AutoFillId;
+import android.view.autofill.AutoFillValue;
 
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Objects;
 import java.util.Set;
@@ -31,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();
@@ -52,6 +59,46 @@
         return builder.toString();
     }
 
+    /**
+     * Gets the value of a {@link Dataset} field by its id, or {@code null} if not found.
+     */
+    @Nullable
+    static AutoFillValue findValue(Dataset dataset, AutoFillId id) {
+        if (dataset != null) {
+            final ArrayList<AutoFillId> ids = dataset.getFieldIds();
+            final int size = ids.size();
+            for (int i = 0; i < size; i++) {
+                if (id.equals(ids.get(i))) {
+                    return dataset.getFieldValues().get(i);
+                }
+
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Finds the index of a data set given its name.
+     *
+     * @param name The dataset name.
+     * @param response The response to search.
+     * @return The index of dataset if found or -1.
+     */
+    static int indexOfDataset(CharSequence name, FillResponse response) {
+        ArraySet<Dataset> datasets = response.getDatasets();
+        if (datasets == null || datasets.isEmpty()) {
+            return -1;
+        }
+        final int datasetCount = datasets.size();
+        for (int i = 0; i < datasetCount; i++) {
+            Dataset dataset = datasets.valueAt(i);
+            if (dataset.getName().toString().equals(name.toString())) {
+                return i;
+            }
+        }
+        return -1;
+    }
+
     private Helper() {
         throw new UnsupportedOperationException("contains static members only");
     }
diff --git a/services/autofill/java/com/android/server/autofill/RemoteFillService.java b/services/autofill/java/com/android/server/autofill/RemoteFillService.java
new file mode 100644
index 0000000..c469718
--- /dev/null
+++ b/services/autofill/java/com/android/server/autofill/RemoteFillService.java
@@ -0,0 +1,544 @@
+/*
+ * 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.server.autofill;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.app.assist.AssistStructure;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.os.Bundle;
+import android.os.IBinder;
+import android.os.IBinder.DeathRecipient;
+import android.os.ICancellationSignal;
+import android.os.Message;
+import android.os.RemoteException;
+import android.os.UserHandle;
+import android.service.autofill.AutoFillService;
+import android.service.autofill.FillResponse;
+import android.service.autofill.IAutoFillService;
+import android.service.autofill.IFillCallback;
+import android.service.autofill.ISaveCallback;
+import android.text.format.DateUtils;
+import android.util.Slog;
+import com.android.internal.os.HandlerCaller;
+import com.android.server.FgThread;
+
+import java.io.PrintWriter;
+import java.lang.ref.WeakReference;
+
+/**
+ * This class represents a remote fill service. It abstracts away the binding
+ * and unbinding from the remote implementation.
+ *
+ * <p>Clients can call methods of this class without worrying about when and
+ * how to bind/unbind/timeout. All state of this class is modified on a handler
+ * thread.
+ */
+final class RemoteFillService implements DeathRecipient {
+    private static final String LOG_TAG = "RemoteFillService";
+
+    private static final boolean DEBUG = Helper.DEBUG;
+
+    // How long after the last interaction with the service we would unbind
+    private static final long TIMEOUT_IDLE_BIND_MILLIS = 5 * DateUtils.MINUTE_IN_MILLIS;
+
+    private final Context mContext;
+
+    private final ComponentName mComponentName;
+
+    private final Intent mIntent;
+
+    private final FillServiceCallbacks mCallbacks;
+
+    private final int mUserId;
+
+    private final ServiceConnection mServiceConnection = new RemoteServiceConnection();
+
+    private final HandlerCaller mHandler;
+
+    private IAutoFillService mAutoFillService;
+
+    private boolean mBinding;
+
+    private boolean mDestroyed;
+
+    private boolean mServiceDied;
+
+    private boolean mCompleted;
+
+    private PendingRequest mPendingRequest;
+
+    public interface FillServiceCallbacks {
+        void onFillRequestSuccess(FillResponse response);
+        void onFillRequestFailure(CharSequence message);
+        void onSaveRequestSuccess();
+        void onSaveRequestFailure(CharSequence message);
+        void onServiceDied(RemoteFillService service);
+    }
+
+    public RemoteFillService(Context context, ComponentName componentName,
+            int userId, FillServiceCallbacks callbacks) {
+        mContext = context;
+        mCallbacks = callbacks;
+        mComponentName = componentName;
+        mIntent = new Intent(AutoFillService.SERVICE_INTERFACE)
+                .setComponent(mComponentName);
+        mUserId = userId;
+        mHandler = new MyHandler(context);
+    }
+
+    public void destroy() {
+        mHandler.obtainMessage(MyHandler.MSG_DESTROY).sendToTarget();
+    }
+
+    private void handleDestroy() {
+        if (mPendingRequest != null) {
+            mPendingRequest.cancel();
+            mPendingRequest = null;
+        }
+        ensureUnbound();
+        mDestroyed = true;
+    }
+
+    @Override
+    public void binderDied() {
+        mHandler.obtainMessage(MyHandler.MSG_BINDER_DIED).sendToTarget();
+    }
+
+    private void handleBinderDied() {
+        if (mAutoFillService != null) {
+            mAutoFillService.asBinder().unlinkToDeath(this, 0);
+        }
+        mAutoFillService = null;
+        mServiceDied = true;
+        mCallbacks.onServiceDied(this);
+    }
+
+    public void onFillRequest(@NonNull AssistStructure structure, @Nullable Bundle extras) {
+        cancelScheduledUnbind();
+        PendingFillRequest request = new PendingFillRequest(structure, extras, this);
+        mHandler.obtainMessageO(MyHandler.MSG_ON_PENDING_REQUEST, request).sendToTarget();
+    }
+
+    public void onSaveRequest(@NonNull AssistStructure structure, @Nullable Bundle extras) {
+        cancelScheduledUnbind();
+        PendingSaveRequest request = new PendingSaveRequest(structure, extras, this);
+        mHandler.obtainMessageO(MyHandler.MSG_ON_PENDING_REQUEST, request).sendToTarget();
+    }
+
+    // Note: we are dumping without a lock held so this is a bit racy but
+    // adding a lock to a class that offloads to a handler thread would
+    // mean adding a lock adding overhead to normal runtime operation.
+    public void dump(@NonNull String prefix, @NonNull PrintWriter pw) {
+        String tab = "  ";
+        pw.append(prefix).append("service:").println();
+        pw.append(prefix).append(tab).append("userId=")
+                .append(String.valueOf(mUserId)).println();
+        pw.append(prefix).append(tab).append("componentName=")
+                .append(mComponentName.flattenToString()).println();
+        pw.append(prefix).append(tab).append("destroyed=")
+                .append(String.valueOf(mDestroyed)).println();
+        pw.append(prefix).append(tab).append("bound=")
+                .append(String.valueOf(isBound())).println();
+        pw.append(prefix).append(tab).append("hasPendingRequest=")
+                .append(String.valueOf(mPendingRequest != null)).println();
+        pw.println();
+    }
+
+    private void cancelScheduledUnbind() {
+        mHandler.removeMessages(MyHandler.MSG_UNBIND);
+    }
+
+    private void scheduleUnbind() {
+        cancelScheduledUnbind();
+        Message message = mHandler.obtainMessage(MyHandler.MSG_UNBIND);
+        mHandler.sendMessageDelayed(message, TIMEOUT_IDLE_BIND_MILLIS);
+    }
+
+    private void handleUnbind() {
+        ensureUnbound();
+    }
+
+    private void handlePendingRequest(PendingRequest pendingRequest) {
+        if (mDestroyed || mCompleted) {
+            return;
+        }
+        if (pendingRequest.isFinal()) {
+            mCompleted = true;
+        }
+        if (!isBound()) {
+            if (mPendingRequest != null) {
+                mPendingRequest.cancel();
+            }
+            mPendingRequest = pendingRequest;
+            ensureBound();
+        } else {
+            if (DEBUG) {
+                Slog.d(LOG_TAG, "[user: " + mUserId + "] handlePendingRequest()");
+            }
+            pendingRequest.run();
+        }
+    }
+
+    private boolean isBound() {
+        return mAutoFillService != null;
+    }
+
+    private void ensureBound() {
+        if (isBound() || mBinding) {
+            return;
+        }
+        if (DEBUG) {
+            Slog.d(LOG_TAG, "[user: " + mUserId + "] ensureBound()");
+        }
+        mBinding = true;
+
+        boolean willBind = mContext.bindServiceAsUser(mIntent, mServiceConnection,
+                Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE,
+                new UserHandle(mUserId));
+
+        if (!willBind) {
+            if (DEBUG) {
+                Slog.d(LOG_TAG, "[user: " + mUserId + "] could not bind to " + mIntent);
+            }
+            mBinding = false;
+
+            if (!mServiceDied) {
+                handleBinderDied();
+            }
+        }
+    }
+
+    private void ensureUnbound() {
+        if (!isBound() && !mBinding) {
+            return;
+        }
+        if (DEBUG) {
+            Slog.d(LOG_TAG, "[user: " + mUserId + "] ensureUnbound()");
+        }
+        mBinding = false;
+        if (isBound()) {
+            // TODO(b/33197203, b/35395043): synchronize access instead
+            // Need to double check if it's null, since it could be set on onServiceDisconnected()
+            if (mAutoFillService != null) {
+                try {
+                    mAutoFillService.onDisconnected();
+                } catch (Exception e) {
+                    Slog.w(LOG_TAG, "Exception calling onDisconnected(): " + e);
+                }
+            }
+            if (mAutoFillService != null) {
+                mAutoFillService.asBinder().unlinkToDeath(this, 0);
+                mAutoFillService = null;
+            }
+        }
+        mContext.unbindService(mServiceConnection);
+    }
+
+    private void dispatchOnFillRequestSuccess(PendingRequest pendingRequest,
+            FillResponse response) {
+        mHandler.getHandler().post(() -> {
+            if (handleResponseCallbackCommon(pendingRequest)) {
+                mCallbacks.onFillRequestSuccess(response);
+            }
+        });
+    }
+
+    private void dispatchOnFillRequestFailure(PendingRequest pendingRequest,
+            CharSequence message) {
+        mHandler.getHandler().post(() -> {
+            if (handleResponseCallbackCommon(pendingRequest)) {
+                mCallbacks.onFillRequestFailure(message);
+            }
+        });
+    }
+
+    private void dispatchOnSaveRequestSuccess(PendingRequest pendingRequest) {
+        mHandler.getHandler().post(() -> {
+            if (handleResponseCallbackCommon(pendingRequest)) {
+                mCallbacks.onSaveRequestSuccess();
+            }
+        });
+    }
+
+    private void dispatchOnSaveRequestFailure(PendingRequest pendingRequest,
+            CharSequence message) {
+        mHandler.getHandler().post(() -> {
+            if (handleResponseCallbackCommon(pendingRequest)) {
+                mCallbacks.onSaveRequestFailure(message);
+            }
+        });
+    }
+
+    private boolean handleResponseCallbackCommon(PendingRequest pendingRequest) {
+        if (mDestroyed) {
+            return false;
+        }
+        if (mPendingRequest == pendingRequest) {
+            mPendingRequest = null;
+        }
+        if (mPendingRequest == null) {
+            scheduleUnbind();
+        }
+        return true;
+    }
+
+    private class RemoteServiceConnection implements ServiceConnection {
+        @Override
+        public void onServiceConnected(ComponentName name, IBinder service) {
+            if (mDestroyed || !mBinding) {
+                mContext.unbindService(mServiceConnection);
+                return;
+            }
+            mBinding = false;
+            mAutoFillService = IAutoFillService.Stub.asInterface(service);
+            try {
+                service.linkToDeath(RemoteFillService.this, 0);
+            } catch (RemoteException re) {
+                handleBinderDied();
+                return;
+            }
+
+            try {
+                // TODO(b/33197203, b/35395043): synchronize access instead
+                // Need to double check if it's null, since it could be set on
+                // onServiceDisconnected()
+                if (mAutoFillService != null) {
+                    mAutoFillService.onConnected();
+                }
+            } catch (RemoteException e) {
+                Slog.w(LOG_TAG, "Exception calling onConnected(): " + e);
+            }
+
+
+            if (mPendingRequest != null) {
+                handlePendingRequest(mPendingRequest);
+            }
+
+            mServiceDied = false;
+        }
+
+        @Override
+        public void onServiceDisconnected(ComponentName name) {
+            mBinding = true;
+            mAutoFillService = null;
+        }
+    }
+
+    private final class MyHandler extends HandlerCaller {
+        public static final int MSG_DESTROY = 1;
+        public static final int MSG_BINDER_DIED = 2;
+        public static final int MSG_UNBIND = 3;
+        public static final int MSG_ON_PENDING_REQUEST = 4;
+
+        public MyHandler(Context context) {
+            // Cannot use lambda - doesn't compile
+            super(context, FgThread.getHandler().getLooper(), new Callback() {
+                @Override
+                public void executeMessage(Message message) {
+                    if (mDestroyed) {
+                        Slog.w(LOG_TAG, "Not handling " + message + " as service for "
+                                + mComponentName + " is already destroyed");
+                        return;
+                    }
+                    switch (message.what) {
+                        case MSG_DESTROY: {
+                            handleDestroy();
+                        } break;
+
+                        case MSG_BINDER_DIED: {
+                            handleBinderDied();
+                        } break;
+
+                        case MSG_UNBIND: {
+                            handleUnbind();
+                        } break;
+
+                        case MSG_ON_PENDING_REQUEST: {
+                            handlePendingRequest((PendingRequest) message.obj);
+                        } break;
+                    }
+                }
+            }, false);
+        }
+    }
+
+    private static abstract class PendingRequest implements Runnable {
+        void cancel() {
+
+        }
+
+        /**
+         * @return whether this request leads to a final state where no
+         * other requests can be made.
+         */
+        boolean isFinal() {
+            return false;
+        }
+    }
+
+    private static final class PendingFillRequest extends PendingRequest {
+        private final Object mLock = new Object();
+        private final WeakReference<RemoteFillService> mWeakService;
+        private AssistStructure mStructure;
+        private Bundle mExtras;
+        private final IFillCallback mCallback;
+        private ICancellationSignal mCancellation;
+        private boolean mCancelled;
+
+        public PendingFillRequest(AssistStructure structure,
+                Bundle extras, RemoteFillService service) {
+            mStructure = structure;
+            mExtras = extras;
+            mWeakService = new WeakReference<>(service);
+            mCallback = new IFillCallback.Stub() {
+                @Override
+                public void onCancellable(ICancellationSignal cancellation) {
+                    synchronized (mLock) {
+                        final boolean cancelled;
+                        synchronized (mLock) {
+                            mCancellation = cancellation;
+                            cancelled = mCancelled;
+                        }
+                        if (cancelled) {
+                            try {
+                                cancellation.cancel();
+                            } catch (RemoteException e) {
+                                Slog.e(LOG_TAG, "Error requesting a cancellation", e);
+                            }
+                        }
+                    }
+                }
+
+                @Override
+                public void onSuccess(FillResponse response) {
+                    RemoteFillService remoteService = mWeakService.get();
+                    if (remoteService != null) {
+                        remoteService.dispatchOnFillRequestSuccess(
+                                PendingFillRequest.this, response);
+                    }
+                }
+
+                @Override
+                public void onFailure(CharSequence message) {
+                    RemoteFillService remoteService = mWeakService.get();
+                    if (remoteService != null) {
+                        remoteService.dispatchOnFillRequestFailure(
+                                PendingFillRequest.this, message);
+                    }
+                }
+            };
+        }
+
+        @Override
+        public void run() {
+            RemoteFillService remoteService = mWeakService.get();
+            if (remoteService != null) {
+                try {
+                    remoteService.mAutoFillService.onFillRequest(mStructure,
+                            mExtras, mCallback);
+                    synchronized (mLock) {
+                        mStructure = null;
+                        mExtras = null;
+                    }
+                } catch (RemoteException e) {
+                    Slog.e(LOG_TAG, "Error calling on fill request", e);
+                    cancel();
+                }
+            }
+        }
+
+        @Override
+        public void cancel() {
+            final ICancellationSignal cancellation;
+            synchronized (mLock) {
+                if (mCancelled) {
+                    return;
+                }
+                mCancelled = true;
+                cancellation = mCancellation;
+            }
+            if (cancellation == null) {
+                return;
+            }
+            try {
+                cancellation.cancel();
+            } catch (RemoteException e) {
+                Slog.e(LOG_TAG, "Error cancelling a fill request", e);
+            }
+        }
+    }
+
+    private static final class PendingSaveRequest extends PendingRequest {
+        private final Object mLock = new Object();
+        private final WeakReference<RemoteFillService> mWeakService;
+        private AssistStructure mStructure;
+        private Bundle mExtras;
+        private final ISaveCallback mCallback;
+
+        public PendingSaveRequest(@NonNull AssistStructure structure,
+                @Nullable Bundle extras, @NonNull RemoteFillService service) {
+            mStructure = structure;
+            mExtras = extras;
+            mWeakService = new WeakReference<>(service);
+            mCallback = new ISaveCallback.Stub() {
+                @Override
+                public void onSuccess() {
+                    RemoteFillService service = mWeakService.get();
+                    if (service != null) {
+                        service.dispatchOnSaveRequestSuccess(
+                                PendingSaveRequest.this);
+                    }
+                }
+
+                @Override
+                public void onFailure(CharSequence message) {
+                    RemoteFillService service = mWeakService.get();
+                    if (service != null) {
+                        service.dispatchOnSaveRequestFailure(
+                                PendingSaveRequest.this, message);
+                    }
+                }
+            };
+        }
+
+        @Override
+        public void run() {
+            RemoteFillService service = mWeakService.get();
+            if (service != null) {
+                try {
+                    service.mAutoFillService.onSaveRequest(mStructure,
+                            mExtras, mCallback);
+                    synchronized (mLock) {
+                        mStructure = null;
+                        mExtras = null;
+                    }
+                } catch (RemoteException e) {
+                    Slog.e(LOG_TAG, "Error calling on save request", e);
+                }
+            }
+        }
+
+        @Override
+        public boolean isFinal() {
+            return true;
+        }
+    }
+}
diff --git a/services/autofill/java/com/android/server/autofill/SignInPrompt.java b/services/autofill/java/com/android/server/autofill/SignInPrompt.java
new file mode 100644
index 0000000..6d17acd
--- /dev/null
+++ b/services/autofill/java/com/android/server/autofill/SignInPrompt.java
@@ -0,0 +1,38 @@
+/*
+ * 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.server.autofill;
+
+import android.content.Context;
+import android.view.View;
+import android.widget.Button;
+
+/**
+ * A view displaying the sign-in prompt for an auto-fill service.
+ */
+final class SignInPrompt extends Button {
+
+    SignInPrompt(Context context, CharSequence serviceName, View.OnClickListener listener) {
+        super(context);
+        // TODO(b/33197203): use strings.xml
+        final String text = serviceName != null
+                ? "Sign in to " + serviceName + " to autofill"
+                : "Sign in to autofill";
+
+        // TODO(b/33197203): polish UI / use better altenative than a button...
+        setText(text);
+        setOnClickListener(listener);
+    }
+}
diff --git a/services/backup/java/com/android/server/backup/BackupManagerService.java b/services/backup/java/com/android/server/backup/BackupManagerService.java
index 88c05b5..4c22da3 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;
         }
@@ -587,15 +599,42 @@
     static final int OP_ACKNOWLEDGED = 1;
     static final int OP_TIMEOUT = -1;
 
-    class Operation {
-        public int state;
-        public BackupRestoreTask callback;
+    private static final int OP_TYPE_WAIT = 0;    // Waiting for BackupAgent.
+    private static final int OP_TYPE_BACKUP = 1;  // Backup operation in progress.
 
-        Operation(int initialState, BackupRestoreTask callbackObj) {
+    class Operation {
+        int state;
+        final BackupRestoreTask callback;
+        final int type;
+
+        Operation(int initialState, BackupRestoreTask callbackObj, int type) {
             state = initialState;
             callback = callbackObj;
+            this.type = type;
         }
     }
+
+    /**
+     * mCurrentOperations contains the list of currently active operations.
+     *
+     * If type of operation is OP_TYPE_WAIT, it are waiting for an ack or timeout.
+     * An operation wraps a BackupRestoreTask within it.
+     * It's the responsibility of this task to remove the operation from this array.
+     *
+     * A BackupRestore task gets notified of ack/timeout for the operation via
+     * BackupRestoreTask#handleCancel, BackupRestoreTask#operationComplete and notifyAll called
+     * on the mCurrentOpLock. {@link BackupManagerService#waitUntilOperationComplete(int)} is
+     * used in various places to 'wait' for notifyAll and detect change of pending state of an
+     * operation. So typically, an operation will be removed from this array by:
+     *   - BackupRestoreTask#handleCancel and
+     *   - BackupRestoreTask#operationComplete OR waitUntilOperationComplete. Do not remove at both
+     *     these places because waitUntilOperationComplete relies on the operation being present to
+     *     determine its completion status.
+     *
+     * If type of operation is OP_BACKUP, it is a task running backups. It provides a handle to
+     * cancel backup tasks.
+     */
+    @GuardedBy("mCurrentOpLock")
     final SparseArray<Operation> mCurrentOperations = new SparseArray<Operation>();
     final Object mCurrentOpLock = new Object();
     final Random mTokenGenerator = new Random();
@@ -785,8 +824,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 +900,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;
@@ -955,7 +994,8 @@
 
             case MSG_TIMEOUT:
             {
-                handleTimeout(msg.arg1, msg.obj);
+                Slog.d(TAG, "Timeout message received for token=" + Integer.toHexString(msg.arg1));
+                handleCancel(msg.arg1, false);
                 break;
             }
 
@@ -1025,7 +1065,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 +1555,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 +2321,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,11 +2387,43 @@
 
         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;
     }
 
+    // Cancel all running backups.
+    public void cancelBackups(){
+        mContext.enforceCallingPermission(android.Manifest.permission.BACKUP, "cancelBackups");
+        if (MORE_DEBUG) {
+            Slog.i(TAG, "cancelBackups() called.");
+        }
+        final long oldToken = Binder.clearCallingIdentity();
+        try {
+            List<Integer> operationsToCancel = new ArrayList<>();
+            synchronized (mCurrentOpLock) {
+                for (int i = 0; i < mCurrentOperations.size(); i++) {
+                    Operation op = mCurrentOperations.valueAt(i);
+                    int token = mCurrentOperations.keyAt(i);
+                    if (op.type == OP_TYPE_BACKUP) {
+                        operationsToCancel.add(token);
+                    }
+                }
+
+                for (Integer token : operationsToCancel) {
+                    handleCancel(token, true /* cancelAll */);
+                }
+            }
+
+            // We don't want the backup jobs to kick in any time soon.
+            // Reschedules them to run in the distant future.
+            KeyValueBackupJob.schedule(mContext, BUSY_BACKOFF_MIN_MILLIS);
+            FullBackupJob.schedule(mContext, 2 * BUSY_BACKOFF_MIN_MILLIS);
+        } finally {
+            Binder.restoreCallingIdentity(oldToken);
+        }
+    }
+
     // -----
     // Interface and methods used by the asynchronous-with-timeout backup/restore operations
 
@@ -2352,20 +2435,34 @@
         void operationComplete(long result);
 
         // An operation that wanted a callback has timed out
-        void handleTimeout();
+        void handleCancel(boolean cancelAll);
     }
 
-    void prepareOperationTimeout(int token, long interval, BackupRestoreTask callback) {
+    void prepareOperationTimeout(int token, long interval, BackupRestoreTask callback,
+            int operationType) {
         if (MORE_DEBUG) Slog.v(TAG, "starting timeout: token=" + Integer.toHexString(token)
                 + " interval=" + interval + " callback=" + callback);
         synchronized (mCurrentOpLock) {
-            mCurrentOperations.put(token, new Operation(OP_PENDING, callback));
+            mCurrentOperations.put(token, new Operation(OP_PENDING, callback, operationType));
 
             Message msg = mBackupHandler.obtainMessage(MSG_TIMEOUT, token, 0, callback);
             mBackupHandler.sendMessageDelayed(msg, interval);
         }
     }
 
+    private void removeOperation(int token) {
+        if (MORE_DEBUG) {
+            Slog.d(TAG, "Removing operation token=" + Integer.toHexString(token));
+        }
+        synchronized (mCurrentOpLock) {
+            if (mCurrentOperations.get(token) == null) {
+                Slog.w(TAG, "Duplicate remove for operation. token=" +
+                        Integer.toHexString(token));
+            }
+            mCurrentOperations.remove(token);
+        }
+    }
+
     // synchronous waiter case
     boolean waitUntilOperationComplete(int token) {
         if (MORE_DEBUG) Slog.i(TAG, "Blocking until operation complete for "
@@ -2382,9 +2479,14 @@
                     if (op.state == OP_PENDING) {
                         try {
                             mCurrentOpLock.wait();
-                        } catch (InterruptedException e) {}
+                        } catch (InterruptedException e) {
+                        }
                         // When the wait is notified we loop around and recheck the current state
                     } else {
+                        if (MORE_DEBUG) {
+                            Slog.d(TAG, "Unblocked waiting for operation token=" +
+                                    Integer.toHexString(token));
+                        }
                         // No longer pending; we're done
                         finalState = op.state;
                         break;
@@ -2393,33 +2495,36 @@
             }
         }
 
+        removeOperation(token);
         mBackupHandler.removeMessages(MSG_TIMEOUT);
         if (MORE_DEBUG) Slog.v(TAG, "operation " + Integer.toHexString(token)
                 + " complete: finalState=" + finalState);
         return finalState == OP_ACKNOWLEDGED;
     }
 
-    void handleTimeout(int token, Object obj) {
+    void handleCancel(int token, boolean cancelAll) {
         // Notify any synchronous waiters
         Operation op = null;
         synchronized (mCurrentOpLock) {
             op = mCurrentOperations.get(token);
             if (MORE_DEBUG) {
-                if (op == null) Slog.w(TAG, "Timeout of token " + Integer.toHexString(token)
+                if (op == null) Slog.w(TAG, "Cancel of token " + Integer.toHexString(token)
                         + " but no op found");
             }
             int state = (op != null) ? op.state : OP_TIMEOUT;
             if (state == OP_ACKNOWLEDGED) {
                 // The operation finished cleanly, so we have nothing more to do.
-                if (MORE_DEBUG) {
-                    Slog.v(TAG, "handleTimeout() after success; cleanup happens now");
+                if (DEBUG) {
+                    Slog.w(TAG, "Operation already got an ack." +
+                            "Should have been removed from mCurrentOperations.");
                 }
                 op = null;
                 mCurrentOperations.delete(token);
             } else if (state == OP_PENDING) {
-                if (DEBUG) Slog.v(TAG, "TIMEOUT: token=" + Integer.toHexString(token));
+                if (DEBUG) Slog.v(TAG, "Cancel: token=" + Integer.toHexString(token));
                 op.state = OP_TIMEOUT;
-                // Leaves the object in place for later ack
+                // Can't delete op from mCurrentOperations here. waitUntilOperationComplete may be
+                // called after we receive cancel here. We need this op's state there.
             }
             mCurrentOpLock.notifyAll();
         }
@@ -2427,9 +2532,9 @@
         // If there's a TimeoutHandler for this event, call it
         if (op != null && op.callback != null) {
             if (MORE_DEBUG) {
-                Slog.v(TAG, "   Invoking timeout on " + op.callback);
+                Slog.v(TAG, "   Invoking cancel on " + op.callback);
             }
-            op.callback.handleTimeout();
+            op.callback.handleCancel(cancelAll);
         }
     }
 
@@ -2441,9 +2546,36 @@
         FINAL
     }
 
+    /**
+     * This class handles the process of backing up a given list of key/value backup packages.
+     * Also takes in a list of pending dolly backups and kicks them off when key/value backups
+     * are done.
+     *
+     * Flow:
+     * If required, backup @pm@.
+     * For each pending key/value backup package:
+     *     - Bind to agent.
+     *     - Call agent.doBackup()
+     *     - Wait either for cancel/timeout or operationComplete() callback from the agent.
+     * Start task to perform dolly backups.
+     *
+     * There are three entry points into this class:
+     *     - execute() [Called from the handler thread]
+     *     - operationComplete(long result) [Called from the handler thread]
+     *     - handleCancel(boolean cancelAll) [Can be called from any thread]
+     * These methods synchronize on mCancelLock.
+     *
+     * Interaction with mCurrentOperations:
+     *     - An entry for this task is put into mCurrentOperations for the entire lifetime of the
+     *       task. This is useful to cancel the task if required.
+     *     - An ephemeral entry is put into mCurrentOperations each time we are waiting on for
+     *       response from a backup agent. This is used to plumb timeouts and completion callbacks.
+     */
     class PerformBackupTask implements BackupRestoreTask {
         private static final String TAG = "PerformBackupTask";
 
+        private final Object mCancelLock = new Object();
+
         IBackupTransport mTransport;
         ArrayList<BackupRequest> mQueue;
         ArrayList<BackupRequest> mOriginalQueue;
@@ -2452,6 +2584,11 @@
         BackupState mCurrentState;
         ArrayList<String> mPendingFullBackups;
         IBackupObserver mObserver;
+        IBackupManagerMonitor mMonitor;
+
+        private final PerformFullTransportBackupTask mFullBackupTask;
+        private final int mCurrentOpToken;
+        private volatile int mEphemeralOpToken;
 
         // carried information about the current in-flight operation
         IBackupAgent mAgentBinder;
@@ -2467,46 +2604,80 @@
         final boolean mUserInitiated;
         final boolean mNonIncremental;
 
+        private volatile boolean mCancelAll;
+
         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;
+            mQueue = new ArrayList<>();
             mJournal = journal;
             mObserver = observer;
+            mMonitor = monitor;
             mPendingFullBackups = pendingFullBackups;
             mUserInitiated = userInitiated;
             mNonIncremental = nonIncremental;
 
             mStateDir = new File(mBaseStateDir, dirName);
+            mCurrentOpToken = generateToken();
 
             mCurrentState = BackupState.INITIAL;
             mFinished = false;
 
+            CountDownLatch latch = new CountDownLatch(1);
+            String[] fullBackups =
+                    mPendingFullBackups.toArray(new String[mPendingFullBackups.size()]);
+            mFullBackupTask =
+                    new PerformFullTransportBackupTask(/*fullBackupRestoreObserver*/ null,
+                            fullBackups, /*updateSchedule*/ false, /*runningJob*/ null, latch,
+                            mObserver, mMonitor,mUserInitiated);
+
+            registerTask();
             addBackupTrace("STATE => INITIAL");
         }
 
+        /**
+         * Put this task in the repository of running tasks.
+         */
+        private void registerTask() {
+            synchronized (mCurrentOpLock) {
+                mCurrentOperations.put(mCurrentOpToken, new Operation(OP_PENDING, this,
+                        OP_TYPE_BACKUP));
+            }
+        }
+
+        /**
+         * Remove this task from repository of running tasks.
+         */
+        private void unregisterTask() {
+            removeOperation(mCurrentOpToken);
+        }
+
         // Main entry point: perform one chunk of work, updating the state as appropriate
         // and reposting the next chunk to the primary backup handler thread.
         @Override
+        @GuardedBy("mCancelLock")
         public void execute() {
-            switch (mCurrentState) {
-                case INITIAL:
-                    beginBackup();
-                    break;
+            synchronized (mCancelLock) {
+                switch (mCurrentState) {
+                    case INITIAL:
+                        beginBackup();
+                        break;
 
-                case RUNNING_QUEUE:
-                    invokeNextAgent();
-                    break;
+                    case RUNNING_QUEUE:
+                        invokeNextAgent();
+                        break;
 
-                case FINAL:
-                    if (!mFinished) finalizeBackup();
-                    else {
-                        Slog.e(TAG, "Duplicate finish");
-                    }
-                    mFinished = true;
-                    break;
+                    case FINAL:
+                        if (!mFinished) finalizeBackup();
+                        else {
+                            Slog.e(TAG, "Duplicate finish");
+                        }
+                        mFinished = true;
+                        break;
+                }
             }
         }
 
@@ -2771,6 +2942,12 @@
         void finalizeBackup() {
             addBackupTrace("finishing");
 
+            // Mark packages that we didn't backup (because backup was cancelled, etc.) as needing
+            // backup.
+            for (BackupRequest req : mQueue) {
+                dataChangedImpl(req.packageName);
+            }
+
             // Either backup was successful, in which case we of course do not need
             // this pass's journal any more; or it failed, in which case we just
             // re-enqueued all of these packages in the current active journal.
@@ -2825,7 +3002,9 @@
 
             clearBackupTrace();
 
-            if (mStatus == BackupTransport.TRANSPORT_OK &&
+            unregisterTask();
+
+            if (!mCancelAll && mStatus == BackupTransport.TRANSPORT_OK &&
                     mPendingFullBackups != null && !mPendingFullBackups.isEmpty()) {
                 Slog.d(TAG, "Starting full backups for: " + mPendingFullBackups);
                 CountDownLatch latch = new CountDownLatch(1);
@@ -2834,11 +3013,15 @@
                 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();
+                (new Thread(mFullBackupTask, "full-transport-requested")).start();
+            } else if (mCancelAll) {
+                mFullBackupTask.unregisterTask();
+                sendBackupFinished(mObserver, BackupManager.ERROR_BACKUP_CANCELLED);
             } else {
+                mFullBackupTask.unregisterTask();
                 switch (mStatus) {
                     case BackupTransport.TRANSPORT_OK:
                         sendBackupFinished(mObserver, BackupManager.SUCCESS);
@@ -2880,7 +3063,8 @@
             mBackupData = null;
             mNewState = null;
 
-            final int token = generateToken();
+            boolean callingAgent = false;
+            mEphemeralOpToken = generateToken();
             try {
                 // Look up the package info & signatures.  This is first so that if it
                 // throws an exception, there's no file setup yet that would need to
@@ -2914,18 +3098,25 @@
                         ParcelFileDescriptor.MODE_CREATE |
                         ParcelFileDescriptor.MODE_TRUNCATE);
 
+                final long quota = mTransport.getBackupQuota(packageName, false /* isFullBackup */);
+                callingAgent = true;
+
                 // Initiate the target's backup pass
                 addBackupTrace("setting timeout");
-                prepareOperationTimeout(token, TIMEOUT_BACKUP_INTERVAL, this);
+                prepareOperationTimeout(mEphemeralOpToken, TIMEOUT_BACKUP_INTERVAL, this,
+                        OP_TYPE_WAIT);
                 addBackupTrace("calling agent doBackup()");
-                agent.doBackup(mSavedState, mBackupData, mNewState, token, mBackupManagerBinder);
+
+                agent.doBackup(mSavedState, mBackupData, mNewState, quota, mEphemeralOpToken,
+                        mBackupManagerBinder);
             } catch (Exception e) {
-                Slog.e(TAG, "Error invoking for backup on " + packageName);
+                Slog.e(TAG, "Error invoking for backup on " + packageName + ". " + e);
                 addBackupTrace("exception: " + e);
                 EventLog.writeEvent(EventLogTags.BACKUP_AGENT_FAILURE, packageName,
                         e.toString());
-                agentErrorCleanup();
-                return BackupTransport.AGENT_ERROR;
+                errorCleanup();
+                return callingAgent ? BackupTransport.AGENT_ERROR
+                        : BackupTransport.TRANSPORT_ERROR;
             } finally {
                 if (mNonIncremental) {
                     blankStateName.delete();
@@ -3028,192 +3219,225 @@
         }
 
         @Override
+        @GuardedBy("mCancelLock")
         public void operationComplete(long unusedResult) {
-            // The agent reported back to us!
-
-            if (mBackupData == null) {
-                // This callback was racing with our timeout, so we've cleaned up the
-                // agent state already and are on to the next thing.  We have nothing
-                // further to do here: agent state having been cleared means that we've
-                // initiated the appropriate next operation.
-                final String pkg = (mCurrentPackage != null)
-                        ? mCurrentPackage.packageName : "[none]";
-                if (MORE_DEBUG) {
-                    Slog.i(TAG, "Callback after agent teardown: " + pkg);
+            removeOperation(mEphemeralOpToken);
+            synchronized (mCancelLock) {
+                // The agent reported back to us!
+                if (mFinished) {
+                    Slog.d(TAG, "operationComplete received after task finished.");
+                    return;
                 }
-                addBackupTrace("late opComplete; curPkg = " + pkg);
-                return;
-            }
 
-            final String pkgName = mCurrentPackage.packageName;
-            final long filepos = mBackupDataName.length();
-            FileDescriptor fd = mBackupData.getFileDescriptor();
-            try {
-                // If it's a 3rd party app, see whether they wrote any protected keys
-                // and complain mightily if they are attempting shenanigans.
-                if (mCurrentPackage.applicationInfo != null &&
-                        (mCurrentPackage.applicationInfo.flags&ApplicationInfo.FLAG_SYSTEM) == 0) {
-                    ParcelFileDescriptor readFd = ParcelFileDescriptor.open(mBackupDataName,
-                            ParcelFileDescriptor.MODE_READ_ONLY);
-                    BackupDataInput in = new BackupDataInput(readFd.getFileDescriptor());
-                    try {
-                        while (in.readNextHeader()) {
-                            final String key = in.getKey();
-                            if (key != null && key.charAt(0) >= 0xff00) {
-                                // Not okay: crash them and bail.
-                                failAgent(mAgentBinder, "Illegal backup key: " + key);
-                                addBackupTrace("illegal key " + key + " from " + pkgName);
-                                EventLog.writeEvent(EventLogTags.BACKUP_AGENT_FAILURE, pkgName,
-                                        "bad key");
-                                mBackupHandler.removeMessages(MSG_TIMEOUT);
-                                sendBackupOnPackageResult(mObserver, pkgName,
-                                        BackupManager.ERROR_AGENT_FAILURE);
-                                agentErrorCleanup();
-                                // agentErrorCleanup() implicitly executes next state properly
-                                return;
-                            }
-                            in.skipEntityData();
-                        }
-                    } finally {
-                        if (readFd != null) {
-                            readFd.close();
-                        }
+                if (mBackupData == null) {
+                    // This callback was racing with our timeout, so we've cleaned up the
+                    // agent state already and are on to the next thing.  We have nothing
+                    // further to do here: agent state having been cleared means that we've
+                    // initiated the appropriate next operation.
+                    final String pkg = (mCurrentPackage != null)
+                            ? mCurrentPackage.packageName : "[none]";
+                    if (MORE_DEBUG) {
+                        Slog.i(TAG, "Callback after agent teardown: " + pkg);
                     }
+                    addBackupTrace("late opComplete; curPkg = " + pkg);
+                    return;
                 }
 
-                // Piggyback the widget state payload, if any
-                writeWidgetPayloadIfAppropriate(fd, pkgName);
-            } catch (IOException e) {
-                // Hard disk error; recovery/failure policy TBD.  For now roll back,
-                // but we may want to consider this a transport-level failure (i.e.
-                // we're in such a bad state that we can't contemplate doing backup
-                // operations any more during this pass).
-                Slog.w(TAG, "Unable to save widget state for " + pkgName);
+                final String pkgName = mCurrentPackage.packageName;
+                final long filepos = mBackupDataName.length();
+                FileDescriptor fd = mBackupData.getFileDescriptor();
                 try {
-                    Os.ftruncate(fd, filepos);
-                } catch (ErrnoException ee) {
-                    Slog.w(TAG, "Unable to roll back!");
-                }
-            }
-
-            // Spin the data off to the transport and proceed with the next stage.
-            if (MORE_DEBUG) Slog.v(TAG, "operationComplete(): sending data to transport for "
-                    + pkgName);
-            mBackupHandler.removeMessages(MSG_TIMEOUT);
-            clearAgentState();
-            addBackupTrace("operation complete");
-
-            ParcelFileDescriptor backupData = null;
-            mStatus = BackupTransport.TRANSPORT_OK;
-            long size = 0;
-            try {
-                size = mBackupDataName.length();
-                if (size > 0) {
-                    if (mStatus == BackupTransport.TRANSPORT_OK) {
-                        backupData = ParcelFileDescriptor.open(mBackupDataName,
+                    // If it's a 3rd party app, see whether they wrote any protected keys
+                    // and complain mightily if they are attempting shenanigans.
+                    if (mCurrentPackage.applicationInfo != null &&
+                            (mCurrentPackage.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM)
+                                    == 0) {
+                        ParcelFileDescriptor readFd = ParcelFileDescriptor.open(mBackupDataName,
                                 ParcelFileDescriptor.MODE_READ_ONLY);
-                        addBackupTrace("sending data to transport");
-                        int flags = mUserInitiated ? BackupTransport.FLAG_USER_INITIATED : 0;
-                        mStatus = mTransport.performBackup(mCurrentPackage, backupData, flags);
+                        BackupDataInput in = new BackupDataInput(readFd.getFileDescriptor());
+                        try {
+                            while (in.readNextHeader()) {
+                                final String key = in.getKey();
+                                if (key != null && key.charAt(0) >= 0xff00) {
+                                    // Not okay: crash them and bail.
+                                    failAgent(mAgentBinder, "Illegal backup key: " + key);
+                                    addBackupTrace("illegal key " + key + " from " + pkgName);
+                                    EventLog.writeEvent(EventLogTags.BACKUP_AGENT_FAILURE, pkgName,
+                                            "bad key");
+                                    mBackupHandler.removeMessages(MSG_TIMEOUT);
+                                    sendBackupOnPackageResult(mObserver, pkgName,
+                                            BackupManager.ERROR_AGENT_FAILURE);
+                                    errorCleanup();
+                                    // agentErrorCleanup() implicitly executes next state properly
+                                    return;
+                                }
+                                in.skipEntityData();
+                            }
+                        } finally {
+                            if (readFd != null) {
+                                readFd.close();
+                            }
+                        }
                     }
 
-                    // TODO - We call finishBackup() for each application backed up, because
-                    // we need to know now whether it succeeded or failed.  Instead, we should
-                    // hold off on finishBackup() until the end, which implies holding off on
-                    // renaming *all* the output state files (see below) until that happens.
-
-                    addBackupTrace("data delivered: " + mStatus);
-                    if (mStatus == BackupTransport.TRANSPORT_OK) {
-                        addBackupTrace("finishing op on transport");
-                        mStatus = mTransport.finishBackup();
-                        addBackupTrace("finished: " + mStatus);
-                    } else if (mStatus == BackupTransport.TRANSPORT_PACKAGE_REJECTED) {
-                        addBackupTrace("transport rejected package");
+                    // Piggyback the widget state payload, if any
+                    writeWidgetPayloadIfAppropriate(fd, pkgName);
+                } catch (IOException e) {
+                    // Hard disk error; recovery/failure policy TBD.  For now roll back,
+                    // but we may want to consider this a transport-level failure (i.e.
+                    // we're in such a bad state that we can't contemplate doing backup
+                    // operations any more during this pass).
+                    Slog.w(TAG, "Unable to save widget state for " + pkgName);
+                    try {
+                        Os.ftruncate(fd, filepos);
+                    } catch (ErrnoException ee) {
+                        Slog.w(TAG, "Unable to roll back!");
                     }
-                } else {
-                    if (MORE_DEBUG) Slog.i(TAG, "no backup data written; not calling transport");
-                    addBackupTrace("no data to send");
                 }
 
-                if (mStatus == BackupTransport.TRANSPORT_OK) {
-                    // After successful transport, delete the now-stale data
-                    // and juggle the files so that next time we supply the agent
-                    // with the new state file it just created.
-                    mBackupDataName.delete();
-                    mNewStateName.renameTo(mSavedStateName);
-                    sendBackupOnPackageResult(mObserver, pkgName, BackupManager.SUCCESS);
-                    EventLog.writeEvent(EventLogTags.BACKUP_PACKAGE, pkgName, size);
-                    logBackupComplete(pkgName);
-                } else if (mStatus == BackupTransport.TRANSPORT_PACKAGE_REJECTED) {
-                    // The transport has rejected backup of this specific package.  Roll it
-                    // back but proceed with running the rest of the queue.
-                    mBackupDataName.delete();
-                    mNewStateName.delete();
-                    sendBackupOnPackageResult(mObserver, pkgName,
-                            BackupManager.ERROR_TRANSPORT_PACKAGE_REJECTED);
-                    EventLogTags.writeBackupAgentFailure(pkgName, "Transport rejected");
-                } else if (mStatus == BackupTransport.TRANSPORT_QUOTA_EXCEEDED) {
-                    sendBackupOnPackageResult(mObserver, pkgName,
-                            BackupManager.ERROR_TRANSPORT_QUOTA_EXCEEDED);
-                    EventLog.writeEvent(EventLogTags.BACKUP_QUOTA_EXCEEDED, pkgName);
-                } else {
-                    // Actual transport-level failure to communicate the data to the backend
+                // Spin the data off to the transport and proceed with the next stage.
+                if (MORE_DEBUG) Slog.v(TAG, "operationComplete(): sending data to transport for "
+                        + pkgName);
+                mBackupHandler.removeMessages(MSG_TIMEOUT);
+                clearAgentState();
+                addBackupTrace("operation complete");
+
+                ParcelFileDescriptor backupData = null;
+                mStatus = BackupTransport.TRANSPORT_OK;
+                long size = 0;
+                try {
+                    size = mBackupDataName.length();
+                    if (size > 0) {
+                        if (mStatus == BackupTransport.TRANSPORT_OK) {
+                            backupData = ParcelFileDescriptor.open(mBackupDataName,
+                                    ParcelFileDescriptor.MODE_READ_ONLY);
+                            addBackupTrace("sending data to transport");
+                            int flags = mUserInitiated ? BackupTransport.FLAG_USER_INITIATED : 0;
+                            mStatus = mTransport.performBackup(mCurrentPackage, backupData, flags);
+                        }
+
+                        // TODO - We call finishBackup() for each application backed up, because
+                        // we need to know now whether it succeeded or failed.  Instead, we should
+                        // hold off on finishBackup() until the end, which implies holding off on
+                        // renaming *all* the output state files (see below) until that happens.
+
+                        addBackupTrace("data delivered: " + mStatus);
+                        if (mStatus == BackupTransport.TRANSPORT_OK) {
+                            addBackupTrace("finishing op on transport");
+                            mStatus = mTransport.finishBackup();
+                            addBackupTrace("finished: " + mStatus);
+                        } else if (mStatus == BackupTransport.TRANSPORT_PACKAGE_REJECTED) {
+                            addBackupTrace("transport rejected package");
+                        }
+                    } else {
+                        if (MORE_DEBUG) Slog.i(TAG,
+                                "no backup data written; not calling transport");
+                        addBackupTrace("no data to send");
+                    }
+
+                    if (mStatus == BackupTransport.TRANSPORT_OK) {
+                        // After successful transport, delete the now-stale data
+                        // and juggle the files so that next time we supply the agent
+                        // with the new state file it just created.
+                        mBackupDataName.delete();
+                        mNewStateName.renameTo(mSavedStateName);
+                        sendBackupOnPackageResult(mObserver, pkgName, BackupManager.SUCCESS);
+                        EventLog.writeEvent(EventLogTags.BACKUP_PACKAGE, pkgName, size);
+                        logBackupComplete(pkgName);
+                    } else if (mStatus == BackupTransport.TRANSPORT_PACKAGE_REJECTED) {
+                        // The transport has rejected backup of this specific package.  Roll it
+                        // back but proceed with running the rest of the queue.
+                        mBackupDataName.delete();
+                        mNewStateName.delete();
+                        sendBackupOnPackageResult(mObserver, pkgName,
+                                BackupManager.ERROR_TRANSPORT_PACKAGE_REJECTED);
+                        EventLogTags.writeBackupAgentFailure(pkgName, "Transport rejected");
+                    } else if (mStatus == BackupTransport.TRANSPORT_QUOTA_EXCEEDED) {
+                        sendBackupOnPackageResult(mObserver, pkgName,
+                                BackupManager.ERROR_TRANSPORT_QUOTA_EXCEEDED);
+                        EventLog.writeEvent(EventLogTags.BACKUP_QUOTA_EXCEEDED, pkgName);
+                    } else {
+                        // Actual transport-level failure to communicate the data to the backend
+                        sendBackupOnPackageResult(mObserver, pkgName,
+                                BackupManager.ERROR_TRANSPORT_ABORTED);
+                        EventLog.writeEvent(EventLogTags.BACKUP_TRANSPORT_FAILURE, pkgName);
+                    }
+                } catch (Exception e) {
                     sendBackupOnPackageResult(mObserver, pkgName,
                             BackupManager.ERROR_TRANSPORT_ABORTED);
+                    Slog.e(TAG, "Transport error backing up " + pkgName, e);
                     EventLog.writeEvent(EventLogTags.BACKUP_TRANSPORT_FAILURE, pkgName);
-                }
-            } catch (Exception e) {
-                sendBackupOnPackageResult(mObserver, pkgName,
-                        BackupManager.ERROR_TRANSPORT_ABORTED);
-                Slog.e(TAG, "Transport error backing up " + pkgName, e);
-                EventLog.writeEvent(EventLogTags.BACKUP_TRANSPORT_FAILURE, pkgName);
-                mStatus = BackupTransport.TRANSPORT_ERROR;
-            } finally {
-                try { if (backupData != null) backupData.close(); } catch (IOException e) {}
-            }
-
-            final BackupState nextState;
-            if (mStatus == BackupTransport.TRANSPORT_OK
-                    || mStatus == BackupTransport.TRANSPORT_PACKAGE_REJECTED) {
-                // Success or single-package rejection.  Proceed with the next app if any,
-                // otherwise we're done.
-                nextState = (mQueue.isEmpty()) ? BackupState.FINAL : BackupState.RUNNING_QUEUE;
-            } else if (mStatus == BackupTransport.TRANSPORT_QUOTA_EXCEEDED) {
-                if (MORE_DEBUG) {
-                    Slog.d(TAG, "Package " + mCurrentPackage.packageName +
-                            " hit quota limit on k/v backup");
-                }
-                if (mAgentBinder != null) {
+                    mStatus = BackupTransport.TRANSPORT_ERROR;
+                } finally {
                     try {
-                        long quota = mTransport.getBackupQuota(mCurrentPackage.packageName, false);
-                        mAgentBinder.doQuotaExceeded(size, quota);
-                    } catch (Exception e) {
-                        Slog.e(TAG, "Unable to notify about quota exceeded: " + e.getMessage());
+                        if (backupData != null) backupData.close();
+                    } catch (IOException e) {
                     }
                 }
-                nextState = (mQueue.isEmpty()) ? BackupState.FINAL : BackupState.RUNNING_QUEUE;
-            } else {
-                // Any other error here indicates a transport-level failure.  That means
-                // we need to halt everything and reschedule everything for next time.
-                revertAndEndBackup();
-                nextState = BackupState.FINAL;
-            }
 
-            executeNextState(nextState);
+                final BackupState nextState;
+                if (mStatus == BackupTransport.TRANSPORT_OK
+                        || mStatus == BackupTransport.TRANSPORT_PACKAGE_REJECTED) {
+                    // Success or single-package rejection.  Proceed with the next app if any,
+                    // otherwise we're done.
+                    nextState = (mQueue.isEmpty()) ? BackupState.FINAL : BackupState.RUNNING_QUEUE;
+                } else if (mStatus == BackupTransport.TRANSPORT_QUOTA_EXCEEDED) {
+                    if (MORE_DEBUG) {
+                        Slog.d(TAG, "Package " + mCurrentPackage.packageName +
+                                " hit quota limit on k/v backup");
+                    }
+                    if (mAgentBinder != null) {
+                        try {
+                            long quota = mTransport.getBackupQuota(mCurrentPackage.packageName,
+                                    false);
+                            mAgentBinder.doQuotaExceeded(size, quota);
+                        } catch (Exception e) {
+                            Slog.e(TAG, "Unable to notify about quota exceeded: " + e.getMessage());
+                        }
+                    }
+                    nextState = (mQueue.isEmpty()) ? BackupState.FINAL : BackupState.RUNNING_QUEUE;
+                } else {
+                    // Any other error here indicates a transport-level failure.  That means
+                    // we need to halt everything and reschedule everything for next time.
+                    revertAndEndBackup();
+                    nextState = BackupState.FINAL;
+                }
+
+                executeNextState(nextState);
+            }
         }
 
+
         @Override
-        public void handleTimeout() {
-            // Whoops, the current agent timed out running doBackup().  Tidy up and restage
-            // it for the next time we run a backup pass.
-            // !!! TODO: keep track of failure counts per agent, and blacklist those which
-            // fail repeatedly (i.e. have proved themselves to be buggy).
-            Slog.e(TAG, "Timeout backing up " + mCurrentPackage.packageName);
-            EventLog.writeEvent(EventLogTags.BACKUP_AGENT_FAILURE, mCurrentPackage.packageName,
-                    "timeout");
-            addBackupTrace("timeout of " + mCurrentPackage.packageName);
-            agentErrorCleanup();
-            dataChangedImpl(mCurrentPackage.packageName);
+        @GuardedBy("mCancelLock")
+        public void handleCancel(boolean cancelAll) {
+            removeOperation(mEphemeralOpToken);
+            synchronized (mCancelLock) {
+                if (mFinished) {
+                    // We have already cancelled this operation.
+                    if (MORE_DEBUG) {
+                        Slog.d(TAG, "Ignoring stale cancel. cancelAll=" + cancelAll);
+                    }
+                    return;
+                }
+                mCancelAll = cancelAll;
+                // Whoops, the current agent timed out running doBackup().  Tidy up and restage
+                // it for the next time we run a backup pass.
+                // !!! TODO: keep track of failure counts per agent, and blacklist those which
+                // fail repeatedly (i.e. have proved themselves to be buggy).
+                Slog.e(TAG, "Cancel backing up " + mCurrentPackage.packageName);
+                EventLog.writeEvent(EventLogTags.BACKUP_AGENT_FAILURE, mCurrentPackage.packageName);
+                addBackupTrace(
+                        "cancel of " + mCurrentPackage.packageName + ", cancelAll=" + cancelAll);
+                errorCleanup();
+                if (!cancelAll) {
+                    executeNextState(
+                            mQueue.isEmpty() ? BackupState.FINAL : BackupState.RUNNING_QUEUE);
+                    dataChangedImpl(mCurrentPackage.packageName);
+                } else {
+                    finalizeBackup();
+                }
+            }
         }
 
         void revertAndEndBackup() {
@@ -3237,12 +3461,10 @@
 
         }
 
-        void agentErrorCleanup() {
+        void errorCleanup() {
             mBackupDataName.delete();
             mNewStateName.delete();
             clearAgentState();
-
-            executeNextState(mQueue.isEmpty() ? BackupState.FINAL : BackupState.RUNNING_QUEUE);
         }
 
         // Cleanup common to both success and failure cases
@@ -3254,7 +3476,7 @@
                 // Current-operation callback handling requires the validity of these various
                 // bits of internal state as an invariant of the operation still being live.
                 // This means we make sure to clear all of the state in unison inside the lock.
-                mCurrentOperations.clear();
+                mCurrentOperations.remove(mEphemeralOpToken);
                 mSavedState = mBackupData = mNewState = null;
             }
 
@@ -3308,7 +3530,7 @@
             try {
                 pipes = ParcelFileDescriptor.createPipe();
                 int token = generateToken();
-                prepareOperationTimeout(token, TIMEOUT_FULL_BACKUP_INTERVAL, null);
+                prepareOperationTimeout(token, TIMEOUT_FULL_BACKUP_INTERVAL, null, OP_TYPE_WAIT);
                 mService.backupObbs(pkg.packageName, pipes[1], token, mBackupManagerBinder);
                 routeSocketDataToOutput(pipes[0], out);
                 success = waitUntilOperationComplete(token);
@@ -3371,7 +3593,7 @@
                 this.notifyAll();
             }
         }
-        
+
     }
 
     private void routeSocketDataToOutput(ParcelFileDescriptor inPipe, OutputStream out)
@@ -3445,6 +3667,8 @@
         File mMetadataFile;
         boolean mIncludeApks;
         PackageInfo mPkg;
+        private final long mQuota;
+        private final int mOpToken;
 
         class FullBackupRunner implements Runnable {
             PackageInfo mPackage;
@@ -3499,8 +3723,8 @@
 
                     if (DEBUG) Slog.d(TAG, "Calling doFullBackup() on " + mPackage.packageName);
                     prepareOperationTimeout(mToken, TIMEOUT_FULL_BACKUP_INTERVAL,
-                            mTimeoutMonitor /* in parent class */);
-                    mAgent.doFullBackup(mPipe, mToken, mBackupManagerBinder);
+                            mTimeoutMonitor /* in parent class */, OP_TYPE_WAIT);
+                    mAgent.doFullBackup(mPipe, mQuota, mToken, mBackupManagerBinder);
                 } catch (IOException e) {
                     Slog.e(TAG, "Error running full backup for " + mPackage.packageName);
                 } catch (RemoteException e) {
@@ -3515,7 +3739,7 @@
         }
 
         FullBackupEngine(OutputStream output, FullBackupPreflight preflightHook, PackageInfo pkg,
-                         boolean alsoApks, BackupRestoreTask timeoutMonitor) {
+                         boolean alsoApks, BackupRestoreTask timeoutMonitor, long quota, int opToken) {
             mOutput = output;
             mPreflightHook = preflightHook;
             mPkg = pkg;
@@ -3524,6 +3748,8 @@
             mFilesDir = new File("/data/system");
             mManifestFile = new File(mFilesDir, BACKUP_MANIFEST_FILENAME);
             mMetadataFile = new File(mFilesDir, BACKUP_METADATA_FILENAME);
+            mQuota = quota;
+            mOpToken = opToken;
         }
 
         public int preflightCheck() throws RemoteException {
@@ -3566,9 +3792,8 @@
                     byte[] widgetBlob = AppWidgetBackupBridge.getWidgetState(mPkg.packageName,
                             UserHandle.USER_SYSTEM);
 
-                    final int token = generateToken();
                     FullBackupRunner runner = new FullBackupRunner(mPkg, mAgent, pipes[1],
-                            token, sendApk, !isSharedStorage, widgetBlob);
+                            mOpToken, sendApk, !isSharedStorage, widgetBlob);
                     pipes[1].close();   // the runner has dup'd it
                     pipes[1] = null;
                     Thread t = new Thread(runner, "app-data-runner");
@@ -3577,7 +3802,7 @@
                     // Now pull data from the app and stuff it into the output
                     routeSocketDataToOutput(pipes[0], mOutput);
 
-                    if (!waitUntilOperationComplete(token)) {
+                    if (!waitUntilOperationComplete(mOpToken)) {
                         Slog.e(TAG, "Full backup failed on package " + mPkg.packageName);
                     } else {
                         if (MORE_DEBUG) {
@@ -3828,12 +4053,14 @@
         PackageInfo mCurrentTarget;
         String mCurrentPassword;
         String mEncryptPassword;
+        private final int mCurrentOpToken;
 
-        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) {
             super(observer);
+            mCurrentOpToken = generateToken();
             mLatch = latch;
 
             mOutputFile = fd;
@@ -4119,7 +4346,7 @@
                     final boolean isSharedStorage =
                             pkg.packageName.equals(SHARED_BACKUP_AGENT_PACKAGE);
 
-                    mBackupEngine = new FullBackupEngine(out, null, pkg, mIncludeApks, this);
+                    mBackupEngine = new FullBackupEngine(out, null, pkg, mIncludeApks, this, Long.MAX_VALUE, mCurrentOpToken);
                     sendOnBackupPackage(isSharedStorage ? "Shared storage" : pkg.packageName);
 
                     // Don't need to check preflight result as there is no preflight hook.
@@ -4152,9 +4379,6 @@
                 } catch (IOException e) {
                     /* nothing we can do about this */
                 }
-                synchronized (mCurrentOpLock) {
-                    mCurrentOperations.clear();
-                }
                 synchronized (mLatch) {
                     mLatch.set(true);
                     mLatch.notifyAll();
@@ -4178,45 +4402,91 @@
         }
 
         @Override
-        public void handleTimeout() {
+        public void handleCancel(boolean cancelAll) {
             final PackageInfo target = mCurrentTarget;
             if (DEBUG) {
-                Slog.w(TAG, "adb backup timeout of " + target);
+                Slog.w(TAG, "adb backup cancel of " + target);
             }
             if (target != null) {
                 tearDownAgentAndKill(mCurrentTarget.applicationInfo);
             }
+            removeOperation(mCurrentOpToken);
         }
     }
 
-    // Full backup task extension used for transport-oriented operation
-    class PerformFullTransportBackupTask extends FullBackupTask {
+    /**
+     * Full backup task extension used for transport-oriented operation.
+     *
+     * Flow:
+     * For each requested package:
+     *     - Spin off a new SinglePackageBackupRunner (mBackupRunner) for the current package.
+     *     - Wait until preflight is complete. (mBackupRunner.getPreflightResultBlocking())
+     *     - If preflight data size is within limit, start reading data from agent pipe and writing
+     *       to transport pipe. While there is data to send, call transport.sendBackupData(int) to
+     *       tell the transport how many bytes to expect on its pipe.
+     *     - After sending all data, call transport.finishBackup() if things went well. And
+     *       transport.cancelFullBackup() otherwise.
+     *
+     * Interactions with mCurrentOperations:
+     *     - An entry for this object is added to mCurrentOperations for the entire lifetime of this
+     *       object. Used to cancel the operation.
+     *     - SinglePackageBackupRunner and SinglePackageBackupPreflight will put ephemeral entries
+     *       to get timeouts or operation complete callbacks.
+     *
+     * Handling cancels:
+     *     - The contract we provide is that the task won't interact with the transport after
+     *       handleCancel() is done executing.
+     *     - This task blocks at 3 points: 1. Preflight result check 2. Reading on agent side pipe
+     *       and 3. Get backup result from mBackupRunner.
+     *     - Bubbling up handleCancel to mBackupRunner handles all 3: 1. Calls handleCancel on the
+     *       preflight operation which counts down on the preflight latch. 2. Tears down the agent,
+     *       so read() returns -1. 3. Notifies mCurrentOpLock which unblocks
+     *       mBackupRunner.getBackupResultBlocking().
+     */
+    class PerformFullTransportBackupTask extends FullBackupTask implements BackupRestoreTask {
         static final String TAG = "PFTBT";
+
+        private final Object mCancelLock = new Object();
+
         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;
+        private volatile IBackupTransport mTransport;
+        SinglePackageBackupRunner mBackupRunner;
+        private final int mBackupRunnerOpToken;
 
-        PerformFullTransportBackupTask(IFullBackupRestoreObserver observer, 
+        // This is true when a backup operation for some package is in progress.
+        private volatile boolean mIsDoingBackup;
+        private volatile boolean mCancelAll;
+        private final int mCurrentOpToken;
+
+        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;
-            mKeepRunning = new AtomicBoolean(true);
             mJob = runningJob;
             mPackages = new ArrayList<PackageInfo>(whichPackages.length);
             mBackupObserver = backupObserver;
+            mMonitor = monitor;
             mUserInitiated = userInitiated;
+            mCurrentOpToken = generateToken();
+            mBackupRunnerOpToken = generateToken();
+
+            registerTask();
 
             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,
@@ -4256,12 +4526,60 @@
             }
         }
 
-        public void setRunning(boolean running) {
-            mKeepRunning.set(running);
+        private void registerTask() {
+            synchronized (mCurrentOpLock) {
+                Slog.d(TAG, "backupmanager pftbt token=" + Integer.toHexString(mCurrentOpToken));
+                mCurrentOperations.put(mCurrentOpToken, new Operation(OP_PENDING, this,
+                        OP_TYPE_BACKUP));
+            }
+        }
+
+        private void unregisterTask() {
+            removeOperation(mCurrentOpToken);
+        }
+
+        @Override
+        public void execute() {
+            // Nothing to do.
+        }
+
+        @Override
+        public void handleCancel(boolean cancelAll) {
+            synchronized (mCancelLock) {
+                // We only support 'cancelAll = true' case for this task. Cancelling of a single package
+
+                // due to timeout is handled by SinglePackageBackupRunner and SinglePackageBackupPreflight.
+
+                if (!cancelAll) {
+                    Slog.wtf(TAG, "Expected cancelAll to be true.");
+                }
+
+                if (mCancelAll) {
+                    Slog.d(TAG, "Ignoring duplicate cancel call.");
+                    return;
+                }
+
+                mCancelAll = true;
+                if (mIsDoingBackup) {
+                    BackupManagerService.this.handleCancel(mBackupRunnerOpToken, cancelAll);
+                    try {
+                        mTransport.cancelFullBackup();
+                    } catch (RemoteException e) {
+                        Slog.w(TAG, "Error calling cancelFullBackup() on transport: " + e);
+                        // Can't do much.
+                    }
+                }
+            }
+        }
+
+        @Override
+        public void operationComplete(long result) {
+            // Nothing to do.
         }
 
         @Override
         public void run() {
+
             // data from the app, passed to us for bridging to the transport
             ParcelFileDescriptor[] enginePipes = null;
 
@@ -4283,8 +4601,8 @@
                     return;
                 }
 
-                IBackupTransport transport = mTransportManager.getCurrentTransportBinder();
-                if (transport == null) {
+                mTransport = mTransportManager.getCurrentTransportBinder();
+                if (mTransport == null) {
                     Slog.w(TAG, "Transport not present; full data backup not performed");
                     backupRunStatus = BackupManager.ERROR_TRANSPORT_ABORTED;
                     return;
@@ -4305,26 +4623,40 @@
 
                     // Tell the transport the data's coming
                     int flags = mUserInitiated ? BackupTransport.FLAG_USER_INITIATED : 0;
-                    int backupPackageStatus = transport.performFullBackup(currentPackage,
-                            transportPipes[0], flags);
+                    int backupPackageStatus;
+                    long quota = Long.MAX_VALUE;
+                    synchronized (mCancelLock) {
+                        if (mCancelAll) {
+                            break;
+                        }
+                        backupPackageStatus = mTransport.performFullBackup(currentPackage,
+                                transportPipes[0], flags);
+
+                        if (backupPackageStatus == BackupTransport.TRANSPORT_OK) {
+                            quota = mTransport.getBackupQuota(currentPackage.packageName,
+                                    true /* isFullBackup */);
+                            // Now set up the backup engine / data source end of things
+                            enginePipes = ParcelFileDescriptor.createPipe();
+                            mBackupRunner =
+                                    new SinglePackageBackupRunner(enginePipes[1], currentPackage,
+                                            mTransport, quota, mBackupRunnerOpToken);
+                            // The runner dup'd the pipe half, so we close it here
+                            enginePipes[1].close();
+                            enginePipes[1] = null;
+
+                            mIsDoingBackup = true;
+                        }
+                    }
                     if (backupPackageStatus == BackupTransport.TRANSPORT_OK) {
+
                         // The transport has its own copy of the read end of the pipe,
                         // so close ours now
                         transportPipes[0].close();
                         transportPipes[0] = null;
 
-                        // Now set up the backup engine / data source end of things
-                        enginePipes = ParcelFileDescriptor.createPipe();
-                        SinglePackageBackupRunner backupRunner =
-                                new SinglePackageBackupRunner(enginePipes[1], currentPackage,
-                                        transport);
-                        // The runner dup'd the pipe half, so we close it here
-                        enginePipes[1].close();
-                        enginePipes[1] = null;
-
                         // Spin off the runner to fetch the app's data and pipe it
                         // into the engine pipes
-                        (new Thread(backupRunner, "package-backup-bridge")).start();
+                        (new Thread(mBackupRunner, "package-backup-bridge")).start();
 
                         // Read data off the engine pipe and pass it to the transport
                         // pipe until we hit EOD on the input stream.  We do not take
@@ -4334,7 +4666,7 @@
                         FileOutputStream out = new FileOutputStream(
                                 transportPipes[1].getFileDescriptor());
                         long totalRead = 0;
-                        final long preflightResult = backupRunner.getPreflightResultBlocking();
+                        final long preflightResult = mBackupRunner.getPreflightResultBlocking();
                         // Preflight result is negative if some error happened on preflight.
                         if (preflightResult < 0) {
                             if (MORE_DEBUG) {
@@ -4346,19 +4678,17 @@
                         } else {
                             int nRead = 0;
                             do {
-                                if (!mKeepRunning.get()) {
-                                    if (DEBUG_SCHEDULING) {
-                                        Slog.i(TAG, "Full backup task told to stop");
-                                    }
-                                    break;
-                                }
                                 nRead = in.read(buffer);
                                 if (MORE_DEBUG) {
                                     Slog.v(TAG, "in.read(buffer) from app: " + nRead);
                                 }
                                 if (nRead > 0) {
                                     out.write(buffer, 0, nRead);
-                                    backupPackageStatus = transport.sendBackupData(nRead);
+                                    synchronized (mCancelLock) {
+                                        if (!mCancelAll) {
+                                            backupPackageStatus = mTransport.sendBackupData(nRead);
+                                        }
+                                    }
                                     totalRead += nRead;
                                     if (mBackupObserver != null && preflightResult > 0) {
                                         sendBackupOnUpdate(mBackupObserver, packageName,
@@ -4367,30 +4697,32 @@
                                 }
                             } while (nRead > 0
                                     && backupPackageStatus == BackupTransport.TRANSPORT_OK);
-
                             // Despite preflight succeeded, package still can hit quota on flight.
                             if (backupPackageStatus == BackupTransport.TRANSPORT_QUOTA_EXCEEDED) {
-                                long quota = transport.getBackupQuota(packageName, true);
                                 Slog.w(TAG, "Package hit quota limit in-flight " + packageName
                                         + ": " + totalRead + " of " + quota);
-                                backupRunner.sendQuotaExceeded(totalRead, quota);
+                                mBackupRunner.sendQuotaExceeded(totalRead, quota);
                             }
                         }
 
-                        // If we've lost our running criteria, tell the transport to cancel
-                        // and roll back this (partial) backup payload; otherwise tell it
-                        // that we've reached the clean finish state.
-                        if (!mKeepRunning.get()) {
-                            backupPackageStatus = BackupTransport.TRANSPORT_ERROR;
-                            transport.cancelFullBackup();
-                        } else {
-                            // If we were otherwise in a good state, now interpret the final
-                            // result based on what finishBackup() returns.  If we're in a
-                            // failure case already, preserve that result and ignore whatever
-                            // finishBackup() reports.
-                            final int finishResult = transport.finishBackup();
-                            if (backupPackageStatus == BackupTransport.TRANSPORT_OK) {
-                                backupPackageStatus = finishResult;
+                        final int backupRunnerResult = mBackupRunner.getBackupResultBlocking();
+
+                        synchronized (mCancelLock) {
+                            mIsDoingBackup = false;
+                            // If mCancelCurrent is true, we have already called cancelFullBackup().
+                            if (!mCancelAll) {
+                                if (backupRunnerResult == BackupTransport.TRANSPORT_OK) {
+                                    // If we were otherwise in a good state, now interpret the final
+                                    // result based on what finishBackup() returns.  If we're in a
+                                    // failure case already, preserve that result and ignore whatever
+                                    // finishBackup() reports.
+                                    final int finishResult = mTransport.finishBackup();
+                                    if (backupPackageStatus == BackupTransport.TRANSPORT_OK) {
+                                        backupPackageStatus = finishResult;
+                                    }
+                                } else {
+                                    mTransport.cancelFullBackup();
+                                }
                             }
                         }
 
@@ -4404,8 +4736,7 @@
                         // errors take precedence over agent/app-specific errors for purposes of
                         // determining our course of action.
                         if (backupPackageStatus == BackupTransport.TRANSPORT_OK) {
-                            // We still could fail in backup runner thread, getting result from there.
-                            int backupRunnerResult = backupRunner.getBackupResultBlocking();
+                            // We still could fail in backup runner thread.
                             if (backupRunnerResult != BackupTransport.TRANSPORT_OK) {
                                 // If there was an error in runner thread and
                                 // not TRANSPORT_ERROR here, overwrite it.
@@ -4429,7 +4760,7 @@
 
                         // Also ask the transport how long it wants us to wait before
                         // moving on to the next package, if any.
-                        backoff = transport.requestFullBackupTime();
+                        backoff = mTransport.requestFullBackupTime();
                         if (DEBUG_SCHEDULING) {
                             Slog.i(TAG, "Transport suggested backoff=" + backoff);
                         }
@@ -4468,6 +4799,14 @@
                         EventLog.writeEvent(EventLogTags.BACKUP_AGENT_FAILURE, packageName);
                         tearDownAgentAndKill(currentPackage.applicationInfo);
                         // Do nothing, clean up, and continue looping.
+                    } else if (backupPackageStatus == BackupManager.ERROR_BACKUP_CANCELLED) {
+                        sendBackupOnPackageResult(mBackupObserver, packageName,
+                                BackupManager.ERROR_BACKUP_CANCELLED);
+                        Slog.w(TAG, "Backup cancelled. package=" + packageName +
+                                ", cancelAll=" + mCancelAll);
+                        EventLog.writeEvent(EventLogTags.FULL_BACKUP_CANCELLED, packageName);
+                        tearDownAgentAndKill(currentPackage.applicationInfo);
+                        // Do nothing, clean up, and continue looping.
                     } else if (backupPackageStatus != BackupTransport.TRANSPORT_OK) {
                         sendBackupOnPackageResult(mBackupObserver, packageName,
                             BackupManager.ERROR_TRANSPORT_ABORTED);
@@ -4497,6 +4836,11 @@
                 backupRunStatus = BackupManager.ERROR_TRANSPORT_ABORTED;
                 Slog.w(TAG, "Exception trying full transport backup", e);
             } finally {
+
+                if (mCancelAll) {
+                    backupRunStatus = BackupManager.ERROR_BACKUP_CANCELLED;
+                }
+
                 if (DEBUG) {
                     Slog.i(TAG, "Full backup completed with status: " + backupRunStatus);
                 }
@@ -4505,6 +4849,8 @@
                 cleanUpPipes(transportPipes);
                 cleanUpPipes(enginePipes);
 
+                unregisterTask();
+
                 if (mJob != null) {
                     mJob.finishBackupPass();
                 }
@@ -4520,6 +4866,7 @@
                 if (mUpdateSchedule) {
                     scheduleNextFullBackupJob(backoff);
                 }
+
                 Slog.i(BackupManagerService.TAG, "Full data backup pass finished.");
                 mWakelock.release();
             }
@@ -4555,22 +4902,25 @@
             final AtomicLong mResult = new AtomicLong(BackupTransport.AGENT_ERROR);
             final CountDownLatch mLatch = new CountDownLatch(1);
             final IBackupTransport mTransport;
+            final long mQuota;
+            private final int mCurrentOpToken;
 
-            public SinglePackageBackupPreflight(IBackupTransport transport) {
+            SinglePackageBackupPreflight(IBackupTransport transport, long quota, int currentOpToken) {
                 mTransport = transport;
+                mQuota = quota;
+                mCurrentOpToken = currentOpToken;
             }
 
             @Override
             public int preflightFullBackup(PackageInfo pkg, IBackupAgent agent) {
                 int result;
                 try {
-                    final int token = generateToken();
-                    prepareOperationTimeout(token, TIMEOUT_FULL_BACKUP_INTERVAL, this);
+                    prepareOperationTimeout(mCurrentOpToken, TIMEOUT_FULL_BACKUP_INTERVAL, this, OP_TYPE_WAIT);
                     addBackupTrace("preflighting");
                     if (MORE_DEBUG) {
                         Slog.d(TAG, "Preflighting full payload of " + pkg.packageName);
                     }
-                    agent.doMeasureFullBackup(token, mBackupManagerBinder);
+                    agent.doMeasureFullBackup(mQuota, mCurrentOpToken, mBackupManagerBinder);
 
                     // Now wait to get our result back.  If this backstop timeout is reached without
                     // the latch being thrown, flow will continue as though a result or "normal"
@@ -4590,12 +4940,11 @@
 
                     result = mTransport.checkFullBackupSize(totalSize);
                     if (result == BackupTransport.TRANSPORT_QUOTA_EXCEEDED) {
-                        final long quota = mTransport.getBackupQuota(pkg.packageName, true);
                         if (MORE_DEBUG) {
                             Slog.d(TAG, "Package hit quota limit on preflight " +
-                                    pkg.packageName + ": " + totalSize + " of " + quota);
+                                    pkg.packageName + ": " + totalSize + " of " + mQuota);
                         }
-                        agent.doQuotaExceeded(totalSize, quota);
+                        agent.doQuotaExceeded(totalSize, mQuota);
                     }
                 } catch (Exception e) {
                     Slog.w(TAG, "Exception preflighting " + pkg.packageName + ": " + e.getMessage());
@@ -4606,7 +4955,7 @@
 
             @Override
             public void execute() {
-                // Unused in this case
+                // Unused.
             }
 
             @Override
@@ -4617,15 +4966,17 @@
                 }
                 mResult.set(result);
                 mLatch.countDown();
+                removeOperation(mCurrentOpToken);
             }
 
             @Override
-            public void handleTimeout() {
+            public void handleCancel(boolean cancelAll) {
                 if (MORE_DEBUG) {
-                    Slog.i(TAG, "Preflight timeout; failing");
+                    Slog.i(TAG, "Preflight cancelled; failing");
                 }
                 mResult.set(BackupTransport.AGENT_ERROR);
                 mLatch.countDown();
+                removeOperation(mCurrentOpToken);
             }
 
             @Override
@@ -4642,41 +4993,67 @@
         class SinglePackageBackupRunner implements Runnable, BackupRestoreTask {
             final ParcelFileDescriptor mOutput;
             final PackageInfo mTarget;
-            final FullBackupPreflight mPreflight;
+            final SinglePackageBackupPreflight mPreflight;
             final CountDownLatch mPreflightLatch;
             final CountDownLatch mBackupLatch;
+            private final int mCurrentOpToken;
+            private final int mEphemeralToken;
             private FullBackupEngine mEngine;
             private volatile int mPreflightResult;
             private volatile int mBackupResult;
+            private final long mQuota;
+            private volatile boolean mIsCancelled;
 
             SinglePackageBackupRunner(ParcelFileDescriptor output, PackageInfo target,
-                    IBackupTransport transport) throws IOException {
+                    IBackupTransport transport, long quota, int currentOpToken) throws IOException {
                 mOutput = ParcelFileDescriptor.dup(output.getFileDescriptor());
                 mTarget = target;
-                mPreflight = new SinglePackageBackupPreflight(transport);
+                mCurrentOpToken = currentOpToken;
+                mEphemeralToken = generateToken();
+                mPreflight = new SinglePackageBackupPreflight(transport, quota, mEphemeralToken);
                 mPreflightLatch = new CountDownLatch(1);
                 mBackupLatch = new CountDownLatch(1);
                 mPreflightResult = BackupTransport.AGENT_ERROR;
                 mBackupResult = BackupTransport.AGENT_ERROR;
+                mQuota = quota;
+                registerTask();
+            }
+
+            void registerTask() {
+                synchronized (mCurrentOpLock) {
+                    mCurrentOperations.put(mCurrentOpToken, new Operation(OP_PENDING, this,
+                            OP_TYPE_WAIT));
+                }
+            }
+
+            void unregisterTask() {
+                synchronized (mCurrentOpLock) {
+                    mCurrentOperations.remove(mCurrentOpToken);
+                }
             }
 
             @Override
             public void run() {
                 FileOutputStream out = new FileOutputStream(mOutput.getFileDescriptor());
-                mEngine = new FullBackupEngine(out, mPreflight, mTarget, false, this);
+                mEngine = new FullBackupEngine(out, mPreflight, mTarget, false, this, mQuota, mCurrentOpToken);
                 try {
                     try {
-                        mPreflightResult = mEngine.preflightCheck();
+                        if (!mIsCancelled) {
+                            mPreflightResult = mEngine.preflightCheck();
+                        }
                     } finally {
                         mPreflightLatch.countDown();
                     }
                     // If there is no error on preflight, continue backup.
                     if (mPreflightResult == BackupTransport.TRANSPORT_OK) {
-                        mBackupResult = mEngine.backupOnePackage();
+                        if (!mIsCancelled) {
+                            mBackupResult = mEngine.backupOnePackage();
+                        }
                     }
                 } catch (Exception e) {
                     Slog.e(TAG, "Exception during full package backup of " + mTarget.packageName);
                 } finally {
+                    unregisterTask();
                     mBackupLatch.countDown();
                     try {
                         mOutput.close();
@@ -4695,6 +5072,9 @@
             long getPreflightResultBlocking() {
                 try {
                     mPreflightLatch.await(TIMEOUT_FULL_BACKUP_INTERVAL, TimeUnit.MILLISECONDS);
+                    if (mIsCancelled) {
+                        return BackupManager.ERROR_BACKUP_CANCELLED;
+                    }
                     if (mPreflightResult == BackupTransport.TRANSPORT_OK) {
                         return mPreflight.getExpectedSizeOrErrorCode();
                     } else {
@@ -4708,6 +5088,9 @@
             int getBackupResultBlocking() {
                 try {
                     mBackupLatch.await(TIMEOUT_FULL_BACKUP_INTERVAL, TimeUnit.MILLISECONDS);
+                    if (mIsCancelled) {
+                        return BackupManager.ERROR_BACKUP_CANCELLED;
+                    }
                     return mBackupResult;
                 } catch (InterruptedException e) {
                     return BackupTransport.AGENT_ERROR;
@@ -4724,11 +5107,23 @@
             public void operationComplete(long result) { /* intentionally empty */ }
 
             @Override
-            public void handleTimeout() {
+            public void handleCancel(boolean cancelAll) {
                 if (DEBUG) {
-                    Slog.w(TAG, "Full backup timeout of " + mTarget.packageName);
+                    Slog.w(TAG, "Full backup cancel of " + mTarget.packageName);
                 }
+
+                mMonitor = monitorEvent(mMonitor,
+                        BackupManagerMonitor.LOG_EVENT_ID_FULL_BACKUP_TIMEOUT,
+                        mCurrentPackage, BackupManagerMonitor.LOG_EVENT_CATEGORY_AGENT);
+                mIsCancelled = true;
+                // Cancel tasks spun off by this task.
+                BackupManagerService.this.handleCancel(mEphemeralToken, cancelAll);
                 tearDownAgentAndKill(mTarget.applicationInfo);
+                // Free up everyone waiting on this task and its children.
+                mPreflightLatch.countDown();
+                mBackupLatch.countDown();
+                // We are done with this operation.
+                removeOperation(mCurrentOpToken);
             }
         }
     }
@@ -4989,7 +5384,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();
@@ -5006,7 +5401,7 @@
                 if (DEBUG_SCHEDULING) {
                     Slog.i(TAG, "Telling running backup to stop");
                 }
-                mRunningFullBackupTask.setRunning(false);
+                mRunningFullBackupTask.handleCancel(true);
             }
         }
     }
@@ -5140,6 +5535,8 @@
         // Widget blob to be restored out-of-band
         byte[] mWidgetData = null;
 
+        private final int mEphemeralOpToken;
+
         // Runner that can be placed in a separate thread to do in-process
         // invocations of the full restore API asynchronously. Used by adb restore.
         class RestoreFileRunnable implements Runnable {
@@ -5175,7 +5572,9 @@
         }
 
         public FullRestoreEngine(BackupRestoreTask monitorTask, IFullBackupRestoreObserver observer,
-                PackageInfo onlyPackage, boolean allowApks, boolean allowObbs) {
+                PackageInfo onlyPackage, boolean allowApks, boolean allowObbs,
+                int ephemeralOpToken) {
+            mEphemeralOpToken = ephemeralOpToken;
             mMonitorTask = monitorTask;
             mObserver = observer;
             mOnlyPackage = onlyPackage;
@@ -5380,17 +5779,16 @@
                         if (okay) {
                             boolean agentSuccess = true;
                             long toCopy = info.size;
-                            final int token = generateToken();
                             try {
-                                prepareOperationTimeout(token, TIMEOUT_FULL_BACKUP_INTERVAL,
-                                        mMonitorTask);
+                                prepareOperationTimeout(mEphemeralOpToken, TIMEOUT_FULL_BACKUP_INTERVAL,
+                                        mMonitorTask, OP_TYPE_WAIT);
 
                                 if (info.domain.equals(FullBackup.OBB_TREE_TOKEN)) {
                                     if (DEBUG) Slog.d(TAG, "Restoring OBB file for " + pkg
                                             + " : " + info.path);
                                     mObbConnection.restoreObbFile(pkg, mPipes[0],
                                             info.size, info.type, info.path, info.mode,
-                                            info.mtime, token, mBackupManagerBinder);
+                                            info.mtime, mEphemeralOpToken, mBackupManagerBinder);
                                 } else {
                                     if (MORE_DEBUG) Slog.d(TAG, "Invoking agent to restore file "
                                             + info.path);
@@ -5401,12 +5799,12 @@
                                     if (mTargetApp.processName.equals("system")) {
                                         Slog.d(TAG, "system process agent - spinning a thread");
                                         RestoreFileRunnable runner = new RestoreFileRunnable(
-                                                mAgent, info, mPipes[0], token);
+                                                mAgent, info, mPipes[0], mEphemeralOpToken);
                                         new Thread(runner, "restore-sys-runner").start();
                                     } else {
                                         mAgent.doRestoreFile(mPipes[0], info.size, info.type,
                                                 info.domain, info.path, info.mode, info.mtime,
-                                                token, mBackupManagerBinder);
+                                                mEphemeralOpToken, mBackupManagerBinder);
                                     }
                                 }
                             } catch (IOException e) {
@@ -5458,7 +5856,7 @@
 
                                 // and now that we've sent it all, wait for the remote
                                 // side to acknowledge receipt
-                                agentSuccess = waitUntilOperationComplete(token);
+                                agentSuccess = waitUntilOperationComplete(mEphemeralOpToken);
                             }
 
                             // okay, if the remote end failed at any point, deal with
@@ -6303,9 +6701,11 @@
     class AdbRestoreFinishedLatch implements BackupRestoreTask {
         static final String TAG = "AdbRestoreFinishedLatch";
         final CountDownLatch mLatch;
+        private final int mCurrentOpToken;
 
-        AdbRestoreFinishedLatch() {
+        AdbRestoreFinishedLatch(int currentOpToken) {
             mLatch = new CountDownLatch(1);
+            mCurrentOpToken = currentOpToken;
         }
 
         void await() {
@@ -6328,14 +6728,16 @@
                 Slog.w(TAG, "adb onRestoreFinished() complete");
             }
             mLatch.countDown();
+            removeOperation(mCurrentOpToken);
         }
 
         @Override
-        public void handleTimeout() {
+        public void handleCancel(boolean cancelAll) {
             if (DEBUG) {
                 Slog.w(TAG, "adb onRestoreFinished() timed out");
             }
             mLatch.countDown();
+            removeOperation(mCurrentOpToken);
         }
     }
 
@@ -6526,9 +6928,6 @@
                     Slog.w(TAG, "Close of restore data pipe threw", e);
                     /* nothing we can do about this */
                 }
-                synchronized (mCurrentOpLock) {
-                    mCurrentOperations.clear();
-                }
                 synchronized (mLatchObject) {
                     mLatchObject.set(true);
                     mLatchObject.notifyAll();
@@ -6817,7 +7216,8 @@
                             long toCopy = info.size;
                             final int token = generateToken();
                             try {
-                                prepareOperationTimeout(token, TIMEOUT_FULL_BACKUP_INTERVAL, null);
+                                prepareOperationTimeout(token, TIMEOUT_FULL_BACKUP_INTERVAL, null,
+                                        OP_TYPE_WAIT);
                                 if (info.domain.equals(FullBackup.OBB_TREE_TOKEN)) {
                                     if (DEBUG) Slog.d(TAG, "Restoring OBB file for " + pkg
                                             + " : " + info.path);
@@ -6952,8 +7352,9 @@
                     // In the adb restore case, we do restore-finished here
                     if (doRestoreFinished) {
                         final int token = generateToken();
-                        final AdbRestoreFinishedLatch latch = new AdbRestoreFinishedLatch();
-                        prepareOperationTimeout(token, TIMEOUT_FULL_BACKUP_INTERVAL, latch);
+                        final AdbRestoreFinishedLatch latch = new AdbRestoreFinishedLatch(token);
+                        prepareOperationTimeout(token, TIMEOUT_FULL_BACKUP_INTERVAL, latch,
+                                OP_TYPE_WAIT);
                         if (mTargetApp.processName.equals("system")) {
                             if (MORE_DEBUG) {
                                 Slog.d(TAG, "system agent - restoreFinished on thread");
@@ -7757,6 +8158,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;
 
@@ -7818,16 +8222,20 @@
         ParcelFileDescriptor mBackupData;
         ParcelFileDescriptor mNewState;
 
+        private final int mEphemeralOpToken;
+
         // 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) {
+            mEphemeralOpToken = generateToken();
             mState = UnifiedRestoreState.INITIAL;
             mStartRealtime = SystemClock.elapsedRealtime();
 
             mTransport = transport;
             mObserver = observer;
+            mMonitor = monitor;
             mToken = restoreSetToken;
             mPmToken = pmToken;
             mTargetPackage = targetPackage;
@@ -7947,20 +8355,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 +8379,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 +8387,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
@@ -8249,7 +8657,6 @@
             ParcelFileDescriptor stage;
             File downloadFile = (staging) ? mStageName : mBackupDataName;
 
-            final int token = generateToken();
             try {
                 // Run the transport's restore pass
                 stage = ParcelFileDescriptor.open(downloadFile,
@@ -8322,9 +8729,9 @@
                 // Kick off the restore, checking for hung agents.  The timeout or
                 // the operationComplete() callback will schedule the next step,
                 // so we do not do that here.
-                prepareOperationTimeout(token, TIMEOUT_RESTORE_INTERVAL, this);
+                prepareOperationTimeout(mEphemeralOpToken, TIMEOUT_RESTORE_INTERVAL, this, OP_TYPE_WAIT);
                 mAgent.doRestore(mBackupData, appVersionCode, mNewState,
-                        token, mBackupManagerBinder);
+                        mEphemeralOpToken, mBackupManagerBinder);
             } catch (Exception e) {
                 Slog.e(TAG, "Unable to call app for restore: " + packageName, e);
                 EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE,
@@ -8371,9 +8778,9 @@
         // state RESTORE_FINISHED : provide the "no more data" signpost callback at the end
         private void restoreFinished() {
             try {
-                final int token = generateToken();
-                prepareOperationTimeout(token, TIMEOUT_RESTORE_FINISHED_INTERVAL, this);
-                mAgent.doRestoreFinished(token, mBackupManagerBinder);
+                prepareOperationTimeout(mEphemeralOpToken, TIMEOUT_RESTORE_FINISHED_INTERVAL, this,
+                        OP_TYPE_WAIT);
+                mAgent.doRestoreFinished(mEphemeralOpToken, mBackupManagerBinder);
                 // If we get this far, the callback or timeout will schedule the
                 // next restore state, so we're done
             } catch (Exception e) {
@@ -8397,7 +8804,10 @@
             // pipe through which the engine will read data.  [0] read, [1] write
             ParcelFileDescriptor[] mEnginePipes;
 
+            private final int mEphemeralOpToken;
+
             public StreamFeederThread() throws IOException {
+                mEphemeralOpToken = generateToken();
                 mTransportPipes = ParcelFileDescriptor.createPipe();
                 mEnginePipes = ParcelFileDescriptor.createPipe();
                 setRunning(true);
@@ -8411,7 +8821,7 @@
                 EventLog.writeEvent(EventLogTags.FULL_RESTORE_PACKAGE,
                         mCurrentPackage.packageName);
 
-                mEngine = new FullRestoreEngine(this, null, mCurrentPackage, false, false);
+                mEngine = new FullRestoreEngine(this, null, mCurrentPackage, false, false, mEphemeralOpToken);
                 mEngineThread = new EngineThread(mEngine, mEnginePipes[0]);
 
                 ParcelFileDescriptor eWriteEnd = mEnginePipes[1];
@@ -8550,10 +8960,13 @@
 
             // The app has timed out handling a restoring file
             @Override
-            public void handleTimeout() {
+            public void handleCancel(boolean cancelAll) {
+                removeOperation(mEphemeralOpToken);
                 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]);
@@ -8728,13 +9141,11 @@
             // The caller is responsible for reestablishing the state machine; our
             // responsibility here is to clear the decks for whatever comes next.
             mBackupHandler.removeMessages(MSG_TIMEOUT, this);
-            synchronized (mCurrentOpLock) {
-                mCurrentOperations.clear();
-            }
         }
 
         @Override
         public void operationComplete(long unusedResult) {
+            removeOperation(mEphemeralOpToken);
             if (MORE_DEBUG) {
                 Slog.i(TAG, "operationComplete() during restore: target="
                         + mCurrentPackage.packageName
@@ -8795,8 +9206,11 @@
 
         // A call to agent.doRestore() or agent.doRestoreFinished() has timed out
         @Override
-        public void handleTimeout() {
+        public void handleCancel(boolean cancelAll) {
+            removeOperation(mEphemeralOpToken);
             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 +9657,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 +9987,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 +10225,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) {
@@ -9900,7 +10321,16 @@
                     // and ignore it; we've already dealt with the timeout.
                     op = null;
                     mCurrentOperations.delete(token);
-                } else {
+                } else if (op.state == OP_ACKNOWLEDGED) {
+                    if (DEBUG) {
+                        Slog.w(TAG, "Received duplicate ack for token=" +
+                                Integer.toHexString(token));
+                    }
+                    op = null;
+                    mCurrentOperations.remove(token);
+                } else if (op.state == OP_PENDING) {
+                    // Can't delete op from mCurrentOperations. waitUntilOperationComplete can be
+                    // called after we we receive this call.
                     op.state = OP_ACKNOWLEDGED;
                 }
             }
@@ -9962,7 +10392,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 +10424,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 +10436,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 +10485,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 +10499,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 +10509,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 +10572,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 +10585,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 +10661,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 +10874,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..8855661 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,18 @@
     }
 
     @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
+    public void cancelBackups() throws RemoteException {
+        BackupManagerService svc = mService;
+        if (svc != null) {
+            svc.cancelBackups();
+        }
     }
 
     @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/BatteryService.java b/services/core/java/com/android/server/BatteryService.java
index dd550f2..6248cab 100644
--- a/services/core/java/com/android/server/BatteryService.java
+++ b/services/core/java/com/android/server/BatteryService.java
@@ -49,8 +49,10 @@
 import android.os.UEventObserver;
 import android.os.UserHandle;
 import android.provider.Settings;
+import android.service.battery.BatteryServiceDumpProto;
 import android.util.EventLog;
 import android.util.Slog;
+import android.util.proto.ProtoOutputStream;
 
 import java.io.File;
 import java.io.FileDescriptor;
@@ -801,6 +803,35 @@
         }
     }
 
+    private void dumpProto(FileDescriptor fd) {
+        final ProtoOutputStream proto = new ProtoOutputStream(fd);
+
+        synchronized (mLock) {
+            proto.write(BatteryServiceDumpProto.ARE_UPDATES_STOPPED, mUpdatesStopped);
+            int batteryPluggedValue = BatteryServiceDumpProto.BATTERY_PLUGGED_NONE;
+            if (mBatteryProps.chargerAcOnline) {
+                batteryPluggedValue = BatteryServiceDumpProto.BATTERY_PLUGGED_AC;
+            } else if (mBatteryProps.chargerUsbOnline) {
+                batteryPluggedValue = BatteryServiceDumpProto.BATTERY_PLUGGED_USB;
+            } else if (mBatteryProps.chargerWirelessOnline) {
+                batteryPluggedValue = BatteryServiceDumpProto.BATTERY_PLUGGED_WIRELESS;
+            }
+            proto.write(BatteryServiceDumpProto.PLUGGED, batteryPluggedValue);
+            proto.write(BatteryServiceDumpProto.MAX_CHARGING_CURRENT, mBatteryProps.maxChargingCurrent);
+            proto.write(BatteryServiceDumpProto.MAX_CHARGING_VOLTAGE, mBatteryProps.maxChargingVoltage);
+            proto.write(BatteryServiceDumpProto.CHARGE_COUNTER, mBatteryProps.batteryChargeCounter);
+            proto.write(BatteryServiceDumpProto.STATUS, mBatteryProps.batteryStatus);
+            proto.write(BatteryServiceDumpProto.HEALTH, mBatteryProps.batteryHealth);
+            proto.write(BatteryServiceDumpProto.IS_PRESENT, mBatteryProps.batteryPresent);
+            proto.write(BatteryServiceDumpProto.LEVEL, mBatteryProps.batteryLevel);
+            proto.write(BatteryServiceDumpProto.SCALE, BATTERY_SCALE);
+            proto.write(BatteryServiceDumpProto.VOLTAGE, mBatteryProps.batteryVoltage);
+            proto.write(BatteryServiceDumpProto.TEMPERATURE, mBatteryProps.batteryTemperature);
+            proto.write(BatteryServiceDumpProto.TECHNOLOGY, mBatteryProps.batteryTechnology);
+        }
+        proto.flush();
+    }
+
     private final class Led {
         private final Light mBatteryLight;
 
@@ -878,7 +909,11 @@
                 return;
             }
 
-            dumpInternal(fd, pw, args);
+            if (args.length > 0 && "--proto".equals(args[0])) {
+                dumpProto(fd);
+            } else {
+                dumpInternal(fd, pw, args);
+            }
         }
 
         @Override public void onShellCommand(FileDescriptor in, FileDescriptor out,
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index 719a64e..fe0b840 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -4166,7 +4166,7 @@
         }
         ensureRequestableCapabilities(networkCapabilities);
 
-        if (timeoutMs < 0 || timeoutMs > ConnectivityManager.MAX_NETWORK_REQUEST_TIMEOUT_MS) {
+        if (timeoutMs < 0) {
             throw new IllegalArgumentException("Bad timeout specified");
         }
 
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/EventLogTags.logtags b/services/core/java/com/android/server/EventLogTags.logtags
index 4559254..2e61550 100644
--- a/services/core/java/com/android/server/EventLogTags.logtags
+++ b/services/core/java/com/android/server/EventLogTags.logtags
@@ -132,6 +132,7 @@
 2843 full_backup_success (Package|3)
 2844 full_restore_package (Package|3)
 2845 full_backup_quota_exceeded (Package|3)
+2846 full_backup_cancelled (Package|3),(Message|3)
 
 2850 backup_transport_lifecycle (Transport|3),(Bound|1|1)
 
diff --git a/services/core/java/com/android/server/InputMethodManagerService.java b/services/core/java/com/android/server/InputMethodManagerService.java
index 3e711ec..8442c11 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;
@@ -123,6 +124,7 @@
 import android.view.WindowManagerInternal;
 import android.view.inputmethod.EditorInfo;
 import android.view.inputmethod.InputBinding;
+import android.view.inputmethod.InputConnection;
 import android.view.inputmethod.InputConnectionInspector;
 import android.view.inputmethod.InputMethod;
 import android.view.inputmethod.InputMethodInfo;
@@ -147,10 +149,15 @@
 import java.lang.annotation.Retention;
 import java.nio.charset.StandardCharsets;
 import java.security.InvalidParameterException;
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
+import java.util.Locale;
+import java.util.WeakHashMap;
+import java.util.concurrent.atomic.AtomicInteger;
 
 /**
  * This class provides a system service that manages input methods.
@@ -174,13 +181,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 +232,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 +353,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 +431,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;
@@ -487,6 +512,206 @@
     @HardKeyboardBehavior
     private final int mHardKeyboardBehavior;
 
+    /**
+     * Internal state snapshot when {@link #MSG_START_INPUT} message is about to be posted to the
+     * internal message queue. Any subsequent state change inside {@link InputMethodManagerService}
+     * will not affect those tasks that are already posted.
+     *
+     * <p>Posting {@link #MSG_START_INPUT} message basically means that
+     * {@link InputMethodService#doStartInput(InputConnection, EditorInfo, boolean)} will be called
+     * back in the current IME process shortly, which will also affect what the current IME starts
+     * receiving from {@link InputMethodService#getCurrentInputConnection()}. In other words, this
+     * snapshot will be taken every time when {@link InputMethodManagerService} is initiating a new
+     * logical input session between the client application and the current IME.</p>
+     *
+     * <p>Be careful to not keep strong references to this object forever, which can prevent
+     * {@link StartInputInfo#mImeToken} and {@link StartInputInfo#mTargetWindow} from being GC-ed.
+     * </p>
+     */
+    private static class StartInputInfo {
+        private static final AtomicInteger sSequenceNumber = new AtomicInteger(0);
+
+        final int mSequenceNumber;
+        final long mTimestamp;
+        final long mWallTime;
+        @NonNull
+        final IBinder mImeToken;
+        @NonNull
+        final String mImeId;
+        // @InputMethodClient.StartInputReason
+        final int mStartInputReason;
+        final boolean mRestarting;
+        @Nullable
+        final IBinder mTargetWindow;
+        @NonNull
+        final EditorInfo mEditorInfo;
+        final int mTargetWindowSoftInputMode;
+        final int mClientBindSequenceNumber;
+
+        StartInputInfo(@NonNull IBinder imeToken, @NonNull String imeId,
+                /* @InputMethodClient.StartInputReason */ int startInputReason, boolean restarting,
+                @Nullable IBinder targetWindow, @NonNull EditorInfo editorInfo,
+                int targetWindowSoftInputMode, int clientBindSequenceNumber) {
+            mSequenceNumber = sSequenceNumber.getAndIncrement();
+            mTimestamp = SystemClock.uptimeMillis();
+            mWallTime = System.currentTimeMillis();
+            mImeToken = imeToken;
+            mImeId = imeId;
+            mStartInputReason = startInputReason;
+            mRestarting = restarting;
+            mTargetWindow = targetWindow;
+            mEditorInfo = editorInfo;
+            mTargetWindowSoftInputMode = targetWindowSoftInputMode;
+            mClientBindSequenceNumber = clientBindSequenceNumber;
+        }
+    }
+
+    @GuardedBy("mMethodMap")
+    private final WeakHashMap<IBinder, StartInputInfo> mStartInputMap = new WeakHashMap<>();
+
+    /**
+     * A ring buffer to store the history of {@link StartInputInfo}.
+     */
+    private static final class StartInputHistory {
+        /**
+         * Entry size for non low-RAM devices.
+         *
+         * <p>TODO: Consider to follow what other system services have been doing to manage
+         * constants (e.g. {@link android.provider.Settings.Global#ACTIVITY_MANAGER_CONSTANTS}).</p>
+         */
+        private final static int ENTRY_SIZE_FOR_HIGH_RAM_DEVICE = 16;
+
+        /**
+         * Entry size for non low-RAM devices.
+         *
+         * <p>TODO: Consider to follow what other system services have been doing to manage
+         * constants (e.g. {@link android.provider.Settings.Global#ACTIVITY_MANAGER_CONSTANTS}).</p>
+         */
+        private final static int ENTRY_SIZE_FOR_LOW_RAM_DEVICE = 5;
+
+        private static int getEntrySize() {
+            if (ActivityManager.isLowRamDeviceStatic()) {
+                return ENTRY_SIZE_FOR_LOW_RAM_DEVICE;
+            } else {
+                return ENTRY_SIZE_FOR_HIGH_RAM_DEVICE;
+            }
+        }
+
+        /**
+         * Backing store for the ring bugger.
+         */
+        private final Entry[] mEntries = new Entry[getEntrySize()];
+
+        /**
+         * An index of {@link #mEntries}, to which next {@link #addEntry(StartInputInfo)} should
+         * write.
+         */
+        private int mNextIndex = 0;
+
+        /**
+         * Recyclable entry to store the information in {@link StartInputInfo}.
+         */
+        private static final class Entry {
+            int mSequenceNumber;
+            long mTimestamp;
+            long mWallTime;
+            @NonNull
+            String mImeTokenString;
+            @NonNull
+            String mImeId;
+            /* @InputMethodClient.StartInputReason */
+            int mStartInputReason;
+            boolean mRestarting;
+            @NonNull
+            String mTargetWindowString;
+            @NonNull
+            EditorInfo mEditorInfo;
+            int mTargetWindowSoftInputMode;
+            int mClientBindSequenceNumber;
+
+            Entry(@NonNull StartInputInfo original) {
+                set(original);
+            }
+
+            void set(@NonNull StartInputInfo original) {
+                mSequenceNumber = original.mSequenceNumber;
+                mTimestamp = original.mTimestamp;
+                mWallTime = original.mWallTime;
+                // Intentionally convert to String so as not to keep a strong reference to a Binder
+                // object.
+                mImeTokenString = String.valueOf(original.mImeToken);
+                mImeId = original.mImeId;
+                mStartInputReason = original.mStartInputReason;
+                mRestarting = original.mRestarting;
+                // Intentionally convert to String so as not to keep a strong reference to a Binder
+                // object.
+                mTargetWindowString = String.valueOf(original.mTargetWindow);
+                mEditorInfo = original.mEditorInfo;
+                mTargetWindowSoftInputMode = original.mTargetWindowSoftInputMode;
+                mClientBindSequenceNumber = original.mClientBindSequenceNumber;
+            }
+        }
+
+        /**
+         * Add a new entry and discard the oldest entry as needed.
+         * @param info {@lin StartInputInfo} to be added.
+         */
+        void addEntry(@NonNull StartInputInfo info) {
+            final int index = mNextIndex;
+            if (mEntries[index] == null) {
+                mEntries[index] = new Entry(info);
+            } else {
+                mEntries[index].set(info);
+            }
+            mNextIndex = (mNextIndex + 1) % mEntries.length;
+        }
+
+        void dump(@NonNull PrintWriter pw, @NonNull String prefix) {
+            final SimpleDateFormat dataFormat =
+                    new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.US);
+
+            for (int i = 0; i < mEntries.length; ++i) {
+                final Entry entry = mEntries[(i + mNextIndex) % mEntries.length];
+                if (entry == null) {
+                    continue;
+                }
+                pw.print(prefix);
+                pw.println("StartInput #" + entry.mSequenceNumber + ":");
+
+                pw.print(prefix);
+                pw.println(" time=" + dataFormat.format(new Date(entry.mWallTime))
+                        + " (timestamp=" + entry.mTimestamp + ")"
+                        + " reason="
+                        + InputMethodClient.getStartInputReason(entry.mStartInputReason)
+                        + " restarting=" + entry.mRestarting);
+
+                pw.print(prefix);
+                pw.println(" imeToken=" + entry.mImeTokenString + " [" + entry.mImeId + "]");
+
+                pw.print(prefix);
+                pw.println(" targetWin=" + entry.mTargetWindowString
+                        + " [" + entry.mEditorInfo.packageName + "]"
+                        + " clientBindSeq=" + entry.mClientBindSequenceNumber);
+
+                pw.print(prefix);
+                pw.println(" softInputMode=" + InputMethodClient.softInputModeToString(
+                                entry.mTargetWindowSoftInputMode));
+
+                pw.print(prefix);
+                pw.println(" inputType=0x" + Integer.toHexString(entry.mEditorInfo.inputType)
+                        + " imeOptions=0x" + Integer.toHexString(entry.mEditorInfo.imeOptions)
+                        + " fieldId=0x" + Integer.toHexString(entry.mEditorInfo.fieldId)
+                        + " fieldName=" + entry.mEditorInfo.fieldName
+                        + " actionId=" + entry.mEditorInfo.actionId
+                        + " actionLabel=" + entry.mEditorInfo.actionLabel);
+            }
+        }
+    }
+
+    @GuardedBy("mMethodMap")
+    @NonNull
+    private final StartInputHistory mStartInputHistory = new StartInputHistory();
+
     class SettingsObserver extends ContentObserver {
         int mUserId;
         boolean mRegistered = false;
@@ -587,15 +812,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,8 +879,30 @@
                 Settings.Secure.ENABLED_INPUT_METHODS, mergedImesAndSubtypesString);
     }
 
-    class MyPackageMonitor extends PackageMonitor {
-        private boolean isChangingPackagesOfCurrentUser() {
+    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);
+        }
+
+        @GuardedBy("mMethodMap")
+        private boolean isChangingPackagesOfCurrentUserLocked() {
             final int userId = getChangingUserId();
             final boolean retval = userId == mSettings.getCurrentUserId();
             if (DEBUG) {
@@ -648,10 +915,10 @@
 
         @Override
         public boolean onHandleForceStop(Intent intent, String[] packages, int uid, boolean doit) {
-            if (!isChangingPackagesOfCurrentUser()) {
-                return false;
-            }
             synchronized (mMethodMap) {
+                if (!isChangingPackagesOfCurrentUserLocked()) {
+                    return false;
+                }
                 String curInputMethodId = mSettings.getSelectedInputMethod();
                 final int N = mMethodList.size();
                 if (curInputMethodId != null) {
@@ -676,11 +943,19 @@
         }
 
         @Override
-        public void onSomePackagesChanged() {
-            if (!isChangingPackagesOfCurrentUser()) {
-                return;
-            }
+        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() {
+            synchronized (mMethodMap) {
+                if (!isChangingPackagesOfCurrentUserLocked()) {
+                    return;
+                }
                 InputMethodInfo curIm = null;
                 String curInputMethodId = mSettings.getSelectedInputMethod();
                 final int N = mMethodList.size();
@@ -938,51 +1213,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 +1239,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 +1513,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;
@@ -1297,22 +1545,25 @@
         return flags;
     }
 
-    InputBindResult attachNewInputLocked(boolean initial) {
+    InputBindResult attachNewInputLocked(
+            /* @InputMethodClient.StartInputReason */ final int startInputReason, boolean initial) {
         if (!mBoundToMethod) {
             executeOrSendMessage(mCurMethod, mCaller.obtainMessageOO(
                     MSG_BIND_INPUT, mCurMethod, mCurClient.binding));
             mBoundToMethod = true;
         }
+
+        final Binder startInputToken = new Binder();
+        final StartInputInfo info = new StartInputInfo(mCurToken, mCurId, startInputReason,
+                !initial, mCurFocusedWindow, mCurAttribute, mCurFocusedWindowSoftInputMode,
+                mCurSeq);
+        mStartInputMap.put(startInputToken, info);
+        mStartInputHistory.addEntry(info);
+
         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.obtainMessageIIOOOO(
+                MSG_START_INPUT, mCurInputContextMissingMethods, initial ? 0 : 1 /* restarting */,
+                startInputToken, session, mCurInputContext, mCurAttribute));
         if (mShowRequested) {
             if (DEBUG) Slog.v(TAG, "Attach new input asks to show input");
             showCurrentInputLocked(getAppShowFlags(), null);
@@ -1361,12 +1612,13 @@
         }
 
         return startInputUncheckedLocked(cs, inputContext, missingMethods, attribute,
-                controlFlags);
+                controlFlags, startInputReason);
     }
 
     InputBindResult startInputUncheckedLocked(@NonNull ClientState cs, IInputContext inputContext,
             /* @InputConnectionInspector.missingMethods */ final int missingMethods,
-            @NonNull EditorInfo attribute, int controlFlags) {
+            @NonNull EditorInfo attribute, int controlFlags,
+            /* @InputMethodClient.StartInputReason */ final int startInputReason) {
         // If no method is currently selected, do nothing.
         if (mCurMethodId == null) {
             return mNoBinding;
@@ -1408,7 +1660,7 @@
             if (cs.curSession != null) {
                 // Fast case: if we are already connected to the input method,
                 // then just return it.
-                return attachNewInputLocked(
+                return attachNewInputLocked(startInputReason,
                         (controlFlags&InputMethodManager.CONTROL_START_INITIAL) != 0);
             }
             if (mHaveConnection) {
@@ -1549,7 +1801,8 @@
                     clearClientSessionLocked(mCurClient);
                     mCurClient.curSession = new SessionState(mCurClient,
                             method, session, channel);
-                    InputBindResult res = attachNewInputLocked(true);
+                    InputBindResult res = attachNewInputLocked(
+                            InputMethodClient.START_INPUT_REASON_SESSION_CREATED_BY_IME, true);
                     if (res.method != null) {
                         executeOrSendMessage(mCurClient.client, mCaller.obtainMessageOO(
                                 MSG_BIND_CLIENT, mCurClient.client, res));
@@ -1646,6 +1899,7 @@
         if (mStatusBar != null) {
             mStatusBar.setIconVisibility(mSlotIme, false);
         }
+        mInFullscreenMode = false;
     }
 
     @Override
@@ -1777,16 +2031,22 @@
 
     @SuppressWarnings("deprecation")
     @Override
-    public void setImeWindowStatus(IBinder token, int vis, int backDisposition) {
+    public void setImeWindowStatus(IBinder token, IBinder startInputToken, int vis,
+            int backDisposition) {
         if (!calledWithValidToken(token)) {
             return;
         }
 
+        final StartInputInfo info;
         synchronized (mMethodMap) {
+            info = mStartInputMap.get(startInputToken);
             mImeWindowVis = vis;
             mBackDisposition = backDisposition;
             updateSystemUiLocked(token, vis, backDisposition);
         }
+        mWindowManagerInternal.updateInputMethodWindowStatus(token,
+                (vis & InputMethodService.IME_VISIBLE) != 0,
+                token != null ? info.mTargetWindow : null);
     }
 
     private void updateSystemUi(IBinder token, int vis, int backDisposition) {
@@ -2232,7 +2492,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
@@ -2249,7 +2510,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());
@@ -2289,11 +2550,12 @@
                     }
                     if (attribute != null) {
                         return startInputUncheckedLocked(cs, inputContext, missingMethods,
-                                attribute, controlFlags);
+                                attribute, controlFlags, startInputReason);
                     }
                     return null;
                 }
                 mCurFocusedWindow = windowToken;
+                mCurFocusedWindowSoftInputMode = softInputMode;
                 mCurFocusedWindowClient = cs;
 
                 // Should we auto-show the IME even if the caller has not
@@ -2339,7 +2601,7 @@
                             if (DEBUG) Slog.v(TAG, "Unspecified window will show input");
                             if (attribute != null) {
                                 res = startInputUncheckedLocked(cs, inputContext,
-                                        missingMethods, attribute, controlFlags);
+                                        missingMethods, attribute, controlFlags, startInputReason);
                                 didStart = true;
                             }
                             showCurrentInputLocked(InputMethodManager.SHOW_IMPLICIT, null);
@@ -2365,7 +2627,7 @@
                             if (DEBUG) Slog.v(TAG, "Window asks to show input going forward");
                             if (attribute != null) {
                                 res = startInputUncheckedLocked(cs, inputContext,
-                                        missingMethods, attribute, controlFlags);
+                                        missingMethods, attribute, controlFlags, startInputReason);
                                 didStart = true;
                             }
                             showCurrentInputLocked(InputMethodManager.SHOW_IMPLICIT, null);
@@ -2375,7 +2637,7 @@
                         if (DEBUG) Slog.v(TAG, "Window asks to always show input");
                         if (attribute != null) {
                             res = startInputUncheckedLocked(cs, inputContext, missingMethods,
-                                    attribute, controlFlags);
+                                    attribute, controlFlags, startInputReason);
                             didStart = true;
                         }
                         showCurrentInputLocked(InputMethodManager.SHOW_IMPLICIT, null);
@@ -2384,7 +2646,7 @@
 
                 if (!didStart && attribute != null) {
                     res = startInputUncheckedLocked(cs, inputContext, missingMethods, attribute,
-                            controlFlags);
+                            controlFlags, startInputReason);
                 }
             }
         } finally {
@@ -2857,26 +3119,17 @@
             // ---------------------------------------------------------
 
             case MSG_START_INPUT: {
-                int missingMethods = msg.arg1;
+                final int missingMethods = msg.arg1;
+                final boolean restarting = msg.arg2 != 0;
                 args = (SomeArgs) msg.obj;
+                final IBinder startInputToken = (IBinder) args.arg1;
+                final SessionState session = (SessionState) args.arg2;
+                final IInputContext inputContext = (IInputContext) args.arg3;
+                final EditorInfo editorInfo = (EditorInfo) args.arg4;
                 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(startInputToken, inputContext, missingMethods,
+                            editorInfo, restarting);
                 } catch (RemoteException e) {
                 }
                 args.recycle();
@@ -2912,7 +3165,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 "
@@ -2939,6 +3192,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:
@@ -2959,8 +3224,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));
             }
         }
     }
@@ -3016,6 +3282,8 @@
         }
         mMethodList.clear();
         mMethodMap.clear();
+        mMethodMapUpdateCount++;
+        mMyPackageMonitor.clearPackagesToMonitorComponentChangeLocked();
 
         // Use for queryIntentServicesAsUser
         final PackageManager pm = mContext.getPackageManager();
@@ -3028,22 +3296,22 @@
                 PackageManager.GET_META_DATA | PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS,
                 mSettings.getCurrentUserId());
 
-        final HashMap<String, List<InputMethodSubtype>> additionalSubtypes =
+        final HashMap<String, List<InputMethodSubtype>> additionalSubtypeMap =
                 mFileManager.getAllAdditionalInputMethodSubtypes();
         for (int i = 0; i < services.size(); ++i) {
             ResolveInfo ri = services.get(i);
             ServiceInfo si = ri.serviceInfo;
-            ComponentName compName = new ComponentName(si.packageName, si.name);
-            if (!android.Manifest.permission.BIND_INPUT_METHOD.equals(
-                    si.permission)) {
-                Slog.w(TAG, "Skipping input method " + compName
+            final String imeId = InputMethodInfo.computeId(ri);
+            if (!android.Manifest.permission.BIND_INPUT_METHOD.equals(si.permission)) {
+                Slog.w(TAG, "Skipping input method " + imeId
                         + ": it does not require the permission "
                         + android.Manifest.permission.BIND_INPUT_METHOD);
                 continue;
             }
 
-            if (DEBUG) Slog.d(TAG, "Checking " + compName);
+            if (DEBUG) Slog.d(TAG, "Checking " + imeId);
 
+            final List<InputMethodSubtype> additionalSubtypes = additionalSubtypeMap.get(imeId);
             try {
                 InputMethodInfo p = new InputMethodInfo(mContext, ri, additionalSubtypes);
                 mMethodList.add(p);
@@ -3054,7 +3322,27 @@
                     Slog.d(TAG, "Found an input method " + p);
                 }
             } catch (Exception e) {
-                Slog.wtf(TAG, "Unable to load input method " + compName, e);
+                Slog.wtf(TAG, "Unable to load input method " + imeId, e);
+            }
+        }
+
+        // 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);
             }
         }
 
@@ -3960,6 +4248,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) {
@@ -3979,7 +4284,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 + ":");
@@ -3996,9 +4301,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);
@@ -4011,6 +4318,7 @@
                     + " mShowExplicitlyRequested=" + mShowExplicitlyRequested
                     + " mShowForced=" + mShowForced
                     + " mInputShown=" + mInputShown);
+            p.println("  mInFullscreenMode=" + mInFullscreenMode);
             p.println("  mCurUserActionNotificationSequenceNumber="
                     + mCurUserActionNotificationSequenceNumber);
             p.println("  mSystemReady=" + mSystemReady + " mInteractive=" + mIsInteractive);
@@ -4019,6 +4327,9 @@
             mSwitchingController.dump(p);
             p.println("  mSettings:");
             mSettings.dumpLocked(p, "    ");
+
+            p.println("  mStartInputHistory:");
+            mStartInputHistory.dump(pw, "   ");
         }
 
         p.println(" ");
diff --git a/services/core/java/com/android/server/LocationManagerService.java b/services/core/java/com/android/server/LocationManagerService.java
index 4ab894f..ef7780c 100644
--- a/services/core/java/com/android/server/LocationManagerService.java
+++ b/services/core/java/com/android/server/LocationManagerService.java
@@ -17,7 +17,9 @@
 package com.android.server;
 
 import android.app.ActivityManager;
+import android.annotation.NonNull;
 import android.content.pm.PackageManagerInternal;
+import android.util.ArraySet;
 import com.android.internal.content.PackageMonitor;
 import com.android.internal.location.ProviderProperties;
 import com.android.internal.location.ProviderRequest;
@@ -62,6 +64,7 @@
 import android.location.Criteria;
 import android.location.GeocoderParams;
 import android.location.Geofence;
+import android.location.IBatchedLocationCallback;
 import android.location.IGnssMeasurementsListener;
 import android.location.IGnssStatusListener;
 import android.location.IGnssStatusProvider;
@@ -101,6 +104,7 @@
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.NoSuchElementException;
 import java.util.Set;
 
 /**
@@ -132,8 +136,6 @@
     private static final String FUSED_LOCATION_SERVICE_ACTION =
             "com.android.location.service.FusedLocationProvider";
 
-    private static final String GMSCORE_PACKAGE = "com.android.google.gms";
-
     private static final int MSG_LOCATION_CHANGED = 1;
 
     private static final long NANOS_PER_MILLI = 1000000L;
@@ -142,7 +144,7 @@
     private static final long HIGH_POWER_INTERVAL_MS = 5 * 60 * 1000;
 
     // default background throttling interval if not overriden in settings
-    private static final long DEFAULT_BACKGROUND_THROTTLE_INTERVAL_MS = 10 * 60 * 1000;
+    private static final long DEFAULT_BACKGROUND_THROTTLE_INTERVAL_MS = 30 * 60 * 1000;
 
     // Location Providers may sometimes deliver location updates
     // slightly faster that requested - provide grace period so
@@ -221,7 +223,7 @@
     private final ArrayList<LocationProviderProxy> mProxyProviders =
             new ArrayList<>();
 
-    private String[] mBackgroundThrottlePackageWhitelist = new String[]{};
+    private final ArraySet<String> mBackgroundThrottlePackageWhitelist = new ArraySet<>();
 
     // current active user on the device - other users are denied location data
     private int mCurrentUserId = UserHandle.USER_SYSTEM;
@@ -229,6 +231,11 @@
 
     private GnssLocationProvider.GnssSystemInfoProvider mGnssSystemInfoProvider;
 
+    private GnssLocationProvider.GnssBatchingProvider mGnssBatchingProvider;
+    private IBatchedLocationCallback mGnssBatchingCallback;
+    private LinkedCallback mGnssBatchingDeathCallback;
+    private boolean mGnssBatchingInProgress = false;
+
     public LocationManagerService(Context context) {
         super();
         mContext = context;
@@ -337,6 +344,8 @@
             mUserManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
             updateUserProfiles(mCurrentUserId);
 
+            updateThrottlingWhitelistLocked();
+
             // prepare providers
             loadProvidersLocked();
             updateProvidersLocked();
@@ -372,14 +381,7 @@
                 @Override
                 public void onChange(boolean selfChange) {
                     synchronized (mLock) {
-                        String setting = Settings.Global.getString(
-                            mContext.getContentResolver(),
-                            Settings.Global.LOCATION_BACKGROUND_THROTTLE_PACKAGE_WHITELIST);
-                        if (setting == null) {
-                            setting = "";
-                        }
-
-                        mBackgroundThrottlePackageWhitelist = setting.split(",");
+                        updateThrottlingWhitelistLocked();
                         updateProvidersLocked();
                     }
                 }
@@ -545,6 +547,7 @@
             GnssLocationProvider gnssProvider = new GnssLocationProvider(mContext, this,
                     mLocationHandler.getLooper());
             mGnssSystemInfoProvider = gnssProvider.getGnssSystemInfoProvider();
+            mGnssBatchingProvider = gnssProvider.getGnssBatchingProvider();
             mGnssStatusProvider = gnssProvider.getGnssStatusProvider();
             mNetInitiatedListener = gnssProvider.getNetInitiatedListener();
             addProviderLocked(gnssProvider);
@@ -1073,13 +1076,197 @@
      */
     @Override
     public int getGnssYearOfHardware() {
-        if (mGnssNavigationMessageProvider != null) {
+        if (mGnssSystemInfoProvider != null) {
             return mGnssSystemInfoProvider.getGnssYearOfHardware();
         } else {
             return 0;
         }
     }
 
+    /**
+     * Runs some checks for GNSS (FINE) level permissions, used by several methods which directly
+     * (try to) access GNSS information at this layer.
+     */
+    private boolean hasGnssPermissions(String packageName) {
+        int allowedResolutionLevel = getCallerAllowedResolutionLevel();
+        checkResolutionLevelIsSufficientForProviderUse(
+                allowedResolutionLevel,
+                LocationManager.GPS_PROVIDER);
+
+        int pid = Binder.getCallingPid();
+        int uid = Binder.getCallingUid();
+        long identity = Binder.clearCallingIdentity();
+        boolean hasLocationAccess;
+        try {
+            hasLocationAccess = checkLocationAccess(pid, uid, packageName, allowedResolutionLevel);
+        } finally {
+            Binder.restoreCallingIdentity(identity);
+        }
+
+        return hasLocationAccess;
+    }
+
+    /**
+     * Returns the GNSS batching size, if available.
+     */
+    @Override
+    public int getGnssBatchSize(String packageName) {
+        mContext.enforceCallingPermission(android.Manifest.permission.LOCATION_HARDWARE,
+                "Location Hardware permission not granted to access hardware batching");
+
+        if (hasGnssPermissions(packageName) && mGnssBatchingProvider != null) {
+            return mGnssBatchingProvider.getSize();
+        } else {
+            return 0;
+        }
+    }
+
+    /**
+     * Adds a callback for GNSS Batching events, if permissions allow, which are transported
+     * to potentially multiple listeners by the BatchedLocationCallbackTransport above this.
+     */
+    @Override
+    public boolean addGnssBatchingCallback(IBatchedLocationCallback callback, String packageName) {
+        mContext.enforceCallingPermission(android.Manifest.permission.LOCATION_HARDWARE,
+                "Location Hardware permission not granted to access hardware batching");
+
+        if (!hasGnssPermissions(packageName) || mGnssBatchingProvider == null) {
+            return false;
+        }
+
+        mGnssBatchingCallback = callback;
+        mGnssBatchingDeathCallback = new LinkedCallback(callback);
+        try {
+            callback.asBinder().linkToDeath(mGnssBatchingDeathCallback, 0 /* flags */);
+        } catch (RemoteException e) {
+            // if the remote process registering the listener is already dead, just swallow the
+            // exception and return
+            Log.e(TAG, "Remote listener already died.", e);
+            return false;
+        }
+
+        return true;
+    }
+
+    private class LinkedCallback implements IBinder.DeathRecipient {
+        private final IBatchedLocationCallback mCallback;
+
+        public LinkedCallback(@NonNull IBatchedLocationCallback callback) {
+            mCallback = callback;
+        }
+
+        @NonNull
+        public IBatchedLocationCallback getUnderlyingListener() {
+            return mCallback;
+        }
+
+        @Override
+        public void binderDied() {
+            Log.d(TAG, "Remote Batching Callback died: " + mCallback);
+            stopGnssBatch();
+            removeGnssBatchingCallback();
+        }
+    }
+
+    /**
+     * Removes callback for GNSS batching
+     */
+    @Override
+    public void removeGnssBatchingCallback() {
+        try {
+            mGnssBatchingCallback.asBinder().unlinkToDeath(mGnssBatchingDeathCallback,
+                    0 /* flags */);
+        } catch (NoSuchElementException e) {
+            // if the death callback isn't connected (it should be...), log error, swallow the
+            // exception and return
+            Log.e(TAG, "Couldn't unlink death callback.", e);
+        }
+        mGnssBatchingCallback = null;
+        mGnssBatchingDeathCallback = null;
+    }
+
+
+    /**
+     * Starts GNSS batching, if available.
+     */
+    @Override
+    public boolean startGnssBatch(long periodNanos, boolean wakeOnFifoFull, String packageName) {
+        mContext.enforceCallingPermission(android.Manifest.permission.LOCATION_HARDWARE,
+                "Location Hardware permission not granted to access hardware batching");
+
+        if (!hasGnssPermissions(packageName) || mGnssBatchingProvider == null) {
+            return false;
+        }
+
+        if (mGnssBatchingInProgress) {
+            // Current design does not expect multiple starts to be called repeatedly
+            Log.e(TAG, "startGnssBatch unexpectedly called w/o stopping prior batch");
+            // Try to clean up anyway, and continue
+            stopGnssBatch();
+        }
+
+        mGnssBatchingInProgress = true;
+        return mGnssBatchingProvider.start(periodNanos, wakeOnFifoFull);
+    }
+
+    /**
+     * Flushes a GNSS batch in progress
+     */
+    @Override
+    public void flushGnssBatch(String packageName) {
+        mContext.enforceCallingPermission(android.Manifest.permission.LOCATION_HARDWARE,
+                "Location Hardware permission not granted to access hardware batching");
+
+        if (!hasGnssPermissions(packageName)) {
+            Log.e(TAG, "flushGnssBatch called without GNSS permissions");
+            return;
+        }
+
+        if (!mGnssBatchingInProgress) {
+            Log.w(TAG, "flushGnssBatch called with no batch in progress");
+        }
+
+        if (mGnssBatchingProvider != null) {
+             mGnssBatchingProvider.flush();
+        }
+    }
+
+    /**
+     * Stops GNSS batching
+     */
+    @Override
+    public boolean stopGnssBatch() {
+        mContext.enforceCallingPermission(android.Manifest.permission.LOCATION_HARDWARE,
+                "Location Hardware permission not granted to access hardware batching");
+
+        if (mGnssBatchingProvider != null) {
+            mGnssBatchingInProgress = false;
+            return mGnssBatchingProvider.stop();
+        } else  {
+            return false;
+        }
+    }
+
+    @Override
+    public void reportLocationBatch(List<Location> locations) {
+        checkCallerIsProvider();
+
+        // Currently used only for GNSS locations - update permissions check if changed
+        if (isAllowedByCurrentUserSettingsLocked(LocationManager.GPS_PROVIDER)) {
+            if (mGnssBatchingCallback == null) {
+                Slog.e(TAG, "reportLocationBatch() called without active Callback");
+                return;
+            }
+            try {
+                mGnssBatchingCallback.onLocationBatch(locations);
+            } catch (RemoteException e) {
+                Slog.e(TAG, "mGnssBatchingCallback.onLocationBatch failed", e);
+            }
+        } else {
+            Slog.w(TAG, "reportLocationBatch() called without user permission, locations blocked");
+        }
+    }
+
     private void addProviderLocked(LocationProviderInterface provider) {
         mProviders.add(provider);
         mProvidersByName.put(provider.getName(), provider);
@@ -1554,12 +1741,27 @@
         p.setRequest(providerRequest, worksource);
     }
 
+    private void updateThrottlingWhitelistLocked() {
+        String setting = Settings.Global.getString(
+            mContext.getContentResolver(),
+            Settings.Global.LOCATION_BACKGROUND_THROTTLE_PACKAGE_WHITELIST);
+        if (setting == null) {
+            setting = "";
+        }
+
+        mBackgroundThrottlePackageWhitelist.clear();
+        mBackgroundThrottlePackageWhitelist.addAll(
+            SystemConfig.getInstance().getAllowUnthrottledLocation());
+        mBackgroundThrottlePackageWhitelist.addAll(
+            Arrays.asList(setting.split(",")));
+    }
+
     private boolean isThrottlingExemptLocked(Receiver receiver) {
         if (receiver.mUid == Process.SYSTEM_UID) {
             return true;
         }
 
-        if (receiver.mPackageName.equals(GMSCORE_PACKAGE)) {
+        if (mBackgroundThrottlePackageWhitelist.contains(receiver.mPackageName)) {
             return true;
         }
 
@@ -1569,12 +1771,6 @@
             }
         }
 
-        for (String whitelistedPackage : mBackgroundThrottlePackageWhitelist) {
-            if (receiver.mPackageName.equals(whitelistedPackage)) {
-                return true;
-            }
-        }
-
         return false;
     }
 
@@ -2000,22 +2196,7 @@
 
     @Override
     public boolean registerGnssStatusCallback(IGnssStatusListener callback, String packageName) {
-        int allowedResolutionLevel = getCallerAllowedResolutionLevel();
-        checkResolutionLevelIsSufficientForProviderUse(allowedResolutionLevel,
-                LocationManager.GPS_PROVIDER);
-
-        final int pid = Binder.getCallingPid();
-        final int uid = Binder.getCallingUid();
-        final long ident = Binder.clearCallingIdentity();
-        try {
-            if (!checkLocationAccess(pid, uid, packageName, allowedResolutionLevel)) {
-                return false;
-            }
-        } finally {
-            Binder.restoreCallingIdentity(ident);
-        }
-
-        if (mGnssStatusProvider == null) {
+        if (!hasGnssPermissions(packageName) || mGnssStatusProvider == null) {
             return false;
         }
 
@@ -2043,22 +2224,7 @@
     public boolean addGnssMeasurementsListener(
             IGnssMeasurementsListener listener,
             String packageName) {
-        int allowedResolutionLevel = getCallerAllowedResolutionLevel();
-        checkResolutionLevelIsSufficientForProviderUse(
-                allowedResolutionLevel,
-                LocationManager.GPS_PROVIDER);
-
-        int pid = Binder.getCallingPid();
-        int uid = Binder.getCallingUid();
-        long identity = Binder.clearCallingIdentity();
-        boolean hasLocationAccess;
-        try {
-            hasLocationAccess = checkLocationAccess(pid, uid, packageName, allowedResolutionLevel);
-        } finally {
-            Binder.restoreCallingIdentity(identity);
-        }
-
-        if (!hasLocationAccess || mGnssMeasurementsProvider == null) {
+        if (!hasGnssPermissions(packageName) || mGnssMeasurementsProvider == null) {
             return false;
         }
         return mGnssMeasurementsProvider.addListener(listener);
@@ -2075,22 +2241,7 @@
     public boolean addGnssNavigationMessageListener(
             IGnssNavigationMessageListener listener,
             String packageName) {
-        int allowedResolutionLevel = getCallerAllowedResolutionLevel();
-        checkResolutionLevelIsSufficientForProviderUse(
-                allowedResolutionLevel,
-                LocationManager.GPS_PROVIDER);
-
-        int pid = Binder.getCallingPid();
-        int uid = Binder.getCallingUid();
-        long identity = Binder.clearCallingIdentity();
-        boolean hasLocationAccess;
-        try {
-            hasLocationAccess = checkLocationAccess(pid, uid, packageName, allowedResolutionLevel);
-        } finally {
-            Binder.restoreCallingIdentity(identity);
-        }
-
-        if (!hasLocationAccess || mGnssNavigationMessageProvider == null) {
+        if (!hasGnssPermissions(packageName) || mGnssNavigationMessageProvider == null) {
             return false;
         }
         return mGnssNavigationMessageProvider.addListener(listener);
@@ -2851,6 +3002,13 @@
                 }
             }
 
+            if (!mBackgroundThrottlePackageWhitelist.isEmpty()) {
+                pw.println("  Throttling Whitelisted Packages:");
+                for (String packageName : mBackgroundThrottlePackageWhitelist) {
+                    pw.println("    " + packageName);
+                }
+            }
+
             pw.append("  fudger: ");
             mLocationFudger.dump(fd, pw,  args);
 
@@ -2866,6 +3024,9 @@
                 pw.println(":");
                 provider.dump(fd, pw, args);
             }
+            if (mGnssBatchingInProgress) {
+                pw.println("  GNSS batching in progress");
+            }
         }
     }
 }
diff --git a/services/core/java/com/android/server/LockSettingsService.java b/services/core/java/com/android/server/LockSettingsService.java
index 8ef34dc..4a44530 100644
--- a/services/core/java/com/android/server/LockSettingsService.java
+++ b/services/core/java/com/android/server/LockSettingsService.java
@@ -20,6 +20,8 @@
 import static android.Manifest.permission.READ_CONTACTS;
 import static android.content.Context.KEYGUARD_SERVICE;
 import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_LOCKOUT;
+import static com.android.internal.widget.LockPatternUtils.SYNTHETIC_PASSWORD_ENABLED_KEY;
+import static com.android.internal.widget.LockPatternUtils.SYNTHETIC_PASSWORD_HANDLE_KEY;
 
 import android.annotation.UserIdInt;
 import android.app.ActivityManager;
@@ -61,6 +63,7 @@
 import android.provider.Settings;
 import android.provider.Settings.Secure;
 import android.provider.Settings.SettingNotFoundException;
+import android.security.GateKeeper;
 import android.security.KeyStore;
 import android.security.keystore.AndroidKeyStoreProvider;
 import android.security.keystore.KeyProperties;
@@ -68,6 +71,7 @@
 import android.service.gatekeeper.GateKeeperResponse;
 import android.service.gatekeeper.IGateKeeperService;
 import android.text.TextUtils;
+import android.util.ArrayMap;
 import android.util.Log;
 import android.util.Slog;
 
@@ -78,6 +82,8 @@
 import com.android.internal.widget.LockPatternUtils;
 import com.android.internal.widget.VerifyCredentialResponse;
 import com.android.server.LockSettingsStorage.CredentialHash;
+import com.android.server.SyntheticPasswordManager.AuthenticationResult;
+import com.android.server.SyntheticPasswordManager.AuthenticationToken;
 
 import libcore.util.HexEncoding;
 
@@ -85,6 +91,7 @@
 import java.io.FileDescriptor;
 import java.io.FileNotFoundException;
 import java.io.IOException;
+import java.io.PrintWriter;
 import java.nio.charset.StandardCharsets;
 import java.security.InvalidAlgorithmParameterException;
 import java.security.InvalidKeyException;
@@ -94,8 +101,10 @@
 import java.security.SecureRandom;
 import java.security.UnrecoverableKeyException;
 import java.security.cert.CertificateException;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
+import java.util.Map;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 
@@ -142,12 +151,14 @@
 
     private boolean mFirstCallToVold;
     protected IGateKeeperService mGateKeeperService;
+    private SyntheticPasswordManager mSpManager;
+
     /**
      * The UIDs that are used for system credential storage in keystore.
      */
     private static final int[] SYSTEM_CREDENTIAL_UIDS = {
             Process.WIFI_UID, Process.VPN_UID,
-            Process.ROOT_UID, Process.SYSTEM_UID };
+            Process.ROOT_UID };
 
     // This class manages life cycle events for encrypted users on File Based Encryption (FBE)
     // devices. The most basic of these is to show/hide notifications about missing features until
@@ -231,7 +242,7 @@
         }
         // Do not tie it to parent when parent does not have a screen lock
         final int parentId = mUserManager.getProfileParent(managedUserId).id;
-        if (!mStorage.hasPassword(parentId) && !mStorage.hasPattern(parentId)) {
+        if (!isUserSecure(parentId)) {
             if (DEBUG) Slog.v(TAG, "Parent does not have a screen lock");
             return;
         }
@@ -332,6 +343,14 @@
             }
             return null;
         }
+
+        public SyntheticPasswordManager getSyntheticPasswordManager(LockSettingsStorage storage) {
+            return new SyntheticPasswordManager(storage);
+        }
+
+        public int binderGetCallingUid() {
+            return Binder.getCallingUid();
+        }
     }
 
     public LockSettingsService(Context context) {
@@ -362,6 +381,8 @@
         mUserManager = injector.getUserManager();
         mStrongAuthTracker = injector.getStrongAuthTracker();
         mStrongAuthTracker.register(mStrongAuth);
+
+        mSpManager = injector.getSyntheticPasswordManager(mStorage);
     }
 
     /**
@@ -378,7 +399,7 @@
         }
 
         final UserHandle userHandle = user.getUserHandle();
-        final boolean isSecure = mStorage.hasPassword(userId) || mStorage.hasPattern(userId);
+        final boolean isSecure = isUserSecure(userId);
         if (isSecure && !mUserManager.isUserUnlockingOrUnlocked(userHandle)) {
             UserInfo parent = mUserManager.getProfileParent(userId);
             if (parent != null &&
@@ -453,35 +474,34 @@
     }
 
     public void onUnlockUser(final int userId) {
-        // Hide notification first, as tie managed profile lock takes time
-        hideEncryptionNotification(new UserHandle(userId));
+        // Perform tasks which require locks in LSS on a handler, as we are callbacks from
+        // ActivityManager.unlockUser()
+        mHandler.post(new Runnable() {
+            @Override
+            public void run() {
+                // Hide notification first, as tie managed profile lock takes time
+                hideEncryptionNotification(new UserHandle(userId));
 
-        if (mUserManager.getUserInfo(userId).isManagedProfile()) {
-            // As tieManagedProfileLockIfNecessary() may try to unlock user, we should not do it
-            // in onUnlockUser() synchronously, otherwise it may cause a deadlock
-            mHandler.post(new Runnable() {
-                @Override
-                public void run() {
+                // Now we have unlocked the parent user we should show notifications
+                // about any profiles that exist.
+                List<UserInfo> profiles = mUserManager.getProfiles(userId);
+                for (int i = 0; i < profiles.size(); i++) {
+                    UserInfo profile = profiles.get(i);
+                    final boolean isSecure = isUserSecure(profile.id);
+                    if (isSecure && profile.isManagedProfile()) {
+                        UserHandle userHandle = profile.getUserHandle();
+                        if (!mUserManager.isUserUnlockingOrUnlocked(userHandle) &&
+                                !mUserManager.isQuietModeEnabled(userHandle)) {
+                            showEncryptionNotificationForProfile(userHandle);
+                        }
+                    }
+                }
+
+                if (mUserManager.getUserInfo(userId).isManagedProfile()) {
                     tieManagedProfileLockIfNecessary(userId, null);
                 }
-            });
-        }
-
-        // Now we have unlocked the parent user we should show notifications
-        // about any profiles that exist.
-        List<UserInfo> profiles = mUserManager.getProfiles(userId);
-        for (int i = 0; i < profiles.size(); i++) {
-            UserInfo profile = profiles.get(i);
-            final boolean isSecure =
-                    mStorage.hasPassword(profile.id) || mStorage.hasPattern(profile.id);
-            if (isSecure && profile.isManagedProfile()) {
-                UserHandle userHandle = profile.getUserHandle();
-                if (!mUserManager.isUserUnlockingOrUnlocked(userHandle) &&
-                        !mUserManager.isQuietModeEnabled(userHandle)) {
-                    showEncryptionNotificationForProfile(userHandle);
-                }
             }
-        }
+        });
     }
 
     private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
@@ -799,16 +819,45 @@
 
     @Override
     public boolean havePassword(int userId) throws RemoteException {
+        synchronized (mSpManager) {
+            if (isSyntheticPasswordBasedCredentialLocked(userId)) {
+                long handle = getSyntheticPasswordHandleLocked(userId);
+                return mSpManager.getCredentialType(handle, userId) ==
+                        LockPatternUtils.CREDENTIAL_TYPE_PASSWORD;
+            }
+        }
         // Do we need a permissions check here?
         return mStorage.hasPassword(userId);
     }
 
     @Override
     public boolean havePattern(int userId) throws RemoteException {
+        synchronized (mSpManager) {
+            if (isSyntheticPasswordBasedCredentialLocked(userId)) {
+                long handle = getSyntheticPasswordHandleLocked(userId);
+                return mSpManager.getCredentialType(handle, userId) ==
+                        LockPatternUtils.CREDENTIAL_TYPE_PATTERN;
+            }
+        }
         // Do we need a permissions check here?
         return mStorage.hasPattern(userId);
     }
 
+    private boolean isUserSecure(int userId) {
+        synchronized (mSpManager) {
+            try {
+                if (isSyntheticPasswordBasedCredentialLocked(userId)) {
+                    long handle = getSyntheticPasswordHandleLocked(userId);
+                    return mSpManager.getCredentialType(handle, userId) !=
+                            LockPatternUtils.CREDENTIAL_TYPE_NONE;
+                }
+            } catch (RemoteException e) {
+                // fall through
+            }
+        }
+        return mStorage.hasCredential(userId);
+    }
+
     private void setKeystorePassword(String password, int userHandle) {
         final KeyStore ks = KeyStore.getInstance();
         ks.onUserPasswordChanged(userHandle, password);
@@ -914,21 +963,52 @@
         }
     }
 
-    private byte[] getCurrentHandle(int userId) {
-        CredentialHash credential = mStorage.readCredentialHash(userId);
-
-        // sanity check
-        if (credential.type != LockPatternUtils.CREDENTIAL_TYPE_NONE && credential.hash == null) {
-            Slog.e(TAG, "Stored handle type [" + credential.type + "] but no handle available");
+    private Map<Integer, String> getDecryptedPasswordsForAllTiedProfiles(int userId) {
+        if (mUserManager.getUserInfo(userId).isManagedProfile()) {
+            return null;
         }
-        return credential.hash;
+        Map<Integer, String> result = new ArrayMap<Integer, String>();
+        final List<UserInfo> profiles = mUserManager.getProfiles(userId);
+        final int size = profiles.size();
+        for (int i = 0; i < size; i++) {
+            final UserInfo profile = profiles.get(i);
+            if (!profile.isManagedProfile()) {
+                continue;
+            }
+            final int managedUserId = profile.id;
+            if (mLockPatternUtils.isSeparateProfileChallengeEnabled(managedUserId)) {
+                continue;
+            }
+            try {
+                result.put(userId, getDecryptedPasswordForTiedProfile(userId));
+            } catch (KeyStoreException | UnrecoverableKeyException | NoSuchAlgorithmException
+                    | NoSuchPaddingException | InvalidKeyException
+                    | InvalidAlgorithmParameterException | IllegalBlockSizeException
+                    | BadPaddingException | CertificateException | IOException e) {
+                // ignore
+            }
+        }
+        return result;
     }
 
-    private void onUserLockChanged(int userId) throws RemoteException {
+    /**
+     * Synchronize all profile's work challenge of the given user if it's unified: tie or clear them
+     * depending on the parent user's secure state.
+     *
+     * When clearing tied work challenges, a pre-computed password table for profiles are required,
+     * since changing password for profiles requires existing password, and existing passwords can
+     * only be computed before the parent user's password is cleared.
+     *
+     * Strictly this is a recursive function, since setLockCredentialInternal ends up calling this
+     * method again on profiles. However the recursion is guaranteed to terminate as this method
+     * terminates when the user is a managed profile.
+     */
+    private void synchronizeUnifiedWorkChallengeForProfiles(int userId,
+            Map<Integer, String> profilePasswordMap) throws RemoteException {
         if (mUserManager.getUserInfo(userId).isManagedProfile()) {
             return;
         }
-        final boolean isSecure = mStorage.hasPassword(userId) || mStorage.hasPattern(userId);
+        final boolean isSecure = isUserSecure(userId);
         final List<UserInfo> profiles = mUserManager.getProfiles(userId);
         final int size = profiles.size();
         for (int i = 0; i < size; i++) {
@@ -941,11 +1021,17 @@
                 if (isSecure) {
                     tieManagedProfileLockIfNecessary(managedUserId, null);
                 } else {
-                    clearUserKeyProtection(managedUserId);
-                    getGateKeeperService().clearSecureUserId(managedUserId);
-                    mStorage.writeCredentialHash(CredentialHash.createEmptyHash(), managedUserId);
-                    setKeystorePassword(null, managedUserId);
-                    fixateNewestUserKeyAuth(managedUserId);
+                    // We use cached work profile password computed before clearing the parent's
+                    // credential, otherwise they get lost
+                    if (profilePasswordMap != null && profilePasswordMap.containsKey(managedUserId)) {
+                        setLockCredentialInternal(null, LockPatternUtils.CREDENTIAL_TYPE_NONE,
+                                profilePasswordMap.get(managedUserId), managedUserId);
+                    } else {
+                        Slog.wtf(TAG, "clear tied profile challenges, but no password supplied.");
+                        // Supplying null here would lead to untrusted credential change
+                        setLockCredentialInternal(null, LockPatternUtils.CREDENTIAL_TYPE_NONE, null,
+                                managedUserId);
+                    }
                     mStorage.removeChildProfileLock(managedUserId);
                     removeKeystoreProfileKey(managedUserId);
                 }
@@ -978,7 +1064,13 @@
 
     private void setLockCredentialInternal(String credential, int credentialType,
             String savedCredential, int userId) throws RemoteException {
-        byte[] currentHandle = getCurrentHandle(userId);
+        synchronized (mSpManager) {
+            if (isSyntheticPasswordBasedCredentialLocked(userId)) {
+                spBasedSetLockCredentialInternalLocked(credential, credentialType, savedCredential,
+                        userId);
+                return;
+            }
+        }
         if (credentialType == LockPatternUtils.CREDENTIAL_TYPE_NONE) {
             if (credential != null) {
                 Slog.wtf(TAG, "CredentialType is none, but credential is non-null.");
@@ -988,45 +1080,60 @@
             mStorage.writeCredentialHash(CredentialHash.createEmptyHash(), userId);
             setKeystorePassword(null, userId);
             fixateNewestUserKeyAuth(userId);
-            onUserLockChanged(userId);
+            synchronizeUnifiedWorkChallengeForProfiles(userId, null);
             notifyActivePasswordMetricsAvailable(null, userId);
             return;
         }
         if (credential == null) {
             throw new RemoteException("Null credential with mismatched credential type");
         }
+
+        CredentialHash currentHandle = mStorage.readCredentialHash(userId);
         if (isManagedProfileWithUnifiedLock(userId)) {
             // get credential from keystore when managed profile has unified lock
-            try {
-                savedCredential = getDecryptedPasswordForTiedProfile(userId);
-            } catch (FileNotFoundException e) {
-                Slog.i(TAG, "Child profile key not found");
-            } catch (UnrecoverableKeyException | InvalidKeyException | KeyStoreException
-                    | NoSuchAlgorithmException | NoSuchPaddingException
-                    | InvalidAlgorithmParameterException | IllegalBlockSizeException
-                    | BadPaddingException | CertificateException | IOException e) {
-                Slog.e(TAG, "Failed to decrypt child profile key", e);
+            if (savedCredential == null) {
+                try {
+                    savedCredential = getDecryptedPasswordForTiedProfile(userId);
+                } catch (FileNotFoundException e) {
+                    Slog.i(TAG, "Child profile key not found");
+                } catch (UnrecoverableKeyException | InvalidKeyException | KeyStoreException
+                        | NoSuchAlgorithmException | NoSuchPaddingException
+                        | InvalidAlgorithmParameterException | IllegalBlockSizeException
+                        | BadPaddingException | CertificateException | IOException e) {
+                    Slog.e(TAG, "Failed to decrypt child profile key", e);
+                }
             }
         } else {
-            if (currentHandle == null) {
+            if (currentHandle.hash == null) {
                 if (savedCredential != null) {
                     Slog.w(TAG, "Saved credential provided, but none stored");
                 }
                 savedCredential = null;
             }
         }
-
-        byte[] enrolledHandle = enrollCredential(currentHandle, savedCredential, credential,
+        synchronized (mSpManager) {
+            if (shouldMigrateToSyntheticPasswordLocked(userId)) {
+                initializeSyntheticPasswordLocked(currentHandle.hash, savedCredential,
+                        currentHandle.type, userId);
+                spBasedSetLockCredentialInternalLocked(credential, credentialType, savedCredential,
+                        userId);
+                return;
+            }
+        }
+        if (DEBUG) Slog.d(TAG, "setLockCredentialInternal: user=" + userId);
+        byte[] enrolledHandle = enrollCredential(currentHandle.hash, savedCredential, credential,
                 userId);
         if (enrolledHandle != null) {
             CredentialHash willStore = CredentialHash.create(enrolledHandle, credentialType);
             mStorage.writeCredentialHash(willStore, userId);
-            // Refresh the auth token
-            setUserKeyProtection(userId, credential,
-                    doVerifyCredential(credential, credentialType, true, 0, userId,
-                            null /* progressCallback */));
+            // push new secret and auth token to vold
+            GateKeeperResponse gkResponse = getGateKeeperService()
+                    .verifyChallenge(userId, 0, willStore.hash, credential.getBytes());
+            setUserKeyProtection(userId, credential, convertResponse(gkResponse));
             fixateNewestUserKeyAuth(userId);
-            onUserLockChanged(userId);
+            // Refresh the auth token
+            doVerifyCredential(credential, credentialType, true, 0, userId, null /* progressCallback */);
+            synchronizeUnifiedWorkChallengeForProfiles(userId, null);
         } else {
             throw new RemoteException("Failed to enroll " +
                     (credentialType == LockPatternUtils.CREDENTIAL_TYPE_PASSWORD ? "password"
@@ -1034,6 +1141,26 @@
         }
     }
 
+    private VerifyCredentialResponse convertResponse(GateKeeperResponse gateKeeperResponse) {
+        VerifyCredentialResponse response;
+        int responseCode = gateKeeperResponse.getResponseCode();
+        if (responseCode == GateKeeperResponse.RESPONSE_RETRY) {
+            response = new VerifyCredentialResponse(gateKeeperResponse.getTimeout());
+        } else if (responseCode == GateKeeperResponse.RESPONSE_OK) {
+            byte[] token = gateKeeperResponse.getPayload();
+            if (token == null) {
+                // something's wrong if there's no payload with a challenge
+                Slog.e(TAG, "verifyChallenge response had no associated payload");
+                response = VerifyCredentialResponse.ERROR;
+            } else {
+                response = new VerifyCredentialResponse(token);
+            }
+        } else {
+            response = VerifyCredentialResponse.ERROR;
+        }
+        return response;
+    }
+
     @VisibleForTesting
     protected void tieProfileLockToParent(int userId, String password) {
         if (DEBUG) Slog.v(TAG, "tieProfileLockToParent for user: " + userId);
@@ -1121,8 +1248,14 @@
         return hash;
     }
 
+    private void setAuthlessUserKeyProtection(int userId, byte[] key) throws RemoteException {
+        if (DEBUG) Slog.d(TAG, "setAuthlessUserKeyProtectiond: user=" + userId);
+        addUserKeyAuth(userId, null, key);
+    }
+
     private void setUserKeyProtection(int userId, String credential, VerifyCredentialResponse vcr)
             throws RemoteException {
+        if (DEBUG) Slog.d(TAG, "setUserKeyProtection: user=" + userId);
         if (vcr == null) {
             throw new RemoteException("Null response verifying a credential we just set");
         }
@@ -1138,6 +1271,7 @@
     }
 
     private void clearUserKeyProtection(int userId) throws RemoteException {
+        if (DEBUG) Slog.d(TAG, "clearUserKeyProtection user=" + userId);
         addUserKeyAuth(userId, null, null);
     }
 
@@ -1171,6 +1305,7 @@
 
     private void fixateNewestUserKeyAuth(int userId)
             throws RemoteException {
+        if (DEBUG) Slog.d(TAG, "fixateNewestUserKeyAuth: user=" + userId);
         final IStorageManager storageManager = mInjector.getStorageManager();
         final long callingId = Binder.clearCallingIdentity();
         try {
@@ -1249,7 +1384,16 @@
         if (TextUtils.isEmpty(credential)) {
             throw new IllegalArgumentException("Credential can't be null or empty");
         }
-
+        synchronized (mSpManager) {
+            if (isSyntheticPasswordBasedCredentialLocked(userId)) {
+                VerifyCredentialResponse response = spBasedDoVerifyCredentialLocked(credential,
+                        credentialType, hasChallenge, challenge, userId, progressCallback);
+                if (response.getResponseCode() == VerifyCredentialResponse.RESPONSE_OK) {
+                    mStrongAuth.reportSuccessfulStrongAuthUnlock(userId);
+                }
+                return response;
+            }
+        }
         CredentialHash storedHash = mStorage.readCredentialHash(userId);
         if (storedHash.type != credentialType) {
             Slog.wtf(TAG, "doVerifyCredential type mismatch with stored credential??"
@@ -1370,27 +1514,10 @@
                 return VerifyCredentialResponse.ERROR;
             }
         }
-
-        VerifyCredentialResponse response;
-        boolean shouldReEnroll = false;
         GateKeeperResponse gateKeeperResponse = getGateKeeperService()
                 .verifyChallenge(userId, challenge, storedHash.hash, credential.getBytes());
-        int responseCode = gateKeeperResponse.getResponseCode();
-        if (responseCode == GateKeeperResponse.RESPONSE_RETRY) {
-            response = new VerifyCredentialResponse(gateKeeperResponse.getTimeout());
-        } else if (responseCode == GateKeeperResponse.RESPONSE_OK) {
-            byte[] token = gateKeeperResponse.getPayload();
-            if (token == null) {
-                // something's wrong if there's no payload with a challenge
-                Slog.e(TAG, "verifyChallenge response had no associated payload");
-                response = VerifyCredentialResponse.ERROR;
-            } else {
-                shouldReEnroll = gateKeeperResponse.getShouldReEnroll();
-                response = new VerifyCredentialResponse(token);
-            }
-        } else {
-            response = VerifyCredentialResponse.ERROR;
-        }
+        VerifyCredentialResponse response = convertResponse(gateKeeperResponse);
+        boolean shouldReEnroll = gateKeeperResponse.getShouldReEnroll();
 
         if (response.getResponseCode() == VerifyCredentialResponse.RESPONSE_OK) {
 
@@ -1402,8 +1529,8 @@
             notifyActivePasswordMetricsAvailable(credential, userId);
             unlockKeystore(credential, userId);
 
-            Slog.i(TAG, "Unlocking user " + userId +
-                    " with token length " + response.getPayload().length);
+            Slog.i(TAG, "Unlocking user " + userId + " with token length "
+                    + response.getPayload().length);
             unlockUser(userId, response.getPayload(), secretFromCredential(credential));
 
             if (isManagedProfileWithSeparatedLock(userId)) {
@@ -1413,6 +1540,15 @@
             }
             if (shouldReEnroll) {
                 setLockCredentialInternal(credential, storedHash.type, credential, userId);
+            } else {
+                // Now that we've cleared of all required GK migration, let's do the final
+                // migration to synthetic password.
+                synchronized (mSpManager) {
+                    if (shouldMigrateToSyntheticPasswordLocked(userId)) {
+                        initializeSyntheticPasswordLocked(storedHash.hash, credential,
+                                storedHash.type, userId);
+                    }
+                }
             }
         } else if (response.getResponseCode() == VerifyCredentialResponse.RESPONSE_RETRY) {
             if (response.getTimeout() > 0) {
@@ -1643,7 +1779,7 @@
         }
     }
 
-    private synchronized IGateKeeperService getGateKeeperService()
+    protected synchronized IGateKeeperService getGateKeeperService()
             throws RemoteException {
         if (mGateKeeperService != null) {
             return mGateKeeperService;
@@ -1659,4 +1795,431 @@
         Slog.e(TAG, "Unable to acquire GateKeeperService");
         return null;
     }
+
+    /**
+     * Precondition: vold and keystore unlocked.
+     *
+     * Create new synthetic password, set up synthetic password blob protected by the supplied
+     * user credential, and make the newly-created SP blob active.
+     *
+     * The invariant under a synthetic password is:
+     * 1. If user credential exists, then both vold and keystore and protected with keys derived
+     *     from the synthetic password.
+     * 2. If user credential does not exist, vold and keystore protection are cleared. This is to
+     *     make it consistent with current behaviour. It also allows ActivityManager to call
+     *     unlockUser() with empty secret.
+     * 3. Once a user is migrated to have synthetic password, its value will never change, no matter
+     *     whether the user changes his lockscreen PIN or clear/reset it. When the user clears its
+     *     lockscreen PIN, we still maintain the existing synthetic password in a password blob
+     *     protected by a default PIN. The only exception is when the DPC performs an untrusted
+     *     credential change, in which case we have no way to derive the existing synthetic password
+     *     and has to create a new one.
+     * 4. The user SID is linked with synthetic password, but its cleared/re-created when the user
+     *     clears/re-creates his lockscreen PIN.
+     *
+     *
+     * Different cases of calling this method:
+     * 1. credentialHash != null
+     *     This implies credential != null, a new SP blob will be provisioned, and existing SID
+     *     migrated to associate with the new SP.
+     *     This happens during a normal migration case when the user currently has password.
+     *
+     * 2. credentialhash == null and credential == null
+     *     A new SP blob and a new SID will be created, while the user has no credentials.
+     *     This can happens when we are activating an escrow token on a unsecured device, during
+     *     which we want to create the SP structure with an empty user credential.
+     *
+     * 3. credentialhash == null and credential != null
+     *     This is the untrusted credential reset, OR the user sets a new lockscreen password
+     *     FOR THE FIRST TIME on a SP-enabled device. New credential and new SID will be created
+     */
+    private AuthenticationToken initializeSyntheticPasswordLocked(byte[] credentialHash,
+            String credential, int credentialType, int userId) throws RemoteException {
+        Slog.i(TAG, "Initialize SyntheticPassword for user: " + userId);
+        AuthenticationToken auth = mSpManager.newSyntheticPasswordAndSid(getGateKeeperService(),
+                credentialHash, credential, userId);
+        if (auth == null) {
+            Slog.wtf(TAG, "initializeSyntheticPasswordLocked returns null auth token");
+            return null;
+        }
+        long handle = mSpManager.createPasswordBasedSyntheticPassword(getGateKeeperService(),
+                credential, credentialType, auth, userId);
+        if (credential != null) {
+            if (credentialHash == null) {
+                // Since when initializing SP, we didn't provide an existing password handle
+                // for it to migrate SID, we need to create a new SID for the user.
+                mSpManager.newSidForUser(getGateKeeperService(), auth, userId);
+            }
+            mSpManager.verifyChallenge(getGateKeeperService(), auth, 0L, userId);
+            setAuthlessUserKeyProtection(userId, auth.deriveDiskEncryptionKey());
+            setKeystorePassword(auth.deriveKeyStorePassword(), userId);
+        } else {
+            clearUserKeyProtection(userId);
+            setKeystorePassword(null, userId);
+            getGateKeeperService().clearSecureUserId(userId);
+        }
+        fixateNewestUserKeyAuth(userId);
+        setLong(SYNTHETIC_PASSWORD_HANDLE_KEY, handle, userId);
+        return auth;
+    }
+
+    private long getSyntheticPasswordHandleLocked(int userId) {
+        try {
+            return getLong(SYNTHETIC_PASSWORD_HANDLE_KEY, 0, userId);
+        } catch (RemoteException e) {
+            return SyntheticPasswordManager.DEFAULT_HANDLE;
+        }
+    }
+
+    private boolean isSyntheticPasswordBasedCredentialLocked(int userId) throws RemoteException {
+        long handle = getSyntheticPasswordHandleLocked(userId);
+        // This is a global setting
+        long enabled = getLong(SYNTHETIC_PASSWORD_ENABLED_KEY, 0, UserHandle.USER_SYSTEM);
+      return enabled != 0 && handle != SyntheticPasswordManager.DEFAULT_HANDLE;
+    }
+
+    private boolean shouldMigrateToSyntheticPasswordLocked(int userId) throws RemoteException {
+        long handle = getSyntheticPasswordHandleLocked(userId);
+        // This is a global setting
+        long enabled = getLong(SYNTHETIC_PASSWORD_ENABLED_KEY, 0, UserHandle.USER_SYSTEM);
+        return enabled != 0 && handle == SyntheticPasswordManager.DEFAULT_HANDLE;
+    }
+
+    private void enableSyntheticPasswordLocked() throws RemoteException {
+        setLong(SYNTHETIC_PASSWORD_ENABLED_KEY, 1, UserHandle.USER_SYSTEM);
+    }
+
+    private VerifyCredentialResponse spBasedDoVerifyCredentialLocked(String userCredential, int
+            credentialType, boolean hasChallenge, long challenge, int userId,
+            ICheckCredentialProgressCallback progressCallback) throws RemoteException {
+        if (DEBUG) Slog.d(TAG, "spBasedDoVerifyCredentialLocked: user=" + userId);
+        if (credentialType == LockPatternUtils.CREDENTIAL_TYPE_NONE) {
+            userCredential = null;
+        }
+        long handle = getSyntheticPasswordHandleLocked(userId);
+        AuthenticationResult authResult = mSpManager.unwrapPasswordBasedSyntheticPassword(
+                getGateKeeperService(), handle, userCredential, userId);
+
+        VerifyCredentialResponse response = authResult.gkResponse;
+        if (response.getResponseCode() == VerifyCredentialResponse.RESPONSE_OK) {
+            // credential has matched
+            // perform verifyChallenge with synthetic password which generates the real auth
+            // token for the current user
+            response = mSpManager.verifyChallenge(getGateKeeperService(), authResult.authToken,
+                    challenge, userId);
+            if (response.getResponseCode() != VerifyCredentialResponse.RESPONSE_OK) {
+                Slog.wtf(TAG, "verifyChallenge with SP failed.");
+                return VerifyCredentialResponse.ERROR;
+            }
+            if (progressCallback != null) {
+                progressCallback.onCredentialVerified();
+            }
+            notifyActivePasswordMetricsAvailable(userCredential, userId);
+            unlockKeystore(authResult.authToken.deriveKeyStorePassword(), userId);
+
+            final byte[] secret = authResult.authToken.deriveDiskEncryptionKey();
+            Slog.i(TAG, "Unlocking user " + userId + " with secret only, length " + secret.length);
+            unlockUser(userId, null, secret);
+
+            if (isManagedProfileWithSeparatedLock(userId)) {
+                TrustManager trustManager =
+                        (TrustManager) mContext.getSystemService(Context.TRUST_SERVICE);
+                trustManager.setDeviceLockedForUser(userId, false);
+            }
+            activateEscrowTokens(authResult.authToken, userId);
+        } else if (response.getResponseCode() == VerifyCredentialResponse.RESPONSE_RETRY) {
+            if (response.getTimeout() > 0) {
+                requireStrongAuth(STRONG_AUTH_REQUIRED_AFTER_LOCKOUT, userId);
+            }
+        }
+
+        return response;
+    }
+
+    /**
+     * Change the user's lockscreen password by creating a new SP blob and update the handle, based
+     * on an existing authentication token. Even though a new SP blob is created, the underlying
+     * synthetic password is never changed.
+     *
+     * When clearing credential, we keep the SP unchanged, but clear its password handle so its
+     * SID is gone. We also clear password from (software-based) keystore and vold, which will be
+     * added back when new password is set in future.
+     */
+    private long setLockCredentialWithAuthTokenLocked(String credential, int credentialType,
+            AuthenticationToken auth, int userId) throws RemoteException {
+        if (DEBUG) Slog.d(TAG, "setLockCredentialWithAuthTokenLocked: user=" + userId);
+        long newHandle = mSpManager.createPasswordBasedSyntheticPassword(getGateKeeperService(),
+                credential, credentialType, auth, userId);
+        final Map<Integer, String> profilePasswords;
+        if (credential != null) {
+            // // not needed by synchronizeUnifiedWorkChallengeForProfiles()
+            profilePasswords = null;
+
+            if (mSpManager.hasSidForUser(userId)) {
+                // We are changing password of a secured device, nothing more needed as
+                // createPasswordBasedSyntheticPassword has already taken care of maintaining
+                // the password handle and SID unchanged.
+
+                //refresh auth token
+                mSpManager.verifyChallenge(getGateKeeperService(), auth, 0L, userId);
+            } else {
+                // A new password is set on a previously-unsecured device, we need to generate
+                // a new SID, and re-add keys to vold and keystore.
+                mSpManager.newSidForUser(getGateKeeperService(), auth, userId);
+                mSpManager.verifyChallenge(getGateKeeperService(), auth, 0L, userId);
+                setAuthlessUserKeyProtection(userId, auth.deriveDiskEncryptionKey());
+                fixateNewestUserKeyAuth(userId);
+                setKeystorePassword(auth.deriveKeyStorePassword(), userId);
+            }
+        } else {
+            // Cache all profile password if they use unified work challenge. This will later be
+            // used to clear the profile's password in synchronizeUnifiedWorkChallengeForProfiles()
+            profilePasswords = getDecryptedPasswordsForAllTiedProfiles(userId);
+
+            // we are clearing password of a secured device, so need to nuke SID as well.
+            mSpManager.clearSidForUser(userId);
+            getGateKeeperService().clearSecureUserId(userId);
+            // Clear key from vold so ActivityManager can just unlock the user with empty secret
+            // during boot.
+            clearUserKeyProtection(userId);
+            fixateNewestUserKeyAuth(userId);
+            setKeystorePassword(null, userId);
+        }
+        setLong(SYNTHETIC_PASSWORD_HANDLE_KEY, newHandle, userId);
+        synchronizeUnifiedWorkChallengeForProfiles(userId, profilePasswords);
+        return newHandle;
+    }
+
+    private void spBasedSetLockCredentialInternalLocked(String credential, int credentialType,
+            String savedCredential, int userId) throws RemoteException {
+        if (DEBUG) Slog.d(TAG, "spBasedSetLockCredentialInternalLocked: user=" + userId);
+        if (isManagedProfileWithUnifiedLock(userId)) {
+            // get credential from keystore when managed profile has unified lock
+            try {
+                savedCredential = getDecryptedPasswordForTiedProfile(userId);
+            } catch (FileNotFoundException e) {
+                Slog.i(TAG, "Child profile key not found");
+            } catch (UnrecoverableKeyException | InvalidKeyException | KeyStoreException
+                    | NoSuchAlgorithmException | NoSuchPaddingException
+                    | InvalidAlgorithmParameterException | IllegalBlockSizeException
+                    | BadPaddingException | CertificateException | IOException e) {
+                Slog.e(TAG, "Failed to decrypt child profile key", e);
+            }
+        }
+        long handle = getSyntheticPasswordHandleLocked(userId);
+        AuthenticationToken auth = mSpManager.unwrapPasswordBasedSyntheticPassword(
+                getGateKeeperService(), handle, savedCredential, userId).authToken;
+        if (auth != null) {
+            // We are performing a trusted credential change i.e. a correct existing credential
+            // is provided
+            setLockCredentialWithAuthTokenLocked(credential, credentialType, auth, userId);
+            mSpManager.destroyPasswordBasedSyntheticPassword(handle, userId);
+        } else {
+            // We are performing an untrusted credential change i.e. by DevicePolicyManager.
+            // So provision a new SP and SID. This would invalidate existing escrow tokens.
+            // Still support this for now but this flow will be removed in the next release.
+
+            Slog.w(TAG, "Untrusted credential change invoked");
+            initializeSyntheticPasswordLocked(null, credential, credentialType, userId);
+            synchronizeUnifiedWorkChallengeForProfiles(userId, null);
+            mSpManager.destroyPasswordBasedSyntheticPassword(handle, userId);
+        }
+        notifyActivePasswordMetricsAvailable(credential, userId);
+
+    }
+
+    @Override
+    public long addEscrowToken(byte[] token, int userId) throws RemoteException {
+        ensureCallerSystemUid();
+        if (DEBUG) Slog.d(TAG, "addEscrowToken: user=" + userId);
+        synchronized (mSpManager) {
+            enableSyntheticPasswordLocked();
+            // Migrate to synthetic password based credentials if ther user has no password,
+            // the token can then be activated immediately.
+            AuthenticationToken auth = null;
+            if (!isUserSecure(userId)) {
+                if (shouldMigrateToSyntheticPasswordLocked(userId)) {
+                    auth = initializeSyntheticPasswordLocked(null, null,
+                            LockPatternUtils.CREDENTIAL_TYPE_NONE, userId);
+                } else /* isSyntheticPasswordBasedCredentialLocked(userId) */ {
+                    long pwdHandle = getSyntheticPasswordHandleLocked(userId);
+                    auth = mSpManager.unwrapPasswordBasedSyntheticPassword(getGateKeeperService(),
+                            pwdHandle, null, userId).authToken;
+                }
+            }
+            disableEscrowTokenOnNonManagedDevicesIfNeeded(userId);
+            if (!mSpManager.hasEscrowData(userId)) {
+                throw new SecurityException("Escrow token is disabled on the current user");
+            }
+            long handle = mSpManager.createTokenBasedSyntheticPassword(token, userId);
+            if (auth != null) {
+                mSpManager.activateTokenBasedSyntheticPassword(handle, auth, userId);
+            }
+            return handle;
+        }
+    }
+
+    private void activateEscrowTokens(AuthenticationToken auth, int userId) throws RemoteException {
+        if (DEBUG) Slog.d(TAG, "activateEscrowTokens: user=" + userId);
+        synchronized (mSpManager) {
+            for (long handle : mSpManager.getPendingTokensForUser(userId)) {
+                Slog.i(TAG, String.format("activateEscrowTokens: %x %d ", handle, userId));
+                mSpManager.activateTokenBasedSyntheticPassword(handle, auth, userId);
+            }
+        }
+    }
+
+    @Override
+    public boolean isEscrowTokenActive(long handle, int userId) throws RemoteException {
+        ensureCallerSystemUid();
+        synchronized (mSpManager) {
+            return mSpManager.existsHandle(handle, userId);
+        }
+    }
+
+    @Override
+    public boolean removeEscrowToken(long handle, int userId) throws RemoteException {
+        ensureCallerSystemUid();
+        synchronized (mSpManager) {
+            if (handle == getSyntheticPasswordHandleLocked(userId)) {
+                Slog.w(TAG, "Cannot remove password handle");
+                return false;
+            }
+            if (mSpManager.removePendingToken(handle, userId)) {
+                return true;
+            }
+            if (mSpManager.existsHandle(handle, userId)) {
+                mSpManager.destroyTokenBasedSyntheticPassword(handle, userId);
+                return true;
+            } else {
+                return false;
+            }
+        }
+    }
+
+    @Override
+    public boolean setLockCredentialWithToken(String credential, int type, long tokenHandle,
+            byte[] token, int userId) throws RemoteException {
+        ensureCallerSystemUid();
+        boolean result;
+        synchronized (mSpManager) {
+            if (!mSpManager.hasEscrowData(userId)) {
+                throw new SecurityException("Escrow token is disabled on the current user");
+            }
+            result = setLockCredentialWithTokenInternal(credential, type, tokenHandle, token,
+                    userId);
+        }
+        if (result) {
+            synchronized (mSeparateChallengeLock) {
+                setSeparateProfileChallengeEnabled(userId, true, null);
+            }
+            notifyPasswordChanged(userId);
+        }
+        return result;
+    }
+
+    private boolean setLockCredentialWithTokenInternal(String credential, int type,
+            long tokenHandle, byte[] token, int userId) throws RemoteException {
+        synchronized (mSpManager) {
+            AuthenticationResult result = mSpManager.unwrapTokenBasedSyntheticPassword(
+                    getGateKeeperService(), tokenHandle, token, userId);
+            if (result.authToken == null) {
+                Slog.w(TAG, "Invalid escrow token supplied");
+                return false;
+            }
+            long oldHandle = getSyntheticPasswordHandleLocked(userId);
+            setLockCredentialWithAuthTokenLocked(credential, type, result.authToken, userId);
+            mSpManager.destroyPasswordBasedSyntheticPassword(oldHandle, userId);
+            return true;
+        }
+    }
+
+    @Override
+    public void unlockUserWithToken(long tokenHandle, byte[] token, int userId)
+            throws RemoteException {
+        ensureCallerSystemUid();
+        AuthenticationResult authResult;
+        synchronized (mSpManager) {
+            if (!mSpManager.hasEscrowData(userId)) {
+                throw new SecurityException("Escrow token is disabled on the current user");
+            }
+            authResult = mSpManager.unwrapTokenBasedSyntheticPassword(getGateKeeperService(),
+                    tokenHandle, token, userId);
+            if (authResult.authToken == null) {
+                Slog.w(TAG, "Invalid escrow token supplied");
+                return;
+            }
+        }
+        unlockUser(userId, null, authResult.authToken.deriveDiskEncryptionKey());
+    }
+
+    @Override
+    protected void dump(FileDescriptor fd, PrintWriter pw, String[] args){
+        if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.DUMP)
+                != PackageManager.PERMISSION_GRANTED) {
+
+            pw.println("Permission Denial: can't dump LockSettingsService from from pid="
+                    + Binder.getCallingPid()
+                    + ", uid=" + Binder.getCallingUid());
+            return;
+        }
+
+        synchronized (this) {
+            pw.println("Current lock settings service state:");
+            pw.println(String.format("SP Enabled = %b",
+                    mLockPatternUtils.isSyntheticPasswordEnabled()));
+
+            List<UserInfo> users = mUserManager.getUsers();
+            for (int user = 0; user < users.size(); user++) {
+                final int userId = users.get(user).id;
+                pw.println("    User " + userId);
+                pw.println(String.format("        SP Handle = %x",
+                        getSyntheticPasswordHandleLocked(userId)));
+                try {
+                    pw.println(String.format("        SID = %x",
+                            getGateKeeperService().getSecureUserId(userId)));
+                } catch (RemoteException e) {
+                    // ignore.
+                }
+            }
+        }
+    }
+
+    private void disableEscrowTokenOnNonManagedDevicesIfNeeded(int userId) {
+        long ident = Binder.clearCallingIdentity();
+        try {
+            // Managed profile should have escrow enabled
+            if (mUserManager.getUserInfo(userId).isManagedProfile()) {
+                return;
+            }
+            DevicePolicyManager dpm = (DevicePolicyManager)
+                    mContext.getSystemService(Context.DEVICE_POLICY_SERVICE);
+            // Devices with Device Owner should have escrow enabled on all users.
+            if (dpm.getDeviceOwnerComponentOnAnyUser() != null) {
+                return;
+            }
+            // If the device is yet to be provisioned (still in SUW), there is still
+            // a chance that Device Owner will be set on the device later, so postpone
+            // disabling escrow token for now.
+            if (!dpm.isDeviceProvisioned()) {
+                return;
+            }
+            // Disable escrow token permanently on all other device/user types.
+            Slog.i(TAG, "Disabling escrow token on user " + userId);
+            if (isSyntheticPasswordBasedCredentialLocked(userId)) {
+                mSpManager.destroyEscrowData(userId);
+            }
+        } catch (RemoteException e) {
+            Slog.e(TAG, "disableEscrowTokenOnNonManagedDevices", e);
+        } finally {
+            Binder.restoreCallingIdentity(ident);
+        }
+    }
+
+    private void ensureCallerSystemUid() throws SecurityException {
+        final int callingUid = mInjector.binderGetCallingUid();
+        if (callingUid != Process.SYSTEM_UID) {
+            throw new SecurityException("Only system can call this API.");
+        }
+    }
 }
diff --git a/services/core/java/com/android/server/LockSettingsShellCommand.java b/services/core/java/com/android/server/LockSettingsShellCommand.java
index e131251..91bd98e 100644
--- a/services/core/java/com/android/server/LockSettingsShellCommand.java
+++ b/services/core/java/com/android/server/LockSettingsShellCommand.java
@@ -22,12 +22,9 @@
 
 import android.app.ActivityManager;
 import android.content.Context;
-import android.os.Binder;
-import android.os.Process;
 import android.os.RemoteException;
 import android.os.ShellCommand;
 
-import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.widget.LockPatternUtils;
 import com.android.internal.widget.LockPatternUtils.RequestThrottledException;
 
@@ -37,6 +34,7 @@
     private static final String COMMAND_SET_PIN = "set-pin";
     private static final String COMMAND_SET_PASSWORD = "set-password";
     private static final String COMMAND_CLEAR = "clear";
+    private static final String COMMAND_SP = "sp";
 
     private int mCurrentUserId;
     private final LockPatternUtils mLockPatternUtils;
@@ -71,6 +69,9 @@
                 case COMMAND_CLEAR:
                     runClear();
                     break;
+                case COMMAND_SP:
+                    runEnableSp();
+                    break;
                 default:
                     getErrPrintWriter().println("Unknown command: " + cmd);
                     break;
@@ -92,6 +93,8 @@
         while ((opt = getNextOption()) != null) {
             if ("--old".equals(opt)) {
                 mOld = getNextArgRequired();
+            } else if ("--user".equals(opt)) {
+                mCurrentUserId = Integer.parseInt(getNextArgRequired());
             } else {
                 getErrPrintWriter().println("Unknown option: " + opt);
                 throw new IllegalArgumentException();
@@ -100,6 +103,15 @@
         mNew = getNextArg();
     }
 
+    private void runEnableSp() {
+        if (mNew != null) {
+            mLockPatternUtils.enableSyntheticPassword();
+            getOutPrintWriter().println("Synthetic password enabled");
+        }
+        getOutPrintWriter().println(String.format("SP Enabled = %b",
+                mLockPatternUtils.isSyntheticPasswordEnabled()));
+    }
+
     private void runSetPattern() throws RemoteException {
         mLockPatternUtils.saveLockPattern(stringToPattern(mNew), mOld, mCurrentUserId);
         getOutPrintWriter().println("Pattern set to '" + mNew + "'");
@@ -116,7 +128,7 @@
     }
 
     private void runClear() throws RemoteException {
-        mLockPatternUtils.clearLock(mCurrentUserId);
+        mLockPatternUtils.clearLock(mOld, mCurrentUserId);
         getOutPrintWriter().println("Lock credential cleared");
     }
 
diff --git a/services/core/java/com/android/server/LockSettingsStorage.java b/services/core/java/com/android/server/LockSettingsStorage.java
index c858036..f5bae7c 100644
--- a/services/core/java/com/android/server/LockSettingsStorage.java
+++ b/services/core/java/com/android/server/LockSettingsStorage.java
@@ -66,6 +66,8 @@
     private static final String LEGACY_LOCK_PASSWORD_FILE = "password.key";
     private static final String CHILD_PROFILE_LOCK_FILE = "gatekeeper.profile.key";
 
+    private static final String SYNTHETIC_PASSWORD_DIRECTORY = "spblob/";
+
     private static final Object DEFAULT = new Object();
 
     private final DatabaseHelper mOpenHelper;
@@ -290,6 +292,10 @@
             hasFile(getLegacyLockPatternFilename(userId));
     }
 
+    public boolean hasCredential(int userId) {
+        return hasPassword(userId) || hasPattern(userId);
+    }
+
     private boolean hasFile(String name) {
         byte[] contents = readFile(name);
         return contents != null && contents.length > 0;
@@ -408,8 +414,7 @@
     }
 
     private String getLockCredentialFilePathForUser(int userId, String basename) {
-        String dataSystemDirectory =
-                android.os.Environment.getDataDirectory().getAbsolutePath() +
+        String dataSystemDirectory = Environment.getDataDirectory().getAbsolutePath() +
                         SYSTEM_DIRECTORY;
         if (userId == 0) {
             // Leave it in the same place for user 0
@@ -419,6 +424,40 @@
         }
     }
 
+    public void writeSyntheticPasswordState(int userId, long handle, String name, byte[] data) {
+        writeFile(getSynthenticPasswordStateFilePathForUser(userId, handle, name), data);
+    }
+
+    public byte[] readSyntheticPasswordState(int userId, long handle, String name) {
+        return readFile(getSynthenticPasswordStateFilePathForUser(userId, handle, name));
+    }
+
+    public void deleteSyntheticPasswordState(int userId, long handle, String name, boolean secure) {
+        String path = getSynthenticPasswordStateFilePathForUser(userId, handle, name);
+        File file = new File(path);
+        if (file.exists()) {
+            //TODO: (b/34600579) invoke secdiscardable
+            file.delete();
+            mCache.putFile(path, null);
+        }
+    }
+
+    @VisibleForTesting
+    protected File getSyntheticPasswordDirectoryForUser(int userId) {
+        return new File(Environment.getDataSystemDeDirectory(userId) ,SYNTHETIC_PASSWORD_DIRECTORY);
+    }
+
+    @VisibleForTesting
+    protected String getSynthenticPasswordStateFilePathForUser(int userId, long handle,
+            String name) {
+        File baseDir = getSyntheticPasswordDirectoryForUser(userId);
+        String baseName = String.format("%016x.%s", handle, name);
+        if (!baseDir.exists()) {
+            baseDir.mkdir();
+        }
+        return new File(baseDir, baseName).getAbsolutePath();
+    }
+
     public void removeUser(int userId) {
         SQLiteDatabase db = mOpenHelper.getWritableDatabase();
 
@@ -442,15 +481,20 @@
                 }
             }
         } else {
-            // Manged profile
+            // Managed profile
             removeChildProfileLock(userId);
         }
 
+        File spStateDir = getSyntheticPasswordDirectoryForUser(userId);
         try {
             db.beginTransaction();
             db.delete(TABLE, COLUMN_USERID + "='" + userId + "'", null);
             db.setTransactionSuccessful();
             mCache.removeUser(userId);
+            // The directory itself will be deleted as part of user deletion operation by the
+            // framework, so only need to purge cache here.
+            //TODO: (b/34600579) invoke secdiscardable
+            mCache.purgePath(spStateDir.getAbsolutePath());
         } finally {
             db.endTransaction();
         }
@@ -615,6 +659,16 @@
             mVersion++;
         }
 
+        synchronized void purgePath(String path) {
+            for (int i = mCache.size() - 1; i >= 0; i--) {
+                CacheKey entry = mCache.keyAt(i);
+                if (entry.type == CacheKey.TYPE_FILE && entry.key.startsWith(path)) {
+                    mCache.removeAt(i);
+                }
+            }
+            mVersion++;
+        }
+
         synchronized void clear() {
             mCache.clear();
             mVersion++;
@@ -650,4 +704,5 @@
             }
         }
     }
+
 }
diff --git a/services/core/java/com/android/server/LockSettingsStrongAuth.java b/services/core/java/com/android/server/LockSettingsStrongAuth.java
index 1314110..f5fe3db 100644
--- a/services/core/java/com/android/server/LockSettingsStrongAuth.java
+++ b/services/core/java/com/android/server/LockSettingsStrongAuth.java
@@ -51,6 +51,7 @@
     private static final int MSG_REGISTER_TRACKER = 2;
     private static final int MSG_UNREGISTER_TRACKER = 3;
     private static final int MSG_REMOVE_USER = 4;
+    private static final int MSG_SCHEDULE_STRONG_AUTH_TIMEOUT = 5;
 
     private static final String STRONG_AUTH_TIMEOUT_ALARM_TAG =
             "LockSettingsStrongAuth.timeoutForUser";
@@ -128,6 +129,23 @@
         }
     }
 
+    private void handleScheduleStrongAuthTimeout(int userId) {
+        final DevicePolicyManager dpm =
+                (DevicePolicyManager) mContext.getSystemService(Context.DEVICE_POLICY_SERVICE);
+        long when = SystemClock.elapsedRealtime() + dpm.getRequiredStrongAuthTimeout(null, userId);
+        // cancel current alarm listener for the user (if there was one)
+        StrongAuthTimeoutAlarmListener alarm = mStrongAuthTimeoutAlarmListenerForUser.get(userId);
+        if (alarm != null) {
+            mAlarmManager.cancel(alarm);
+        } else {
+            alarm = new StrongAuthTimeoutAlarmListener(userId);
+            mStrongAuthTimeoutAlarmListenerForUser.put(userId, alarm);
+        }
+        // schedule a new alarm listener for the user
+        mAlarmManager.set(AlarmManager.ELAPSED_REALTIME, when, STRONG_AUTH_TIMEOUT_ALARM_TAG,
+                alarm, mHandler);
+    }
+
     private void notifyStrongAuthTrackers(int strongAuthReason, int userId) {
         for (int i = 0; i < mStrongAuthTrackers.size(); i++) {
             try {
@@ -151,7 +169,8 @@
     }
 
     public void removeUser(int userId) {
-        mHandler.obtainMessage(MSG_REMOVE_USER, userId, 0).sendToTarget();
+        final int argNotUsed = 0;
+        mHandler.obtainMessage(MSG_REMOVE_USER, userId, argNotUsed).sendToTarget();
     }
 
     public void requireStrongAuth(int strongAuthReason, int userId) {
@@ -169,29 +188,8 @@
     }
 
     public void reportSuccessfulStrongAuthUnlock(int userId) {
-        scheduleStrongAuthTimeout(userId);
-    }
-
-    private void scheduleStrongAuthTimeout(int userId) {
-        final DevicePolicyManager dpm =
-                (DevicePolicyManager) mContext.getSystemService(Context.DEVICE_POLICY_SERVICE);
-        long when = SystemClock.elapsedRealtime() + dpm.getRequiredStrongAuthTimeout(null, userId);
-        // cancel current alarm listener for the user (if there was one)
-        StrongAuthTimeoutAlarmListener alarm = mStrongAuthTimeoutAlarmListenerForUser.get(userId);
-        if (alarm != null) {
-            mAlarmManager.cancel(alarm);
-        } else {
-            alarm = new StrongAuthTimeoutAlarmListener(userId);
-            mStrongAuthTimeoutAlarmListenerForUser.put(userId, alarm);
-        }
-        // schedule a new alarm listener for the user
-        final long ident = Binder.clearCallingIdentity();
-        try {
-            mAlarmManager.set(AlarmManager.ELAPSED_REALTIME, when, STRONG_AUTH_TIMEOUT_ALARM_TAG,
-                    alarm, mHandler);
-        } finally {
-            Binder.restoreCallingIdentity(ident);
-        }
+        final int argNotUsed = 0;
+        mHandler.obtainMessage(MSG_SCHEDULE_STRONG_AUTH_TIMEOUT, userId, argNotUsed).sendToTarget();
     }
 
     private class StrongAuthTimeoutAlarmListener implements OnAlarmListener {
@@ -224,6 +222,9 @@
                 case MSG_REMOVE_USER:
                     handleRemoveUser(msg.arg1);
                     break;
+                case MSG_SCHEDULE_STRONG_AUTH_TIMEOUT:
+                    handleScheduleStrongAuthTimeout(msg.arg1);
+                    break;
             }
         }
     };
diff --git a/services/core/java/com/android/server/NetworkScoreService.java b/services/core/java/com/android/server/NetworkScoreService.java
index 25016f6..b33538cb 100644
--- a/services/core/java/com/android/server/NetworkScoreService.java
+++ b/services/core/java/com/android/server/NetworkScoreService.java
@@ -53,6 +53,7 @@
 import android.os.IRemoteCallback;
 import android.os.Looper;
 import android.os.Message;
+import android.os.Process;
 import android.os.RemoteCallback;
 import android.os.RemoteCallbackList;
 import android.os.RemoteException;
@@ -183,11 +184,12 @@
                 // connection.
                 if (DBG) Log.d(TAG, "No active scorers available.");
                 unbindFromScoringServiceIfNeeded();
-            } else if (activeScorer.packageName.equals(scorerPackageName)) {
+            } else if (activeScorer.getRecommendationServicePackageName().equals(scorerPackageName))
+            {
                 // The active scoring service changed in some way.
                 if (DBG) {
                     Log.d(TAG, "Possible change to the active scorer: "
-                            + activeScorer.packageName);
+                            + activeScorer.getRecommendationServicePackageName());
                 }
                 if (forceUnbind) {
                     unbindFromScoringServiceIfNeeded();
@@ -198,7 +200,8 @@
                 // bound to the correct scoring app. The logic in bindToScoringServiceIfNeeded()
                 // will sort that out to leave us bound to the most recent active scorer.
                 if (DBG) {
-                    Log.d(TAG, "Binding to " + activeScorer.packageName + " if needed.");
+                    Log.d(TAG, "Binding to " + activeScorer.getRecommendationServiceComponent()
+                            + " if needed.");
                 }
                 bindToScoringServiceIfNeeded(activeScorer);
             }
@@ -334,22 +337,19 @@
         bindToScoringServiceIfNeeded(scorerData);
     }
 
-    private void bindToScoringServiceIfNeeded(NetworkScorerAppData scorerData) {
-        if (DBG) Log.d(TAG, "bindToScoringServiceIfNeeded(" + scorerData + ")");
-        if (scorerData != null && scorerData.recommendationServiceClassName != null) {
-            ComponentName componentName = new ComponentName(scorerData.packageName,
-                    scorerData.recommendationServiceClassName);
+    private void bindToScoringServiceIfNeeded(NetworkScorerAppData appData) {
+        if (DBG) Log.d(TAG, "bindToScoringServiceIfNeeded(" + appData + ")");
+        if (appData != null) {
             synchronized (mServiceConnectionLock) {
                 // If we're connected to a different component then drop it.
                 if (mServiceConnection != null
-                        && !mServiceConnection.mComponentName.equals(componentName)) {
+                        && !mServiceConnection.mAppData.equals(appData)) {
                     unbindFromScoringServiceIfNeeded();
                 }
 
                 // If we're not connected at all then create a new connection.
                 if (mServiceConnection == null) {
-                    mServiceConnection = new ScoringServiceConnection(componentName,
-                            scorerData.packageUid);
+                    mServiceConnection = new ScoringServiceConnection(appData);
                 }
 
                 // Make sure the connection is connected (idempotent)
@@ -603,7 +603,10 @@
             mScanResultKeys = new ArraySet<>(size);
             for (int i = 0; i < size; i++) {
                 ScanResult scanResult = scanResults.get(i);
-                mScanResultKeys.add(NetworkKey.createFromScanResult(scanResult));
+                NetworkKey key = NetworkKey.createFromScanResult(scanResult);
+                if (key != null) {
+                    mScanResultKeys.add(key);
+                }
             }
         }
 
@@ -625,7 +628,7 @@
         }
     }
 
-    private boolean isCallerSystemUid() {
+    private boolean callerCanRequestScores() {
         // REQUEST_NETWORK_SCORES is a signature only permission.
         return mContext.checkCallingOrSelfPermission(permission.REQUEST_NETWORK_SCORES) ==
                  PackageManager.PERMISSION_GRANTED;
@@ -634,7 +637,7 @@
     @Override
     public boolean clearScores() {
         // Only the active scorer or the system should be allowed to flush all scores.
-        if (isCallerActiveScorer(getCallingUid()) || isCallerSystemUid()) {
+        if (isCallerActiveScorer(getCallingUid()) || callerCanRequestScores()) {
             final long token = Binder.clearCallingIdentity();
             try {
                 clearInternal();
@@ -672,10 +675,15 @@
     @Override
     public boolean isCallerActiveScorer(int callingUid) {
         synchronized (mServiceConnectionLock) {
-            return mServiceConnection != null && mServiceConnection.mScoringAppUid == callingUid;
+            return mServiceConnection != null
+                    && mServiceConnection.mAppData.packageUid == callingUid;
         }
     }
 
+    private boolean isCallerSystemProcess(int callingUid) {
+        return callingUid == Process.SYSTEM_UID;
+    }
+
     /**
      * Obtain the package name of the current active network scorer.
      *
@@ -686,16 +694,46 @@
     public String getActiveScorerPackage() {
         synchronized (mServiceConnectionLock) {
             if (mServiceConnection != null) {
-                return mServiceConnection.mComponentName.getPackageName();
+                return mServiceConnection.getPackageName();
             }
         }
         return null;
     }
 
+
+    /**
+     * Returns metadata about the active scorer or <code>null</code> if there is no active scorer.
+     */
+    @Override
+    public NetworkScorerAppData getActiveScorer() {
+        // Only the system can access this data.
+        if (isCallerSystemProcess(getCallingUid()) || callerCanRequestScores()) {
+            synchronized (mServiceConnectionLock) {
+                if (mServiceConnection != null) {
+                    return mServiceConnection.mAppData;
+                }
+            }
+        } else {
+            throw new SecurityException(
+                    "Caller is neither the system process nor a score requester.");
+        }
+
+        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.
-        if (isCallerActiveScorer(getCallingUid()) || isCallerSystemUid()) {
+        if (isCallerActiveScorer(getCallingUid()) || callerCanRequestScores()) {
             // no-op for now but we could write to the setting if needed.
         } else {
             throw new SecurityException(
@@ -881,7 +919,8 @@
                 writer.println("Scoring is disabled.");
                 return;
             }
-            writer.println("Current scorer: " + currentScorer.packageName);
+            writer.println("Current scorer: " + currentScorer);
+            writer.println("RecommendationRequestTimeoutMs: " + mRecommendationRequestTimeoutMs);
 
             sendCacheUpdateCallback(new BiConsumer<INetworkScoreCache, Object>() {
                 @Override
@@ -927,7 +966,7 @@
                 try {
                     for (int i = 0; i < count; i++) {
                         consumer.accept(callbackList.getBroadcastItem(i),
-                                callbackList.getRegisteredCallbackCookie(i));
+                                callbackList.getBroadcastCookie(i));
                     }
                 } finally {
                     callbackList.finishBroadcast();
@@ -966,21 +1005,19 @@
     }
 
     private static class ScoringServiceConnection implements ServiceConnection {
-        private final ComponentName mComponentName;
-        private final int mScoringAppUid;
+        private final NetworkScorerAppData mAppData;
         private volatile boolean mBound = false;
         private volatile boolean mConnected = false;
         private volatile INetworkRecommendationProvider mRecommendationProvider;
 
-        ScoringServiceConnection(ComponentName componentName, int scoringAppUid) {
-            mComponentName = componentName;
-            mScoringAppUid = scoringAppUid;
+        ScoringServiceConnection(NetworkScorerAppData appData) {
+            mAppData = appData;
         }
 
         void connect(Context context) {
             if (!mBound) {
                 Intent service = new Intent(NetworkScoreManager.ACTION_RECOMMEND_NETWORKS);
-                service.setComponent(mComponentName);
+                service.setComponent(mAppData.getRecommendationServiceComponent());
                 mBound = context.bindServiceAsUser(service, this,
                         Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE,
                         UserHandle.SYSTEM);
@@ -1010,6 +1047,10 @@
             return mRecommendationProvider;
         }
 
+        String getPackageName() {
+            return mAppData.getRecommendationServiceComponent().getPackageName();
+        }
+
         @Override
         public void onServiceConnected(ComponentName name, IBinder service) {
             if (DBG) Log.d(TAG, "ScoringServiceConnection: " + name.flattenToString());
@@ -1027,7 +1068,9 @@
         }
 
         public void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
-            writer.println("ScoringServiceConnection: " + mComponentName + ", bound: " + mBound
+            writer.println("ScoringServiceConnection: "
+                    + mAppData.getRecommendationServiceComponent()
+                    + ", bound: " + mBound
                     + ", connected: " + mConnected);
         }
     }
@@ -1047,6 +1090,7 @@
                     final RecommendationResult result =
                             data.getParcelable(EXTRA_RECOMMENDATION_RESULT);
                     final int sequence = data.getInt(EXTRA_SEQUENCE, -1);
+                    if (VERBOSE) Log.v(TAG, "callback received for sequence " + sequence);
                     onRemoteMethodResult(result, sequence);
                 }
             };
@@ -1066,6 +1110,7 @@
         RecommendationResult getRecommendationResult(INetworkRecommendationProvider target,
                 RecommendationRequest request) throws RemoteException, TimeoutException {
             final int sequence = onBeforeRemoteCall();
+            if (VERBOSE) Log.v(TAG, "getRecommendationResult() seq=" + sequence);
             target.requestRecommendation(request, mCallback, sequence);
             return getResultTimed(sequence);
         }
diff --git a/services/core/java/com/android/server/StorageManagerService.java b/services/core/java/com/android/server/StorageManagerService.java
index c07add0..0415971 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;
@@ -2921,10 +2922,10 @@
         waitForReady();
 
         if (StorageManager.isFileEncryptedNativeOrEmulated()) {
-            // When a user has secure lock screen, require a challenge token to
-            // actually unlock. This check is mostly in place for emulation mode.
-            if (mLockPatternUtils.isSecure(userId) && ArrayUtils.isEmpty(token)) {
-                throw new IllegalStateException("Token required to unlock secure user " + userId);
+            // When a user has secure lock screen, require secret to actually unlock.
+            // This check is mostly in place for emulation mode.
+            if (mLockPatternUtils.isSecure(userId) && ArrayUtils.isEmpty(secret)) {
+                throw new IllegalStateException("Secret required to unlock secure user " + userId);
             }
 
             try {
@@ -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/SyntheticPasswordCrypto.java b/services/core/java/com/android/server/SyntheticPasswordCrypto.java
new file mode 100644
index 0000000..12d91c5
--- /dev/null
+++ b/services/core/java/com/android/server/SyntheticPasswordCrypto.java
@@ -0,0 +1,194 @@
+/*
+ * 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.server;
+
+import android.security.keystore.KeyProperties;
+import android.security.keystore.KeyProtection;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.KeyStore;
+import java.security.KeyStoreException;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.security.SecureRandom;
+import java.security.UnrecoverableKeyException;
+import java.security.cert.CertificateException;
+import java.util.Arrays;
+
+import javax.crypto.BadPaddingException;
+import javax.crypto.Cipher;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.KeyGenerator;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.SecretKey;
+import javax.crypto.spec.GCMParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+
+public class SyntheticPasswordCrypto {
+    private static final int PROFILE_KEY_IV_SIZE = 12;
+    private static final int AES_KEY_LENGTH = 32; // 256-bit AES key
+    private static final byte[] APPLICATION_ID_PERSONALIZATION = "application-id".getBytes();
+    // Time between the user credential is verified with GK and the decryption of synthetic password
+    // under the auth-bound key. This should always happen one after the other, but give it 15
+    // seconds just to be sure.
+    private static final int USER_AUTHENTICATION_VALIDITY = 15;
+
+    private static byte[] decrypt(SecretKey key, byte[] blob)
+            throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException,
+            InvalidAlgorithmParameterException, IllegalBlockSizeException, BadPaddingException {
+        if (blob == null) {
+            return null;
+        }
+        byte[] iv = Arrays.copyOfRange(blob, 0, PROFILE_KEY_IV_SIZE);
+        byte[] ciphertext = Arrays.copyOfRange(blob, PROFILE_KEY_IV_SIZE, blob.length);
+        Cipher cipher = Cipher.getInstance(KeyProperties.KEY_ALGORITHM_AES + "/"
+                + KeyProperties.BLOCK_MODE_GCM + "/" + KeyProperties.ENCRYPTION_PADDING_NONE);
+        cipher.init(Cipher.DECRYPT_MODE, key, new GCMParameterSpec(128, iv));
+        return cipher.doFinal(ciphertext);
+    }
+
+    private static byte[] encrypt(SecretKey key, byte[] blob)
+            throws IOException, NoSuchAlgorithmException, NoSuchPaddingException,
+            InvalidKeyException, IllegalBlockSizeException, BadPaddingException {
+        if (blob == null) {
+            return null;
+        }
+        Cipher cipher = Cipher.getInstance(
+                KeyProperties.KEY_ALGORITHM_AES + "/" + KeyProperties.BLOCK_MODE_GCM + "/"
+                        + KeyProperties.ENCRYPTION_PADDING_NONE);
+        cipher.init(Cipher.ENCRYPT_MODE, key);
+        byte[] ciphertext = cipher.doFinal(blob);
+        byte[] iv = cipher.getIV();
+        if (iv.length != PROFILE_KEY_IV_SIZE) {
+            throw new RuntimeException("Invalid iv length: " + iv.length);
+        }
+        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+        outputStream.write(iv);
+        outputStream.write(ciphertext);
+        return outputStream.toByteArray();
+    }
+
+    public static byte[] encrypt(byte[] keyBytes, byte[] personalisation, byte[] message) {
+        byte[] keyHash = personalisedHash(personalisation, keyBytes);
+        SecretKeySpec key = new SecretKeySpec(Arrays.copyOf(keyHash, AES_KEY_LENGTH),
+                KeyProperties.KEY_ALGORITHM_AES);
+        try {
+            return encrypt(key, message);
+        } catch (InvalidKeyException | NoSuchAlgorithmException | NoSuchPaddingException
+                | IllegalBlockSizeException | BadPaddingException | IOException e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+
+    public static byte[] decrypt(byte[] keyBytes, byte[] personalisation, byte[] ciphertext) {
+        byte[] keyHash = personalisedHash(personalisation, keyBytes);
+        SecretKeySpec key = new SecretKeySpec(Arrays.copyOf(keyHash, AES_KEY_LENGTH),
+                KeyProperties.KEY_ALGORITHM_AES);
+        try {
+            return decrypt(key, ciphertext);
+        } catch (InvalidKeyException | NoSuchAlgorithmException | NoSuchPaddingException
+                | IllegalBlockSizeException | BadPaddingException
+                | InvalidAlgorithmParameterException e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+
+    public static byte[] decryptBlob(String keyAlias, byte[] blob, byte[] applicationId) {
+        try {
+            KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore");
+            keyStore.load(null);
+
+            SecretKey decryptionKey = (SecretKey) keyStore.getKey(keyAlias, null);
+            byte[] intermediate = decrypt(applicationId, APPLICATION_ID_PERSONALIZATION, blob);
+            return decrypt(decryptionKey, intermediate);
+        } catch (CertificateException | IOException | BadPaddingException
+                | IllegalBlockSizeException
+                | KeyStoreException | NoSuchPaddingException | NoSuchAlgorithmException
+                | InvalidKeyException | UnrecoverableKeyException
+                | InvalidAlgorithmParameterException e) {
+            e.printStackTrace();
+            throw new RuntimeException("Failed to decrypt blob", e);
+        }
+    }
+
+    public static byte[] createBlob(String keyAlias, byte[] data, byte[] applicationId, long sid) {
+        try {
+            KeyGenerator keyGenerator = KeyGenerator.getInstance(KeyProperties.KEY_ALGORITHM_AES);
+            keyGenerator.init(new SecureRandom());
+            SecretKey secretKey = keyGenerator.generateKey();
+            KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore");
+            keyStore.load(null);
+            KeyProtection.Builder builder = new KeyProtection.Builder(KeyProperties.PURPOSE_DECRYPT)
+                    .setBlockModes(KeyProperties.BLOCK_MODE_GCM)
+                    .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE);
+            if (sid != 0) {
+                builder.setUserAuthenticationRequired(true)
+                        .setBoundToSpecificSecureUserId(sid)
+                        .setUserAuthenticationValidityDurationSeconds(USER_AUTHENTICATION_VALIDITY);
+            }
+            keyStore.setEntry(keyAlias,
+                    new KeyStore.SecretKeyEntry(secretKey),
+                    builder.build());
+            byte[] intermediate = encrypt(secretKey, data);
+            return encrypt(applicationId, APPLICATION_ID_PERSONALIZATION, intermediate);
+
+        } catch (CertificateException | IOException | BadPaddingException
+                | IllegalBlockSizeException
+                | KeyStoreException | NoSuchPaddingException | NoSuchAlgorithmException
+                | InvalidKeyException e) {
+            e.printStackTrace();
+            throw new RuntimeException("Failed to encrypt blob", e);
+        }
+    }
+
+    public static void destroyBlobKey(String keyAlias) {
+        KeyStore keyStore;
+        try {
+            keyStore = KeyStore.getInstance("AndroidKeyStore");
+            keyStore.load(null);
+            keyStore.deleteEntry(keyAlias);
+        } catch (KeyStoreException | NoSuchAlgorithmException | CertificateException
+                | IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+    protected static byte[] personalisedHash(byte[] personalisation, byte[]... message) {
+        try {
+            final int PADDING_LENGTH = 128;
+            MessageDigest digest = MessageDigest.getInstance("SHA-512");
+            if (personalisation.length > PADDING_LENGTH) {
+                throw new RuntimeException("Personalisation too long");
+            }
+            // Personalize the hash
+            // Pad it to the block size of the hash function
+            personalisation = Arrays.copyOf(personalisation, PADDING_LENGTH);
+            digest.update(personalisation);
+            for (byte[] data : message) {
+                digest.update(data);
+            }
+            return digest.digest();
+        } catch (NoSuchAlgorithmException e) {
+            throw new RuntimeException("NoSuchAlgorithmException for SHA-512", e);
+        }
+    }
+}
diff --git a/services/core/java/com/android/server/SyntheticPasswordManager.java b/services/core/java/com/android/server/SyntheticPasswordManager.java
new file mode 100644
index 0000000..6267880
--- /dev/null
+++ b/services/core/java/com/android/server/SyntheticPasswordManager.java
@@ -0,0 +1,692 @@
+/*
+ * 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.server;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.os.RemoteException;
+import android.service.gatekeeper.GateKeeperResponse;
+import android.service.gatekeeper.IGateKeeperService;
+import android.util.ArrayMap;
+import android.util.Log;
+
+import com.android.internal.util.ArrayUtils;
+import com.android.internal.widget.LockPatternUtils;
+import com.android.internal.widget.VerifyCredentialResponse;
+
+import libcore.util.HexEncoding;
+
+import java.nio.ByteBuffer;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.security.SecureRandom;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Set;
+
+
+/**
+ * A class that maintains the wrapping of synthetic password by user credentials or escrow tokens.
+ * It's (mostly) a pure storage for synthetic passwords, providing APIs to creating and destroying
+ * synthetic password blobs which are wrapped by user credentials or escrow tokens.
+ *
+ * Here is the assumptions it makes:
+ *   Each user has one single synthetic password at any time.
+ *   The SP has an associated password handle, which binds to the SID for that user. The password
+ *   handle is persisted by SyntheticPasswordManager internally.
+ *   If the user credential is null, it's treated as if the credential is DEFAULT_PASSWORD
+ */
+public class SyntheticPasswordManager {
+    private static final String SP_BLOB_NAME = "spblob";
+    private static final String SP_E0_NAME = "e0";
+    private static final String SP_P1_NAME = "p1";
+    private static final String SP_HANDLE_NAME = "handle";
+    private static final String SECDISCARDABLE_NAME = "secdis";
+    private static final int SECDISCARDABLE_LENGTH = 16 * 1024;
+    private static final String PASSWORD_DATA_NAME = "pwd";
+
+    public static final long DEFAULT_HANDLE = 0;
+    private static final String DEFAULT_PASSWORD = "default-password";
+
+    private static final byte SYNTHETIC_PASSWORD_VERSION = 1;
+    private static final byte SYNTHETIC_PASSWORD_PASSWORD_BASED = 0;
+    private static final byte SYNTHETIC_PASSWORD_TOKEN_BASED = 1;
+
+    // 256-bit synthetic password
+    private static final byte SYNTHETIC_PASSWORD_LENGTH = 256 / 8;
+
+    private static final int PASSWORD_SCRYPT_N = 13;
+    private static final int PASSWORD_SCRYPT_R = 3;
+    private static final int PASSWORD_SCRYPT_P = 1;
+    private static final int PASSWORD_SALT_LENGTH = 16;
+    private static final int PASSWORD_TOKEN_LENGTH = 32;
+    private static final String TAG = "SyntheticPasswordManager";
+
+    private static final byte[] PERSONALISATION_SECDISCARDABLE = "secdiscardable-transform".getBytes();
+    private static final byte[] PERSONALIZATION_KEY_STORE_PASSWORD = "keystore-password".getBytes();
+    private static final byte[] PERSONALIZATION_USER_GK_AUTH = "user-gk-authentication".getBytes();
+    private static final byte[] PERSONALIZATION_SP_GK_AUTH = "sp-gk-authentication".getBytes();
+    private static final byte[] PERSONALIZATION_FBE_KEY = "fbe-key".getBytes();
+    private static final byte[] PERSONALIZATION_SP_SPLIT = "sp-split".getBytes();
+    private static final byte[] PERSONALIZATION_E0 = "e0-encryption".getBytes();
+
+    static class AuthenticationResult {
+        public AuthenticationToken authToken;
+        public VerifyCredentialResponse gkResponse;
+    }
+
+    static class AuthenticationToken {
+        /*
+         * Here is the relationship between all three fields:
+         * P0 and P1 are two randomly-generated blocks. P1 is stored on disk but P0 is not.
+         * syntheticPassword = hash(P0 || P1)
+         * E0 = P0 encrypted under syntheticPassword, stored on disk.
+         */
+        private @Nullable byte[] E0;
+        private @Nullable byte[] P1;
+        private @NonNull String syntheticPassword;
+
+        public String deriveKeyStorePassword() {
+            return bytesToHex(SyntheticPasswordCrypto.personalisedHash(
+                    PERSONALIZATION_KEY_STORE_PASSWORD, syntheticPassword.getBytes()));
+        }
+
+        public byte[] deriveGkPassword() {
+            return SyntheticPasswordCrypto.personalisedHash(PERSONALIZATION_SP_GK_AUTH,
+                    syntheticPassword.getBytes());
+        }
+
+        public byte[] deriveDiskEncryptionKey() {
+            return SyntheticPasswordCrypto.personalisedHash(PERSONALIZATION_FBE_KEY,
+                    syntheticPassword.getBytes());
+        }
+
+        private void initialize(byte[] P0, byte[] P1) {
+            this.P1 = P1;
+            this.syntheticPassword = String.valueOf(HexEncoding.encode(
+                    SyntheticPasswordCrypto.personalisedHash(
+                            PERSONALIZATION_SP_SPLIT, P0, P1)));
+            this.E0 = SyntheticPasswordCrypto.encrypt(this.syntheticPassword.getBytes(),
+                    PERSONALIZATION_E0, P0);
+        }
+
+        public void recreate(byte[] secret) {
+            initialize(secret, this.P1);
+        }
+
+        protected static AuthenticationToken create() {
+            AuthenticationToken result = new AuthenticationToken();
+            result.initialize(secureRandom(SYNTHETIC_PASSWORD_LENGTH),
+                    secureRandom(SYNTHETIC_PASSWORD_LENGTH));
+            return result;
+        }
+
+        public byte[] computeP0() {
+            if (E0 == null) {
+                return null;
+            }
+            return SyntheticPasswordCrypto.decrypt(syntheticPassword.getBytes(), PERSONALIZATION_E0,
+                    E0);
+        }
+    }
+
+    static class PasswordData {
+        byte scryptN;
+        byte scryptR;
+        byte scryptP;
+        public int passwordType;
+        byte[] salt;
+        public byte[] passwordHandle;
+
+        public static PasswordData create(int passwordType) {
+            PasswordData result = new PasswordData();
+            result.scryptN = PASSWORD_SCRYPT_N;
+            result.scryptR = PASSWORD_SCRYPT_R;
+            result.scryptP = PASSWORD_SCRYPT_P;
+            result.passwordType = passwordType;
+            result.salt = secureRandom(PASSWORD_SALT_LENGTH);
+            return result;
+        }
+
+        public static PasswordData fromBytes(byte[] data) {
+            PasswordData result = new PasswordData();
+            ByteBuffer buffer = ByteBuffer.allocate(data.length);
+            buffer.put(data, 0, data.length);
+            buffer.flip();
+            result.passwordType = buffer.getInt();
+            result.scryptN = buffer.get();
+            result.scryptR = buffer.get();
+            result.scryptP = buffer.get();
+            int saltLen = buffer.getInt();
+            result.salt = new byte[saltLen];
+            buffer.get(result.salt);
+            int handleLen = buffer.getInt();
+            result.passwordHandle = new byte[handleLen];
+            buffer.get(result.passwordHandle);
+            return result;
+        }
+
+        public byte[] toBytes() {
+            ByteBuffer buffer = ByteBuffer.allocate(Integer.BYTES + 3 * Byte.BYTES
+                    + Integer.BYTES + salt.length + Integer.BYTES + passwordHandle.length);
+            buffer.putInt(passwordType);
+            buffer.put(scryptN);
+            buffer.put(scryptR);
+            buffer.put(scryptP);
+            buffer.putInt(salt.length);
+            buffer.put(salt);
+            buffer.putInt(passwordHandle.length);
+            buffer.put(passwordHandle);
+            return buffer.array();
+        }
+    }
+
+    private LockSettingsStorage mStorage;
+
+    public SyntheticPasswordManager(LockSettingsStorage storage) {
+        mStorage = storage;
+    }
+
+
+    public int getCredentialType(long handle, int userId) {
+        byte[] passwordData = loadState(PASSWORD_DATA_NAME, handle, userId);
+        if (passwordData == null) {
+            Log.w(TAG, "getCredentialType: encountered empty password data for user " + userId);
+            return LockPatternUtils.CREDENTIAL_TYPE_NONE;
+        }
+        return PasswordData.fromBytes(passwordData).passwordType;
+    }
+
+    /**
+     * Initializing a new Authentication token, possibly from an existing credential and hash.
+     *
+     * The authentication token would bear a randomly-generated synthetic password.
+     *
+     * This method has the side effect of rebinding the SID of the given user to the
+     * newly-generated SP.
+     *
+     * If the existing credential hash is non-null, the existing SID mill be migrated so
+     * the synthetic password in the authentication token will produce the same SID
+     * (the corresponding synthetic password handle is persisted by SyntheticPasswordManager
+     * in a per-user data storage.
+     *
+     * If the existing credential hash is null, it means the given user should have no SID so
+     * SyntheticPasswordManager will nuke any SP handle previously persisted. In this case,
+     * the supplied credential parameter is also ignored.
+     *
+     * Also saves the escrow information necessary to re-generate the synthetic password under
+     * an escrow scheme. This information can be removed with {@link #destroyEscrowData} if
+     * password escrow should be disabled completely on the given user.
+     *
+     */
+    public AuthenticationToken newSyntheticPasswordAndSid(IGateKeeperService gatekeeper,
+            byte[] hash, String credential, int userId) throws RemoteException {
+        AuthenticationToken result = AuthenticationToken.create();
+        GateKeeperResponse response;
+        if (hash != null) {
+            response = gatekeeper.enroll(userId, hash, credential.getBytes(),
+                    result.deriveGkPassword());
+            if (response.getResponseCode() != GateKeeperResponse.RESPONSE_OK) {
+                Log.w(TAG, "Fail to migrate SID, assuming no SID, user " + userId);
+                clearSidForUser(userId);
+            } else {
+                saveSyntheticPasswordHandle(response.getPayload(), userId);
+            }
+        } else {
+            clearSidForUser(userId);
+        }
+        saveEscrowData(result, userId);
+        return result;
+    }
+
+    /**
+     * Enroll a new password handle and SID for the given synthetic password and persist it on disk.
+     * Used when adding password to previously-unsecured devices.
+     */
+    public void newSidForUser(IGateKeeperService gatekeeper, AuthenticationToken authToken,
+            int userId) throws RemoteException {
+        GateKeeperResponse response = gatekeeper.enroll(userId, null, null,
+                authToken.deriveGkPassword());
+        if (response.getResponseCode() != GateKeeperResponse.RESPONSE_OK) {
+            Log.e(TAG, "Fail to create new SID for user " + userId);
+            return;
+        }
+        saveSyntheticPasswordHandle(response.getPayload(), userId);
+    }
+
+    // Nuke the SP handle (and as a result, its SID) for the given user.
+    public void clearSidForUser(int userId) {
+        destroyState(SP_HANDLE_NAME, true, DEFAULT_HANDLE, userId);
+    }
+
+    public boolean hasSidForUser(int userId) {
+        return hasState(SP_HANDLE_NAME, DEFAULT_HANDLE, userId);
+    }
+
+    // if null, it means there is no SID associated with the user
+    // This can happen if the user is migrated to SP but currently
+    // do not have a lockscreen password.
+    private byte[] loadSyntheticPasswordHandle(int userId) {
+        return loadState(SP_HANDLE_NAME, DEFAULT_HANDLE, userId);
+    }
+
+    private void saveSyntheticPasswordHandle(byte[] spHandle, int userId) {
+        saveState(SP_HANDLE_NAME, spHandle, DEFAULT_HANDLE, userId);
+    }
+
+    private boolean loadEscrowData(AuthenticationToken authToken, int userId) {
+        authToken.E0 = loadState(SP_E0_NAME, DEFAULT_HANDLE, userId);
+        authToken.P1 = loadState(SP_P1_NAME, DEFAULT_HANDLE, userId);
+        return authToken.E0 != null && authToken.P1 != null;
+    }
+
+    private void saveEscrowData(AuthenticationToken authToken, int userId) {
+        saveState(SP_E0_NAME, authToken.E0, DEFAULT_HANDLE, userId);
+        saveState(SP_P1_NAME, authToken.P1, DEFAULT_HANDLE, userId);
+    }
+
+    public boolean hasEscrowData(int userId) {
+        return hasState(SP_E0_NAME, DEFAULT_HANDLE, userId)
+                && hasState(SP_P1_NAME, DEFAULT_HANDLE, userId);
+    }
+
+    public void destroyEscrowData(int userId) {
+        destroyState(SP_E0_NAME, true, DEFAULT_HANDLE, userId);
+        destroyState(SP_P1_NAME, true, DEFAULT_HANDLE, userId);
+    }
+
+    /**
+     * Create a new password based SP blob based on the supplied authentication token, such that
+     * a future successful authentication with unwrapPasswordBasedSyntheticPassword() would result
+     * in the same authentication token.
+     *
+     * This method only creates SP blob wrapping around the given synthetic password and does not
+     * handle logic around SID or SP handle. The caller should separately ensure that the user's SID
+     * is consistent with the device state by calling other APIs in this class.
+     *
+     * @see #newSidForUser
+     * @see #clearSidForUser
+     */
+    public long createPasswordBasedSyntheticPassword(IGateKeeperService gatekeeper,
+            String credential, int credentialType, AuthenticationToken authToken, int userId)
+                    throws RemoteException {
+        if (credential == null || credentialType == LockPatternUtils.CREDENTIAL_TYPE_NONE) {
+            credentialType = LockPatternUtils.CREDENTIAL_TYPE_NONE;
+            credential = DEFAULT_PASSWORD;
+        }
+
+        long handle = generateHandle();
+        PasswordData pwd = PasswordData.create(credentialType);
+        byte[] pwdToken = computePasswordToken(credential, pwd);
+
+        GateKeeperResponse response = gatekeeper.enroll(fakeUid(userId), null, null,
+                passwordTokenToGkInput(pwdToken));
+        if (response.getResponseCode() != GateKeeperResponse.RESPONSE_OK) {
+            Log.e(TAG, "Fail to enroll user password when creating SP for user " + userId);
+            return 0;
+        }
+        pwd.passwordHandle = response.getPayload();
+        long sid = sidFromPasswordHandle(pwd.passwordHandle);
+        saveState(PASSWORD_DATA_NAME, pwd.toBytes(), handle, userId);
+
+        byte[] applicationId = transformUnderSecdiscardable(pwdToken,
+                createSecdiscardable(handle, userId));
+        createSyntheticPasswordBlob(handle, SYNTHETIC_PASSWORD_PASSWORD_BASED, authToken,
+                applicationId, sid, userId);
+        return handle;
+    }
+
+    private ArrayMap<Integer, ArrayMap<Long, byte[]>> tokenMap = new ArrayMap<>();
+
+    public long createTokenBasedSyntheticPassword(byte[] token, int userId) {
+        long handle = generateHandle();
+        byte[] applicationId = transformUnderSecdiscardable(token,
+                createSecdiscardable(handle, userId));
+        if (!tokenMap.containsKey(userId)) {
+            tokenMap.put(userId, new ArrayMap<>());
+        }
+        tokenMap.get(userId).put(handle, applicationId);
+        return handle;
+    }
+
+    public Set<Long> getPendingTokensForUser(int userId) {
+        if (!tokenMap.containsKey(userId)) {
+            return Collections.emptySet();
+        }
+        return tokenMap.get(userId).keySet();
+    }
+
+    public boolean removePendingToken(long handle, int userId) {
+        if (!tokenMap.containsKey(userId)) {
+            return false;
+        }
+        return tokenMap.get(userId).remove(handle) != null;
+    }
+
+    public boolean activateTokenBasedSyntheticPassword(long handle, AuthenticationToken authToken,
+            int userId) {
+        if (!tokenMap.containsKey(userId)) {
+            return false;
+        }
+        byte[] applicationId = tokenMap.get(userId).get(handle);
+        if (applicationId == null) {
+            return false;
+        }
+        if (!loadEscrowData(authToken, userId)) {
+            Log.w(TAG, "User is not escrowable");
+            return false;
+        }
+        createSyntheticPasswordBlob(handle, SYNTHETIC_PASSWORD_TOKEN_BASED, authToken,
+                applicationId, 0L, userId);
+        tokenMap.get(userId).remove(handle);
+        return true;
+    }
+
+    private void createSyntheticPasswordBlob(long handle, byte type, AuthenticationToken authToken,
+            byte[] applicationId, long sid, int userId) {
+        final byte[] secret;
+        if (type == SYNTHETIC_PASSWORD_TOKEN_BASED) {
+            secret = authToken.computeP0();
+        } else {
+            secret = authToken.syntheticPassword.getBytes();
+        }
+        byte[] content = createSPBlob(getHandleName(handle), secret, applicationId, sid);
+        byte[] blob = new byte[content.length + 1 + 1];
+        blob[0] = SYNTHETIC_PASSWORD_VERSION;
+        blob[1] = type;
+        System.arraycopy(content, 0, blob, 2, content.length);
+        saveState(SP_BLOB_NAME, blob, handle, userId);
+    }
+
+    /**
+     * Decrypt a synthetic password by supplying the user credential and corresponding password
+     * blob handle generated previously. If the decryption is successful, initiate a GateKeeper
+     * verification to referesh the SID & Auth token maintained by the system.
+     */
+    public AuthenticationResult unwrapPasswordBasedSyntheticPassword(IGateKeeperService gatekeeper,
+            long handle, String credential, int userId) throws RemoteException {
+        if (credential == null) {
+            credential = DEFAULT_PASSWORD;
+        }
+        AuthenticationResult result = new AuthenticationResult();
+        PasswordData pwd = PasswordData.fromBytes(loadState(PASSWORD_DATA_NAME, handle, userId));
+        byte[] pwdToken = computePasswordToken(credential, pwd);
+        byte[] gkPwdToken = passwordTokenToGkInput(pwdToken);
+
+        GateKeeperResponse response = gatekeeper.verifyChallenge(fakeUid(userId), 0L,
+                pwd.passwordHandle, gkPwdToken);
+        int responseCode = response.getResponseCode();
+        if (responseCode == GateKeeperResponse.RESPONSE_OK) {
+            result.gkResponse = VerifyCredentialResponse.OK;
+            if (response.getShouldReEnroll()) {
+                GateKeeperResponse reenrollResponse = gatekeeper.enroll(fakeUid(userId),
+                        pwd.passwordHandle, gkPwdToken, gkPwdToken);
+                if (reenrollResponse.getResponseCode() == GateKeeperResponse.RESPONSE_OK) {
+                    pwd.passwordHandle = reenrollResponse.getPayload();
+                    saveState(PASSWORD_DATA_NAME, pwd.toBytes(), handle, userId);
+                } else {
+                    Log.w(TAG, "Fail to re-enroll user password for user " + userId);
+                    // continue the flow anyway
+                }
+            }
+        } else if (responseCode == GateKeeperResponse.RESPONSE_RETRY) {
+            result.gkResponse = new VerifyCredentialResponse(response.getTimeout());
+            return result;
+        } else  {
+            result.gkResponse = VerifyCredentialResponse.ERROR;
+            return result;
+        }
+
+
+        byte[] applicationId = transformUnderSecdiscardable(pwdToken,
+                loadSecdiscardable(handle, userId));
+        result.authToken = unwrapSyntheticPasswordBlob(handle, SYNTHETIC_PASSWORD_PASSWORD_BASED,
+                applicationId, userId);
+
+        // Perform verifyChallenge to refresh auth tokens for GK if user password exists.
+        result.gkResponse = verifyChallenge(gatekeeper, result.authToken, 0L, userId);
+        return result;
+    }
+
+    /**
+     * Decrypt a synthetic password by supplying an escrow token and corresponding token
+     * blob handle generated previously. If the decryption is successful, initiate a GateKeeper
+     * verification to referesh the SID & Auth token maintained by the system.
+     */
+    public @NonNull AuthenticationResult unwrapTokenBasedSyntheticPassword(
+            IGateKeeperService gatekeeper, long handle, byte[] token, int userId)
+                    throws RemoteException {
+        AuthenticationResult result = new AuthenticationResult();
+        byte[] applicationId = transformUnderSecdiscardable(token,
+                loadSecdiscardable(handle, userId));
+        result.authToken = unwrapSyntheticPasswordBlob(handle, SYNTHETIC_PASSWORD_TOKEN_BASED,
+                applicationId, userId);
+        if (result.authToken != null) {
+            result.gkResponse = verifyChallenge(gatekeeper, result.authToken, 0L, userId);
+            if (result.gkResponse == null) {
+                // The user currently has no password. return OK with null payload so null
+                // is propagated to unlockUser()
+                result.gkResponse = VerifyCredentialResponse.OK;
+            }
+        } else {
+            result.gkResponse = VerifyCredentialResponse.ERROR;
+        }
+        return result;
+    }
+
+    private AuthenticationToken unwrapSyntheticPasswordBlob(long handle, byte type,
+            byte[] applicationId, int userId) {
+        byte[] blob = loadState(SP_BLOB_NAME, handle, userId);
+        if (blob == null) {
+            return null;
+        }
+        if (blob[0] != SYNTHETIC_PASSWORD_VERSION) {
+            throw new RuntimeException("Unknown blob version");
+        }
+        if (blob[1] != type) {
+            throw new RuntimeException("Invalid blob type");
+        }
+        byte[] secret = decryptSPBlob(getHandleName(handle),
+                Arrays.copyOfRange(blob, 2, blob.length), applicationId);
+        if (secret == null) {
+            Log.e(TAG, "Fail to decrypt SP for user " + userId);
+            return null;
+        }
+        AuthenticationToken result = new AuthenticationToken();
+        if (type == SYNTHETIC_PASSWORD_TOKEN_BASED) {
+            if (!loadEscrowData(result, userId)) {
+                Log.e(TAG, "User is not escrowable: " + userId);
+                return null;
+            }
+            result.recreate(secret);
+        } else {
+            result.syntheticPassword = new String(secret);
+        }
+        return result;
+    }
+
+    /**
+     * performs GK verifyChallenge and returns auth token, re-enrolling SP password handle
+     * if required.
+     *
+     * Normally performing verifyChallenge with an AuthenticationToken should always return
+     * RESPONSE_OK, since user authentication failures are detected earlier when trying to
+     * decrypt SP.
+     */
+    public VerifyCredentialResponse verifyChallenge(IGateKeeperService gatekeeper,
+            @NonNull AuthenticationToken auth, long challenge, int userId) throws RemoteException {
+        byte[] spHandle = loadSyntheticPasswordHandle(userId);
+        if (spHandle == null) {
+            // There is no password handle associated with the given user, i.e. the user is not
+            // secured by lockscreen and has no SID, so just return here;
+            return null;
+        }
+        VerifyCredentialResponse result;
+        GateKeeperResponse response = gatekeeper.verifyChallenge(userId, challenge,
+                spHandle, auth.deriveGkPassword());
+        int responseCode = response.getResponseCode();
+        if (responseCode == GateKeeperResponse.RESPONSE_OK) {
+            result = new VerifyCredentialResponse(response.getPayload());
+            if (response.getShouldReEnroll()) {
+                response = gatekeeper.enroll(userId, spHandle,
+                        spHandle, auth.deriveGkPassword());
+                if (response.getResponseCode() == GateKeeperResponse.RESPONSE_OK) {
+                    spHandle = response.getPayload();
+                    saveSyntheticPasswordHandle(spHandle, userId);
+                    // Call self again to re-verify with updated handle
+                    return verifyChallenge(gatekeeper, auth, challenge, userId);
+                } else {
+                    Log.w(TAG, "Fail to re-enroll SP handle for user " + userId);
+                    // Fall through, return existing handle
+                }
+            }
+        } else if (responseCode == GateKeeperResponse.RESPONSE_RETRY) {
+            result = new VerifyCredentialResponse(response.getTimeout());
+        } else {
+            result = VerifyCredentialResponse.ERROR;
+        }
+        return result;
+    }
+
+    public boolean existsHandle(long handle, int userId) {
+        return hasState(SP_BLOB_NAME, handle, userId);
+    }
+
+    public void destroyTokenBasedSyntheticPassword(long handle, int userId) {
+        destroySyntheticPassword(handle, userId);
+        destroyState(SECDISCARDABLE_NAME, true, handle, userId);
+    }
+
+    public void destroyPasswordBasedSyntheticPassword(long handle, int userId) {
+        destroySyntheticPassword(handle, userId);
+        destroyState(SECDISCARDABLE_NAME, true, handle, userId);
+        destroyState(PASSWORD_DATA_NAME, true, handle, userId);
+    }
+
+    private void destroySyntheticPassword(long handle, int userId) {
+        destroyState(SP_BLOB_NAME, true, handle, userId);
+        destroyState(SP_E0_NAME, true, handle, userId);
+        destroyState(SP_P1_NAME, true, handle, userId);
+        destroySPBlobKey(getHandleName(handle));
+    }
+
+    private byte[] transformUnderSecdiscardable(byte[] data, byte[] rawSecdiscardable) {
+        byte[] secdiscardable = SyntheticPasswordCrypto.personalisedHash(
+                PERSONALISATION_SECDISCARDABLE, rawSecdiscardable);
+        byte[] result = new byte[data.length + secdiscardable.length];
+        System.arraycopy(data, 0, result, 0, data.length);
+        System.arraycopy(secdiscardable, 0, result, data.length, secdiscardable.length);
+        return result;
+    }
+
+    private byte[] createSecdiscardable(long handle, int userId) {
+        byte[] data = secureRandom(SECDISCARDABLE_LENGTH);
+        saveState(SECDISCARDABLE_NAME, data, handle, userId);
+        return data;
+    }
+
+    private byte[] loadSecdiscardable(long handle, int userId) {
+        return loadState(SECDISCARDABLE_NAME, handle, userId);
+    }
+
+    private boolean hasState(String stateName, long handle, int userId) {
+        return !ArrayUtils.isEmpty(loadState(stateName, handle, userId));
+    }
+
+    private byte[] loadState(String stateName, long handle, int userId) {
+        return mStorage.readSyntheticPasswordState(userId, handle, stateName);
+    }
+
+    private void saveState(String stateName, byte[] data, long handle, int userId) {
+        mStorage.writeSyntheticPasswordState(userId, handle, stateName, data);
+    }
+
+    private void destroyState(String stateName, boolean secure, long handle, int userId) {
+        mStorage.deleteSyntheticPasswordState(userId, handle, stateName, secure);
+    }
+
+    protected byte[] decryptSPBlob(String blobKeyName, byte[] blob, byte[] applicationId) {
+        return SyntheticPasswordCrypto.decryptBlob(blobKeyName, blob, applicationId);
+    }
+
+    protected byte[] createSPBlob(String blobKeyName, byte[] data, byte[] applicationId, long sid) {
+        return SyntheticPasswordCrypto.createBlob(blobKeyName, data, applicationId, sid);
+    }
+
+    protected void destroySPBlobKey(String keyAlias) {
+        SyntheticPasswordCrypto.destroyBlobKey(keyAlias);
+    }
+
+    public static long generateHandle() {
+        SecureRandom rng = new SecureRandom();
+        long result;
+        do {
+            result = rng.nextLong();
+        } while (result == DEFAULT_HANDLE);
+        return result;
+    }
+
+    private int fakeUid(int uid) {
+        return 100000 + uid;
+    }
+
+    protected static byte[] secureRandom(int length) {
+        try {
+            return SecureRandom.getInstance("SHA1PRNG").generateSeed(length);
+        } catch (NoSuchAlgorithmException e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+
+    private String getHandleName(long handle) {
+        return String.format("%s%x", LockPatternUtils.SYNTHETIC_PASSWORD_KEY_PREFIX, handle);
+    }
+
+    private byte[] computePasswordToken(String password, PasswordData data) {
+        return scrypt(password, data.salt, 1 << data.scryptN, 1 << data.scryptR, 1 << data.scryptP,
+                PASSWORD_TOKEN_LENGTH);
+    }
+
+    private byte[] passwordTokenToGkInput(byte[] token) {
+        return SyntheticPasswordCrypto.personalisedHash(PERSONALIZATION_USER_GK_AUTH, token);
+    }
+
+    protected long sidFromPasswordHandle(byte[] handle) {
+        return nativeSidFromPasswordHandle(handle);
+    }
+
+    protected byte[] scrypt(String password, byte[] salt, int N, int r, int p, int outLen) {
+        return nativeScrypt(password.getBytes(), salt, N, r, p, outLen);
+    }
+
+    native long nativeSidFromPasswordHandle(byte[] handle);
+    native byte[] nativeScrypt(byte[] password, byte[] salt, int N, int r, int p, int outLen);
+
+    final protected static char[] hexArray = "0123456789ABCDEF".toCharArray();
+    public static String bytesToHex(byte[] bytes) {
+        if (bytes == null) {
+            return "null";
+        }
+        char[] hexChars = new char[bytes.length * 2];
+        for ( int j = 0; j < bytes.length; j++ ) {
+            int v = bytes[j] & 0xFF;
+            hexChars[j * 2] = hexArray[v >>> 4];
+            hexChars[j * 2 + 1] = hexArray[v & 0x0F];
+        }
+        return new String(hexChars);
+    }
+}
diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java
index 0834eb8..ea33906 100644
--- a/services/core/java/com/android/server/TelephonyRegistry.java
+++ b/services/core/java/com/android/server/TelephonyRegistry.java
@@ -16,7 +16,6 @@
 
 package com.android.server;
 
-import android.Manifest;
 import android.app.ActivityManager;
 import android.app.AppOpsManager;
 import android.content.BroadcastReceiver;
@@ -142,6 +141,10 @@
 
     private ServiceState[] mServiceState;
 
+    private int[] mVoiceActivationState;
+
+    private int[] mDataActivationState;
+
     private SignalStrength[] mSignalStrength;
 
     private boolean[] mMessageWaiting;
@@ -301,6 +304,8 @@
         mDataConnectionNetworkType = new int[numPhones];
         mCallIncomingNumber = new String[numPhones];
         mServiceState = new ServiceState[numPhones];
+        mVoiceActivationState = new int[numPhones];
+        mDataActivationState = new int[numPhones];
         mSignalStrength = new SignalStrength[numPhones];
         mMessageWaiting = new boolean[numPhones];
         mDataConnectionPossible = new boolean[numPhones];
@@ -315,6 +320,8 @@
             mCallState[i] =  TelephonyManager.CALL_STATE_IDLE;
             mDataActivity[i] = TelephonyManager.DATA_ACTIVITY_NONE;
             mDataConnectionState[i] = TelephonyManager.DATA_UNKNOWN;
+            mVoiceActivationState[i] = TelephonyManager.SIM_ACTIVATION_STATE_UNKNOWN;
+            mDataActivationState[i] = TelephonyManager.SIM_ACTIVATION_STATE_UNKNOWN;
             mCallIncomingNumber[i] =  "";
             mServiceState[i] =  new ServiceState();
             mSignalStrength[i] =  new SignalStrength();
@@ -644,6 +651,20 @@
                             remove(r.binder);
                         }
                     }
+                    if ((events & PhoneStateListener.LISTEN_VOICE_ACTIVATION_STATE) !=0) {
+                        try {
+                            r.callback.onVoiceActivationStateChanged(mVoiceActivationState[phoneId]);
+                        } catch (RemoteException ex) {
+                            remove(r.binder);
+                        }
+                    }
+                    if ((events & PhoneStateListener.LISTEN_DATA_ACTIVATION_STATE) !=0) {
+                        try {
+                            r.callback.onDataActivationStateChanged(mDataActivationState[phoneId]);
+                        } catch (RemoteException ex) {
+                            remove(r.binder);
+                        }
+                    }
                 }
             }
         } else {
@@ -795,6 +816,67 @@
         broadcastServiceStateChanged(state, phoneId, subId);
     }
 
+    public void notifySimActivationStateChangedForPhoneId(int phoneId, int subId,
+            int activationType, int activationState) {
+        if (!checkNotifyPermission("notifySimActivationState()")){
+            return;
+        }
+        if (VDBG) {
+            log("notifySimActivationStateForPhoneId: subId=" + subId + " phoneId=" + phoneId
+                    + "type=" + activationType + " state=" + activationState);
+        }
+        synchronized (mRecords) {
+            if (validatePhoneId(phoneId)) {
+                switch (activationType) {
+                    case PhoneConstants.SIM_ACTIVATION_TYPE_VOICE:
+                        mVoiceActivationState[phoneId] = activationState;
+                        break;
+                    case PhoneConstants.SIM_ACTIVATION_TYPE_DATA:
+                        mDataActivationState[phoneId] = activationState;
+                        break;
+                    default:
+                        return;
+                }
+                for (Record r : mRecords) {
+                    if (VDBG) {
+                        log("notifySimActivationStateForPhoneId: r=" + r + " subId=" + subId
+                                + " phoneId=" + phoneId + "type=" + activationType
+                                + " state=" + activationState);
+                    }
+                    try {
+                        if ((activationType == PhoneConstants.SIM_ACTIVATION_TYPE_VOICE) &&
+                                r.matchPhoneStateListenerEvent(
+                                        PhoneStateListener.LISTEN_VOICE_ACTIVATION_STATE) &&
+                                idMatch(r.subId, subId, phoneId)) {
+                            if (DBG) {
+                                log("notifyVoiceActivationStateForPhoneId: callback.onVASC r=" + r
+                                        + " subId=" + subId + " phoneId=" + phoneId
+                                        + " state=" + activationState);
+                            }
+                            r.callback.onVoiceActivationStateChanged(activationState);
+                        }
+                        if ((activationType == PhoneConstants.SIM_ACTIVATION_TYPE_DATA) &&
+                                r.matchPhoneStateListenerEvent(
+                                        PhoneStateListener.LISTEN_DATA_ACTIVATION_STATE) &&
+                                idMatch(r.subId, subId, phoneId)) {
+                            if (DBG) {
+                                log("notifyDataActivationStateForPhoneId: callback.onDASC r=" + r
+                                        + " subId=" + subId + " phoneId=" + phoneId
+                                        + " state=" + activationState);
+                            }
+                            r.callback.onDataActivationStateChanged(activationState);
+                        }
+                    }  catch (RemoteException ex) {
+                        mRemoveList.add(r.binder);
+                    }
+                }
+            } else {
+                log("notifySimActivationStateForPhoneId: INVALID phoneId=" + phoneId);
+            }
+            handleRemoveListLocked();
+        }
+    }
+
     public void notifySignalStrengthForPhoneId(int phoneId, int subId,
                 SignalStrength signalStrength) {
         if (!checkNotifyPermission("notifySignalStrength()")) {
@@ -1324,6 +1406,8 @@
                 pw.println("  mCallState=" + mCallState[i]);
                 pw.println("  mCallIncomingNumber=" + mCallIncomingNumber[i]);
                 pw.println("  mServiceState=" + mServiceState[i]);
+                pw.println("  mVoiceActivationState= " + mVoiceActivationState[i]);
+                pw.println("  mDataActivationState= " + mDataActivationState[i]);
                 pw.println("  mSignalStrength=" + mSignalStrength[i]);
                 pw.println("  mMessageWaiting=" + mMessageWaiting[i]);
                 pw.println("  mCallForwarding=" + mCallForwarding[i]);
diff --git a/services/core/java/com/android/server/TextServicesManagerService.java b/services/core/java/com/android/server/TextServicesManagerService.java
index 2b5166e..feda273 100644
--- a/services/core/java/com/android/server/TextServicesManagerService.java
+++ b/services/core/java/com/android/server/TextServicesManagerService.java
@@ -20,6 +20,7 @@
 import com.android.internal.content.PackageMonitor;
 import com.android.internal.inputmethod.InputMethodUtils;
 import com.android.internal.textservice.ISpellCheckerService;
+import com.android.internal.textservice.ISpellCheckerServiceCallback;
 import com.android.internal.textservice.ISpellCheckerSession;
 import com.android.internal.textservice.ISpellCheckerSessionListener;
 import com.android.internal.textservice.ITextServicesManager;
@@ -68,7 +69,6 @@
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
-import java.util.concurrent.CopyOnWriteArrayList;
 
 public class TextServicesManagerService extends ITextServicesManager.Stub {
     private static final String TAG = TextServicesManagerService.class.getSimpleName();
@@ -549,56 +549,26 @@
                 return;
             }
             final SpellCheckerInfo sci = mSpellCheckerMap.get(sciId);
+            SpellCheckerBindGroup bindGroup = mSpellCheckerBindGroups.get(sciId);
             final int uid = Binder.getCallingUid();
-            if (mSpellCheckerBindGroups.containsKey(sciId)) {
-                final SpellCheckerBindGroup bindGroup = mSpellCheckerBindGroups.get(sciId);
-                if (bindGroup != null) {
-                    final InternalDeathRecipient recipient =
-                            mSpellCheckerBindGroups.get(sciId).addListener(
-                                    tsListener, locale, scListener, uid, bundle);
-                    if (recipient == null) {
-                        if (DBG) {
-                            Slog.w(TAG, "Didn't create a death recipient.");
-                        }
-                        return;
-                    }
-                    if (bindGroup.mSpellChecker == null & bindGroup.mConnected) {
-                        Slog.e(TAG, "The state of the spell checker bind group is illegal.");
-                        bindGroup.removeAll();
-                    } else if (bindGroup.mSpellChecker != null) {
-                        if (DBG) {
-                            Slog.w(TAG, "Existing bind found. Return a spell checker session now. "
-                                    + "Listeners count = " + bindGroup.mListeners.size());
-                        }
-                        try {
-                            final ISpellCheckerSession session =
-                                    bindGroup.mSpellChecker.getISpellCheckerSession(
-                                            recipient.mScLocale, recipient.mScListener, bundle);
-                            if (session != null) {
-                                tsListener.onServiceConnected(session);
-                                return;
-                            } else {
-                                if (DBG) {
-                                    Slog.w(TAG, "Existing bind already expired. ");
-                                }
-                                bindGroup.removeAll();
-                            }
-                        } catch (RemoteException e) {
-                            Slog.e(TAG, "Exception in getting spell checker session: " + e);
-                            bindGroup.removeAll();
-                        }
-                    }
+            if (bindGroup == null) {
+                final long ident = Binder.clearCallingIdentity();
+                try {
+                    bindGroup = startSpellCheckerServiceInnerLocked(sci);
+                } finally {
+                    Binder.restoreCallingIdentity(ident);
+                }
+                if (bindGroup == null) {
+                    // startSpellCheckerServiceInnerLocked failed.
+                    return;
                 }
             }
-            final long ident = Binder.clearCallingIdentity();
-            try {
-                startSpellCheckerServiceInnerLocked(
-                        sci, locale, tsListener, scListener, uid, bundle);
-            } finally {
-                Binder.restoreCallingIdentity(ident);
-            }
+
+            // Start getISpellCheckerSession async IPC, or just queue the request until the spell
+            // checker service is bound.
+            bindGroup.getISpellCheckerSessionOrQueueLocked(
+                     new SessionRequest(uid, locale, tsListener, scListener, bundle));
         }
-        return;
     }
 
     @Override
@@ -611,9 +581,8 @@
         }
     }
 
-    private void startSpellCheckerServiceInnerLocked(SpellCheckerInfo info, String locale,
-            ITextServicesSessionListener tsListener, ISpellCheckerSessionListener scListener,
-            int uid, Bundle bundle) {
+    @Nullable
+    private SpellCheckerBindGroup startSpellCheckerServiceInnerLocked(SpellCheckerInfo info) {
         if (DBG) {
             Slog.w(TAG, "Start spell checker session inner locked.");
         }
@@ -627,11 +596,11 @@
         if (!bindCurrentSpellCheckerService(serviceIntent, connection,
                 Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE_WHILE_AWAKE)) {
             Slog.e(TAG, "Failed to get a spell checker service.");
-            return;
+            return null;
         }
-        final SpellCheckerBindGroup group = new SpellCheckerBindGroup(
-                connection, tsListener, locale, scListener, uid, bundle);
+        final SpellCheckerBindGroup group = new SpellCheckerBindGroup(connection);
         mSpellCheckerBindGroups.put(sciId, group);
+        return group;
     }
 
     @Override
@@ -814,16 +783,32 @@
                 pw.println("    " + ent.getKey() + " " + grp + ":");
                 pw.println("      " + "mInternalConnection=" + grp.mInternalConnection);
                 pw.println("      " + "mSpellChecker=" + grp.mSpellChecker);
-                pw.println("      " + "mBound=" + grp.mBound + " mConnected=" + grp.mConnected);
+                pw.println("      " + "mUnbindCalled=" + grp.mUnbindCalled);
+                pw.println("      " + "mConnected=" + grp.mConnected);
+                final int numPendingSessionRequests = grp.mPendingSessionRequests.size();
+                for (int i = 0; i < numPendingSessionRequests; i++) {
+                    final SessionRequest req = grp.mPendingSessionRequests.get(i);
+                    pw.println("      " + "Pending Request #" + i + ":");
+                    pw.println("        " + "mTsListener=" + req.mTsListener);
+                    pw.println("        " + "mScListener=" + req.mScListener);
+                    pw.println("        " + "mScLocale=" + req.mLocale + " mUid=" + req.mUserId);
+                }
+                final int numOnGoingSessionRequests = grp.mOnGoingSessionRequests.size();
+                for (int i = 0; i < numOnGoingSessionRequests; i++) {
+                    final SessionRequest req = grp.mOnGoingSessionRequests.get(i);
+                    pw.println("      " + "On going Request #" + i + ":");
+                    ++i;
+                    pw.println("        " + "mTsListener=" + req.mTsListener);
+                    pw.println("        " + "mScListener=" + req.mScListener);
+                    pw.println(
+                            "        " + "mScLocale=" + req.mLocale + " mUid=" + req.mUserId);
+                }
                 final int N = grp.mListeners.size();
                 for (int i = 0; i < N; i++) {
                     final InternalDeathRecipient listener = grp.mListeners.get(i);
                     pw.println("      " + "Listener #" + i + ":");
-                    pw.println("        " + "mTsListener=" + listener.mTsListener);
                     pw.println("        " + "mScListener=" + listener.mScListener);
                     pw.println("        " + "mGroup=" + listener.mGroup);
-                    pw.println("        " + "mScLocale=" + listener.mScLocale
-                            + " mUid=" + listener.mUid);
                 }
             }
             pw.println("");
@@ -832,25 +817,44 @@
         }
     }
 
+    private static final class SessionRequest {
+        @UserIdInt
+        public final int mUserId;
+        @Nullable
+        public final String mLocale;
+        @NonNull
+        public final ITextServicesSessionListener mTsListener;
+        @NonNull
+        public final ISpellCheckerSessionListener mScListener;
+        @Nullable
+        public final Bundle mBundle;
+
+        SessionRequest(@UserIdInt final int userId, @Nullable String locale,
+                @NonNull ITextServicesSessionListener tsListener,
+                @NonNull ISpellCheckerSessionListener scListener, @Nullable Bundle bundle) {
+            mUserId = userId;
+            mLocale = locale;
+            mTsListener = tsListener;
+            mScListener = scListener;
+            mBundle = bundle;
+        }
+    }
+
     // SpellCheckerBindGroup contains active text service session listeners.
     // If there are no listeners anymore, the SpellCheckerBindGroup instance will be removed from
     // mSpellCheckerBindGroups
     private final class SpellCheckerBindGroup {
         private final String TAG = SpellCheckerBindGroup.class.getSimpleName();
         private final InternalServiceConnection mInternalConnection;
-        private final CopyOnWriteArrayList<InternalDeathRecipient> mListeners =
-                new CopyOnWriteArrayList<>();
-        public boolean mBound;
-        public ISpellCheckerService mSpellChecker;
-        public boolean mConnected;
+        private final ArrayList<InternalDeathRecipient> mListeners = new ArrayList<>();
+        private boolean mUnbindCalled;
+        private ISpellCheckerService mSpellChecker;
+        private boolean mConnected;
+        private final ArrayList<SessionRequest> mPendingSessionRequests = new ArrayList<>();
+        private final ArrayList<SessionRequest> mOnGoingSessionRequests = new ArrayList<>();
 
-        public SpellCheckerBindGroup(InternalServiceConnection connection,
-                ITextServicesSessionListener listener, String locale,
-                ISpellCheckerSessionListener scListener, int uid, Bundle bundle) {
+        public SpellCheckerBindGroup(InternalServiceConnection connection) {
             mInternalConnection = connection;
-            mBound = true;
-            mConnected = false;
-            addListener(listener, locale, scListener, uid, bundle);
         }
 
         public void onServiceConnected(ISpellCheckerService spellChecker) {
@@ -858,55 +862,15 @@
                 Slog.d(TAG, "onServiceConnected");
             }
 
-            for (InternalDeathRecipient listener : mListeners) {
-                try {
-                    final ISpellCheckerSession session = spellChecker.getISpellCheckerSession(
-                            listener.mScLocale, listener.mScListener, listener.mBundle);
-                    synchronized(mSpellCheckerMap) {
-                        if (mListeners.contains(listener)) {
-                            listener.mTsListener.onServiceConnected(session);
-                        }
-                    }
-                } catch (RemoteException e) {
-                    Slog.e(TAG, "Exception in getting the spell checker session."
-                            + "Reconnect to the spellchecker. ", e);
-                    removeAll();
-                    return;
-                }
-            }
             synchronized(mSpellCheckerMap) {
                 mSpellChecker = spellChecker;
                 mConnected = true;
+                // Dispatch pending getISpellCheckerSession requests.
+                mPendingSessionRequests.forEach(this::getISpellCheckerSessionLocked);
+                mPendingSessionRequests.clear();
             }
         }
 
-        public InternalDeathRecipient addListener(ITextServicesSessionListener tsListener,
-                String locale, ISpellCheckerSessionListener scListener, int uid, Bundle bundle) {
-            if (DBG) {
-                Slog.d(TAG, "addListener: " + locale);
-            }
-            InternalDeathRecipient recipient = null;
-            synchronized(mSpellCheckerMap) {
-                try {
-                    final int size = mListeners.size();
-                    for (int i = 0; i < size; ++i) {
-                        if (mListeners.get(i).hasSpellCheckerListener(scListener)) {
-                            // do not add the lister if the group already contains this.
-                            return null;
-                        }
-                    }
-                    recipient = new InternalDeathRecipient(
-                            this, tsListener, locale, scListener, uid, bundle);
-                    scListener.asBinder().linkToDeath(recipient, 0);
-                    mListeners.add(recipient);
-                } catch(RemoteException e) {
-                    // do nothing
-                }
-                cleanLocked();
-            }
-            return recipient;
-        }
-
         public void removeListener(ISpellCheckerSessionListener listener) {
             if (DBG) {
                 Slog.w(TAG, "remove listener: " + listener.hashCode());
@@ -941,20 +905,29 @@
             if (DBG) {
                 Slog.d(TAG, "cleanLocked");
             }
-            // If there are no more active listeners, clean up.  Only do this
-            // once.
-            if (mBound && mListeners.isEmpty()) {
-                mBound = false;
-                final String sciId = mInternalConnection.mSciId;
-                SpellCheckerBindGroup cur = mSpellCheckerBindGroups.get(sciId);
-                if (cur == this) {
-                    if (DBG) {
-                        Slog.d(TAG, "Remove bind group.");
-                    }
-                    mSpellCheckerBindGroups.remove(sciId);
-                }
-                mContext.unbindService(mInternalConnection);
+            if (mUnbindCalled) {
+                return;
             }
+            // If there are no more active listeners, clean up.  Only do this once.
+            if (!mListeners.isEmpty()) {
+                return;
+            }
+            if (!mPendingSessionRequests.isEmpty()) {
+                return;
+            }
+            if (!mOnGoingSessionRequests.isEmpty()) {
+                return;
+            }
+            final String sciId = mInternalConnection.mSciId;
+            final SpellCheckerBindGroup cur = mSpellCheckerBindGroups.get(sciId);
+            if (cur == this) {
+                if (DBG) {
+                    Slog.d(TAG, "Remove bind group.");
+                }
+                mSpellCheckerBindGroups.remove(sciId);
+            }
+            mContext.unbindService(mInternalConnection);
+            mUnbindCalled = true;
         }
 
         public void removeAll() {
@@ -966,6 +939,59 @@
                     idr.mScListener.asBinder().unlinkToDeath(idr, 0);
                 }
                 mListeners.clear();
+                mPendingSessionRequests.clear();
+                mOnGoingSessionRequests.clear();
+                cleanLocked();
+            }
+        }
+
+        public void getISpellCheckerSessionOrQueueLocked(@NonNull SessionRequest request) {
+            if (mUnbindCalled) {
+                return;
+            }
+            if (!mConnected) {
+                mPendingSessionRequests.add(request);
+                return;
+            }
+            getISpellCheckerSessionLocked(request);
+        }
+
+        private void getISpellCheckerSessionLocked(@NonNull SessionRequest request) {
+            if (mUnbindCalled) {
+                return;
+            }
+            try {
+                mSpellChecker.getISpellCheckerSession(
+                        request.mLocale, request.mScListener, request.mBundle,
+                        new ISpellCheckerServiceCallbackBinder(this, request));
+                mOnGoingSessionRequests.add(request);
+            } catch(RemoteException e) {
+                // The target spell checker service is not available.  Better to reset the state.
+                removeAll();
+            }
+            cleanLocked();
+        }
+
+        void onSessionCreated(@Nullable final ISpellCheckerSession newSession,
+                @NonNull final SessionRequest request) {
+            synchronized (mSpellCheckerMap) {
+                if (mUnbindCalled) {
+                    return;
+                }
+                if (mOnGoingSessionRequests.remove(request)) {
+                    final InternalDeathRecipient recipient =
+                            new InternalDeathRecipient(this, request.mScListener);
+                    try {
+                        request.mTsListener.onServiceConnected(newSession);
+                        request.mScListener.asBinder().linkToDeath(recipient, 0);
+                        mListeners.add(recipient);
+                    } catch (RemoteException e) {
+                        // Technically this can happen if the spell checker client app is already
+                        // dead.  We can just forget about this request; the request is already
+                        // removed from mOnGoingSessionRequests and the death recipient listener is
+                        // not yet added to mListeners. There is nothing to release further.
+                    }
+                }
                 cleanLocked();
             }
         }
@@ -1008,21 +1034,13 @@
     }
 
     private static final class InternalDeathRecipient implements IBinder.DeathRecipient {
-        public final ITextServicesSessionListener mTsListener;
         public final ISpellCheckerSessionListener mScListener;
-        public final String mScLocale;
         private final SpellCheckerBindGroup mGroup;
-        public final int mUid;
-        public final Bundle mBundle;
+
         public InternalDeathRecipient(SpellCheckerBindGroup group,
-                ITextServicesSessionListener tsListener, String scLocale,
-                ISpellCheckerSessionListener scListener, int uid, Bundle bundle) {
-            mTsListener = tsListener;
+                ISpellCheckerSessionListener scListener) {
             mScListener = scListener;
-            mScLocale = scLocale;
             mGroup = group;
-            mUid = uid;
-            mBundle = bundle;
         }
 
         public boolean hasSpellCheckerListener(ISpellCheckerSessionListener listener) {
@@ -1035,6 +1053,25 @@
         }
     }
 
+    private static final class ISpellCheckerServiceCallbackBinder
+            extends ISpellCheckerServiceCallback.Stub {
+        @NonNull
+        private final SpellCheckerBindGroup mBindGroup;
+        @NonNull
+        private final SessionRequest mRequest;
+
+        ISpellCheckerServiceCallbackBinder(@NonNull final SpellCheckerBindGroup bindGroup,
+                @NonNull final SessionRequest request) {
+            mBindGroup = bindGroup;
+            mRequest = request;
+        }
+
+        @Override
+        public void onSessionCreated(@Nullable ISpellCheckerSession newSession) {
+            mBindGroup.onSessionCreated(newSession, mRequest);
+        }
+    }
+
     private static final class TextServicesSettings {
         private final ContentResolver mResolver;
         @UserIdInt
diff --git a/services/core/java/com/android/server/UiModeManagerService.java b/services/core/java/com/android/server/UiModeManagerService.java
index 6f2f2c4..acacb9e 100644
--- a/services/core/java/com/android/server/UiModeManagerService.java
+++ b/services/core/java/com/android/server/UiModeManagerService.java
@@ -772,7 +772,8 @@
     }
 
     private void registerVrStateListener() {
-        IVrManager vrManager = IVrManager.Stub.asInterface(ServiceManager.getService("vrmanager"));
+        IVrManager vrManager = IVrManager.Stub.asInterface(ServiceManager.getService(
+                Context.VR_SERVICE));
         try {
             if (vrManager != null) {
                 vrManager.registerListener(mVrStateCallbacks);
diff --git a/services/core/java/com/android/server/VibratorService.java b/services/core/java/com/android/server/VibratorService.java
index ab036c7..8888325 100644
--- a/services/core/java/com/android/server/VibratorService.java
+++ b/services/core/java/com/android/server/VibratorService.java
@@ -32,9 +32,12 @@
 import android.os.PowerManagerInternal;
 import android.os.Process;
 import android.os.RemoteException;
+import android.os.ResultReceiver;
 import android.os.IBinder;
 import android.os.Binder;
 import android.os.ServiceManager;
+import android.os.ShellCallback;
+import android.os.ShellCommand;
 import android.os.SystemClock;
 import android.os.UserHandle;
 import android.os.Vibrator;
@@ -784,4 +787,58 @@
             }
         }
     }
+
+    @Override
+    public void onShellCommand(FileDescriptor in, FileDescriptor out, FileDescriptor err,
+            String[] args, ShellCallback callback, ResultReceiver resultReceiver)
+            throws RemoteException {
+        new VibratorShellCommand(this).exec(this, in, out, err, args, callback, resultReceiver);
+    }
+
+    private final class VibratorShellCommand extends ShellCommand {
+
+        private static final long MAX_VIBRATION_MS = 200;
+
+        private final IBinder mToken;
+
+        private VibratorShellCommand(IBinder token) {
+            mToken = token;
+        }
+
+        @Override
+        public int onCommand(String cmd) {
+            if ("vibrate".equals(cmd)) {
+                return runVibrate();
+            }
+            return handleDefaultCommands(cmd);
+        }
+
+        private int runVibrate() {
+            final long duration = Long.parseLong(getNextArgRequired());
+            if (duration > MAX_VIBRATION_MS) {
+                throw new IllegalArgumentException("maximum duration is " + MAX_VIBRATION_MS);
+            }
+            String description = getNextArg();
+            if (description == null) {
+                description = "Shell command";
+            }
+            vibrate(Binder.getCallingUid(), description, duration, AudioAttributes.USAGE_UNKNOWN,
+                    mToken);
+            return 0;
+        }
+
+        @Override
+        public void onHelp() {
+            try (PrintWriter pw = getOutPrintWriter();) {
+                pw.println("Vibrator commands:");
+                pw.println("  help");
+                pw.println("    Prints this help text.");
+                pw.println("");
+                pw.println("  vibrate duration [description]");
+                pw.println("    Vibrates for duration milliseconds.");
+                pw.println("");
+            }
+        }
+    }
+
 }
diff --git a/services/core/java/com/android/server/accounts/AccountManagerService.java b/services/core/java/com/android/server/accounts/AccountManagerService.java
index bfa3f04..be5cbfc 100644
--- a/services/core/java/com/android/server/accounts/AccountManagerService.java
+++ b/services/core/java/com/android/server/accounts/AccountManagerService.java
@@ -287,16 +287,17 @@
                      * and then rebuild the cache. All under the cache lock. But that change is too
                      * large at this point.
                      */
+                    final String removedPackageName = intent.getData().toString();
                     Runnable purgingRunnable = new Runnable() {
                         @Override
                         public void run() {
                             purgeOldGrantsAll();
                             // Notify authenticator about removed app?
+                            removeVisibilityValuesForPackage(removedPackageName);
                         }
                     };
                     mHandler.post(purgingRunnable);
                 }
-
             }
         }, intentFilter);
 
@@ -429,7 +430,7 @@
 
     @Override
     public boolean addAccountExplicitlyWithVisibility(Account account, String password,
-            Bundle extras, Map uidToVisibility) {
+            Bundle extras, Map packageToVisibility) {
         Bundle.setDefusable(extras, true);
 
         final int callingUid = Binder.getCallingUid();
@@ -455,7 +456,7 @@
         try {
             UserAccounts accounts = getUserAccounts(userId);
             return addAccountInternal(accounts, account, password, extras, callingUid,
-                    (Map<Integer, Integer>) uidToVisibility);
+                    (Map<String, Integer>) packageToVisibility);
         } finally {
             restoreCallingIdentity(identityToken);
         }
@@ -505,7 +506,7 @@
                 if (accountsOfType != null) {
                     for (Account account : accountsOfType) {
                         result.put(account,
-                                resolveAccountVisibility(account, uid, packageName, accounts));
+                                resolveAccountVisibility(account, packageName, accounts));
                     }
                 }
             }
@@ -514,7 +515,7 @@
     }
 
     @Override
-    public Map<Integer, Integer> getUidsAndVisibilityForAccount(Account account) {
+    public Map<String, Integer> getPackagesAndVisibilityForAccount(Account account) {
         if (account == null) throw new IllegalArgumentException("account is null");
         int callingUid = Binder.getCallingUid();
         int userId = UserHandle.getUserId(callingUid);
@@ -525,18 +526,18 @@
                     String.format("uid %s cannot get secrets for account %s", callingUid, account);
             throw new SecurityException(msg);
         }
-        return getUidsAndVisibilityForAccount(account, accounts);
+        return getPackagesAndVisibilityForAccount(account, accounts);
     }
 
     /**
-     * Returns all UIDs and visibility values, which were set for given account
+     * Returns all package names and visibility values, which were set for given account.
      *
-     * @param account account
+     * @param account Account to get visibility values.
      * @param accounts UserAccount that currently hosts the account and application
      *
-     * @return Map from uid to visibility.
+     * @return Map from package names to visibility.
      */
-    private Map<Integer, Integer> getUidsAndVisibilityForAccount(Account account,
+    private Map<String, Integer> getPackagesAndVisibilityForAccount(Account account,
             UserAccounts accounts) {
         final StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads();
         try {
@@ -548,7 +549,7 @@
     }
 
     @Override
-    public int getAccountVisibility(Account a, int uid) {
+    public int getAccountVisibility(Account a, String packageName) {
         if (a == null) throw new IllegalArgumentException("account is null");
         int callingUid = Binder.getCallingUid();
         if (!isAccountManagedByCaller(a.type, callingUid, UserHandle.getUserId(callingUid))
@@ -559,23 +560,24 @@
                     a.type);
             throw new SecurityException(msg);
         }
-        return getAccountVisibility(a, uid, getUserAccounts(UserHandle.getUserId(callingUid)));
+        return getAccountVisibility(a, packageName,
+                getUserAccounts(UserHandle.getUserId(callingUid)));
     }
 
     /**
-     * Method gets visibility for given account and UID from the database
+     * Method returns visibility for given account and package name.
      *
-     * @param account The account to check visibility of
-     * @param uid UID to check visibility of
+     * @param account The account to check visibility.
+     * @param packageName Package name to check visibility.
      * @param accounts UserAccount that currently hosts the account and application
      *
      * @return Visibility value, AccountManager.VISIBILITY_UNDEFINED if no value was stored.
      *
      */
-    private int getAccountVisibility(Account account, int uid, UserAccounts accounts) {
+    private int getAccountVisibility(Account account, String packageName, UserAccounts accounts) {
         final StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads();
         try {
-            Integer visibility = accounts.accountsDb.findAccountVisibility(account, uid);
+            Integer visibility = accounts.accountsDb.findAccountVisibility(account, packageName);
             return visibility != null ? visibility : AccountManager.VISIBILITY_UNDEFINED;
         } finally {
             StrictMode.setThreadPolicy(oldPolicy);
@@ -586,19 +588,29 @@
      * Method which handles default values for Account visibility.
      *
      * @param account The account to check visibility.
-     * @param uid UID to check visibility.
-     * @param packageName Package name to check visibility - the method assumes that it has the same
-     *        uid as specified in the parameter.
+     * @param packageName Package name to check visibility
      * @param accounts UserAccount that currently hosts the account and application
      *
      * @return Visibility value, the method never returns AccountManager.VISIBILITY_UNDEFINED
      *
      */
-    private Integer resolveAccountVisibility(Account account, int uid, String packageName,
+    private Integer resolveAccountVisibility(Account account, @NonNull String packageName,
             UserAccounts accounts) {
-        if (packageName == null) {
-            packageName = getPackageNameForUid(uid);
+        Preconditions.checkNotNull(packageName, "packageName cannot be null");
+
+        int uid = -1;
+        try {
+            long identityToken = clearCallingIdentity();
+            try {
+                uid = mPackageManager.getPackageUidAsUser(packageName, accounts.userId);
+            } finally {
+                restoreCallingIdentity(identityToken);
+            }
+        } catch (NameNotFoundException e) {
+            Log.d(TAG, "Package not found " + e.getMessage());
+            return AccountManager.VISIBILITY_NOT_VISIBLE;
         }
+
         // System visibility can not be restricted.
         if (UserHandle.isSameApp(uid, Process.SYSTEM_UID)) {
             return AccountManager.VISIBILITY_VISIBLE;
@@ -612,20 +624,23 @@
             return AccountManager.VISIBILITY_VISIBLE; // Authenticator can always see the account
         }
 
+        if (isSpecialPackageKey(packageName)) {
+            Log.d(TAG, "Package name is forbidden: " + packageName);
+            return AccountManager.VISIBILITY_NOT_VISIBLE;
+        }
+
         // Return stored value if it was set.
-        int visibility = getAccountVisibility(account, uid, accounts);
+        int visibility = getAccountVisibility(account, packageName, accounts);
 
         if (AccountManager.VISIBILITY_UNDEFINED != visibility) {
             return visibility;
         }
 
-        if (isPermittedForPackage(packageName, accounts.userId,
-                Manifest.permission.GET_ACCOUNTS_PRIVILEGED)) {
-            return AccountManager.VISIBILITY_VISIBLE;
+        boolean isPrivileged = isPermittedForPackage(packageName, accounts.userId,
+                Manifest.permission.GET_ACCOUNTS_PRIVILEGED);
 
-        }
-        // Profile owner gets visibility by default.
-        if(isProfileOwner(uid)) {
+        // Device/Profile owner gets visibility by default.
+        if (isProfileOwner(uid)) {
             return AccountManager.VISIBILITY_VISIBLE;
         }
         // Apps with READ_CONTACTS permission get visibility by default even post O.
@@ -634,17 +649,17 @@
         boolean preO = isPreOApplication(packageName);
         if ((signatureCheckResult != SIGNATURE_CHECK_MISMATCH)
                 || (preO && checkGetAccountsPermission(packageName, accounts.userId))
-                || canReadContacts) {
+                || canReadContacts || isPrivileged) {
             // Use legacy for preO apps with GET_ACCOUNTS permission or pre/postO with signature
             // match.
             visibility = getAccountVisibility(account,
-                    AccountManager.UID_KEY_DEFAULT_LEGACY_VISIBILITY, accounts);
+                    AccountManager.PACKAGE_NAME_KEY_LEGACY_VISIBLE, accounts);
             if (AccountManager.VISIBILITY_UNDEFINED == visibility) {
                 visibility = AccountManager.VISIBILITY_USER_MANAGED_VISIBLE;
             }
         } else {
-            visibility = getAccountVisibility(account, AccountManager.UID_KEY_DEFAULT_VISIBILITY,
-                    accounts);
+            visibility = getAccountVisibility(account,
+                    AccountManager.PACKAGE_NAME_KEY_LEGACY_NOT_VISIBLE, accounts);
             if (AccountManager.VISIBILITY_UNDEFINED == visibility) {
                 visibility = AccountManager.VISIBILITY_USER_MANAGED_NOT_VISIBLE;
             }
@@ -655,7 +670,7 @@
     /**
      * Checks targetSdk for a package;
      *
-     * @param packageName Package Name
+     * @param packageName Package name
      *
      * @return True if package's target SDK is below {@link android.os.Build.VERSION_CODES#O}, or
      *         undefined
@@ -682,7 +697,7 @@
     }
 
     @Override
-    public boolean setAccountVisibility(Account a, int uid, int newVisibility) {
+    public boolean setAccountVisibility(Account a, String packageName, int newVisibility) {
         if (a == null) throw new IllegalArgumentException("account is null");
         int callingUid = Binder.getCallingUid();
         if (!isAccountManagedByCaller(a.type, callingUid, UserHandle.getUserId(callingUid))
@@ -693,38 +708,42 @@
                     a.type);
             throw new SecurityException(msg);
         }
-        return setAccountVisibility(a, uid, newVisibility, true /* notify */,
+        return setAccountVisibility(a, packageName, newVisibility, true /* notify */,
                 getUserAccounts(UserHandle.getUserId(callingUid)));
     }
 
     /**
-     * Gives a certain UID, represented a application, access to an account. This method
-     * is called indirectly by the Authenticator.
+     * Updates visibility for given account name and package.
      *
-     * @param account Account to update visibility
-     * @param uid to add visibility of the Account
-     * @param newVisibility new visibility
+     * @param account Account to update visibility.
+     * @param packageName Package name for which visibility is updated.
+     * @param newVisibility New visibility calue
      * @param notify if the flag is set applications will get notification about visibility change
      * @param accounts UserAccount that currently hosts the account and application
      *
      * @return True if account visibility was changed.
      */
-    private boolean setAccountVisibility(Account account, int uid, int newVisibility,
+    private boolean setAccountVisibility(Account account, String packageName, int newVisibility,
             boolean notify, UserAccounts accounts) {
         synchronized (accounts.cacheLock) {
             LinkedHashSet<String> interestedPackages;
             if (notify) {
-                if (uid < 0) {
+                if (isSpecialPackageKey(packageName)) {
                     interestedPackages = getRequestingPackageNames(account.type, accounts);
                 } else {
-                    interestedPackages = new LinkedHashSet<>();
-                    String[] subPackages = mPackageManager.getPackagesForUid(uid);
-                    if (subPackages != null) {
-                        Collections.addAll(interestedPackages, subPackages);
+                    if (!packageExistsForUser(packageName, accounts.userId)) {
+                        return false; // package is not installed.
                     }
+                    interestedPackages = new LinkedHashSet<>();
+                    interestedPackages.add(packageName);
                 }
             } else {
                 // Notifications will not be send.
+                if (!isSpecialPackageKey(packageName) &&
+                        !packageExistsForUser(packageName, accounts.userId)) {
+                    // package is not installed and not meta value.
+                    return false;
+                }
                 interestedPackages = new LinkedHashSet<>();
             }
             Integer[] interestedPackagesVisibility = new Integer[interestedPackages.size()];
@@ -734,14 +753,15 @@
                 return false;
             }
             int index = 0;
-            for (String packageName : interestedPackages) {
+            for (String interestedPackage : interestedPackages) {
                 interestedPackagesVisibility[index++] =
-                        resolveAccountVisibility(account, uid, packageName, accounts);
+                        resolveAccountVisibility(account, interestedPackage, accounts);
             }
 
             final StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskWrites();
             try {
-                if (!accounts.accountsDb.setAccountVisibility(accountId, uid, newVisibility)) {
+                if (!accounts.accountsDb.setAccountVisibility(accountId, packageName,
+                        newVisibility)) {
                     return false;
                 }
             } finally {
@@ -749,10 +769,10 @@
             }
 
             index = 0;
-            for (String packageName : interestedPackages) {
-                int visibility = resolveAccountVisibility(account, uid, packageName, accounts);
+            for (String interestedPackage : interestedPackages) {
+                int visibility = resolveAccountVisibility(account, interestedPackage, accounts);
                 if (visibility != interestedPackagesVisibility[index++]) {
-                        sendNotification(packageName, account, accounts.userId);
+                        sendNotification(interestedPackage, account, accounts.userId);
                 }
             }
             if (notify) {
@@ -777,23 +797,40 @@
         LinkedHashSet<String> interestedPackages = getRequestingPackageNames(account.type,
                 accounts);
         for (String packageName : interestedPackages) {
-            try {
-                final int uid = mPackageManager.getPackageUidAsUser(packageName, accounts.userId);
-                int visibility = resolveAccountVisibility(account, uid, packageName, accounts);
-                if (visibility != AccountManager.VISIBILITY_NOT_VISIBLE) {
-                    sendNotification(packageName, account, accounts.userId);
-                }
-            } catch (NameNotFoundException e) {
-                // ignore
+            int visibility = resolveAccountVisibility(account, packageName, accounts);
+            if (visibility != AccountManager.VISIBILITY_NOT_VISIBLE) {
+                sendNotification(packageName, account, accounts.userId);
             }
         }
     }
 
-    LinkedHashSet<String> getRequestingPackageNames(String accountType, UserAccounts accouns) {
+    LinkedHashSet<String> getRequestingPackageNames(String accountType, UserAccounts accounts) {
         // TODO return packages registered to get notifications.
         return new LinkedHashSet<String>();
     }
 
+    private boolean packageExistsForUser(String packageName, int userId) {
+        try {
+            long identityToken = clearCallingIdentity();
+            try {
+                mPackageManager.getPackageUidAsUser(packageName, userId);
+                return true; // package exist
+            } finally {
+                restoreCallingIdentity(identityToken);
+            }
+        } catch (NameNotFoundException e) {
+            return false;
+        }
+    }
+
+    /**
+     * Returns true if packageName is one of special values.
+     */
+    private boolean isSpecialPackageKey(String packageName) {
+        return (AccountManager.PACKAGE_NAME_KEY_LEGACY_VISIBLE.equals(packageName)
+                || AccountManager.PACKAGE_NAME_KEY_LEGACY_NOT_VISIBLE.equals(packageName));
+    }
+
     private void sendAccountsChangedBroadcast(int userId) {
         Log.i(TAG, "the accounts changed, sending broadcast of "
                 + ACCOUNTS_CHANGED_INTENT.getAction());
@@ -1075,6 +1112,20 @@
         }
     }
 
+    private void removeVisibilityValuesForPackage(String packageName) {
+        synchronized (mUsers) {
+          for (int i = 0; i < mUsers.size(); i++) {
+              UserAccounts accounts = mUsers.valueAt(i);
+              try {
+                  int uid = mPackageManager.getPackageUidAsUser(packageName, accounts.userId);
+              } catch (NameNotFoundException e) {
+                  // package does not exist - remove visibility values
+                  accounts.accountsDb.deleteAccountVisibilityForPackage(packageName);
+              }
+          }
+        }
+    }
+
     private void onUserRemoved(Intent intent) {
         int userId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, -1);
         if (userId < 1) return;
@@ -1472,7 +1523,7 @@
     }
 
     private boolean addAccountInternal(UserAccounts accounts, Account account, String password,
-            Bundle extras, int callingUid, Map<Integer, Integer> uidToVisibility) {
+            Bundle extras, int callingUid, Map<String, Integer> packageToVisibility) {
         Bundle.setDefusable(extras, true);
         if (account == null) {
             return false;
@@ -1513,9 +1564,9 @@
                     }
                 }
 
-                if (uidToVisibility != null) {
-                    for (Entry<Integer, Integer> entry : uidToVisibility.entrySet()) {
-                        setAccountVisibility(account, entry.getKey() /* uid */,
+                if (packageToVisibility != null) {
+                    for (Entry<String, Integer> entry : packageToVisibility.entrySet()) {
+                        setAccountVisibility(account, entry.getKey() /* package */,
                                 entry.getValue() /* visibility */, false /* notify */, accounts);
                     }
                 }
@@ -1569,6 +1620,7 @@
     public void hasFeatures(IAccountManagerResponse response,
             Account account, String[] features, String opPackageName) {
         int callingUid = Binder.getCallingUid();
+        mAppOpsManager.checkPackage(callingUid, opPackageName);
         if (Log.isLoggable(TAG, Log.VERBOSE)) {
             Log.v(TAG, "hasFeatures: " + account
                     + ", response " + response
@@ -1982,14 +2034,7 @@
             int[] visibilityForInterestedPackages = new int[interestedPackages.size()];
             int index = 0;
             for (String packageName : interestedPackages) {
-                int visibility = AccountManager.VISIBILITY_NOT_VISIBLE;
-                try {
-                    final int uid = mPackageManager.getPackageUidAsUser(packageName,
-                            UserHandle.getUserId(callingUid));
-                    visibility = resolveAccountVisibility(account, uid, packageName, accounts);
-                } catch (NameNotFoundException e) {
-                    // ignore
-                }
+                int visibility = resolveAccountVisibility(account, packageName, accounts);
                 visibilityForInterestedPackages[index++] = visibility;
             }
             accounts.accountsDb.beginTransaction();
@@ -3663,7 +3708,7 @@
         // In addition to the permissions required to get an auth token we also allow
         // the account to be accessed by apps for which user or authenticator granted visibility.
 
-        int visibility = resolveAccountVisibility(account, uid, packageName,
+        int visibility = resolveAccountVisibility(account, packageName,
                 getUserAccounts(UserHandle.getUserId(uid)));
         return (visibility == AccountManager.VISIBILITY_VISIBLE
                 || visibility == AccountManager.VISIBILITY_USER_MANAGED_VISIBLE);
@@ -3870,6 +3915,7 @@
     @NonNull
     public Account[] getAccounts(int userId, String opPackageName) {
         int callingUid = Binder.getCallingUid();
+        mAppOpsManager.checkPackage(callingUid, opPackageName);
         List<String> visibleAccountTypes = getTypesVisibleToCaller(callingUid, userId,
                 opPackageName);
         if (visibleAccountTypes.isEmpty()) {
@@ -3890,7 +3936,7 @@
     }
 
     /**
-     * Returns accounts for all running users.
+     * Returns accounts for all running users, ignores visibility values.
      *
      * @hide
      */
@@ -3906,7 +3952,11 @@
         return getAccounts(runningUserIds);
     }
 
-    /** {@hide} */
+    /**
+     * Returns accounts for all users, ignores visibility values.
+     *
+     * @hide
+     */
     @NonNull
     public AccountAndUser[] getAllAccounts() {
         final List<UserInfo> users = getUserManager().getUsers(true);
@@ -3924,10 +3974,12 @@
             UserAccounts userAccounts = getUserAccounts(userId);
             if (userAccounts == null) continue;
             synchronized (userAccounts.cacheLock) {
-                Account[] accounts = getAccountsFromCacheLocked(userAccounts, null,
+                Account[] accounts = getAccountsFromCacheLocked(
+                        userAccounts,
+                        null /* type */,
                         Binder.getCallingUid(),
-                        null,
-                        false /* incl managed not visible*/);
+                        null /* packageName */,
+                        false /* include managed not visible*/);
                 for (int a = 0; a < accounts.length; a++) {
                     runningAccounts.add(new AccountAndUser(accounts[a], userId));
                 }
@@ -3941,9 +3993,10 @@
     @Override
     @NonNull
     public Account[] getAccountsAsUser(String type, int userId, String opPackageName) {
-        // Need calling package
-        return getAccountsAsUser(type, userId, null /* callingPackage */, -1, opPackageName,
-               false /* includeUserManagedNotVisible */);
+        int callingUid = Binder.getCallingUid();
+        mAppOpsManager.checkPackage(callingUid, opPackageName);
+        return getAccountsAsUser(type, userId, opPackageName /* callingPackage */, -1,
+                opPackageName, false /* includeUserManagedNotVisible */);
     }
 
     @NonNull
@@ -4034,9 +4087,10 @@
     }
 
     @Override
-    public void addSharedAccountsFromParentUser(int parentUserId, int userId) {
+    public void addSharedAccountsFromParentUser(int parentUserId, int userId,
+            String opPackageName) {
         checkManageOrCreateUsersPermission("addSharedAccountsFromParentUser");
-        Account[] accounts = getAccountsAsUser(null, parentUserId, mContext.getOpPackageName());
+        Account[] accounts = getAccountsAsUser(null, parentUserId, opPackageName);
         for (Account account : accounts) {
             addSharedAccountAsUser(account, userId);
         }
@@ -4112,6 +4166,7 @@
     public Account[] getAccountsForPackage(String packageName, int uid, String opPackageName) {
         int callingUid = Binder.getCallingUid();
         if (!UserHandle.isSameApp(callingUid, Process.SYSTEM_UID)) {
+            // Don't do opPackageName check - caller is system.
             throw new SecurityException("getAccountsForPackage() called from unauthorized uid "
                     + callingUid + " with uid=" + uid);
         }
@@ -4125,6 +4180,7 @@
             String opPackageName) {
         int callingUid =  Binder.getCallingUid();
         int userId = UserHandle.getCallingUserId();
+        mAppOpsManager.checkPackage(callingUid, opPackageName);
         int packageUid = -1;
         try {
             packageUid = mPackageManager.getPackageUidAsUser(packageName, userId);
@@ -4148,6 +4204,7 @@
             String[] features,
             String opPackageName) {
         int callingUid = Binder.getCallingUid();
+        mAppOpsManager.checkPackage(callingUid, opPackageName);
         if (Log.isLoggable(TAG, Log.VERBOSE)) {
             Log.v(TAG, "getAccounts: accountType " + type
                     + ", response " + response
@@ -4738,7 +4795,7 @@
                 userAccounts.accountsDb.dumpDeAccountsTable(fout);
             } else {
                 Account[] accounts = getAccountsFromCacheLocked(userAccounts, null /* type */,
-                        Process.SYSTEM_UID, null, false);
+                        Process.SYSTEM_UID, null /* packageName */, false);
                 fout.println("Accounts: " + accounts.length);
                 for (Account account : accounts) {
                     fout.println("  " + account);
@@ -4876,21 +4933,20 @@
     }
 
     private boolean isPrivileged(int callingUid) {
-        final int callingUserId = UserHandle.getUserId(callingUid);
-
-        final PackageManager userPackageManager;
+        String[] packages;
+        long identityToken = Binder.clearCallingIdentity();
         try {
-            userPackageManager = mContext.createPackageContextAsUser(
-                    "android", 0, new UserHandle(callingUserId)).getPackageManager();
-        } catch (NameNotFoundException e) {
-            Log.d(TAG, "Package not found " + e.getMessage());
+            packages = mPackageManager.getPackagesForUid(callingUid);
+        } finally {
+            Binder.restoreCallingIdentity(identityToken);
+        }
+        if (packages == null) {
+            Log.d(TAG, "No packages for callingUid " + callingUid);
             return false;
         }
-
-        String[] packages = userPackageManager.getPackagesForUid(callingUid);
         for (String name : packages) {
             try {
-                PackageInfo packageInfo = userPackageManager.getPackageInfo(name, 0 /* flags */);
+                PackageInfo packageInfo = mPackageManager.getPackageInfo(name, 0 /* flags */);
                 if (packageInfo != null
                         && (packageInfo.applicationInfo.privateFlags
                                 & ApplicationInfo.PRIVATE_FLAG_PRIVILEGED) != 0) {
@@ -4954,7 +5010,7 @@
 
     // Method checks visibility for applications targeing API level below {@link
     // android.os.Build.VERSION_CODES#O},
-    // returns true if the the app has GET_ACCOUNTS or GET_ACCOUNTS_PRIVELEGED permission.
+    // returns true if the the app has GET_ACCOUNTS or GET_ACCOUNTS_PRIVILEGED permission.
     private boolean checkGetAccountsPermission(String packageName, int userId) {
         return isPermittedForPackage(packageName, userId, Manifest.permission.GET_ACCOUNTS,
                 Manifest.permission.GET_ACCOUNTS_PRIVILEGED);
@@ -5307,8 +5363,7 @@
         // filter based on visibility.
         Map<Account, Integer> firstPass = new HashMap<>();
         for (Account account : unfiltered) {
-            int visibility =
-                    resolveAccountVisibility(account, callingUid, callingPackage, accounts);
+            int visibility = resolveAccountVisibility(account, callingPackage, accounts);
             if ((visibility == AccountManager.VISIBILITY_VISIBLE
                     || visibility == AccountManager.VISIBILITY_USER_MANAGED_VISIBLE)
                     || (includeManagedNotVisible
@@ -5337,6 +5392,9 @@
         if (user != null && user.isRestricted()) {
             String[] packages =
                     mPackageManager.getPackagesForUid(callingUid);
+            if (packages == null) {
+                packages = new String[] {};
+            }
             // If any of the packages is a visible listed package, return the full set,
             // otherwise return non-shared accounts only.
             // This might be a temporary way to specify a visible list
@@ -5403,6 +5461,9 @@
      */
     protected Account[] getAccountsFromCacheLocked(UserAccounts userAccounts, String accountType,
             int callingUid, String callingPackage, boolean includeManagedNotVisible) {
+        if (callingPackage == null) {
+            callingPackage = getPackageNameForUid(callingUid);
+        }
         if (accountType != null) {
             final Account[] accounts = userAccounts.accountCache.get(accountType);
             if (accounts == null) {
diff --git a/services/core/java/com/android/server/accounts/AccountsDb.java b/services/core/java/com/android/server/accounts/AccountsDb.java
index 85e4b5f..22543cb 100644
--- a/services/core/java/com/android/server/accounts/AccountsDb.java
+++ b/services/core/java/com/android/server/accounts/AccountsDb.java
@@ -54,7 +54,7 @@
     private static final String DATABASE_NAME = "accounts.db";
     private static final int PRE_N_DATABASE_VERSION = 9;
     private static final int CE_DATABASE_VERSION = 10;
-    private static final int DE_DATABASE_VERSION = 2; // Added visibility support in O.
+    private static final int DE_DATABASE_VERSION = 3; // Added visibility support in O
 
 
     static final String TABLE_ACCOUNTS = "accounts";
@@ -75,7 +75,7 @@
 
     private static final String TABLE_VISIBILITY = "visibility";
     private static final String VISIBILITY_ACCOUNTS_ID = "accounts_id";
-    private static final String VISIBILITY_UID = "_uid";
+    private static final String VISIBILITY_PACKAGE = "_package";
     private static final String VISIBILITY_VALUE = "value";
 
     private static final String TABLE_GRANTS = "grants";
@@ -252,7 +252,7 @@
                 createAccountsDeletionTrigger(db);
                 db.execSQL("DROP TABLE IF EXISTS " + TABLE_GRANTS);
                 db.execSQL("DROP TABLE IF EXISTS " + TABLE_DEBUG);
-                oldVersion ++;
+                oldVersion++;
             }
 
             if (oldVersion != newVersion) {
@@ -559,9 +559,9 @@
         private void createAccountsVisibilityTable(SQLiteDatabase db) {
             db.execSQL("CREATE TABLE " + TABLE_VISIBILITY + " ( "
                   + VISIBILITY_ACCOUNTS_ID + " INTEGER NOT NULL, "
-                  + VISIBILITY_UID + " TEXT NOT NULL, "
+                  + VISIBILITY_PACKAGE + " TEXT NOT NULL, "
                   + VISIBILITY_VALUE + " INTEGER, "
-                  + "PRIMARY KEY(" + VISIBILITY_ACCOUNTS_ID + "," + VISIBILITY_UID + "))");
+                  + "PRIMARY KEY(" + VISIBILITY_ACCOUNTS_ID + "," + VISIBILITY_PACKAGE + "))");
         }
 
         static void createDebugTable(SQLiteDatabase db) {
@@ -591,9 +591,18 @@
             Log.i(TAG, "upgrade from version " + oldVersion + " to version " + newVersion);
 
             if (oldVersion == 1) {
-              createAccountsVisibilityTable(db);
-              createAccountsDeletionVisibilityCleanupTrigger(db);
-              ++oldVersion;
+                createAccountsVisibilityTable(db);
+                createAccountsDeletionVisibilityCleanupTrigger(db);
+                oldVersion = 3; // skip version 2 which had uid based table
+            }
+
+            if (oldVersion == 2) {
+                // Remove uid based table and replace it with packageName based
+                db.execSQL("DROP TRIGGER IF EXISTS " + TABLE_ACCOUNTS + "DeleteVisibility");
+                db.execSQL("DROP TABLE IF EXISTS " + TABLE_VISIBILITY);
+                createAccountsVisibilityTable(db);
+                createAccountsDeletionVisibilityCleanupTrigger(db);
+                oldVersion++;
             }
 
             if (oldVersion != newVersion) {
@@ -890,20 +899,20 @@
                 new String[] {Integer.toString(uid)}) > 0;
     }
 
-    boolean setAccountVisibility(long accountId, int uid, int visibility) {
+    boolean setAccountVisibility(long accountId, String packageName, int visibility) {
         SQLiteDatabase db = mDeDatabase.getWritableDatabase();
         ContentValues values = new ContentValues();
         values.put(VISIBILITY_ACCOUNTS_ID, String.valueOf(accountId));
-        values.put(VISIBILITY_UID, String.valueOf(uid));
+        values.put(VISIBILITY_PACKAGE, packageName);
         values.put(VISIBILITY_VALUE, String.valueOf(visibility));
         return (db.replace(TABLE_VISIBILITY, VISIBILITY_VALUE, values) != -1);
     }
 
-    Integer findAccountVisibility(Account account, int uid) {
+    Integer findAccountVisibility(Account account, String packageName) {
         SQLiteDatabase db = mDeDatabase.getWritableDatabase();
         final Cursor cursor = db.query(TABLE_VISIBILITY, new String[] {VISIBILITY_VALUE},
-                SELECTION_ACCOUNTS_ID_BY_ACCOUNT + " AND " + VISIBILITY_UID + "=? ",
-                new String[] {account.name, account.type, String.valueOf(uid)}, null, null, null);
+                SELECTION_ACCOUNTS_ID_BY_ACCOUNT + " AND " + VISIBILITY_PACKAGE + "=? ",
+                new String[] {account.name, account.type, packageName}, null, null, null);
         try {
             while (cursor.moveToNext()) {
                 return cursor.getInt(0);
@@ -914,11 +923,11 @@
         return null;
     }
 
-    Integer findAccountVisibility(long accountId, int uid) {
+    Integer findAccountVisibility(long accountId, String packageName) {
         SQLiteDatabase db = mDeDatabase.getWritableDatabase();
         final Cursor cursor = db.query(TABLE_VISIBILITY, new String[] {VISIBILITY_VALUE},
-                VISIBILITY_ACCOUNTS_ID + "=? AND " + VISIBILITY_UID + "=? ",
-                new String[] {String.valueOf(accountId), String.valueOf(uid)}, null, null, null);
+                VISIBILITY_ACCOUNTS_ID + "=? AND " + VISIBILITY_PACKAGE + "=? ",
+                new String[] {String.valueOf(accountId), packageName}, null, null, null);
         try {
             while (cursor.moveToNext()) {
                 return cursor.getInt(0);
@@ -944,18 +953,18 @@
     }
 
     /**
-     * Returns a map from uid to visibility value.
+     * Returns a map from packageNames to visibility.
      */
-    Map<Integer, Integer> findAllVisibilityValuesForAccount(Account account) {
+    Map<String, Integer> findAllVisibilityValuesForAccount(Account account) {
         SQLiteDatabase db = mDeDatabase.getReadableDatabase();
-        Map<Integer, Integer> result = new HashMap<>();
+        Map<String, Integer> result = new HashMap<>();
         final Cursor cursor =
-                db.query(TABLE_VISIBILITY, new String[] {VISIBILITY_UID, VISIBILITY_VALUE},
-                        SELECTION_ACCOUNTS_ID_BY_ACCOUNT,
-                        new String[] {account.name, account.type}, null, null, null);
+                db.query(TABLE_VISIBILITY, new String[] {VISIBILITY_PACKAGE, VISIBILITY_VALUE},
+                        SELECTION_ACCOUNTS_ID_BY_ACCOUNT, new String[] {account.name, account.type},
+                        null, null, null);
         try {
             while (cursor.moveToNext()) {
-                result.put(cursor.getInt(0), cursor.getInt(1));
+                result.put(cursor.getString(0), cursor.getInt(1));
             }
         } finally {
             cursor.close();
@@ -963,10 +972,10 @@
         return result;
     }
 
-    boolean deleteAccountVisibilityForUid(int uid) {
+    boolean deleteAccountVisibilityForPackage(String packageName) {
         SQLiteDatabase db = mDeDatabase.getWritableDatabase();
-        return db.delete(TABLE_VISIBILITY, VISIBILITY_UID + "=? ",
-                new String[] {Integer.toString(uid)}) > 0;
+        return db.delete(TABLE_VISIBILITY, VISIBILITY_PACKAGE + "=? ",
+                new String[] {packageName}) > 0;
     }
 
     long insertOrReplaceMetaAuthTypeAndUid(String authenticatorType, int uid) {
diff --git a/services/core/java/com/android/server/am/ActiveInstrumentation.java b/services/core/java/com/android/server/am/ActiveInstrumentation.java
new file mode 100644
index 0000000..84e4ea9
--- /dev/null
+++ b/services/core/java/com/android/server/am/ActiveInstrumentation.java
@@ -0,0 +1,122 @@
+/*
+ * 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.server.am;
+
+import android.app.IInstrumentationWatcher;
+import android.app.IUiAutomationConnection;
+import android.content.ComponentName;
+import android.content.pm.ApplicationInfo;
+import android.os.Bundle;
+import android.util.PrintWriterPrinter;
+
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Arrays;
+
+class ActiveInstrumentation {
+    final ActivityManagerService mService;
+
+    // Class installed to instrument app
+    ComponentName mClass;
+
+    // All process names that should be instrumented
+    String[] mTargetProcesses;
+
+    // The application being instrumented
+    ApplicationInfo mTargetInfo;
+
+    // Where to save profiling
+    String mProfileFile;
+
+    // Who is waiting
+    IInstrumentationWatcher mWatcher;
+
+    // Connection to use the UI introspection APIs.
+    IUiAutomationConnection mUiAutomationConnection;
+
+    // As given to us
+    Bundle mArguments;
+
+    // Any intermediate results that have been collected.
+    Bundle mCurResults;
+
+    // Copy of instrumentationClass.
+    ComponentName mResultClass;
+
+    // Contains all running processes that have active instrumentation.
+    final ArrayList<ProcessRecord> mRunningProcesses = new ArrayList<>();
+
+    // Set to true when we have told the watcher the instrumentation is finished.
+    boolean mFinished;
+
+    ActiveInstrumentation(ActivityManagerService service) {
+        mService = service;
+    }
+
+    void removeProcess(ProcessRecord proc) {
+        mFinished = true;
+        mRunningProcesses.remove(proc);
+        if (mRunningProcesses.size() == 0) {
+            mService.mActiveInstrumentation.remove(this);
+        }
+    }
+
+    public String toString() {
+        StringBuilder sb = new StringBuilder(128);
+        sb.append("ActiveInstrumentation{");
+        sb.append(Integer.toHexString(System.identityHashCode(this)));
+        sb.append(' ');
+        sb.append(mClass.toShortString());
+        if (mFinished) {
+            sb.append(" FINISHED");
+        }
+        sb.append(" ");
+        sb.append(mRunningProcesses.size());
+        sb.append(" procs");
+        sb.append('}');
+        return sb.toString();
+    }
+
+    void dump(PrintWriter pw, String prefix) {
+        pw.print(prefix); pw.print("mClass="); pw.print(mClass);
+        pw.print(" mFinished="); pw.println(mFinished);
+        pw.print(prefix); pw.println("mRunningProcesses:");
+        for (int i=0; i<mRunningProcesses.size(); i++) {
+            pw.print(prefix); pw.print("  #"); pw.print(i); pw.print(": ");
+            pw.println(mRunningProcesses.get(i));
+        }
+        pw.print(prefix); pw.print("mTargetProcesses=");
+        pw.println(Arrays.toString(mTargetProcesses));
+        pw.print(prefix); pw.print("mTargetInfo=");
+        pw.println(mTargetInfo);
+        if (mTargetInfo != null) {
+            mTargetInfo.dump(new PrintWriterPrinter(pw), prefix + "  ", 0);
+        }
+        if (mProfileFile != null) {
+            pw.print(prefix); pw.print("mProfileFile="); pw.println(mProfileFile);
+        }
+        if (mWatcher != null) {
+            pw.print(prefix); pw.print("mWatcher="); pw.println(mWatcher);
+        }
+        if (mUiAutomationConnection != null) {
+            pw.print(prefix); pw.print("mUiAutomationConnection=");
+            pw.println(mUiAutomationConnection);
+        }
+        pw.print(prefix); pw.print("mArguments=");
+        pw.println(mArguments);
+    }
+}
diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java
index 5655dc5..cec5800 100644
--- a/services/core/java/com/android/server/am/ActiveServices.java
+++ b/services/core/java/com/android/server/am/ActiveServices.java
@@ -16,6 +16,8 @@
 
 package com.android.server.am;
 
+import static android.content.pm.PackageManager.PERMISSION_GRANTED;
+import static android.Manifest.permission.INTERACT_ACROSS_USERS_FULL;
 import static com.android.server.am.ActivityManagerDebugConfig.*;
 
 import java.io.FileDescriptor;
@@ -460,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;
     }
@@ -701,26 +703,65 @@
         return false;
     }
 
-    public void setServiceForegroundLocked(ComponentName className, IBinder token,
+    public long setServiceForegroundLocked(ComponentName className, IBinder token,
             int id, Notification notification, int flags) {
         final int userId = UserHandle.getCallingUserId();
         final long origId = Binder.clearCallingIdentity();
         try {
             ServiceRecord r = findServiceLocked(className, token, userId);
             if (r != null) {
-                setServiceForegroundInnerLocked(r, id, notification, flags);
+                return setServiceForegroundInnerLocked(r, id, notification, flags);
             }
+            return ActivityThread.INVALID_PROC_STATE_SEQ;
         } finally {
             Binder.restoreCallingIdentity(origId);
         }
     }
 
-    private void setServiceForegroundInnerLocked(ServiceRecord r, int id,
+    /**
+     * @return current process state sequence number {@link UidRecord#curProcStateSeq} corresponding
+     *         to the ServiceRecord {@param r} if the calling service has to block until the
+     *         network rules are udpated, Otherwise {@link ActivityThread#INVALID_PROC_STATE_SEQ}.
+     */
+    private long setServiceForegroundInnerLocked(ServiceRecord r, int id,
             Notification notification, int flags) {
         if (id != 0) {
             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 ActivityThread.INVALID_PROC_STATE_SEQ;
+                    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;
@@ -729,12 +770,18 @@
             r.foregroundNoti = notification;
             r.isForeground = true;
             r.postNotification();
+            long procStateSeqToReturn = ActivityThread.INVALID_PROC_STATE_SEQ;
             if (r.app != null) {
                 updateServiceForegroundLocked(r.app, true);
+                if (r.app.uidRecord != null &&
+                        r.app.uidRecord.blockState == ActivityThread.NETWORK_STATE_BLOCK) {
+                    procStateSeqToReturn = r.app.uidRecord.curProcStateSeq;
+                }
             }
             getServiceMapLocked(r.userId).ensureNotStartingBackgroundLocked(r);
             mAm.notifyPackageUse(r.serviceInfo.packageName,
                                  PackageManager.NOTIFY_PACKAGE_USE_FOREGROUND_SERVICE);
+            return procStateSeqToReturn;
         } else {
             if (r.isForeground) {
                 r.isForeground = false;
@@ -755,6 +802,7 @@
                 }
             }
         }
+        return ActivityThread.INVALID_PROC_STATE_SEQ;
     }
 
     private void cancelForegroudNotificationLocked(ServiceRecord r) {
@@ -1391,8 +1439,7 @@
         }
         if (r != null) {
             if (mAm.checkComponentPermission(r.permission,
-                    callingPid, callingUid, r.appInfo.uid, r.exported)
-                    != PackageManager.PERMISSION_GRANTED) {
+                    callingPid, callingUid, r.appInfo.uid, r.exported) != PERMISSION_GRANTED) {
                 if (!r.exported) {
                     Slog.w(TAG, "Permission Denial: Accessing service " + r.name
                             + " from pid=" + callingPid
@@ -2775,16 +2822,15 @@
         return info;
     }
 
-    List<ActivityManager.RunningServiceInfo> getRunningServiceInfoLocked(int maxNum, int flags) {
+    List<ActivityManager.RunningServiceInfo> getRunningServiceInfoLocked(int maxNum, int flags,
+        int callingUid, boolean allowed) {
         ArrayList<ActivityManager.RunningServiceInfo> res
                 = new ArrayList<ActivityManager.RunningServiceInfo>();
 
-        final int uid = Binder.getCallingUid();
         final long ident = Binder.clearCallingIdentity();
         try {
-            if (ActivityManager.checkUidPermission(
-                    android.Manifest.permission.INTERACT_ACROSS_USERS_FULL,
-                    uid) == PackageManager.PERMISSION_GRANTED) {
+            if (ActivityManager.checkUidPermission(INTERACT_ACROSS_USERS_FULL, callingUid)
+                == PERMISSION_GRANTED) {
                 int[] users = mAm.mUserController.getUsers();
                 for (int ui=0; ui<users.length && res.size() < maxNum; ui++) {
                     ArrayMap<ComponentName, ServiceRecord> alls = getServicesLocked(users[ui]);
@@ -2802,16 +2848,20 @@
                     res.add(info);
                 }
             } else {
-                int userId = UserHandle.getUserId(uid);
+                int userId = UserHandle.getUserId(callingUid);
                 ArrayMap<ComponentName, ServiceRecord> alls = getServicesLocked(userId);
                 for (int i=0; i<alls.size() && res.size() < maxNum; i++) {
                     ServiceRecord sr = alls.valueAt(i);
-                    res.add(makeRunningServiceInfoLocked(sr));
+
+                    if (allowed || (sr.app != null && sr.app.uid == callingUid)) {
+                        res.add(makeRunningServiceInfoLocked(sr));
+                    }
                 }
 
                 for (int i=0; i<mRestartingServices.size() && res.size() < maxNum; i++) {
                     ServiceRecord r = mRestartingServices.get(i);
-                    if (r.userId == userId) {
+                    if (r.userId == userId
+                        && (allowed || (r.app != null && r.app.uid == callingUid))) {
                         ActivityManager.RunningServiceInfo info =
                                 makeRunningServiceInfoLocked(r);
                         info.restarting = r.nextRestartTime;
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/ActivityManagerDebugConfig.java b/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java
index 88e0d03..8ed95ee 100644
--- a/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java
+++ b/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java
@@ -63,6 +63,7 @@
     static final boolean DEBUG_LOCKTASK = DEBUG_ALL || false;
     static final boolean DEBUG_LRU = DEBUG_ALL || false;
     static final boolean DEBUG_MU = DEBUG_ALL || false;
+    static final boolean DEBUG_NETWORK = DEBUG_ALL || false;
     static final boolean DEBUG_OOM_ADJ = DEBUG_ALL || false;
     static final boolean DEBUG_PAUSE = DEBUG_ALL || false;
     static final boolean DEBUG_POWER = DEBUG_ALL || false;
@@ -107,6 +108,7 @@
     static final String POSTFIX_LOCKTASK = (APPEND_CATEGORY_NAME) ? "_LockTask" : "";
     static final String POSTFIX_LRU = (APPEND_CATEGORY_NAME) ? "_LRU" : "";
     static final String POSTFIX_MU = "_MU";
+    static final String POSTFIX_NETWORK = "_Network";
     static final String POSTFIX_OOM_ADJ = (APPEND_CATEGORY_NAME) ? "_OomAdj" : "";
     static final String POSTFIX_PAUSE = (APPEND_CATEGORY_NAME) ? "_Pause" : "";
     static final String POSTFIX_POWER = (APPEND_CATEGORY_NAME) ? "_Power" : "";
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index ee1f28f..35c2462 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -42,6 +42,9 @@
 import static android.content.pm.PackageManager.MATCH_UNINSTALLED_PACKAGES;
 import static android.content.pm.PackageManager.PERMISSION_GRANTED;
 import static android.content.res.Configuration.UI_MODE_TYPE_TELEVISION;
+import static android.net.NetworkPolicyManager.isProcStateAllowedWhileIdleOrPowerSaveMode;
+import static android.net.NetworkPolicyManager.isProcStateAllowedWhileRestrictBackgroundOn;
+import static android.net.NetworkPolicyManager.UidStateWithSeqObserver;
 import static android.os.Build.VERSION_CODES.N;
 import static android.os.Process.PROC_CHAR;
 import static android.os.Process.PROC_OUT_LONG;
@@ -54,6 +57,7 @@
 import static android.provider.Settings.Global.DEVELOPMENT_FORCE_RTL;
 import static android.provider.Settings.Global.WAIT_FOR_DEBUGGER;
 import static android.provider.Settings.System.FONT_SCALE;
+import static android.service.voice.VoiceInteractionSession.SHOW_SOURCE_APPLICATION;
 import static android.view.Display.DEFAULT_DISPLAY;
 import static com.android.internal.util.XmlUtils.readBooleanAttribute;
 import static com.android.internal.util.XmlUtils.readIntAttribute;
@@ -75,6 +79,7 @@
 import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_LOCKTASK;
 import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_LRU;
 import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_MU;
+import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_NETWORK;
 import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_OOM_ADJ;
 import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_PERMISSIONS_REVIEW;
 import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_POWER;
@@ -104,6 +109,7 @@
 import static com.android.server.am.ActivityManagerDebugConfig.POSTFIX_LOCKTASK;
 import static com.android.server.am.ActivityManagerDebugConfig.POSTFIX_LRU;
 import static com.android.server.am.ActivityManagerDebugConfig.POSTFIX_MU;
+import static com.android.server.am.ActivityManagerDebugConfig.POSTFIX_NETWORK;
 import static com.android.server.am.ActivityManagerDebugConfig.POSTFIX_OOM_ADJ;
 import static com.android.server.am.ActivityManagerDebugConfig.POSTFIX_POWER;
 import static com.android.server.am.ActivityManagerDebugConfig.POSTFIX_PROCESSES;
@@ -235,6 +241,7 @@
 import android.graphics.Point;
 import android.graphics.Rect;
 import android.location.LocationManager;
+import android.media.audiofx.AudioEffect;
 import android.metrics.LogMaker;
 import android.net.Proxy;
 import android.net.ProxyInfo;
@@ -283,7 +290,6 @@
 import android.os.storage.StorageManagerInternal;
 import android.provider.Downloads;
 import android.provider.Settings;
-import android.service.autofill.AutoFillService;
 import android.service.voice.IVoiceInteractionSession;
 import android.service.voice.VoiceInteractionManagerInternal;
 import android.service.voice.VoiceInteractionSession;
@@ -353,6 +359,7 @@
 import com.android.server.Watchdog;
 import com.android.server.am.ActivityStack.ActivityState;
 import com.android.server.firewall.IntentFirewall;
+import com.android.server.net.NetworkPolicyManagerService;
 import com.android.server.pm.Installer;
 import com.android.server.pm.Installer.InstallerException;
 import com.android.server.statusbar.StatusBarManagerInternal;
@@ -409,6 +416,7 @@
     private static final String TAG_LOCKTASK = TAG + POSTFIX_LOCKTASK;
     private static final String TAG_LRU = TAG + POSTFIX_LRU;
     private static final String TAG_MU = TAG + POSTFIX_MU;
+    private static final String TAG_NETWORK = TAG + POSTFIX_NETWORK;
     private static final String TAG_OOM_ADJ = TAG + POSTFIX_OOM_ADJ;
     private static final String TAG_POWER = TAG + POSTFIX_POWER;
     private static final String TAG_PROCESS_OBSERVERS = TAG + POSTFIX_PROCESS_OBSERVERS;
@@ -549,17 +557,17 @@
 
     // Intent sent when remote bugreport collection has been completed
     private static final String INTENT_REMOTE_BUGREPORT_FINISHED =
-            "android.intent.action.REMOTE_BUGREPORT_FINISHED";
+            "com.android.internal.intent.action.REMOTE_BUGREPORT_FINISHED";
 
     // Used to indicate that an app transition should be animated.
     static final boolean ANIMATE = true;
 
     // Determines whether to take full screen screenshots
     static final boolean TAKE_FULLSCREEN_SCREENSHOTS = true;
-    public static final float FULLSCREEN_SCREENSHOT_SCALE = 0.6f;
 
     /** All system services */
     SystemServiceManager mSystemServiceManager;
+    AssistUtils mAssistUtils;
 
     private Installer mInstaller;
 
@@ -573,7 +581,9 @@
 
     final InstrumentationReporter mInstrumentationReporter = new InstrumentationReporter();
 
-    public IntentFirewall mIntentFirewall;
+    final ArrayList<ActiveInstrumentation> mActiveInstrumentation = new ArrayList<>();
+
+    public final IntentFirewall mIntentFirewall;
 
     // Whether we should show our dialogs (ANR, crash, etc) or just perform their
     // default action automatically.  Important for devices without direct input
@@ -593,6 +603,8 @@
     BroadcastStats mLastBroadcastStats;
     BroadcastStats mCurBroadcastStats;
 
+    private UidStateWithSeqObserver mUidStateWithSeqObserver;
+
     BroadcastQueue broadcastQueueForIntent(Intent intent) {
         final boolean isFg = (intent.getFlags() & Intent.FLAG_RECEIVER_FOREGROUND) != 0;
         if (DEBUG_BROADCAST_BACKGROUND) Slog.i(TAG_BROADCAST,
@@ -699,18 +711,15 @@
         public AssistStructure structure = null;
         public AssistContent content = null;
         public Bundle receiverExtras;
-        public int resultCode;
 
         public PendingAssistExtras(ActivityRecord _activity, Bundle _extras, Intent _intent,
-                String _hint, IResultReceiver _receiver, Bundle _receiverExtras, int _resultCode,
-                int _userHandle) {
+                String _hint, IResultReceiver _receiver, Bundle _receiverExtras, int _userHandle) {
             activity = _activity;
             extras = _extras;
             intent = _intent;
             hint = _hint;
             receiver = _receiver;
             receiverExtras = _receiverExtras;
-            resultCode = _resultCode;
             userHandle = _userHandle;
         }
         @Override
@@ -1625,10 +1634,6 @@
     int mThumbnailHeight;
     float mFullscreenThumbnailScale;
 
-    /** The aspect ratio bounds of the PIP. */
-    float mMinPipAspectRatio;
-    float mMaxPipAspectRatio;
-
     final ServiceThread mHandlerThread;
     final MainHandler mHandler;
     final UiHandler mUiHandler;
@@ -2333,7 +2338,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: {
@@ -2616,6 +2622,14 @@
         mPermissionReviewRequired = mContext.getResources().getBoolean(
                 com.android.internal.R.bool.config_permissionReviewRequired);
 
+        mHandlerThread = new ServiceThread(TAG,
+                android.os.Process.THREAD_PRIORITY_FOREGROUND, false /*allowIo*/);
+        mHandlerThread.start();
+        mHandler = new MainHandler(mHandlerThread.getLooper());
+        mUiHandler = new UiHandler();
+
+        mConstants = new ActivityManagerConstants(this, mHandler);
+
         if (DEBUG_BACKGROUND_CHECK) {
             Slog.d(TAG, "Enforcing O+ bg restrictions: " + mConstants.ENFORCE_BG_CHECK);
             StringBuilder sb = new StringBuilder(200);
@@ -2627,14 +2641,6 @@
             Slog.d(TAG, sb.toString());
         }
 
-        mHandlerThread = new ServiceThread(TAG,
-                android.os.Process.THREAD_PRIORITY_FOREGROUND, false /*allowIo*/);
-        mHandlerThread.start();
-        mHandler = new MainHandler(mHandlerThread.getLooper());
-        mUiHandler = new UiHandler();
-
-        mConstants = new ActivityManagerConstants(this, mHandler);
-
         /* static; one-time init here */
         if (sKillHandler == null) {
             sKillThread = new ServiceThread(TAG + ":kill",
@@ -3926,7 +3932,7 @@
             aInfo.applicationInfo = getAppInfoForUser(aInfo.applicationInfo, userId);
             ProcessRecord app = getProcessRecordLocked(aInfo.processName,
                     aInfo.applicationInfo.uid, true);
-            if (app == null || app.instrumentationClass == null) {
+            if (app == null || app.instr == null) {
                 intent.setFlags(intent.getFlags() | Intent.FLAG_ACTIVITY_NEW_TASK);
                 mActivityStarter.startHomeActivityLocked(intent, aInfo, reason);
             }
@@ -4215,6 +4221,25 @@
                     "*** Delivering " + N + " uid changes");
         }
 
+        if (mUidStateWithSeqObserver != null) {
+            final int registeredCallbackCount = mUidObservers.getRegisteredCallbackCount();
+            for (int i = 0; i < N; ++i) {
+                final UidRecord.ChangeItem item = mActiveUidChanges[i];
+                if (item.change == UidRecord.CHANGE_PROCSTATE) {
+                    mUidStateWithSeqObserver.onUidStateChangedWithSeq(
+                            item.uid, item.processState, item.procStateSeq);
+                    if (VALIDATE_UID_STATES && registeredCallbackCount == 0) {
+                        UidRecord validateUid = mValidateUids.get(item.uid);
+                        if (validateUid == null) {
+                            validateUid = new UidRecord(item.uid);
+                            mValidateUids.put(item.uid, validateUid);
+                        }
+                        validateUid.curProcState = validateUid.setProcState = item.processState;
+                    }
+                }
+            }
+        }
+
         int i = mUidObservers.beginBroadcast();
         while (i > 0) {
             i--;
@@ -4231,7 +4256,7 @@
                             validateUid = mValidateUids.get(item.uid);
                             if (validateUid == null && change != UidRecord.CHANGE_GONE
                                     && change != UidRecord.CHANGE_GONE_IDLE) {
-                                validateUid = new UidRecord(item.uid, false);
+                                validateUid = new UidRecord(item.uid);
                                 mValidateUids.put(item.uid, validateUid);
                             }
                         }
@@ -4522,6 +4547,25 @@
     }
 
     @Override
+    public int startAssistantActivity(String callingPackage, int callingPid, int callingUid,
+            Intent intent, String resolvedType, Bundle bOptions, int userId) {
+        if (checkCallingPermission(Manifest.permission.BIND_VOICE_INTERACTION)
+                != PackageManager.PERMISSION_GRANTED) {
+            final String msg = "Permission Denial: startAssistantActivity() from pid="
+                    + Binder.getCallingPid()
+                    + ", uid=" + Binder.getCallingUid()
+                    + " requires " + Manifest.permission.BIND_VOICE_INTERACTION;
+            Slog.w(TAG, msg);
+            throw new SecurityException(msg);
+        }
+        userId = mUserController.handleIncomingUser(callingPid, callingUid, userId, false,
+                ALLOW_FULL_ONLY, "startAssistantActivity", null);
+        return mActivityStarter.startActivityMayWait(null, callingUid, callingPackage, intent,
+                resolvedType, null, null, null, null, 0, 0, null, null, null, bOptions, false,
+                userId, null, null);
+    }
+
+    @Override
     public void startLocalVoiceInteraction(IBinder callingActivity, Bundle options)
             throws RemoteException {
         Slog.i(TAG, "Activity tried to startVoiceInteraction");
@@ -5092,9 +5136,9 @@
 
         app.activities.clear();
 
-        if (app.instrumentationClass != null) {
+        if (app.instr != null) {
             Slog.w(TAG, "Crash of app " + app.processName
-                  + " running instrumentation " + app.instrumentationClass);
+                  + " running instrumentation " + app.instr.mClass);
             Bundle info = new Bundle();
             info.putString("shortMsg", "Process crashed.");
             finishInstrumentationLocked(app, Activity.RESULT_CANCELED, info);
@@ -5227,7 +5271,7 @@
         // Clean up already done if the process has been re-started.
         if (app.pid == pid && app.thread != null &&
                 app.thread.asBinder() == thread.asBinder()) {
-            boolean doLowMem = app.instrumentationClass == null;
+            boolean doLowMem = app.instr == null;
             boolean doOomAdj = doLowMem;
             if (!app.killedByAm) {
                 Slog.i(TAG, "Process " + app.processName + " (pid " + pid
@@ -5331,7 +5375,8 @@
                     for (int pid : pids) {
                         if (DEBUG_ANR) Slog.d(TAG, "Collecting stacks for native pid " + pid);
                         final long sime = SystemClock.elapsedRealtime();
-                        Debug.dumpNativeBacktraceToFile(pid, tracesPath);
+
+                        Debug.dumpNativeBacktraceToFileTimeout(pid, tracesPath, 10);
                         if (DEBUG_ANR) Slog.d(TAG, "Done with native pid " + pid
                                 + " in " + (SystemClock.elapsedRealtime()-sime) + "ms");
                     }
@@ -5568,7 +5613,7 @@
 
                 // Reset notification settings.
                 INotificationManager inm = NotificationManager.getService();
-                inm.clearData(packageName, pkgUidF);
+                inm.clearData(packageName, pkgUidF, uid == pkgUidF);
             } catch (RemoteException e) {
             }
         } finally {
@@ -6319,7 +6364,7 @@
         }
         UidRecord uidRec = mActiveUids.get(proc.uid);
         if (uidRec == null) {
-            uidRec = new UidRecord(proc.uid, proc.persistent);
+            uidRec = new UidRecord(proc.uid);
             // This is the first appearance of the uid, report it now!
             if (DEBUG_UID_OBSERVERS) Slog.i(TAG_UID_OBSERVERS,
                     "Creating new process uid: " + uidRec);
@@ -6383,7 +6428,7 @@
             handleAppDiedLocked(app, willRestart, allowRestart);
             if (willRestart) {
                 removeLruProcessLocked(app);
-                addAppLocked(app.info, false, null /* ABI override */);
+                addAppLocked(app.info, null, false, null /* ABI override */);
             }
         } else {
             mRemovedProcesses.add(app);
@@ -6559,7 +6604,7 @@
                     mWaitForDebugger = mOrigWaitForDebugger;
                 }
             }
-            String profileFile = app.instrumentationProfileFile;
+            String profileFile = app.instr != null ? app.instr.mProfileFile : null;
             ParcelFileDescriptor profileFd = null;
             int samplingInterval = 0;
             boolean profileAutoStop = false;
@@ -6587,14 +6632,13 @@
                                 || (mBackupTarget.backupMode == BackupRecord.BACKUP_FULL));
             }
 
-            if (app.instrumentationClass != null) {
-                notifyPackageUse(app.instrumentationClass.getPackageName(),
+            if (app.instr != null) {
+                notifyPackageUse(app.instr.mClass.getPackageName(),
                                  PackageManager.NOTIFY_PACKAGE_USE_INSTRUMENTATION);
             }
             if (DEBUG_CONFIGURATION) Slog.v(TAG_CONFIGURATION, "Binding proc "
                     + processName + " with config " + getGlobalConfiguration());
-            ApplicationInfo appInfo = app.instrumentationInfo != null
-                    ? app.instrumentationInfo : app.info;
+            ApplicationInfo appInfo = app.instr != null ? app.instr.mTargetInfo : app.info;
             app.compat = compatibilityInfoForPackageLocked(appInfo);
             if (profileFd != null) {
                 profileFd = profileFd.dup();
@@ -6614,16 +6658,57 @@
                         .getSerial();
 //            }
 
+            // Check if this is a secondary process that should be incorporated into some
+            // currently active instrumentation.  (Note we do this AFTER all of the profiling
+            // stuff above because profiling can currently happen only in the primary
+            // instrumentation process.)
+            if (mActiveInstrumentation.size() > 0 && app.instr == null) {
+                for (int i = mActiveInstrumentation.size() - 1; i >= 0 && app.instr == null; i--) {
+                    ActiveInstrumentation aInstr = mActiveInstrumentation.get(i);
+                    if (!aInstr.mFinished && aInstr.mTargetInfo.uid == app.uid) {
+                        if (aInstr.mTargetProcesses.length == 0) {
+                            // This is the wildcard mode, where every process brought up for
+                            // the target instrumentation should be included.
+                            if (aInstr.mTargetInfo.packageName.equals(app.info.packageName)) {
+                                app.instr = aInstr;
+                                aInstr.mRunningProcesses.add(app);
+                            }
+                        } else {
+                            for (String proc : aInstr.mTargetProcesses) {
+                                if (proc.equals(app.processName)) {
+                                    app.instr = aInstr;
+                                    aInstr.mRunningProcesses.add(app);
+                                    break;
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+
             checkTime(startTime, "attachApplicationLocked: immediately before bindApplication");
-            thread.bindApplication(processName, appInfo, providers, app.instrumentationClass,
-                    profilerInfo, app.instrumentationArguments, app.instrumentationWatcher,
-                    app.instrumentationUiAutomationConnection, testMode,
-                    mBinderTransactionTrackingEnabled, enableTrackAllocation,
-                    isRestrictedBackupMode || !normalMode, app.persistent,
-                    new Configuration(getGlobalConfiguration()), app.compat,
-                    getCommonServicesLocked(app.isolated),
-                    mCoreSettingsObserver.getCoreSettingsLocked(),
-                    buildSerial);
+            if (app.instr != null) {
+                thread.bindApplication(processName, appInfo, providers,
+                        app.instr.mClass,
+                        profilerInfo, app.instr.mArguments,
+                        app.instr.mWatcher,
+                        app.instr.mUiAutomationConnection, testMode,
+                        mBinderTransactionTrackingEnabled, enableTrackAllocation,
+                        isRestrictedBackupMode || !normalMode, app.persistent,
+                        new Configuration(getGlobalConfiguration()), app.compat,
+                        getCommonServicesLocked(app.isolated),
+                        mCoreSettingsObserver.getCoreSettingsLocked(),
+                        buildSerial);
+            } else {
+                thread.bindApplication(processName, appInfo, providers, null, profilerInfo,
+                        null, null, null, testMode,
+                        mBinderTransactionTrackingEnabled, enableTrackAllocation,
+                        isRestrictedBackupMode || !normalMode, app.persistent,
+                        new Configuration(getGlobalConfiguration()), app.compat,
+                        getCommonServicesLocked(app.isolated),
+                        mCoreSettingsObserver.getCoreSettingsLocked(),
+                        buildSerial);
+            }
 
             checkTime(startTime, "attachApplicationLocked: immediately after bindApplication");
             updateLruProcessLocked(app, false, null);
@@ -7623,12 +7708,13 @@
                     r.pictureInPictureArgs.copyOnlySet(args);
                     final float aspectRatio = r.pictureInPictureArgs.getAspectRatio();
                     final List<RemoteAction> actions = r.pictureInPictureArgs.getActions();
-                    final Rect bounds = isValidPictureInPictureAspectRatio(aspectRatio)
-                            ? mWindowManager.getPictureInPictureBounds(DEFAULT_DISPLAY, aspectRatio)
-                            : mWindowManager.getPictureInPictureDefaultBounds(DEFAULT_DISPLAY);
+                    final Rect bounds = mWindowManager.getPictureInPictureBounds(DEFAULT_DISPLAY,
+                            aspectRatio);
                     mStackSupervisor.moveActivityToPinnedStackLocked(r, "enterPictureInPictureMode",
                             bounds, true /* moveHomeStackToFront */);
-                    mStackSupervisor.getStack(PINNED_STACK_ID).setPictureInPictureActions(actions);
+                    final ActivityStack stack = mStackSupervisor.getStack(PINNED_STACK_ID);
+                    stack.setPictureInPictureAspectRatio(aspectRatio);
+                    stack.setPictureInPictureActions(actions);
 
                     MetricsLogger.action(mContext, MetricsEvent.ACTION_PICTURE_IN_PICTURE_ENTERED,
                             r.supportsPictureInPictureWhilePausing);
@@ -7705,10 +7791,6 @@
         }
     }
 
-    private boolean isValidPictureInPictureAspectRatio(float aspectRatio) {
-        return mMinPipAspectRatio <= aspectRatio && aspectRatio <= mMaxPipAspectRatio;
-    }
-
     /**
      * Checks the state of the system and the activity associated with the given {@param token} to
      * verify that picture-in-picture is supported for that activity.
@@ -7733,16 +7815,21 @@
                     + ": Current activity does not support picture-in-picture.");
         }
 
-        if (r.getStack().isHomeStack()) {
+        if (!StackId.isAllowedToEnterPictureInPicture(r.getStack().getStackId())) {
             throw new IllegalStateException(caller
-                    + ": Activities on the home stack not supported");
+                    + ": Activities on the home, assistant, or recents stack not supported");
         }
 
         if (args.hasSetAspectRatio()
-                && !isValidPictureInPictureAspectRatio(args.getAspectRatio())) {
+                && !mWindowManager.isValidPictureInPictureAspectRatio(r.getStack().mDisplayId,
+                        args.getAspectRatio())) {
+            final float minAspectRatio = mContext.getResources().getFloat(
+                    com.android.internal.R.dimen.config_pictureInPictureMinAspectRatio);
+            final float maxAspectRatio = mContext.getResources().getFloat(
+                    com.android.internal.R.dimen.config_pictureInPictureMaxAspectRatio);
             throw new IllegalArgumentException(String.format(caller
                     + ": Aspect ratio is too extreme (must be between %f and %f).",
-                            mMinPipAspectRatio, mMaxPipAspectRatio));
+                            minAspectRatio, maxAspectRatio));
         }
 
         if (args.hasSetActions()
@@ -8076,9 +8163,8 @@
     // some other background operations are not.  If we're doing a check
     // of service-launch policy, allow those callers to proceed unrestricted.
     int appServicesRestrictedInBackgroundLocked(int uid, String packageName, int packageTargetSdk) {
-        // Persistent app?  NB: expects that persistent uids are always active.
-        final UidRecord uidRec = mActiveUids.get(uid);
-        if (uidRec != null && uidRec.persistent) {
+        // Persistent app?
+        if (mPackageManagerInt.isPackagePersistent(packageName)) {
             if (DEBUG_BACKGROUND_CHECK) {
                 Slog.i(TAG, "App " + uid + "/" + packageName
                         + " is persistent; not restricted in background");
@@ -8402,12 +8488,7 @@
 
         // Third...  does the caller itself have permission to access
         // this uri?
-        final int callingAppId = UserHandle.getAppId(callingUid);
-        if ((callingAppId == Process.SYSTEM_UID) || (callingAppId == Process.ROOT_UID)) {
-            Slog.w(TAG, "For security reasons, the system cannot issue a Uri permission"
-                    + " grant to " + grantUri + "; use startActivityAsCaller() instead");
-            return -1;
-        } else {
+        if (UserHandle.getAppId(callingUid) != Process.SYSTEM_UID) {
             if (!checkHoldingPermissionsLocked(pm, pi, grantUri, callingUid, modeFlags)) {
                 // Require they hold a strong enough Uri permission
                 if (!checkUriPermissionLocked(grantUri, callingUid, modeFlags)) {
@@ -9543,6 +9624,20 @@
     }
 
     @Override
+    public ActivityManager.TaskDescription getTaskDescription(int id) {
+        synchronized (this) {
+            enforceCallingPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS,
+                    "getTaskDescription()");
+            final TaskRecord tr = mStackSupervisor.anyTaskForIdLocked(
+                    id, !RESTORE_FROM_RECENTS, INVALID_STACK_ID);
+            if (tr != null) {
+                return tr.lastTaskDescription;
+            }
+        }
+        return null;
+    }
+
+    @Override
     public int addAppTask(IBinder activityToken, Intent intent,
             ActivityManager.TaskDescription description, Bitmap thumbnail) throws RemoteException {
         final int callingUid = Binder.getCallingUid();
@@ -9878,7 +9973,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);
             }
@@ -9932,8 +10027,8 @@
                 return;
             }
             final ActivityRecord prev = mStackSupervisor.topRunningActivityLocked();
-            if (prev != null && prev.isRecentsActivity()) {
-                task.setTaskToReturnTo(ActivityRecord.RECENTS_ACTIVITY_TYPE);
+            if (prev != null) {
+                task.setTaskToReturnTo(prev);
             }
             mStackSupervisor.findTaskToMoveToFrontLocked(task, flags, options, "moveTaskToFront",
                     false /* forceNonResizable */);
@@ -11595,7 +11690,7 @@
                         .getPersistentApplications(STOCK_PM_FLAGS | matchFlags).getList();
                 for (ApplicationInfo app : apps) {
                     if (!"android".equals(app.packageName)) {
-                        addAppLocked(app, false, null /* ABI override */);
+                        addAppLocked(app, null, false, null /* ABI override */);
                     }
                 }
             } catch (RemoteException ex) {
@@ -11783,17 +11878,18 @@
         return false;
     }
 
-    final ProcessRecord addAppLocked(ApplicationInfo info, boolean isolated,
+    final ProcessRecord addAppLocked(ApplicationInfo info, String customProcess, boolean isolated,
             String abiOverride) {
         ProcessRecord app;
         if (!isolated) {
-            app = getProcessRecordLocked(info.processName, info.uid, true);
+            app = getProcessRecordLocked(customProcess != null ? customProcess : info.processName,
+                    info.uid, true);
         } else {
             app = null;
         }
 
         if (app == null) {
-            app = newProcessRecordLocked(info, null, isolated, 0);
+            app = newProcessRecordLocked(info, customProcess, isolated, 0);
             updateLruProcessLocked(app, false, null);
             updateOomAdjLocked();
         }
@@ -11814,7 +11910,8 @@
         }
         if (app.thread == null && mPersistentStartingProcesses.indexOf(app) < 0) {
             mPersistentStartingProcesses.add(app);
-            startProcessLocked(app, "added application", app.processName, abiOverride,
+            startProcessLocked(app, "added application",
+                    customProcess != null ? customProcess : app.processName, abiOverride,
                     null /* entryPoint */, null /* entryPointArgs */);
         }
 
@@ -12269,11 +12366,11 @@
         synchronized (this) {
             synchronized (mPidsSelfLocked) {
                 final int callingPid = Binder.getCallingPid();
-                ProcessRecord precessRecord = mPidsSelfLocked.get(callingPid);
-                if (precessRecord == null) {
+                ProcessRecord proc = mPidsSelfLocked.get(callingPid);
+                if (proc == null) {
                     throw new SecurityException("Unknown process: " + callingPid);
                 }
-                if (precessRecord.instrumentationUiAutomationConnection  == null) {
+                if (proc.instr == null || proc.instr.mUiAutomationConnection == null) {
                     throw new SecurityException("Only an instrumentation process "
                             + "with a UiAutomation can call setUserIsMonkey");
                 }
@@ -12330,7 +12427,7 @@
     }
 
     public static long getInputDispatchingTimeoutLocked(ProcessRecord r) {
-        if (r != null && (r.instrumentationClass != null || r.usingWrapper)) {
+        if (r != null && (r.instr != null || r.usingWrapper)) {
             return INSTRUMENTATION_KEY_DISPATCHING_TIMEOUT;
         }
         return KEY_DISPATCHING_TIMEOUT;
@@ -12391,7 +12488,7 @@
                     return false;
                 }
 
-                if (proc.instrumentationClass != null) {
+                if (proc.instr != null) {
                     Bundle info = new Bundle();
                     info.putString("shortMsg", "keyDispatchingTimedOut");
                     info.putString("longMsg", annotation);
@@ -12413,7 +12510,7 @@
     @Override
     public Bundle getAssistContextExtras(int requestType) {
         PendingAssistExtras pae = enqueueAssistContext(requestType, null, null, null,
-                null, 0, null, true /* focused */, true /* newSessionId */,
+                null, null, true /* focused */, true /* newSessionId */,
                 UserHandle.getCallingUserId(), null, PENDING_ASSIST_EXTRAS_TIMEOUT);
         if (pae == null) {
             return null;
@@ -12438,8 +12535,12 @@
     public boolean isAssistDataAllowedOnCurrentActivity() {
         int userId;
         synchronized (this) {
-            userId = mUserController.getCurrentUserIdLocked();
-            ActivityRecord activity = getFocusedStack().topActivity();
+            final ActivityStack focusedStack = getFocusedStack();
+            if (focusedStack == null || focusedStack.isAssistantStack()) {
+                return false;
+            }
+
+            final ActivityRecord activity = focusedStack.topActivity();
             if (activity == null) {
                 return false;
             }
@@ -12468,9 +12569,8 @@
                     return false;
                 }
             }
-            AssistUtils utils = new AssistUtils(mContext);
-            return utils.showSessionForActiveService(args,
-                    VoiceInteractionSession.SHOW_SOURCE_APPLICATION, null, token);
+            return mAssistUtils.showSessionForActiveService(args, SHOW_SOURCE_APPLICATION, null,
+                    token);
         } finally {
             Binder.restoreCallingIdentity(ident);
         }
@@ -12480,29 +12580,29 @@
     public boolean requestAssistContextExtras(int requestType, IResultReceiver receiver,
             Bundle receiverExtras, IBinder activityToken, boolean focused, boolean newSessionId) {
         return enqueueAssistContext(requestType, null, null, receiver, receiverExtras,
-                0, activityToken, focused, newSessionId, UserHandle.getCallingUserId(), null,
+                activityToken, focused, newSessionId, UserHandle.getCallingUserId(), null,
                 PENDING_ASSIST_EXTRAS_LONG_TIMEOUT) != null;
     }
 
     @Override
     public boolean requestAutoFillData(IResultReceiver receiver, Bundle receiverExtras,
-            int resultCode, IBinder activityToken) {
+            IBinder activityToken) {
         // NOTE: we could always use ActivityManager.ASSIST_CONTEXT_FULL and let ActivityThread
         // rely on the flags to decide whether the handleRequestAssistContextExtras() is for
         // auto-fill, but it's safer to explicitly use new AutoFill types, in case the Assist
         // requests use flags in the future as well (since their flags value might collide with the
         // auto-fill flag values).
         return enqueueAssistContext(ActivityManager.ASSIST_CONTEXT_AUTO_FILL, null, null,
-                receiver, receiverExtras, resultCode, activityToken, true, true,
-                UserHandle.getCallingUserId(), null,
-                PENDING_AUTO_FILL_ASSIST_STRUCTURE_TIMEOUT) != null;
+                receiver, receiverExtras, activityToken, true, true, UserHandle.getCallingUserId(),
+                null, PENDING_AUTO_FILL_ASSIST_STRUCTURE_TIMEOUT) != null;
     }
 
     private PendingAssistExtras enqueueAssistContext(int requestType, Intent intent, String hint,
-            IResultReceiver receiver, Bundle receiverExtras, int resultCode, IBinder activityToken,
+            IResultReceiver receiver, Bundle receiverExtras, IBinder activityToken,
             boolean focused, boolean newSessionId, int userHandle, Bundle args, long timeout) {
         enforceCallingPermission(android.Manifest.permission.GET_TOP_ACTIVITY_INFO,
                 "enqueueAssistContext()");
+
         synchronized (this) {
             ActivityRecord activity = getFocusedStack().topActivity();
             if (activity == null) {
@@ -12538,8 +12638,10 @@
             }
             extras.putString(Intent.EXTRA_ASSIST_PACKAGE, activity.packageName);
             extras.putInt(Intent.EXTRA_ASSIST_UID, activity.app.uid);
+
             pae = new PendingAssistExtras(activity, extras, intent, hint, receiver, receiverExtras,
-                    resultCode, userHandle);
+                    userHandle);
+
             // Increment the sessionId if necessary
             if (newSessionId) {
                 mViSessionId++;
@@ -12622,15 +12724,11 @@
                 sendBundle.putParcelable(VoiceInteractionSession.KEY_CONTENT, pae.content);
                 sendBundle.putBundle(VoiceInteractionSession.KEY_RECEIVER_EXTRAS,
                         pae.receiverExtras);
-                IBinder cb = extras.getBinder(AutoFillService.KEY_CALLBACK);
-                if (cb != null) {
-                    sendBundle.putBinder(AutoFillService.KEY_CALLBACK, cb);
-                }
             }
         }
         if (sendReceiver != null) {
             try {
-                sendReceiver.send(pae.resultCode, sendBundle);
+                sendReceiver.send(0, sendBundle);
             } catch (RemoteException e) {
             }
             return;
@@ -12655,7 +12753,7 @@
 
     public boolean launchAssistIntent(Intent intent, int requestType, String hint, int userHandle,
             Bundle args) {
-        return enqueueAssistContext(requestType, intent, hint, null, null, 0, null,
+        return enqueueAssistContext(requestType, intent, hint, null, null, null,
                 true /* focused */, true /* newSessionId */, userHandle, args,
                 PENDING_ASSIST_EXTRAS_TIMEOUT) != null;
     }
@@ -13425,10 +13523,6 @@
                     com.android.internal.R.dimen.thumbnail_width);
             mThumbnailHeight = res.getDimensionPixelSize(
                     com.android.internal.R.dimen.thumbnail_height);
-            mMinPipAspectRatio = res.getFloat(
-                    com.android.internal.R.dimen.config_pictureInPictureMinAspectRatio);
-            mMaxPipAspectRatio = res.getFloat(
-                    com.android.internal.R.dimen.config_pictureInPictureMaxAspectRatio);
             mAppErrors.loadAppsNotReportingCrashesFromConfigLocked(res.getString(
                     com.android.internal.R.string.config_appsNotReportingCrashes));
             mUserController.mUserSwitchUiEnabled = !res.getBoolean(
@@ -13458,6 +13552,7 @@
 
             mLocalDeviceIdleController
                     = LocalServices.getService(DeviceIdleController.LocalService.class);
+            mAssistUtils = new AssistUtils(mContext);
 
             // Make sure we have the current profile info, since it is needed for security checks.
             mUserController.onSystemReady();
@@ -14901,8 +14996,31 @@
                     printed = true;
                     needSep = true;
                 }
-                pw.println(String.format("%sIsolated #%2d: %s",
-                        "    ", i, r.toString()));
+                pw.print("    Isolated #"); pw.print(i); pw.print(": ");
+                pw.println(r);
+            }
+        }
+
+        if (mActiveInstrumentation.size() > 0) {
+            boolean printed = false;
+            for (int i=0; i<mActiveInstrumentation.size(); i++) {
+                ActiveInstrumentation ai = mActiveInstrumentation.get(i);
+                if (dumpPackage != null && !ai.mClass.getPackageName().equals(dumpPackage)
+                        && !ai.mTargetInfo.packageName.equals(dumpPackage)) {
+                    continue;
+                }
+                if (!printed) {
+                    if (needSep) {
+                        pw.println();
+                    }
+                    pw.println("  Active instrumentation:");
+                    printedAnything = true;
+                    printed = true;
+                    needSep = true;
+                }
+                pw.print("    Instrumentation #"); pw.print(i); pw.print(": ");
+                pw.println(ai);
+                ai.dump(pw, "      ");
             }
         }
 
@@ -17400,7 +17518,11 @@
             int flags) {
         enforceNotIsolatedCaller("getServices");
         synchronized (this) {
-            return mServices.getRunningServiceInfoLocked(maxNum, flags);
+            final int callingUid = Binder.getCallingUid();
+            final boolean allowed = isGetTasksAllowed("getServices", Binder.getCallingPid(),
+                callingUid);
+
+            return mServices.getRunningServiceInfoLocked(maxNum, flags, callingUid, allowed);
         }
     }
 
@@ -17494,11 +17616,16 @@
         }
     }
 
+    /**
+     * Returns sequence number associated with the current process state change if the service
+     * coming to the foreground needs to block for network before proceeding, otherwise
+     * {@link ActivityThread#INVALID_PROC_STATE_SEQ}.
+     */
     @Override
-    public void setServiceForeground(ComponentName className, IBinder token,
+    public long setServiceForeground(ComponentName className, IBinder token,
             int id, Notification notification, int flags) {
         synchronized(this) {
-            mServices.setServiceForegroundLocked(className, token, id, notification, flags);
+            return mServices.setServiceForegroundLocked(className, token, id, notification, flags);
         }
     }
 
@@ -18131,7 +18258,9 @@
                 || AppWidgetManager.ACTION_APPWIDGET_UPDATE.equals(action)
                 || LocationManager.HIGH_POWER_REQUEST_CHANGE_ACTION.equals(action)
                 || TelephonyIntents.ACTION_REQUEST_OMADM_CONFIGURATION_UPDATE.equals(action)
-                || SuggestionSpan.ACTION_SUGGESTION_PICKED.equals(action)) {
+                || SuggestionSpan.ACTION_SUGGESTION_PICKED.equals(action)
+                || AudioEffect.ACTION_OPEN_AUDIO_EFFECT_CONTROL_SESSION.equals(action)
+                || AudioEffect.ACTION_CLOSE_AUDIO_EFFECT_CONTROL_SESSION.equals(action)) {
             // Broadcast is either protected, or it's a public action that
             // we've relaxed, so it's fine for system internals to send.
             return;
@@ -19046,18 +19175,35 @@
                 throw new SecurityException(msg);
             }
 
+            ActiveInstrumentation activeInstr = new ActiveInstrumentation(this);
+            activeInstr.mClass = className;
+            String defProcess = ai.processName;;
+            if (ii.targetProcess == null) {
+                activeInstr.mTargetProcesses = new String[]{ai.processName};
+            } else if (ii.targetProcess.equals("*")) {
+                activeInstr.mTargetProcesses = new String[0];
+            } else {
+                activeInstr.mTargetProcesses = ii.targetProcess.split(",");
+                defProcess = activeInstr.mTargetProcesses[0];
+            }
+            activeInstr.mTargetInfo = ai;
+            activeInstr.mProfileFile = profileFile;
+            activeInstr.mArguments = arguments;
+            activeInstr.mWatcher = watcher;
+            activeInstr.mUiAutomationConnection = uiAutomationConnection;
+            activeInstr.mResultClass = className;
+
             final long origId = Binder.clearCallingIdentity();
             // Instrumentation can kill and relaunch even persistent processes
             forceStopPackageLocked(ii.targetPackage, -1, true, false, true, true, false, userId,
                     "start instr");
-            ProcessRecord app = addAppLocked(ai, false, abiOverride);
-            app.instrumentationClass = className;
-            app.instrumentationInfo = ai;
-            app.instrumentationProfileFile = profileFile;
-            app.instrumentationArguments = arguments;
-            app.instrumentationWatcher = watcher;
-            app.instrumentationUiAutomationConnection = uiAutomationConnection;
-            app.instrumentationResultClass = className;
+            ProcessRecord app = addAppLocked(ai, defProcess, false, abiOverride);
+            app.instr = activeInstr;
+            activeInstr.mFinished = false;
+            activeInstr.mRunningProcesses.add(app);
+            if (!mActiveInstrumentation.contains(activeInstr)) {
+                mActiveInstrumentation.add(activeInstr);
+            }
             Binder.restoreCallingIdentity(origId);
         }
 
@@ -19084,24 +19230,70 @@
         }
     }
 
+    void addInstrumentationResultsLocked(ProcessRecord app, Bundle results) {
+        if (app.instr == null) {
+            Slog.w(TAG, "finishInstrumentation called on non-instrumented: " + app);
+            return;
+        }
+
+        if (!app.instr.mFinished && results != null) {
+            if (app.instr.mCurResults == null) {
+                app.instr.mCurResults = new Bundle(results);
+            } else {
+                app.instr.mCurResults.putAll(results);
+            }
+        }
+    }
+
+    public void addInstrumentationResults(IApplicationThread target, Bundle results) {
+        int userId = UserHandle.getCallingUserId();
+        // Refuse possible leaked file descriptors
+        if (results != null && results.hasFileDescriptors()) {
+            throw new IllegalArgumentException("File descriptors passed in Intent");
+        }
+
+        synchronized(this) {
+            ProcessRecord app = getRecordForAppLocked(target);
+            if (app == null) {
+                Slog.w(TAG, "addInstrumentationResults: no app for " + target);
+                return;
+            }
+            final long origId = Binder.clearCallingIdentity();
+            addInstrumentationResultsLocked(app, results);
+            Binder.restoreCallingIdentity(origId);
+        }
+    }
+
     void finishInstrumentationLocked(ProcessRecord app, int resultCode, Bundle results) {
-        if (app.instrumentationWatcher != null) {
-            mInstrumentationReporter.reportFinished(app.instrumentationWatcher,
-                    app.instrumentationClass, resultCode, results);
+        if (app.instr == null) {
+            Slog.w(TAG, "finishInstrumentation called on non-instrumented: " + app);
+            return;
         }
 
-        // Can't call out of the system process with a lock held, so post a message.
-        if (app.instrumentationUiAutomationConnection != null) {
-            mHandler.obtainMessage(SHUTDOWN_UI_AUTOMATION_CONNECTION_MSG,
-                    app.instrumentationUiAutomationConnection).sendToTarget();
+        if (!app.instr.mFinished) {
+            if (app.instr.mWatcher != null) {
+                Bundle finalResults = app.instr.mCurResults;
+                if (finalResults != null) {
+                    if (app.instr.mCurResults != null && results != null) {
+                        finalResults.putAll(results);
+                    }
+                } else {
+                    finalResults = results;
+                }
+                mInstrumentationReporter.reportFinished(app.instr.mWatcher,
+                        app.instr.mClass, resultCode, finalResults);
+            }
+
+            // Can't call out of the system process with a lock held, so post a message.
+            if (app.instr.mUiAutomationConnection != null) {
+                mHandler.obtainMessage(SHUTDOWN_UI_AUTOMATION_CONNECTION_MSG,
+                        app.instr.mUiAutomationConnection).sendToTarget();
+            }
+            app.instr.mFinished = true;
         }
 
-        app.instrumentationWatcher = null;
-        app.instrumentationUiAutomationConnection = null;
-        app.instrumentationClass = null;
-        app.instrumentationInfo = null;
-        app.instrumentationProfileFile = null;
-        app.instrumentationArguments = null;
+        app.instr.removeProcess(app);
+        app.instr = null;
 
         forceStopPackageLocked(app.info.packageName, -1, false, false, true, true, false, app.userId,
                 "finished inst");
@@ -19884,7 +20076,7 @@
             app.adjType = "top-activity";
             foregroundActivities = true;
             procState = PROCESS_STATE_CUR_TOP;
-        } else if (app.instrumentationClass != null) {
+        } else if (app.instr != null) {
             // Don't want to kill running instrumentation.
             adj = ProcessList.FOREGROUND_APP_ADJ;
             schedGroup = ProcessList.SCHED_GROUP_DEFAULT;
@@ -20017,6 +20209,13 @@
                 app.adjType = "force-fg";
                 app.adjSource = app.forcingToForeground;
                 schedGroup = ProcessList.SCHED_GROUP_DEFAULT;
+            } else if (app.hasOverlayUi) {
+                // The process is display an overlay UI.
+                adj = ProcessList.PERCEPTIBLE_APP_ADJ;
+                procState = ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND;
+                app.cached = false;
+                app.adjType = "has-overlay-ui";
+                schedGroup = ProcessList.SCHED_GROUP_DEFAULT;
             }
         }
 
@@ -21189,6 +21388,7 @@
         pendingChange.processState = uidRec != null
                 ? uidRec.setProcState : ActivityManager.PROCESS_STATE_NONEXISTENT;
         pendingChange.ephemeral = uidRec.ephemeral;
+        pendingChange.procStateSeq = uidRec.curProcStateSeq;
 
         // Directly update the power manager, since we sit on top of it and it is critical
         // it be kept in sync (so wake locks will be held as soon as appropriate).
@@ -21562,6 +21762,34 @@
             }
         }
 
+        for (int i = mActiveUids.size() - 1; i >= 0; --i) {
+            final UidRecord uidRec = mActiveUids.valueAt(i);
+            uidRec.shouldNotifyAppThreads = false;
+            if (uidRec.curProcState == uidRec.setProcState) {
+                continue;
+            }
+            final int newBlockState = getUidRecordBlockState(uidRec);
+            // Sequence no. associated with process state change will only be updated if the
+            // process is coming from background to foreground or vice versa.
+            if (newBlockState != uidRec.blockState) {
+                uidRec.blockState = newBlockState;
+                uidRec.curProcStateSeq++;
+                uidRec.appThreadListeners = null;
+                uidRec.shouldNotifyAppThreads = true;
+            }
+        }
+
+        for (int i = mLruProcesses.size() - 1; i >= 0; --i) {
+            final ProcessRecord app = mLruProcesses.get(i);
+            if (!app.killedByAm && app.thread != null && app.uidRecord.shouldNotifyAppThreads) {
+                try {
+                    app.thread.setBlockForNetworkState(app.uidRecord.blockState,
+                            app.uidRecord.curProcStateSeq);
+                } catch (RemoteException ignored) {
+                }
+            }
+        }
+
         mNumServiceProcs = mNewNumServiceProcs;
 
         // Now determine the memory trimming level of background processes.
@@ -21973,7 +22201,7 @@
                     mRemovedProcesses.remove(i);
 
                     if (app.persistent) {
-                        addAppLocked(app.info, false, null /* ABI override */);
+                        addAppLocked(app.info, null, false, null /* ABI override */);
                     }
                 }
             }
@@ -22605,13 +22833,6 @@
         }
 
         @Override
-        public IBinder getTopVisibleActivity(int uid) {
-            synchronized (ActivityManagerService.this) {
-                return mStackSupervisor.getTopVisibleActivity(uid);
-            }
-        }
-
-        @Override
         public void notifyDockedStackMinimizedChanged(boolean minimized) {
             synchronized (ActivityManagerService.this) {
                 mStackSupervisor.setDockedStackMinimized(minimized);
@@ -22743,6 +22964,158 @@
                 }
             }
         }
+
+        /**
+         * Sets if the given pid has an overlay UI or not.
+         *
+         * @param pid The pid we are setting overlay UI for.
+         * @param hasOverlayUi True if the process has overlay UI.
+         * @see android.view.WindowManager.LayoutParams#TYPE_APPLICATION_OVERLAY
+         */
+        @Override
+        public void setHasOverlayUi(int pid, boolean hasOverlayUi) {
+            synchronized (ActivityManagerService.this) {
+                final ProcessRecord pr;
+                synchronized (mPidsSelfLocked) {
+                    pr = mPidsSelfLocked.get(pid);
+                    if (pr == null) {
+                        Slog.w(TAG, "setHasOverlayUi called on unknown pid: " + pid);
+                        return;
+                    }
+                }
+                if (pr.hasOverlayUi == hasOverlayUi) {
+                    return;
+                }
+                pr.hasOverlayUi = hasOverlayUi;
+                //Slog.i(TAG, "Setting hasOverlayUi=" + pr.hasOverlayUi + " for pid=" + pid);
+                updateOomAdjLocked(pr);
+            }
+        }
+
+        @Override
+        public void setUidStateWithSeqObserver(UidStateWithSeqObserver observer) {
+            synchronized (ActivityManagerService.this) {
+                mUidStateWithSeqObserver = observer;
+            }
+        }
+
+        @Override
+        public void notifyNetworkPolicyRulesUpdated(int uid, long procStateSeq) {
+            if (DEBUG_NETWORK) {
+                Slog.d(TAG_NETWORK, "Got update from NPMS uid: " + uid + " seq: " + procStateSeq);
+            }
+            synchronized (ActivityManagerService.this) {
+                final UidRecord record = mActiveUids.get(uid);
+                if (record == null) {
+                    if (DEBUG_NETWORK) {
+                        Slog.d(TAG_NETWORK, "No active uidRecord for uid: " + uid
+                                + "seq: " + procStateSeq);
+                    }
+                    return;
+                }
+                record.lastProcStateSeqWithUpdatedNetworkState = procStateSeq;
+                if (record.curProcStateSeq > procStateSeq) {
+                    if (DEBUG_NETWORK) {
+                        Slog.d(TAG_NETWORK, "Since the current procStateSeq is greater, the "
+                                + "listeners would already be notified when it is incremented.");
+                    }
+                    return;
+                }
+
+                if (record.appThreadListeners == null) {
+                    if (DEBUG_NETWORK) {
+                        Slog.d(TAG_NETWORK, "No app thread listeners for uid: " + uid
+                                + "seq: " + procStateSeq);
+                    }
+                    return;
+                }
+                for (int i = record.appThreadListeners.beginBroadcast() - 1; i >= 0; i--) {
+                    final IApplicationThread listener =
+                            record.appThreadListeners.getBroadcastItem(i);
+                    try {
+                        if (listener != null) {
+                            listener.notifyNetworkStateUpdated(procStateSeq);
+                        }
+                    } catch (RemoteException ignored) {
+                    }
+                }
+                record.appThreadListeners.finishBroadcast();
+                record.appThreadListeners = null;
+            }
+        }
+    }
+
+    @Override
+    public boolean registerNetworkRulesUpdateListener(IApplicationThread listener,
+            long procStateSeq) {
+        synchronized (this) {
+            final int uid = Binder.getCallingUid();
+            final UidRecord record = mActiveUids.get(uid);
+            if (record.lastProcStateSeqWithUpdatedNetworkState >= procStateSeq) {
+                if (DEBUG_NETWORK) {
+                    Slog.v(TAG_NETWORK, "Network state is already updated for seq: " + procStateSeq
+                            + ". No need to register listener for uid: " + uid);
+                }
+                return false;
+            }
+            if (record.curProcStateSeq > procStateSeq) {
+                if (DEBUG_NETWORK) {
+                    Slog.v(TAG_NETWORK, "Since the current procState is greater, there is no need "
+                            + " to register listeners for older seq numbers");
+                }
+            }
+            if (record.appThreadListeners == null) {
+                record.appThreadListeners = new RemoteCallbackList<>();
+            }
+            record.appThreadListeners.register(listener);
+            if (DEBUG_NETWORK) {
+                Slog.v(TAG_NETWORK, "Registered listener for uid: " + uid + " seq: " + procStateSeq);
+            }
+            return true;
+        }
+    }
+
+    private int getUidRecordBlockState(UidRecord uidRec) {
+        final boolean curStateAllowedWhileRestrictBackgroundOn
+                = isProcStateAllowedWhileRestrictBackgroundOn(uidRec.curProcState);
+        final boolean curStateAllowedWhileIdleOrPowerSaveMode
+                = isProcStateAllowedWhileIdleOrPowerSaveMode(uidRec.curProcState);
+
+        if (uidRec.setProcState == ActivityManager.PROCESS_STATE_UNKNOWN) {
+            if (uidRec.curProcState != ActivityManager.PROCESS_STATE_UNKNOWN &&
+                    (curStateAllowedWhileIdleOrPowerSaveMode
+                            || curStateAllowedWhileRestrictBackgroundOn)) {
+                return ActivityThread.NETWORK_STATE_BLOCK;
+            }
+            return ActivityThread.NETWORK_STATE_NO_CHANGE;
+        }
+
+        final boolean prevStateAllowedWhileRestrictBackgroundOn
+                = isProcStateAllowedWhileRestrictBackgroundOn(uidRec.setProcState);
+        final boolean prevStateAllowedWhileIdleOrPowerSaveMode
+                = isProcStateAllowedWhileIdleOrPowerSaveMode(uidRec.setProcState);
+
+        if (prevStateAllowedWhileIdleOrPowerSaveMode == curStateAllowedWhileIdleOrPowerSaveMode &&
+                prevStateAllowedWhileRestrictBackgroundOn ==
+                        curStateAllowedWhileRestrictBackgroundOn) {
+            return uidRec.blockState;
+        }
+
+        if (!prevStateAllowedWhileIdleOrPowerSaveMode && curStateAllowedWhileIdleOrPowerSaveMode) {
+            return ActivityThread.NETWORK_STATE_BLOCK;
+        } else if (!prevStateAllowedWhileRestrictBackgroundOn
+                && curStateAllowedWhileRestrictBackgroundOn) {
+            return ActivityThread.NETWORK_STATE_BLOCK;
+        }
+
+        if (prevStateAllowedWhileIdleOrPowerSaveMode && !curStateAllowedWhileIdleOrPowerSaveMode) {
+            return ActivityThread.NETWORK_STATE_UNBLOCK;
+        } else if (prevStateAllowedWhileRestrictBackgroundOn &&
+                !curStateAllowedWhileRestrictBackgroundOn) {
+            return ActivityThread.NETWORK_STATE_UNBLOCK;
+        }
+
+        return uidRec.blockState;
     }
 
     private final class SleepTokenImpl extends SleepToken {
diff --git a/services/core/java/com/android/server/am/ActivityManagerShellCommand.java b/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
index a06fa1b..80df26b 100644
--- a/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
+++ b/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
@@ -2031,6 +2031,8 @@
             return runTaskDragTaskTest(pw);
         } else if (op.equals("size-task-test")) {
             return runTaskSizeTaskTest(pw);
+        } else if (op.equals("focus")) {
+            return runTaskFocus(pw);
         } else {
             getErrPrintWriter().println("Error: unknown command '" + op + "'");
             return -1;
@@ -2322,6 +2324,13 @@
         return 0;
     }
 
+    int runTaskFocus(PrintWriter pw) throws RemoteException {
+        final int taskId = Integer.parseInt(getNextArgRequired());
+        pw.println("Setting focus to task " + taskId);
+        mInterface.setFocusedTask(taskId);
+        return 0;
+    }
+
     int runWrite(PrintWriter pw) {
         mInternal.enforceCallingPermission(android.Manifest.permission.SET_ACTIVITY_WATCHER,
                 "registerUidObserver()");
diff --git a/services/core/java/com/android/server/am/ActivityMetricsLogger.java b/services/core/java/com/android/server/am/ActivityMetricsLogger.java
index 65b8554..ff796a54 100644
--- a/services/core/java/com/android/server/am/ActivityMetricsLogger.java
+++ b/services/core/java/com/android/server/am/ActivityMetricsLogger.java
@@ -1,5 +1,6 @@
 package com.android.server.am;
 
+import static android.app.ActivityManager.StackId.ASSISTANT_STACK_ID;
 import static android.app.ActivityManager.StackId.DOCKED_STACK_ID;
 import static android.app.ActivityManager.StackId.FREEFORM_WORKSPACE_STACK_ID;
 import static android.app.ActivityManager.StackId.FULLSCREEN_WORKSPACE_STACK_ID;
@@ -33,6 +34,7 @@
     private static final int WINDOW_STATE_STANDARD = 0;
     private static final int WINDOW_STATE_SIDE_BY_SIDE = 1;
     private static final int WINDOW_STATE_FREEFORM = 2;
+    private static final int WINDOW_STATE_ASSISTANT = 3;
     private static final int WINDOW_STATE_INVALID = -1;
 
     private static final long INVALID_START_TIME = -1;
@@ -40,7 +42,7 @@
     // Preallocated strings we are sending to tron, so we don't have to allocate a new one every
     // time we log.
     private static final String[] TRON_WINDOW_STATE_VARZ_STRINGS = {
-            "window_time_0", "window_time_1", "window_time_2"};
+            "window_time_0", "window_time_1", "window_time_2", "window_time_3"};
 
     private int mWindowState = WINDOW_STATE_STANDARD;
     private long mLastLogTimeSecs;
@@ -88,6 +90,8 @@
             mWindowState = WINDOW_STATE_INVALID;
         } else if (stack.mStackId == FREEFORM_WORKSPACE_STACK_ID) {
             mWindowState = WINDOW_STATE_FREEFORM;
+        } else if (stack.mStackId == ASSISTANT_STACK_ID) {
+            mWindowState = WINDOW_STATE_ASSISTANT;
         } else if (StackId.isStaticStack(stack.mStackId)) {
             throw new IllegalStateException("Unknown stack=" + stack);
         }
diff --git a/services/core/java/com/android/server/am/ActivityRecord.java b/services/core/java/com/android/server/am/ActivityRecord.java
index 962056f..082b6b5 100644
--- a/services/core/java/com/android/server/am/ActivityRecord.java
+++ b/services/core/java/com/android/server/am/ActivityRecord.java
@@ -19,6 +19,7 @@
 import static android.app.ActivityManager.ENABLE_TASK_SNAPSHOTS;
 import static android.app.ActivityManager.LOCK_TASK_MODE_NONE;
 import static android.app.ActivityManager.StackId;
+import static android.app.ActivityManager.StackId.ASSISTANT_STACK_ID;
 import static android.app.ActivityManager.StackId.DOCKED_STACK_ID;
 import static android.app.ActivityManager.StackId.FREEFORM_WORKSPACE_STACK_ID;
 import static android.app.ActivityManager.StackId.HOME_STACK_ID;
@@ -30,6 +31,7 @@
 import static android.content.pm.ActivityInfo.CONFIG_SCREEN_LAYOUT;
 import static android.content.pm.ActivityInfo.CONFIG_SCREEN_SIZE;
 import static android.content.pm.ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE;
+import static android.content.pm.ActivityInfo.CONFIG_UI_MODE;
 import static android.content.pm.ActivityInfo.FLAG_ALWAYS_FOCUSABLE;
 import static android.content.pm.ActivityInfo.FLAG_EXCLUDE_FROM_RECENTS;
 import static android.content.pm.ActivityInfo.FLAG_IMMERSIVE;
@@ -37,12 +39,16 @@
 import static android.content.pm.ActivityInfo.FLAG_SHOW_FOR_ALL_USERS;
 import static android.content.pm.ActivityInfo.FLAG_STATE_NOT_NEEDED;
 import static android.content.pm.ActivityInfo.LAUNCH_MULTIPLE;
+import static android.content.pm.ActivityInfo.LAUNCH_SINGLE_INSTANCE;
+import static android.content.pm.ActivityInfo.LAUNCH_SINGLE_TASK;
 import static android.content.pm.ActivityInfo.LAUNCH_SINGLE_TOP;
 import static android.content.pm.ActivityInfo.RESIZE_MODE_FORCE_RESIZEABLE;
 import static android.content.pm.ActivityInfo.RESIZE_MODE_RESIZEABLE;
 import static android.content.pm.ActivityInfo.RESIZE_MODE_RESIZEABLE_VIA_SDK_VERSION;
 import static android.content.pm.ActivityInfo.RESIZE_MODE_UNRESIZEABLE;
+import static android.content.res.Configuration.UI_MODE_TYPE_VR_HEADSET;
 import static android.os.Build.VERSION_CODES.HONEYCOMB;
+import static android.os.Build.VERSION_CODES.O;
 import static android.os.Process.SYSTEM_UID;
 import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_CONFIGURATION;
 import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_SAVED_STATE;
@@ -171,6 +177,7 @@
     static final int APPLICATION_ACTIVITY_TYPE = 0;
     static final int HOME_ACTIVITY_TYPE = 1;
     static final int RECENTS_ACTIVITY_TYPE = 2;
+    static final int ASSISTANT_ACTIVITY_TYPE = 3;
     int mActivityType;
 
     private CharSequence nonLocalizedLabel;  // the label information from the package mgr.
@@ -280,8 +287,8 @@
     /**
      * Temp configs used in {@link #ensureActivityConfigurationLocked(int, boolean)}
      */
-    private final Configuration mTmpGlobalConfig = new Configuration();
-    private final Configuration mTmpTaskConfig = new Configuration();
+    private final Configuration mTmpConfig1 = new Configuration();
+    private final Configuration mTmpConfig2 = new Configuration();
 
     private static String startingWindowStateToString(int state) {
         switch (state) {
@@ -714,7 +721,7 @@
         noDisplay = ent != null && ent.array.getBoolean(
                 com.android.internal.R.styleable.Window_windowNoDisplay, false);
 
-        setActivityType(_componentSpecified, _launchedFromUid, _intent, sourceRecord);
+        setActivityType(_componentSpecified, _launchedFromUid, _intent, options, sourceRecord);
 
         immersive = (aInfo.flags & FLAG_IMMERSIVE) != 0;
 
@@ -773,7 +780,10 @@
 
         // Remove the activity from the old task and add it to the new task
         prevTask.removeActivity(this);
-        setTask(newTask, null);
+        // TODO(b/34179495): This should really be set to null in removeActivity() call above,
+        // but really bad things that I can't track down right now happen when I do that.
+        // So, setting it here now and will change later when there is time for investigation.
+        task = null;
         newTask.addActivityAtIndex(position, this);
     }
 
@@ -802,8 +812,23 @@
         return sourceRecord != null && sourceRecord.isResolverActivity();
     }
 
-    private void setActivityType(boolean componentSpecified,
-            int launchedFromUid, Intent intent, ActivityRecord sourceRecord) {
+    /**
+     * @return whether the given package name can launch an assist activity.
+     */
+    private boolean canLaunchAssistActivity(String packageName) {
+        if (service.mAssistUtils == null) {
+            return false;
+        }
+
+        final ComponentName assistComponent = service.mAssistUtils.getActiveServiceComponentName();
+        if (assistComponent != null) {
+            return assistComponent.getPackageName().equals(packageName);
+        }
+        return false;
+    }
+
+    private void setActivityType(boolean componentSpecified, int launchedFromUid, Intent intent,
+            ActivityOptions options, ActivityRecord sourceRecord) {
         if ((!componentSpecified || canLaunchHomeActivity(launchedFromUid, sourceRecord))
                 && isHomeIntent(intent) && !isResolverActivity()) {
             // This sure looks like a home activity!
@@ -816,24 +841,16 @@
             }
         } else if (realActivity.getClassName().contains(RECENTS_PACKAGE_NAME)) {
             mActivityType = RECENTS_ACTIVITY_TYPE;
+        } else if (options != null && options.getLaunchStackId() == ASSISTANT_STACK_ID
+                && canLaunchAssistActivity(launchedFromPackage)) {
+            mActivityType = ASSISTANT_ACTIVITY_TYPE;
         } else {
             mActivityType = APPLICATION_ACTIVITY_TYPE;
         }
     }
 
-    void setTask(TaskRecord newTask, TaskRecord taskToAffiliateWith) {
-        if (task != null && task.removeActivity(this) && task != newTask
-                && task.getStack() != null) {
-            task.getStack().removeTask(task, "setTask");
-        }
-        task = newTask;
-        setTaskToAffiliateWith(taskToAffiliateWith);
-    }
-
     void setTaskToAffiliateWith(TaskRecord taskToAffiliateWith) {
-        if (taskToAffiliateWith != null &&
-                launchMode != ActivityInfo.LAUNCH_SINGLE_INSTANCE &&
-                launchMode != ActivityInfo.LAUNCH_SINGLE_TASK) {
+        if (launchMode != LAUNCH_SINGLE_INSTANCE && launchMode != LAUNCH_SINGLE_TASK) {
             task.setTaskToAffiliateWith(taskToAffiliateWith);
         }
     }
@@ -884,6 +901,10 @@
         return mActivityType == RECENTS_ACTIVITY_TYPE;
     }
 
+    boolean isAssistantActivity() {
+        return mActivityType == ASSISTANT_ACTIVITY_TYPE;
+    }
+
     boolean isApplicationActivity() {
         return mActivityType == APPLICATION_ACTIVITY_TYPE;
     }
@@ -1951,13 +1972,13 @@
         if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG_CONFIGURATION,
                 "Ensuring correct configuration: " + this);
 
-        // Short circuit: if the two configurations are equal (the common case), then there is
-        // nothing to do.
-        final Configuration newGlobalConfig = service.getGlobalConfiguration();
-        final Configuration newTaskMergedOverrideConfig = task.getMergedOverrideConfiguration();
-        if (mLastReportedConfiguration.equals(newGlobalConfig)
-                && mLastReportedOverrideConfiguration.equals(newTaskMergedOverrideConfig)
-                && !forceNewConfig) {
+        // Short circuit: if the two full configurations are equal (the common case), then there is
+        // nothing to do.  We test the full configuration instead of the global and merged override
+        // configurations because there are cases (like moving a task to the pinned stack) where
+        // the combine configurations are equal, but would otherwise differ in the override config
+        mTmpConfig1.setTo(mLastReportedConfiguration);
+        mTmpConfig1.updateFrom(mLastReportedOverrideConfiguration);
+        if (task.getConfiguration().equals(mTmpConfig1) && !forceNewConfig) {
             if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG_CONFIGURATION,
                     "Configuration unchanged in " + this);
             return true;
@@ -1973,14 +1994,16 @@
 
         // Okay we now are going to make this activity have the new config.
         // But then we need to figure out how it needs to deal with that.
-        mTmpGlobalConfig.setTo(mLastReportedConfiguration);
-        mTmpTaskConfig.setTo(mLastReportedOverrideConfiguration);
+        final Configuration newGlobalConfig = service.getGlobalConfiguration();
+        final Configuration newTaskMergedOverrideConfig = task.getMergedOverrideConfiguration();
+        mTmpConfig1.setTo(mLastReportedConfiguration);
+        mTmpConfig2.setTo(mLastReportedOverrideConfiguration);
         mLastReportedConfiguration.setTo(newGlobalConfig);
         mLastReportedOverrideConfiguration.setTo(newTaskMergedOverrideConfig);
 
         int taskChanges = getTaskConfigurationChanges(this, newTaskMergedOverrideConfig,
-                mTmpTaskConfig);
-        final int changes = mTmpGlobalConfig.diff(newGlobalConfig) | taskChanges;
+                mTmpConfig2);
+        final int changes = mTmpConfig1.diff(newGlobalConfig) | taskChanges;
         if (changes == 0 && !forceNewConfig) {
             if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG_CONFIGURATION,
                     "Configuration no differences in " + this);
@@ -2013,7 +2036,8 @@
                         + ", newGlobalConfig=" + newGlobalConfig
                         + ", newTaskMergedOverrideConfig=" + newTaskMergedOverrideConfig);
 
-        if ((changes&(~info.getRealConfigChanged())) != 0 || forceNewConfig) {
+        if (shouldRelaunchLocked(changes, newGlobalConfig, newTaskMergedOverrideConfig)
+                || forceNewConfig) {
             // Aha, the activity isn't handling the change, so DIE DIE DIE.
             configChangeFlags |= changes;
             startFreezingScreenLocked(app, globalChanges);
@@ -2064,6 +2088,27 @@
         return true;
     }
 
+    /**
+     * When assessing a configuration change, decide if the changes flags and the new configurations
+     * should cause the Activity to relaunch.
+     */
+    private boolean shouldRelaunchLocked(int changes, Configuration newGlobalConfig,
+            Configuration newTaskMergedOverrideConfig) {
+        int configChanged = info.getRealConfigChanged();
+
+        // Override for apps targeting pre-O sdks
+        // If a device is in VR mode, and we're transitioning into VR ui mode, add ignore ui mode
+        // to the config change.
+        // For O and later, apps will be required to add configChanges="uimode" to their manifest.
+        if (appInfo.targetSdkVersion < O
+                && requestedVrComponent != null
+                && (isInVrUiMode(newGlobalConfig) || isInVrUiMode(newTaskMergedOverrideConfig))) {
+            configChanged |= CONFIG_UI_MODE;
+        }
+
+        return (changes&(~configChanged)) != 0;
+    }
+
     private static int getTaskConfigurationChanges(ActivityRecord record, Configuration taskConfig,
             Configuration oldTaskOverride) {
         // If we went from full-screen to non-full-screen, make sure to use the correct
@@ -2296,10 +2341,15 @@
             case APPLICATION_ACTIVITY_TYPE: return "APPLICATION_ACTIVITY_TYPE";
             case HOME_ACTIVITY_TYPE: return "HOME_ACTIVITY_TYPE";
             case RECENTS_ACTIVITY_TYPE: return "RECENTS_ACTIVITY_TYPE";
+            case ASSISTANT_ACTIVITY_TYPE: return "ASSISTANT_ACTIVITY_TYPE";
             default: return Integer.toString(type);
         }
     }
 
+    private static boolean isInVrUiMode(Configuration config) {
+        return (config.uiMode & Configuration.UI_MODE_TYPE_MASK) == UI_MODE_TYPE_VR_HEADSET;
+    }
+
     @Override
     public String toString() {
         if (stringName != null) {
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index 54082ea..f75ce25 100644
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -16,6 +16,7 @@
 
 package com.android.server.am;
 
+import static android.app.ActivityManager.StackId.ASSISTANT_STACK_ID;
 import static android.app.ActivityManager.StackId.DOCKED_STACK_ID;
 import static android.app.ActivityManager.StackId.FREEFORM_WORKSPACE_STACK_ID;
 import static android.app.ActivityManager.StackId.FULLSCREEN_WORKSPACE_STACK_ID;
@@ -62,6 +63,7 @@
 import static com.android.server.am.ActivityManagerDebugConfig.TAG_AM;
 import static com.android.server.am.ActivityManagerDebugConfig.TAG_WITH_CLASS_NAME;
 import static com.android.server.am.ActivityRecord.APPLICATION_ACTIVITY_TYPE;
+import static com.android.server.am.ActivityRecord.ASSISTANT_ACTIVITY_TYPE;
 import static com.android.server.am.ActivityRecord.HOME_ACTIVITY_TYPE;
 import static com.android.server.am.ActivityStackSupervisor.FindTaskResult;
 import static com.android.server.am.ActivityStackSupervisor.PRESERVE_WINDOWS;
@@ -477,6 +479,8 @@
         mTmpRect2.setEmpty();
         mWindowContainerController.reparent(activityDisplay.mDisplayId, mTmpRect2);
         postAddToDisplay(activityDisplay, mTmpRect2.isEmpty() ? null : mTmpRect2, onTop);
+        adjustFocusToNextFocusableStackLocked("reparent", true /* allowFocusSelf */);
+        mStackSupervisor.resumeFocusedStackTopActivityLocked();
     }
 
     /**
@@ -544,6 +548,10 @@
         mWindowContainerController.setPictureInPictureAspectRatio(aspectRatio);
     }
 
+    void setPictureInPictureActions(List<RemoteAction> actions) {
+        mWindowContainerController.setPictureInPictureActions(actions);
+    }
+
     void getStackDockedModeBounds(Rect outBounds, Rect outTempBounds, Rect outTempInsetBounds,
             boolean ignoreVisibility) {
         mWindowContainerController.getStackDockedModeBounds(outBounds, outTempBounds,
@@ -554,10 +562,6 @@
         mWindowContainerController.prepareFreezingTaskBounds();
     }
 
-    void setPictureInPictureActions(List<RemoteAction> actions) {
-        mWindowContainerController.setPictureInPictureActions(actions);
-    }
-
     void getWindowContainerBounds(Rect outBounds) {
         if (mWindowContainerController != null) {
             mWindowContainerController.getBounds(outBounds);
@@ -776,6 +780,10 @@
         return mStackId == PINNED_STACK_ID;
     }
 
+    final boolean isAssistantStack() {
+        return mStackId == ASSISTANT_STACK_ID;
+    }
+
     final boolean isOnHomeDisplay() {
         return isAttached() &&
                 mActivityContainer.mActivityDisplay.mDisplayId == DEFAULT_DISPLAY;
@@ -1554,43 +1562,11 @@
         final ActivityStack focusedStack = mStackSupervisor.getFocusedStack();
         final int focusedStackId = focusedStack.mStackId;
 
-        final TaskRecord topFocusedTask = focusedStack.topTask();
-        final boolean isOnTopLauncherFocused = topFocusedTask != null &&
-                topFocusedTask.isOnTopLauncher();
-        if (isOnTopLauncherFocused) {
-            // When an on-top launcher is focused, we should find out whether the freeform stack or
-            // the fullscreen stack appears first underneath and has activities to show, and then
-            // make it visible.
-            boolean behindFullscreenOrFreeForm = false;
-            for (int stackBehindFocusedIndex = mStacks.indexOf(focusedStack) - 1;
-                 stackBehindFocusedIndex >= 0; stackBehindFocusedIndex--) {
-                ActivityStack stack = mStacks.get(stackBehindFocusedIndex);
-                if ((stack.mStackId == FREEFORM_WORKSPACE_STACK_ID
-                        || stack.mStackId == FULLSCREEN_WORKSPACE_STACK_ID)
-                        && stack.topRunningActivityLocked() != null) {
-                    if (stackIndex == stackBehindFocusedIndex) {
-                        return !behindFullscreenOrFreeForm ? STACK_VISIBLE : STACK_INVISIBLE;
-                    }
-                    behindFullscreenOrFreeForm = true;
-                }
-            }
-        }
-        // If an on-top launcher is on the top of the home stack but the home stack is not focused,
-        // then the whole stack should be invisible.
-        TaskRecord topTask = topTask();
-        if (mStackId != focusedStackId && topTask != null && topTask.isOnTopLauncher()) {
-            // We're here mostly because the on-top launcher didn't have a chance to move itself to
-            // back. We should move it to back as soon as possible to avoid other activities
-            // returning to it or other visibility issues.
-            moveTaskToBackLocked(topTask.taskId);
-            return STACK_INVISIBLE;
-        }
-
-        if (mStackId == FULLSCREEN_WORKSPACE_STACK_ID
+        if (StackId.isBackdropToTranslucentActivity(mStackId)
                 && hasVisibleBehindActivity() && StackId.isHomeOrRecentsStack(focusedStackId)
                 && !focusedStack.topActivity().fullscreen) {
-            // The fullscreen stack should be visible if it has a visible behind activity behind
-            // the home or recents stack that is translucent.
+            // The fullscreen or assistant stack should be visible if it has a visible behind
+            // activity behind the home or recents stack that is translucent.
             return STACK_VISIBLE_ACTIVITY_BEHIND;
         }
 
@@ -1619,10 +1595,10 @@
         final int stackBehindFocusedId = (stackBehindFocusedIndex >= 0)
                 ? mStacks.get(stackBehindFocusedIndex).mStackId : INVALID_STACK_ID;
 
-        if (focusedStackId == FULLSCREEN_WORKSPACE_STACK_ID
+        if (StackId.isBackdropToTranslucentActivity(focusedStackId)
                 && focusedStack.isStackTranslucent(starting, stackBehindFocusedId)) {
-            // Stacks behind the fullscreen stack with a translucent activity are always
-            // visible so they can act as a backdrop to the translucent activity.
+            // Stacks behind the fullscreen or assistant stack with a translucent activity are
+            // always visible so they can act as a backdrop to the translucent activity.
             // For example, dialog activities
             if (stackIndex == stackBehindFocusedIndex) {
                 return STACK_VISIBLE;
@@ -1790,28 +1766,7 @@
                     // status of an activity in a previous task affects other.
                     behindFullscreenActivity = stackVisibility == STACK_INVISIBLE;
                 } else if (mStackId == HOME_STACK_ID) {
-                    if (task.isOnTopLauncher()) {
-                        if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, "On-top launcher: at " + task
-                                + " stackInvisible=" + stackInvisible
-                                + " behindFullscreenActivity=" + behindFullscreenActivity);
-                        // When an on-top launcher is visible, (e.g. it's on the top of the home stack),
-                        // other tasks in the home stack could be visible if and only if:
-                        // - some app is running in the docked stack;
-                        // - no app is running in either the fullscreen stack or the freefrom stack.
-                        final ActivityStack dockedStack = mStackSupervisor.getStack(DOCKED_STACK_ID);
-                        final ActivityStack fullscreenStack = mStackSupervisor.getStack(
-                                FULLSCREEN_WORKSPACE_STACK_ID);
-                        final ActivityStack freeformStack = mStackSupervisor.getStack(
-                                FREEFORM_WORKSPACE_STACK_ID);
-                        final boolean dockedStackEmpty = dockedStack == null ||
-                                dockedStack.topRunningActivityLocked() == null;
-                        final boolean fullscreenStackEmpty = fullscreenStack == null ||
-                                fullscreenStack.topRunningActivityLocked() == null;
-                        final boolean freeformStackEmpty = freeformStack == null ||
-                                freeformStack.topRunningActivityLocked() == null;
-                        behindFullscreenActivity = dockedStackEmpty || !fullscreenStackEmpty ||
-                                !freeformStackEmpty;
-                    } else if (task.isHomeTask()) {
+                    if (task.isHomeTask()) {
                         if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, "Home task: at " + task
                                 + " stackInvisible=" + stackInvisible
                                 + " behindFullscreenActivity=" + behindFullscreenActivity);
@@ -2552,7 +2507,7 @@
                 if (!next.hasBeenLaunched) {
                     next.hasBeenLaunched = true;
                 } else  if (SHOW_APP_STARTING_PREVIEW && lastStack != null &&
-                        mStackSupervisor.isFrontStack(lastStack)) {
+                        mStackSupervisor.isFrontStackOnDisplay(lastStack)) {
                     next.showStartingWindow(null /* prev */, false /* newTask */,
                             false /* taskSwitch */);
                 }
@@ -2595,8 +2550,7 @@
 
     private boolean resumeTopActivityInNextFocusableStack(ActivityRecord prev,
             ActivityOptions options, String reason) {
-        if ((!mFullscreen || !isOnHomeDisplay())
-                && adjustFocusToNextFocusableStackLocked(reason)) {
+        if ((!mFullscreen || !isOnHomeDisplay()) && adjustFocusToNextFocusableStackLocked(reason)) {
             // Try to move focus to the next visible stack with a running activity if this
             // stack is not covering the entire screen or is on a secondary display (with no home
             // stack).
@@ -2681,10 +2635,14 @@
                 true /* includingParents */);
     }
 
+    /**
+     * Updates the {@param task}'s return type before it is moved to the top.
+     */
     private void updateTaskReturnToForTopInsertion(TaskRecord task) {
         boolean isLastTaskOverHome = false;
-        // If the moving task is over home stack, transfer its return type to next task
-        if (task.isOverHomeStack()) {
+        // If the moving task is over the home or assistant stack, transfer its return type to next
+        // task so that they return to the same stack
+        if (task.isOverHomeStack() || task.isOverAssistantStack()) {
             final TaskRecord nextTask = getNextTask(task);
             if (nextTask != null) {
                 nextTask.setTaskToReturnTo(task.getTaskToReturnTo());
@@ -2693,31 +2651,32 @@
             }
         }
 
+        // If this is not on the default display, then just set the return type to application
+        if (!isOnHomeDisplay()) {
+            task.setTaskToReturnTo(APPLICATION_ACTIVITY_TYPE);
+            return;
+        }
+
+        // If the task was launched from the assistant stack, set the return type to assistant
+        final ActivityStack lastStack = mStackSupervisor.getLastStack();
+        if (lastStack != null && lastStack.isAssistantStack()) {
+            task.setTaskToReturnTo(ASSISTANT_ACTIVITY_TYPE);
+            return;
+        }
+
         // If this is being moved to the top by another activity or being launched from the home
         // activity, set mTaskToReturnTo accordingly.
-        if (isOnHomeDisplay()) {
-            ActivityStack lastStack = mStackSupervisor.getLastStack();
-            final boolean fromHomeOrRecents = lastStack.isHomeOrRecentsStack();
-            final TaskRecord topTask = lastStack.topTask();
-            final boolean fromOnTopLauncher = topTask != null && topTask.isOnTopLauncher();
-            if (fromOnTopLauncher) {
-                // Since an on-top launcher will is moved to back when tasks are launched from it,
-                // those tasks should first try to return to a non-home activity.
-                // This also makes sure that non-home activities are visible under a transparent
-                // non-home activity.
-                task.setTaskToReturnTo(APPLICATION_ACTIVITY_TYPE);
-            } else if (!isHomeOrRecentsStack() && (fromHomeOrRecents || topTask() != task)) {
-                // If it's a last task over home - we default to keep its return to type not to
-                // make underlying task focused when this one will be finished.
-                int returnToType = isLastTaskOverHome
-                        ? task.getTaskToReturnTo() : APPLICATION_ACTIVITY_TYPE;
-                if (fromHomeOrRecents && StackId.allowTopTaskToReturnHome(mStackId)) {
-                    returnToType = topTask == null ? HOME_ACTIVITY_TYPE : topTask.taskType;
-                }
-                task.setTaskToReturnTo(returnToType);
+        final boolean fromHomeOrRecents = lastStack.isHomeOrRecentsStack();
+        final TaskRecord topTask = lastStack.topTask();
+        if (!isHomeOrRecentsStack() && (fromHomeOrRecents || topTask() != task)) {
+            // If it's a last task over home - we default to keep its return to type not to
+            // make underlying task focused when this one will be finished.
+            int returnToType = isLastTaskOverHome
+                    ? task.getTaskToReturnTo() : APPLICATION_ACTIVITY_TYPE;
+            if (fromHomeOrRecents && StackId.allowTopTaskToReturnHome(mStackId)) {
+                returnToType = topTask == null ? HOME_ACTIVITY_TYPE : topTask.taskType;
             }
-        } else {
-            task.setTaskToReturnTo(APPLICATION_ACTIVITY_TYPE);
+            task.setTaskToReturnTo(returnToType);
         }
     }
 
@@ -2775,7 +2734,12 @@
         // Slot the activity into the history stack and proceed
         if (DEBUG_ADD_REMOVE) Slog.i(TAG, "Adding activity " + r + " to stack to task " + task,
                 new RuntimeException("here").fillInStackTrace());
-        r.createWindowContainer();
+        // TODO: Need to investigate if it is okay for the controller to already be created by the
+        // time we get to this point. I think it is, but need to double check.
+        // Use test in b/34179495 to trace the call path.
+        if (r.getWindowContainerController() == null) {
+            r.createWindowContainer();
+        }
         task.setFrontOfTask();
 
         if (!isHomeOrRecentsStack() || numActivities() > 0) {
@@ -2952,8 +2916,7 @@
                             + targetTask + " Callers=" + Debug.getCallers(4));
                     if (DEBUG_TASKS) Slog.v(TAG_TASKS,
                             "Pushing next activity " + p + " out to target's task " + target.task);
-                    p.setTask(targetTask, null);
-                    targetTask.addActivityAtBottom(p);
+                    p.reparent(targetTask, 0 /* position - bottom */, "resetTargetTaskIfNeeded");
                 }
 
                 mWindowContainerController.positionChildAtBottom(
@@ -3213,11 +3176,14 @@
                 return;
             } else {
                 final TaskRecord task = r.task;
-                if (r.frontOfTask && task == topTask() && task.isOverHomeStack()) {
-                    // For non-fullscreen stack, we want to move the focus to the next visible
-                    // stack to prevent the home screen from moving to the top and obscuring
+                final boolean isAssistantOrOverAssistant = task.getStack().isAssistantStack() ||
+                        task.isOverAssistantStack();
+                if (r.frontOfTask && task == topTask() &&
+                        (task.isOverHomeStack() || isAssistantOrOverAssistant)) {
+                    // For non-fullscreen or assistant stack, we want to move the focus to the next
+                    // visible stack to prevent the home screen from moving to the top and obscuring
                     // other visible stacks.
-                    if (!mFullscreen
+                    if ((!mFullscreen || isAssistantOrOverAssistant)
                             && adjustFocusToNextFocusableStackLocked(myReason)) {
                         return;
                     }
@@ -3235,8 +3201,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;
@@ -3246,7 +3222,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);
         }
 
@@ -4377,7 +4354,7 @@
         // If we have a watcher, preflight the move before committing to it.  First check
         // for *other* available tasks, but if none are available, then try again allowing the
         // current task to be selected.
-        if (mStackSupervisor.isFrontStack(this) && mService.mController != null) {
+        if (mStackSupervisor.isFrontStackOnDisplay(this) && mService.mController != null) {
             ActivityRecord next = topRunningActivityLocked(null, taskId);
             if (next == null) {
                 next = topRunningActivityLocked(null, 0);
@@ -4400,31 +4377,22 @@
         if (DEBUG_TRANSITION) Slog.v(TAG_TRANSITION, "Prepare to back transition: task=" + taskId);
 
         if (mStackId == HOME_STACK_ID && topTask().isHomeTask()) {
-            if (topTask().isOnTopLauncher()) {
-                // An on-top launcher doesn't affect the visibility of activities on other stacks
-                // behind it. So if we're moving an on-top launcher to the back, we want to move the
-                // focus to the next focusable stack and resume an activity there.
-                // Besides, when the docked stack is visible, we should also move the home stack to
-                // the back to avoid the recents pops up on top of a fullscreen or freeform
-                // activity.
-
-                // Move the home stack to back.
-                moveToBack(topTask());
-
-                // Resume an activity in the next focusable stack.
-                adjustFocusToNextFocusableStackLocked("moveTaskToBack");
-                mStackSupervisor.resumeFocusedStackTopActivityLocked();
-                return true;
-            }
-
             // For the case where we are moving the home task back and there is an activity visible
-            // behind it on the fullscreen stack, we want to move the focus to the visible behind
-            // activity to maintain order with what the user is seeing.
+            // behind it on the fullscreen or assistant stack, we want to move the focus to the
+            // visible behind activity to maintain order with what the user is seeing.
+            ActivityRecord visibleBehind = null;
             final ActivityStack fullscreenStack =
                     mStackSupervisor.getStack(FULLSCREEN_WORKSPACE_STACK_ID);
+            final ActivityStack assistantStack =
+                    mStackSupervisor.getStack(ASSISTANT_STACK_ID);
             if (fullscreenStack != null && fullscreenStack.hasVisibleBehindActivity()) {
-                final ActivityRecord visibleBehind = fullscreenStack.getVisibleBehindActivity();
-                mStackSupervisor.moveFocusableActivityStackToFrontLocked(visibleBehind, "moveTaskToBack");
+                visibleBehind = fullscreenStack.getVisibleBehindActivity();
+            } else if (assistantStack != null && assistantStack.hasVisibleBehindActivity()) {
+                visibleBehind = assistantStack.getVisibleBehindActivity();
+            }
+            if (visibleBehind != null) {
+                mStackSupervisor.moveFocusableActivityStackToFrontLocked(visibleBehind,
+                        "moveTaskToBack");
                 mStackSupervisor.resumeFocusedStackTopActivityLocked();
                 return true;
             }
@@ -4918,7 +4886,7 @@
         final int topTaskNdx = mTaskHistory.size() - 1;
         if (task.isOverHomeStack() && taskNdx < topTaskNdx) {
             final TaskRecord nextTask = mTaskHistory.get(taskNdx + 1);
-            if (!nextTask.isOverHomeStack()) {
+            if (!nextTask.isOverHomeStack() && !nextTask.isOverAssistantStack()) {
                 nextTask.setTaskToReturnTo(HOME_ACTIVITY_TYPE);
             }
         }
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index 51d9179..65c768f 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;
@@ -623,11 +624,6 @@
         return stack == mFocusedStack;
     }
 
-    /** The top most stack. */
-    boolean isFrontStack(ActivityStack stack) {
-        return isFrontOfStackList(stack, mHomeStack.mStacks);
-    }
-
     /** The top most stack on its display. */
     boolean isFrontStackOnDisplay(ActivityStack stack) {
         return isFrontOfStackList(stack, stack.mActivityContainer.mActivityDisplay.mStacks);
@@ -1102,13 +1098,21 @@
         }
 
         // Look in other non-focused and non-home stacks.
-        final ArrayList<ActivityStack> stacks = mHomeStack.mStacks;
-        for (int stackNdx = stacks.size() - 1; stackNdx >= 0; --stackNdx) {
-            final ActivityStack stack = stacks.get(stackNdx);
-            if (stack != focusedStack && isFrontStack(stack) && stack.isFocusable()) {
-                r = stack.topRunningActivityLocked();
-                if (r != null) {
-                    return r;
+        mWindowManager.getDisplaysInFocusOrder(mTmpOrderedDisplayIds);
+
+        for (int i = mTmpOrderedDisplayIds.size() - 1; i >= 0; --i) {
+            final int displayId = mTmpOrderedDisplayIds.get(i);
+            final List<ActivityStack> stacks = mActivityDisplays.get(displayId).mStacks;
+            if (stacks == null) {
+                continue;
+            }
+            for (int j = stacks.size() - 1; j >= 0; --j) {
+                final ActivityStack stack = stacks.get(j);
+                if (stack != focusedStack && isFrontStackOnDisplay(stack) && stack.isFocusable()) {
+                    r = stack.topRunningActivityLocked();
+                    if (r != null) {
+                        return r;
+                    }
                 }
             }
         }
@@ -2611,8 +2615,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="
@@ -2626,7 +2631,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.");
@@ -2669,7 +2674,7 @@
         // In some cases the focused stack isn't the front stack. E.g. pinned stack.
         // Whenever we are moving the top activity from the front stack we want to make sure to move
         // the stack to the front.
-        final boolean wasFront = isFrontStack(prevStack)
+        final boolean wasFront = isFrontStackOnDisplay(prevStack)
                 && (prevStack.topRunningActivityLocked() == r);
 
         if (stackId == DOCKED_STACK_ID && !task.isResizeable()) {
@@ -3772,12 +3777,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);
             }
@@ -4446,8 +4455,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));
@@ -4455,7 +4465,7 @@
             removeFromDisplayLocked();
 
             mActivityDisplay = activityDisplay;
-            mStack.reparent(activityDisplay, ON_TOP);
+            mStack.reparent(activityDisplay, onTop);
         }
 
         @Override
@@ -4637,8 +4647,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 */
@@ -4732,6 +4740,10 @@
             }
             return mDisplayAccessUIDs;
         }
+
+        boolean shouldDestroyContentOnRemove() {
+            return mDisplay.getRemoveMode() == REMOVE_MODE_DESTROY_CONTENT;
+        }
     }
 
     class VirtualActivityDisplay extends ActivityDisplay {
@@ -4908,24 +4920,4 @@
         }
         return topActivityTokens;
     }
-
-    public IBinder getTopVisibleActivity(int uid) {
-        // TODO(b/33197203): get rid of DEFAULT_DISPLAY here?. Used in
-        // VoiceInteractionManagerServiceImpl#showSessionLocked.
-        final ActivityDisplay display = mActivityDisplays.get(DEFAULT_DISPLAY);
-        if (display == null) {
-            return null;
-        }
-        final ArrayList<ActivityStack> stacks = display.mStacks;
-        for (int i = stacks.size() - 1; i >= 0; i--) {
-            ActivityStack stack = stacks.get(i);
-            if (stack.getStackVisibilityLocked(null) == ActivityStack.STACK_VISIBLE) {
-                ActivityRecord top = stack.topActivity();
-                if (top != null && stack == mFocusedStack && top.app.uid == uid) {
-                    return top.appToken;
-                }
-            }
-        }
-        return null;
-    }
 }
diff --git a/services/core/java/com/android/server/am/ActivityStarter.java b/services/core/java/com/android/server/am/ActivityStarter.java
index 73ef88b..4b07af0 100644
--- a/services/core/java/com/android/server/am/ActivityStarter.java
+++ b/services/core/java/com/android/server/am/ActivityStarter.java
@@ -25,6 +25,7 @@
 import static android.app.ActivityManager.START_SUCCESS;
 import static android.app.ActivityManager.START_TASK_TO_FRONT;
 import static android.app.ActivityManager.StackId;
+import static android.app.ActivityManager.StackId.ASSISTANT_STACK_ID;
 import static android.app.ActivityManager.StackId.DOCKED_STACK_ID;
 import static android.app.ActivityManager.StackId.FREEFORM_WORKSPACE_STACK_ID;
 import static android.app.ActivityManager.StackId.FULLSCREEN_WORKSPACE_STACK_ID;
@@ -69,6 +70,7 @@
 import static com.android.server.am.ActivityManagerDebugConfig.TAG_WITH_CLASS_NAME;
 import static com.android.server.am.ActivityManagerService.ANIMATE;
 import static com.android.server.am.ActivityRecord.APPLICATION_ACTIVITY_TYPE;
+import static com.android.server.am.ActivityRecord.ASSISTANT_ACTIVITY_TYPE;
 import static com.android.server.am.ActivityRecord.HOME_ACTIVITY_TYPE;
 import static com.android.server.am.ActivityRecord.RECENTS_ACTIVITY_TYPE;
 import static com.android.server.am.ActivityStack.ActivityState.RESUMED;
@@ -1090,8 +1092,8 @@
                 mIntent, mStartActivity.getUriPermissionsLocked(), mStartActivity.userId);
         mService.grantEphemeralAccessLocked(mStartActivity.userId, mIntent,
                 mStartActivity.appInfo.uid, UserHandle.getAppId(mCallingUid));
-        if (mSourceRecord != null && mSourceRecord.isRecentsActivity()) {
-            mStartActivity.task.setTaskToReturnTo(RECENTS_ACTIVITY_TYPE);
+        if (mSourceRecord != null) {
+            mStartActivity.task.setTaskToReturnTo(mSourceRecord);
         }
         if (newTask) {
             EventLog.writeEvent(
@@ -1498,23 +1500,20 @@
 
     private void updateTaskReturnToType(
             TaskRecord task, int launchFlags, ActivityStack focusedStack) {
-        if (focusedStack != null && focusedStack.isHomeOrRecentsStack()
-                && focusedStack.topTask() != null && focusedStack.topTask().isOnTopLauncher()) {
-            // Since an on-top launcher will is moved to back when tasks are launched from it,
-            // those tasks should first try to return to a non-home activity.
-            // This also makes sure that non-home activities are visible under a transparent
-            // non-home activity.
-            task.setTaskToReturnTo(APPLICATION_ACTIVITY_TYPE);
-            return;
-        } else if ((launchFlags & (FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_TASK_ON_HOME))
+        if ((launchFlags & (FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_TASK_ON_HOME))
                 == (FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_TASK_ON_HOME)) {
             // Caller wants to appear on home activity.
             task.setTaskToReturnTo(HOME_ACTIVITY_TYPE);
             return;
-        } else if (focusedStack == null || focusedStack.mStackId == HOME_STACK_ID) {
+        } else if (focusedStack == null || focusedStack.isHomeStack()) {
             // Task will be launched over the home stack, so return home.
             task.setTaskToReturnTo(HOME_ACTIVITY_TYPE);
             return;
+        } else if (focusedStack != null && focusedStack != task.getStack() &&
+                focusedStack.isAssistantStack()) {
+            // Task was launched over the assistant stack, so return there
+            task.setTaskToReturnTo(ASSISTANT_ACTIVITY_TYPE);
+            return;
         }
 
         // Else we are coming from an application stack so return to an application.
@@ -1615,7 +1614,7 @@
                     mNewTaskInfo != null ? mNewTaskInfo : mStartActivity.info,
                     mNewTaskIntent != null ? mNewTaskIntent : mIntent, mVoiceSession,
                     mVoiceInteractor, !mLaunchTaskBehind /* toTop */, mStartActivity.mActivityType);
-            mStartActivity.setTask(task, taskToAffiliate);
+            addOrReparentStartingActivity(task, "setTaskFromReuseOrCreateNewTask - mReuseTask");
             if (mLaunchBounds != null) {
                 final int stackId = mTargetStack.mStackId;
                 if (StackId.resizeStackWithLaunchBounds(stackId)) {
@@ -1625,11 +1624,14 @@
                     mStartActivity.task.updateOverrideConfiguration(mLaunchBounds);
                 }
             }
-            if (DEBUG_TASKS) Slog.v(TAG_TASKS,
-                    "Starting new activity " +
-                            mStartActivity + " in new task " + mStartActivity.task);
+            if (DEBUG_TASKS) Slog.v(TAG_TASKS, "Starting new activity " + mStartActivity
+                    + " in new task " + mStartActivity.task);
         } else {
-            mStartActivity.setTask(mReuseTask, taskToAffiliate);
+            addOrReparentStartingActivity(mReuseTask, "setTaskFromReuseOrCreateNewTask");
+        }
+
+        if (taskToAffiliate != null) {
+            mStartActivity.setTaskToAffiliateWith(taskToAffiliate);
         }
 
         if (mSupervisor.isLockTaskModeViolation(mStartActivity.task)) {
@@ -1719,7 +1721,7 @@
 
         // An existing activity is starting this new activity, so we want to keep the new one in
         // the same task as the one that is starting it.
-        mStartActivity.setTask(sourceTask, null);
+        addOrReparentStartingActivity(sourceTask, "setTaskFromSourceRecord");
         if (DEBUG_TASKS) Slog.v(TAG_TASKS, "Starting new activity " + mStartActivity
                 + " in existing task " + mStartActivity.task + " from source " + mSourceRecord);
         return START_SUCCESS;
@@ -1752,7 +1754,8 @@
         // Check whether we should actually launch the new activity in to the task,
         // or just reuse the current activity on top.
         ActivityRecord top = mInTask.getTopActivity();
-        if (top != null && top.realActivity.equals(mStartActivity.realActivity) && top.userId == mStartActivity.userId) {
+        if (top != null && top.realActivity.equals(mStartActivity.realActivity)
+                && top.userId == mStartActivity.userId) {
             if ((mLaunchFlags & FLAG_ACTIVITY_SINGLE_TOP) != 0
                     || mLaunchSingleTop || mLaunchSingleTask) {
                 ActivityStack.logStartActivity(AM_NEW_INTENT, top, top.task);
@@ -1761,7 +1764,8 @@
                     // anything if that is the case, so this is it!
                     return START_RETURN_INTENT_TO_CALLER;
                 }
-                top.deliverNewIntentLocked(mCallingUid, mStartActivity.intent, mStartActivity.launchedFromPackage);
+                top.deliverNewIntentLocked(mCallingUid, mStartActivity.intent,
+                        mStartActivity.launchedFromPackage);
                 return START_DELIVERED_TO_TOP;
             }
         }
@@ -1773,9 +1777,9 @@
             return START_TASK_TO_FRONT;
         }
 
-        mStartActivity.setTask(mInTask, null);
-        if (DEBUG_TASKS) Slog.v(TAG_TASKS,
-                "Starting new activity " + mStartActivity + " in explicit task " + mStartActivity.task);
+        addOrReparentStartingActivity(mInTask, "setTaskFromInTask");
+        if (DEBUG_TASKS) Slog.v(TAG_TASKS, "Starting new activity " + mStartActivity
+                + " in explicit task " + mStartActivity.task);
 
         return START_SUCCESS;
     }
@@ -1790,10 +1794,18 @@
         final TaskRecord task = (prev != null) ? prev.task : mTargetStack.createTaskRecord(
                 mSupervisor.getNextTaskIdForUserLocked(mStartActivity.userId), mStartActivity.info,
                 mIntent, null, null, true, mStartActivity.mActivityType);
-        mStartActivity.setTask(task, null);
-        mStartActivity.task.getStack().positionChildWindowContainerAtTop(mStartActivity.task);
-        if (DEBUG_TASKS) Slog.v(TAG_TASKS,
-                "Starting new activity " + mStartActivity + " in new guessed " + mStartActivity.task);
+        addOrReparentStartingActivity(task, "setTaskToCurrentTopOrCreateNewTask");
+        mTargetStack.positionChildWindowContainerAtTop(task);
+        if (DEBUG_TASKS) Slog.v(TAG_TASKS, "Starting new activity " + mStartActivity
+                + " in new guessed " + mStartActivity.task);
+    }
+
+    private void addOrReparentStartingActivity(TaskRecord parent, String reason) {
+        if (mStartActivity.task == null || mStartActivity.task == parent) {
+            parent.addActivityToTop(mStartActivity);
+        } else {
+            mStartActivity.reparent(parent, parent.mActivities.size() /* top */, reason);
+        }
     }
 
     private int adjustLaunchFlagsToDocumentMode(ActivityRecord r, boolean launchSingleInstance,
@@ -1843,13 +1855,6 @@
     private ActivityStack computeStackFocus(ActivityRecord r, boolean newTask, Rect bounds,
             int launchFlags, ActivityOptions aOptions) {
         final TaskRecord task = r.task;
-        if (r.isRecentsActivity()) {
-            return mSupervisor.getStack(RECENTS_STACK_ID, CREATE_IF_NEEDED, ON_TOP);
-        }
-        if (r.isHomeActivity()) {
-            return mSupervisor.mHomeStack;
-        }
-
         ActivityStack stack = getLaunchStack(r, launchFlags, task, aOptions);
         if (stack != null) {
             return stack;
@@ -1922,6 +1927,9 @@
             case FULLSCREEN_WORKSPACE_STACK_ID:
                 canUseFocusedStack = true;
                 break;
+            case ASSISTANT_STACK_ID:
+                canUseFocusedStack = r.isAssistantActivity();
+                break;
             case DOCKED_STACK_ID:
                 canUseFocusedStack = r.supportsSplitScreen();
                 break;
@@ -1941,6 +1949,18 @@
     private ActivityStack getLaunchStack(ActivityRecord r, int launchFlags, TaskRecord task,
             ActivityOptions aOptions) {
 
+        // If the activity is of a specific type, return the associated stack, creating it if
+        // necessary
+        if (r.isHomeActivity()) {
+            return mSupervisor.mHomeStack;
+        }
+        if (r.isRecentsActivity()) {
+            return mSupervisor.getStack(RECENTS_STACK_ID, CREATE_IF_NEEDED, ON_TOP);
+        }
+        if (r.isAssistantActivity()) {
+            return mSupervisor.getStack(ASSISTANT_STACK_ID, CREATE_IF_NEEDED, ON_TOP);
+        }
+
         // We are reusing a task, keep the stack!
         if (mReuseTask != null) {
             return mReuseTask.getStack();
@@ -1991,7 +2011,7 @@
                 return mSupervisor.mFocusedStack;
             }
 
-            if (parentStack != null && parentStack.mStackId == DOCKED_STACK_ID) {
+            if (parentStack != null && parentStack.isDockedStack()) {
                 // If parent was in docked stack, the natural place to launch another activity
                 // will be fullscreen, so it can appear alongside the docked window.
                 return mSupervisor.getStack(FULLSCREEN_WORKSPACE_STACK_ID, CREATE_IF_NEEDED,
@@ -2027,6 +2047,8 @@
                 return r.supportsPictureInPicture();
             case RECENTS_STACK_ID:
                 return r.isRecentsActivity();
+            case ASSISTANT_STACK_ID:
+                return r.isAssistantActivity();
             default:
                 if (StackId.isDynamicStack(stackId)) {
                     return true;
diff --git a/services/core/java/com/android/server/am/AppErrors.java b/services/core/java/com/android/server/am/AppErrors.java
index 384f2f8..36a913f 100644
--- a/services/core/java/com/android/server/am/AppErrors.java
+++ b/services/core/java/com/android/server/am/AppErrors.java
@@ -357,7 +357,7 @@
              * If this process was running instrumentation, finish now - it will be handled in
              * {@link ActivityManagerService#handleAppDiedLocked}.
              */
-            if (r != null && r.instrumentationClass != null) {
+            if (r != null && r.instr != null) {
                 return;
             }
 
diff --git a/services/core/java/com/android/server/am/BatteryStatsService.java b/services/core/java/com/android/server/am/BatteryStatsService.java
index f1f8bb2..3571302 100644
--- a/services/core/java/com/android/server/am/BatteryStatsService.java
+++ b/services/core/java/com/android/server/am/BatteryStatsService.java
@@ -51,8 +51,8 @@
 import android.telephony.TelephonyManager;
 import android.util.IntArray;
 import android.util.Slog;
-
 import android.util.TimeUtils;
+
 import com.android.internal.annotations.GuardedBy;
 import com.android.internal.app.IBatteryStats;
 import com.android.internal.os.BatteryStatsHelper;
@@ -1127,6 +1127,7 @@
         pw.println("      full-history: include additional detailed events in battery history:");
         pw.println("          wake_lock_in, alarms and proc events");
         pw.println("      no-auto-reset: don't automatically reset stats when unplugged");
+        pw.println("      pretend-screen-off: pretend the screen is off, even if screen state changes");
     }
 
     private int doEnableOrDisable(PrintWriter pw, int i, String[] args, boolean enable) {
@@ -1144,6 +1145,10 @@
             synchronized (mStats) {
                 mStats.setNoAutoReset(enable);
             }
+        } else if ("pretend-screen-off".equals(args[i])) {
+            synchronized (mStats) {
+                mStats.setPretendScreenOff(enable);
+            }
         } else {
             pw.println("Unknown enable/disable option: " + args[i]);
             dumpHelp(pw);
diff --git a/services/core/java/com/android/server/am/CoreSettingsObserver.java b/services/core/java/com/android/server/am/CoreSettingsObserver.java
index 73a17c6..9b459d1 100644
--- a/services/core/java/com/android/server/am/CoreSettingsObserver.java
+++ b/services/core/java/com/android/server/am/CoreSettingsObserver.java
@@ -49,6 +49,7 @@
         // add other system settings here...
 
         sGlobalSettingToTypeMap.put(Settings.Global.DEBUG_VIEW_ATTRIBUTES, int.class);
+        sGlobalSettingToTypeMap.put(Settings.Global.WAIT_FOR_NETWORK_TIMEOUT_MS, long.class);
         // add other global settings here...
     }
 
@@ -56,6 +57,8 @@
 
     private final ActivityManagerService mActivityManagerService;
 
+    private static final long WAIT_FOR_NETWORK_TIMEOUT_DEFAULT_MS = 2000; // 2 sec
+
     public CoreSettingsObserver(ActivityManagerService activityManagerService) {
         super(activityManagerService.mHandler);
         mActivityManagerService = activityManagerService;
@@ -143,7 +146,13 @@
                 } else if (map == sSystemSettingToTypeMap) {
                     value = Settings.System.getLong(context.getContentResolver(), setting, 0);
                 } else {
-                    value = Settings.Global.getLong(context.getContentResolver(), setting, 0);
+                    // TODO: remove this conditional and set the default in settings provider.
+                    if (Settings.Global.WAIT_FOR_NETWORK_TIMEOUT_MS.equals(setting)) {
+                        value = Settings.Global.getLong(context.getContentResolver(), setting,
+                                WAIT_FOR_NETWORK_TIMEOUT_DEFAULT_MS);
+                    } else {
+                        value = Settings.Global.getLong(context.getContentResolver(), setting, 0);
+                    }
                 }
                 snapshot.putLong(setting, value);
             }
diff --git a/services/core/java/com/android/server/am/ProcessRecord.java b/services/core/java/com/android/server/am/ProcessRecord.java
index 49fe79c..2d27204 100644
--- a/services/core/java/com/android/server/am/ProcessRecord.java
+++ b/services/core/java/com/android/server/am/ProcessRecord.java
@@ -31,14 +31,11 @@
 import android.app.ActivityManager;
 import android.app.Dialog;
 import android.app.IApplicationThread;
-import android.app.IInstrumentationWatcher;
-import android.app.IUiAutomationConnection;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.pm.ApplicationInfo;
 import android.content.res.CompatibilityInfo;
 import android.os.Binder;
-import android.os.Bundle;
 import android.os.IBinder;
 import android.os.Process;
 import android.os.RemoteException;
@@ -46,7 +43,6 @@
 import android.os.Trace;
 import android.os.UserHandle;
 import android.util.ArrayMap;
-import android.util.PrintWriterPrinter;
 import android.util.TimeUtils;
 
 import java.io.PrintWriter;
@@ -116,8 +112,18 @@
     boolean repForegroundActivities; // Last reported foreground activities.
     boolean systemNoUi;         // This is a system process, but not currently showing UI.
     boolean hasShownUi;         // Has UI been shown in this process since it was started?
-    boolean hasTopUi;           // Is this process currently showing "top-level" UI that is not an
-                                // activity?
+    boolean hasTopUi;           // Is this process currently showing a non-activity UI that the user
+                                // is interacting with? E.g. The status bar when it is expanded, but
+                                // not when it is minimized. When true the
+                                // process will be set to use the ProcessList#SCHED_GROUP_TOP_APP
+                                // scheduling group to boost performance.
+    boolean hasOverlayUi;       // Is the process currently showing a non-activity UI that
+                                // overlays on-top of activity UIs on screen. E.g. display a window
+                                // of type
+                                // android.view.WindowManager.LayoutParams#TYPE_APPLICATION_OVERLAY
+                                // When true the process will oom adj score will be set to
+                                // ProcessList#PERCEPTIBLE_APP_ADJ at minimum to reduce the chance
+                                // of the process getting killed.
     boolean pendingUiClean;     // Want to clean up resources from showing UI?
     boolean hasAboveClient;     // Bound using BIND_ABOVE_CLIENT, so want to be lower
     boolean treatLikeActivity;  // Bound using BIND_TREAT_LIKE_ACTIVITY
@@ -135,13 +141,7 @@
     int lruSeq;                 // Sequence id for identifying LRU update cycles
     CompatibilityInfo compat;   // last used compatibility mode
     IBinder.DeathRecipient deathRecipient; // Who is watching for the death.
-    ComponentName instrumentationClass;// class installed to instrument app
-    ApplicationInfo instrumentationInfo; // the application being instrumented
-    String instrumentationProfileFile; // where to save profiling
-    IInstrumentationWatcher instrumentationWatcher; // who is waiting
-    IUiAutomationConnection instrumentationUiAutomationConnection; // Connection to use the UI introspection APIs.
-    Bundle instrumentationArguments;// as given to us
-    ComponentName instrumentationResultClass;// copy of instrumentationClass
+    ActiveInstrumentation instr;// Set to currently active instrumentation running in process
     boolean usingWrapper;       // Set to true when process was launched with a wrapper attached
     final ArraySet<BroadcastRecord> curReceivers = new ArraySet<BroadcastRecord>();// receivers currently running in the app
     long lastWakeTime;          // How long proc held wake lock at last check
@@ -248,19 +248,8 @@
             pw.println("}");
         }
         pw.print(prefix); pw.print("compat="); pw.println(compat);
-        if (instrumentationClass != null || instrumentationProfileFile != null
-                || instrumentationArguments != null) {
-            pw.print(prefix); pw.print("instrumentationClass=");
-                    pw.print(instrumentationClass);
-                    pw.print(" instrumentationProfileFile=");
-                    pw.println(instrumentationProfileFile);
-            pw.print(prefix); pw.print("instrumentationArguments=");
-                    pw.println(instrumentationArguments);
-            pw.print(prefix); pw.print("instrumentationInfo=");
-                    pw.println(instrumentationInfo);
-            if (instrumentationInfo != null) {
-                instrumentationInfo.dump(new PrintWriterPrinter(pw), prefix + "  ");
-            }
+        if (instr != null) {
+            pw.print(prefix); pw.print("instr="); pw.println(instr);
         }
         pw.print(prefix); pw.print("thread="); pw.println(thread);
         pw.print(prefix); pw.print("pid="); pw.print(pid); pw.print(" starting=");
@@ -442,6 +431,9 @@
         if (hasTopUi) {
             pw.print(prefix); pw.print("hasTopUi="); pw.print(hasTopUi);
         }
+        if (hasOverlayUi) {
+            pw.print(prefix); pw.print("hasOverlayUi="); pw.print(hasOverlayUi);
+        }
     }
 
     ProcessRecord(BatteryStatsImpl _batteryStats, ApplicationInfo _info,
diff --git a/services/core/java/com/android/server/am/TaskRecord.java b/services/core/java/com/android/server/am/TaskRecord.java
index fef4073..f8645d6 100644
--- a/services/core/java/com/android/server/am/TaskRecord.java
+++ b/services/core/java/com/android/server/am/TaskRecord.java
@@ -35,7 +35,6 @@
 import android.content.pm.PackageManager;
 import android.content.res.Configuration;
 import android.graphics.Bitmap;
-import android.graphics.GraphicBuffer;
 import android.graphics.Point;
 import android.graphics.Rect;
 import android.os.Debug;
@@ -51,6 +50,8 @@
 import com.android.internal.app.IVoiceInteractor;
 import com.android.internal.util.XmlUtils;
 
+import com.android.server.wm.AppWindowContainerController;
+import com.android.server.wm.StackWindowController;
 import com.android.server.wm.TaskWindowContainerController;
 import com.android.server.wm.TaskWindowContainerListener;
 
@@ -65,6 +66,7 @@
 import java.util.Objects;
 
 import static android.app.ActivityManager.RESIZE_MODE_FORCED;
+import static android.app.ActivityManager.StackId.ASSISTANT_STACK_ID;
 import static android.app.ActivityManager.StackId.DOCKED_STACK_ID;
 import static android.app.ActivityManager.StackId.FREEFORM_WORKSPACE_STACK_ID;
 import static android.app.ActivityManager.StackId.FULLSCREEN_WORKSPACE_STACK_ID;
@@ -74,7 +76,6 @@
 import static android.app.ActivityManager.StackId.RECENTS_STACK_ID;
 import static android.content.Intent.FLAG_ACTIVITY_NEW_DOCUMENT;
 import static android.content.Intent.FLAG_ACTIVITY_RETAIN_IN_RECENTS;
-import static android.content.pm.ActivityInfo.FLAG_ON_TOP_LAUNCHER;
 import static android.content.pm.ActivityInfo.FLAG_RELINQUISH_TASK_IDENTITY;
 import static android.content.pm.ActivityInfo.LOCK_TASK_LAUNCH_MODE_ALWAYS;
 import static android.content.pm.ActivityInfo.LOCK_TASK_LAUNCH_MODE_DEFAULT;
@@ -101,6 +102,7 @@
 import static com.android.server.am.ActivityManagerDebugConfig.TAG_AM;
 import static com.android.server.am.ActivityManagerDebugConfig.TAG_WITH_CLASS_NAME;
 import static com.android.server.am.ActivityRecord.APPLICATION_ACTIVITY_TYPE;
+import static com.android.server.am.ActivityRecord.ASSISTANT_ACTIVITY_TYPE;
 import static com.android.server.am.ActivityRecord.HOME_ACTIVITY_TYPE;
 import static com.android.server.am.ActivityRecord.RECENTS_ACTIVITY_TYPE;
 import static com.android.server.am.ActivityRecord.STARTING_WINDOW_SHOWN;
@@ -190,17 +192,15 @@
 
     int mResizeMode;        // The resize mode of this task and its activities.
                             // Based on the {@link ActivityInfo#resizeMode} of the root activity.
-    boolean mSupportsPictureInPicture;  // Whether or not this task and its activities support PiP.
-            // Based on the {@link ActivityInfo#FLAG_SUPPORTS_PICTURE_IN_PICTURE} flag of the root
-            // activity.
+    private boolean mSupportsPictureInPicture;  // Whether or not this task and its activities
+            // support PiP. Based on the {@link ActivityInfo#FLAG_SUPPORTS_PICTURE_IN_PICTURE} flag
+            // of the root activity.
     boolean mTemporarilyUnresizable; // Separate flag from mResizeMode used to suppress resize
                                      // changes on a temporary basis.
     private int mLockTaskMode;  // Which tasklock mode to launch this task in. One of
                                 // ActivityManager.LOCK_TASK_LAUNCH_MODE_*
     private boolean mPrivileged;    // The root activity application of this task holds
                                     // privileged permissions.
-    private boolean mIsOnTopLauncher; // Whether this task is an on-top launcher. See
-                                      // android.R.attr#onTopLauncher.
 
     /** Can't be put in lockTask mode. */
     final static int LOCK_TASK_AUTH_DONT_LOCK = 0;
@@ -278,7 +278,6 @@
     private final Rect mTmpStableBounds = new Rect();
     private final Rect mTmpNonDecorBounds = new Rect();
     private final Rect mTmpRect = new Rect();
-    private final Rect mTmpRect2 = new Rect();
 
     // Last non-fullscreen bounds the task was launched in or resized to.
     // The information is persisted and used to determine the appropriate stack to launch the
@@ -423,8 +422,8 @@
         final Configuration overrideConfig = getOverrideConfiguration();
         mWindowContainerController = new TaskWindowContainerController(taskId, this,
                 getStack().getWindowContainerController(), userId, bounds, overrideConfig,
-                mResizeMode, mSupportsPictureInPicture, isHomeTask(), isOnTopLauncher(),
-                onTop, showForAllUsers, lastTaskDescription);
+                mResizeMode, mSupportsPictureInPicture, isHomeTask(), onTop, showForAllUsers,
+                lastTaskDescription);
     }
 
     void removeWindowContainer() {
@@ -687,7 +686,6 @@
         }
         mResizeMode = info.resizeMode;
         mSupportsPictureInPicture = info.supportsPictureInPicture();
-        mIsOnTopLauncher = (info.flags & FLAG_ON_TOP_LAUNCHER) != 0;
         mLockTaskMode = info.lockTaskLaunchMode;
         mPrivileged = (info.applicationInfo.privateFlags & PRIVATE_FLAG_PRIVILEGED) != 0;
         setLockTaskAuth();
@@ -722,6 +720,14 @@
                 ? HOME_ACTIVITY_TYPE : taskToReturnTo;
     }
 
+    void setTaskToReturnTo(ActivityRecord source) {
+        if (source.isRecentsActivity()) {
+            setTaskToReturnTo(RECENTS_ACTIVITY_TYPE);
+        } else if (source.isAssistantActivity()) {
+            setTaskToReturnTo(ASSISTANT_ACTIVITY_TYPE);
+        }
+    }
+
     int getTaskToReturnTo() {
         return mTaskToReturnTo;
     }
@@ -972,18 +978,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);
@@ -1000,9 +997,6 @@
             // activity, make the bottom activity front.
             mActivities.get(0).frontOfTask = true;
         }
-        if (newTop != null) {
-            newTop.frontOfTask = true;
-        }
     }
 
     /**
@@ -1017,7 +1011,7 @@
         mActivities.add(newTop);
         updateEffectiveIntent();
 
-        setFrontOfTask(newTop);
+        setFrontOfTask();
     }
 
     void addActivityAtBottom(ActivityRecord r) {
@@ -1033,6 +1027,12 @@
      * be in the current task or unparented to any task.
      */
     void addActivityAtIndex(int index, ActivityRecord r) {
+        if (r.task != null && r.task != this) {
+            throw new IllegalArgumentException("Can not add r=" + " to task=" + this
+                    + " current parent=" + r.task);
+        }
+        r.task = this;
+
         // Remove r first, and if it wasn't already in the list and it's fullscreen, count it.
         if (!mActivities.remove(r) && r.fullscreen) {
             // Was not previously in list.
@@ -1063,6 +1063,7 @@
             }
         }
 
+        index = Math.min(size, index);
         mActivities.add(index, r);
         updateEffectiveIntent();
         if (r.isPersistable()) {
@@ -1071,7 +1072,12 @@
 
         // Sync. with window manager
         updateOverrideConfigurationFromLaunchBounds();
-        mWindowContainerController.positionChildAt(r.getWindowContainerController(), index);
+        final AppWindowContainerController appController = r.getWindowContainerController();
+        if (appController != null) {
+            // Only attempt to move in WM if the child has a controller. It is possible we haven't
+            // created controller for the activity we are starting yet.
+            mWindowContainerController.positionChildAt(appController, index);
+        }
         r.onOverrideConfigurationSent();
     }
 
@@ -1291,6 +1297,10 @@
         return taskType == RECENTS_ACTIVITY_TYPE;
     }
 
+    boolean isAssistantTask() {
+        return taskType == ASSISTANT_ACTIVITY_TYPE;
+    }
+
     boolean isApplicationTask() {
         return taskType == APPLICATION_ACTIVITY_TYPE;
     }
@@ -1299,6 +1309,10 @@
         return mTaskToReturnTo == HOME_ACTIVITY_TYPE;
     }
 
+    boolean isOverAssistantStack() {
+        return mTaskToReturnTo == ASSISTANT_ACTIVITY_TYPE;
+    }
+
     private boolean isResizeable(boolean checkSupportsPip) {
         return (mService.mForceResizableActivities || ActivityInfo.isResizeableMode(mResizeMode)
                 || (checkSupportsPip && mSupportsPictureInPicture)) && !mTemporarilyUnresizable;
@@ -1322,7 +1336,7 @@
      * @param bounds The bounds to be tested.
      * @return True if the requested bounds are okay for a resizing request.
      */
-    boolean canResizeToBounds(Rect bounds) {
+    private boolean canResizeToBounds(Rect bounds) {
         if (bounds == null || getStackId() != FREEFORM_WORKSPACE_STACK_ID) {
             // Note: If not on the freeform workspace, we ignore the bounds.
             return true;
@@ -1335,10 +1349,6 @@
                 && (mResizeMode != RESIZE_MODE_FORCE_RESIZABLE_LANDSCAPE_ONLY || landscape);
     }
 
-    boolean isOnTopLauncher() {
-        return isHomeTask() && mIsOnTopLauncher;
-    }
-
     /**
      * Find the activity in the history stack within the given task.  Returns
      * the index within the history at which it's found, or < 0 if not found.
@@ -1827,66 +1837,38 @@
         return !mTmpConfig.equals(newConfig);
     }
 
-    private void subtractNonDecorInsets(Rect inOutBounds, Rect inInsetBounds,
-                                        boolean overrideWidth, boolean overrideHeight) {
-        mTmpRect2.set(inInsetBounds);
-        mService.mWindowManager.subtractNonDecorInsets(mTmpRect2);
-        int leftInset = mTmpRect2.left - inInsetBounds.left;
-        int topInset = mTmpRect2.top - inInsetBounds.top;
-        int rightInset = overrideWidth ? 0 : inInsetBounds.right - mTmpRect2.right;
-        int bottomInset = overrideHeight ? 0 : inInsetBounds.bottom - mTmpRect2.bottom;
-        inOutBounds.inset(leftInset, topInset, rightInset, bottomInset);
-    }
-
-    private void subtractStableInsets(Rect inOutBounds, Rect inInsetBounds,
-                                      boolean overrideWidth, boolean overrideHeight) {
-        mTmpRect2.set(inInsetBounds);
-        mService.mWindowManager.subtractStableInsets(mTmpRect2);
-        int leftInset = mTmpRect2.left - inInsetBounds.left;
-        int topInset = mTmpRect2.top - inInsetBounds.top;
-        int rightInset = overrideWidth ? 0 : inInsetBounds.right - mTmpRect2.right;
-        int bottomInset = overrideHeight ? 0 : inInsetBounds.bottom - mTmpRect2.bottom;
-        inOutBounds.inset(leftInset, topInset, rightInset, bottomInset);
-    }
-
     /** Clears passed config and fills it with new override values. */
     private void calculateOverrideConfig(Configuration config, Rect bounds, Rect insetBounds,
             boolean overrideWidth, boolean overrideHeight) {
         mTmpNonDecorBounds.set(bounds);
         mTmpStableBounds.set(bounds);
 
-        final Configuration parentConfig = getParent().getConfiguration();
         config.unset();
+        final Configuration parentConfig = getParent().getConfiguration();
         final float density = parentConfig.densityDpi * DisplayMetrics.DENSITY_DEFAULT_SCALE;
-        final boolean isFloatingTask = mStack != null && StackId.tasksAreFloating(mStack.mStackId);
-        if (isFloatingTask) {
-            // Floating tasks should not be resized to the screen's bounds.
-            config.screenWidthDp = (int) (mTmpStableBounds.width() / density);
-            config.screenHeightDp = (int) (mTmpStableBounds.height() / density);
-        } else {
-            // For calculating screenWidthDp, screenWidthDp, we use the stable inset screen area,
-            // i.e. the screen area without the system bars.
-            // Additionally task dimensions should not be bigger than its parents dimensions.
-            subtractNonDecorInsets(mTmpNonDecorBounds, insetBounds != null ? insetBounds : bounds,
-                    overrideWidth, overrideHeight);
-            subtractStableInsets(mTmpStableBounds, insetBounds != null ? insetBounds : bounds,
-                    overrideWidth, overrideHeight);
-            config.screenWidthDp = Math.min(
-                    (int) (mTmpStableBounds.width() / density), parentConfig.screenWidthDp);
-            config.screenHeightDp = Math.min(
-                    (int) (mTmpStableBounds.height() / density), parentConfig.screenHeightDp);
-        }
 
         // TODO: Orientation?
         config.orientation = (config.screenWidthDp <= config.screenHeightDp)
                 ? Configuration.ORIENTATION_PORTRAIT
                 : Configuration.ORIENTATION_LANDSCAPE;
+        if (mStack != null) {
+            final StackWindowController stackController = mStack.getWindowContainerController();
+            stackController.adjustConfigurationForBounds(bounds, insetBounds,
+                    mTmpNonDecorBounds, mTmpStableBounds, overrideWidth, overrideHeight, density,
+                    config, parentConfig);
+        } else {
+            // No stack, give some default values
+            config.smallestScreenWidthDp =
+                    mService.mStackSupervisor.mDefaultMinSizeOfResizeableTask;
+            config.screenWidthDp = config.screenHeightDp = config.smallestScreenWidthDp;
+            Slog.wtf(TAG, "Expected stack when caclulating override config");
+        }
 
         // For calculating screen layout, we need to use the non-decor inset screen area for the
         // calculation for compatibility reasons, i.e. screen area without system bars that could
         // never go away in Honeycomb.
-        final int compatScreenWidthDp = (int)(mTmpNonDecorBounds.width() / density);
-        final int compatScreenHeightDp = (int)(mTmpNonDecorBounds.height() / density);
+        final int compatScreenWidthDp = (int) (mTmpNonDecorBounds.width() / density);
+        final int compatScreenHeightDp = (int) (mTmpNonDecorBounds.height() / density);
         // We're only overriding LONG, SIZE and COMPAT parts of screenLayout, so we start override
         // calculation with partial default.
         final int sl = Configuration.SCREENLAYOUT_LONG_YES | Configuration.SCREENLAYOUT_SIZE_XLARGE;
@@ -1894,8 +1876,6 @@
         final int shortSize = Math.min(compatScreenHeightDp, compatScreenWidthDp);
         config.screenLayout = Configuration.reduceScreenLayout(sl, longSize, shortSize);
 
-        config.smallestScreenWidthDp = mService.mWindowManager.getSmallestWidthForTaskBounds(
-                insetBounds != null ? insetBounds : bounds);
     }
 
     /**
@@ -1969,6 +1949,9 @@
         if (isHomeTask()) {
             return HOME_STACK_ID;
         }
+        if (isAssistantTask()) {
+            return ASSISTANT_STACK_ID;
+        }
         if (mBounds != null) {
             return FREEFORM_WORKSPACE_STACK_ID;
         }
@@ -1989,6 +1972,7 @@
         final int stackId = mStack.mStackId;
         if (stackId == HOME_STACK_ID
                 || stackId == RECENTS_STACK_ID
+                || stackId == ASSISTANT_STACK_ID
                 || stackId == FULLSCREEN_WORKSPACE_STACK_ID
                 || (stackId == DOCKED_STACK_ID && !isResizeable())) {
             return isResizeable() ? mStack.mBounds : null;
diff --git a/services/core/java/com/android/server/am/UidRecord.java b/services/core/java/com/android/server/am/UidRecord.java
index 64e3417..1e16bc9 100644
--- a/services/core/java/com/android/server/am/UidRecord.java
+++ b/services/core/java/com/android/server/am/UidRecord.java
@@ -17,8 +17,12 @@
 package com.android.server.am;
 
 import android.app.ActivityManager;
+import android.app.ActivityThread;
+import android.app.IApplicationThread;
+import android.os.RemoteCallbackList;
 import android.os.SystemClock;
 import android.os.UserHandle;
+import android.util.DebugUtils;
 import android.util.TimeUtils;
 
 /**
@@ -26,7 +30,6 @@
  */
 public final class UidRecord {
     final int uid;
-    final boolean persistent;
     int curProcState;
     int setProcState = ActivityManager.PROCESS_STATE_NONEXISTENT;
     long lastBackgroundTime;
@@ -35,6 +38,27 @@
     boolean setWhitelist;
     boolean idle;
     int numProcs;
+    /**
+     * Seq no. associated with the current process state change (from background to foreground or
+     * vice versa).
+     */
+    long curProcStateSeq;
+    /**
+     * Latest seq number for which NetworkPolicyManagerService notified ActivityManagerService that
+     * network policy rules are updated.
+     */
+    long lastProcStateSeqWithUpdatedNetworkState;
+    /**
+     * Current block state indicating whether components in the process corresponding to this
+     * uidRecord needs to block for network or unblock or if there is no change.
+     * value will be one of {@link ActivityThread#NETWORK_STATE_BLOCK},
+     * {@link ActivityThread#NETWORK_STATE_UNBLOCK}, {@link ActivityThread#NETWORK_STATE_NO_CHANGE}.
+     */
+    int blockState;
+    /** Indicates whether app threads need be notified of the current blockState change. */
+    boolean shouldNotifyAppThreads;
+    /** Listeners waiting for the network policy rules to get updated. */
+    RemoteCallbackList<IApplicationThread> appThreadListeners;
 
     static final int CHANGE_PROCSTATE = 0;
     static final int CHANGE_GONE = 1;
@@ -48,13 +72,13 @@
         int change;
         int processState;
         boolean ephemeral;
+        long procStateSeq;
     }
 
     ChangeItem pendingChange;
 
-    public UidRecord(int _uid, boolean _persist) {
+    public UidRecord(int _uid) {
         uid = _uid;
-        persistent = _persist;
         reset();
     }
 
@@ -85,6 +109,14 @@
         }
         sb.append(" procs:");
         sb.append(numProcs);
+        sb.append(" procStateSeq:");
+        sb.append(curProcStateSeq);
+        sb.append(" lastProcStateSeqWithUpdatedNetworkState:");
+        sb.append(lastProcStateSeqWithUpdatedNetworkState);
+        sb.append(" blockState:");
+        sb.append(DebugUtils.valueToString(ActivityThread.class, "NETWORK_STATE_", blockState));
+        sb.append(" shouldNotifyAppThreads:");
+        sb.append(shouldNotifyAppThreads);
         sb.append("}");
         return sb.toString();
     }
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java
index ef792b0..5b3495f 100644
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -43,6 +43,7 @@
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
 import android.content.pm.UserInfo;
 import android.content.res.Configuration;
 import android.content.res.Resources;
@@ -72,6 +73,7 @@
 import android.media.MediaPlayer;
 import android.media.SoundPool;
 import android.media.VolumePolicy;
+import android.media.audiofx.AudioEffect;
 import android.media.MediaPlayer.OnCompletionListener;
 import android.media.MediaPlayer.OnErrorListener;
 import android.media.PlayerBase;
@@ -723,6 +725,9 @@
             RotationHelper.init(mContext, mAudioHandler);
         }
 
+        intentFilter.addAction(AudioEffect.ACTION_OPEN_AUDIO_EFFECT_CONTROL_SESSION);
+        intentFilter.addAction(AudioEffect.ACTION_CLOSE_AUDIO_EFFECT_CONTROL_SESSION);
+
         context.registerReceiverAsUser(mReceiver, UserHandle.ALL, intentFilter, null, null);
 
         LocalServices.addService(AudioManagerInternal.class, new AudioServiceInternal());
@@ -778,7 +783,8 @@
                 0,
                 0,
                 TAG,
-                SAFE_VOLUME_CONFIGURE_TIMEOUT_MS);
+                SystemProperties.getBoolean("audio.safemedia.bypass", false) ?
+                        0 : SAFE_VOLUME_CONFIGURE_TIMEOUT_MS);
 
         initA11yMonitoring();
         onIndicateSystemReady();
@@ -1164,7 +1170,7 @@
         // Check the current user restriction.
         boolean masterMute =
                 mUserManagerInternal.getUserRestriction(currentUser,
-                        UserManager.DISALLLOW_UNMUTE_DEVICE)
+                        UserManager.DISALLOW_UNMUTE_DEVICE)
                         || mUserManagerInternal.getUserRestriction(currentUser,
                         UserManager.DISALLOW_ADJUST_VOLUME);
         if (mUseFixedVolume) {
@@ -5461,6 +5467,9 @@
                         state == BluetoothAdapter.STATE_TURNING_OFF) {
                     disconnectAllBluetoothProfiles();
                 }
+            } else if (action.equals(AudioEffect.ACTION_OPEN_AUDIO_EFFECT_CONTROL_SESSION) ||
+                    action.equals(AudioEffect.ACTION_CLOSE_AUDIO_EFFECT_CONTROL_SESSION)) {
+                handleAudioEffectBroadcast(context, intent);
             }
         }
     } // end class AudioServiceBroadcastReceiver
@@ -5485,10 +5494,10 @@
             {
                 final boolean wasRestricted =
                         prevRestrictions.getBoolean(UserManager.DISALLOW_ADJUST_VOLUME)
-                                || prevRestrictions.getBoolean(UserManager.DISALLLOW_UNMUTE_DEVICE);
+                                || prevRestrictions.getBoolean(UserManager.DISALLOW_UNMUTE_DEVICE);
                 final boolean isRestricted =
                         newRestrictions.getBoolean(UserManager.DISALLOW_ADJUST_VOLUME)
-                                || newRestrictions.getBoolean(UserManager.DISALLLOW_UNMUTE_DEVICE);
+                                || newRestrictions.getBoolean(UserManager.DISALLOW_UNMUTE_DEVICE);
                 if (wasRestricted != isRestricted) {
                     setMasterMuteInternalNoCallerCheck(isRestricted, /* flags =*/ 0, userId);
                 }
@@ -5496,6 +5505,27 @@
         }
     } // end class AudioServiceUserRestrictionsListener
 
+    private void handleAudioEffectBroadcast(Context context, Intent intent) {
+        String target = intent.getPackage();
+        if (target != null) {
+            Log.w(TAG, "effect broadcast already targeted to " + target);
+            return;
+        }
+        intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
+        // TODO this should target a user-selected panel
+        List<ResolveInfo> ril = context.getPackageManager().queryBroadcastReceivers(
+                intent, 0 /* flags */);
+        if (ril != null && ril.size() != 0) {
+            ResolveInfo ri = ril.get(0);
+            if (ri != null && ri.activityInfo != null && ri.activityInfo.packageName != null) {
+                intent.setPackage(ri.activityInfo.packageName);
+                context.sendBroadcastAsUser(intent, UserHandle.ALL);
+                return;
+            }
+        }
+        Log.w(TAG, "couldn't find receiver package for effect intent");
+    }
+
     private void killBackgroundUserProcessesWithRecordAudioPermission(UserInfo oldUser) {
         PackageManager pm = mContext.getPackageManager();
         // Find the home activity of the user. It should not be killed to avoid expensive restart,
@@ -5933,7 +5963,7 @@
         final AccessibilityManager accessibilityManager =
                 (AccessibilityManager) mContext.getSystemService(Context.ACCESSIBILITY_SERVICE);
         updateDefaultStreamOverrideDelay(accessibilityManager.isTouchExplorationEnabled());
-        updateA11yVolumeAlias(accessibilityManager.isEnabled());
+        updateA11yVolumeAlias(accessibilityManager.isAccessibilityVolumeStreamActive());
         accessibilityManager.addTouchExplorationStateChangeListener(this);
         accessibilityManager.addAccessibilityServicesStateChangeListener(this);
     }
@@ -6066,6 +6096,7 @@
         pw.print("  mSafeMediaVolumeState=");
         pw.println(safeMediaVolumeStateToString(mSafeMediaVolumeState));
         pw.print("  mSafeMediaVolumeIndex="); pw.println(mSafeMediaVolumeIndex);
+        pw.print("  sIndependentA11yVolume="); pw.println(sIndependentA11yVolume);
         pw.print("  mPendingVolumeCommand="); pw.println(mPendingVolumeCommand);
         pw.print("  mMusicActiveMs="); pw.println(mMusicActiveMs);
         pw.print("  mMcc="); pw.println(mMcc);
diff --git a/services/core/java/com/android/server/audio/MediaFocusControl.java b/services/core/java/com/android/server/audio/MediaFocusControl.java
index a1c5653..b4feef3 100644
--- a/services/core/java/com/android/server/audio/MediaFocusControl.java
+++ b/services/core/java/com/android/server/audio/MediaFocusControl.java
@@ -49,11 +49,18 @@
      * that they lost focus.
      */
     static final boolean ENFORCE_DUCKING = false;
+    /**
+     * set to true so the framework enforces muting media/game itself when the device is ringing
+     * or in a call.
+     */
+    static final boolean ENFORCE_MUTING_FOR_RING_OR_CALL = true;
 
     private final Context mContext;
     private final AppOpsManager mAppOps;
     private PlayerFocusEnforcer mFocusEnforcer; // never null
 
+    private boolean mRingOrCallActive = false;
+
     protected MediaFocusControl(Context cntxt, PlayerFocusEnforcer pfe) {
         mContext = cntxt;
         mAppOps = (AppOpsManager)mContext.getSystemService(Context.APP_OPS_SERVICE);
@@ -78,6 +85,16 @@
         mFocusEnforcer.unduckPlayers(winner);
     }
 
+    @Override
+    public void mutePlayersForCall(int[] usagesToMute) {
+        mFocusEnforcer.mutePlayersForCall(usagesToMute);
+    }
+
+    @Override
+    public void unmutePlayersForCall() {
+        mFocusEnforcer.unmutePlayersForCall();
+    }
+
     //==========================================================================================
     // AudioFocus
     //==========================================================================================
@@ -139,7 +156,9 @@
                 stackIterator.next().dump(pw);
             }
         }
-        pw.println("\n Notify on duck: " + mNotifyFocusOwnerOnDuck +"\n");
+        pw.println("\n");
+        pw.println(" Notify on duck:  " + mNotifyFocusOwnerOnDuck + "\n");
+        pw.println(" In ring or call: " + mRingOrCallActive + "\n");
     }
 
     /**
@@ -401,6 +420,18 @@
     }
 
     /**
+     * Delay after entering ringing or call mode after which the framework will mute streams
+     * that are still playing.
+     */
+    private static final int RING_CALL_MUTING_ENFORCEMENT_DELAY_MS = 100;
+
+    /**
+     * Usages to mute when the device rings or is in a call
+     */
+    private final static int[] USAGES_TO_MUTE_IN_RING_OR_CALL =
+        { AudioAttributes.USAGE_MEDIA, AudioAttributes.USAGE_GAME };
+
+    /**
      * Return the volume ramp time expected before playback with the given AudioAttributes would
      * start after gaining audio focus.
      * @param attr attributes of the sound about to start playing
@@ -452,6 +483,10 @@
         }
 
         synchronized(mAudioFocusLock) {
+            boolean enteringRingOrCall = !mRingOrCallActive
+                    & (AudioSystem.IN_VOICE_COMM_FOCUS_ID.compareTo(clientId) == 0);
+            if (enteringRingOrCall) { mRingOrCallActive = true; }
+
             boolean focusGrantDelayed = false;
             if (!canReassignAudioFocus()) {
                 if ((flags & AudioManager.AUDIOFOCUS_FLAG_DELAY_OK) == 0) {
@@ -523,6 +558,9 @@
             notifyExtPolicyFocusGrant_syncAf(nfr.toAudioFocusInfo(),
                     AudioManager.AUDIOFOCUS_REQUEST_GRANTED);
 
+            if (ENFORCE_MUTING_FOR_RING_OR_CALL & enteringRingOrCall) {
+                runAudioCheckerForRingOrCallAsync(true/*enteringRingOrCall*/);
+            }
         }//synchronized(mAudioFocusLock)
 
         return AudioManager.AUDIOFOCUS_REQUEST_GRANTED;
@@ -539,7 +577,15 @@
         try {
             // this will take care of notifying the new focus owner if needed
             synchronized(mAudioFocusLock) {
+                boolean exitingRingOrCall = mRingOrCallActive
+                        & (AudioSystem.IN_VOICE_COMM_FOCUS_ID.compareTo(clientId) == 0);
+                if (exitingRingOrCall) { mRingOrCallActive = false; }
+
                 removeFocusStackEntry(clientId, true /*signal*/, true /*notifyFocusFollowers*/);
+
+                if (ENFORCE_MUTING_FOR_RING_OR_CALL & exitingRingOrCall) {
+                    runAudioCheckerForRingOrCallAsync(false/*enteringRingOrCall*/);
+                }
             }
         } catch (java.util.ConcurrentModificationException cme) {
             // Catching this exception here is temporary. It is here just to prevent
@@ -559,4 +605,26 @@
         }
     }
 
+    private void runAudioCheckerForRingOrCallAsync(final boolean enteringRingOrCall) {
+        new Thread() {
+            public void run() {
+                if (enteringRingOrCall) {
+                    try {
+                        Thread.sleep(RING_CALL_MUTING_ENFORCEMENT_DELAY_MS);
+                    } catch (InterruptedException e) {
+                        e.printStackTrace();
+                    }
+                }
+                synchronized (mAudioFocusLock) {
+                    // since the new thread starting running the state could have changed, so
+                    // we need to check again mRingOrCallActive, not enteringRingOrCall
+                    if (mRingOrCallActive) {
+                        mFocusEnforcer.mutePlayersForCall(USAGES_TO_MUTE_IN_RING_OR_CALL);
+                    } else {
+                        mFocusEnforcer.unmutePlayersForCall();
+                    }
+                }
+            }
+        }.start();
+    }
 }
diff --git a/services/core/java/com/android/server/audio/PlaybackActivityMonitor.java b/services/core/java/com/android/server/audio/PlaybackActivityMonitor.java
index 816d5fe..a95a627 100644
--- a/services/core/java/com/android/server/audio/PlaybackActivityMonitor.java
+++ b/services/core/java/com/android/server/audio/PlaybackActivityMonitor.java
@@ -46,7 +46,7 @@
         implements AudioPlaybackConfiguration.PlayerDeathMonitor, PlayerFocusEnforcer {
 
     public final static String TAG = "AudioService.PlaybackActivityMonitor";
-    private final static boolean DEBUG = true;
+    private final static boolean DEBUG = false;
 
     private ArrayList<PlayMonitorClient> mClients = new ArrayList<PlayMonitorClient>();
     // a public client is one that needs an anonymized version of the playback configurations, we
@@ -103,6 +103,10 @@
         final boolean change;
         synchronized(mPlayerLock) {
             final AudioPlaybackConfiguration apc = mPlayers.get(new Integer(piid));
+            // FIXME SoundPool not ready for state reporting
+            if (apc.getPlayerType() == AudioPlaybackConfiguration.PLAYER_TYPE_JAM_SOUNDPOOL) {
+                return;
+            }
             if (checkConfigurationCaller(piid, apc, binderUid)) {
                 //TODO add generation counter to only update to the latest state
                 change = apc.handleStateEvent(event);
@@ -147,6 +151,11 @@
             for (int piid : mDuckedPlayers) {
                 pw.println(" " + piid);
             }
+            // players muted due to the device ringing or being in a call
+            pw.println("\n  muted player piids:");
+            for (int piid : mMutedPlayers) {
+                pw.println(" " + piid);
+            }
         }
     }
 
@@ -231,6 +240,7 @@
     //=================================================================
     // PlayerFocusEnforcer implementation
     private final ArrayList<Integer> mDuckedPlayers = new ArrayList<Integer>();
+    private final ArrayList<Integer> mMutedPlayers = new ArrayList<Integer>();
 
     @Override
     public boolean duckPlayers(FocusRequester winner, FocusRequester loser) {
@@ -290,9 +300,9 @@
                         && winner.hasSameUid(apc.getClientUid())) {
                     try {
                         if (DEBUG) { Log.v(TAG, "unducking player" + piid); }
+                        mDuckedPlayers.remove(new Integer(piid));
                         //FIXME just a test before we have VolumeShape
                         apc.getPlayerProxy().setPan(0.0f);
-                        mDuckedPlayers.remove(new Integer(piid));
                     } catch (Exception e) {
                         Log.e(TAG, "Error unducking player " + piid, e);
                     }
@@ -303,6 +313,65 @@
         }
     }
 
+    @Override
+    public void mutePlayersForCall(int[] usagesToMute) {
+        if (DEBUG) {
+            String log = new String("mutePlayersForCall: usages=");
+            for (int usage : usagesToMute) { log += " " + usage; }
+            Log.v(TAG, log);
+        }
+        synchronized (mPlayerLock) {
+            final Set<Integer> piidSet = mPlayers.keySet();
+            final Iterator<Integer> piidIterator = piidSet.iterator();
+            // find which players to mute
+            while (piidIterator.hasNext()) {
+                final Integer piid = piidIterator.next();
+                final AudioPlaybackConfiguration apc = mPlayers.get(piid);
+                final int playerUsage = apc.getAudioAttributes().getUsage();
+                boolean mute = false;
+                for (int usageToMute : usagesToMute) {
+                    if (playerUsage == usageToMute) {
+                        mute = true;
+                        break;
+                    }
+                }
+                if (mute) {
+                    try {
+                        if (DEBUG) { Log.v(TAG, "muting player" + piid); }
+                        apc.getPlayerProxy().setVolume(0.0f);
+                        mMutedPlayers.add(piid);
+                    } catch (Exception e) {
+                        Log.e(TAG, "Error muting player " + piid, e);
+                    }
+                }
+            }
+        }
+    }
+
+    @Override
+    public void unmutePlayersForCall() {
+        if (DEBUG) {
+            Log.v(TAG, "unmutePlayersForCall()");
+        }
+        synchronized (mPlayerLock) {
+            if (mMutedPlayers.isEmpty()) {
+                return;
+            }
+            for (int piid : mMutedPlayers) {
+                final AudioPlaybackConfiguration apc = mPlayers.get(piid);
+                if (apc != null) {
+                    try {
+                        if (DEBUG) { Log.v(TAG, "unmuting player" + piid); }
+                        apc.getPlayerProxy().setVolume(1.0f);
+                    } catch (Exception e) {
+                        Log.e(TAG, "Error unmuting player " + piid, e);
+                    }
+                }
+            }
+            mMutedPlayers.clear();
+        }
+    }
+
     //=================================================================
     // Track playback activity listeners
 
diff --git a/services/core/java/com/android/server/audio/PlayerFocusEnforcer.java b/services/core/java/com/android/server/audio/PlayerFocusEnforcer.java
index acb4f0d..0733eca 100644
--- a/services/core/java/com/android/server/audio/PlayerFocusEnforcer.java
+++ b/services/core/java/com/android/server/audio/PlayerFocusEnforcer.java
@@ -28,4 +28,8 @@
     public boolean duckPlayers(FocusRequester winner, FocusRequester loser);
 
     public void unduckPlayers(FocusRequester winner);
+
+    public void mutePlayersForCall(int[] usagesToMute);
+
+    public void unmutePlayersForCall();
 }
\ No newline at end of file
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/MetricsLoggerService.java b/services/core/java/com/android/server/connectivity/MetricsLoggerService.java
deleted file mode 100644
index 1c9feb2..0000000
--- a/services/core/java/com/android/server/connectivity/MetricsLoggerService.java
+++ /dev/null
@@ -1,375 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.connectivity;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.server.SystemService;
-
-import android.app.PendingIntent;
-import android.content.Context;
-import android.content.pm.PackageManager;
-import android.net.ConnectivityMetricsEvent;
-import android.net.ConnectivityMetricsLogger;
-import android.net.IConnectivityMetricsLogger;
-import android.os.Binder;
-import android.os.Parcel;
-import android.text.format.DateUtils;
-import android.util.Log;
-
-import java.io.FileDescriptor;
-import java.io.PrintWriter;
-import java.util.ArrayDeque;
-import java.util.ArrayList;
-
-/** {@hide} */
-public class MetricsLoggerService extends SystemService {
-    private static String TAG = "ConnectivityMetricsLoggerService";
-    private static final boolean DBG = true;
-    private static final boolean VDBG = false;
-
-    public MetricsLoggerService(Context context) {
-        super(context);
-    }
-
-    @Override
-    public void onStart() {
-        resetThrottlingCounters(System.currentTimeMillis());
-    }
-
-    @Override
-    public void onBootPhase(int phase) {
-        if (phase == SystemService.PHASE_SYSTEM_SERVICES_READY) {
-            if (DBG) Log.d(TAG, "onBootPhase: PHASE_SYSTEM_SERVICES_READY");
-            publishBinderService(ConnectivityMetricsLogger.CONNECTIVITY_METRICS_LOGGER_SERVICE,
-                    mBinder);
-        }
-    }
-
-    // TODO: read these constants from system property
-    private final int EVENTS_NOTIFICATION_THRESHOLD                   = 300;
-    private final int MAX_NUMBER_OF_EVENTS                            = 1000;
-    private final int THROTTLING_MAX_NUMBER_OF_MESSAGES_PER_COMPONENT = 1000;
-    private final long THROTTLING_TIME_INTERVAL_MILLIS                = DateUtils.HOUR_IN_MILLIS;
-
-    private int mEventCounter = 0;
-
-    /**
-     * Reference of the last event in the list of cached events.
-     *
-     * When client of this service retrieves events by calling getEvents, it is passing
-     * ConnectivityMetricsEvent.Reference object. After getEvents returns, that object will
-     * contain this reference. The client can save it and use next time it calls getEvents.
-     * This way only new events will be returned.
-     */
-    private long mLastEventReference = 0;
-
-    private final int mThrottlingCounters[] =
-            new int[ConnectivityMetricsLogger.NUMBER_OF_COMPONENTS];
-
-    private long mThrottlingIntervalBoundaryMillis;
-
-    private final ArrayDeque<ConnectivityMetricsEvent> mEvents = new ArrayDeque<>();
-
-    private void enforceConnectivityInternalPermission() {
-        getContext().enforceCallingOrSelfPermission(
-                android.Manifest.permission.CONNECTIVITY_INTERNAL,
-                "MetricsLoggerService");
-    }
-
-    private void enforceDumpPermission() {
-        getContext().enforceCallingOrSelfPermission(
-                android.Manifest.permission.DUMP,
-                "MetricsLoggerService");
-    }
-
-    private void resetThrottlingCounters(long currentTimeMillis) {
-        synchronized (mThrottlingCounters) {
-            for (int i = 0; i < mThrottlingCounters.length; i++) {
-                mThrottlingCounters[i] = 0;
-            }
-            mThrottlingIntervalBoundaryMillis =
-                    currentTimeMillis + THROTTLING_TIME_INTERVAL_MILLIS;
-        }
-    }
-
-    private void addEvent(ConnectivityMetricsEvent e) {
-        if (VDBG) {
-            Log.v(TAG, "writeEvent(" + e.toString() + ")");
-        }
-
-        while (mEvents.size() >= MAX_NUMBER_OF_EVENTS) {
-            mEvents.removeFirst();
-        }
-
-        mEvents.addLast(e);
-    }
-
-    @VisibleForTesting
-    final MetricsLoggerImpl mBinder = new MetricsLoggerImpl();
-
-    /**
-     * Implementation of the IConnectivityMetricsLogger interface.
-     */
-    final class MetricsLoggerImpl extends IConnectivityMetricsLogger.Stub {
-
-        private final ArrayList<PendingIntent> mPendingIntents = new ArrayList<>();
-
-        @Override
-        protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
-            if (getContext().checkCallingOrSelfPermission(android.Manifest.permission.DUMP)
-                    != PackageManager.PERMISSION_GRANTED) {
-                pw.println("Permission Denial: can't dump ConnectivityMetricsLoggerService " +
-                        "from from pid=" + Binder.getCallingPid() + ", uid=" +
-                        Binder.getCallingUid());
-                return;
-            }
-
-            boolean dumpSerializedSize = false;
-            boolean dumpEvents = false;
-            boolean dumpDebugInfo = false;
-            for (String arg : args) {
-                switch (arg) {
-                    case "--debug":
-                        dumpDebugInfo = true;
-                        break;
-
-                    case "--events":
-                        dumpEvents = true;
-                        break;
-
-                    case "--size":
-                        dumpSerializedSize = true;
-                        break;
-
-                    case "--all":
-                        dumpDebugInfo = true;
-                        dumpEvents = true;
-                        dumpSerializedSize = true;
-                        break;
-                }
-            }
-
-            synchronized (mEvents) {
-                pw.println("Number of events: " + mEvents.size());
-                pw.println("Counter: " + mEventCounter);
-                if (mEvents.size() > 0) {
-                    pw.println("Time span: " +
-                            DateUtils.formatElapsedTime(
-                                    (System.currentTimeMillis() - mEvents.peekFirst().timestamp)
-                                            / 1000));
-                }
-
-                if (dumpSerializedSize) {
-                    Parcel p = Parcel.obtain();
-                    for (ConnectivityMetricsEvent e : mEvents) {
-                        p.writeParcelable(e, 0);
-                    }
-                    pw.println("Serialized data size: " + p.dataSize());
-                    p.recycle();
-                }
-
-                if (dumpEvents) {
-                    pw.println();
-                    pw.println("Events:");
-                    for (ConnectivityMetricsEvent e : mEvents) {
-                        pw.println(e.toString());
-                    }
-                }
-            }
-
-            if (dumpDebugInfo) {
-                synchronized (mThrottlingCounters) {
-                    pw.println();
-                    for (int i = 0; i < ConnectivityMetricsLogger.NUMBER_OF_COMPONENTS; i++) {
-                        if (mThrottlingCounters[i] > 0) {
-                            pw.println("Throttling Counter #" + i + ": " + mThrottlingCounters[i]);
-                        }
-                    }
-                    pw.println("Throttling Time Remaining: " +
-                            DateUtils.formatElapsedTime(
-                                    (mThrottlingIntervalBoundaryMillis - System.currentTimeMillis())
-                                            / 1000));
-                }
-            }
-
-            synchronized (mPendingIntents) {
-                if (!mPendingIntents.isEmpty()) {
-                    pw.println();
-                    pw.println("Pending intents:");
-                    for (PendingIntent pi : mPendingIntents) {
-                        pw.println(pi.toString());
-                    }
-                }
-            }
-        }
-
-        public long logEvent(ConnectivityMetricsEvent event) {
-            ConnectivityMetricsEvent[] events = new ConnectivityMetricsEvent[]{event};
-            return logEvents(events);
-        }
-
-        /**
-         * @param events
-         *
-         * Note: All events must belong to the same component.
-         *
-         * @return 0 on success
-         *        <0 if error happened
-         *        >0 timestamp after which new events will be accepted
-         */
-        public long logEvents(ConnectivityMetricsEvent[] events) {
-            enforceConnectivityInternalPermission();
-
-            if (events == null || events.length == 0) {
-                Log.wtf(TAG, "No events passed to logEvents()");
-                return -1;
-            }
-
-            int componentTag = events[0].componentTag;
-            if (componentTag < 0 ||
-                    componentTag >= ConnectivityMetricsLogger.NUMBER_OF_COMPONENTS) {
-                Log.wtf(TAG, "Unexpected tag: " + componentTag);
-                return -1;
-            }
-
-            synchronized (mThrottlingCounters) {
-                long currentTimeMillis = System.currentTimeMillis();
-                if (currentTimeMillis > mThrottlingIntervalBoundaryMillis) {
-                    resetThrottlingCounters(currentTimeMillis);
-                }
-
-                mThrottlingCounters[componentTag] += events.length;
-
-                if (mThrottlingCounters[componentTag] >
-                        THROTTLING_MAX_NUMBER_OF_MESSAGES_PER_COMPONENT) {
-                    Log.w(TAG, "Too many events from #" + componentTag +
-                            ". Block until " + mThrottlingIntervalBoundaryMillis);
-
-                    return mThrottlingIntervalBoundaryMillis;
-                }
-            }
-
-            boolean sendPendingIntents = false;
-
-            synchronized (mEvents) {
-                for (ConnectivityMetricsEvent e : events) {
-                    if (e.componentTag != componentTag) {
-                        Log.wtf(TAG, "Unexpected tag: " + e.componentTag);
-                        return -1;
-                    }
-
-                    addEvent(e);
-                }
-
-                mLastEventReference += events.length;
-
-                mEventCounter += events.length;
-                if (mEventCounter >= EVENTS_NOTIFICATION_THRESHOLD) {
-                    mEventCounter = 0;
-                    sendPendingIntents = true;
-                }
-            }
-
-            if (sendPendingIntents) {
-                synchronized (mPendingIntents) {
-                    for (PendingIntent pi : mPendingIntents) {
-                        if (VDBG) Log.v(TAG, "Send pending intent");
-                        try {
-                            pi.send(getContext(), 0, null, null, null);
-                        } catch (PendingIntent.CanceledException e) {
-                            Log.e(TAG, "Pending intent canceled: " + pi);
-                            mPendingIntents.remove(pi);
-                        }
-                    }
-                }
-            }
-
-            return 0;
-        }
-
-        /**
-         * Retrieve events
-         *
-         * @param reference of the last event previously returned. The function will return
-         *                  events following it.
-         *                  If 0 then all events will be returned.
-         *                  After the function call it will contain reference of the
-         *                  last returned event.
-         * @return events
-         */
-        public ConnectivityMetricsEvent[] getEvents(ConnectivityMetricsEvent.Reference reference) {
-            enforceDumpPermission();
-            long ref = reference.getValue();
-            if (VDBG) Log.v(TAG, "getEvents(" + ref + ")");
-
-            ConnectivityMetricsEvent[] result;
-            synchronized (mEvents) {
-                if (ref > mLastEventReference) {
-                    Log.e(TAG, "Invalid reference");
-                    reference.setValue(mLastEventReference);
-                    return null;
-                }
-                if (ref < mLastEventReference - mEvents.size()) {
-                    ref = mLastEventReference - mEvents.size();
-                }
-
-                int numEventsToSkip =
-                        mEvents.size() // Total number of events
-                        - (int)(mLastEventReference - ref); // Number of events to return
-
-                result = new ConnectivityMetricsEvent[mEvents.size() - numEventsToSkip];
-                int i = 0;
-                for (ConnectivityMetricsEvent e : mEvents) {
-                    if (numEventsToSkip > 0) {
-                        numEventsToSkip--;
-                    } else {
-                        result[i++] = e;
-                    }
-                }
-
-                reference.setValue(mLastEventReference);
-            }
-
-            return result;
-        }
-
-        public boolean register(PendingIntent newEventsIntent) {
-            enforceDumpPermission();
-            if (VDBG) Log.v(TAG, "register(" + newEventsIntent + ")");
-
-            synchronized (mPendingIntents) {
-                if (mPendingIntents.remove(newEventsIntent)) {
-                    Log.w(TAG, "Replacing registered pending intent");
-                }
-                mPendingIntents.add(newEventsIntent);
-            }
-
-            return true;
-        }
-
-        public void unregister(PendingIntent newEventsIntent) {
-            enforceDumpPermission();
-            if (VDBG) Log.v(TAG, "unregister(" + newEventsIntent + ")");
-
-            synchronized (mPendingIntents) {
-                if (!mPendingIntents.remove(newEventsIntent)) {
-                    Log.e(TAG, "Pending intent is not registered");
-                }
-            }
-        }
-    };
-}
diff --git a/services/core/java/com/android/server/connectivity/Tethering.java b/services/core/java/com/android/server/connectivity/Tethering.java
index 9d63462..6c608a2 100644
--- a/services/core/java/com/android/server/connectivity/Tethering.java
+++ b/services/core/java/com/android/server/connectivity/Tethering.java
@@ -1008,10 +1008,9 @@
                 return false;
             }
 
-            protected boolean requestUpstreamMobileConnection() {
+            protected void requestUpstreamMobileConnection() {
                 mUpstreamNetworkMonitor.updateMobileRequiresDun(mConfig.isDunRequired);
                 mUpstreamNetworkMonitor.registerMobileNetworkRequest();
-                return true;
             }
 
             protected void unrequestUpstreamMobileConnection() {
@@ -1058,9 +1057,13 @@
             }
 
             protected void chooseUpstreamType(boolean tryCell) {
+                final int upstreamType = findPreferredUpstreamType(tryCell);
+                setUpstreamByType(upstreamType);
+            }
+
+            protected int findPreferredUpstreamType(boolean tryCell) {
                 final ConnectivityManager cm = getConnectivityManager();
                 int upType = ConnectivityManager.TYPE_NONE;
-                String iface = null;
 
                 updateConfiguration(); // TODO - remove?
 
@@ -1100,7 +1103,8 @@
                         requestUpstreamMobileConnection();
                         break;
                     case ConnectivityManager.TYPE_NONE:
-                        if (tryCell && requestUpstreamMobileConnection()) {
+                        if (tryCell) {
+                            requestUpstreamMobileConnection();
                             // We think mobile should be coming up; don't set a retry.
                         } else {
                             sendMessageDelayed(CMD_RETRY_UPSTREAM, UPSTREAM_SETTLE_TIME_MS);
@@ -1117,7 +1121,13 @@
                         break;
                 }
 
+                return upType;
+            }
+
+            protected void setUpstreamByType(int upType) {
+                final ConnectivityManager cm = getConnectivityManager();
                 Network network = null;
+                String iface = null;
                 if (upType != ConnectivityManager.TYPE_NONE) {
                     LinkProperties linkProperties = cm.getLinkProperties(upType);
                     if (linkProperties != null) {
@@ -1354,9 +1364,9 @@
                 simChange.startListening();
                 mUpstreamNetworkMonitor.start();
 
-                mTryCell = true;  // better try something first pass or crazy tests cases will fail
-                chooseUpstreamType(mTryCell);
-                mTryCell = !mTryCell;
+                // Better try something first pass or crazy tests cases will fail.
+                chooseUpstreamType(true);
+                mTryCell = false;
             }
 
             @Override
@@ -1407,10 +1417,9 @@
                         break;
                     }
                     case CMD_UPSTREAM_CHANGED:
-                        // need to try DUN immediately if Wifi goes down
-                        mTryCell = true;
-                        chooseUpstreamType(mTryCell);
-                        mTryCell = !mTryCell;
+                        // Need to try DUN immediately if Wi-Fi goes down.
+                        chooseUpstreamType(true);
+                        mTryCell = false;
                         break;
                     case CMD_RETRY_UPSTREAM:
                         chooseUpstreamType(mTryCell);
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/connectivity/tethering/TetherInterfaceStateMachine.java b/services/core/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachine.java
index 37221a9..5e51579 100644
--- a/services/core/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachine.java
+++ b/services/core/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachine.java
@@ -250,31 +250,33 @@
         }
 
         private void cleanupUpstream() {
-            if (mMyUpstreamIfaceName != null) {
-                // note that we don't care about errors here.
-                // sometimes interfaces are gone before we get
-                // to remove their rules, which generates errors.
-                // just do the best we can.
-                try {
-                    // about to tear down NAT; gather remaining statistics
-                    mStatsService.forceUpdate();
-                } catch (Exception e) {
-                    if (VDBG) Log.e(TAG, "Exception in forceUpdate: " + e.toString());
-                }
-                try {
-                    mNMService.stopInterfaceForwarding(mIfaceName, mMyUpstreamIfaceName);
-                } catch (Exception e) {
-                    if (VDBG) Log.e(
-                            TAG, "Exception in removeInterfaceForward: " + e.toString());
-                }
-                try {
-                    mNMService.disableNat(mIfaceName, mMyUpstreamIfaceName);
-                } catch (Exception e) {
-                    if (VDBG) Log.e(TAG, "Exception in disableNat: " + e.toString());
-                }
-                mMyUpstreamIfaceName = null;
+            if (mMyUpstreamIfaceName == null) return;
+
+            cleanupUpstreamInterface(mMyUpstreamIfaceName);
+            mMyUpstreamIfaceName = null;
+        }
+
+        private void cleanupUpstreamInterface(String upstreamIface) {
+            // Note that we don't care about errors here.
+            // Sometimes interfaces are gone before we get
+            // to remove their rules, which generates errors.
+            // Just do the best we can.
+            try {
+                // About to tear down NAT; gather remaining statistics.
+                mStatsService.forceUpdate();
+            } catch (Exception e) {
+                if (VDBG) Log.e(TAG, "Exception in forceUpdate: " + e.toString());
             }
-            return;
+            try {
+                mNMService.stopInterfaceForwarding(mIfaceName, upstreamIface);
+            } catch (Exception e) {
+                if (VDBG) Log.e(TAG, "Exception in removeInterfaceForward: " + e.toString());
+            }
+            try {
+                mNMService.disableNat(mIfaceName, upstreamIface);
+            } catch (Exception e) {
+                if (VDBG) Log.e(TAG, "Exception in disableNat: " + e.toString());
+            }
         }
 
         @Override
@@ -306,6 +308,7 @@
                                     newUpstreamIfaceName);
                         } catch (Exception e) {
                             Log.e(TAG, "Exception enabling Nat: " + e.toString());
+                            cleanupUpstreamInterface(newUpstreamIfaceName);
                             mLastError = ConnectivityManager.TETHER_ERROR_ENABLE_NAT_ERROR;
                             transitionTo(mInitialState);
                             return true;
diff --git a/services/core/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitor.java b/services/core/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitor.java
index 08a3332..017c5fb 100644
--- a/services/core/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitor.java
+++ b/services/core/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitor.java
@@ -66,9 +66,9 @@
     public static final int EVENT_ON_LINKPROPERTIES = 3;
     public static final int EVENT_ON_LOST           = 4;
 
-    private static final int LISTEN_ALL = 1;
-    private static final int TRACK_DEFAULT = 2;
-    private static final int MOBILE_REQUEST = 3;
+    private static final int CALLBACK_LISTEN_ALL = 1;
+    private static final int CALLBACK_TRACK_DEFAULT = 2;
+    private static final int CALLBACK_MOBILE_REQUEST = 3;
 
     private final Context mContext;
     private final StateMachine mTarget;
@@ -98,10 +98,10 @@
 
         final NetworkRequest listenAllRequest = new NetworkRequest.Builder()
                 .clearCapabilities().build();
-        mListenAllCallback = new UpstreamNetworkCallback(LISTEN_ALL);
+        mListenAllCallback = new UpstreamNetworkCallback(CALLBACK_LISTEN_ALL);
         cm().registerNetworkCallback(listenAllRequest, mListenAllCallback);
 
-        mDefaultNetworkCallback = new UpstreamNetworkCallback(TRACK_DEFAULT);
+        mDefaultNetworkCallback = new UpstreamNetworkCallback(CALLBACK_TRACK_DEFAULT);
         cm().registerDefaultNetworkCallback(mDefaultNetworkCallback);
     }
 
@@ -136,30 +136,25 @@
             return;
         }
 
-        final NetworkRequest.Builder builder = new NetworkRequest.Builder()
-                .addTransportType(NetworkCapabilities.TRANSPORT_CELLULAR);
-        if (mDunRequired) {
-            builder.removeCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED)
-                   .addCapability(NetworkCapabilities.NET_CAPABILITY_DUN);
-        } else {
-            builder.addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET);
-        }
-        final NetworkRequest mobileUpstreamRequest = builder.build();
+        // The following use of the legacy type system cannot be removed until
+        // after upstream selection no longer finds networks by legacy type.
+        // See also http://b/34364553 .
+        final int legacyType = mDunRequired ? TYPE_MOBILE_DUN : TYPE_MOBILE_HIPRI;
+
+        final NetworkRequest mobileUpstreamRequest = new NetworkRequest.Builder()
+                .setCapabilities(ConnectivityManager.networkCapabilitiesForType(legacyType))
+                .build();
 
         // The existing default network and DUN callbacks will be notified.
         // Therefore, to avoid duplicate notifications, we only register a no-op.
-        mMobileNetworkCallback = new UpstreamNetworkCallback(MOBILE_REQUEST);
+        mMobileNetworkCallback = new UpstreamNetworkCallback(CALLBACK_MOBILE_REQUEST);
 
         // TODO: Change the timeout from 0 (no onUnavailable callback) to some
         // moderate callback timeout. This might be useful for updating some UI.
         // Additionally, we log a message to aid in any subsequent debugging.
         Log.d(TAG, "requesting mobile upstream network: " + mobileUpstreamRequest);
 
-        // The following use of the legacy type system cannot be removed until
-        // after upstream selection no longer finds networks by legacy type.
-        // See also b/34364553.
-        final int apnType = mDunRequired ? TYPE_MOBILE_DUN : TYPE_MOBILE_HIPRI;
-        cm().requestNetwork(mobileUpstreamRequest, mMobileNetworkCallback, 0, apnType);
+        cm().requestNetwork(mobileUpstreamRequest, mMobileNetworkCallback, 0, legacyType);
     }
 
     public void releaseMobileNetworkRequest() {
@@ -184,17 +179,18 @@
         // Always request whatever extra information we can, in case this
         // was already up when start() was called, in which case we would
         // not have been notified of any information that had not changed.
-        final NetworkCallback cb =
-                (callbackType == TRACK_DEFAULT) ? mDefaultNetworkCallback :
-                (callbackType == MOBILE_REQUEST) ? mMobileNetworkCallback : null;
-        if (cb != null) {
-            final ConnectivityManager cm = cm();
-            cm.requestNetworkCapabilities(mDefaultNetworkCallback);
-            cm.requestLinkProperties(mDefaultNetworkCallback);
-        }
-
-        if (callbackType == TRACK_DEFAULT) {
-            mCurrentDefault = network;
+        switch (callbackType) {
+            case CALLBACK_LISTEN_ALL:
+                break;
+            case CALLBACK_TRACK_DEFAULT:
+                cm().requestNetworkCapabilities(mDefaultNetworkCallback);
+                cm().requestLinkProperties(mDefaultNetworkCallback);
+                mCurrentDefault = network;
+                break;
+            case CALLBACK_MOBILE_REQUEST:
+                cm().requestNetworkCapabilities(mMobileNetworkCallback);
+                cm().requestLinkProperties(mMobileNetworkCallback);
+                break;
         }
 
         // Requesting updates for mListenAllCallback is not currently possible
@@ -262,7 +258,7 @@
     }
 
     private void handleLost(int callbackType, Network network) {
-        if (callbackType == TRACK_DEFAULT) {
+        if (callbackType == CALLBACK_TRACK_DEFAULT) {
             mCurrentDefault = null;
             // Receiving onLost() for a default network does not necessarily
             // mean the network is gone.  We wait for a separate notification
diff --git a/services/core/java/com/android/server/display/AutomaticBrightnessController.java b/services/core/java/com/android/server/display/AutomaticBrightnessController.java
index 3da49d8..168744b 100644
--- a/services/core/java/com/android/server/display/AutomaticBrightnessController.java
+++ b/services/core/java/com/android/server/display/AutomaticBrightnessController.java
@@ -18,9 +18,6 @@
 
 import com.android.server.EventLogTags;
 import com.android.server.LocalServices;
-import com.android.server.twilight.TwilightListener;
-import com.android.server.twilight.TwilightManager;
-import com.android.server.twilight.TwilightState;
 
 import android.annotation.Nullable;
 import android.hardware.Sensor;
@@ -55,9 +52,6 @@
     // non-zero, which in turn ensures that the total weight is non-zero.
     private static final long AMBIENT_LIGHT_PREDICTION_TIME_MILLIS = 100;
 
-    // Specifies the maximum magnitude of the time of day adjustment.
-    private static final float TWILIGHT_ADJUSTMENT_MAX_GAMMA = 1f;
-
     // Debounce for sampling user-initiated changes in display brightness to ensure
     // the user is satisfied with the result before storing the sample.
     private static final int BRIGHTNESS_ADJUSTMENT_SAMPLE_DEBOUNCE_MILLIS = 10000;
@@ -74,9 +68,6 @@
     // The light sensor, or null if not available or needed.
     private final Sensor mLightSensor;
 
-    // The twilight service.
-    private final TwilightManager mTwilight;
-
     // The auto-brightness spline adjustment.
     // The brightness values have been scaled to a range of 0..1.
     private final Spline mScreenAutoBrightnessSpline;
@@ -186,8 +177,6 @@
     private int mBrightnessAdjustmentSampleOldBrightness;
     private float mBrightnessAdjustmentSampleOldGamma;
 
-    private boolean mUseTwilight;
-
     public AutomaticBrightnessController(Callbacks callbacks, Looper looper,
             SensorManager sensorManager, Spline autoBrightnessSpline, int lightSensorWarmUpTime,
             int brightnessMin, int brightnessMax, float dozeScaleFactor,
@@ -196,7 +185,6 @@
             int ambientLightHorizon, float autoBrightnessAdjustmentMaxGamma,
             HysteresisLevels dynamicHysteresis) {
         mCallbacks = callbacks;
-        mTwilight = LocalServices.getService(TwilightManager.class);
         mSensorManager = sensorManager;
         mScreenAutoBrightnessSpline = autoBrightnessSpline;
         mScreenBrightnessRangeMinimum = brightnessMin;
@@ -233,7 +221,7 @@
     }
 
     public void configure(boolean enable, float adjustment, boolean dozing,
-            boolean userInitiatedChange, boolean useTwilight) {
+            boolean userInitiatedChange) {
         // While dozing, the application processor may be suspended which will prevent us from
         // receiving new information from the light sensor. On some devices, we may be able to
         // switch to a wake-up light sensor instead but for now we will simply disable the sensor
@@ -242,7 +230,6 @@
         mDozing = dozing;
         boolean changed = setLightSensorEnabled(enable && !dozing);
         changed |= setScreenAutoBrightnessAdjustment(adjustment);
-        changed |= setUseTwilight(useTwilight);
         if (changed) {
             updateAutoBrightness(false /*sendUpdate*/);
         }
@@ -251,17 +238,6 @@
         }
     }
 
-    private boolean setUseTwilight(boolean useTwilight) {
-        if (mUseTwilight == useTwilight) return false;
-        if (useTwilight) {
-            mTwilight.registerListener(mTwilightListener, mHandler);
-        } else {
-            mTwilight.unregisterListener(mTwilightListener);
-        }
-        mUseTwilight = useTwilight;
-        return true;
-    }
-
     public void dump(PrintWriter pw) {
         pw.println();
         pw.println("Automatic Brightness Controller Configuration:");
@@ -276,7 +252,6 @@
         pw.println();
         pw.println("Automatic Brightness Controller State:");
         pw.println("  mLightSensor=" + mLightSensor);
-        pw.println("  mTwilight.getLastTwilightState()=" + mTwilight.getLastTwilightState());
         pw.println("  mLightSensorEnabled=" + mLightSensorEnabled);
         pw.println("  mLightSensorEnableTime=" + TimeUtils.formatUptime(mLightSensorEnableTime));
         pw.println("  mAmbientLux=" + mAmbientLux);
@@ -522,19 +497,6 @@
             }
         }
 
-        if (mUseTwilight) {
-            TwilightState state = mTwilight.getLastTwilightState();
-            if (state != null && state.isNight()) {
-                final long duration = state.sunriseTimeMillis() - state.sunsetTimeMillis();
-                final long progress = System.currentTimeMillis() - state.sunsetTimeMillis();
-                final float amount = (float) Math.pow(2.0 * progress / duration - 1.0, 2.0);
-                gamma *= 1 + amount * TWILIGHT_ADJUSTMENT_MAX_GAMMA;
-                if (DEBUG) {
-                    Slog.d(TAG, "updateAutoBrightness: twilight amount=" + amount);
-                }
-            }
-        }
-
         if (gamma != 1.0f) {
             final float in = value;
             value = MathUtils.pow(value, gamma);
@@ -649,13 +611,6 @@
         }
     };
 
-    private final TwilightListener mTwilightListener = new TwilightListener() {
-        @Override
-        public void onTwilightStateChanged(@Nullable TwilightState state) {
-            updateAutoBrightness(true /*sendUpdate*/);
-        }
-    };
-
     /** Callbacks to request updates to the display's power state. */
     interface Callbacks {
         void updateBrightness();
diff --git a/services/core/java/com/android/server/display/DisplayPowerController.java b/services/core/java/com/android/server/display/DisplayPowerController.java
index 015345c..bed269c 100644
--- a/services/core/java/com/android/server/display/DisplayPowerController.java
+++ b/services/core/java/com/android/server/display/DisplayPowerController.java
@@ -642,7 +642,7 @@
                     && mPowerRequest.brightnessSetByUser;
             mAutomaticBrightnessController.configure(autoBrightnessEnabled,
                     mPowerRequest.screenAutoBrightnessAdjustment, state != Display.STATE_ON,
-                    userInitiatedChange, mPowerRequest.useTwilight);
+                    userInitiatedChange);
         }
 
         // Apply brightness boost.
diff --git a/services/core/java/com/android/server/display/LogicalDisplay.java b/services/core/java/com/android/server/display/LogicalDisplay.java
index 40a8952..5f348bf 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;
@@ -259,6 +261,7 @@
 
             mPrimaryDisplayDeviceInfo = deviceInfo;
             mInfo = null;
+            mOverrideDisplayInfo = null;
         }
     }
 
diff --git a/services/core/java/com/android/server/display/NightDisplayService.java b/services/core/java/com/android/server/display/NightDisplayService.java
index 7237fdb..cba694c 100644
--- a/services/core/java/com/android/server/display/NightDisplayService.java
+++ b/services/core/java/com/android/server/display/NightDisplayService.java
@@ -141,8 +141,7 @@
     @Override
     public void onBootPhase(int phase) {
         if (phase == PHASE_SYSTEM_SERVICES_READY) {
-            IVrManager vrManager =
-                    (IVrManager) getBinderService(VrManagerService.VR_MANAGER_BINDER_SERVICE);
+            IVrManager vrManager = (IVrManager) getBinderService(Context.VR_SERVICE);
             if (vrManager != null) {
                 try {
                     vrManager.registerListener(mVrStateCallbacks);
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/fingerprint/FingerprintService.java b/services/core/java/com/android/server/fingerprint/FingerprintService.java
index d1f7cfd..e83b228 100644
--- a/services/core/java/com/android/server/fingerprint/FingerprintService.java
+++ b/services/core/java/com/android/server/fingerprint/FingerprintService.java
@@ -83,6 +83,7 @@
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.concurrent.CopyOnWriteArrayList;
 
 /**
@@ -113,6 +114,8 @@
             new ArrayList<>();
     private final CopyOnWriteArrayList<IFingerprintClientActiveCallback> mClientActiveCallbacks =
             new CopyOnWriteArrayList<>();
+    private final Map<Integer, Long> mAuthenticatorIds =
+            Collections.synchronizedMap(new HashMap<>());
     private final AppOpsManager mAppOps;
     private static final long FAIL_LOCKOUT_TIMEOUT_MS = 30*1000;
     private static final int MAX_FAILED_ATTEMPTS = 5;
@@ -130,7 +133,6 @@
     private final UserManager mUserManager;
     private ClientMonitor mCurrentClient;
     private ClientMonitor mPendingClient;
-    private long mCurrentAuthenticatorId;
     private PerformanceStats mPerformanceStats;
 
     // Normal fingerprint authentications are tracked by mPerformanceMap.
@@ -239,6 +241,7 @@
 
             if (DEBUG) Slog.v(TAG, "Fingerprint HAL id: " + mHalDeviceId);
             if (mHalDeviceId != 0) {
+                loadAuthenticatorIds();
                 updateActiveGroup(ActivityManager.getCurrentUser(), null);
             } else {
                 Slog.w(TAG, "Failed to open Fingerprint HAL!");
@@ -249,6 +252,26 @@
         return mDaemon;
     }
 
+    /** Populates existing authenticator ids. To be used only during the start of the service. */
+    private void loadAuthenticatorIds() {
+        // This operation can be expensive, so keep track of the elapsed time. Might need to move to
+        // background if it takes too long.
+        long t = System.currentTimeMillis();
+
+        mAuthenticatorIds.clear();
+        for (UserInfo user : UserManager.get(mContext).getUsers(true /* excludeDying */)) {
+            int userId = getUserOrWorkProfileId(null, user.id);
+            if (!mAuthenticatorIds.containsKey(userId)) {
+                updateActiveGroup(userId, null);
+            }
+        }
+
+        t = System.currentTimeMillis() - t;
+        if (t > 1000) {
+            Slog.w(TAG, "loadAuthenticatorIds() taking too long: " + t + "ms");
+        }
+    }
+
     protected void handleEnumerate(long deviceId, int fingerId, int groupId, int remaining) {
         if (DEBUG) Slog.w(TAG, "Enumerate: fid=" + fingerId + ", gid="
                 + groupId + "rem=" + remaining);
@@ -499,14 +522,23 @@
 
     boolean isCurrentUserOrProfile(int userId) {
         UserManager um = UserManager.get(mContext);
-
-        // Allow current user or profiles of the current user...
-        for (int profileId : um.getEnabledProfileIds(mCurrentUserId)) {
-            if (profileId == userId) {
-                return true;
-            }
+        if (um == null) {
+            Slog.e(TAG, "Unable to acquire UserManager");
+            return false;
         }
-        return false;
+
+        final long token = Binder.clearCallingIdentity();
+        try {
+            // Allow current user or profiles of the current user...
+            for (int profileId : um.getEnabledProfileIds(mCurrentUserId)) {
+                if (profileId == userId) {
+                    return true;
+                }
+            }
+            return false;
+        } finally {
+            Binder.restoreCallingIdentity(token);
+        }
     }
 
     private boolean isForegroundActivity(int uid, int pid) {
@@ -1195,7 +1227,7 @@
                     daemon.setActiveGroup(userId, fpDir.getAbsolutePath());
                     mCurrentUserId = userId;
                 }
-                mCurrentAuthenticatorId = daemon.getAuthenticatorId();
+                mAuthenticatorIds.put(userId, daemon.getAuthenticatorId());
             } catch (RemoteException e) {
                 Slog.e(TAG, "Failed to setActiveGroup():", e);
             }
@@ -1218,8 +1250,14 @@
      * @return true if this is a work profile
      */
     private boolean isWorkProfile(int userId) {
-        UserInfo info = mUserManager.getUserInfo(userId);
-        return info != null && info.isManagedProfile();
+        UserInfo userInfo = null;
+        final long token = Binder.clearCallingIdentity();
+        try {
+            userInfo = mUserManager.getUserInfo(userId);
+        } finally {
+            Binder.restoreCallingIdentity(token);
+        }
+        return userInfo != null && userInfo.isManagedProfile();
     }
 
     private void listenForUserSwitches() {
@@ -1239,9 +1277,11 @@
 
     /***
      * @param opPackageName the name of the calling package
-     * @return authenticator id for the current user
+     * @return authenticator id for the calling user
      */
     public long getAuthenticatorId(String opPackageName) {
-        return mCurrentAuthenticatorId;
+        final int userId = getUserOrWorkProfileId(opPackageName, UserHandle.getCallingUserId());
+        Long authenticatorId = mAuthenticatorIds.get(userId);
+        return authenticatorId != null ? authenticatorId : 0;
     }
 }
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecController.java b/services/core/java/com/android/server/hdmi/HdmiCecController.java
index 4a10f50..07c3a38 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecController.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecController.java
@@ -25,7 +25,6 @@
 import android.util.Slog;
 import android.util.SparseArray;
 import com.android.internal.util.IndentingPrintWriter;
-import com.android.internal.util.Predicate;
 import com.android.server.hdmi.HdmiAnnotations.IoThreadOnly;
 import com.android.server.hdmi.HdmiAnnotations.ServiceThreadOnly;
 import com.android.server.hdmi.HdmiControlService.DevicePollingCallback;
@@ -34,6 +33,7 @@
 import java.util.Date;
 import java.util.LinkedList;
 import java.util.List;
+import java.util.function.Predicate;
 import java.util.concurrent.ArrayBlockingQueue;
 import libcore.util.EmptyArray;
 import sun.util.locale.LanguageTag;
@@ -77,7 +77,7 @@
     // Predicate for whether the given logical address is remote device's one or not.
     private final Predicate<Integer> mRemoteDeviceAddressPredicate = new Predicate<Integer>() {
         @Override
-        public boolean apply(Integer address) {
+        public boolean test(Integer address) {
             return !isAllocatedLocalDeviceAddress(address);
         }
     };
@@ -85,7 +85,7 @@
     // Predicate whether the given logical address is system audio's one or not
     private final Predicate<Integer> mSystemAudioAddressPredicate = new Predicate<Integer>() {
         @Override
-        public boolean apply(Integer address) {
+        public boolean test(Integer address) {
             return HdmiUtils.getTypeFromAddress(address) == Constants.ADDR_AUDIO_SYSTEM;
         }
     };
@@ -427,7 +427,7 @@
         switch (iterationStrategy) {
             case Constants.POLL_ITERATION_IN_ORDER:
                 for (int i = Constants.ADDR_TV; i <= Constants.ADDR_SPECIFIC_USE; ++i) {
-                    if (pickPredicate.apply(i)) {
+                    if (pickPredicate.test(i)) {
                         pollingCandidates.add(i);
                     }
                 }
@@ -435,7 +435,7 @@
             case Constants.POLL_ITERATION_REVERSE_ORDER:
             default:  // The default is reverse order.
                 for (int i = Constants.ADDR_SPECIFIC_USE; i >= Constants.ADDR_TV; --i) {
-                    if (pickPredicate.apply(i)) {
+                    if (pickPredicate.test(i)) {
                         pollingCandidates.add(i);
                     }
                 }
diff --git a/services/core/java/com/android/server/job/JobServiceContext.java b/services/core/java/com/android/server/job/JobServiceContext.java
index b089ba7..1337046 100644
--- a/services/core/java/com/android/server/job/JobServiceContext.java
+++ b/services/core/java/com/android/server/job/JobServiceContext.java
@@ -70,6 +70,8 @@
             ActivityManager.isLowRamDeviceStatic() ? 1 : 3;
     /** Amount of time a job is allowed to execute for before being considered timed-out. */
     private static final long EXECUTING_TIMESLICE_MILLIS = 10 * 60 * 1000;  // 10mins.
+    /** Amount of time the JobScheduler waits for the initial service launch+bind. */
+    private static final long OP_BIND_TIMEOUT_MILLIS = 18 * 1000;
     /** Amount of time the JobScheduler will wait for a response from an app for a message. */
     private static final long OP_TIMEOUT_MILLIS = 8 * 1000;
 
@@ -446,7 +448,10 @@
                 mVerb = VERB_STARTING;
                 scheduleOpTimeOut();
                 service.startJob(mParams);
-            } catch (RemoteException e) {
+            } catch (Exception e) {
+                // We catch 'Exception' because client-app malice or bugs might induce a wide
+                // range of possible exception-throw outcomes from startJob() and its handling
+                // of the client's ParcelableBundle extras.
                 Slog.e(TAG, "Error sending onStart message to '" +
                         mRunningJob.getServiceComponent().getShortClassName() + "' ", e);
             }
@@ -645,8 +650,20 @@
     private void scheduleOpTimeOut() {
         removeOpTimeOut();
 
-        final long timeoutMillis = (mVerb == VERB_EXECUTING) ?
-                EXECUTING_TIMESLICE_MILLIS : OP_TIMEOUT_MILLIS;
+        final long timeoutMillis;
+        switch (mVerb) {
+            case VERB_EXECUTING:
+                timeoutMillis = EXECUTING_TIMESLICE_MILLIS;
+                break;
+
+            case VERB_BINDING:
+                timeoutMillis = OP_BIND_TIMEOUT_MILLIS;
+                break;
+
+            default:
+                timeoutMillis = OP_TIMEOUT_MILLIS;
+                break;
+        }
         if (DEBUG) {
             Slog.d(TAG, "Scheduling time out for '" +
                     mRunningJob.getServiceComponent().getShortClassName() + "' jId: " +
diff --git a/services/core/java/com/android/server/location/GnssLocationProvider.java b/services/core/java/com/android/server/location/GnssLocationProvider.java
index eb8f8fc..8bc72de 100644
--- a/services/core/java/com/android/server/location/GnssLocationProvider.java
+++ b/services/core/java/com/android/server/location/GnssLocationProvider.java
@@ -72,7 +72,6 @@
 import android.provider.Settings;
 import android.provider.Telephony.Carriers;
 import android.provider.Telephony.Sms.Intents;
-import android.telephony.SmsMessage;
 import android.telephony.SubscriptionManager;
 import android.telephony.SubscriptionManager.OnSubscriptionsChangedListener;
 import android.telephony.TelephonyManager;
@@ -82,17 +81,17 @@
 import android.util.Log;
 import android.util.NtpTrustedTime;
 
-import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileDescriptor;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.PrintWriter;
-import java.io.StringReader;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Date;
+import java.util.List;
 import java.util.Map.Entry;
 import java.util.Properties;
 import java.util.Map;
@@ -411,7 +410,6 @@
     private WorkSource mClientSource = new WorkSource();
 
     private GeofenceHardwareImpl mGeofenceHardwareImpl;
-
     private int mYearOfHardware = 0;
 
     // Set lower than the current ITAR limit of 600m/s to allow this to trigger even if GPS HAL
@@ -483,12 +481,6 @@
         public void onLost(Network network) {
             releaseSuplConnection(GPS_RELEASE_AGPS_DATA_CONN);
         }
-
-        @Override
-        public void onUnavailable() {
-            // timeout, it was not possible to establish the required connection
-            releaseSuplConnection(GPS_AGPS_DATA_CONN_FAILED);
-        }
     };
 
     private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
@@ -879,8 +871,7 @@
         NetworkRequest request = requestBuilder.build();
         mConnMgr.requestNetwork(
                 request,
-                mSuplConnectivityCallback,
-                ConnectivityManager.MAX_NETWORK_REQUEST_TIMEOUT_MS);
+                mSuplConnectivityCallback);
     }
 
     private void handleReleaseSuplConnection(int agpsDataConnStatus) {
@@ -1125,6 +1116,7 @@
 
             mGnssMeasurementsProvider.onGpsEnabledChanged();
             mGnssNavigationMessageProvider.onGpsEnabledChanged();
+            enableBatching();
         } else {
             synchronized (mLock) {
                 mEnabled = false;
@@ -1156,6 +1148,7 @@
         mAlarmManager.cancel(mWakeupIntent);
         mAlarmManager.cancel(mTimeoutIntent);
 
+        disableBatching();
         // do this before releasing wakelock
         native_cleanup();
 
@@ -1791,6 +1784,84 @@
         };
     }
 
+    public interface GnssBatchingProvider {
+        /**
+         * Returns the GNSS batching size
+         */
+        int getSize();
+        /**
+         * Starts the hardware batching operation
+         */
+        boolean start(long periodNanos, boolean wakeOnFifoFull);
+        /**
+         * Forces a flush of existing locations from the hardware batching
+         */
+        void flush();
+        /**
+         * Stops the batching operation
+         */
+        boolean stop();
+    }
+
+    /**
+     * @hide
+     */
+    public GnssBatchingProvider getGnssBatchingProvider() {
+        return new GnssBatchingProvider() {
+            @Override
+            public int getSize() {
+                return native_get_batch_size();
+            }
+            @Override
+            public boolean start(long periodNanos, boolean wakeOnFifoFull) {
+                if (periodNanos <= 0) {
+                    Log.e(TAG, "Invalid periodNanos " + periodNanos +
+                            "in batching request, not started");
+                    return false;
+                }
+                return native_start_batch(periodNanos, wakeOnFifoFull);
+            }
+            @Override
+            public void flush() {
+                native_flush_batch();
+            }
+            @Override
+            public boolean stop() {
+                return native_stop_batch();
+            }
+        };
+    }
+
+    /**
+     * Initialize Batching if enabled
+     */
+    private void enableBatching() {
+        if (!native_init_batching()) {
+            Log.e(TAG, "Failed to initialize GNSS batching");
+        };
+    }
+
+    /**
+     * Disable batching
+     */
+    private void disableBatching() {
+        native_stop_batch();
+        native_cleanup_batching();
+    }
+
+    /**
+     * called from native code - GNSS location batch callback
+     */
+    private void reportLocationBatch(Location[] locationArray) {
+        List<Location> locations = new ArrayList<>(Arrays.asList(locationArray));
+        if(DEBUG) { Log.d(TAG, "Location batch of size " + locationArray.length + "reported"); }
+        try {
+            mILocationManager.reportLocationBatch(locations);
+        } catch (RemoteException e) {
+            Log.e(TAG, "RemoteException calling reportLocationBatch");
+        }
+    }
+
     /**
      * called from native code to request XTRA data
      */
@@ -2117,7 +2188,10 @@
         // note that this assumes the message will not be removed from the queue before
         // it is handled (otherwise the wake lock would be leaked).
         mWakeLock.acquire();
-        Log.i(TAG, "WakeLock acquired by sendMessage(" + message + ", " + arg + ", " + obj + ")");
+        if (Log.isLoggable(TAG, Log.INFO)) {
+            Log.i(TAG, "WakeLock acquired by sendMessage(" + messageIdAsString(message) + ", " + arg
+                    + ", " + obj + ")");
+        }
         mHandler.obtainMessage(message, arg, 1, obj).sendToTarget();
     }
 
@@ -2175,8 +2249,10 @@
             if (msg.arg2 == 1) {
                 // wakelock was taken for this message, release it
                 mWakeLock.release();
-                Log.i(TAG, "WakeLock released by handleMessage(" + message + ", " + msg.arg1 + ", "
-                        + msg.obj + ")");
+                if (Log.isLoggable(TAG, Log.INFO)) {
+                    Log.i(TAG, "WakeLock released by handleMessage(" + messageIdAsString(message)
+                            + ", " + msg.arg1 + ", " + msg.obj + ")");
+                }
             }
         }
 
@@ -2424,6 +2500,40 @@
         }
     }
 
+    /**
+     * @return A string representing the given message ID.
+     */
+    private String messageIdAsString(int message) {
+        switch (message) {
+            case ENABLE:
+                return "ENABLE";
+            case SET_REQUEST:
+                return "SET_REQUEST";
+            case UPDATE_NETWORK_STATE:
+                return "UPDATE_NETWORK_STATE";
+            case REQUEST_SUPL_CONNECTION:
+                return "REQUEST_SUPL_CONNECTION";
+            case RELEASE_SUPL_CONNECTION:
+                return "RELEASE_SUPL_CONNECTION";
+            case INJECT_NTP_TIME:
+                return "INJECT_NTP_TIME";
+            case DOWNLOAD_XTRA_DATA:
+                return "DOWNLOAD_XTRA_DATA";
+            case INJECT_NTP_TIME_FINISHED:
+                return "INJECT_NTP_TIME_FINISHED";
+            case DOWNLOAD_XTRA_DATA_FINISHED:
+                return "DOWNLOAD_XTRA_DATA_FINISHED";
+            case UPDATE_LOCATION:
+                return "UPDATE_LOCATION";
+            case SUBSCRIPTION_OR_SIM_CHANGED:
+                return "SUBSCRIPTION_OR_SIM_CHANGED";
+            case INITIALIZE_HANDLER:
+                return "INITIALIZE_HANDLER";
+            default:
+                return "<Unknown>";
+        }
+    }
+
     @Override
     public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
         StringBuilder s = new StringBuilder();
@@ -2441,7 +2551,9 @@
         if (hasCapability(GPS_CAPABILITY_NAV_MESSAGES)) s.append("NAV_MESSAGES ");
         s.append(")\n");
 
-        s.append(native_get_internal_state());
+        s.append("  internal state: ").append(native_get_internal_state());
+        s.append("\n");
+
         pw.append(s);
     }
 
@@ -2562,4 +2674,12 @@
     private static native boolean native_set_gps_lock(int gpsLock);
     private static native boolean native_set_emergency_supl_pdn(int emergencySuplPdn);
 
+    // GNSS Batching
+    private static native int native_get_batch_size();
+    private static native boolean native_start_batch(long periodNanos, boolean wakeOnFifoFull);
+    private static native void native_flush_batch();
+    private static native boolean native_stop_batch();
+    private static native boolean native_init_batching();
+    private static native void native_cleanup_batching();
+
 }
diff --git a/services/core/java/com/android/server/media/MediaSessionRecord.java b/services/core/java/com/android/server/media/MediaSessionRecord.java
index ede6e30..10ecb86 100644
--- a/services/core/java/com/android/server/media/MediaSessionRecord.java
+++ b/services/core/java/com/android/server/media/MediaSessionRecord.java
@@ -1123,6 +1123,38 @@
             }
         }
 
+        public void addQueueItem(MediaDescription description) {
+            try {
+                mCb.onAddQueueItem(description);
+            } catch (RemoteException e) {
+                Slog.e(TAG, "Remote failure in addQueueItem.", e);
+            }
+        }
+
+        public void addQueueItemAt(MediaDescription description, int index) {
+            try {
+                mCb.onAddQueueItemAt(description, index);
+            } catch (RemoteException e) {
+                Slog.e(TAG, "Remote failure in addQueueItemAt.", e);
+            }
+        }
+
+        public void removeQueueItem(MediaDescription description) {
+            try {
+                mCb.onRemoveQueueItem(description);
+            } catch (RemoteException e) {
+                Slog.e(TAG, "Remote failure in removeQueueItem.", e);
+            }
+        }
+
+        public void removeQueueItemAt(int index) {
+            try {
+                mCb.onRemoveQueueItemAt(index);
+            } catch (RemoteException e) {
+                Slog.e(TAG, "Remote failure in removeQueueItem.", e);
+            }
+        }
+
         public void adjustVolume(int direction) {
             try {
                 mCb.onAdjustVolume(direction);
@@ -1397,6 +1429,30 @@
         }
 
         @Override
+        public void addQueueItem(MediaDescription description) {
+            updateCallingPackage();
+            mSessionCb.addQueueItem(description);
+        }
+
+        @Override
+        public void addQueueItemAt(MediaDescription description, int index) {
+            updateCallingPackage();
+            mSessionCb.addQueueItemAt(description, index);
+        }
+
+        @Override
+        public void removeQueueItem(MediaDescription description) {
+            updateCallingPackage();
+            mSessionCb.removeQueueItem(description);
+        }
+
+        @Override
+        public void removeQueueItemAt(int index) {
+            updateCallingPackage();
+            mSessionCb.removeQueueItemAt(index);
+        }
+
+        @Override
         public CharSequence getQueueTitle() {
             return mQueueTitle;
         }
diff --git a/services/core/java/com/android/server/media/MediaSessionService.java b/services/core/java/com/android/server/media/MediaSessionService.java
index 3bf95ef..407262b 100644
--- a/services/core/java/com/android/server/media/MediaSessionService.java
+++ b/services/core/java/com/android/server/media/MediaSessionService.java
@@ -93,7 +93,6 @@
     private final SessionManagerImpl mSessionManagerImpl;
     private final MediaSessionStack mPriorityStack;
 
-    private final ArrayList<MediaSessionRecord> mAllSessions = new ArrayList<MediaSessionRecord>();
     private final SparseArray<UserRecord> mUserRecords = new SparseArray<UserRecord>();
     private final ArrayList<SessionsListenerRecord> mSessionsListeners
             = new ArrayList<SessionsListenerRecord>();
@@ -145,7 +144,8 @@
 
     public void updateSession(MediaSessionRecord record) {
         synchronized (mLock) {
-            if (!mAllSessions.contains(record)) {
+            UserRecord user = mUserRecords.get(record.getUserId());
+            if (user == null || !user.mSessions.contains(record)) {
                 Log.d(TAG, "Unknown session updated. Ignoring.");
                 return;
             }
@@ -155,10 +155,10 @@
     }
 
     /**
-     * Tells the system UI that volume has changed on a remote session.
+     * Tells the system UI that volume has changed on an active remote session.
      */
     public void notifyRemoteVolumeChanged(int flags, MediaSessionRecord session) {
-        if (mRvc == null) {
+        if (mRvc == null || !session.isActive()) {
             return;
         }
         try {
@@ -171,7 +171,8 @@
     public void onSessionPlaystateChange(MediaSessionRecord record, int oldState, int newState) {
         boolean updateSessions = false;
         synchronized (mLock) {
-            if (!mAllSessions.contains(record)) {
+            UserRecord user = mUserRecords.get(record.getUserId());
+            if (user == null || !user.mSessions.contains(record)) {
                 Log.d(TAG, "Unknown session changed playback state. Ignoring.");
                 return;
             }
@@ -184,7 +185,8 @@
 
     public void onSessionPlaybackTypeChanged(MediaSessionRecord record) {
         synchronized (mLock) {
-            if (!mAllSessions.contains(record)) {
+            UserRecord user = mUserRecords.get(record.getUserId());
+            if (user == null || !user.mSessions.contains(record)) {
                 Log.d(TAG, "Unknown session changed playback type. Ignoring.");
                 return;
             }
@@ -318,7 +320,6 @@
         }
 
         mPriorityStack.removeSession(session);
-        mAllSessions.remove(session);
 
         try {
             session.getCallback().asBinder().unlinkToDeath(session, 0);
@@ -455,7 +456,6 @@
             throw new RuntimeException("Media Session owner died prematurely.", e);
         }
 
-        mAllSessions.add(session);
         mPriorityStack.addSession(session, mCurrentUserIdList.contains(userId));
         user.addSessionLocked(session);
 
@@ -1087,16 +1087,10 @@
 
             synchronized (mLock) {
                 pw.println(mSessionsListeners.size() + " sessions listeners.");
-                int count = mAllSessions.size();
-                pw.println(count + " Sessions:");
-                for (int i = 0; i < count; i++) {
-                    mAllSessions.get(i).dump(pw, "");
-                    pw.println();
-                }
                 mPriorityStack.dump(pw, "");
 
                 pw.println("User Records:");
-                count = mUserRecords.size();
+                int count = mUserRecords.size();
                 for (int i = 0; i < count; i++) {
                     UserRecord user = mUserRecords.get(mUserRecords.keyAt(i));
                     user.dumpLocked(pw, "");
diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
index ac3a025..91c9316 100644
--- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
+++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
@@ -23,6 +23,7 @@
 import static android.Manifest.permission.READ_NETWORK_USAGE_HISTORY;
 import static android.Manifest.permission.READ_PHONE_STATE;
 import static android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE;
+import static android.app.ActivityThread.INVALID_PROC_STATE_SEQ;
 import static android.content.Intent.ACTION_PACKAGE_ADDED;
 import static android.content.Intent.ACTION_UID_REMOVED;
 import static android.content.Intent.ACTION_USER_ADDED;
@@ -53,11 +54,15 @@
 import static android.net.NetworkPolicyManager.RULE_ALLOW_METERED;
 import static android.net.NetworkPolicyManager.MASK_METERED_NETWORKS;
 import static android.net.NetworkPolicyManager.MASK_ALL_NETWORKS;
+import static android.net.NetworkPolicyManager.RULE_INVALID;
 import static android.net.NetworkPolicyManager.RULE_NONE;
 import static android.net.NetworkPolicyManager.RULE_REJECT_ALL;
 import static android.net.NetworkPolicyManager.RULE_REJECT_METERED;
 import static android.net.NetworkPolicyManager.RULE_TEMPORARY_ALLOW_METERED;
+import static android.net.NetworkPolicyManager.UidStateWithSeqObserver;
 import static android.net.NetworkPolicyManager.computeLastCycleBoundary;
+import static android.net.NetworkPolicyManager.isProcStateAllowedWhileIdleOrPowerSaveMode;
+import static android.net.NetworkPolicyManager.isProcStateAllowedWhileRestrictBackgroundOn;
 import static android.net.NetworkPolicyManager.uidPoliciesToString;
 import static android.net.NetworkPolicyManager.uidRulesToString;
 import static android.net.NetworkTemplate.MATCH_MOBILE_3G_LOWER;
@@ -94,6 +99,7 @@
 import android.annotation.IntDef;
 import android.annotation.Nullable;
 import android.app.ActivityManager;
+import android.app.ActivityManagerInternal;
 import android.app.AppGlobals;
 import android.app.AppOpsManager;
 import android.app.IActivityManager;
@@ -123,6 +129,7 @@
 import android.net.NetworkIdentity;
 import android.net.NetworkInfo;
 import android.net.NetworkPolicy;
+import android.net.NetworkPolicyManager;
 import android.net.NetworkQuotaInfo;
 import android.net.NetworkState;
 import android.net.NetworkTemplate;
@@ -130,6 +137,7 @@
 import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiManager;
 import android.os.Binder;
+import android.os.Debug;
 import android.os.Environment;
 import android.os.Handler;
 import android.os.HandlerThread;
@@ -161,8 +169,10 @@
 import android.util.NtpTrustedTime;
 import android.util.Pair;
 import android.util.Slog;
+import android.util.SparseArray;
 import android.util.SparseBooleanArray;
 import android.util.SparseIntArray;
+import android.util.SparseLongArray;
 import android.util.TrustedTime;
 import android.util.Xml;
 
@@ -210,14 +220,16 @@
  * enforcement.
  *
  * <p>
- * This class uses 2-3 locks to synchronize state:
+ * This class uses 4 locks to synchronize state:
  * <ul>
  * <li>{@code mUidRulesFirstLock}: used to guard state related to individual UIDs (such as firewall
  * rules).
  * <li>{@code mNetworkPoliciesSecondLock}: used to guard state related to network interfaces (such
  * as network policies).
- * <li>{@code allLocks}: not a "real" lock, but an indication (through @GuardedBy) that all locks
- * must be held.
+ * <li>{@code mDispatchedThirdLock}: used to guard state related to process state sequence numbers
+ * of uids which are currently blocked waiting for network.
+ * <li>{@code allLocks}: not a "real" lock, but an indication (through @GuardedBy) that both locks
+ * {@code mUidRulesFirstLock} and {@code mNetworkPoliciesSecondLock} must be held.
  * </ul>
  *
  * <p>
@@ -225,8 +237,11 @@
  * <ul>
  * <li>{@code UL()}: require the "UID" lock ({@code mUidRulesFirstLock}).
  * <li>{@code NL()}: require the "Network" lock ({@code mNetworkPoliciesSecondLock}).
- * <li>{@code AL()}: require all locks, which must be obtained in order ({@code mUidRulesFirstLock}
- * first, then {@code mNetworkPoliciesSecondLock}, then {@code mYetAnotherGuardThirdLock}, etc..
+ * <li>{@code DL()}: require the "Dispatched" lock ({@code mDispatchedThirdLock}).
+ * <li>{@code AL()}: require both locks {@code mUidRulesFirstLock} and
+ * {@code mNetworkPoliciesSecondLock}.
+ * When multiple locks are needed, they must be obtained in order ({@code mUidRulesFirstLock}
+ * first, then {@code mNetworkPoliciesSecondLock}, then {@code mDispatchedThirdLock}, etc..
  * </ul>
  */
 public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
@@ -313,6 +328,27 @@
     // See main javadoc for instructions on how to use these locks.
     final Object mUidRulesFirstLock = new Object();
     final Object mNetworkPoliciesSecondLock = new Object();
+    final Object mDispatchedThirdLock = new Object();
+
+    @GuardedBy("mDispatchedThirdLock")
+    private final SparseLongArray mLastHandledProcStateSeq = new SparseLongArray();
+
+    /**
+     * Used for tracking whether the updated uid and firewall rules have been dispatched to
+     * ConnectivityService and NetworkManagementService respectively.
+     *
+     * SparseIntArray: uid -> dispatch flags (one or more combinations of {@link #FLAG_NONE},
+     * {@link #FLAG_UID_RULES_DISPATCHED}, {@link #FLAG_FIREWALL_RULES_DISPATCHED} and
+     * {@link #FLAG_ALL_RULES_DISPATCHED}).
+     */
+    @GuardedBy("mDispatchedThirdLock")
+    private final SparseIntArray mDispatchFlagsForCurProcStateSeq = new SparseIntArray();
+
+    private final int FLAG_NONE = 0;
+    private final int FLAG_UID_RULES_DISPATCHED = 1 << 0;
+    private final int FLAG_FIREWALL_RULES_DISPATCHED = 1 << 1;
+    private final int FLAG_ALL_RULES_DISPATCHED =
+            (FLAG_UID_RULES_DISPATCHED | FLAG_FIREWALL_RULES_DISPATCHED);
 
     @GuardedBy("allLocks") volatile boolean mSystemReady;
 
@@ -407,6 +443,8 @@
 
     private final IPackageManager mIPm;
 
+    private ActivityManagerInternal mActivityManagerInternal;
+
 
     // TODO: keep whitelist of system-critical services that should never have
     // rules enforced, such as system, phone, and radio UIDs.
@@ -617,13 +655,16 @@
 
             try {
                 mActivityManager.registerUidObserver(mUidObserver,
-                        ActivityManager.UID_OBSERVER_PROCSTATE|ActivityManager.UID_OBSERVER_GONE,
+                        ActivityManager.UID_OBSERVER_GONE,
                         ActivityManager.PROCESS_STATE_UNKNOWN, null);
                 mNetworkManager.registerObserver(mAlertObserver);
             } catch (RemoteException e) {
                 // ignored; both services live in system_server
             }
 
+            mActivityManagerInternal = LocalServices.getService(ActivityManagerInternal.class);
+            mActivityManagerInternal.setUidStateWithSeqObserver(mUidStateWithSeqObserver);
+
             // listen for changes to power save whitelist
             final IntentFilter whitelistFilter = new IntentFilter(
                     PowerManager.ACTION_POWER_SAVE_WHITELIST_CHANGED);
@@ -705,17 +746,24 @@
         }
     }
 
-    final private IUidObserver mUidObserver = new IUidObserver.Stub() {
-        @Override public void onUidStateChanged(int uid, int procState) throws RemoteException {
+    final private UidStateWithSeqObserver mUidStateWithSeqObserver = new UidStateWithSeqObserver() {
+        @Override
+        public void onUidStateChangedWithSeq(int uid, int procState, long procStateSeq) {
             Trace.traceBegin(Trace.TRACE_TAG_NETWORK, "onUidStateChanged");
             try {
+                final long effectiveProcStateSeq = getEffectiveProcStateSeq(uid, procStateSeq);
                 synchronized (mUidRulesFirstLock) {
-                    updateUidStateUL(uid, procState);
+                    updateUidStateUL(uid, procState, effectiveProcStateSeq);
                 }
             } finally {
                 Trace.traceEnd(Trace.TRACE_TAG_NETWORK);
             }
         }
+    };
+
+    final private IUidObserver mUidObserver = new IUidObserver.Stub() {
+        @Override public void onUidStateChanged(int uid, int procState) throws RemoteException {
+        }
 
         @Override public void onUidGone(int uid, boolean disabled) throws RemoteException {
             synchronized (mUidRulesFirstLock) {
@@ -1842,7 +1890,7 @@
         }
 
         // uid policy changed, recompute rules and persist policy.
-        updateRulesForDataUsageRestrictionsUL(uid);
+        updateRulesForDataUsageRestrictionsUL(uid, true);
         if (persist) {
             synchronized (mNetworkPoliciesSecondLock) {
                 writePolicyAL();
@@ -2441,7 +2489,7 @@
 
     private boolean isUidForegroundOnRestrictBackgroundUL(int uid) {
         final int procState = mUidState.get(uid, ActivityManager.PROCESS_STATE_CACHED_EMPTY);
-        return isProcStateAllowedWhileOnRestrictBackground(procState);
+        return isProcStateAllowedWhileRestrictBackgroundOn(procState);
     }
 
     private boolean isUidForegroundOnRestrictPowerUL(int uid) {
@@ -2459,26 +2507,50 @@
      * {@link #updateRulesForDataUsageRestrictionsUL(int)} and
      * {@link #updateRulesForPowerRestrictionsUL(int)}
      */
-    private void updateUidStateUL(int uid, int uidState) {
+    private void updateUidStateUL(int uid, int uidState, long procStateSeq) {
         Trace.traceBegin(Trace.TRACE_TAG_NETWORK, "updateUidStateUL");
         try {
             final int oldUidState = mUidState.get(uid, ActivityManager.PROCESS_STATE_CACHED_EMPTY);
             if (oldUidState != uidState) {
                 // state changed, push updated rules
                 mUidState.put(uid, uidState);
-                updateRestrictBackgroundRulesOnUidStatusChangedUL(uid, oldUidState, uidState);
-                if (isProcStateAllowedWhileIdleOrPowerSaveMode(oldUidState)
-                        != isProcStateAllowedWhileIdleOrPowerSaveMode(uidState) ) {
-                    if (isUidIdle(uid)) {
-                        updateRuleForAppIdleUL(uid);
+                if (procStateSeq != INVALID_PROC_STATE_SEQ) {
+                    int updatedUidRules = RULE_INVALID;
+                    ReturnStatus status = updateRestrictBackgroundRulesOnUidStatusChangedUL(
+                            uid, oldUidState, uidState, false);
+                    if (status != null && status.mNeedToNotify) {
+                        updatedUidRules = status.mNewUidRules;
                     }
-                    if (mDeviceIdleMode) {
-                        updateRuleForDeviceIdleUL(uid);
+                    final boolean procStateChangedAllowedWhileIdleOrPowerSaveMode =
+                            isProcStateAllowedWhileIdleOrPowerSaveMode(oldUidState)
+                                    != isProcStateAllowedWhileIdleOrPowerSaveMode(uidState);
+                    if (procStateChangedAllowedWhileIdleOrPowerSaveMode) {
+                        status = updateRulesForPowerRestrictionsUL(uid, false);
+                        if (status != null && status.mNeedToNotify) {
+                            updatedUidRules = status.mNewUidRules;
+                        }
                     }
-                    if (mRestrictPower) {
-                        updateRuleForRestrictPowerUL(uid);
+                    // TODO: We can avoid this if the rules are not changed. But since dispatching
+                    // to ConnectivityService is currently asynchronous, we need this to make sure
+                    // any previous the msg_rules_changes have been handled. Optimize this once
+                    // dispatching from NPMS to ConnectivityService is made synchronous.
+                    mHandler.obtainMessage(MSG_RULES_CHANGED, uid, updatedUidRules,
+                            procStateSeq).sendToTarget();
+                    if (procStateChangedAllowedWhileIdleOrPowerSaveMode) {
+                        if (isUidIdle(uid)) {
+                            updateRuleForAppIdleUL(uid);
+                        }
+                        if (mDeviceIdleMode) {
+                            updateRuleForDeviceIdleUL(uid);
+                        }
+                        if (mRestrictPower) {
+                            updateRuleForRestrictPowerUL(uid);
+                        }
                     }
-                    updateRulesForPowerRestrictionsUL(uid);
+                    synchronized (mDispatchedThirdLock) {
+                        setDispatchedFlagDL(uid, procStateSeq, FLAG_FIREWALL_RULES_DISPATCHED);
+                        checkAndNotifyDL(uid, procStateSeq);
+                    }
                 }
                 updateNetworkStats(uid, isUidStateForegroundUL(uidState));
             }
@@ -2487,6 +2559,61 @@
         }
     }
 
+    /**
+     * Returns {@link android.app.ActivityThread#INVALID_PROC_STATE_SEQ} if acting on
+     * {@param procStateSeq} leads to an invalid state, otherwise update global state and return
+     * {@param procStateSeq}.
+     */
+    private long getEffectiveProcStateSeq(int uid, long procStateSeq) {
+        synchronized (mDispatchedThirdLock) {
+            final long lastHandledProcStateSeq = mLastHandledProcStateSeq.get(uid);
+            if (procStateSeq < lastHandledProcStateSeq) {
+                Slog.wtf(TAG, "procStateSeq from AMS should never go down, procStateSeq: "
+                        + procStateSeq + " lastHandledProcStateSeq: " + lastHandledProcStateSeq
+                        + " uid: " + uid);
+                return INVALID_PROC_STATE_SEQ;
+            }
+            if (procStateSeq == lastHandledProcStateSeq) {
+                if (LOGD) {
+                    Slog.d(TAG, "procStateSeq: " + procStateSeq + " is not changed, so process is "
+                            + "not jumping from background to foreground or vice versa. "
+                            + "uid: " + uid);
+                }
+                return INVALID_PROC_STATE_SEQ;
+            }
+            mLastHandledProcStateSeq.put(uid, procStateSeq);
+            mDispatchFlagsForCurProcStateSeq.put(uid, 0);
+            return procStateSeq;
+        }
+    }
+
+    /**
+     * Update dispatch flags to include {@param flag}.
+     */
+    private void setDispatchedFlagDL(int uid, long procStateSeq, int flag) {
+        int dispatchedFlag = mDispatchFlagsForCurProcStateSeq.get(uid);
+        dispatchedFlag |= flag;
+        mDispatchFlagsForCurProcStateSeq.put(uid, dispatchedFlag);
+    }
+
+    /**
+     * Check whether uid and firewall rules are dispatched to ConnectivityService and
+     * NetworkManagementService respectively, if so notify ActivityManagerService that network
+     * rules are updated.
+     */
+    private void checkAndNotifyDL(int uid, long procStateSeq) {
+        synchronized (mDispatchedThirdLock) {
+            final int dispatchedFlags = mDispatchFlagsForCurProcStateSeq.get(uid);
+            if (dispatchedFlags == FLAG_ALL_RULES_DISPATCHED) {
+                if (LOGD) {
+                    Slog.d(TAG, "Notifying AMS that network rules are updated for uid: " + uid
+                            + " seq: " + procStateSeq + " callers: " + Debug.getCallers(3));
+                }
+                mActivityManagerInternal.notifyNetworkPolicyRulesUpdated(uid, procStateSeq);
+            }
+        }
+    }
+
     private void removeUidStateUL(int uid) {
         final int index = mUidState.indexOfKey(uid);
         if (index >= 0) {
@@ -2494,17 +2621,21 @@
             mUidState.removeAt(index);
             if (oldUidState != ActivityManager.PROCESS_STATE_CACHED_EMPTY) {
                 updateRestrictBackgroundRulesOnUidStatusChangedUL(uid, oldUidState,
-                        ActivityManager.PROCESS_STATE_CACHED_EMPTY);
+                        ActivityManager.PROCESS_STATE_CACHED_EMPTY, true);
                 if (mDeviceIdleMode) {
                     updateRuleForDeviceIdleUL(uid);
                 }
                 if (mRestrictPower) {
                     updateRuleForRestrictPowerUL(uid);
                 }
-                updateRulesForPowerRestrictionsUL(uid);
+                updateRulesForPowerRestrictionsUL(uid, true);
                 updateNetworkStats(uid, false);
             }
         }
+        synchronized (mDispatchedThirdLock) {
+            mLastHandledProcStateSeq.delete(uid);
+            mDispatchFlagsForCurProcStateSeq.delete(uid);
+        }
     }
 
     // adjust stats accounting based on foreground status
@@ -2516,23 +2647,16 @@
         }
     }
 
-    private void updateRestrictBackgroundRulesOnUidStatusChangedUL(int uid, int oldUidState,
-            int newUidState) {
+    private ReturnStatus updateRestrictBackgroundRulesOnUidStatusChangedUL(int uid, int oldUidState,
+            int newUidState, boolean notify) {
         final boolean oldForeground =
-                isProcStateAllowedWhileOnRestrictBackground(oldUidState);
+                isProcStateAllowedWhileRestrictBackgroundOn(oldUidState);
         final boolean newForeground =
-                isProcStateAllowedWhileOnRestrictBackground(newUidState);
+                isProcStateAllowedWhileRestrictBackgroundOn(newUidState);
         if (oldForeground != newForeground) {
-            updateRulesForDataUsageRestrictionsUL(uid);
+            return updateRulesForDataUsageRestrictionsUL(uid, notify);
         }
-    }
-
-    static boolean isProcStateAllowedWhileIdleOrPowerSaveMode(int procState) {
-        return procState <= ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE;
-    }
-
-    static boolean isProcStateAllowedWhileOnRestrictBackground(int procState) {
-        return procState <= ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE;
+        return null;
     }
 
     void updateRulesForPowerSaveUL() {
@@ -2681,7 +2805,7 @@
                 // Skip if it had no restrictions to begin with
                 if ((oldRules & MASK_ALL_NETWORKS) == 0) continue;
             }
-            updateRulesForPowerRestrictionsUL(uid, oldRules, paroled);
+            updateRulesForPowerRestrictionsUL(uid, oldRules, paroled, true);
         }
     }
 
@@ -2761,10 +2885,10 @@
                     final int uid = UserHandle.getUid(user.id, app.uid);
                     switch (type) {
                         case TYPE_RESTRICT_BACKGROUND:
-                            updateRulesForDataUsageRestrictionsUL(uid);
+                            updateRulesForDataUsageRestrictionsUL(uid, true);
                             break;
                         case TYPE_RESTRICT_POWER:
-                            updateRulesForPowerRestrictionsUL(uid);
+                            updateRulesForPowerRestrictionsUL(uid, true);
                             break;
                         default:
                             Slog.w(TAG, "Invalid type for updateRulesForAllApps: " + type);
@@ -2790,7 +2914,7 @@
                 updateRuleForDeviceIdleUL(uid);
                 updateRuleForRestrictPowerUL(uid);
                 // Update internal rules.
-                updateRulesForPowerRestrictionsUL(uid);
+                updateRulesForPowerRestrictionsUL(uid, true);
             }
         }
     }
@@ -2854,6 +2978,10 @@
         mPowerSaveWhitelistExceptIdleAppIds.delete(uid);
         mPowerSaveWhitelistAppIds.delete(uid);
         mPowerSaveTempWhitelistAppIds.delete(uid);
+        synchronized (mDispatchedThirdLock) {
+            mLastHandledProcStateSeq.delete(uid);
+            mDispatchFlagsForCurProcStateSeq.delete(uid);
+        }
 
         // ...then update iptables asynchronously.
         mHandler.obtainMessage(MSG_RESET_FIREWALL_RULES_BY_UID, uid, 0).sendToTarget();
@@ -2879,10 +3007,10 @@
         updateRuleForRestrictPowerUL(uid);
 
         // Update internal state for power-related modes.
-        updateRulesForPowerRestrictionsUL(uid);
+        updateRulesForPowerRestrictionsUL(uid, true);
 
         // Update firewall and internal rules for Data Saver Mode.
-        updateRulesForDataUsageRestrictionsUL(uid);
+        updateRulesForDataUsageRestrictionsUL(uid, true);
     }
 
     /**
@@ -2923,11 +3051,16 @@
      *
      * <p>The {@link #mUidRules} map is used to define the transtion of states of an UID.
      *
+     * @param uid The uid for which the rules have to be updated.
+     * @param notify Indicates whether to notify network policy listeners if the rules are updated.
+     *
+     * @return ReturnStatus includes new updated rules and whether network policy listeners
+     *         (INetworkPolicyListener) need to be notified.
      */
-    private void updateRulesForDataUsageRestrictionsUL(int uid) {
+    private ReturnStatus updateRulesForDataUsageRestrictionsUL(int uid, boolean notify) {
         if (!isUidValidForWhitelistRules(uid)) {
             if (LOGD) Slog.d(TAG, "no need to update restrict data rules for uid " + uid);
-            return;
+            return new ReturnStatus(false, RULE_NONE);
         }
 
         final int uidPolicy = mUidPolicy.get(uid, POLICY_NONE);
@@ -3022,9 +3155,12 @@
                         + ", oldRule=" + uidRulesToString(oldUidRules));
             }
 
-            // Dispatch changed rule to existing listeners.
-            mHandler.obtainMessage(MSG_RULES_CHANGED, uid, newUidRules).sendToTarget();
+            if (notify) {
+                mHandler.obtainMessage(MSG_RULES_CHANGED, uid, newUidRules).sendToTarget();
+            }
+            return new ReturnStatus(true, newUidRules);
         }
+        return new ReturnStatus(false, newUidRules);
     }
 
     /**
@@ -3045,16 +3181,18 @@
      * <p>
      * <strong>NOTE: </strong>This method does not update the firewall rules on {@code netd}.
      */
-    private void updateRulesForPowerRestrictionsUL(int uid) {
+    private ReturnStatus updateRulesForPowerRestrictionsUL(int uid, boolean notify) {
         final int oldUidRules = mUidRules.get(uid, RULE_NONE);
 
-        final int newUidRules = updateRulesForPowerRestrictionsUL(uid, oldUidRules, false);
+        final ReturnStatus status = updateRulesForPowerRestrictionsUL(uid, oldUidRules, false,
+                notify);
 
-        if (newUidRules == RULE_NONE) {
+        if (status.mNewUidRules == RULE_NONE) {
             mUidRules.delete(uid);
         } else {
-            mUidRules.put(uid, newUidRules);
+            mUidRules.put(uid, status.mNewUidRules);
         }
+        return status;
     }
 
     /**
@@ -3063,13 +3201,17 @@
      * @param uid the uid of the app to update rules for
      * @param oldUidRules the current rules for the uid, in order to determine if there's a change
      * @param paroled whether to ignore idle state of apps and only look at other restrictions.
+     * @param notify whether to notify network policy listeners (INetworkPolicyListener) if the
+     *               rules are updated.
      *
-     * @return the new computed rules for the uid
+     * @return ReturnStatus includes new updated rules and whether network policy listeners
+     *         (INetworkPolicyListener) need to be notified.
      */
-    private int updateRulesForPowerRestrictionsUL(int uid, int oldUidRules, boolean paroled) {
+    private ReturnStatus updateRulesForPowerRestrictionsUL(int uid, int oldUidRules,
+            boolean paroled, boolean notify) {
         if (!isUidValidForBlacklistRules(uid)) {
             if (LOGD) Slog.d(TAG, "no need to update restrict power rules for uid " + uid);
-            return RULE_NONE;
+            return new ReturnStatus(false, RULE_NONE);
         }
 
         final boolean isIdle = !paroled && isUidIdle(uid);
@@ -3121,10 +3263,23 @@
                         + ", newRule=" + uidRulesToString(newUidRules)
                         + ", oldRule=" + uidRulesToString(oldUidRules));
             }
-            mHandler.obtainMessage(MSG_RULES_CHANGED, uid, newUidRules).sendToTarget();
+            if (notify) {
+                mHandler.obtainMessage(MSG_RULES_CHANGED, uid, newUidRules).sendToTarget();
+            }
+            return new ReturnStatus(true, newUidRules);
         }
 
-        return newUidRules;
+        return new ReturnStatus(false, newUidRules);
+    }
+
+    private static final class ReturnStatus {
+        boolean mNeedToNotify;
+        int mNewUidRules;
+
+        ReturnStatus(boolean needToNotify, int newUidRules) {
+            mNeedToNotify = needToNotify;
+            mNewUidRules = newUidRules;
+        }
     }
 
     private class AppIdleStateChangeListener
@@ -3138,7 +3293,7 @@
                 if (LOGV) Log.v(TAG, "onAppIdleStateChanged(): uid=" + uid + ", idle=" + idle);
                 synchronized (mUidRulesFirstLock) {
                     updateRuleForAppIdleUL(uid);
-                    updateRulesForPowerRestrictionsUL(uid);
+                    updateRulesForPowerRestrictionsUL(uid, true);
                 }
             } catch (NameNotFoundException nnfe) {
             }
@@ -3198,13 +3353,26 @@
                 case MSG_RULES_CHANGED: {
                     final int uid = msg.arg1;
                     final int uidRules = msg.arg2;
-                    dispatchUidRulesChanged(mConnectivityListener, uid, uidRules);
-                    final int length = mListeners.beginBroadcast();
-                    for (int i = 0; i < length; i++) {
-                        final INetworkPolicyListener listener = mListeners.getBroadcastItem(i);
-                        dispatchUidRulesChanged(listener, uid, uidRules);
+                    if (uidRules != RULE_INVALID) {
+                        dispatchUidRulesChanged(mConnectivityListener, uid, uidRules);
                     }
-                    mListeners.finishBroadcast();
+                    final Long procStateSeq = (Long) msg.obj;
+                    if (procStateSeq != null) {
+                        synchronized (mDispatchedThirdLock) {
+                            if (mLastHandledProcStateSeq.get(uid) == procStateSeq) {
+                                setDispatchedFlagDL(uid, procStateSeq, FLAG_UID_RULES_DISPATCHED);
+                                checkAndNotifyDL(uid, procStateSeq);
+                            }
+                        }
+                    }
+                    if (uidRules != RULE_INVALID) {
+                        final int length = mListeners.beginBroadcast();
+                        for (int i = 0; i < length; i++) {
+                            final INetworkPolicyListener listener = mListeners.getBroadcastItem(i);
+                            dispatchUidRulesChanged(listener, uid, uidRules);
+                        }
+                        mListeners.finishBroadcast();
+                    }
                     return true;
                 }
                 case MSG_METERED_IFACES_CHANGED: {
diff --git a/services/core/java/com/android/server/notification/NotificationComparator.java b/services/core/java/com/android/server/notification/NotificationComparator.java
index 6f49df4..d6c89a4 100644
--- a/services/core/java/com/android/server/notification/NotificationComparator.java
+++ b/services/core/java/com/android/server/notification/NotificationComparator.java
@@ -31,6 +31,8 @@
 import android.text.TextUtils;
 import android.util.ArrayMap;
 
+import com.android.internal.util.NotificationMessagingUtil;
+
 import java.util.Comparator;
 import java.util.Objects;
 
@@ -40,18 +42,15 @@
 public class NotificationComparator
         implements Comparator<NotificationRecord> {
 
-    private final String DEFAULT_SMS_APP_SETTING = Settings.Secure.SMS_DEFAULT_APPLICATION;
-
     private final Context mContext;
+    private final NotificationMessagingUtil mMessagingUtil;
     private String mDefaultPhoneApp;
-    private ArrayMap<Integer, String> mDefaultSmsApp = new ArrayMap<>();
 
     public NotificationComparator(Context context) {
         mContext = context;
         mContext.registerReceiver(mPhoneAppBroadcastReceiver,
                 new IntentFilter(TelecomManager.ACTION_DEFAULT_DIALER_CHANGED));
-        mContext.getContentResolver().registerContentObserver(
-                Settings.Secure.getUriFor(DEFAULT_SMS_APP_SETTING), false, mSmsContentObserver);
+        mMessagingUtil = new NotificationMessagingUtil(mContext);
     }
 
     @Override
@@ -73,9 +72,15 @@
             return -1 * Boolean.compare(leftImportantOngoing, rightImportantOngoing);
         }
 
+        boolean leftMessaging = isImportantMessaging(left);
+        boolean rightMessaging = isImportantMessaging(right);
+        if (leftMessaging != rightMessaging) {
+            return -1 * Boolean.compare(leftMessaging, rightMessaging);
+        }
+
         // Next: sufficiently import person to person communication
-        boolean leftPeople = isImportantMessaging(left);
-        boolean rightPeople = isImportantMessaging(right);
+        boolean leftPeople = isImportantPeople(left);
+        boolean rightPeople = isImportantPeople(right);
 
         if (leftPeople && rightPeople){
             // by contact proximity, close to far. if same proximity, check further fields.
@@ -128,53 +133,33 @@
         if (record.getImportance() < NotificationManager.IMPORTANCE_LOW) {
             return false;
         }
-
         // TODO: add whitelist
 
         return isCall(record) || isMediaNotification(record);
     }
 
-    protected boolean isImportantMessaging(NotificationRecord record) {
+    protected boolean isImportantPeople(NotificationRecord record) {
         if (record.getImportance() < NotificationManager.IMPORTANCE_LOW) {
             return false;
         }
-
-        Class<? extends Notification.Style> style = getNotificationStyle(record);
-        if (Notification.MessagingStyle.class.equals(style)) {
-            return true;
-        }
-
         if (record.getContactAffinity() > ValidateNotificationPeople.NONE) {
             return true;
         }
-
-        if (record.getNotification().category == Notification.CATEGORY_MESSAGE
-                && isDefaultMessagingApp(record)) {
-            return true;
-        }
-
         return false;
     }
 
+    protected boolean isImportantMessaging(NotificationRecord record) {
+        return mMessagingUtil.isImportantMessaging(record.sbn, record.getImportance());
+    }
+
     private boolean isOngoing(NotificationRecord record) {
         final int ongoingFlags =
                 Notification.FLAG_FOREGROUND_SERVICE | Notification.FLAG_ONGOING_EVENT;
         return (record.getNotification().flags & ongoingFlags) != 0;
     }
 
-    private Class<? extends Notification.Style> getNotificationStyle(NotificationRecord record) {
-        String templateClass =
-                record.getNotification().extras.getString(Notification.EXTRA_TEMPLATE);
-
-        if (!TextUtils.isEmpty(templateClass)) {
-            return Notification.getNotificationStyleClass(templateClass);
-        }
-        return null;
-    }
-
     private boolean isMediaNotification(NotificationRecord record) {
-        return record.getNotification().extras.getParcelable(
-                Notification.EXTRA_MEDIA_SESSION) != null;
+        return record.getNotification().hasMediaSession();
     }
 
     private boolean isCall(NotificationRecord record) {
@@ -191,18 +176,6 @@
         return Objects.equals(pkg, mDefaultPhoneApp);
     }
 
-    @SuppressWarnings("deprecation")
-    private boolean isDefaultMessagingApp(NotificationRecord record) {
-        final int userId = record.getUserId();
-        if (userId == UserHandle.USER_NULL || userId == UserHandle.USER_ALL) return false;
-        if (mDefaultSmsApp.get(userId) == null) {
-            mDefaultSmsApp.put(userId, Settings.Secure.getStringForUser(
-                    mContext.getContentResolver(),
-                    Settings.Secure.SMS_DEFAULT_APPLICATION, userId));
-        }
-        return Objects.equals(mDefaultSmsApp.get(userId), record.sbn.getPackageName());
-    }
-
     private final BroadcastReceiver mPhoneAppBroadcastReceiver = new BroadcastReceiver() {
         @Override
         public void onReceive(Context context, Intent intent) {
@@ -210,17 +183,4 @@
                     intent.getStringExtra(TelecomManager.EXTRA_CHANGE_DEFAULT_DIALER_PACKAGE_NAME);
         }
     };
-
-    private final ContentObserver mSmsContentObserver = new ContentObserver(
-            new Handler(Looper.getMainLooper())) {
-        @Override
-        public void onChange(boolean selfChange, Uri uri, int userId) {
-            if (Settings.Secure.getUriFor(DEFAULT_SMS_APP_SETTING).equals(uri)) {
-                mDefaultSmsApp.put(userId, Settings.Secure.getStringForUser(
-                        mContext.getContentResolver(),
-                        Settings.Secure.SMS_DEFAULT_APPLICATION, userId));
-
-            }
-        }
-    };
 }
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index b543b73..f2b5564 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -115,9 +115,13 @@
 import android.service.notification.NotificationAssistantService;
 import android.service.notification.NotificationListenerService;
 import android.service.notification.NotificationRankingUpdate;
+import android.service.notification.NotificationRecordProto;
+import android.service.notification.NotificationServiceDumpProto;
+import android.service.notification.NotificationServiceProto;
 import android.service.notification.SnoozeCriterion;
 import android.service.notification.StatusBarNotification;
 import android.service.notification.ZenModeConfig;
+import android.service.notification.ZenModeProto;
 import android.telephony.PhoneStateListener;
 import android.telephony.TelephonyManager;
 import android.text.TextUtils;
@@ -128,6 +132,7 @@
 import android.util.Slog;
 import android.util.SparseArray;
 import android.util.Xml;
+import android.util.proto.ProtoOutputStream;
 import android.view.WindowManagerInternal;
 import android.view.accessibility.AccessibilityEvent;
 import android.view.accessibility.AccessibilityManager;
@@ -136,6 +141,7 @@
 import com.android.internal.R;
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.logging.MetricsLogger;
+import com.android.internal.logging.nano.MetricsProto;
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
 import com.android.internal.statusbar.NotificationVisibility;
 import com.android.internal.util.FastXmlSerializer;
@@ -1674,11 +1680,19 @@
         @Override
         public ParceledListSlice<NotificationChannel> getNotificationChannelsForPackage(String pkg,
                 int uid, boolean includeDeleted) {
-            checkCallerIsSystem();
+            enforceSystemOrSystemUI("getNotificationChannelsForPackage");
             return mRankingHelper.getNotificationChannels(pkg, uid, includeDeleted);
         }
 
         @Override
+        public int getNumNotificationChannelsForPackage(String pkg, int uid,
+                boolean includeDeleted) {
+            enforceSystemOrSystemUI("getNumNotificationChannelsForPackage");
+            return mRankingHelper.getNotificationChannels(pkg, uid, includeDeleted)
+                    .getList().size();
+        }
+
+        @Override
         public ParceledListSlice<NotificationChannelGroup> getNotificationChannelGroupsForPackage(
                 String pkg, int uid, boolean includeDeleted) {
             checkCallerIsSystem();
@@ -1686,15 +1700,21 @@
         }
 
         @Override
+        public NotificationChannelGroup getNotificationChannelGroupForPackage(
+                String groupId, String pkg, int uid) {
+            enforceSystemOrSystemUI("getNotificationChannelGroupForPackage");
+            return mRankingHelper.getNotificationChannelGroup(groupId, pkg, uid);
+        }
+
+        @Override
         public ParceledListSlice<NotificationChannel> getNotificationChannels(String pkg) {
             checkCallerIsSystemOrSameApp(pkg);
             return mRankingHelper.getNotificationChannels(
                     pkg, Binder.getCallingUid(), false /* includeDeleted */);
         }
 
-
         @Override
-        public void clearData(String packageName, int uid) throws RemoteException {
+        public void clearData(String packageName, int uid, boolean fromApp) throws RemoteException {
             checkCallerIsSystem();
 
             // Cancel posted notifications
@@ -1709,8 +1729,10 @@
             mConditionProviders.onPackagesChanged(true, new String[] {packageName});
 
             // Reset notification preferences
-            mRankingHelper.onPackagesChanged(true, UserHandle.getCallingUserId(),
-                    new String[] {packageName}, new int[] {uid});
+            if (!fromApp) {
+                mRankingHelper.onPackagesChanged(true, UserHandle.getCallingUserId(),
+                        new String[]{packageName}, new int[]{uid});
+            }
 
             savePolicyFile();
         }
@@ -2400,6 +2422,8 @@
             final DumpFilter filter = DumpFilter.parseFromArguments(args);
             if (filter != null && filter.stats) {
                 dumpJson(pw, filter);
+            } else if (filter != null && filter.proto) {
+                dumpProto(fd, filter);
             } else {
                 dumpImpl(pw, filter);
             }
@@ -2436,12 +2460,14 @@
                 Slog.w(TAG, "getBackupPayload: cannot backup policy for user " + user);
                 return null;
             }
-            final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-            try {
-                writePolicyXml(baos, true /*forBackup*/);
-                return baos.toByteArray();
-            } catch (IOException e) {
-                Slog.w(TAG, "getBackupPayload: error writing payload for user " + user, e);
+            synchronized(mPolicyFile) {
+                final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+                try {
+                    writePolicyXml(baos, true /*forBackup*/);
+                    return baos.toByteArray();
+                } catch (IOException e) {
+                    Slog.w(TAG, "getBackupPayload: error writing payload for user " + user, e);
+                }
             }
             return null;
         }
@@ -2459,12 +2485,14 @@
                 Slog.w(TAG, "applyRestore: cannot restore policy for user " + user);
                 return;
             }
-            final ByteArrayInputStream bais = new ByteArrayInputStream(payload);
-            try {
-                readPolicyXml(bais, true /*forRestore*/);
-                savePolicyFile();
-            } catch (NumberFormatException | XmlPullParserException | IOException e) {
-                Slog.w(TAG, "applyRestore: error reading payload", e);
+            synchronized(mPolicyFile) {
+                final ByteArrayInputStream bais = new ByteArrayInputStream(payload);
+                try {
+                    readPolicyXml(bais, true /*forRestore*/);
+                    savePolicyFile();
+                } catch (NumberFormatException | XmlPullParserException | IOException e) {
+                    Slog.w(TAG, "applyRestore: error reading payload", e);
+                }
             }
         }
 
@@ -2764,6 +2792,51 @@
         pw.println(dump);
     }
 
+    private void dumpProto(FileDescriptor fd, DumpFilter filter) {
+        final ProtoOutputStream proto = new ProtoOutputStream(fd);
+        synchronized (mNotificationLock) {
+            long records = proto.start(NotificationServiceDumpProto.RECORDS);
+            int N = mNotificationList.size();
+            if (N > 0) {
+                for (int i = 0; i < N; i++) {
+                    final NotificationRecord nr = mNotificationList.get(i);
+                    if (filter.filtered && !filter.matches(nr.sbn)) continue;
+                    nr.dump(proto, filter.redact);
+                    proto.write(NotificationRecordProto.STATE, NotificationServiceProto.POSTED);
+                }
+            }
+            N = mEnqueuedNotifications.size();
+            if (N > 0) {
+                for (int i = 0; i < N; i++) {
+                    final NotificationRecord nr = mEnqueuedNotifications.get(i);
+                    if (filter.filtered && !filter.matches(nr.sbn)) continue;
+                    nr.dump(proto, filter.redact);
+                    proto.write(NotificationRecordProto.STATE, NotificationServiceProto.ENQUEUED);
+                }
+            }
+            List<NotificationRecord> snoozed = mSnoozeHelper.getSnoozed();
+            N = snoozed.size();
+            if (N > 0) {
+                for (int i = 0; i < N; i++) {
+                    final NotificationRecord nr = snoozed.get(i);
+                    if (filter.filtered && !filter.matches(nr.sbn)) continue;
+                    nr.dump(proto, filter.redact);
+                    proto.write(NotificationRecordProto.STATE, NotificationServiceProto.SNOOZED);
+                }
+            }
+            proto.end(records);
+        }
+
+        long zenLog = proto.start(NotificationServiceDumpProto.ZEN);
+        mZenModeHelper.dump(proto);
+        for (ComponentName suppressor : mEffectsSuppressors) {
+            proto.write(ZenModeProto.SUPPRESSORS, suppressor.toString());
+        }
+        proto.end(zenLog);
+
+        proto.flush();
+    }
+
     void dumpImpl(PrintWriter pw, DumpFilter filter) {
         pw.print("Current Notification Manager state");
         if (filter.filtered) {
@@ -2846,24 +2919,12 @@
                         }
                         pw.println("  ");
                     }
+
+                    mSnoozeHelper.dump(pw, filter);
                 }
             }
 
             if (!zenOnly) {
-                pw.println("\n  Usage Stats:");
-                mUsageStats.dump(pw, "    ", filter);
-            }
-
-            if (!filter.filtered || zenOnly) {
-                pw.println("\n  Zen Mode:");
-                pw.print("    mInterruptionFilter="); pw.println(mInterruptionFilter);
-                mZenModeHelper.dump(pw, "    ");
-
-                pw.println("\n  Zen Log:");
-                ZenLog.dump(pw, "    ");
-            }
-
-            if (!zenOnly) {
                 pw.println("\n  Ranking Config:");
                 mRankingHelper.dump(pw, "    ", filter);
 
@@ -2892,8 +2953,13 @@
                 mNotificationAssistants.dump(pw, filter);
             }
 
-            if (!zenOnly) {
-                mSnoozeHelper.dump(pw, filter);
+            if (!filter.filtered || zenOnly) {
+                pw.println("\n  Zen Mode:");
+                pw.print("    mInterruptionFilter="); pw.println(mInterruptionFilter);
+                mZenModeHelper.dump(pw, "    ");
+
+                pw.println("\n  Zen Log:");
+                ZenLog.dump(pw, "    ");
             }
 
             pw.println("\n  Policy access:");
@@ -2911,6 +2977,11 @@
                     r.dump(pw, "      ", getContext(), filter.redact);
                 }
             }
+
+            if (!zenOnly) {
+                pw.println("\n  Usage Stats:");
+                mUsageStats.dump(pw, "    ", filter);
+            }
         }
     }
 
@@ -3078,7 +3149,9 @@
 
         // snoozed apps
         if (mSnoozeHelper.isSnoozed(userId, pkg, r.getKey())) {
-            // TODO: log to event log
+            MetricsLogger.action(r.getLogMaker()
+                    .setType(MetricsProto.MetricsEvent.TYPE_UPDATE)
+                    .setCategory(MetricsProto.MetricsEvent.NOTIFICATION_SNOOZED));
             if (DBG) {
                 Slog.d(TAG, "Ignored enqueue for snoozed notification " + r.getKey());
             }
@@ -3814,14 +3887,18 @@
     private void cancelNotificationLocked(NotificationRecord r, boolean sendDelete, int reason) {
         final String canceledKey = r.getKey();
 
-        // Remove from either list
-        boolean wasPosted;
-        if (mNotificationList.remove(r)) {
-            mNotificationsByKey.remove(r.sbn.getKey());
+        // Remove from both lists, either list could have a separate Record for what is effectively
+        // the same notification.
+        boolean wasPosted = false;
+        NotificationRecord recordInList = null;
+        if ((recordInList = findNotificationByListLocked(mNotificationList, r.getKey())) != null) {
+            mNotificationList.remove(recordInList);
+            mNotificationsByKey.remove(recordInList.sbn.getKey());
             wasPosted = true;
-        } else {
-            mEnqueuedNotifications.remove(r);
-            wasPosted = false;
+        }
+        if ((recordInList = findNotificationByListLocked(mEnqueuedNotifications, r.getKey()))
+                != null) {
+            mEnqueuedNotifications.remove(recordInList);
         }
 
         // Record caller.
@@ -4102,7 +4179,7 @@
         if (until < System.currentTimeMillis() && snoozeCriterionId == null) {
             return;
         }
-        // TODO: write to event log
+
         if (DBG) {
             Slog.d(TAG, String.format("snooze event(%s, %d, %s, %s)", key, until, snoozeCriterionId,
                     listenerName));
@@ -4114,6 +4191,11 @@
                 synchronized (mNotificationLock) {
                     final NotificationRecord r = findNotificationByKeyLocked(key);
                     if (r != null) {
+                        MetricsLogger.action(r.getLogMaker()
+                                .setCategory(MetricsEvent.NOTIFICATION_SNOOZED)
+                                .setType(MetricsEvent.TYPE_CLOSE)
+                                .addTaggedData(MetricsEvent.NOTIFICATION_SNOOZED_CRITERIA,
+                                        snoozeCriterionId == null ? false : true));
                         cancelNotificationLocked(r, false, REASON_SNOOZED);
                         updateLightsLocked();
                         if (snoozeCriterionId != null) {
@@ -4132,7 +4214,6 @@
 
     void unsnoozeNotificationInt(String key, ManagedServiceInfo listener) {
         String listenerName = listener == null ? null : listener.component.toShortString();
-        // TODO: write to event log
         if (DBG) {
             Slog.d(TAG, String.format("unsnooze event(%s, %s)", key, listenerName));
         }
@@ -4245,17 +4326,12 @@
     // TODO: need to combine a bunch of these getters with slightly different behavior.
     // TODO: Should enqueuing just add to mNotificationsByKey instead?
     private NotificationRecord findNotificationByKeyLocked(String key) {
-        final int N = mNotificationList.size();
-        for (int i = 0; i < N; i++) {
-            if (key.equals(mNotificationList.get(i).getKey())) {
-                return mNotificationList.get(i);
-            }
+        NotificationRecord r;
+        if ((r = findNotificationByListLocked(mNotificationList, key)) != null) {
+            return r;
         }
-        final int M = mEnqueuedNotifications.size();
-        for (int i = 0; i < M; i++) {
-            if (key.equals(mEnqueuedNotifications.get(i).getKey())) {
-                return mEnqueuedNotifications.get(i);
-            }
+        if ((r = findNotificationByListLocked(mEnqueuedNotifications, key)) != null) {
+            return r;
         }
         return null;
     }
@@ -4273,8 +4349,7 @@
     }
 
     private NotificationRecord findNotificationByListLocked(ArrayList<NotificationRecord> list,
-            String pkg, String tag, int id, int userId)
-    {
+            String pkg, String tag, int id, int userId) {
         final int len = list.size();
         for (int i = 0; i < len; i++) {
             NotificationRecord r = list.get(i);
@@ -4286,6 +4361,18 @@
         return null;
     }
 
+    private NotificationRecord findNotificationByListLocked(ArrayList<NotificationRecord> list,
+            String key)
+    {
+        final int N = list.size();
+        for (int i = 0; i < N; i++) {
+            if (key.equals(list.get(i).getKey())) {
+                return list.get(i);
+            }
+        }
+        return null;
+    }
+
     // lock on mNotificationList
     int indexOfNotificationLocked(String key) {
         final int N = mNotificationList.size();
@@ -4822,11 +4909,15 @@
         public long since;
         public boolean stats;
         public boolean redact = true;
+        public boolean proto = false;
 
         public static DumpFilter parseFromArguments(String[] args) {
             final DumpFilter filter = new DumpFilter();
             for (int ai = 0; ai < args.length; ai++) {
                 final String a = args[ai];
+                if ("--proto".equals(args[0])) {
+                    filter.proto = true;
+                }
                 if ("--noredact".equals(a) || "--reveal".equals(a)) {
                     filter.redact = false;
                 } else if ("p".equals(a) || "pkg".equals(a) || "--package".equals(a)) {
diff --git a/services/core/java/com/android/server/notification/NotificationRecord.java b/services/core/java/com/android/server/notification/NotificationRecord.java
index d26aa9e..3016b17 100644
--- a/services/core/java/com/android/server/notification/NotificationRecord.java
+++ b/services/core/java/com/android/server/notification/NotificationRecord.java
@@ -37,12 +37,14 @@
 import android.os.UserHandle;
 import android.provider.Settings;
 import android.service.notification.NotificationListenerService;
+import android.service.notification.NotificationRecordProto;
 import android.service.notification.SnoozeCriterion;
 import android.service.notification.StatusBarNotification;
 import android.text.TextUtils;
 import android.util.Log;
 import android.util.Slog;
 import android.util.TimeUtils;
+import android.util.proto.ProtoOutputStream;
 
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.logging.MetricsLogger;
@@ -185,7 +187,9 @@
         int defaultLightOff = mContext.getResources().getInteger(
                 com.android.internal.R.integer.config_defaultNotificationLedOff);
 
-        Light light = getChannel().shouldShowLights() ? new Light(defaultLightColor,
+        int channelLightColor = getChannel().getLightColor() != 0 ? getChannel().getLightColor()
+                : defaultLightColor;
+        Light light = getChannel().shouldShowLights() ? new Light(channelLightColor,
                 defaultLightOn, defaultLightOff) : null;
         if (mPreChannelsNotification
                 && (getChannel().getUserLockedFields()
@@ -335,6 +339,24 @@
     /** @deprecated Use {@link #getUser()} instead. */
     public int getUserId() { return sbn.getUserId(); }
 
+    void dump(ProtoOutputStream proto, boolean redact) {
+        proto.write(NotificationRecordProto.KEY, sbn.getKey());
+        if (getChannel() != null) {
+            proto.write(NotificationRecordProto.CHANNEL_ID, getChannel().getId());
+        }
+        proto.write(NotificationRecordProto.CAN_SHOW_LIGHT, getLight() != null);
+        proto.write(NotificationRecordProto.CAN_VIBRATE, getVibration() != null);
+        proto.write(NotificationRecordProto.FLAGS, sbn.getNotification().flags);
+        proto.write(NotificationRecordProto.GROUP_KEY, getGroupKey());
+        proto.write(NotificationRecordProto.IMPORTANCE, getImportance());
+        if (getSound() != null) {
+            proto.write(NotificationRecordProto.SOUND, getSound().toString());
+        }
+        if (getAudioAttributes() != null) {
+            proto.write(NotificationRecordProto.SOUND_USAGE, getAudioAttributes().getUsage());
+        }
+    }
+
     void dump(PrintWriter pw, String prefix, Context baseContext, boolean redact) {
         final Notification notification = sbn.getNotification();
         final Icon icon = notification.getSmallIcon();
diff --git a/services/core/java/com/android/server/notification/RankingHelper.java b/services/core/java/com/android/server/notification/RankingHelper.java
index 8176e5d..76890b1 100644
--- a/services/core/java/com/android/server/notification/RankingHelper.java
+++ b/services/core/java/com/android/server/notification/RankingHelper.java
@@ -563,7 +563,8 @@
             channel.setImportance(updatedChannel.getImportance());
         }
         if ((channel.getUserLockedFields() & NotificationChannel.USER_LOCKED_LIGHTS) == 0) {
-            channel.setLights(updatedChannel.shouldShowLights());
+            channel.enableLights(updatedChannel.shouldShowLights());
+            channel.setLightColor(updatedChannel.getLightColor());
         }
         if ((channel.getUserLockedFields() & NotificationChannel.USER_LOCKED_PRIORITY) == 0) {
             channel.setBypassDnd(updatedChannel.canBypassDnd());
@@ -669,11 +670,18 @@
         }
     }
 
+    public NotificationChannelGroup getNotificationChannelGroup(String groupId, String pkg,
+            int uid) {
+        Preconditions.checkNotNull(pkg);
+        Record r = getRecord(pkg, uid);
+        return r.groups.get(groupId);
+    }
+
     @Override
     public ParceledListSlice<NotificationChannelGroup> getNotificationChannelGroups(String pkg,
             int uid, boolean includeDeleted) {
         Preconditions.checkNotNull(pkg);
-        List<NotificationChannelGroup> groups = new ArrayList<>();
+        Map<String, NotificationChannelGroup> groups = new ArrayMap<>();
         Record r = getRecord(pkg, uid);
         if (r == null) {
             return ParceledListSlice.emptyList();
@@ -684,23 +692,21 @@
             final NotificationChannel nc = r.channels.valueAt(i);
             if (includeDeleted || !nc.isDeleted()) {
                 if (nc.getGroup() != null) {
-                    // lazily populate channel list
-                    NotificationChannelGroup ncg = r.groups.get(nc.getGroup());
+                    NotificationChannelGroup ncg = groups.get(nc.getGroup());
+                    if (ncg == null ) {
+                        ncg = r.groups.get(nc.getGroup()).clone();
+                        groups.put(nc.getGroup(), ncg);
+                    }
                     ncg.addChannel(nc);
                 } else {
                     nonGrouped.addChannel(nc);
                 }
             }
         }
-        for (NotificationChannelGroup group : r.groups.values()) {
-            if (group.getChannels().size() > 0) {
-                groups.add(group);
-            }
-        }
         if (nonGrouped.getChannels().size() > 0) {
-            groups.add(nonGrouped);
+            groups.put(null, nonGrouped);
         }
-        return new ParceledListSlice<>(groups);
+        return new ParceledListSlice<>(new ArrayList<>(groups.values()));
     }
 
     @Override
diff --git a/services/core/java/com/android/server/notification/SnoozeHelper.java b/services/core/java/com/android/server/notification/SnoozeHelper.java
index f2aff11..0cd8cea 100644
--- a/services/core/java/com/android/server/notification/SnoozeHelper.java
+++ b/services/core/java/com/android/server/notification/SnoozeHelper.java
@@ -16,11 +16,14 @@
 package com.android.server.notification;
 
 import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.logging.MetricsLogger;
+import com.android.internal.logging.nano.MetricsProto;
 
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParserException;
 import org.xmlpull.v1.XmlSerializer;
 
+import android.annotation.NonNull;
 import android.app.AlarmManager;
 import android.app.PendingIntent;
 import android.content.BroadcastReceiver;
@@ -99,7 +102,7 @@
         return Collections.EMPTY_LIST;
     }
 
-    protected List<NotificationRecord> getSnoozed() {
+    protected @NonNull List<NotificationRecord> getSnoozed() {
         List<NotificationRecord> snoozedForUser = new ArrayList<>();
         int[] userIds = mUserProfiles.getCurrentProfileIds();
         final int N = userIds.length;
@@ -270,6 +273,9 @@
         final NotificationRecord record = pkgRecords.remove(key);
 
         if (record != null) {
+            MetricsLogger.action(record.getLogMaker()
+                    .setCategory(MetricsProto.MetricsEvent.NOTIFICATION_SNOOZED)
+                    .setType(MetricsProto.MetricsEvent.TYPE_OPEN));
             mCallback.repost(userId, record);
         }
     }
diff --git a/services/core/java/com/android/server/notification/ZenModeHelper.java b/services/core/java/com/android/server/notification/ZenModeHelper.java
index 66fb976..75190f3 100644
--- a/services/core/java/com/android/server/notification/ZenModeHelper.java
+++ b/services/core/java/com/android/server/notification/ZenModeHelper.java
@@ -50,14 +50,18 @@
 import android.os.SystemClock;
 import android.os.UserHandle;
 import android.provider.Settings.Global;
+import android.service.notification.Condition;
 import android.service.notification.ConditionProviderService;
+import android.service.notification.NotificationServiceDumpProto;
 import android.service.notification.ZenModeConfig;
 import android.service.notification.ZenModeConfig.EventInfo;
 import android.service.notification.ZenModeConfig.ScheduleInfo;
 import android.service.notification.ZenModeConfig.ZenRule;
+import android.service.notification.ZenModeProto;
 import android.util.AndroidRuntimeException;
 import android.util.Log;
 import android.util.SparseArray;
+import android.util.proto.ProtoOutputStream;
 
 import com.android.internal.R;
 import com.android.internal.logging.MetricsLogger;
@@ -488,6 +492,24 @@
         }
     }
 
+    void dump(ProtoOutputStream proto) {
+
+        proto.write(ZenModeProto.ZEN_MODE, mZenMode);
+        synchronized (mConfig) {
+            if (mConfig.manualRule != null) {
+                proto.write(ZenModeProto.ENABLED_ACTIVE_CONDITIONS, mConfig.manualRule.toString());
+            }
+            for (ZenRule rule : mConfig.automaticRules.values()) {
+                if (rule.enabled && rule.condition.state == Condition.STATE_TRUE
+                        && !rule.snoozing) {
+                    proto.write(ZenModeProto.ENABLED_ACTIVE_CONDITIONS, rule.toString());
+                }
+            }
+            proto.write(ZenModeProto.POLICY, mConfig.toNotificationPolicy().toString());
+            proto.write(ZenModeProto.SUPPRESSED_EFFECTS, mSuppressedEffects);
+        }
+    }
+
     public void dump(PrintWriter pw, String prefix) {
         pw.print(prefix); pw.print("mZenMode=");
         pw.println(Global.zenModeToString(mZenMode));
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/BackgroundDexOptService.java b/services/core/java/com/android/server/pm/BackgroundDexOptService.java
index 66977d6..7aa96cf 100644
--- a/services/core/java/com/android/server/pm/BackgroundDexOptService.java
+++ b/services/core/java/com/android/server/pm/BackgroundDexOptService.java
@@ -252,7 +252,7 @@
             return result;
         }
 
-        if (SystemProperties.getBoolean("dalvik.vm.deopt.secondary", false)) {
+        if (SystemProperties.getBoolean("dalvik.vm.dexopt.secondary", false)) {
             result = reconcileSecondaryDexFiles(pm.getDexManager());
             if (result == OPTIMIZE_ABORT_BY_JOB_SCHEDULER) {
                 return result;
diff --git a/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java b/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java
index 9da94b3..06b6f66 100644
--- a/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java
+++ b/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java
@@ -20,6 +20,7 @@
 import android.annotation.NonNull;
 import android.app.DownloadManager;
 import android.app.admin.DevicePolicyManager;
+import android.companion.CompanionDeviceManager;
 import android.content.Intent;
 import android.content.pm.ActivityInfo;
 import android.content.pm.ApplicationInfo;
@@ -673,6 +674,16 @@
                     && doesPackageSupportRuntimePermissions(storageManagerPckg)) {
                 grantRuntimePermissionsLPw(storageManagerPckg, STORAGE_PERMISSIONS, true, userId);
             }
+
+            // Companion devices
+            PackageParser.Package companionDeviceDiscoveryPackage = getSystemPackageLPr(
+                    CompanionDeviceManager.COMPANION_DEVICE_DISCOVERY_PACKAGE_NAME);
+            if (companionDeviceDiscoveryPackage != null
+                    && doesPackageSupportRuntimePermissions(companionDeviceDiscoveryPackage)) {
+                grantRuntimePermissionsLPw(companionDeviceDiscoveryPackage,
+                        LOCATION_PERMISSIONS, true, userId);
+            }
+
             mService.mSettings.onDefaultRuntimePermissionsGrantedLPr(userId);
         }
     }
diff --git a/services/core/java/com/android/server/pm/LauncherAppsService.java b/services/core/java/com/android/server/pm/LauncherAppsService.java
index b6611eb..96a2577 100644
--- a/services/core/java/com/android/server/pm/LauncherAppsService.java
+++ b/services/core/java/com/android/server/pm/LauncherAppsService.java
@@ -64,6 +64,7 @@
 import com.android.server.SystemService;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 
 /**
@@ -216,29 +217,35 @@
             }
         }
 
-        /**
-         * Checks if the caller is in the same group as the userToCheck.
-         */
-        private void ensureInUserProfiles(
-                String callingPackage, UserHandle userToCheck, String message) {
-            ensureInUserProfiles(callingPackage, userToCheck.getIdentifier(), message);
+        /** See {@link #canAccessProfile(String, int, String)} */
+        private boolean canAccessProfile(
+                String callingPackage, UserHandle targetUser, String message) {
+            return canAccessProfile(callingPackage, targetUser.getIdentifier(), message);
         }
 
-        private void ensureInUserProfiles(String callingPackage, int targetUserId, String message) {
+        /**
+         * Checks if the calling user is in the same group as {@code targetUser}, and allowed
+         * to access it.
+         *
+         * @return TRUE if the calling user can access {@code targetUserId}.  FALSE if not *but
+         * they're still in the same profile group*.
+         *
+         * @throws SecurityException if the calling user and {@code targetUser} are not in the same
+         * group.
+         */
+        private boolean canAccessProfile(String callingPackage, int targetUserId, String message) {
             final int callingUserId = injectCallingUserId();
 
-            if (targetUserId == callingUserId) return;
+            if (targetUserId == callingUserId) return true;
 
             long ident = injectClearCallingIdentity();
             try {
                 UserInfo callingUserInfo = mUm.getUserInfo(callingUserId);
                 if (callingUserInfo.isManagedProfile()) {
-                    // TODO: Make it SecurityException.  See b/34650921
-                    // throw new SecurityException(message + " for another profile " + targetUserId);
-
-                    // TODO: Report caller package name.
                     Slog.wtfStack(TAG, message + " by " + callingPackage + " for another profile "
                             + targetUserId + " from " + callingUserId);
+
+                    return false;
                 }
 
                 UserInfo targetUserInfo = mUm.getUserInfo(targetUserId);
@@ -250,6 +257,7 @@
             } finally {
                 injectRestoreCallingIdentity(ident);
             }
+            return true;
         }
 
         @VisibleForTesting // We override it in unit tests
@@ -301,7 +309,9 @@
         public ActivityInfo resolveActivity(
                 String callingPackage, ComponentName component, UserHandle user)
                 throws RemoteException {
-            ensureInUserProfiles(callingPackage, user, "Cannot resolve activity");
+            if (!canAccessProfile(callingPackage, user, "Cannot resolve activity")) {
+                return null;
+            }
             if (!isUserEnabled(user)) {
                 return null;
             }
@@ -328,7 +338,9 @@
 
         private ParceledListSlice<ResolveInfo> queryActivitiesForUser(String callingPackage,
                 Intent intent, UserHandle user) {
-            ensureInUserProfiles(callingPackage, user, "Cannot retrieve activities");
+            if (!canAccessProfile(callingPackage, user, "Cannot retrieve activities")) {
+                return null;
+            }
             if (!isUserEnabled(user)) {
                 return null;
             }
@@ -348,7 +360,10 @@
         @Override
         public IntentSender getShortcutConfigActivityIntent(String callingPackage,
                 ComponentName component, UserHandle user) throws RemoteException {
-            ensureShortcutPermission(callingPackage, user);
+            ensureShortcutPermission(callingPackage);
+            if (!canAccessProfile(callingPackage, user, "Cannot check package")) {
+                return null;
+            }
             Preconditions.checkNotNull(component);
             Preconditions.checkArgument(isUserEnabled(user), "User not enabled");
 
@@ -356,11 +371,11 @@
             Intent intent = new Intent(Intent.ACTION_CREATE_SHORTCUT).setComponent(component);
             final long identity = Binder.clearCallingIdentity();
             try {
-                return PendingIntent.getActivityAsUser(
+                final PendingIntent pi = PendingIntent.getActivityAsUser(
                         mContext, 0, intent, PendingIntent.FLAG_ONE_SHOT
                                 | PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_CANCEL_CURRENT,
-                        null, user)
-                        .getIntentSender();
+                        null, user);
+                return pi == null ? null : pi.getIntentSender();
             } finally {
                 Binder.restoreCallingIdentity(identity);
             }
@@ -369,7 +384,9 @@
         @Override
         public boolean isPackageEnabled(String callingPackage, String packageName, UserHandle user)
                 throws RemoteException {
-            ensureInUserProfiles(callingPackage, user, "Cannot check package");
+            if (!canAccessProfile(callingPackage, user, "Cannot check package")) {
+                return false;
+            }
             if (!isUserEnabled(user)) {
                 return false;
             }
@@ -391,7 +408,9 @@
         public ApplicationInfo getApplicationInfo(
                 String callingPackage, String packageName, int flags, UserHandle user)
                 throws RemoteException {
-            ensureInUserProfiles(callingPackage, user, "Cannot check package");
+            if (!canAccessProfile(callingPackage, user, "Cannot check package")) {
+                return null;
+            }
             if (!isUserEnabled(user)) {
                 return null;
             }
@@ -407,14 +426,8 @@
             }
         }
 
-        private void ensureShortcutPermission(@NonNull String callingPackage, UserHandle user) {
-            ensureShortcutPermission(callingPackage, user.getIdentifier());
-        }
-
-        private void ensureShortcutPermission(@NonNull String callingPackage, int userId) {
+        private void ensureShortcutPermission(@NonNull String callingPackage) {
             verifyCallingPackage(callingPackage);
-            ensureInUserProfiles(callingPackage, userId, "Cannot access shortcuts");
-
             if (!mShortcutServiceInternal.hasShortcutHostPermission(getCallingUserId(),
                     callingPackage)) {
                 throw new SecurityException("Caller can't access shortcut information");
@@ -424,10 +437,11 @@
         @Override
         public ParceledListSlice getShortcuts(String callingPackage, long changedSince,
                 String packageName, List shortcutIds, ComponentName componentName, int flags,
-                UserHandle user) {
-            ensureShortcutPermission(callingPackage, user);
-            if (!isUserEnabled(user)) {
-                return new ParceledListSlice<>(new ArrayList(0));
+                UserHandle targetUser) {
+            ensureShortcutPermission(callingPackage);
+            if (!canAccessProfile(callingPackage, targetUser, "Cannot get shortcuts")
+                    || !isUserEnabled(targetUser)) {
+                return new ParceledListSlice<>(Collections.EMPTY_LIST);
             }
             if (shortcutIds != null && packageName == null) {
                 throw new IllegalArgumentException(
@@ -438,44 +452,53 @@
             return new ParceledListSlice<>((List<ShortcutInfo>)
                     mShortcutServiceInternal.getShortcuts(getCallingUserId(),
                             callingPackage, changedSince, packageName, shortcutIds,
-                            componentName, flags, user.getIdentifier()));
+                            componentName, flags, targetUser.getIdentifier()));
         }
 
         @Override
         public void pinShortcuts(String callingPackage, String packageName, List<String> ids,
-                UserHandle user) {
-            ensureShortcutPermission(callingPackage, user);
-            if (!isUserEnabled(user)) {
+                UserHandle targetUser) {
+            ensureShortcutPermission(callingPackage);
+            if (!canAccessProfile(callingPackage, targetUser, "Cannot pin shortcuts")) {
+                return;
+            }
+            if (!isUserEnabled(targetUser)) {
                 throw new IllegalStateException("Cannot pin shortcuts for disabled profile "
-                        + user);
+                        + targetUser);
             }
 
             mShortcutServiceInternal.pinShortcuts(getCallingUserId(),
-                    callingPackage, packageName, ids, user.getIdentifier());
+                    callingPackage, packageName, ids, targetUser.getIdentifier());
         }
 
         @Override
         public int getShortcutIconResId(String callingPackage, String packageName, String id,
-                int userId) {
-            ensureShortcutPermission(callingPackage, userId);
-            if (!isUserEnabled(userId)) {
+                int targetUserId) {
+            ensureShortcutPermission(callingPackage);
+            if (!canAccessProfile(callingPackage, targetUserId, "Cannot access shortcuts")) {
+                return 0;
+            }
+            if (!isUserEnabled(targetUserId)) {
                 return 0;
             }
 
             return mShortcutServiceInternal.getShortcutIconResId(getCallingUserId(),
-                    callingPackage, packageName, id, userId);
+                    callingPackage, packageName, id, targetUserId);
         }
 
         @Override
         public ParcelFileDescriptor getShortcutIconFd(String callingPackage,
-                String packageName, String id, int userId) {
-            ensureShortcutPermission(callingPackage, userId);
-            if (!isUserEnabled(userId)) {
+                String packageName, String id, int targetUserId) {
+            ensureShortcutPermission(callingPackage);
+            if (!canAccessProfile(callingPackage, targetUserId, "Cannot access shortcuts")) {
+                return null;
+            }
+            if (!isUserEnabled(targetUserId)) {
                 return null;
             }
 
             return mShortcutServiceInternal.getShortcutIconFd(getCallingUserId(),
-                    callingPackage, packageName, id, userId);
+                    callingPackage, packageName, id, targetUserId);
         }
 
         @Override
@@ -487,23 +510,24 @@
 
         @Override
         public boolean startShortcut(String callingPackage, String packageName, String shortcutId,
-                Rect sourceBounds, Bundle startActivityOptions, int userId) {
+                Rect sourceBounds, Bundle startActivityOptions, int targetUserId) {
             verifyCallingPackage(callingPackage);
-            ensureInUserProfiles(callingPackage, userId, "Cannot start activity");
-
-            if (!isUserEnabled(userId)) {
+            if (!canAccessProfile(callingPackage, targetUserId, "Cannot start activity")) {
+                return false;
+            }
+            if (!isUserEnabled(targetUserId)) {
                 throw new IllegalStateException("Cannot start a shortcut for disabled profile "
-                        + userId);
+                        + targetUserId);
             }
 
             // Even without the permission, pinned shortcuts are always launchable.
             if (!mShortcutServiceInternal.isPinnedByCaller(getCallingUserId(),
-                    callingPackage, packageName, shortcutId, userId)) {
-                ensureShortcutPermission(callingPackage, userId);
+                    callingPackage, packageName, shortcutId, targetUserId)) {
+                ensureShortcutPermission(callingPackage);
             }
 
             final Intent[] intents = mShortcutServiceInternal.createShortcutIntents(
-                    getCallingUserId(), callingPackage, packageName, shortcutId, userId);
+                    getCallingUserId(), callingPackage, packageName, shortcutId, targetUserId);
             if (intents == null || intents.length == 0) {
                 return false;
             }
@@ -513,7 +537,7 @@
             intents[0].setSourceBounds(sourceBounds);
 
             return startShortcutIntentsAsPublisher(
-                    intents, packageName, startActivityOptions, userId);
+                    intents, packageName, startActivityOptions, targetUserId);
         }
 
         private boolean startShortcutIntentsAsPublisher(@NonNull Intent[] intents,
@@ -543,7 +567,9 @@
         public boolean isActivityEnabled(
                 String callingPackage, ComponentName component, UserHandle user)
                 throws RemoteException {
-            ensureInUserProfiles(callingPackage , user, "Cannot check component");
+            if (!canAccessProfile(callingPackage , user, "Cannot check component")) {
+                return false;
+            }
             if (!isUserEnabled(user)) {
                 return false;
             }
@@ -565,7 +591,9 @@
         public void startActivityAsUser(String callingPackage,
                 ComponentName component, Rect sourceBounds,
                 Bundle opts, UserHandle user) throws RemoteException {
-            ensureInUserProfiles(callingPackage, user, "Cannot start activity");
+            if (!canAccessProfile(callingPackage, user, "Cannot start activity")) {
+                return;
+            }
             if (!isUserEnabled(user)) {
                 throw new IllegalStateException("Cannot start activity for disabled profile "  + user);
             }
@@ -618,7 +646,9 @@
         @Override
         public void showAppDetailsAsUser(String callingPackage, ComponentName component,
                 Rect sourceBounds, Bundle opts, UserHandle user) throws RemoteException {
-            ensureInUserProfiles(callingPackage, user, "Cannot show app details");
+            if (!canAccessProfile(callingPackage, user, "Cannot show app details")) {
+                return;
+            }
             if (!isUserEnabled(user)) {
                 throw new IllegalStateException("Cannot show app details for disabled profile "
                         + user);
@@ -642,9 +672,13 @@
         private boolean isEnabledProfileOf(UserHandle user, UserHandle listeningUser,
                 String debugMsg) {
             if (user.getIdentifier() == listeningUser.getIdentifier()) {
-                if (DEBUG) Log.d(TAG, "Delivering msg to same user " + debugMsg);
+                if (DEBUG) Log.d(TAG, "Delivering msg to same user: " + debugMsg);
                 return true;
             }
+            if (mUm.isManagedProfile(listeningUser.getIdentifier())) {
+                if (DEBUG) Log.d(TAG, "Managed profile can't see other profiles: " + debugMsg);
+                return false;
+            }
             long ident = injectClearCallingIdentity();
             try {
                 UserInfo userInfo = mUm.getUserInfo(user.getIdentifier());
diff --git a/services/core/java/com/android/server/pm/PackageDexOptimizer.java b/services/core/java/com/android/server/pm/PackageDexOptimizer.java
index db712ae..b589057 100644
--- a/services/core/java/com/android/server/pm/PackageDexOptimizer.java
+++ b/services/core/java/com/android/server/pm/PackageDexOptimizer.java
@@ -66,6 +66,9 @@
     public static final int DEX_OPT_PERFORMED = 1;
     public static final int DEX_OPT_FAILED = -1;
 
+    /** Special library name that skips shared libraries check during compilation. */
+    public static final String SKIP_SHARED_LIBRARY_CHECK = "&";
+
     private final Installer mInstaller;
     private final Object mInstallLock;
 
@@ -274,7 +277,7 @@
                 // TODO(calin): maybe add a separate call.
                 mInstaller.dexopt(path, info.uid, info.packageName, isa, /*dexoptNeeded*/ 0,
                         /*oatDir*/ null, dexoptFlags,
-                        compilerFilter, info.volumeUuid, /*sharedLibrariesPath*/ null);
+                        compilerFilter, info.volumeUuid, SKIP_SHARED_LIBRARY_CHECK);
             }
 
             return DEX_OPT_PERFORMED;
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 6f20f10..f43e468 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -126,6 +126,7 @@
 import android.content.pm.ActivityInfo;
 import android.content.pm.ApplicationInfo;
 import android.content.pm.AppsQueryHelper;
+import android.content.pm.ChangedPackages;
 import android.content.pm.ComponentInfo;
 import android.content.pm.InstantAppInfo;
 import android.content.pm.EphemeralRequest;
@@ -544,9 +545,6 @@
 
     public static final int REASON_LAST = REASON_CORE_APP;
 
-    /** Special library name that skips shared libraries check during compilation. */
-    private static final String SKIP_SHARED_LIBRARY_CHECK = "&";
-
     /** All dangerous permission names in the same order as the events in MetricsEvent */
     private static final List<String> ALL_DANGEROUS_PERMISSIONS = Arrays.asList(
             Manifest.permission.READ_CALENDAR,
@@ -712,6 +710,7 @@
     // System configuration read by SystemConfig.
     final int[] mGlobalGids;
     final SparseArray<ArraySet<String>> mSystemPermissions;
+    @GuardedBy("mAvailableFeatures")
     final ArrayMap<String, FeatureInfo> mAvailableFeatures;
 
     // If mac_permissions.xml was found for seinfo labeling.
@@ -719,6 +718,21 @@
 
     private final InstantAppRegistry mInstantAppRegistry;
 
+    @GuardedBy("mPackages")
+    int mChangedPackagesSequenceNumber;
+    /**
+     * List of changed [installed, removed or updated] packages.
+     * mapping from user id -> sequence number -> package name
+     */
+    @GuardedBy("mPackages")
+    final SparseArray<SparseArray<String>> mChangedPackages = new SparseArray<>();
+    /**
+     * The sequence number of the last change to a package.
+     * mapping from user id -> package name -> sequence number
+     */
+    @GuardedBy("mPackages")
+    final SparseArray<Map<String, Integer>> mChangedPackagesSequenceNumbers = new SparseArray<>();
+
     public static final class SharedLibraryEntry {
         public final String path;
         public final String apk;
@@ -832,10 +846,11 @@
     private List<String> mKeepUninstalledPackages;
 
     private UserManagerInternal mUserManagerInternal;
-    private final UserDataPreparer mUserDataPreparer;
 
     private File mCacheDir;
 
+    private ArraySet<String> mPrivappPermissionsViolations;
+
     private static class IFVerificationParams {
         PackageParser.Package pkg;
         boolean replacing;
@@ -1936,7 +1951,7 @@
 
                     // Clean up any users or apps that were removed or recreated
                     // while this volume was missing
-                    reconcileUsers(volumeUuid);
+                    sUserManager.reconcileUsers(volumeUuid);
                     reconcileApps(volumeUuid);
 
                     // Clean up any install sessions that expired or were
@@ -2139,6 +2154,7 @@
                     pkgSetting.setInstalled(install, UserHandle.USER_SYSTEM);
                 }
             }
+            scheduleWritePackageRestrictionsLocked(UserHandle.USER_SYSTEM);
         }
     }
 
@@ -2160,19 +2176,24 @@
         if (SystemProperties.getInt("ro.cp_system_other_odex", 0) == 1) {
             SystemProperties.set(CP_PREOPT_PROPERTY, "requested");
             // We will wait for up to 100 seconds.
-            final long timeEnd = SystemClock.uptimeMillis() + 100 * 1000;
+            final long timeStart = SystemClock.uptimeMillis();
+            final long timeEnd = timeStart + 100 * 1000;
+            long timeNow = timeStart;
             while (!SystemProperties.get(CP_PREOPT_PROPERTY).equals("finished")) {
                 try {
                     Thread.sleep(WAIT_TIME_MS);
                 } catch (InterruptedException e) {
                     // Do nothing
                 }
-                if (SystemClock.uptimeMillis() > timeEnd) {
+                timeNow = SystemClock.uptimeMillis();
+                if (timeNow > timeEnd) {
                     SystemProperties.set(CP_PREOPT_PROPERTY, "timed-out");
                     Slog.wtf(TAG, "cppreopt did not finish!");
                     break;
                 }
             }
+
+            Slog.i(TAG, "cppreopts took " + (timeNow - timeStart) + " ms");
         }
     }
 
@@ -2264,8 +2285,8 @@
             mEphemeralInstallDir = new File(dataDir, "app-ephemeral");
             mAsecInternalPath = new File(dataDir, "app-asec").getPath();
             mDrmAppPrivateInstallDir = new File(dataDir, "app-private");
-            mUserDataPreparer = new UserDataPreparer(mInstaller, mInstallLock, mContext, mOnlyCore);
-            sUserManager = new UserManagerService(context, this, mUserDataPreparer, mPackages);
+            sUserManager = new UserManagerService(context, this,
+                    new UserDataPreparer(mInstaller, mInstallLock, mContext, mOnlyCore), mPackages);
 
             // Propagate permission configuration in to package manager.
             ArrayMap<String, SystemConfig.PermissionEntry> permConfig
@@ -2377,7 +2398,7 @@
                                             DEXOPT_PUBLIC,
                                             getCompilerFilterForReason(REASON_SHARED_APK),
                                             StorageManager.UUID_PRIVATE_INTERNAL,
-                                            SKIP_SHARED_LIBRARY_CHECK);
+                                            PackageDexOptimizer.SKIP_SHARED_LIBRARY_CHECK);
                                 }
                             } catch (FileNotFoundException e) {
                                 Slog.w(TAG, "Library not found: " + libPath);
@@ -4213,23 +4234,70 @@
         }
     }
 
+    private void updateSequenceNumberLP(String packageName, int[] userList) {
+        for (int i = userList.length - 1; i >= 0; --i) {
+            final int userId = userList[i];
+            SparseArray<String> changedPackages = mChangedPackages.get(userId);
+            if (changedPackages == null) {
+                changedPackages = new SparseArray<>();
+                mChangedPackages.put(userId, changedPackages);
+            }
+            Map<String, Integer> sequenceNumbers = mChangedPackagesSequenceNumbers.get(userId);
+            if (sequenceNumbers == null) {
+                sequenceNumbers = new HashMap<>();
+                mChangedPackagesSequenceNumbers.put(userId, sequenceNumbers);
+            }
+            final Integer sequenceNumber = sequenceNumbers.get(packageName);
+            if (sequenceNumber != null) {
+                changedPackages.remove(sequenceNumber);
+            }
+            changedPackages.put(mChangedPackagesSequenceNumber, packageName);
+            sequenceNumbers.put(packageName, mChangedPackagesSequenceNumber);
+        }
+        mChangedPackagesSequenceNumber++;
+    }
+
     @Override
-    public @NonNull ParceledListSlice<FeatureInfo> getSystemAvailableFeatures() {
+    public ChangedPackages getChangedPackages(int sequenceNumber, int userId) {
         synchronized (mPackages) {
-            final ArrayList<FeatureInfo> res = new ArrayList<>(mAvailableFeatures.values());
-
-            final FeatureInfo fi = new FeatureInfo();
-            fi.reqGlEsVersion = SystemProperties.getInt("ro.opengles.version",
-                    FeatureInfo.GL_ES_VERSION_UNDEFINED);
-            res.add(fi);
-
-            return new ParceledListSlice<>(res);
+            if (sequenceNumber >= mChangedPackagesSequenceNumber) {
+                return null;
+            }
+            final SparseArray<String> changedPackages = mChangedPackages.get(userId);
+            if (changedPackages == null) {
+                return null;
+            }
+            final List<String> packageNames =
+                    new ArrayList<>(mChangedPackagesSequenceNumber - sequenceNumber);
+            for (int i = sequenceNumber; i < mChangedPackagesSequenceNumber; i++) {
+                final String packageName = changedPackages.get(i);
+                if (packageName != null) {
+                    packageNames.add(packageName);
+                }
+            }
+            return packageNames.isEmpty()
+                    ? null : new ChangedPackages(mChangedPackagesSequenceNumber, packageNames);
         }
     }
 
     @Override
+    public @NonNull ParceledListSlice<FeatureInfo> getSystemAvailableFeatures() {
+        ArrayList<FeatureInfo> res;
+        synchronized (mAvailableFeatures) {
+            res = new ArrayList<>(mAvailableFeatures.size() + 1);
+            res.addAll(mAvailableFeatures.values());
+        }
+        final FeatureInfo fi = new FeatureInfo();
+        fi.reqGlEsVersion = SystemProperties.getInt("ro.opengles.version",
+                FeatureInfo.GL_ES_VERSION_UNDEFINED);
+        res.add(fi);
+
+        return new ParceledListSlice<>(res);
+    }
+
+    @Override
     public boolean hasSystemFeature(String name, int version) {
-        synchronized (mPackages) {
+        synchronized (mAvailableFeatures) {
             final FeatureInfo feat = mAvailableFeatures.get(name);
             if (feat == null) {
                 return false;
@@ -11537,6 +11605,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;
                 }
@@ -13237,6 +13311,7 @@
                     pkgSetting.setHidden(false, userId);
                     pkgSetting.setInstallReason(installReason, userId);
                     mSettings.writePackageRestrictionsLPr(userId);
+                    mSettings.writeKernelMappingLPr(pkgSetting);
                     installed = true;
                 }
             }
@@ -13249,6 +13324,9 @@
                     }
                 }
                 sendPackageAddedForUser(packageName, pkgSetting, userId);
+                synchronized (mPackages) {
+                    updateSequenceNumberLP(packageName, new int[]{ userId });
+                }
             }
         } finally {
             Binder.restoreCallingIdentity(callingId);
@@ -16331,6 +16409,7 @@
             //note that the new package setting would have already been
             //added to mPackages. It hasn't been persisted yet.
             mSettings.setInstallStatus(pkgName, PackageSettingBase.PKG_INSTALL_INCOMPLETE);
+            // TODO: Remove this write? It's also written at the end of this method
             Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "writeSettings");
             mSettings.writeLPr();
             Trace.traceEnd(TRACE_TAG_PACKAGE_MANAGER);
@@ -16404,6 +16483,7 @@
                 } else if (!previousUserIds.contains(userId)) {
                     ps.setInstallReason(installReason, userId);
                 }
+                mSettings.writeKernelMappingLPr(ps);
             }
             res.name = pkgName;
             res.uid = newPackage.applicationInfo.uid;
@@ -16833,6 +16913,10 @@
                             sUserManager.getUserIds(), true);
                 }
             }
+
+            if (res.returnCode == PackageManager.INSTALL_SUCCEEDED) {
+                updateSequenceNumberLP(pkgName, res.newUsers);
+            }
         }
     }
 
@@ -17415,6 +17499,7 @@
                 if (res) {
                     mInstantAppRegistry.onPackageUninstalledLPw(uninstalledPs.pkg,
                             info.removedUsers);
+                    updateSequenceNumberLP(packageName, info.removedUsers);
                 }
             }
         }
@@ -17583,6 +17668,7 @@
 
         // writer
         synchronized (mPackages) {
+            boolean installedStateChanged = false;
             if (deletedPs != null) {
                 if ((flags&PackageManager.DELETE_KEEP_DATA) == 0) {
                     clearIntentFilterVerificationsLPw(deletedPs.name, UserHandle.USER_ALL);
@@ -17630,6 +17716,9 @@
                         if (DEBUG_REMOVE) {
                             Slog.d(TAG, "    user " + userId + " => " + installed);
                         }
+                        if (installed != ps.getInstalled(userId)) {
+                            installedStateChanged = true;
+                        }
                         ps.setInstalled(installed, userId);
                     }
                 }
@@ -17639,6 +17728,9 @@
                 // Save settings now
                 mSettings.writeLPr();
             }
+            if (installedStateChanged) {
+                mSettings.writeKernelMappingLPr(ps);
+            }
         }
         if (removedAppId != -1) {
             // A user ID was deleted here. Go through all users and remove it
@@ -17781,6 +17873,7 @@
                     UPDATE_PERMISSIONS_ALL | UPDATE_PERMISSIONS_REPLACE_PKG);
 
             if (applyUserRestrictions) {
+                boolean installedStateChanged = false;
                 if (DEBUG_REMOVE) {
                     Slog.d(TAG, "Propagating install state across reinstall");
                 }
@@ -17789,6 +17882,9 @@
                     if (DEBUG_REMOVE) {
                         Slog.d(TAG, "    user " + userId + " => " + installed);
                     }
+                    if (installed != ps.getInstalled(userId)) {
+                        installedStateChanged = true;
+                    }
                     ps.setInstalled(installed, userId);
 
                     mSettings.writeRuntimePermissionsForUserLPr(userId, false);
@@ -17796,6 +17892,9 @@
                 // Regardless of writeSettings we need to ensure that this restriction
                 // state propagation is persisted
                 mSettings.writeAllUsersPackageRestrictionsLPr();
+                if (installedStateChanged) {
+                    mSettings.writeKernelMappingLPr(ps);
+                }
             }
             // can downgrade to reader here
             if (writeSettings) {
@@ -17999,6 +18098,7 @@
                     // broadcasts will be sent correctly.
                     if (DEBUG_REMOVE) Slog.d(TAG, "Not installed by other users, full delete");
                     ps.setInstalled(true, user.getIdentifier());
+                    mSettings.writeKernelMappingLPr(ps);
                 }
             } else {
                 // This is a system app, so we assume that the
@@ -18108,6 +18208,7 @@
                     ps.readUserState(nextUserId).domainVerificationStatus, 0,
                     PackageManager.INSTALL_REASON_UNKNOWN);
         }
+        mSettings.writeKernelMappingLPr(ps);
     }
 
     private boolean clearPackageStateForUserLIF(PackageSetting ps, int userId,
@@ -19711,6 +19812,7 @@
                 }
             }
             scheduleWritePackageRestrictionsLocked(userId);
+            updateSequenceNumberLP(packageName, new int[] { userId });
             components = mPendingBroadcasts.get(userId, packageName);
             final boolean newPackage = components == null;
             if (newPackage) {
@@ -19964,8 +20066,14 @@
         });
 
         // Now that we're mostly running, clean up stale users and apps
-        reconcileUsers(StorageManager.UUID_PRIVATE_INTERNAL);
+        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
@@ -20379,20 +20487,22 @@
                     pw.println("Features:");
                 }
 
-                for (FeatureInfo feat : mAvailableFeatures.values()) {
-                    if (checkin) {
-                        pw.print("feat,");
-                        pw.print(feat.name);
-                        pw.print(",");
-                        pw.println(feat.version);
-                    } else {
-                        pw.print("  ");
-                        pw.print(feat.name);
-                        if (feat.version > 0) {
-                            pw.print(" version=");
-                            pw.print(feat.version);
+                synchronized (mAvailableFeatures) {
+                    for (FeatureInfo feat : mAvailableFeatures.values()) {
+                        if (checkin) {
+                            pw.print("feat,");
+                            pw.print(feat.name);
+                            pw.print(",");
+                            pw.println(feat.version);
+                        } else {
+                            pw.print("  ");
+                            pw.print(feat.name);
+                            if (feat.version > 0) {
+                                pw.print(" version=");
+                                pw.print(feat.version);
+                            }
+                            pw.println();
                         }
-                        pw.println();
                     }
                 }
             }
@@ -21300,60 +21410,6 @@
         }
     }
 
-    /**
-     * Examine all users present on given mounted volume, and destroy data
-     * belonging to users that are no longer valid, or whose user ID has been
-     * recycled.
-     */
-    private void reconcileUsers(String volumeUuid) {
-        final List<File> files = new ArrayList<>();
-        Collections.addAll(files, FileUtils
-                .listFilesOrEmpty(Environment.getDataUserDeDirectory(volumeUuid)));
-        Collections.addAll(files, FileUtils
-                .listFilesOrEmpty(Environment.getDataUserCeDirectory(volumeUuid)));
-        Collections.addAll(files, FileUtils
-                .listFilesOrEmpty(Environment.getDataSystemDeDirectory()));
-        Collections.addAll(files, FileUtils
-                .listFilesOrEmpty(Environment.getDataSystemCeDirectory()));
-        Collections.addAll(files, FileUtils
-                .listFilesOrEmpty(Environment.getDataMiscCeDirectory()));
-        for (File file : files) {
-            if (!file.isDirectory()) continue;
-
-            final int userId;
-            final UserInfo info;
-            try {
-                userId = Integer.parseInt(file.getName());
-                info = sUserManager.getUserInfo(userId);
-            } catch (NumberFormatException e) {
-                Slog.w(TAG, "Invalid user directory " + file);
-                continue;
-            }
-
-            boolean destroyUser = false;
-            if (info == null) {
-                logCriticalInfo(Log.WARN, "Destroying user directory " + file
-                        + " because no matching user was found");
-                destroyUser = true;
-            } else if (!mOnlyCore) {
-                try {
-                    UserManagerService.enforceSerialNumber(file, info.serialNumber);
-                } catch (IOException e) {
-                    logCriticalInfo(Log.WARN, "Destroying user directory " + file
-                            + " because we failed to enforce serial number: " + e);
-                    destroyUser = true;
-                }
-            }
-
-            if (destroyUser) {
-                synchronized (mInstallLock) {
-                    mUserDataPreparer.destroyUserDataLI(volumeUuid, userId,
-                            StorageManager.FLAG_STORAGE_DE | StorageManager.FLAG_STORAGE_CE);
-                }
-            }
-        }
-    }
-
     private void assertPackageKnown(String volumeUuid, String packageName)
             throws PackageManagerException {
         synchronized (mPackages) {
@@ -22823,6 +22879,18 @@
         }
 
         @Override
+        public boolean isPackagePersistent(String packageName) {
+            synchronized (mPackages) {
+                PackageParser.Package pkg = mPackages.get(packageName);
+                return pkg != null
+                        ? ((pkg.applicationInfo.flags&(ApplicationInfo.FLAG_SYSTEM
+                                        | ApplicationInfo.FLAG_PERSISTENT)) ==
+                                (ApplicationInfo.FLAG_SYSTEM | ApplicationInfo.FLAG_PERSISTENT))
+                        : false;
+            }
+        }
+
+        @Override
         public List<PackageInfo> getOverlayPackages(int userId) {
             final ArrayList<PackageInfo> overlayPackages = new ArrayList<PackageInfo>();
             synchronized (mPackages) {
diff --git a/services/core/java/com/android/server/pm/PackageSettingBase.java b/services/core/java/com/android/server/pm/PackageSettingBase.java
index b63edfd..0e11b0c 100644
--- a/services/core/java/com/android/server/pm/PackageSettingBase.java
+++ b/services/core/java/com/android/server/pm/PackageSettingBase.java
@@ -40,6 +40,9 @@
  * Settings base class for pending and resolved classes.
  */
 abstract class PackageSettingBase extends SettingBase {
+
+    private static final int[] EMPTY_INT_ARRAY = new int[0];
+
     /**
      * Indicates the state of installation. Used by PackageManager to figure out
      * incomplete installations. Say a package is being installed (the state is
@@ -502,6 +505,25 @@
         userState.delete(userId);
     }
 
+    public int[] getNotInstalledUserIds() {
+        int count = 0;
+        int userStateCount = userState.size();
+        for (int i = 0; i < userStateCount; i++) {
+            if (userState.valueAt(i).installed == false) {
+                count++;
+            }
+        }
+        if (count == 0) return EMPTY_INT_ARRAY;
+        int[] excludedUserIds = new int[count];
+        int idx = 0;
+        for (int i = 0; i < userStateCount; i++) {
+            if (userState.valueAt(i).installed == false) {
+                excludedUserIds[idx++] = userState.keyAt(i);
+            }
+        }
+        return excludedUserIds;
+    }
+
     IntentFilterVerificationInfo getIntentFilterVerificationInfo() {
         return verificationInfo;
     }
diff --git a/services/core/java/com/android/server/pm/SELinuxMMAC.java b/services/core/java/com/android/server/pm/SELinuxMMAC.java
index 2781150..7e7de21 100644
--- a/services/core/java/com/android/server/pm/SELinuxMMAC.java
+++ b/services/core/java/com/android/server/pm/SELinuxMMAC.java
@@ -72,6 +72,9 @@
     // Append ephemeral to existing seinfo label
     private static final String EPHEMERAL_APP_STR = ":ephemeralapp";
 
+    // Append targetSdkVersion=n to existing seinfo label where n is the app's targetSdkVersion
+    private static final String TARGETSDKVERSION_STR = ":targetSdkVersion=";
+
     /**
      * Load the mac_permissions.xml file containing all seinfo assignments used to
      * label apps. The loaded mac_permissions.xml file is determined by the
@@ -296,6 +299,8 @@
         if (pkg.applicationInfo.isPrivilegedApp())
             pkg.applicationInfo.seinfo += PRIVILEGED_APP_STR;
 
+        pkg.applicationInfo.seinfo += TARGETSDKVERSION_STR + pkg.applicationInfo.targetSdkVersion;
+
         if (DEBUG_POLICY_INSTALL) {
             Slog.i(TAG, "package (" + pkg.packageName + ") labeled with " +
                     "seinfo=" + pkg.applicationInfo.seinfo);
diff --git a/services/core/java/com/android/server/pm/Settings.java b/services/core/java/com/android/server/pm/Settings.java
index 281e445..6156802 100644
--- a/services/core/java/com/android/server/pm/Settings.java
+++ b/services/core/java/com/android/server/pm/Settings.java
@@ -252,6 +252,7 @@
     private final File mPackageListFilename;
     private final File mStoppedPackagesFilename;
     private final File mBackupStoppedPackagesFilename;
+    /** The top level directory in configfs for sdcardfs to push the package->uid,userId mappings */
     private final File mKernelMappingFilename;
 
     /** Map from package name to settings */
@@ -260,8 +261,8 @@
     /** List of packages that installed other packages */
     final ArraySet<String> mInstallerPackages = new ArraySet<>();
 
-    /** Map from package name to appId */
-    private final ArrayMap<String, Integer> mKernelMapping = new ArrayMap<>();
+    /** Map from package name to appId and excluded userids */
+    private final ArrayMap<String, KernelPackageState> mKernelMapping = new ArrayMap<>();
 
     // List of replaced system applications
     private final ArrayMap<String, PackageSetting> mDisabledSysPackages =
@@ -271,6 +272,11 @@
     private final ArrayMap<String, IntentFilterVerificationInfo> mRestoredIntentFilterVerifications =
             new ArrayMap<String, IntentFilterVerificationInfo>();
 
+    private static final class KernelPackageState {
+        int appId;
+        int[] excludedUserIds;
+    }
+
     // Bookkeeping for restored user permission grants
     final class RestoredPermissionGrant {
         String permissionName;
@@ -2512,6 +2518,15 @@
         //Debug.stopMethodTracing();
     }
 
+    private void writeKernelRemoveUserLPr(int userId) {
+        if (mKernelMappingFilename == null) return;
+
+        File removeUserIdFile = new File(mKernelMappingFilename, "remove_userid");
+        if (DEBUG_KERNEL) Slog.d(TAG, "Writing " + userId + " to " + removeUserIdFile
+                .getAbsolutePath());
+        writeIntToFile(removeUserIdFile, userId);
+    }
+
     void writeKernelMappingLPr() {
         if (mKernelMappingFilename == null) return;
 
@@ -2538,27 +2553,63 @@
     }
 
     void writeKernelMappingLPr(PackageSetting ps) {
-        if (mKernelMappingFilename == null) return;
+        if (mKernelMappingFilename == null || ps == null || ps.name == null) return;
 
-        final Integer cur = mKernelMapping.get(ps.name);
-        if (cur != null && cur.intValue() == ps.appId) {
-            // Ignore when mapping already matches
-            return;
+        KernelPackageState cur = mKernelMapping.get(ps.name);
+        final boolean firstTime = cur == null;
+        int[] excludedUserIds = ps.getNotInstalledUserIds();
+        final boolean userIdsChanged = firstTime
+                || !Arrays.equals(excludedUserIds, cur.excludedUserIds);
+
+        // Package directory
+        final File dir = new File(mKernelMappingFilename, ps.name);
+
+        if (firstTime) {
+            dir.mkdir();
+            // Create a new mapping state
+            cur = new KernelPackageState();
+            mKernelMapping.put(ps.name, cur);
         }
 
-        if (DEBUG_KERNEL) Slog.d(TAG, "Mapping " + ps.name + " to " + ps.appId);
+        // If mapping is incorrect or non-existent, write the appid file
+        if (cur.appId != ps.appId) {
+            final File appIdFile = new File(dir, "appid");
+            writeIntToFile(appIdFile, ps.appId);
+            if (DEBUG_KERNEL) Slog.d(TAG, "Mapping " + ps.name + " to " + ps.appId);
+        }
 
-        final File dir = new File(mKernelMappingFilename, ps.name);
-        dir.mkdir();
+        if (userIdsChanged) {
+            // Build the exclusion list -- the ids to add to the exclusion list
+            for (int i = 0; i < excludedUserIds.length; i++) {
+                if (cur.excludedUserIds == null || !ArrayUtils.contains(cur.excludedUserIds,
+                        excludedUserIds[i])) {
+                    writeIntToFile(new File(dir, "excluded_userids"), excludedUserIds[i]);
+                    if (DEBUG_KERNEL) Slog.d(TAG, "Writing " + excludedUserIds[i] + " to "
+                            + ps.name + "/excluded_userids");
+                }
+            }
+            // Build the inclusion list -- the ids to remove from the exclusion list
+            if (cur.excludedUserIds != null) {
+                for (int i = 0; i < cur.excludedUserIds.length; i++) {
+                    if (!ArrayUtils.contains(excludedUserIds, cur.excludedUserIds[i])) {
+                        writeIntToFile(new File(dir, "clear_userid"),
+                                cur.excludedUserIds[i]);
+                        if (DEBUG_KERNEL) Slog.d(TAG, "Writing " + cur.excludedUserIds[i] + " to "
+                                + ps.name + "/clear_userid");
 
-        final File file = new File(dir, "appid");
+                    }
+                }
+            }
+            cur.excludedUserIds = excludedUserIds;
+        }
+    }
+
+    private void writeIntToFile(File file, int value) {
         try {
-            // Note that the use of US_ASCII here is safe, we're only writing a decimal
-            // number to the file.
             FileUtils.bytesToFile(file.getAbsolutePath(),
-                    Integer.toString(ps.appId).getBytes(StandardCharsets.US_ASCII));
-            mKernelMapping.put(ps.name, ps.appId);
+                    Integer.toString(value).getBytes(StandardCharsets.US_ASCII));
         } catch (IOException ignored) {
+            Slog.w(TAG, "Couldn't write " + value + " to " + file.getAbsolutePath());
         }
     }
 
@@ -4081,6 +4132,9 @@
                         !ArrayUtils.contains(disallowedPackages, ps.name);
                 // Only system apps are initially installed.
                 ps.setInstalled(shouldInstall, userHandle);
+                if (!shouldInstall) {
+                    writeKernelMappingLPr(ps);
+                }
                 // Need to create a data directory for all apps under this user. Accumulate all
                 // required args and call the installer after mPackages lock has been released
                 volumeUuids[i] = ps.volumeUuid;
@@ -4123,6 +4177,10 @@
         mRuntimePermissionsPersistence.onUserRemovedLPw(userId);
 
         writePackageListLPr();
+
+        // Inform kernel that the user was removed, so that packages are marked uninstalled
+        // for sdcardfs
+        writeKernelRemoveUserLPr(userId);
     }
 
     void removeCrossProfileIntentFiltersLPw(int userId) {
diff --git a/services/core/java/com/android/server/pm/ShortcutPackage.java b/services/core/java/com/android/server/pm/ShortcutPackage.java
index 3085c9c..570259b 100644
--- a/services/core/java/com/android/server/pm/ShortcutPackage.java
+++ b/services/core/java/com/android/server/pm/ShortcutPackage.java
@@ -1581,6 +1581,11 @@
                 Log.e(TAG_VERIFY, "Package " + getPackageName() + ": shortcut " + si.getId()
                         + " still has an icon");
             }
+            if (si.hasMaskableBitmap() && !si.hasIconFile()) {
+                failed = true;
+                Log.e(TAG_VERIFY, "Package " + getPackageName() + ": shortcut " + si.getId()
+                    + " has maskable bitmap but was not saved to a file.");
+            }
             if (si.hasIconFile() && si.hasIconResource()) {
                 failed = true;
                 Log.e(TAG_VERIFY, "Package " + getPackageName() + ": shortcut " + si.getId()
diff --git a/services/core/java/com/android/server/pm/ShortcutService.java b/services/core/java/com/android/server/pm/ShortcutService.java
index d8857b7..057e781 100644
--- a/services/core/java/com/android/server/pm/ShortcutService.java
+++ b/services/core/java/com/android/server/pm/ShortcutService.java
@@ -1216,7 +1216,8 @@
         // he XML we'd lose the icon.  We just remove all dangling files after saving the XML.
         shortcut.setIconResourceId(0);
         shortcut.setIconResName(null);
-        shortcut.clearFlags(ShortcutInfo.FLAG_HAS_ICON_FILE | ShortcutInfo.FLAG_HAS_ICON_RES);
+        shortcut.clearFlags(ShortcutInfo.FLAG_HAS_ICON_FILE |
+            ShortcutInfo.FLAG_MASKABLE_BITMAP | ShortcutInfo.FLAG_HAS_ICON_RES);
     }
 
     public void cleanupBitmapsForPackage(@UserIdInt int userId, String packageName) {
@@ -1351,7 +1352,8 @@
                         shortcut.addFlags(ShortcutInfo.FLAG_HAS_ICON_RES);
                         return;
                     }
-                    case Icon.TYPE_BITMAP: {
+                    case Icon.TYPE_BITMAP:
+                    case Icon.TYPE_BITMAP_MASKABLE: {
                         bitmap = icon.getBitmap(); // Don't recycle in this case.
                         break;
                     }
@@ -1382,6 +1384,9 @@
 
                         shortcut.setBitmapPath(out.getFile().getAbsolutePath());
                         shortcut.addFlags(ShortcutInfo.FLAG_HAS_ICON_FILE);
+                        if (icon.getType() == Icon.TYPE_BITMAP_MASKABLE) {
+                            shortcut.addFlags(ShortcutInfo.FLAG_MASKABLE_BITMAP);
+                        }
                     } finally {
                         IoUtils.closeQuietly(out);
                     }
diff --git a/services/core/java/com/android/server/pm/UserDataPreparer.java b/services/core/java/com/android/server/pm/UserDataPreparer.java
index 52599fd..fc00acc 100644
--- a/services/core/java/com/android/server/pm/UserDataPreparer.java
+++ b/services/core/java/com/android/server/pm/UserDataPreparer.java
@@ -17,13 +17,28 @@
 package com.android.server.pm;
 
 import android.content.Context;
+import android.content.pm.UserInfo;
 import android.os.Environment;
 import android.os.FileUtils;
 import android.os.storage.StorageManager;
 import android.os.storage.VolumeInfo;
+import android.system.ErrnoException;
+import android.system.Os;
+import android.system.OsConstants;
 import android.util.Log;
+import android.util.Slog;
+import android.util.SparseArray;
 
+import com.android.internal.annotations.VisibleForTesting;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
 import java.util.Objects;
+import java.util.Set;
 
 import static com.android.server.pm.PackageManagerService.logCriticalInfo;
 
@@ -31,6 +46,9 @@
  * Helper class for preparing and destroying user storage
  */
 class UserDataPreparer {
+    private static final String TAG = "UserDataPreparer";
+    private static final String XATTR_SERIAL = "user.serial";
+
     private final Object mInstallLock;
     private final Context mContext;
     private final boolean mOnlyCore;
@@ -65,19 +83,15 @@
             storage.prepareUserStorage(volumeUuid, userId, userSerial, flags);
 
             if ((flags & StorageManager.FLAG_STORAGE_DE) != 0 && !mOnlyCore) {
-                UserManagerService.enforceSerialNumber(
-                        Environment.getDataUserDeDirectory(volumeUuid, userId), userSerial);
+                enforceSerialNumber(getDataUserDeDirectory(volumeUuid, userId), userSerial);
                 if (Objects.equals(volumeUuid, StorageManager.UUID_PRIVATE_INTERNAL)) {
-                    UserManagerService.enforceSerialNumber(
-                            Environment.getDataSystemDeDirectory(userId), userSerial);
+                    enforceSerialNumber(getDataSystemDeDirectory(userId), userSerial);
                 }
             }
             if ((flags & StorageManager.FLAG_STORAGE_CE) != 0 && !mOnlyCore) {
-                UserManagerService.enforceSerialNumber(
-                        Environment.getDataUserCeDirectory(volumeUuid, userId), userSerial);
+                enforceSerialNumber(getDataUserCeDirectory(volumeUuid, userId), userSerial);
                 if (Objects.equals(volumeUuid, StorageManager.UUID_PRIVATE_INTERNAL)) {
-                    UserManagerService.enforceSerialNumber(
-                            Environment.getDataSystemCeDirectory(userId), userSerial);
+                    enforceSerialNumber(getDataSystemCeDirectory(userId), userSerial);
                 }
             }
 
@@ -117,13 +131,13 @@
             // Clean up system data
             if (Objects.equals(volumeUuid, StorageManager.UUID_PRIVATE_INTERNAL)) {
                 if ((flags & StorageManager.FLAG_STORAGE_DE) != 0) {
-                    FileUtils.deleteContentsAndDir(Environment.getUserSystemDirectory(userId));
-                    FileUtils.deleteContentsAndDir(Environment.getDataSystemDeDirectory(userId));
-                    FileUtils.deleteContentsAndDir(Environment.getDataMiscDeDirectory(userId));
+                    FileUtils.deleteContentsAndDir(getUserSystemDirectory(userId));
+                    FileUtils.deleteContentsAndDir(getDataSystemDeDirectory(userId));
+                    FileUtils.deleteContentsAndDir(getDataMiscDeDirectory(userId));
                 }
                 if ((flags & StorageManager.FLAG_STORAGE_CE) != 0) {
-                    FileUtils.deleteContentsAndDir(Environment.getDataSystemCeDirectory(userId));
-                    FileUtils.deleteContentsAndDir(Environment.getDataMiscCeDirectory(userId));
+                    FileUtils.deleteContentsAndDir(getDataSystemCeDirectory(userId));
+                    FileUtils.deleteContentsAndDir(getDataMiscCeDirectory(userId));
                 }
             }
 
@@ -136,4 +150,183 @@
         }
     }
 
+    /**
+     * Examine all users present on given mounted volume, and destroy data
+     * belonging to users that are no longer valid, or whose user ID has been
+     * recycled.
+     */
+    void reconcileUsers(String volumeUuid, List<UserInfo> validUsersList) {
+        final List<File> files = new ArrayList<>();
+        Collections.addAll(files, FileUtils
+                .listFilesOrEmpty(Environment.getDataUserDeDirectory(volumeUuid)));
+        Collections.addAll(files, FileUtils
+                .listFilesOrEmpty(Environment.getDataUserCeDirectory(volumeUuid)));
+        Collections.addAll(files, FileUtils
+                .listFilesOrEmpty(Environment.getDataSystemDeDirectory()));
+        Collections.addAll(files, FileUtils
+                .listFilesOrEmpty(Environment.getDataSystemCeDirectory()));
+        Collections.addAll(files, FileUtils
+                .listFilesOrEmpty(Environment.getDataMiscCeDirectory()));
+        reconcileUsers(volumeUuid, validUsersList, files);
+    }
+
+    @VisibleForTesting
+    void reconcileUsers(String volumeUuid, List<UserInfo> validUsersList, List<File> files) {
+        final int userCount = validUsersList.size();
+        SparseArray<UserInfo> users = new SparseArray<>(userCount);
+        for (int i = 0; i < userCount; i++) {
+            UserInfo user = validUsersList.get(i);
+            users.put(user.id, user);
+        }
+        for (File file : files) {
+            if (!file.isDirectory()) {
+                continue;
+            }
+
+            final int userId;
+            final UserInfo info;
+            try {
+                userId = Integer.parseInt(file.getName());
+                info = users.get(userId);
+            } catch (NumberFormatException e) {
+                Slog.w(TAG, "Invalid user directory " + file);
+                continue;
+            }
+
+            boolean destroyUser = false;
+            if (info == null) {
+                logCriticalInfo(Log.WARN, "Destroying user directory " + file
+                        + " because no matching user was found");
+                destroyUser = true;
+            } else if (!mOnlyCore) {
+                try {
+                    enforceSerialNumber(file, info.serialNumber);
+                } catch (IOException e) {
+                    logCriticalInfo(Log.WARN, "Destroying user directory " + file
+                            + " because we failed to enforce serial number: " + e);
+                    destroyUser = true;
+                }
+            }
+
+            if (destroyUser) {
+                synchronized (mInstallLock) {
+                    destroyUserDataLI(volumeUuid, userId,
+                            StorageManager.FLAG_STORAGE_DE | StorageManager.FLAG_STORAGE_CE);
+                }
+            }
+        }
+    }
+
+    @VisibleForTesting
+    protected File getDataMiscCeDirectory(int userId) {
+        return Environment.getDataMiscCeDirectory(userId);
+    }
+
+    @VisibleForTesting
+    protected File getDataSystemCeDirectory(int userId) {
+        return Environment.getDataSystemCeDirectory(userId);
+    }
+
+    @VisibleForTesting
+    protected File getDataMiscDeDirectory(int userId) {
+        return Environment.getDataMiscDeDirectory(userId);
+    }
+
+    @VisibleForTesting
+    protected File getUserSystemDirectory(int userId) {
+        return Environment.getUserSystemDirectory(userId);
+    }
+
+    @VisibleForTesting
+    protected File getDataUserCeDirectory(String volumeUuid, int userId) {
+        return Environment.getDataUserCeDirectory(volumeUuid, userId);
+    }
+
+    @VisibleForTesting
+    protected File getDataSystemDeDirectory(int userId) {
+        return Environment.getDataSystemDeDirectory(userId);
+    }
+
+    @VisibleForTesting
+    protected File getDataUserDeDirectory(String volumeUuid, int userId) {
+        return Environment.getDataUserDeDirectory(volumeUuid, userId);
+    }
+
+    @VisibleForTesting
+    protected boolean isFileEncryptedEmulatedOnly() {
+        return StorageManager.isFileEncryptedEmulatedOnly();
+    }
+
+    /**
+     * Enforce that serial number stored in user directory inode matches the
+     * given expected value. Gracefully sets the serial number if currently
+     * undefined.
+     *
+     * @throws IOException when problem extracting serial number, or serial
+     *             number is mismatched.
+     */
+    void enforceSerialNumber(File file, int serialNumber) throws IOException {
+        if (isFileEncryptedEmulatedOnly()) {
+            // When we're emulating FBE, the directory may have been chmod
+            // 000'ed, meaning we can't read the serial number to enforce it;
+            // instead of destroying the user, just log a warning.
+            Slog.w(TAG, "Device is emulating FBE; assuming current serial number is valid");
+            return;
+        }
+
+        final int foundSerial = getSerialNumber(file);
+        Slog.v(TAG, "Found " + file + " with serial number " + foundSerial);
+
+        if (foundSerial == -1) {
+            Slog.d(TAG, "Serial number missing on " + file + "; assuming current is valid");
+            try {
+                setSerialNumber(file, serialNumber);
+            } catch (IOException e) {
+                Slog.w(TAG, "Failed to set serial number on " + file, e);
+            }
+
+        } else if (foundSerial != serialNumber) {
+            throw new IOException("Found serial number " + foundSerial
+                    + " doesn't match expected " + serialNumber);
+        }
+    }
+
+    /**
+     * Set serial number stored in user directory inode.
+     *
+     * @throws IOException if serial number was already set
+     */
+    private static void setSerialNumber(File file, int serialNumber) throws IOException {
+        try {
+            final byte[] buf = Integer.toString(serialNumber).getBytes(StandardCharsets.UTF_8);
+            Os.setxattr(file.getAbsolutePath(), XATTR_SERIAL, buf, OsConstants.XATTR_CREATE);
+        } catch (ErrnoException e) {
+            throw e.rethrowAsIOException();
+        }
+    }
+
+    /**
+     * Return serial number stored in user directory inode.
+     *
+     * @return parsed serial number, or -1 if not set
+     */
+    @VisibleForTesting
+    static int getSerialNumber(File file) throws IOException {
+        try {
+            final byte[] buf = Os.getxattr(file.getAbsolutePath(), XATTR_SERIAL);
+            final String serial = new String(buf);
+            try {
+                return Integer.parseInt(serial);
+            } catch (NumberFormatException e) {
+                throw new IOException("Bad serial number: " + serial);
+            }
+        } catch (ErrnoException e) {
+            if (e.errno == OsConstants.ENODATA) {
+                return -1;
+            } else {
+                throw e.rethrowAsIOException();
+            }
+        }
+    }
+
 }
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java
index 455d3e4..627fa54 100644
--- a/services/core/java/com/android/server/pm/UserManagerService.java
+++ b/services/core/java/com/android/server/pm/UserManagerService.java
@@ -218,8 +218,6 @@
     static final int WRITE_USER_MSG = 1;
     static final int WRITE_USER_DELAY = 2*1000;  // 2 seconds
 
-    private static final String XATTR_SERIAL = "user.serial";
-
     // Tron counters
     private static final String TRON_GUEST_CREATED = "users_guest_created";
     private static final String TRON_USER_CREATED = "users_user_created";
@@ -3159,6 +3157,15 @@
     }
 
     /**
+     * Examine all users present on given mounted volume, and destroy data
+     * belonging to users that are no longer valid, or whose user ID has been
+     * recycled.
+     */
+    void reconcileUsers(String volumeUuid) {
+        mUserDataPreparer.reconcileUsers(volumeUuid, getUsers(true /* excludeDying */));
+    }
+
+    /**
      * Make a note of the last started time of a user and do some cleanup.
      * This is called with ActivityManagerService lock held.
      * @param userId the user that was just foregrounded
@@ -3219,78 +3226,6 @@
         return RESTRICTIONS_FILE_PREFIX + packageName + XML_SUFFIX;
     }
 
-    /**
-     * Enforce that serial number stored in user directory inode matches the
-     * given expected value. Gracefully sets the serial number if currently
-     * undefined.
-     *
-     * @throws IOException when problem extracting serial number, or serial
-     *             number is mismatched.
-     */
-    public static void enforceSerialNumber(File file, int serialNumber) throws IOException {
-        if (StorageManager.isFileEncryptedEmulatedOnly()) {
-            // When we're emulating FBE, the directory may have been chmod
-            // 000'ed, meaning we can't read the serial number to enforce it;
-            // instead of destroying the user, just log a warning.
-            Slog.w(LOG_TAG, "Device is emulating FBE; assuming current serial number is valid");
-            return;
-        }
-
-        final int foundSerial = getSerialNumber(file);
-        Slog.v(LOG_TAG, "Found " + file + " with serial number " + foundSerial);
-
-        if (foundSerial == -1) {
-            Slog.d(LOG_TAG, "Serial number missing on " + file + "; assuming current is valid");
-            try {
-                setSerialNumber(file, serialNumber);
-            } catch (IOException e) {
-                Slog.w(LOG_TAG, "Failed to set serial number on " + file, e);
-            }
-
-        } else if (foundSerial != serialNumber) {
-            throw new IOException("Found serial number " + foundSerial
-                    + " doesn't match expected " + serialNumber);
-        }
-    }
-
-    /**
-     * Set serial number stored in user directory inode.
-     *
-     * @throws IOException if serial number was already set
-     */
-    private static void setSerialNumber(File file, int serialNumber)
-            throws IOException {
-        try {
-            final byte[] buf = Integer.toString(serialNumber).getBytes(StandardCharsets.UTF_8);
-            Os.setxattr(file.getAbsolutePath(), XATTR_SERIAL, buf, OsConstants.XATTR_CREATE);
-        } catch (ErrnoException e) {
-            throw e.rethrowAsIOException();
-        }
-    }
-
-    /**
-     * Return serial number stored in user directory inode.
-     *
-     * @return parsed serial number, or -1 if not set
-     */
-    private static int getSerialNumber(File file) throws IOException {
-        try {
-            final byte[] buf = Os.getxattr(file.getAbsolutePath(), XATTR_SERIAL);
-            final String serial = new String(buf);
-            try {
-                return Integer.parseInt(serial);
-            } catch (NumberFormatException e) {
-                throw new IOException("Bad serial number: " + serial);
-            }
-        } catch (ErrnoException e) {
-            if (e.errno == OsConstants.ENODATA) {
-                return -1;
-            } else {
-                throw e.rethrowAsIOException();
-            }
-        }
-    }
-
     @Override
     public void setSeedAccountData(int userId, String accountName, String accountType,
             PersistableBundle accountOptions, boolean persist) {
diff --git a/services/core/java/com/android/server/pm/UserRestrictionsUtils.java b/services/core/java/com/android/server/pm/UserRestrictionsUtils.java
index d301463..fb8429d 100644
--- a/services/core/java/com/android/server/pm/UserRestrictionsUtils.java
+++ b/services/core/java/com/android/server/pm/UserRestrictionsUtils.java
@@ -108,7 +108,7 @@
             UserManager.DISALLOW_SET_USER_ICON,
             UserManager.DISALLOW_SET_WALLPAPER,
             UserManager.DISALLOW_OEM_UNLOCK,
-            UserManager.DISALLLOW_UNMUTE_DEVICE,
+            UserManager.DISALLOW_UNMUTE_DEVICE,
     });
 
     /**
@@ -156,7 +156,7 @@
             UserManager.DISALLOW_ADJUST_VOLUME,
             UserManager.DISALLOW_RUN_IN_BACKGROUND,
             UserManager.DISALLOW_UNMUTE_MICROPHONE,
-            UserManager.DISALLLOW_UNMUTE_DEVICE
+            UserManager.DISALLOW_UNMUTE_DEVICE
     );
 
     /**
@@ -474,11 +474,12 @@
                     }
                     break;
                 case UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES:
-                    if (newValue) {
-                        android.provider.Settings.Secure.putIntForUser(cr,
-                                android.provider.Settings.Secure.INSTALL_NON_MARKET_APPS, 0,
-                                userId);
-                    }
+                    // Since Android O, the secure setting is not available to be changed by the
+                    // user. Hence, when the restriction is cleared, we need to reset the state of
+                    // the setting to its default value which is now 1.
+                    android.provider.Settings.Secure.putIntForUser(cr,
+                            android.provider.Settings.Secure.INSTALL_NON_MARKET_APPS,
+                            newValue ? 0 : 1, userId);
                     break;
                 case UserManager.DISALLOW_RUN_IN_BACKGROUND:
                     if (newValue) {
diff --git a/services/core/java/com/android/server/policy/AccessibilityShortcutController.java b/services/core/java/com/android/server/policy/AccessibilityShortcutController.java
index 133881a..eec1fef 100644
--- a/services/core/java/com/android/server/policy/AccessibilityShortcutController.java
+++ b/services/core/java/com/android/server/policy/AccessibilityShortcutController.java
@@ -140,8 +140,11 @@
             String toastMessage = String.format(toastMessageFormatString,
                     serviceInfo.getResolveInfo()
                             .loadLabel(mContext.getPackageManager()).toString());
-            mFrameworkObjectProvider.makeToastFromText(mContext, toastMessage, Toast.LENGTH_LONG)
-                    .show();
+            Toast warningToast = mFrameworkObjectProvider.makeToastFromText(
+                    mContext, toastMessage, Toast.LENGTH_LONG);
+            warningToast.getWindowParams().privateFlags |=
+                    WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS;
+            warningToast.show();
 
             mFrameworkObjectProvider.getAccessibilityManagerInstance(mContext)
                     .performAccessibilityShortcut();
diff --git a/services/core/java/com/android/server/policy/BarController.java b/services/core/java/com/android/server/policy/BarController.java
index 6edb4d2..7a28081 100644
--- a/services/core/java/com/android/server/policy/BarController.java
+++ b/services/core/java/com/android/server/policy/BarController.java
@@ -18,6 +18,7 @@
 
 import android.app.StatusBarManager;
 import android.os.Handler;
+import android.os.Message;
 import android.os.SystemClock;
 import android.util.Slog;
 import android.view.View;
@@ -43,6 +44,8 @@
 
     private static final int TRANSLUCENT_ANIMATION_DELAY_MS = 1000;
 
+    private static final int MSG_NAV_BAR_VISIBILITY_CHANGED = 1;
+
     protected final String mTag;
     private final int mTransientFlag;
     private final int mUnhideFlag;
@@ -63,6 +66,8 @@
     private boolean mSetUnHideFlagWhenNextTransparent;
     private boolean mNoAnimationOnNextShow;
 
+    private OnBarVisibilityChangedListener mVisibilityChangeListener;
+
     public BarController(String tag, int transientFlag, int unhideFlag, int translucentFlag,
             int statusBarManagerId, int translucentWmFlag, int transparentFlag) {
         mTag = "BarController." + tag;
@@ -72,7 +77,7 @@
         mStatusBarManagerId = statusBarManagerId;
         mTranslucentWmFlag = translucentWmFlag;
         mTransparentFlag = transparentFlag;
-        mHandler = new Handler();
+        mHandler = new BarHandler();
     }
 
     public void setWindow(WindowState win) {
@@ -153,9 +158,18 @@
         mNoAnimationOnNextShow = false;
         final int state = computeStateLw(wasVis, wasAnim, mWin, change);
         final boolean stateChanged = updateStateLw(state);
+
+        if (change && (mVisibilityChangeListener != null)) {
+            mHandler.obtainMessage(MSG_NAV_BAR_VISIBILITY_CHANGED, show ? 1 : 0, 0).sendToTarget();
+        }
+
         return change || stateChanged;
     }
 
+    void setOnBarVisibilityChangedListener(OnBarVisibilityChangedListener listener) {
+        mVisibilityChangeListener = listener;
+    }
+
     protected boolean skipAnimation() {
         return false;
     }
@@ -300,4 +314,22 @@
             pw.println(transientBarStateToString(mTransientBarState));
         }
     }
+
+    private class BarHandler extends Handler {
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what) {
+                case MSG_NAV_BAR_VISIBILITY_CHANGED:
+                    final boolean visible = msg.arg1 != 0;
+                    if (mVisibilityChangeListener != null) {
+                        mVisibilityChangeListener.onBarVisibilityChanged(visible);
+                    }
+                    break;
+            }
+        }
+    }
+
+    interface OnBarVisibilityChangedListener {
+        void onBarVisibilityChanged(boolean visible);
+    }
 }
diff --git a/services/core/java/com/android/server/policy/ImmersiveModeConfirmation.java b/services/core/java/com/android/server/policy/ImmersiveModeConfirmation.java
index 9bf0476..364bf28 100644
--- a/services/core/java/com/android/server/policy/ImmersiveModeConfirmation.java
+++ b/services/core/java/com/android/server/policy/ImmersiveModeConfirmation.java
@@ -125,7 +125,7 @@
 
     void systemReady() {
         IVrManager vrManager = IVrManager.Stub.asInterface(
-                ServiceManager.getService(VrManagerService.VR_MANAGER_BINDER_SERVICE));
+                ServiceManager.getService(Context.VR_SERVICE));
         if (vrManager != null) {
             try {
                 vrManager.registerListener(mVrStateCallbacks);
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index 37fff68..477bb7f 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -16,17 +16,24 @@
 
 package com.android.server.policy;
 
+import static android.Manifest.permission.INTERNAL_SYSTEM_WINDOW;
+import static android.Manifest.permission.SYSTEM_ALERT_WINDOW;
 import static android.app.ActivityManager.StackId.DOCKED_STACK_ID;
 import static android.app.ActivityManager.StackId.FREEFORM_WORKSPACE_STACK_ID;
 import static android.app.ActivityManager.StackId.HOME_STACK_ID;
+import static android.app.AppOpsManager.OP_SYSTEM_ALERT_WINDOW;
+import static android.app.AppOpsManager.OP_TOAST_WINDOW;
 import static android.content.Context.DISPLAY_SERVICE;
 import static android.content.Context.WINDOW_SERVICE;
 import static android.content.pm.PackageManager.FEATURE_PICTURE_IN_PICTURE;
 import static android.content.pm.PackageManager.FEATURE_TELEVISION;
 import static android.content.pm.PackageManager.FEATURE_WATCH;
+import static android.content.pm.PackageManager.PERMISSION_GRANTED;
 import static android.content.res.Configuration.EMPTY;
 import static android.content.res.Configuration.UI_MODE_TYPE_CAR;
 import static android.content.res.Configuration.UI_MODE_TYPE_MASK;
+import static android.os.Build.VERSION_CODES.M;
+import static android.os.Build.VERSION_CODES.O;
 import static android.view.WindowManager.DOCKED_LEFT;
 import static android.view.WindowManager.DOCKED_RIGHT;
 import static android.view.WindowManager.DOCKED_TOP;
@@ -63,21 +70,14 @@
 import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
 import static android.view.WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST;
 import static android.view.WindowManager.LayoutParams.TYPE_ACCESSIBILITY_OVERLAY;
-import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_ABOVE_SUB_PANEL;
-import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG;
-import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA;
-import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA_OVERLAY;
-import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_PANEL;
 import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING;
-import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_SUB_PANEL;
+import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
 import static android.view.WindowManager.LayoutParams.TYPE_BOOT_PROGRESS;
 import static android.view.WindowManager.LayoutParams.TYPE_DISPLAY_OVERLAY;
 import static android.view.WindowManager.LayoutParams.TYPE_DOCK_DIVIDER;
-import static android.view.WindowManager.LayoutParams.TYPE_DRAG;
 import static android.view.WindowManager.LayoutParams.TYPE_DREAM;
 import static android.view.WindowManager.LayoutParams.TYPE_INPUT_CONSUMER;
 import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD;
-import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD_DIALOG;
 import static android.view.WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG;
 import static android.view.WindowManager.LayoutParams.TYPE_MAGNIFICATION_OVERLAY;
 import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR;
@@ -103,8 +103,11 @@
 import static android.view.WindowManager.LayoutParams.TYPE_VOICE_INTERACTION_STARTING;
 import static android.view.WindowManager.LayoutParams.TYPE_VOLUME_OVERLAY;
 import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER;
+import static android.view.WindowManager.LayoutParams.isSystemAlertWindowType;
 import static android.view.WindowManager.TAKE_SCREENSHOT_FULLSCREEN;
 import static android.view.WindowManager.TAKE_SCREENSHOT_SELECTED_REGION;
+import static android.view.WindowManagerGlobal.ADD_OKAY;
+import static android.view.WindowManagerGlobal.ADD_PERMISSION_DENIED;
 import static android.view.WindowManagerPolicy.WindowManagerFuncs.CAMERA_LENS_COVERED;
 import static android.view.WindowManagerPolicy.WindowManagerFuncs.CAMERA_LENS_COVER_ABSENT;
 import static android.view.WindowManagerPolicy.WindowManagerFuncs.CAMERA_LENS_UNCOVERED;
@@ -146,6 +149,7 @@
 import android.hardware.hdmi.HdmiControlManager;
 import android.hardware.hdmi.HdmiPlaybackClient;
 import android.hardware.hdmi.HdmiPlaybackClient.OneTouchPlayCallback;
+import android.hardware.input.InputManager;
 import android.hardware.input.InputManagerInternal;
 import android.hardware.power.V1_0.PowerHint;
 import android.media.AudioAttributes;
@@ -156,7 +160,6 @@
 import android.os.Binder;
 import android.os.Build;
 import android.os.Bundle;
-import android.os.Debug;
 import android.os.FactoryTest;
 import android.os.Handler;
 import android.os.IBinder;
@@ -201,6 +204,7 @@
 import android.view.KeyCharacterMap.FallbackAction;
 import android.view.KeyEvent;
 import android.view.MotionEvent;
+import android.view.PointerIcon;
 import android.view.Surface;
 import android.view.View;
 import android.view.ViewConfiguration;
@@ -314,12 +318,6 @@
     // Nav bar is always translucent when the freeform stack is visible, otherwise always opaque.
     static final int NAV_BAR_TRANSLUCENT_WHEN_FREEFORM_OPAQUE_OTHERWISE = 1;
 
-    static final int APPLICATION_MEDIA_SUBLAYER = -2;
-    static final int APPLICATION_MEDIA_OVERLAY_SUBLAYER = -1;
-    static final int APPLICATION_PANEL_SUBLAYER = 1;
-    static final int APPLICATION_SUB_PANEL_SUBLAYER = 2;
-    static final int APPLICATION_ABOVE_SUB_PANEL_SUBLAYER = 3;
-
     static public final String SYSTEM_DIALOG_REASON_KEY = "reason";
     static public final String SYSTEM_DIALOG_REASON_GLOBAL_ACTIONS = "globalactions";
     static public final String SYSTEM_DIALOG_REASON_RECENT_APPS = "recentapps";
@@ -994,6 +992,14 @@
             WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION,
             View.NAVIGATION_BAR_TRANSPARENT);
 
+    private final BarController.OnBarVisibilityChangedListener mNavBarVisibilityListener =
+            new BarController.OnBarVisibilityChangedListener() {
+        @Override
+        public void onBarVisibilityChanged(boolean visible) {
+            mAccessibilityManager.notifyAccessibilityButtonAvailabilityChanged(visible);
+        }
+    };
+
     private ImmersiveModeConfirmation mImmersiveModeConfirmation;
 
     private SystemGesturesPointerEventListener mSystemGestures;
@@ -2315,86 +2321,82 @@
 
         if (type < FIRST_SYSTEM_WINDOW || type > LAST_SYSTEM_WINDOW) {
             // Window manager will make sure these are okay.
-            return WindowManagerGlobal.ADD_OKAY;
+            return ADD_OKAY;
         }
-        String permission = null;
-        switch (type) {
-            case TYPE_TOAST:
-                // XXX right now the app process has complete control over
-                // this...  should introduce a token to let the system
-                // monitor/control what they are doing.
-                outAppOp[0] = AppOpsManager.OP_TOAST_WINDOW;
-                break;
-            case TYPE_DREAM:
-            case TYPE_INPUT_METHOD:
-            case TYPE_WALLPAPER:
-            case TYPE_PRESENTATION:
-            case TYPE_PRIVATE_PRESENTATION:
-            case TYPE_VOICE_INTERACTION:
-            case TYPE_ACCESSIBILITY_OVERLAY:
-            case TYPE_QS_DIALOG:
-                // The window manager will check these.
-                break;
-            case TYPE_PHONE:
-            case TYPE_PRIORITY_PHONE:
-            case TYPE_SYSTEM_ALERT:
-            case TYPE_SYSTEM_ERROR:
-            case TYPE_SYSTEM_OVERLAY:
-                permission = android.Manifest.permission.SYSTEM_ALERT_WINDOW;
-                outAppOp[0] = AppOpsManager.OP_SYSTEM_ALERT_WINDOW;
-                break;
+
+        if (!isSystemAlertWindowType(type)) {
+            switch (type) {
+                case TYPE_TOAST:
+                    // Only apps that target older than O SDK can add window without a token, after
+                    // that we require a token so apps cannot add toasts directly as the token is
+                    // added by the notification system.
+                    // Window manager does the checking for this.
+                    outAppOp[0] = OP_TOAST_WINDOW;
+                    return ADD_OKAY;
+                case TYPE_DREAM:
+                case TYPE_INPUT_METHOD:
+                case TYPE_WALLPAPER:
+                case TYPE_PRESENTATION:
+                case TYPE_PRIVATE_PRESENTATION:
+                case TYPE_VOICE_INTERACTION:
+                case TYPE_ACCESSIBILITY_OVERLAY:
+                case TYPE_QS_DIALOG:
+                    // The window manager will check these.
+                    return ADD_OKAY;
+            }
+            return mContext.checkCallingOrSelfPermission(INTERNAL_SYSTEM_WINDOW)
+                    == PERMISSION_GRANTED ? ADD_OKAY : ADD_PERMISSION_DENIED;
+        }
+
+        // Things get a little more interesting for alert windows...
+        outAppOp[0] = OP_SYSTEM_ALERT_WINDOW;
+
+        final int callingUid = Binder.getCallingUid();
+        // system processes will be automatically granted privilege to draw
+        if (UserHandle.getAppId(callingUid) == Process.SYSTEM_UID) {
+            return ADD_OKAY;
+        }
+
+        ApplicationInfo appInfo;
+        try {
+            appInfo = mContext.getPackageManager().getApplicationInfo(attrs.packageName,
+                            UserHandle.getUserId(callingUid));
+        } catch (PackageManager.NameNotFoundException e) {
+            appInfo = null;
+        }
+
+        if (appInfo == null || (type != TYPE_APPLICATION_OVERLAY && appInfo.targetSdkVersion >= O)) {
+            /**
+             * Apps targeting >= {@link Build.VERSION_CODES#O} are required to hold
+             * {@link android.Manifest.permission#INTERNAL_SYSTEM_WINDOW} (system signature apps)
+             * permission to add alert windows that aren't
+             * {@link android.view.WindowManager.LayoutParams#TYPE_APPLICATION_OVERLAY}.
+             */
+            return (mContext.checkCallingPermission(INTERNAL_SYSTEM_WINDOW) == PERMISSION_GRANTED)
+                    ? ADD_OKAY : ADD_PERMISSION_DENIED;
+        }
+
+        // check if user has enabled this operation. SecurityException will be thrown if this app
+        // has not been allowed by the user
+        final int mode = mAppOpsManager.checkOpNoThrow(outAppOp[0], callingUid, attrs.packageName);
+        switch (mode) {
+            case AppOpsManager.MODE_ALLOWED:
+            case AppOpsManager.MODE_IGNORED:
+                // although we return ADD_OKAY for MODE_IGNORED, the added window will
+                // actually be hidden in WindowManagerService
+                return ADD_OKAY;
+            case AppOpsManager.MODE_ERRORED:
+                // Don't crash legacy apps
+                if (appInfo.targetSdkVersion < M) {
+                    return ADD_OKAY;
+                }
+                return ADD_PERMISSION_DENIED;
             default:
-                permission = android.Manifest.permission.INTERNAL_SYSTEM_WINDOW;
+                // in the default mode, we will make a decision here based on
+                // checkCallingPermission()
+                return (mContext.checkCallingPermission(SYSTEM_ALERT_WINDOW) == PERMISSION_GRANTED)
+                        ? ADD_OKAY : ADD_PERMISSION_DENIED;
         }
-        if (permission != null) {
-            if (android.Manifest.permission.SYSTEM_ALERT_WINDOW.equals(permission)) {
-                final int callingUid = Binder.getCallingUid();
-                // system processes will be automatically allowed privilege to draw
-                if (callingUid == Process.SYSTEM_UID) {
-                    return WindowManagerGlobal.ADD_OKAY;
-                }
-
-                // check if user has enabled this operation. SecurityException will be thrown if
-                // this app has not been allowed by the user
-                final int mode = mAppOpsManager.checkOpNoThrow(outAppOp[0], callingUid,
-                        attrs.packageName);
-                switch (mode) {
-                    case AppOpsManager.MODE_ALLOWED:
-                    case AppOpsManager.MODE_IGNORED:
-                        // although we return ADD_OKAY for MODE_IGNORED, the added window will
-                        // actually be hidden in WindowManagerService
-                        return WindowManagerGlobal.ADD_OKAY;
-                    case AppOpsManager.MODE_ERRORED:
-                        try {
-                            ApplicationInfo appInfo = mContext.getPackageManager()
-                                    .getApplicationInfo(attrs.packageName,
-                                            UserHandle.getUserId(callingUid));
-                            // Don't crash legacy apps
-                            if (appInfo.targetSdkVersion < Build.VERSION_CODES.M) {
-                                return WindowManagerGlobal.ADD_OKAY;
-                            }
-                        } catch (PackageManager.NameNotFoundException e) {
-                            /* ignore */
-                        }
-                        return WindowManagerGlobal.ADD_PERMISSION_DENIED;
-                    default:
-                        // in the default mode, we will make a decision here based on
-                        // checkCallingPermission()
-                        if (mContext.checkCallingPermission(permission) !=
-                                PackageManager.PERMISSION_GRANTED) {
-                            return WindowManagerGlobal.ADD_PERMISSION_DENIED;
-                        } else {
-                            return WindowManagerGlobal.ADD_OKAY;
-                        }
-                }
-            }
-
-            if (mContext.checkCallingOrSelfPermission(permission)
-                    != PackageManager.PERMISSION_GRANTED) {
-                return WindowManagerGlobal.ADD_PERMISSION_DENIED;
-            }
-        }
-        return WindowManagerGlobal.ADD_OKAY;
     }
 
     @Override
@@ -2440,9 +2442,7 @@
         }
 
         // Check if third party app has set window to system window type.
-        return mContext.checkCallingOrSelfPermission(
-                android.Manifest.permission.INTERNAL_SYSTEM_WINDOW)
-                        != PackageManager.PERMISSION_GRANTED;
+        return mContext.checkCallingOrSelfPermission(INTERNAL_SYSTEM_WINDOW) != PERMISSION_GRANTED;
     }
 
     @Override
@@ -2591,130 +2591,9 @@
         }
     }
 
-    /** {@inheritDoc} */
-    @Override
-    public int windowTypeToLayerLw(int type) {
-        if (type >= FIRST_APPLICATION_WINDOW && type <= LAST_APPLICATION_WINDOW) {
-            return 2;
-        }
-        switch (type) {
-        case TYPE_WALLPAPER:
-            // wallpaper is at the bottom, though the window manager may move it.
-            return 1;
-        case TYPE_PRESENTATION:
-        case TYPE_PRIVATE_PRESENTATION:
-            return 2;
-        case TYPE_DOCK_DIVIDER:
-            return 2;
-        case TYPE_QS_DIALOG:
-            return 2;
-        case TYPE_PHONE:
-            return 3;
-        case TYPE_SEARCH_BAR:
-        case TYPE_VOICE_INTERACTION_STARTING:
-            return 4;
-        case TYPE_VOICE_INTERACTION:
-            // voice interaction layer is almost immediately above apps.
-            return 5;
-        case TYPE_INPUT_CONSUMER:
-            return 6;
-        case TYPE_SYSTEM_DIALOG:
-            return 7;
-        case TYPE_TOAST:
-            // toasts and the plugged-in battery thing
-            return 8;
-        case TYPE_PRIORITY_PHONE:
-            // SIM errors and unlock.  Not sure if this really should be in a high layer.
-            return 9;
-        case TYPE_DREAM:
-            // used for Dreams (screensavers with TYPE_DREAM windows)
-            return 10;
-        case TYPE_SYSTEM_ALERT:
-            // like the ANR / app crashed dialogs
-            return 11;
-        case TYPE_INPUT_METHOD:
-            // on-screen keyboards and other such input method user interfaces go here.
-            return 12;
-        case TYPE_INPUT_METHOD_DIALOG:
-            // on-screen keyboards and other such input method user interfaces go here.
-            return 13;
-        case TYPE_STATUS_BAR_SUB_PANEL:
-            return 15;
-        case TYPE_STATUS_BAR:
-            return 16;
-        case TYPE_STATUS_BAR_PANEL:
-            return 17;
-        case TYPE_KEYGUARD_DIALOG:
-            return 18;
-        case TYPE_VOLUME_OVERLAY:
-            // the on-screen volume indicator and controller shown when the user
-            // changes the device volume
-            return 19;
-        case TYPE_SYSTEM_OVERLAY:
-            // the on-screen volume indicator and controller shown when the user
-            // changes the device volume
-            return 20;
-        case TYPE_NAVIGATION_BAR:
-            // the navigation bar, if available, shows atop most things
-            return 21;
-        case TYPE_NAVIGATION_BAR_PANEL:
-            // some panels (e.g. search) need to show on top of the navigation bar
-            return 22;
-        case TYPE_SCREENSHOT:
-            // screenshot selection layer shouldn't go above system error, but it should cover
-            // navigation bars at the very least.
-            return 23;
-        case TYPE_SYSTEM_ERROR:
-            // system-level error dialogs
-            return 24;
-        case TYPE_MAGNIFICATION_OVERLAY:
-            // used to highlight the magnified portion of a display
-            return 25;
-        case TYPE_DISPLAY_OVERLAY:
-            // used to simulate secondary display devices
-            return 26;
-        case TYPE_DRAG:
-            // the drag layer: input for drag-and-drop is associated with this window,
-            // which sits above all other focusable windows
-            return 27;
-        case TYPE_ACCESSIBILITY_OVERLAY:
-            // overlay put by accessibility services to intercept user interaction
-            return 28;
-        case TYPE_SECURE_SYSTEM_OVERLAY:
-            return 29;
-        case TYPE_BOOT_PROGRESS:
-            return 30;
-        case TYPE_POINTER:
-            // the (mouse) pointer layer
-            return 31;
-        }
-        Log.e(TAG, "Unknown window type: " + type);
-        return 2;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public int subWindowTypeToLayerLw(int type) {
-        switch (type) {
-        case TYPE_APPLICATION_PANEL:
-        case TYPE_APPLICATION_ATTACHED_DIALOG:
-            return APPLICATION_PANEL_SUBLAYER;
-        case TYPE_APPLICATION_MEDIA:
-            return APPLICATION_MEDIA_SUBLAYER;
-        case TYPE_APPLICATION_MEDIA_OVERLAY:
-            return APPLICATION_MEDIA_OVERLAY_SUBLAYER;
-        case TYPE_APPLICATION_SUB_PANEL:
-            return APPLICATION_SUB_PANEL_SUBLAYER;
-        case TYPE_APPLICATION_ABOVE_SUB_PANEL:
-            return APPLICATION_ABOVE_SUB_PANEL_SUBLAYER;
-        }
-        Log.e(TAG, "Unknown sub-window type: " + type);
-        return 0;
-    }
-
     @Override
     public int getMaxWallpaperLayer() {
-        return windowTypeToLayerLw(TYPE_STATUS_BAR);
+        return getWindowLayerFromTypeLw(TYPE_STATUS_BAR);
     }
 
     private int getNavigationBarWidth(int rotation, int uiMode) {
@@ -2797,8 +2676,7 @@
                 return false;
             default:
                 // Hide only windows below the keyguard host window.
-                return windowTypeToLayerLw(win.getBaseType())
-                        < windowTypeToLayerLw(TYPE_STATUS_BAR);
+                return getWindowLayerLw(win) < getWindowLayerFromTypeLw(TYPE_STATUS_BAR);
         }
     }
 
@@ -3032,6 +2910,8 @@
                 }
                 mNavigationBar = win;
                 mNavigationBarController.setWindow(win);
+                mNavigationBarController.setOnBarVisibilityChangedListener(
+                        mNavBarVisibilityListener);
                 if (DEBUG_LAYOUT) Slog.i(TAG, "NAVIGATION BAR: " + mNavigationBar);
                 break;
             case TYPE_NAVIGATION_BAR_PANEL:
@@ -3043,7 +2923,7 @@
                         "PhoneWindowManager");
                 break;
         }
-        return WindowManagerGlobal.ADD_OKAY;
+        return ADD_OKAY;
     }
 
     /** {@inheritDoc} */
@@ -4368,6 +4248,9 @@
                 mInputConsumer = mWindowManagerFuncs.createInputConsumer(mHandler.getLooper(),
                         INPUT_CONSUMER_NAVIGATION,
                         (channel, looper) -> new HideNavInputEventReceiver(channel, looper));
+                // As long as mInputConsumer is active, hover events are not dispatched to the app
+                // and the pointer icon is likely to become stale. Hide it to avoid confusion.
+                InputManager.getInstance().setPointerIconType(PointerIcon.TYPE_NULL);
             }
 
             // For purposes of positioning and showing the nav bar, if we have
@@ -5853,7 +5736,7 @@
                             mScreenshotChordVolumeDownKeyConsumed = false;
                             cancelPendingPowerKeyAction();
                             interceptScreenshotChord();
-                            if (!keyguardActive) {
+                            if (!isKeyguardLocked()) {
                                 interceptAccessibilityShortcutChord();
                             }
                         }
@@ -5871,7 +5754,7 @@
                             mA11yShortcutChordVolumeUpKeyConsumed = false;
                             cancelPendingPowerKeyAction();
                             cancelPendingScreenshotChordAction();
-                            if (!keyguardActive) {
+                            if (!isKeyguardLocked()) {
                                 interceptAccessibilityShortcutChord();
                             }
                         }
@@ -7837,8 +7720,8 @@
         immersiveSticky = (vis & View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY) != 0;
         final boolean navAllowedHidden = immersive || immersiveSticky;
 
-        if (hideNavBarSysui && !navAllowedHidden && windowTypeToLayerLw(win.getBaseType())
-                > windowTypeToLayerLw(TYPE_INPUT_CONSUMER)) {
+        if (hideNavBarSysui && !navAllowedHidden
+                && getWindowLayerLw(win) > getWindowLayerFromTypeLw(TYPE_INPUT_CONSUMER)) {
             // We can't hide the navbar from this window otherwise the input consumer would not get
             // the input events.
             vis = (vis & ~View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
diff --git a/services/core/java/com/android/server/power/PowerManagerService.java b/services/core/java/com/android/server/power/PowerManagerService.java
index 238866a..ffbb428 100644
--- a/services/core/java/com/android/server/power/PowerManagerService.java
+++ b/services/core/java/com/android/server/power/PowerManagerService.java
@@ -517,9 +517,6 @@
     private final ArrayList<PowerManagerInternal.LowPowerModeListener> mLowPowerModeListeners
             = new ArrayList<PowerManagerInternal.LowPowerModeListener>();
 
-    // True if brightness should be affected by twilight.
-    private boolean mBrightnessUseTwilight;
-
     // True if we are currently in VR Mode.
     private boolean mIsVrModeEnabled;
 
@@ -735,11 +732,7 @@
             resolver.registerContentObserver(Settings.Secure.getUriFor(
                     Settings.Secure.DOUBLE_TAP_TO_WAKE),
                     false, mSettingsObserver, UserHandle.USER_ALL);
-            resolver.registerContentObserver(Settings.Secure.getUriFor(
-                    Secure.BRIGHTNESS_USE_TWILIGHT),
-                    false, mSettingsObserver, UserHandle.USER_ALL);
-            IVrManager vrManager =
-                    (IVrManager) getBinderService(VrManagerService.VR_MANAGER_BINDER_SERVICE);
+            IVrManager vrManager = (IVrManager) getBinderService(Context.VR_SERVICE);
             if (vrManager != null) {
                 try {
                     vrManager.registerListener(mVrStateCallbacks);
@@ -878,9 +871,6 @@
                 Settings.System.SCREEN_BRIGHTNESS_MODE,
                 Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL, UserHandle.USER_CURRENT);
 
-        mBrightnessUseTwilight = Settings.Secure.getIntForUser(resolver,
-                Secure.BRIGHTNESS_USE_TWILIGHT, 0, UserHandle.USER_CURRENT) != 0;
-
         final boolean lowPowerModeEnabled = Settings.Global.getInt(resolver,
                 Settings.Global.LOW_POWER_MODE, 0) != 0;
         final boolean autoLowPowerModeConfigured = Settings.Global.getInt(resolver,
@@ -2254,7 +2244,6 @@
             mDisplayPowerRequest.useProximitySensor = shouldUseProximitySensorLocked();
             mDisplayPowerRequest.lowPowerMode = mLowPowerModeEnabled;
             mDisplayPowerRequest.boostScreenBrightness = shouldBoostScreenBrightness();
-            mDisplayPowerRequest.useTwilight = mBrightnessUseTwilight;
 
             if (mDisplayPowerRequest.policy == DisplayPowerRequest.POLICY_DOZE) {
                 mDisplayPowerRequest.dozeScreenState = mDozeScreenStateOverrideFromDreamManager;
diff --git a/services/core/java/com/android/server/search/SearchManagerService.java b/services/core/java/com/android/server/search/SearchManagerService.java
index b5aa4a9..edeb774 100644
--- a/services/core/java/com/android/server/search/SearchManagerService.java
+++ b/services/core/java/com/android/server/search/SearchManagerService.java
@@ -18,6 +18,7 @@
 
 import android.app.ActivityManager;
 import android.app.AppGlobals;
+import android.app.AppOpsManager;
 import android.app.IActivityManager;
 import android.app.ISearchManager;
 import android.app.SearchManager;
@@ -28,6 +29,7 @@
 import android.content.Intent;
 import android.content.pm.IPackageManager;
 import android.content.pm.PackageManager;
+import android.content.pm.ParceledListSlice;
 import android.content.pm.ResolveInfo;
 import android.database.ContentObserver;
 import android.os.Binder;
@@ -37,6 +39,8 @@
 import android.os.UserHandle;
 import android.os.UserManager;
 import android.provider.Settings;
+import android.speech.RecognitionService;
+import android.text.TextUtils;
 import android.util.Log;
 import android.util.SparseArray;
 
@@ -271,6 +275,52 @@
         }
     }
 
+    private boolean isDefaultRecognizerPackage(String packageName) {
+        ResolveInfo resolveInfo = mContext.getPackageManager().resolveService(
+                new Intent(RecognitionService.SERVICE_INTERFACE),
+                PackageManager.GET_META_DATA);
+        if (resolveInfo == null || resolveInfo.serviceInfo == null) {
+            Log.w(TAG, "Unable to resolve default voice recognition service.");
+            return false;
+        }
+        if (!TextUtils.isEmpty(packageName) && TextUtils.equals(packageName,
+                resolveInfo.serviceInfo.packageName)) {
+            return true;
+        }
+        return false;
+    }
+
+    private ComponentName getLegacyAssistReceiverComponent(int userHandle) {
+        try {
+            userHandle = ActivityManager.handleIncomingUser(Binder.getCallingPid(),
+                    Binder.getCallingUid(), userHandle, true, false,
+                    "getLegacyAssistReceiverComponent", null);
+            IPackageManager pm = AppGlobals.getPackageManager();
+            Intent assistIntent = new Intent(Intent.ACTION_ASSIST);
+            ParceledListSlice<ResolveInfo> infoParceledList =
+                    pm.queryIntentReceivers(assistIntent,
+                            assistIntent.resolveTypeIfNeeded(mContext.getContentResolver()),
+                            PackageManager.MATCH_DEFAULT_ONLY, userHandle);
+            if (infoParceledList != null) {
+                List<ResolveInfo> infoList = infoParceledList.getList();
+                if (infoList != null && infoList.size() > 0) {
+                    if (isDefaultRecognizerPackage(
+                            infoList.get(0).activityInfo.applicationInfo.packageName)) {
+                        return new ComponentName(
+                                infoList.get(0).activityInfo.applicationInfo.packageName,
+                                infoList.get(0).activityInfo.name);
+                    }
+                }
+            }
+        } catch (RemoteException re) {
+            // Local call
+            Log.e(TAG, "RemoteException in getLegacyAssistReceiverComponent: " + re);
+        } catch (Exception e) {
+            Log.e(TAG, "Exception in getLegacyAssistReceiverComponent: " + e);
+        }
+        return null;
+    }
+
     private ComponentName getLegacyAssistComponent(int userHandle) {
         try {
             userHandle = ActivityManager.handleIncomingUser(Binder.getCallingPid(),
@@ -297,7 +347,7 @@
 
     @Override
     public boolean launchLegacyAssist(String hint, int userHandle, Bundle args) {
-        ComponentName comp = getLegacyAssistComponent(userHandle);
+        ComponentName comp = getLegacyAssistReceiverComponent(userHandle);
         if (comp == null) {
             return false;
         }
@@ -305,9 +355,13 @@
         try {
             Intent intent = new Intent(Intent.ACTION_ASSIST);
             intent.setComponent(comp);
+            if (args != null) {
+                intent.putExtras(args);
+            }
             IActivityManager am = ActivityManager.getService();
-            return am.launchAssistIntent(intent, ActivityManager.ASSIST_CONTEXT_BASIC, hint,
-                    userHandle, args);
+            return am.broadcastIntent(null, intent, null, null, 0, null, null, null,
+                    AppOpsManager.OP_NONE, null, false, false,
+                    userHandle) == ActivityManager.BROADCAST_SUCCESS;
         } catch (RemoteException e) {
         } finally {
             Binder.restoreCallingIdentity(ident);
diff --git a/services/core/java/com/android/server/statusbar/StatusBarManagerInternal.java b/services/core/java/com/android/server/statusbar/StatusBarManagerInternal.java
index fb0dd2a..b4467af 100644
--- a/services/core/java/com/android/server/statusbar/StatusBarManagerInternal.java
+++ b/services/core/java/com/android/server/statusbar/StatusBarManagerInternal.java
@@ -23,9 +23,6 @@
 
 public interface StatusBarManagerInternal {
     void setNotificationDelegate(NotificationDelegate delegate);
-    void buzzBeepBlinked();
-    void notificationLightPulse(int argb, int onMillis, int offMillis);
-    void notificationLightOff();
     void showScreenPinningRequest(int taskId);
     void showAssistDisclosure();
 
diff --git a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
index 7b7db0e..2dfe20a8 100644
--- a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
+++ b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
@@ -120,40 +120,6 @@
         }
 
         @Override
-        public void buzzBeepBlinked() {
-            if (mBar != null) {
-                try {
-                    mBar.buzzBeepBlinked();
-                } catch (RemoteException ex) {
-                }
-            }
-        }
-
-        @Override
-        public void notificationLightPulse(int argb, int onMillis, int offMillis) {
-            mNotificationLightOn = true;
-            if (mBar != null) {
-                try {
-                    mBar.notificationLightPulse(argb, onMillis, offMillis);
-                } catch (RemoteException ex) {
-                }
-            }
-        }
-
-        @Override
-        public void notificationLightOff() {
-            if (mNotificationLightOn) {
-                mNotificationLightOn = false;
-                if (mBar != null) {
-                    try {
-                        mBar.notificationLightOff();
-                    } catch (RemoteException ex) {
-                    }
-                }
-            }
-        }
-
-        @Override
         public void showScreenPinningRequest(int taskId) {
             if (mBar != null) {
                 try {
diff --git a/services/core/java/com/android/server/tv/TvInputManagerService.java b/services/core/java/com/android/server/tv/TvInputManagerService.java
index 8cc53f0..e026130 100644
--- a/services/core/java/com/android/server/tv/TvInputManagerService.java
+++ b/services/core/java/com/android/server/tv/TvInputManagerService.java
@@ -23,15 +23,12 @@
 import android.app.ActivityManager;
 import android.content.BroadcastReceiver;
 import android.content.ComponentName;
-import android.content.ContentProviderOperation;
-import android.content.ContentProviderResult;
 import android.content.ContentResolver;
 import android.content.ContentUris;
 import android.content.ContentValues;
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
-import android.content.OperationApplicationException;
 import android.content.ServiceConnection;
 import android.content.pm.ActivityInfo;
 import android.content.pm.PackageManager;
@@ -84,12 +81,9 @@
 import com.android.server.IoThread;
 import com.android.server.SystemService;
 
-import org.xmlpull.v1.XmlPullParserException;
-
 import java.io.File;
 import java.io.FileDescriptor;
 import java.io.FileNotFoundException;
-import java.io.IOException;
 import java.io.PrintWriter;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -241,44 +235,6 @@
                 // the update can be handled in {@link #onSomePackagesChanged}.
                 return true;
             }
-
-            @Override
-            public void onPackageRemoved(String packageName, int uid) {
-                synchronized (mLock) {
-                    UserState userState = getOrCreateUserStateLocked(getChangingUserId());
-                    if (!userState.packageSet.contains(packageName)) {
-                        // Not a TV input package.
-                        return;
-                    }
-                }
-
-                ArrayList<ContentProviderOperation> operations = new ArrayList<>();
-
-                String selection = TvContract.BaseTvColumns.COLUMN_PACKAGE_NAME + "=?";
-                String[] selectionArgs = { packageName };
-
-                operations.add(ContentProviderOperation.newDelete(TvContract.Channels.CONTENT_URI)
-                        .withSelection(selection, selectionArgs).build());
-                operations.add(ContentProviderOperation.newDelete(TvContract.Programs.CONTENT_URI)
-                        .withSelection(selection, selectionArgs).build());
-                operations.add(ContentProviderOperation
-                        .newDelete(TvContract.WatchedPrograms.CONTENT_URI)
-                        .withSelection(selection, selectionArgs).build());
-
-                ContentProviderResult[] results = null;
-                try {
-                    ContentResolver cr = getContentResolverForUser(getChangingUserId());
-                    results = cr.applyBatch(TvContract.AUTHORITY, operations);
-                } catch (RemoteException | OperationApplicationException e) {
-                    Slog.e(TAG, "error in applyBatch", e);
-                }
-
-                if (DEBUG) {
-                    Slog.d(TAG, "onPackageRemoved(packageName=" + packageName + ", uid=" + uid
-                            + ")");
-                    Slog.d(TAG, "results=" + results);
-                }
-            }
         };
         monitor.register(mContext, null, UserHandle.ALL, true);
 
diff --git a/services/core/java/com/android/server/updates/TzDataInstallReceiver.java b/services/core/java/com/android/server/updates/TzDataInstallReceiver.java
index b704eb1..3c73c88 100644
--- a/services/core/java/com/android/server/updates/TzDataInstallReceiver.java
+++ b/services/core/java/com/android/server/updates/TzDataInstallReceiver.java
@@ -20,7 +20,7 @@
 
 import java.io.File;
 import java.io.IOException;
-import libcore.tzdata.update2.TimeZoneBundleInstaller;
+import libcore.tzdata.update2.TimeZoneDistroInstaller;
 
 /**
  * An install receiver responsible for installing timezone data updates.
@@ -34,14 +34,14 @@
     private static final String UPDATE_DIR_NAME = TZ_DATA_DIR.getPath() + "/updates/";
     private static final String UPDATE_METADATA_DIR_NAME = "metadata/";
     private static final String UPDATE_VERSION_FILE_NAME = "version";
-    private static final String UPDATE_CONTENT_FILE_NAME = "tzdata_bundle.zip";
+    private static final String UPDATE_CONTENT_FILE_NAME = "tzdata_distro.zip";
 
-    private final TimeZoneBundleInstaller installer;
+    private final TimeZoneDistroInstaller installer;
 
     public TzDataInstallReceiver() {
         super(UPDATE_DIR_NAME, UPDATE_CONTENT_FILE_NAME, UPDATE_METADATA_DIR_NAME,
                 UPDATE_VERSION_FILE_NAME);
-        installer = new TimeZoneBundleInstaller(TAG, SYSTEM_TZ_DATA_FILE, TZ_DATA_DIR);
+        installer = new TimeZoneDistroInstaller(TAG, SYSTEM_TZ_DATA_FILE, TZ_DATA_DIR);
     }
 
     @Override
diff --git a/services/core/java/com/android/server/vr/VrManagerInternal.java b/services/core/java/com/android/server/vr/VrManagerInternal.java
index 0fc1900..45b7baf 100644
--- a/services/core/java/com/android/server/vr/VrManagerInternal.java
+++ b/services/core/java/com/android/server/vr/VrManagerInternal.java
@@ -79,4 +79,13 @@
      *       given in {@link android.service.vr.VrModeException} on failure.
      */
     public abstract int hasVrPackage(@NonNull ComponentName packageName, int userId);
+
+    /**
+     * Sets the persistent VR mode state of a device. When a device is in persistent VR mode it will
+     * remain in VR mode even if the foreground does not specify Vr mode being enabled. Mainly used
+     * by VR viewers to indicate that a device is placed in a VR viewer.
+     *
+     * @param enabled true if the device should be placed in persistent VR mode.
+     */
+    public abstract void setPersistentVrModeEnabled(boolean enabled);
 }
diff --git a/services/core/java/com/android/server/vr/VrManagerService.java b/services/core/java/com/android/server/vr/VrManagerService.java
index e8385fc..f0ea527 100644
--- a/services/core/java/com/android/server/vr/VrManagerService.java
+++ b/services/core/java/com/android/server/vr/VrManagerService.java
@@ -20,18 +20,12 @@
 import android.app.AppOpsManager;
 import android.app.NotificationManager;
 import android.annotation.NonNull;
-import android.content.BroadcastReceiver;
 import android.content.ComponentName;
 import android.content.ContentResolver;
 import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
 import android.content.pm.ApplicationInfo;
-import android.content.pm.FeatureInfo;
-import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
 import android.content.pm.PackageManager.NameNotFoundException;
-import android.hardware.display.DisplayManager;
 import android.os.Binder;
 import android.os.Handler;
 import android.os.IBinder;
@@ -54,7 +48,6 @@
 import android.util.SparseArray;
 
 import com.android.internal.R;
-import com.android.server.LocalServices;
 import com.android.server.SystemConfig;
 import com.android.server.SystemService;
 import com.android.server.utils.ManagedApplicationService.PendingEvent;
@@ -70,8 +63,6 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Date;
-import java.util.List;
-import java.util.Map;
 import java.util.Objects;
 
 /**
@@ -98,8 +89,6 @@
 
     public static final String TAG = "VrManagerService";
 
-    public static final String VR_MANAGER_BINDER_SERVICE = "vrmanager";
-
     private static final int PENDING_STATE_DELAY_MS = 300;
     private static final int EVENT_LOG_SIZE = 32;
     private static final int INVALID_APPOPS_MODE = -1;
@@ -122,8 +111,10 @@
     // State protected by mLock
     private boolean mVrModeAllowed;
     private boolean mVrModeEnabled;
+    private boolean mPersistentVrModeEnabled;
     private EnabledComponentsObserver mComponentObserver;
     private ManagedApplicationService mCurrentVrService;
+    private ComponentName mDefaultVrService;
     private Context mContext;
     private ComponentName mCurrentVrModeComponent;
     private int mCurrentVrModeUser;
@@ -138,7 +129,6 @@
     private final NotificationAccessManager mNotifAccessManager = new NotificationAccessManager();
     /** Tracks the state of the screen and keyguard UI.*/
     private int mSystemSleepFlags = FLAG_NONE;
-    private CompatibilityDisplay mCompatibilityDisplay;
 
     private static final int MSG_VR_STATE_CHANGE = 0;
     private static final int MSG_PENDING_VR_STATE_CHANGE = 1;
@@ -159,6 +149,10 @@
             if (mVrModeAllowed) {
                 consumeAndApplyPendingStateLocked();
             } else {
+                // Disable persistent mode when VR mode isn't allowed, allows an escape hatch to
+                // exit persistent VR mode when screen is turned off.
+                mPersistentVrModeEnabled = false;
+
                 // Set pending state to current state.
                 mPendingState = (mVrModeEnabled && mCurrentVrService != null)
                     ? new VrState(mVrModeEnabled, mCurrentVrService.getComponent(),
@@ -380,15 +374,23 @@
         }
 
         @Override
+        public void setPersistentVrModeEnabled(boolean enabled) {
+            enforceCallerPermission(Manifest.permission.RESTRICTED_VR_ACCESS);
+            VrManagerService.this.setPersistentVrModeEnabled(enabled);
+        }
+
+        @Override
         protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
             if (getContext().checkCallingOrSelfPermission(android.Manifest.permission.DUMP)
                     != PackageManager.PERMISSION_GRANTED) {
-                pw.println("permission denied: can't dump VrManagerService from pid="
+                pw.println("Permission Denial: can't dump VrManagerService from pid="
                         + Binder.getCallingPid() + ", uid=" + Binder.getCallingUid());
                 return;
             }
             pw.println("********* Dump of VrManagerService *********");
             pw.println("VR mode is currently: " + ((mVrModeAllowed) ? "allowed" : "disallowed"));
+            pw.println("Persistent VR mode is currently: " +
+                    ((mPersistentVrModeEnabled) ? "enabled" : "disabled"));
             pw.println("Previous state transitions:\n");
             String tab = "  ";
             dumpStateTransitions(pw);
@@ -464,6 +466,11 @@
         public int hasVrPackage(ComponentName packageName, int userId) {
             return VrManagerService.this.hasVrPackage(packageName, userId);
         }
+
+        @Override
+        public void setPersistentVrModeEnabled(boolean enabled) {
+            VrManagerService.this.setPersistentVrModeEnabled(enabled);
+        }
     }
 
     public VrManagerService(Context context) {
@@ -478,7 +485,7 @@
         }
 
         publishLocalService(VrManagerInternal.class, new LocalService());
-        publishBinderService(VR_MANAGER_BINDER_SERVICE, mVrManager.asBinder());
+        publishBinderService(Context.VR_SERVICE, mVrManager.asBinder());
     }
 
     @Override
@@ -497,10 +504,14 @@
                 mComponentObserver.rebuildAll();
             }
 
-            DisplayManager dm =
-                    (DisplayManager) getContext().getSystemService(Context.DISPLAY_SERVICE);
-            mCompatibilityDisplay = new CompatibilityDisplay(dm, mVrManager);
-            mCompatibilityDisplay.init();
+            //TODO: something more robust than picking the first one
+            ArraySet<ComponentName> defaultVrComponents =
+                    SystemConfig.getInstance().getDefaultVrComponents();
+            if (defaultVrComponents.size() > 0) {
+                mDefaultVrService = defaultVrComponents.valueAt(0);
+            } else {
+                Slog.i(TAG, "No default vr listener service found.");
+            }
         } else if (phase == SystemService.PHASE_THIRD_PARTY_APPS_CAN_START) {
             synchronized (mLock) {
                 mVrModeAllowed = true;
@@ -644,8 +655,8 @@
                 }
             }
 
+            mCurrentVrModeComponent = calling;
             if (calling != null && !Objects.equals(calling, mCurrentVrModeComponent)) {
-                mCurrentVrModeComponent = calling;
                 sendUpdatedCaller = true;
             }
 
@@ -954,7 +965,25 @@
             int userId, @NonNull ComponentName callingPackage) {
 
         synchronized (mLock) {
-            VrState pending = new VrState(enabled, targetPackageName, userId, callingPackage);
+            VrState pending;
+            ComponentName targetListener;
+            ComponentName foregroundVrComponent;
+
+            // If the device is in persistent VR mode, then calls to disable VR mode are ignored,
+            // and the system default VR listener is used.
+            boolean targetEnabledState = enabled || mPersistentVrModeEnabled;
+            if (!enabled && mPersistentVrModeEnabled) {
+                targetListener = mDefaultVrService;
+
+                // Current foreground component isn't a VR one (in 2D app case)
+                foregroundVrComponent = null;
+            } else {
+                targetListener = targetPackageName;
+                foregroundVrComponent = callingPackage;
+            }
+            pending = new VrState(
+                    targetEnabledState, targetListener, userId, foregroundVrComponent);
+
             if (!mVrModeAllowed) {
                 // We're not allowed to be in VR mode.  Make this state pending.  This will be
                 // applied the next time we are allowed to enter VR mode unless it is superseded by
@@ -963,7 +992,7 @@
                 return;
             }
 
-            if (!enabled && mCurrentVrService != null) {
+            if (!targetEnabledState && mCurrentVrService != null) {
                 // If we're transitioning out of VR mode, delay briefly to avoid expensive HAL calls
                 // and service bind/unbind in case we are immediately switching to another VR app.
                 if (mPendingState == null) {
@@ -978,7 +1007,19 @@
                 mPendingState = null;
             }
 
-            updateCurrentVrServiceLocked(enabled, targetPackageName, userId, callingPackage);
+            updateCurrentVrServiceLocked(
+                    targetEnabledState, targetListener, userId, foregroundVrComponent);
+        }
+    }
+
+    private void setPersistentVrModeEnabled(boolean enabled) {
+        synchronized (mLock) {
+            mPersistentVrModeEnabled = enabled;
+
+            // Disabling persistent mode when not showing a VR should disable the overall vr mode.
+            if (!enabled && mCurrentVrModeComponent == null) {
+                setVrMode(false, null, 0, null);
+            }
         }
     }
 
diff --git a/services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl.java b/services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl.java
index fedd55a9..83e77ec 100644
--- a/services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl.java
+++ b/services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl.java
@@ -630,6 +630,10 @@
          */
         public boolean isValidProvider(WebViewProviderInfo configInfo,
                 PackageInfo packageInfo) {
+            // Ensure the provider targets this framework release (or a later one).
+            if (!UserPackage.hasCorrectTargetSdkVersion(packageInfo)) {
+                return false;
+            }
             if (!versionCodeGE(packageInfo.versionCode, getMinimumVersionCode())
                     && !mSystemInterface.systemIsDebuggable()) {
                 // Webview providers may be downgraded arbitrarily low, prevent that by enforcing
diff --git a/services/core/java/com/android/server/wm/AccessibilityController.java b/services/core/java/com/android/server/wm/AccessibilityController.java
index 49ffa22..f7a9e41 100644
--- a/services/core/java/com/android/server/wm/AccessibilityController.java
+++ b/services/core/java/com/android/server/wm/AccessibilityController.java
@@ -369,6 +369,7 @@
                         case WindowManager.LayoutParams.TYPE_SYSTEM_ALERT:
                         case WindowManager.LayoutParams.TYPE_TOAST:
                         case WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY:
+                        case WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY:
                         case WindowManager.LayoutParams.TYPE_PRIORITY_PHONE:
                         case WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG:
                         case WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG:
@@ -687,7 +688,7 @@
                     mSurfaceControl = surfaceControl;
                     mSurfaceControl.setLayerStack(mWindowManager.getDefaultDisplay()
                             .getLayerStack());
-                    mSurfaceControl.setLayer(mWindowManagerService.mPolicy.windowTypeToLayerLw(
+                    mSurfaceControl.setLayer(mWindowManagerService.mPolicy.getWindowLayerFromTypeLw(
                             WindowManager.LayoutParams.TYPE_MAGNIFICATION_OVERLAY)
                             * WindowManagerService.TYPE_LAYER_MULTIPLIER);
                     mSurfaceControl.setPosition(0, 0);
diff --git a/services/core/java/com/android/server/wm/AppTransition.java b/services/core/java/com/android/server/wm/AppTransition.java
index 3eb529b..4eb8e02 100644
--- a/services/core/java/com/android/server/wm/AppTransition.java
+++ b/services/core/java/com/android/server/wm/AppTransition.java
@@ -951,9 +951,9 @@
         float scaleW = appWidth / thumbWidth;
         getNextAppTransitionStartRect(taskId, mTmpRect);
         final float fromX;
-        final float fromY;
+        float fromY;
         final float toX;
-        final float toY;
+        float toY;
         final float pivotX;
         final float pivotY;
         if (shouldScaleDownThumbnailTransition(uiMode, orientation)) {
@@ -966,6 +966,12 @@
             toY = appRect.height() / 2 * (1 - 1 / scaleW) + appRect.top;
             pivotX = mTmpRect.width() / 2;
             pivotY = appRect.height() / 2 / scaleW;
+            if (mGridLayoutRecentsEnabled) {
+                // In the grid layout, the header is displayed above the thumbnail instead of
+                // overlapping it.
+                fromY -= thumbHeightI;
+                toY -= thumbHeightI * scaleW;
+            }
         } else {
             pivotX = 0;
             pivotY = 0;
@@ -1014,7 +1020,10 @@
             // This AnimationSet uses the Interpolators assigned above.
             AnimationSet set = new AnimationSet(false);
             set.addAnimation(scale);
-            set.addAnimation(alpha);
+            if (!mGridLayoutRecentsEnabled) {
+                // In the grid layout, the header should be shown for the whole animation.
+                set.addAnimation(alpha);
+            }
             set.addAnimation(translate);
             set.addAnimation(clipAnim);
             a = set;
@@ -1033,7 +1042,10 @@
             // This AnimationSet uses the Interpolators assigned above.
             AnimationSet set = new AnimationSet(false);
             set.addAnimation(scale);
-            set.addAnimation(alpha);
+            if (!mGridLayoutRecentsEnabled) {
+                // In the grid layout, the header should be shown for the whole animation.
+                set.addAnimation(alpha);
+            }
             set.addAnimation(translate);
             a = set;
 
diff --git a/services/core/java/com/android/server/wm/AppWindowToken.java b/services/core/java/com/android/server/wm/AppWindowToken.java
index d643769..2263042 100644
--- a/services/core/java/com/android/server/wm/AppWindowToken.java
+++ b/services/core/java/com/android/server/wm/AppWindowToken.java
@@ -173,10 +173,9 @@
             boolean showForAllUsers, int targetSdk, int orientation, int rotationAnimationHint,
             int configChanges, boolean launchTaskBehind, boolean alwaysFocusable,
             AppWindowContainerController controller) {
-        this(service, token, voiceInteraction, dc);
+        this(service, token, voiceInteraction, dc, fullscreen);
         setController(controller);
         mInputDispatchingTimeoutNanos = inputDispatchingTimeoutNanos;
-        mFillsParent = fullscreen;
         mShowForAllUsers = showForAllUsers;
         mTargetSdk = targetSdk;
         mOrientation = orientation;
@@ -191,10 +190,12 @@
     }
 
     AppWindowToken(WindowManagerService service, IApplicationToken token, boolean voiceInteraction,
-            DisplayContent dc) {
-        super(service, token != null ? token.asBinder() : null, TYPE_APPLICATION, true, dc);
+            DisplayContent dc, boolean fillsParent) {
+        super(service, token != null ? token.asBinder() : null, TYPE_APPLICATION, true, dc,
+                false /* ownerCanManageAppTokens */);
         appToken = token;
         mVoiceInteraction = voiceInteraction;
+        mFillsParent = fillsParent;
         mInputApplicationHandle = new InputApplicationHandle(this);
         mAppAnimator = new AppWindowAnimator(this, service);
     }
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java
index 679f178..8f38be8 100644
--- a/services/core/java/com/android/server/wm/DisplayContent.java
+++ b/services/core/java/com/android/server/wm/DisplayContent.java
@@ -919,6 +919,10 @@
     void updateDisplayInfo() {
         mDisplay.getDisplayInfo(mDisplayInfo);
         mDisplay.getMetrics(mDisplayMetrics);
+
+        // Check if display metrics changed and update base values if needed.
+        updateBaseDisplayMetricsIfNeeded();
+
         for (int i = mTaskStackContainers.size() - 1; i >= 0; --i) {
             mTaskStackContainers.get(i).updateDisplayInfo(null);
         }
@@ -934,10 +938,8 @@
             }
         }
 
-        mBaseDisplayWidth = mInitialDisplayWidth = mDisplayInfo.logicalWidth;
-        mBaseDisplayHeight = mInitialDisplayHeight = mDisplayInfo.logicalHeight;
-        mBaseDisplayDensity = mInitialDisplayDensity = mDisplayInfo.logicalDensityDpi;
-        mBaseDisplayRect.set(0, 0, mBaseDisplayWidth, mBaseDisplayHeight);
+        updateBaseDisplayMetrics(mDisplayInfo.logicalWidth, mDisplayInfo.logicalHeight,
+                mDisplayInfo.logicalDensityDpi);
     }
 
     void getLogicalDisplayRect(Rect out) {
@@ -967,6 +969,30 @@
         }
     }
 
+    /** If display metrics changed and it's not just a rotation - update base values. */
+    private void updateBaseDisplayMetricsIfNeeded() {
+        final int orientation = mDisplayInfo.rotation;
+        final boolean rotated = (orientation == ROTATION_90 || orientation == ROTATION_270);
+        final int newWidth = rotated ? mDisplayInfo.logicalHeight : mDisplayInfo.logicalWidth;
+        final int newHeight = rotated ? mDisplayInfo.logicalWidth : mDisplayInfo.logicalHeight;
+
+        boolean displayMetricsChanged
+                = mBaseDisplayWidth != newWidth || mBaseDisplayHeight != newHeight;
+        displayMetricsChanged |= mBaseDisplayDensity != mDisplayInfo.logicalDensityDpi;
+
+        if (displayMetricsChanged) {
+            updateBaseDisplayMetrics(newWidth, newHeight, mDisplayInfo.logicalDensityDpi);
+            mService.reconfigureDisplayLocked(this);
+        }
+    }
+
+    void updateBaseDisplayMetrics(int baseWidth, int baseHeight, int baseDensity) {
+        mBaseDisplayWidth = mInitialDisplayWidth = baseWidth;
+        mBaseDisplayHeight = mInitialDisplayHeight = baseHeight;
+        mBaseDisplayDensity = mInitialDisplayDensity = baseDensity;
+        mBaseDisplayRect.set(0, 0, mBaseDisplayWidth, mBaseDisplayHeight);
+    }
+
     void getContentRect(Rect out) {
         out.set(mContentRect);
     }
@@ -1072,19 +1098,25 @@
     }
 
     void setTouchExcludeRegion(Task focusedTask) {
-        mTouchExcludeRegion.set(mBaseDisplayRect);
-        final int delta = dipToPixel(RESIZE_HANDLE_WIDTH_IN_DP, mDisplayMetrics);
-        mTmpRect2.setEmpty();
-        for (int stackNdx = mTaskStackContainers.size() - 1; stackNdx >= 0; --stackNdx) {
-            final TaskStack stack = mTaskStackContainers.get(stackNdx);
-            stack.setTouchExcludeRegion(
-                    focusedTask, delta, mTouchExcludeRegion, mContentRect, mTmpRect2);
-        }
-        // If we removed the focused task above, add it back and only leave its
-        // outside touch area in the exclusion. TapDectector is not interested in
-        // any touch inside the focused task itself.
-        if (!mTmpRect2.isEmpty()) {
-            mTouchExcludeRegion.op(mTmpRect2, Region.Op.UNION);
+        // The provided task is the task on this display with focus, so if WindowManagerService's
+        // focused app is not on this display, focusedTask will be null.
+        if (focusedTask == null) {
+            mTouchExcludeRegion.setEmpty();
+        } else {
+            mTouchExcludeRegion.set(mBaseDisplayRect);
+            final int delta = dipToPixel(RESIZE_HANDLE_WIDTH_IN_DP, mDisplayMetrics);
+            mTmpRect2.setEmpty();
+            for (int stackNdx = mTaskStackContainers.size() - 1; stackNdx >= 0; --stackNdx) {
+                final TaskStack stack = mTaskStackContainers.get(stackNdx);
+                stack.setTouchExcludeRegion(
+                        focusedTask, delta, mTouchExcludeRegion, mContentRect, mTmpRect2);
+            }
+            // If we removed the focused task above, add it back and only leave its
+            // outside touch area in the exclusion. TapDectector is not interested in
+            // any touch inside the focused task itself.
+            if (!mTmpRect2.isEmpty()) {
+                mTouchExcludeRegion.op(mTmpRect2, Region.Op.UNION);
+            }
         }
         final WindowState inputMethod = mService.mInputMethodWindow;
         if (inputMethod != null && inputMethod.isVisibleLw()) {
@@ -2185,7 +2217,7 @@
                     && !mService.mInputMethodTarget.isInMultiWindowMode();
         }
 
-        final int aboveAppLayer = (mService.mPolicy.windowTypeToLayerLw(TYPE_APPLICATION) + 1)
+        final int aboveAppLayer = (mService.mPolicy.getWindowLayerFromTypeLw(TYPE_APPLICATION) + 1)
                 * TYPE_LAYER_MULTIPLIER + TYPE_LAYER_OFFSET;
         final MutableBoolean mutableIncludeFullDisplay = new MutableBoolean(includeFullDisplay);
         synchronized(mService.mWindowMap) {
@@ -2728,8 +2760,10 @@
          */
         private final Comparator<WindowToken> mWindowComparator = (token1, token2) ->
                 // Tokens with higher base layer are z-ordered on-top.
-                mService.mPolicy.windowTypeToLayerLw(token1.windowType)
-                < mService.mPolicy.windowTypeToLayerLw(token2.windowType) ? -1 : 1;
+                mService.mPolicy.getWindowLayerFromTypeLw(token1.windowType,
+                        token1.mOwnerCanManageAppTokens)
+                < mService.mPolicy.getWindowLayerFromTypeLw(token2.windowType,
+                        token2.mOwnerCanManageAppTokens) ? -1 : 1;
 
         private final Predicate<WindowState> mGetOrientingWindow = w -> {
             if (!w.isVisibleLw() || !w.mPolicyVisibilityAfterAnim) {
diff --git a/services/core/java/com/android/server/wm/DockedStackDividerController.java b/services/core/java/com/android/server/wm/DockedStackDividerController.java
index 5a2ee9a..75a79fd 100644
--- a/services/core/java/com/android/server/wm/DockedStackDividerController.java
+++ b/services/core/java/com/android/server/wm/DockedStackDividerController.java
@@ -152,11 +152,6 @@
     int getSmallestWidthDpForBounds(Rect bounds) {
         final DisplayInfo di = mDisplayContent.getDisplayInfo();
 
-        // If the bounds are fullscreen, return the value of the fullscreen configuration
-        if (bounds == null || (bounds.left == 0 && bounds.top == 0
-                && bounds.right == di.logicalWidth && bounds.bottom == di.logicalHeight)) {
-            return mDisplayContent.getConfiguration().smallestScreenWidthDp;
-        }
         final int baseDisplayWidth = mDisplayContent.mBaseDisplayWidth;
         final int baseDisplayHeight = mDisplayContent.mBaseDisplayHeight;
         int minWidth = Integer.MAX_VALUE;
@@ -185,7 +180,7 @@
                     mTmpRect2.width(), mTmpRect2.height(), getContentWidth());
             mService.mPolicy.getStableInsetsLw(rotation, mTmpRect2.width(), mTmpRect2.height(),
                     mTmpRect3);
-            mService.subtractInsets(mTmpRect2, mTmpRect3, mTmpRect);
+            mService.intersectDisplayInsetBounds(mTmpRect2, mTmpRect3, mTmpRect);
             minWidth = Math.min(mTmpRect.width(), minWidth);
         }
         return (int) (minWidth / mDisplayContent.getDisplayMetrics().density);
@@ -621,11 +616,7 @@
         final boolean homeVisible = homeTask.getTopVisibleAppToken() != null;
         final boolean homeBehind = (fullscreenStack != null && fullscreenStack.isVisible())
                 || (homeStack.hasMultipleTaskWithHomeTaskNotTop());
-        // If the home task is an on-top launcher, we don't want to minimize the docked stack.
-        // Instead we want everything underneath that was visible to remain visible.
-        // See android.R.attr#onTopLauncher.
-        final boolean isOnTopLauncher = homeStack.topTaskIsOnTopLauncher();
-        setMinimizedDockedStack(homeVisible && !homeBehind && !isOnTopLauncher, animate);
+        setMinimizedDockedStack(homeVisible && !homeBehind, animate);
     }
 
     private boolean isWithinDisplay(Task task) {
diff --git a/services/core/java/com/android/server/wm/DragState.java b/services/core/java/com/android/server/wm/DragState.java
index 1ae987f..3fdafc7 100644
--- a/services/core/java/com/android/server/wm/DragState.java
+++ b/services/core/java/com/android/server/wm/DragState.java
@@ -239,7 +239,7 @@
     }
 
     int getDragLayerLw() {
-        return mService.mPolicy.windowTypeToLayerLw(WindowManager.LayoutParams.TYPE_DRAG)
+        return mService.mPolicy.getWindowLayerFromTypeLw(WindowManager.LayoutParams.TYPE_DRAG)
                 * WindowManagerService.TYPE_LAYER_MULTIPLIER
                 + WindowManagerService.TYPE_LAYER_OFFSET;
     }
diff --git a/services/core/java/com/android/server/wm/InputConsumerImpl.java b/services/core/java/com/android/server/wm/InputConsumerImpl.java
index b92bfb9..36753b7 100644
--- a/services/core/java/com/android/server/wm/InputConsumerImpl.java
+++ b/services/core/java/com/android/server/wm/InputConsumerImpl.java
@@ -77,7 +77,7 @@
     }
 
     private int getLayerLw(int windowType) {
-        return mService.mPolicy.windowTypeToLayerLw(windowType)
+        return mService.mPolicy.getWindowLayerFromTypeLw(windowType)
                 * WindowManagerService.TYPE_LAYER_MULTIPLIER
                 + WindowManagerService.TYPE_LAYER_OFFSET;
     }
diff --git a/services/core/java/com/android/server/wm/InputMonitor.java b/services/core/java/com/android/server/wm/InputMonitor.java
index 5f53d84..37b8deb 100644
--- a/services/core/java/com/android/server/wm/InputMonitor.java
+++ b/services/core/java/com/android/server/wm/InputMonitor.java
@@ -24,6 +24,7 @@
 import static android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
 import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS;
 import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_KEYGUARD;
+import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
 import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER;
 import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_DRAG;
 import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_FOCUS_LIGHT;
@@ -237,8 +238,8 @@
                 // Figure out whether this window is layered above system windows.
                 // We need to do this here to help the activity manager know how to
                 // layer its ANR dialog.
-                int systemAlertLayer = mService.mPolicy.windowTypeToLayerLw(
-                        WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
+                int systemAlertLayer = mService.mPolicy.getWindowLayerFromTypeLw(
+                        TYPE_APPLICATION_OVERLAY, windowState.mOwnerCanAddInternalSystemWindow);
                 aboveSystem = windowState.mBaseLayer > systemAlertLayer;
             } else if (appWindowToken != null) {
                 Slog.i(TAG_WM, "Input event dispatching timed out "
@@ -471,7 +472,7 @@
     /* Callback to get pointer layer. */
     @Override
     public int getPointerLayer() {
-        return mService.mPolicy.windowTypeToLayerLw(WindowManager.LayoutParams.TYPE_POINTER)
+        return mService.mPolicy.getWindowLayerFromTypeLw(WindowManager.LayoutParams.TYPE_POINTER)
                 * WindowManagerService.TYPE_LAYER_MULTIPLIER
                 + WindowManagerService.TYPE_LAYER_OFFSET;
     }
diff --git a/services/core/java/com/android/server/wm/PinnedStackController.java b/services/core/java/com/android/server/wm/PinnedStackController.java
index 596c3d8..6a8417dc 100644
--- a/services/core/java/com/android/server/wm/PinnedStackController.java
+++ b/services/core/java/com/android/server/wm/PinnedStackController.java
@@ -22,7 +22,6 @@
 import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME;
 import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
 
-import android.animation.ValueAnimator;
 import android.app.RemoteAction;
 import android.content.pm.ParceledListSlice;
 import android.content.res.Resources;
@@ -42,7 +41,6 @@
 import android.view.IPinnedStackController;
 import android.view.IPinnedStackListener;
 
-import com.android.internal.policy.PipMotionHelper;
 import com.android.internal.policy.PipSnapAlgorithm;
 import com.android.server.UiThread;
 
@@ -51,7 +49,20 @@
 import java.util.List;
 
 /**
- * Holds the common state of the pinned stack between the system and SystemUI.
+ * Holds the common state of the pinned stack between the system and SystemUI. If SystemUI ever
+ * needs to be restarted, it will be notified with the last known state.
+ *
+ * Changes to the pinned stack also flow through this controller, and generally, the system only
+ * changes the pinned stack bounds through this controller in two ways:
+ *
+ * 1) When first entering PiP: the controller returns the valid bounds given, taking aspect ratio
+ *    and IME state into account.
+ * 2) When rotating the device: the controller calculates the new bounds in the new orientation,
+ *    taking the minimized and IME state into account. In this case, we currently ignore the
+ *    SystemUI adjustments (ie. expanded for menu, interaction, etc).
+ *
+ * Other changes in the system, including adjustment of IME, configuration change, and more are
+ * handled by SystemUI (similar to the docked stack divider).
  */
 class PinnedStackController {
 
@@ -67,18 +78,15 @@
 
     private final PinnedStackControllerCallback mCallbacks = new PinnedStackControllerCallback();
     private final PipSnapAlgorithm mSnapAlgorithm;
-    private final PipMotionHelper mMotionHelper;
 
     // States that affect how the PIP can be manipulated
-    private boolean mInInteractiveMode;
     private boolean mIsMinimized;
-    private boolean mIsSnappingToEdge;
     private boolean mIsImeShowing;
     private int mImeHeight;
-    private ValueAnimator mBoundsAnimator = null;
 
-    // The set of actions that are currently allowed on the PiP activity
+    // The set of actions and aspect-ratio for the that are currently allowed on the PiP activity
     private ArrayList<RemoteAction> mActions = new ArrayList<>();
+    private float mAspectRatio = -1f;
 
     // Used to calculate stack bounds across rotations
     private final DisplayInfo mDisplayInfo = new DisplayInfo();
@@ -89,10 +97,15 @@
     private Size mDefaultStackSize;
     private Point mScreenEdgeInsets;
 
+    // The aspect ratio bounds of the PIP.
+    private float mMinAspectRatio;
+    private float mMaxAspectRatio;
+
     // Temp vars for calculation
     private final DisplayMetrics mTmpMetrics = new DisplayMetrics();
     private final Rect mTmpInsets = new Rect();
     private final Rect mTmpRect = new Rect();
+    private final Point mTmpDisplaySize = new Point();
 
     /**
      * The callback object passed to listeners for them to notify the controller of state changes.
@@ -100,31 +113,12 @@
     private class PinnedStackControllerCallback extends IPinnedStackController.Stub {
 
         @Override
-        public void setInInteractiveMode(final boolean inInteractiveMode) {
-            mHandler.post(() -> {
-                // Cancel any existing animations on the PIP once the user starts dragging it
-                if (mBoundsAnimator != null && inInteractiveMode) {
-                    mBoundsAnimator.cancel();
-                }
-                mInInteractiveMode = inInteractiveMode;
-            });
-        }
-
-        @Override
         public void setIsMinimized(final boolean isMinimized) {
             mHandler.post(() -> {
                 mIsMinimized = isMinimized;
                 mSnapAlgorithm.setMinimized(isMinimized);
             });
         }
-
-        @Override
-        public void setSnapToEdge(final boolean snapToEdge) {
-            mHandler.post(() -> {
-                mIsSnappingToEdge = snapToEdge;
-                mSnapAlgorithm.setSnapToEdge(snapToEdge);
-            });
-        }
     }
 
     /**
@@ -135,7 +129,6 @@
         @Override
         public void binderDied() {
             // Clean up the state if the listener dies
-            mInInteractiveMode = false;
             mPinnedStackListener = null;
         }
     }
@@ -144,13 +137,13 @@
         mService = service;
         mDisplayContent = displayContent;
         mSnapAlgorithm = new PipSnapAlgorithm(service.mContext);
-        mMotionHelper = new PipMotionHelper(UiThread.getHandler());
         mDisplayInfo.copyFrom(mDisplayContent.getDisplayInfo());
         reloadResources();
     }
 
     void onConfigurationChanged() {
         reloadResources();
+        notifyMovementBoundsChanged(false /* fromImeAdjustment */);
     }
 
     /**
@@ -169,6 +162,10 @@
                 dpToPx(defaultSizeDp.getHeight(), mTmpMetrics));
         mScreenEdgeInsets = new Point(dpToPx(screenEdgeInsetsDp.getWidth(), mTmpMetrics),
                 dpToPx(screenEdgeInsetsDp.getHeight(), mTmpMetrics));
+        mMinAspectRatio = res.getFloat(
+                com.android.internal.R.dimen.config_pictureInPictureMinAspectRatio);
+        mMaxAspectRatio = res.getFloat(
+                com.android.internal.R.dimen.config_pictureInPictureMaxAspectRatio);
     }
 
     /**
@@ -179,20 +176,29 @@
             listener.asBinder().linkToDeath(mPinnedStackListenerDeathHandler, 0);
             listener.onListenerRegistered(mCallbacks);
             mPinnedStackListener = listener;
-            notifyBoundsChanged(mIsImeShowing);
-            notifyMinimizeChanged(mIsMinimized);
-            notifySnapToEdgeChanged(mIsSnappingToEdge);
+            notifyImeVisibilityChanged(mIsImeShowing, mImeHeight);
+            // The movement bounds notification needs to be sent before the minimized state, since
+            // SystemUI may use the bounds to retore the minimized position
+            notifyMovementBoundsChanged(false /* fromImeAdjustment */);
             notifyActionsChanged(mActions);
+            notifyMinimizeChanged(mIsMinimized);
         } catch (RemoteException e) {
             Log.e(TAG, "Failed to register pinned stack listener", e);
         }
     }
 
     /**
+     * @return whether the given {@param aspectRatio} is valid.
+     */
+    public boolean isValidPictureInPictureAspectRatio(float aspectRatio) {
+        return mMinAspectRatio <= aspectRatio && aspectRatio <= mMaxAspectRatio;
+    }
+
+    /**
      * Returns the current bounds (or the default bounds if there are no current bounds) with the
      * specified aspect ratio.
      */
-    Rect getAspectRatioBounds(Rect stackBounds, float aspectRatio) {
+    Rect transformBoundsToAspectRatio(Rect stackBounds, float aspectRatio) {
         // Save the snap fraction, calculate the aspect ratio based on the current bounds
         final float snapFraction = mSnapAlgorithm.getSnapFraction(stackBounds,
                 getMovementBounds(stackBounds));
@@ -204,6 +210,9 @@
         final int top = (int) (stackBounds.centerY() - height / 2f);
         stackBounds.set(left, top, left + width, top + height);
         mSnapAlgorithm.applySnapFraction(stackBounds, getMovementBounds(stackBounds), snapFraction);
+        if (mIsMinimized) {
+            applyMinimizedOffset(stackBounds, getMovementBounds(stackBounds));
+        }
         return stackBounds;
     }
 
@@ -236,27 +245,20 @@
         final Rect movementBounds = new Rect();
         getInsetBounds(movementBounds);
 
-        // Adjust the right/bottom to ensure the stack bounds never goes offscreen
-        movementBounds.right = Math.max(movementBounds.left, movementBounds.right -
-                stackBounds.width());
-        movementBounds.bottom = Math.max(movementBounds.top, movementBounds.bottom -
-                stackBounds.height());
-
         // Apply the movement bounds adjustments based on the current state
-        if (adjustForIme) {
-            if (mIsImeShowing) {
-                movementBounds.bottom -= mImeHeight;
-            }
-        }
+        mSnapAlgorithm.getMovementBounds(stackBounds, movementBounds, movementBounds,
+                (adjustForIme && mIsImeShowing) ? mImeHeight : 0);
         return movementBounds;
     }
 
     /**
+     * @param preChangeTargetBounds The final bounds of the stack if it is currently animating
      * @return the repositioned PIP bounds given it's pre-change bounds, and the new display
      *         content.
      */
-    Rect onDisplayChanged(Rect preChangeStackBounds, DisplayContent displayContent) {
-        final Rect postChangeStackBounds = new Rect(preChangeStackBounds);
+    Rect onDisplayChanged(Rect preChangeStackBounds, Rect preChangeTargetBounds,
+            DisplayContent displayContent) {
+        final Rect postChangeStackBounds = new Rect(preChangeTargetBounds);
         final DisplayInfo displayInfo = displayContent.getDisplayInfo();
         if (!mDisplayInfo.equals(displayInfo)) {
             // Calculate the snap fraction of the current stack along the old movement bounds, and
@@ -271,12 +273,9 @@
             mSnapAlgorithm.applySnapFraction(postChangeStackBounds, postChangeMovementBounds,
                     snapFraction);
             if (mIsMinimized) {
-                final Point displaySize = new Point(mDisplayInfo.logicalWidth,
-                        mDisplayInfo.logicalHeight);
-                mService.getStableInsetsLocked(displayContent.getDisplayId(), mStableInsets);
-                mSnapAlgorithm.applyMinimizedOffset(postChangeStackBounds, postChangeMovementBounds,
-                        displaySize, mStableInsets);
+                applyMinimizedOffset(postChangeStackBounds, postChangeMovementBounds);
             }
+            notifyMovementBoundsChanged(false /* fromImeAdjustment */);
         }
         return postChangeStackBounds;
     }
@@ -290,42 +289,19 @@
             return;
         }
 
-        final Rect stackBounds = new Rect();
-        mService.getStackBounds(PINNED_STACK_ID, stackBounds);
-        final Rect prevMovementBounds = getMovementBounds(stackBounds);
         mIsImeShowing = adjustedForIme;
         mImeHeight = imeHeight;
-        if (mInInteractiveMode) {
-            // If the user is currently interacting with the PIP and the ime state changes, then
-            // don't adjust the bounds and defer that to after the interaction
-            notifyBoundsChanged(adjustedForIme /* adjustedForIme */);
-        } else {
-            // Otherwise, we can move the PIP to a sane location to ensure that it does not block
-            // the user from interacting with the IME
-            final Rect movementBounds = getMovementBounds(stackBounds);
-            final Rect toBounds = new Rect(stackBounds);
-            if (adjustedForIme) {
-                // IME visible
-                if (stackBounds.top == prevMovementBounds.bottom) {
-                    // If the PIP is resting on top of the IME, then adjust it with the hiding IME
-                    toBounds.offsetTo(toBounds.left, movementBounds.bottom);
-                } else {
-                    toBounds.offset(0, Math.min(0, movementBounds.bottom - stackBounds.top));
-                }
-            } else {
-                // IME hidden
-                if (stackBounds.top == prevMovementBounds.bottom) {
-                    // If the PIP is resting on top of the IME, then adjust it with the hiding IME
-                    toBounds.offsetTo(toBounds.left, movementBounds.bottom);
-                }
-            }
-            if (!toBounds.equals(stackBounds)) {
-                if (mBoundsAnimator != null) {
-                    mBoundsAnimator.cancel();
-                }
-                mBoundsAnimator = mMotionHelper.createAnimationToBounds(stackBounds, toBounds);
-                mBoundsAnimator.start();
-            }
+        notifyImeVisibilityChanged(adjustedForIme, imeHeight);
+        notifyMovementBoundsChanged(true /* fromImeAdjustment */);
+    }
+
+    /**
+     * Sets the current aspect ratio.
+     */
+    void setAspectRatio(float aspectRatio) {
+        if (Float.compare(mAspectRatio, aspectRatio) != 0) {
+            mAspectRatio = aspectRatio;
+            notifyMovementBoundsChanged(false /* fromImeAdjustment */);
         }
     }
 
@@ -341,12 +317,12 @@
     }
 
     /**
-     * Notifies listeners that the PIP movement bounds have changed.
+     * Notifies listeners that the PIP needs to be adjusted for the IME.
      */
-    private void notifyBoundsChanged(boolean adjustedForIme) {
+    private void notifyImeVisibilityChanged(boolean imeVisible, int imeHeight) {
         if (mPinnedStackListener != null) {
             try {
-                mPinnedStackListener.onBoundsChanged(adjustedForIme);
+                mPinnedStackListener.onImeVisibilityChanged(imeVisible, imeHeight);
             } catch (RemoteException e) {
                 Slog.e(TAG_WM, "Error delivering bounds changed event.", e);
             }
@@ -367,19 +343,6 @@
     }
 
     /**
-     * Notifies listeners that the PIP snap-to-edge state has changed.
-     */
-    private void notifySnapToEdgeChanged(boolean isSnappingToEdge) {
-        if (mPinnedStackListener != null) {
-            try {
-                mPinnedStackListener.onSnapToEdgeStateChanged(isSnappingToEdge);
-            } catch (RemoteException e) {
-                Slog.e(TAG_WM, "Error delivering snap-to-edge changed event.", e);
-            }
-        }
-    }
-
-    /**
      * Notifies listeners that the PIP actions have changed.
      */
     private void notifyActionsChanged(List<RemoteAction> actions) {
@@ -393,6 +356,26 @@
     }
 
     /**
+     * Notifies listeners that the PIP movement bounds have changed.
+     */
+    private void notifyMovementBoundsChanged(boolean fromImeAdjustement) {
+        if (mPinnedStackListener != null) {
+            try {
+                Rect insetBounds = new Rect();
+                getInsetBounds(insetBounds);
+                Rect normalBounds = getDefaultBounds();
+                if (isValidPictureInPictureAspectRatio(mAspectRatio)) {
+                    transformBoundsToAspectRatio(normalBounds, mAspectRatio);
+                }
+                mPinnedStackListener.onMovementBoundsChanged(insetBounds, normalBounds,
+                        fromImeAdjustement);
+            } catch (RemoteException e) {
+                Slog.e(TAG_WM, "Error delivering actions changed event.", e);
+            }
+        }
+    }
+
+    /**
      * @return the bounds on the screen that the PIP can be visible in.
      */
     private void getInsetBounds(Rect outRect) {
@@ -404,6 +387,16 @@
     }
 
     /**
+     * Applies the minimized offsets to the given stack bounds.
+     */
+    private void applyMinimizedOffset(Rect stackBounds, Rect movementBounds) {
+        mTmpDisplaySize.set(mDisplayInfo.logicalWidth, mDisplayInfo.logicalHeight);
+        mService.getStableInsetsLocked(mDisplayContent.getDisplayId(), mStableInsets);
+        mSnapAlgorithm.applyMinimizedOffset(stackBounds, movementBounds, mTmpDisplaySize,
+                mStableInsets);
+    }
+
+    /**
      * @return the pixels for a given dp value.
      */
     private int dpToPx(float dpValue, DisplayMetrics dm) {
@@ -418,7 +411,6 @@
         pw.print(prefix + "  movementBounds="); getMovementBounds(mTmpRect).printShortString(pw);
         pw.println();
         pw.println(prefix + "  mIsImeShowing=" + mIsImeShowing);
-        pw.println(prefix + "  mInInteractiveMode=" + mInInteractiveMode);
         pw.println(prefix + "  mIsMinimized=" + mIsMinimized);
         if (mActions.isEmpty()) {
             pw.println(prefix + "  mActions=[]");
diff --git a/services/core/java/com/android/server/wm/RootWindowContainer.java b/services/core/java/com/android/server/wm/RootWindowContainer.java
index 80e6655..126e080 100644
--- a/services/core/java/com/android/server/wm/RootWindowContainer.java
+++ b/services/core/java/com/android/server/wm/RootWindowContainer.java
@@ -784,7 +784,7 @@
         if (updateInputWindowsNeeded) {
             mService.mInputMonitor.updateInputWindowsLw(false /*force*/);
         }
-        mService.setFocusTaskRegionLocked();
+        mService.setFocusTaskRegionLocked(null);
 
         // Check to see if we are now in a state where the screen should
         // be enabled, because the window obscured flags have changed.
diff --git a/services/core/java/com/android/server/wm/Session.java b/services/core/java/com/android/server/wm/Session.java
index ead70e1..782f9f2 100644
--- a/services/core/java/com/android/server/wm/Session.java
+++ b/services/core/java/com/android/server/wm/Session.java
@@ -16,6 +16,7 @@
 
 package com.android.server.wm;
 
+import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
 import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_DRAG;
 import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_TASK_POSITIONING;
 import static com.android.server.wm.WindowManagerDebugConfig.SHOW_LIGHT_TRANSACTIONS;
@@ -69,6 +70,7 @@
     private final String mStringName;
     SurfaceSession mSurfaceSession;
     private int mNumWindow = 0;
+    private int mNumOverlayWindow = 0;
     private boolean mClientDead = false;
     private float mLastReportedAnimatorScale;
 
@@ -542,7 +544,7 @@
         }
     }
 
-    void windowAddedLocked() {
+    void windowAddedLocked(int type) {
         if (mSurfaceSession == null) {
             if (WindowManagerService.localLOGV) Slog.v(
                 TAG_WM, "First window added to " + this + ", creating SurfaceSession");
@@ -555,36 +557,56 @@
             }
         }
         mNumWindow++;
+        if (type == TYPE_APPLICATION_OVERLAY) {
+            mNumOverlayWindow++;
+            setHasOverlayUi(true);
+        }
     }
 
-    void windowRemovedLocked() {
+    void windowRemovedLocked(int type) {
         mNumWindow--;
+        if (type == TYPE_APPLICATION_OVERLAY) {
+            mNumOverlayWindow--;
+            if (mNumOverlayWindow == 0) {
+                setHasOverlayUi(false);
+            } else if (mNumOverlayWindow < 0) {
+                throw new IllegalStateException("mNumOverlayWindow=" + mNumOverlayWindow
+                        + " less than 0 for session=" + this);
+            }
+        }
         killSessionLocked();
     }
 
-    void killSessionLocked() {
-        if (mNumWindow <= 0 && mClientDead) {
-            mService.mSessions.remove(this);
-            if (mSurfaceSession != null) {
-                if (WindowManagerService.localLOGV) Slog.v(
-                    TAG_WM, "Last window removed from " + this
-                    + ", destroying " + mSurfaceSession);
-                if (SHOW_TRANSACTIONS) Slog.i(
-                        TAG_WM, "  KILL SURFACE SESSION " + mSurfaceSession);
-                try {
-                    mSurfaceSession.kill();
-                } catch (Exception e) {
-                    Slog.w(TAG_WM, "Exception thrown when killing surface session "
-                        + mSurfaceSession + " in session " + this
-                        + ": " + e.toString());
-                }
-                mSurfaceSession = null;
-            }
+    private void killSessionLocked() {
+        if (mNumWindow > 0 || !mClientDead) {
+            return;
         }
+
+        mService.mSessions.remove(this);
+        if (mSurfaceSession == null) {
+            return;
+        }
+
+        if (WindowManagerService.localLOGV) Slog.v(TAG_WM, "Last window removed from " + this
+                + ", destroying " + mSurfaceSession);
+        if (SHOW_TRANSACTIONS) Slog.i(TAG_WM, "  KILL SURFACE SESSION " + mSurfaceSession);
+        try {
+            mSurfaceSession.kill();
+        } catch (Exception e) {
+            Slog.w(TAG_WM, "Exception thrown when killing surface session " + mSurfaceSession
+                    + " in session " + this + ": " + e.toString());
+        }
+        mSurfaceSession = null;
+        setHasOverlayUi(false);
+    }
+
+    private void setHasOverlayUi(boolean hasOverlayUi) {
+        mService.mH.obtainMessage(H.SET_HAS_OVERLAY_UI, mPid, hasOverlayUi ? 1 : 0).sendToTarget();
     }
 
     void dump(PrintWriter pw, String prefix) {
         pw.print(prefix); pw.print("mNumWindow="); pw.print(mNumWindow);
+                pw.print(" mNumOverlayWindow="); pw.print(mNumOverlayWindow);
                 pw.print(" mClientDead="); pw.print(mClientDead);
                 pw.print(" mSurfaceSession="); pw.println(mSurfaceSession);
     }
diff --git a/services/core/java/com/android/server/wm/StackWindowController.java b/services/core/java/com/android/server/wm/StackWindowController.java
index e2ea2c5..142f69a 100644
--- a/services/core/java/com/android/server/wm/StackWindowController.java
+++ b/services/core/java/com/android/server/wm/StackWindowController.java
@@ -16,6 +16,9 @@
 
 package com.android.server.wm;
 
+import static android.app.ActivityManager.StackId.DOCKED_STACK_ID;
+
+import android.app.ActivityManager.StackId;
 import android.app.RemoteAction;
 import android.content.res.Configuration;
 import android.graphics.Rect;
@@ -24,6 +27,8 @@
 import android.os.Message;
 import android.util.Slog;
 import android.util.SparseArray;
+import android.view.DisplayInfo;
+
 import com.android.server.UiThread;
 import com.android.internal.annotations.VisibleForTesting;
 
@@ -48,6 +53,12 @@
 
     private final H mHandler;
 
+    // Temp bounds only used in adjustConfigurationForBounds()
+    private final Rect mTmpRect = new Rect();
+    private final Rect mTmpStableInsets = new Rect();
+    private final Rect mTmpNonDecorInsets = new Rect();
+    private final Rect mTmpDisplayBounds = new Rect();
+
     public StackWindowController(int stackId, StackWindowListener listener,
             int displayId, boolean onTop, Rect outBounds) {
         this(stackId, listener, displayId, onTop, outBounds, WindowManagerService.getInstance());
@@ -216,7 +227,28 @@
 
             final int displayId = mContainer.getDisplayContent().getDisplayId();
             final Rect toBounds = mService.getPictureInPictureBounds(displayId, aspectRatio);
-            animateResizePinnedStack(toBounds, -1 /* duration */);
+            final Rect targetBounds = new Rect();
+            mContainer.getAnimatingBounds(targetBounds);
+            if (!toBounds.equals(targetBounds)) {
+                animateResizePinnedStack(toBounds, -1 /* duration */);
+            }
+
+            final PinnedStackController pinnedStackController =
+                    mContainer.getDisplayContent().getPinnedStackController();
+            pinnedStackController.setAspectRatio(
+                    pinnedStackController.isValidPictureInPictureAspectRatio(aspectRatio)
+                            ? aspectRatio : -1f);
+        }
+    }
+
+    /** Sets the current picture-in-picture actions. */
+    public void setPictureInPictureActions(List<RemoteAction> actions) {
+        synchronized (mWindowMap) {
+            if (!mService.mSupportsPictureInPicture || mContainer == null) {
+                return;
+            }
+
+            mContainer.getDisplayContent().getPinnedStackController().setActions(actions);
         }
     }
 
@@ -244,17 +276,6 @@
         }
     }
 
-    /** Sets the current picture-in-picture actions. */
-    public void setPictureInPictureActions(List<RemoteAction> actions) {
-        synchronized (mWindowMap) {
-            if (!mService.mSupportsPictureInPicture || mContainer == null) {
-                return;
-            }
-
-            mContainer.getDisplayContent().getPinnedStackController().setActions(actions);
-        }
-    }
-
     private void getRawBounds(Rect outBounds) {
         if (mContainer.getRawFullscreen()) {
             outBounds.setEmpty();
@@ -279,6 +300,107 @@
         }
     }
 
+    /**
+     * Adjusts the screen size in dp's for the {@param config} for the given params.
+     */
+    public void adjustConfigurationForBounds(Rect bounds, Rect insetBounds,
+            Rect nonDecorBounds, Rect stableBounds, boolean overrideWidth,
+            boolean overrideHeight, float density, Configuration config,
+            Configuration parentConfig) {
+        synchronized (mWindowMap) {
+            final TaskStack stack = mContainer;
+            final DisplayContent displayContent = stack.getDisplayContent();
+            final DisplayInfo di = displayContent.getDisplayInfo();
+
+            // Get the insets and display bounds
+            mService.mPolicy.getStableInsetsLw(di.rotation, di.logicalWidth, di.logicalHeight,
+                    mTmpStableInsets);
+            mService.mPolicy.getNonDecorInsetsLw(di.rotation, di.logicalWidth, di.logicalHeight,
+                    mTmpNonDecorInsets);
+            mTmpDisplayBounds.set(0, 0, di.logicalWidth, di.logicalHeight);
+
+            int width;
+            int height;
+            if (StackId.tasksAreFloating(mStackId)) {
+                // Floating tasks should not be resized to the screen's bounds.
+
+                if (bounds.width() == mTmpDisplayBounds.width() &&
+                        bounds.height() == mTmpDisplayBounds.height()) {
+                    // If the bounds we are animating is the same as the fullscreen stack
+                    // dimensions, then apply the same inset calculations that we normally do for
+                    // the fullscreen stack, without intersecting it with the display bounds
+                    stableBounds.inset(mTmpStableInsets);
+                    nonDecorBounds.inset(mTmpNonDecorInsets);
+                }
+                width = (int) (stableBounds.width() / density);
+                height = (int) (stableBounds.height() / density);
+            } else {
+                // For calculating screenWidthDp, screenWidthDp, we use the stable inset screen
+                // area, i.e. the screen area without the system bars.
+                // Additionally task dimensions should not be bigger than its parents dimensions.
+                // The non decor inset are areas that could never be removed in Honeycomb. See
+                // {@link WindowManagerPolicy#getNonDecorInsetsLw}.
+                intersectDisplayBoundsExcludeInsets(nonDecorBounds,
+                        insetBounds != null ? insetBounds : bounds, mTmpNonDecorInsets,
+                        mTmpDisplayBounds, overrideWidth, overrideHeight);
+                intersectDisplayBoundsExcludeInsets(stableBounds,
+                        insetBounds != null ? insetBounds : bounds, mTmpStableInsets,
+                        mTmpDisplayBounds, overrideWidth, overrideHeight);
+                width = Math.min((int) (stableBounds.width() / density),
+                        parentConfig.screenWidthDp);
+                height = Math.min((int) (stableBounds.height() / density),
+                        parentConfig.screenHeightDp);
+            }
+
+            config.screenWidthDp = width;
+            config.screenHeightDp = height;
+            config.smallestScreenWidthDp = getSmallestWidthForTaskBounds(
+                    insetBounds != null ? insetBounds : bounds, density);
+        }
+    }
+
+    /**
+     * Intersects the specified {@code inOutBounds} with the display frame that excludes the stable
+     * inset areas.
+     *
+     * @param inOutBounds The inOutBounds to subtract the stable inset areas from.
+     */
+    private void intersectDisplayBoundsExcludeInsets(Rect inOutBounds, Rect inInsetBounds,
+            Rect stableInsets, Rect displayBounds, boolean overrideWidth, boolean overrideHeight) {
+        mTmpRect.set(inInsetBounds);
+        mService.intersectDisplayInsetBounds(displayBounds, stableInsets, mTmpRect);
+        int leftInset = mTmpRect.left - inInsetBounds.left;
+        int topInset = mTmpRect.top - inInsetBounds.top;
+        int rightInset = overrideWidth ? 0 : inInsetBounds.right - mTmpRect.right;
+        int bottomInset = overrideHeight ? 0 : inInsetBounds.bottom - mTmpRect.bottom;
+        inOutBounds.inset(leftInset, topInset, rightInset, bottomInset);
+    }
+
+    /**
+     * Calculates the smallest width for a task given the {@param bounds}.
+     *
+     * @return the smallest width to be used in the Configuration, in dips
+     */
+    private int getSmallestWidthForTaskBounds(Rect bounds, float density) {
+        final DisplayContent displayContent = mContainer.getDisplayContent();
+        final DisplayInfo displayInfo = displayContent.getDisplayInfo();
+
+        if (bounds == null || (bounds.width() == displayInfo.logicalWidth &&
+                bounds.height() == displayInfo.logicalHeight)) {
+            // If the bounds are fullscreen, return the value of the fullscreen configuration
+            return displayContent.getConfiguration().smallestScreenWidthDp;
+        } else if (StackId.tasksAreFloating(mStackId)) {
+            // For floating tasks, calculate the smallest width from the bounds of the task
+            return (int) (Math.min(bounds.width(), bounds.height()) / density);
+        } else {
+            // Iterating across all screen orientations, and return the minimum of the task
+            // width taking into account that the bounds might change because the snap algorithm
+            // snaps to a different value
+            return displayContent.getDockedDividerController()
+                    .getSmallestWidthDpForBounds(bounds);
+        }
+    }
+
     void requestResize(Rect bounds) {
         mHandler.obtainMessage(H.REQUEST_RESIZE, bounds).sendToTarget();
     }
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index d96e1ef..ab9a378 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -91,20 +91,16 @@
 
     private boolean mHomeTask;
 
-    // Whether this task is an on-top launcher task, which is determined by the root activity.
-    private boolean mIsOnTopLauncher;
-
     private TaskDescription mTaskDescription;
 
     Task(int taskId, TaskStack stack, int userId, WindowManagerService service, Rect bounds,
-            Configuration overrideConfig, boolean isOnTopLauncher, int resizeMode,
-            boolean supportsPictureInPicture, boolean homeTask, TaskDescription taskDescription,
+            Configuration overrideConfig, int resizeMode, boolean supportsPictureInPicture,
+            boolean homeTask, TaskDescription taskDescription,
             TaskWindowContainerController controller) {
         mTaskId = taskId;
         mStack = stack;
         mUserId = userId;
         mService = service;
-        mIsOnTopLauncher = isOnTopLauncher;
         mResizeMode = resizeMode;
         mSupportsPictureInPicture = supportsPictureInPicture;
         mHomeTask = homeTask;
@@ -117,7 +113,7 @@
         return mStack != null ? mStack.getDisplayContent() : null;
     }
 
-    int getAdjustedAddPosition(int suggestedPosition) {
+    private int getAdjustedAddPosition(int suggestedPosition) {
         final int size = mChildren.size();
         if (suggestedPosition >= size) {
             return Math.min(size, suggestedPosition);
@@ -347,10 +343,6 @@
                 || mResizeMode == RESIZE_MODE_FORCE_RESIZABLE_PRESERVE_ORIENTATION;
     }
 
-    boolean isOnTopLauncher() {
-        return mIsOnTopLauncher;
-    }
-
     boolean cropWindowsToStackBounds() {
         return isResizeable();
     }
diff --git a/services/core/java/com/android/server/wm/TaskStack.java b/services/core/java/com/android/server/wm/TaskStack.java
index 538f0d9..b9429f4 100644
--- a/services/core/java/com/android/server/wm/TaskStack.java
+++ b/services/core/java/com/android/server/wm/TaskStack.java
@@ -160,10 +160,6 @@
         return mChildren.size() > 1 && !mChildren.get(mChildren.size() - 1).isHomeTask();
     }
 
-    boolean topTaskIsOnTopLauncher() {
-        return mChildren.get(mChildren.size() - 1).isOnTopLauncher();
-    }
-
     /**
      * Set the bounds of the stack and its containing tasks.
      * @param stackBounds New stack bounds. Passing in null sets the bounds to fullscreen.
@@ -397,8 +393,10 @@
         mDisplayContent.rotateBounds(mRotation, newRotation, mTmpRect2);
         switch (mStackId) {
             case PINNED_STACK_ID:
+                Rect targetBounds = new Rect();
+                getAnimatingBounds(targetBounds);
                 mTmpRect2 = mDisplayContent.getPinnedStackController().onDisplayChanged(mBounds,
-                        mDisplayContent);
+                        targetBounds, mDisplayContent);
                 break;
             case DOCKED_STACK_ID:
                 repositionDockedStackAfterRotation(mTmpRect2);
@@ -425,8 +423,12 @@
         mBoundsAfterRotation.setEmpty();
         final DockedStackDividerController controller = getDisplayContent()
                 .mDividerControllerLocked;
-        if (controller.isMinimizedDock() && mStackId == DOCKED_STACK_ID) {
-            outTempBounds.set(controller.getMiddlePositionDockedStackRect());
+        if (mStackId == DOCKED_STACK_ID) {
+            final Rect dockedStackRect = controller.getMiddlePositionDockedStackRect();
+
+            if (dockedStackRect != null) {
+                outTempBounds.set(dockedStackRect);
+            }
         }
     }
 
@@ -674,7 +676,9 @@
 
         // Update the pinned stack controller after the display info is updated
         if (mStackId == PINNED_STACK_ID) {
-            mDisplayContent.getPinnedStackController().onDisplayChanged(oldBounds,
+            Rect targetBounds = new Rect();
+            getAnimatingBounds(targetBounds);
+            mDisplayContent.getPinnedStackController().onDisplayChanged(oldBounds, targetBounds,
                     mDisplayContent);
         }
 
@@ -1472,7 +1476,10 @@
 
     @Override
     public void getFullScreenBounds(Rect bounds) {
-        getDisplayContent().getContentRect(bounds);
+        // This is currently only used for the pinned stack animation when leaving PiP
+        // (see {@link BoundsAnimationController}), and in that case we need to animate this back
+        // to the full bounds to match the fullscreen stack
+        getDisplayContent().getLogicalDisplayRect(bounds);
     }
 
     public boolean hasMovementAnimations() {
diff --git a/services/core/java/com/android/server/wm/TaskWindowContainerController.java b/services/core/java/com/android/server/wm/TaskWindowContainerController.java
index 11667c0..efc2e11 100644
--- a/services/core/java/com/android/server/wm/TaskWindowContainerController.java
+++ b/services/core/java/com/android/server/wm/TaskWindowContainerController.java
@@ -51,17 +51,17 @@
     public TaskWindowContainerController(int taskId, TaskWindowContainerListener listener,
             StackWindowController stackController, int userId, Rect bounds,
             Configuration overrideConfig, int resizeMode, boolean supportsPictureInPicture,
-            boolean homeTask, boolean isOnTopLauncher, boolean toTop, boolean showForAllUsers,
+            boolean homeTask, boolean toTop, boolean showForAllUsers,
             TaskDescription taskDescription) {
         this(taskId, listener, stackController, userId, bounds, overrideConfig, resizeMode,
-                supportsPictureInPicture, homeTask, isOnTopLauncher, toTop, showForAllUsers,
-                taskDescription, WindowManagerService.getInstance());
+                supportsPictureInPicture, homeTask, toTop, showForAllUsers, taskDescription,
+                WindowManagerService.getInstance());
     }
 
     public TaskWindowContainerController(int taskId, TaskWindowContainerListener listener,
             StackWindowController stackController, int userId, Rect bounds,
             Configuration overrideConfig, int resizeMode, boolean supportsPictureInPicture,
-            boolean homeTask, boolean isOnTopLauncher, boolean toTop, boolean showForAllUsers,
+            boolean homeTask, boolean toTop, boolean showForAllUsers,
             TaskDescription taskDescription, WindowManagerService service) {
         super(listener, service);
         mTaskId = taskId;
@@ -78,7 +78,7 @@
             }
             EventLog.writeEvent(WM_TASK_CREATED, taskId, stack.mStackId);
             final Task task = createTask(taskId, stack, userId, bounds, overrideConfig, resizeMode,
-                    supportsPictureInPicture, homeTask, isOnTopLauncher, taskDescription);
+                    supportsPictureInPicture, homeTask, taskDescription);
             final int position = toTop ? POSITION_TOP : POSITION_BOTTOM;
             stack.addTask(task, position, showForAllUsers, true /* moveParents */);
         }
@@ -87,9 +87,9 @@
     @VisibleForTesting
     Task createTask(int taskId, TaskStack stack, int userId, Rect bounds,
             Configuration overrideConfig, int resizeMode, boolean supportsPictureInPicture,
-            boolean homeTask, boolean isOnTopLauncher, TaskDescription taskDescription) {
-        return new Task(taskId, stack, userId, mService, bounds, overrideConfig, isOnTopLauncher,
-                resizeMode, supportsPictureInPicture, homeTask, taskDescription, this);
+            boolean homeTask, TaskDescription taskDescription) {
+        return new Task(taskId, stack, userId, mService, bounds, overrideConfig, resizeMode,
+                supportsPictureInPicture, homeTask, taskDescription, this);
     }
 
     @Override
diff --git a/services/core/java/com/android/server/wm/WallpaperWindowToken.java b/services/core/java/com/android/server/wm/WallpaperWindowToken.java
index 8ea1b3b..28aebbb 100644
--- a/services/core/java/com/android/server/wm/WallpaperWindowToken.java
+++ b/services/core/java/com/android/server/wm/WallpaperWindowToken.java
@@ -40,8 +40,8 @@
     private static final String TAG = TAG_WITH_CLASS_NAME ? "WallpaperWindowToken" : TAG_WM;
 
     WallpaperWindowToken(WindowManagerService service, IBinder token, boolean explicit,
-            DisplayContent dc) {
-        super(service, token, TYPE_WALLPAPER, explicit, dc);
+            DisplayContent dc, boolean ownerCanManageAppTokens) {
+        super(service, token, TYPE_WALLPAPER, explicit, dc, ownerCanManageAppTokens);
         dc.mWallpaperController.addWallpaperToken(this);
     }
 
diff --git a/services/core/java/com/android/server/wm/WindowLayersController.java b/services/core/java/com/android/server/wm/WindowLayersController.java
index e0c3d60..1cd2b53d 100644
--- a/services/core/java/com/android/server/wm/WindowLayersController.java
+++ b/services/core/java/com/android/server/wm/WindowLayersController.java
@@ -22,6 +22,7 @@
 import java.util.ArrayDeque;
 import java.util.function.Consumer;
 
+import static android.app.ActivityManager.StackId.ASSISTANT_STACK_ID;
 import static android.app.ActivityManager.StackId.DOCKED_STACK_ID;
 import static android.app.ActivityManager.StackId.PINNED_STACK_ID;
 import static android.view.Display.DEFAULT_DISPLAY;
@@ -58,8 +59,8 @@
     private int mHighestApplicationLayer = 0;
     private ArrayDeque<WindowState> mPinnedWindows = new ArrayDeque<>();
     private ArrayDeque<WindowState> mDockedWindows = new ArrayDeque<>();
+    private ArrayDeque<WindowState> mAssistantWindows = new ArrayDeque<>();
     private ArrayDeque<WindowState> mInputMethodWindows = new ArrayDeque<>();
-    private ArrayDeque<WindowState> mOnTopLauncherWindows = new ArrayDeque<>();
     private WindowState mDockDivider = null;
     private ArrayDeque<WindowState> mReplacingWindows = new ArrayDeque<>();
     private int mCurBaseLayer;
@@ -138,7 +139,7 @@
         mPinnedWindows.clear();
         mInputMethodWindows.clear();
         mDockedWindows.clear();
-        mOnTopLauncherWindows.clear();
+        mAssistantWindows.clear();
         mReplacingWindows.clear();
         mDockDivider = null;
 
@@ -182,9 +183,6 @@
         if (task == null) {
             return;
         }
-        if (task.isOnTopLauncher()) {
-            mOnTopLauncherWindows.add(w);
-        }
         final TaskStack stack = task.mStack;
         if (stack == null) {
             return;
@@ -193,6 +191,8 @@
             mPinnedWindows.add(w);
         } else if (stack.mStackId == DOCKED_STACK_ID) {
             mDockedWindows.add(w);
+        } else if (stack.mStackId == ASSISTANT_STACK_ID) {
+            mAssistantWindows.add(w);
         }
     }
 
@@ -206,10 +206,6 @@
 
         layer = assignAndIncreaseLayerIfNeeded(mDockDivider, layer);
 
-        while (!mOnTopLauncherWindows.isEmpty()) {
-            layer = assignAndIncreaseLayerIfNeeded(mOnTopLauncherWindows.remove(), layer);
-        }
-
         // We know that we will be animating a relaunching window in the near future, which will
         // receive a z-order increase. We want the replaced window to immediately receive the same
         // treatment, e.g. to be above the dock divider.
@@ -217,6 +213,12 @@
             layer = assignAndIncreaseLayerIfNeeded(mReplacingWindows.remove(), layer);
         }
 
+        // Adjust the assistant stack windows to be above the docked and fullscreen stack windows,
+        // but under the pinned stack windows
+        while (!mAssistantWindows.isEmpty()) {
+            layer = assignAndIncreaseLayerIfNeeded(mAssistantWindows.remove(), layer);
+        }
+
         while (!mPinnedWindows.isEmpty()) {
             layer = assignAndIncreaseLayerIfNeeded(mPinnedWindows.remove(), layer);
         }
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 9b96523..5653113 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -16,13 +16,17 @@
 
 package com.android.server.wm;
 
+import static android.Manifest.permission.INTERNAL_SYSTEM_WINDOW;
 import static android.Manifest.permission.MANAGE_APP_TOKENS;
 import static android.Manifest.permission.REGISTER_WINDOW_MANAGER_LISTENERS;
 import static android.app.ActivityManager.DOCKED_STACK_CREATE_MODE_TOP_OR_LEFT;
-import static android.app.ActivityManager.StackId.DOCKED_STACK_ID;
 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;
@@ -71,6 +75,7 @@
 import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_DRAG;
 import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_FOCUS;
 import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_FOCUS_LIGHT;
+import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_INPUT_METHOD;
 import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_KEEP_SCREEN_ON;
 import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_LAYOUT;
 import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_ORIENTATION;
@@ -101,7 +106,6 @@
 import android.app.ActivityManagerInternal;
 import android.app.AppOpsManager;
 import android.app.IActivityManager;
-import android.app.RemoteAction;
 import android.app.admin.DevicePolicyManager;
 import android.content.BroadcastReceiver;
 import android.content.ContentResolver;
@@ -236,7 +240,6 @@
 import java.util.HashMap;
 import java.util.List;
 
-import static android.Manifest.permission.MANAGE_ACTIVITY_STACKS;
 import static android.Manifest.permission.READ_FRAME_BUFFER;
 /** {@hide} */
 public class WindowManagerService extends IWindowManager.Stub
@@ -347,6 +350,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);
+                    }
+                }
             }
         }
     };
@@ -523,7 +533,7 @@
     boolean mSupportsPictureInPicture = false;
 
     int getDragLayerLocked() {
-        return mPolicy.windowTypeToLayerLw(TYPE_DRAG) * TYPE_LAYER_MULTIPLIER + TYPE_LAYER_OFFSET;
+        return mPolicy.getWindowLayerFromTypeLw(TYPE_DRAG) * TYPE_LAYER_MULTIPLIER + TYPE_LAYER_OFFSET;
     }
 
     class RotationWatcher {
@@ -1022,9 +1032,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();
@@ -1099,6 +1111,8 @@
         long origId;
         final int callingUid = Binder.getCallingUid();
         final int type = attrs.type;
+        final boolean ownerCanAddInternalSystemWindow =
+                mContext.checkCallingPermission(INTERNAL_SYSTEM_WINDOW) == PERMISSION_GRANTED;
 
         synchronized(mWindowMap) {
             if (!mDisplayReady) {
@@ -1200,7 +1214,8 @@
                         return WindowManagerGlobal.ADD_BAD_APP_TOKEN;
                     }
                 }
-                token = new WindowToken(this, attrs.token, type, false, displayContent);
+                token = new WindowToken(this, attrs.token, type, false, displayContent,
+                        ownerCanAddInternalSystemWindow);
             } else if (rootType >= FIRST_APPLICATION_WINDOW && rootType <= LAST_APPLICATION_WINDOW) {
                 atoken = token.asAppWindowToken();
                 if (atoken == null) {
@@ -1270,11 +1285,13 @@
                 // It is not valid to use an app token with other system types; we will
                 // instead make a new token for it (as if null had been passed in for the token).
                 attrs.token = null;
-                token = new WindowToken(this, null, type, false, displayContent);
+                token = new WindowToken(this, null, type, false, displayContent,
+                        ownerCanAddInternalSystemWindow);
             }
 
-            WindowState win = new WindowState(this, session, client, token, parentWindow,
-                    appOp[0], seq, attrs, viewVisibility, session.mUid);
+            final WindowState win = new WindowState(this, session, client, token, parentWindow,
+                    appOp[0], seq, attrs, viewVisibility, session.mUid,
+                    ownerCanAddInternalSystemWindow);
             if (win.mDeathRecipient == null) {
                 // Client has apparently died, so there is no reason to
                 // continue.
@@ -2405,9 +2422,10 @@
                 return;
             }
             if (type == TYPE_WALLPAPER) {
-                new WallpaperWindowToken(this, binder, true, dc);
+                new WallpaperWindowToken(this, binder, true, dc,
+                        true /* ownerCanManageAppTokens */);
             } else {
-                new WindowToken(this, binder, type, true, dc);
+                new WindowToken(this, binder, type, true, dc, true /* ownerCanManageAppTokens */);
             }
         }
     }
@@ -2569,13 +2587,18 @@
         }
     }
 
-    void setFocusTaskRegionLocked() {
+    void setFocusTaskRegionLocked(AppWindowToken previousFocus) {
         final Task focusedTask = mFocusedApp != null ? mFocusedApp.mTask : null;
-        if (focusedTask != null) {
-            final DisplayContent displayContent = focusedTask.getDisplayContent();
-            if (displayContent != null) {
-                displayContent.setTouchExcludeRegion(focusedTask);
-            }
+        final Task previousTask = previousFocus != null ? previousFocus.mTask : null;
+        final DisplayContent focusedDisplayContent =
+                focusedTask != null ? focusedTask.getDisplayContent() : null;
+        final DisplayContent previousDisplayContent =
+                previousTask != null ? previousTask.getDisplayContent() : null;
+        if (previousDisplayContent != null && previousDisplayContent != focusedDisplayContent) {
+            previousDisplayContent.setTouchExcludeRegion(null);
+        }
+        if (focusedDisplayContent != null) {
+            focusedDisplayContent.setTouchExcludeRegion(focusedTask);
         }
     }
 
@@ -2601,9 +2624,10 @@
 
             final boolean changed = mFocusedApp != newFocus;
             if (changed) {
+                AppWindowToken prev = mFocusedApp;
                 mFocusedApp = newFocus;
                 mInputMonitor.setFocusedAppLw(newFocus);
-                setFocusTaskRegionLocked();
+                setFocusTaskRegionLocked(prev);
             }
 
             if (moveFocusNow && changed) {
@@ -2824,36 +2848,6 @@
         mDockedStackCreateBounds = bounds;
     }
 
-    @Override
-    public Rect getPictureInPictureDefaultBounds(int displayId) {
-        synchronized (mWindowMap) {
-            if (!mSupportsPictureInPicture) {
-                return null;
-            }
-
-            final DisplayContent displayContent = mRoot.getDisplayContent(displayId);
-            return displayContent.getPinnedStackController().getDefaultBounds();
-        }
-    }
-
-    @Override
-    public Rect getPictureInPictureMovementBounds(int displayId) {
-        synchronized (mWindowMap) {
-            if (!mSupportsPictureInPicture) {
-                return null;
-            }
-
-            final Rect stackBounds = new Rect();
-            getStackBounds(PINNED_STACK_ID, stackBounds);
-            if (stackBounds.isEmpty()) {
-                return stackBounds;
-            }
-
-            final DisplayContent displayContent = mRoot.getDisplayContent(displayId);
-            return displayContent.getPinnedStackController().getMovementBounds(stackBounds);
-        }
-    }
-
     public Rect getPictureInPictureBounds(int displayId, float aspectRatio) {
         synchronized (mWindowMap) {
             if (!mSupportsPictureInPicture) {
@@ -2866,6 +2860,8 @@
                 return null;
             }
 
+            final PinnedStackController pinnedStackController =
+                    displayContent.getPinnedStackController();
             final TaskStack stack = displayContent.getStackById(PINNED_STACK_ID);
             if (stack != null) {
                 // If the stack exists, then use its final bounds to calculate the new aspect ratio
@@ -2874,13 +2870,23 @@
                 stack.getAnimatingBounds(stackBounds);
             } else {
                 // Otherwise, just calculate the aspect ratio bounds from the default bounds
-                stackBounds = displayContent.getPinnedStackController().getDefaultBounds();
+                stackBounds = pinnedStackController.getDefaultBounds();
             }
-            return displayContent.getPinnedStackController().getAspectRatioBounds(stackBounds,
-                    aspectRatio);
+
+            if (pinnedStackController.isValidPictureInPictureAspectRatio(aspectRatio)) {
+                return pinnedStackController.transformBoundsToAspectRatio(stackBounds, aspectRatio);
+            } else {
+                return stackBounds;
+            }
         }
     }
 
+    public boolean isValidPictureInPictureAspectRatio(int displayId, float aspectRatio) {
+        final DisplayContent displayContent = mRoot.getDisplayContent(displayId);
+        return displayContent.getPinnedStackController().isValidPictureInPictureAspectRatio(
+                aspectRatio);
+    }
+
     @Override
     public void getStackBounds(int stackId, Rect bounds) {
         synchronized (mWindowMap) {
@@ -3606,7 +3612,7 @@
                         mCircularDisplayMask = new CircularDisplayMask(
                                 getDefaultDisplayContentLocked().getDisplay(),
                                 mFxSession,
-                                mPolicy.windowTypeToLayerLw(
+                                mPolicy.getWindowLayerFromTypeLw(
                                         WindowManager.LayoutParams.TYPE_POINTER)
                                         * TYPE_LAYER_MULTIPLIER + 10, screenOffset, maskThickness);
                     }
@@ -3635,7 +3641,7 @@
                             mContext,
                             getDefaultDisplayContentLocked().getDisplay(),
                             mFxSession,
-                            mPolicy.windowTypeToLayerLw(
+                            mPolicy.getWindowLayerFromTypeLw(
                                     WindowManager.LayoutParams.TYPE_POINTER)
                                     * TYPE_LAYER_MULTIPLIER + 10);
                 }
@@ -5269,6 +5275,7 @@
         public static final int RESTORE_POINTER_ICON = 55;
         public static final int NOTIFY_KEYGUARD_FLAGS_CHANGED = 56;
         public static final int NOTIFY_KEYGUARD_TRUSTED_CHANGED = 57;
+        public static final int SET_HAS_OVERLAY_UI = 58;
 
         /**
          * Used to denote that an integer field in a message will not be used.
@@ -5752,6 +5759,10 @@
                     mAmInternal.notifyKeyguardTrustedChanged();
                 }
                 break;
+                case SET_HAS_OVERLAY_UI: {
+                    mAmInternal.setHasOverlayUi(msg.arg1, msg.arg2 == 1);
+                }
+                break;
             }
             if (DEBUG_WINDOW_TRACE) {
                 Slog.v(TAG_WM, "handleMessage: exit");
@@ -5921,8 +5932,8 @@
                     if (displayContent.mBaseDisplayWidth != width
                             || displayContent.mBaseDisplayHeight != height) {
                         Slog.i(TAG_WM, "FORCED DISPLAY SIZE: " + width + "x" + height);
-                        displayContent.mBaseDisplayWidth = width;
-                        displayContent.mBaseDisplayHeight = height;
+                        displayContent.updateBaseDisplayMetrics(width, height,
+                                displayContent.mBaseDisplayDensity);
                     }
                 } catch (NumberFormatException ex) {
                 }
@@ -5947,8 +5958,7 @@
     // displayContent must not be null
     private void setForcedDisplaySizeLocked(DisplayContent displayContent, int width, int height) {
         Slog.i(TAG_WM, "Using new display size: " + width + "x" + height);
-        displayContent.mBaseDisplayWidth = width;
-        displayContent.mBaseDisplayHeight = height;
+        displayContent.updateBaseDisplayMetrics(width, height, displayContent.mBaseDisplayDensity);
         reconfigureDisplayLocked(displayContent);
     }
 
@@ -6136,6 +6146,7 @@
      * Get an array with display ids ordered by focus priority - last items should be given
      * focus first. Sparse array just maps position to displayId.
      */
+    // TODO: Maintain display list in focus order in ActivityManager and remove this call.
     public void getDisplaysInFocusOrder(SparseIntArray displaysInFocusOrder) {
         synchronized(mWindowMap) {
             mRoot.getDisplaysInFocusOrder(displaysInFocusOrder);
@@ -7452,7 +7463,7 @@
         synchronized (mWindowMap) {
             getDefaultDisplayContentLocked().getDockedDividerController()
                     .setTouchRegion(touchRegion);
-            setFocusTaskRegionLocked();
+            setFocusTaskRegionLocked(null);
         }
     }
 
@@ -7533,63 +7544,12 @@
         }
     }
 
-    private void getNonDecorInsetsLocked(Rect outInsets) {
-        final DisplayInfo di = getDefaultDisplayInfoLocked();
-        mPolicy.getNonDecorInsetsLw(di.rotation, di.logicalWidth, di.logicalHeight, outInsets);
-    }
-
-    /**
-     * Intersects the specified {@code inOutBounds} with the display frame that excludes the stable
-     * inset areas.
-     *
-     * @param inOutBounds The inOutBounds to subtract the stable inset areas from.
-     */
-    public void subtractStableInsets(Rect inOutBounds) {
-        synchronized (mWindowMap) {
-            getStableInsetsLocked(DEFAULT_DISPLAY, mTmpRect2);
-            final DisplayInfo di = getDefaultDisplayInfoLocked();
-            mTmpRect.set(0, 0, di.logicalWidth, di.logicalHeight);
-            subtractInsets(mTmpRect, mTmpRect2, inOutBounds);
-        }
-    }
-
-    /**
-     * Intersects the specified {@code inOutBounds} with the display frame that excludes
-     * areas that could never be removed in Honeycomb. See
-     * {@link WindowManagerPolicy#getNonDecorInsetsLw}.
-     *
-     * @param inOutBounds The inOutBounds to subtract the inset areas from.
-     */
-    public void subtractNonDecorInsets(Rect inOutBounds) {
-        synchronized (mWindowMap) {
-            getNonDecorInsetsLocked(mTmpRect2);
-            final DisplayInfo di = getDefaultDisplayInfoLocked();
-            mTmpRect.set(0, 0, di.logicalWidth, di.logicalHeight);
-            subtractInsets(mTmpRect, mTmpRect2, inOutBounds);
-        }
-    }
-
-    void subtractInsets(Rect display, Rect insets, Rect inOutBounds) {
+    void intersectDisplayInsetBounds(Rect display, Rect insets, Rect inOutBounds) {
         mTmpRect3.set(display);
         mTmpRect3.inset(insets);
         inOutBounds.intersect(mTmpRect3);
     }
 
-    /**
-     * Calculates the smallest width for a task given the {@param bounds}. It does that by iterating
-     * across all screen orientations, and returns the minimum of the task width taking into account
-     * that the bounds might change because the snap algorithm snaps to a different value.
-     *
-     * @return the smallest width to be used in the Configuration, in dips
-     */
-    public int getSmallestWidthForTaskBounds(Rect bounds) {
-        synchronized (mWindowMap) {
-            // TODO(multi-display): Use correct display content here
-            return getDefaultDisplayContentLocked().getDockedDividerController()
-                    .getSmallestWidthDpForBounds(bounds);
-        }
-    }
-
     MousePositionTracker mMousePositionTracker = new MousePositionTracker();
 
     private static class MousePositionTracker implements PointerEventListener {
@@ -7904,6 +7864,17 @@
         }
 
         @Override
+        public void updateInputMethodWindowStatus(@NonNull IBinder imeToken,
+                boolean imeWindowVisible, @Nullable IBinder targetWindowToken) {
+            // TODO (b/34628091): Use this method to address the window animation issue.
+            if (DEBUG_INPUT_METHOD) {
+                Slog.w(TAG_WM, "updateInputMethodWindowStatus: imeToken=" + imeToken
+                        + " imeWindowVisible=" + imeWindowVisible
+                        + " targetWindowToken=" + targetWindowToken);
+            }
+        }
+
+        @Override
         public boolean isHardKeyboardAvailable() {
             synchronized (mWindowMap) {
                 return mHardKeyboardAvailable;
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index 050adfe..65e1f84 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -18,7 +18,6 @@
 
 import static android.app.ActivityManager.ENABLE_TASK_SNAPSHOTS;
 import static android.app.ActivityManager.StackId;
-import static android.app.ActivityManager.StackId.DOCKED_STACK_ID;
 import static android.app.ActivityManager.StackId.INVALID_STACK_ID;
 import static android.app.ActivityManager.isLowRamDeviceStatic;
 import static android.os.Trace.TRACE_TAG_WINDOW_MANAGER;
@@ -164,6 +163,8 @@
     final int mAppOp;
     // UserId and appId of the owner. Don't display windows of non-current user.
     final int mOwnerUid;
+    /** The owner has {@link android.Manifest.permission#INTERNAL_SYSTEM_WINDOW} */
+    final boolean mOwnerCanAddInternalSystemWindow;
     final IWindowId mWindowId;
     WindowToken mToken;
     // The same object as mToken if this is an app window and null for non-app windows.
@@ -561,7 +562,7 @@
 
     WindowState(WindowManagerService service, Session s, IWindow c, WindowToken token,
            WindowState parentWindow, int appOp, int seq, WindowManager.LayoutParams a,
-           int viewVisibility, int ownerId) {
+           int viewVisibility, int ownerId, boolean ownerCanAddInternalSystemWindow) {
         mService = service;
         mSession = s;
         mClient = c;
@@ -569,6 +570,7 @@
         mToken = token;
         mAppToken = mToken.asAppWindowToken();
         mOwnerUid = ownerId;
+        mOwnerCanAddInternalSystemWindow = ownerCanAddInternalSystemWindow;
         mWindowId = new IWindowId.Stub() {
             @Override
             public void registerFocusObserver(IWindowFocusObserver observer) {
@@ -613,9 +615,9 @@
         if (mAttrs.type >= FIRST_SUB_WINDOW && mAttrs.type <= LAST_SUB_WINDOW) {
             // The multiplier here is to reserve space for multiple
             // windows in the same type layer.
-            mBaseLayer = mPolicy.windowTypeToLayerLw(parentWindow.mAttrs.type)
+            mBaseLayer = mPolicy.getWindowLayerLw(parentWindow)
                     * TYPE_LAYER_MULTIPLIER + TYPE_LAYER_OFFSET;
-            mSubLayer = mPolicy.subWindowTypeToLayerLw(a.type);
+            mSubLayer = mPolicy.getSubWindowLayerFromTypeLw(a.type);
             mIsChildWindow = true;
 
             if (DEBUG_ADD_REMOVE) Slog.v(TAG, "Adding " + this + " to " + parentWindow);
@@ -629,7 +631,7 @@
         } else {
             // The multiplier here is to reserve space for multiple
             // windows in the same type layer.
-            mBaseLayer = mPolicy.windowTypeToLayerLw(a.type)
+            mBaseLayer = mPolicy.getWindowLayerLw(this)
                     * TYPE_LAYER_MULTIPLIER + TYPE_LAYER_OFFSET;
             mSubLayer = 0;
             mIsChildWindow = false;
@@ -663,7 +665,7 @@
 
     void attach() {
         if (localLOGV) Slog.v(TAG, "Attaching " + this + " token=" + mToken);
-        mSession.windowAddedLocked();
+        mSession.windowAddedLocked(mAttrs.type);
     }
 
     @Override
@@ -676,6 +678,11 @@
         return mAttrs.packageName;
     }
 
+    @Override
+    public boolean canAddInternalSystemWindow() {
+        return mOwnerCanAddInternalSystemWindow;
+    }
+
     /**
      * Subtracts the insets calculated by intersecting {@param layoutFrame} with {@param insetFrame}
      * from {@param frame}. In other words, it applies the insets that would result if
@@ -1731,7 +1738,7 @@
 
         mWinAnimator.destroyDeferredSurfaceLocked();
         mWinAnimator.destroySurfaceLocked();
-        mSession.windowRemovedLocked();
+        mSession.windowRemovedLocked(mAttrs.type);
         try {
             mClient.asBinder().unlinkToDeath(mDeathRecipient, 0);
         } catch (RuntimeException e) {
diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java
index b163abf..d2ea64c8 100644
--- a/services/core/java/com/android/server/wm/WindowStateAnimator.java
+++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java
@@ -915,10 +915,15 @@
             if (attachedTransformation != null) {
                 tmpMatrix.postConcat(attachedTransformation.getMatrix());
             }
-            tmpMatrix.postTranslate(frame.left + mWin.mXOffset, frame.top + mWin.mYOffset);
             if (appTransformation != null) {
                 tmpMatrix.postConcat(appTransformation.getMatrix());
             }
+
+            // The translation that applies the position of the window needs to be applied at the
+            // end in case that other translations include scaling. Otherwise the scaling will
+            // affect this translation. But it needs to be set before the screen rotation animation
+            // so the pivot point is at the center of the screen for all windows.
+            tmpMatrix.postTranslate(frame.left + mWin.mXOffset, frame.top + mWin.mYOffset);
             if (screenAnimation) {
                 tmpMatrix.postConcat(screenRotationAnimation.getEnterTransformation().getMatrix());
             }
diff --git a/services/core/java/com/android/server/wm/WindowToken.java b/services/core/java/com/android/server/wm/WindowToken.java
index 4b94d15..8beb87d 100644
--- a/services/core/java/com/android/server/wm/WindowToken.java
+++ b/services/core/java/com/android/server/wm/WindowToken.java
@@ -77,6 +77,9 @@
     // The display this token is on.
     protected DisplayContent mDisplayContent;
 
+    /** The owner has {@link android.Manifest.permission#MANAGE_APP_TOKENS} */
+    final boolean mOwnerCanManageAppTokens;
+
     /**
      * Compares two child window of this token and returns -1 if the first is lesser than the
      * second in terms of z-order and 1 otherwise.
@@ -98,11 +101,12 @@
     };
 
     WindowToken(WindowManagerService service, IBinder _token, int type, boolean persistOnEmpty,
-            DisplayContent dc) {
+            DisplayContent dc, boolean ownerCanManageAppTokens) {
         mService = service;
         token = _token;
         windowType = type;
         mPersistOnEmpty = persistOnEmpty;
+        mOwnerCanManageAppTokens = ownerCanManageAppTokens;
         onDisplayChanged(dc);
     }
 
diff --git a/services/core/jni/Android.mk b/services/core/jni/Android.mk
index eab5d8a..2c3cda5 100644
--- a/services/core/jni/Android.mk
+++ b/services/core/jni/Android.mk
@@ -19,6 +19,7 @@
     $(LOCAL_REL_DIR)/com_android_server_location_GnssLocationProvider.cpp \
     $(LOCAL_REL_DIR)/com_android_server_power_PowerManagerService.cpp \
     $(LOCAL_REL_DIR)/com_android_server_SerialService.cpp \
+    $(LOCAL_REL_DIR)/com_android_server_SyntheticPasswordManager.cpp \
     $(LOCAL_REL_DIR)/com_android_server_storage_AppFuseBridge.cpp \
     $(LOCAL_REL_DIR)/com_android_server_SystemServer.cpp \
     $(LOCAL_REL_DIR)/com_android_server_tv_TvUinputBridge.cpp \
@@ -33,12 +34,14 @@
 
 LOCAL_C_INCLUDES += \
     $(JNI_H_INCLUDE) \
+    external/scrypt/lib/crypto \
     frameworks/base/services \
     frameworks/base/libs \
     frameworks/base/libs/hwui \
     frameworks/base/core/jni \
     frameworks/native/services \
     system/core/libappfuse/include \
+    system/gatekeeper/include \
     system/security/keystore/include \
     $(call include-path-for, libhardware)/hardware \
     $(call include-path-for, libhardware_legacy)/hardware_legacy \
@@ -50,6 +53,7 @@
     libappfuse \
     libbinder \
     libcutils \
+    libcrypto \
     liblog \
     libhardware \
     libhardware_legacy \
@@ -83,3 +87,5 @@
     android.hardware.tv.input@1.0 \
     android.hardware.vibrator@1.0 \
     android.hardware.vr@1.0 \
+
+LOCAL_STATIC_LIBRARIES += libscrypt_static
\ No newline at end of file
diff --git a/services/core/jni/com_android_server_HardwarePropertiesManagerService.cpp b/services/core/jni/com_android_server_HardwarePropertiesManagerService.cpp
index 545b3d7..703518d 100644
--- a/services/core/jni/com_android_server_HardwarePropertiesManagerService.cpp
+++ b/services/core/jni/com_android_server_HardwarePropertiesManagerService.cpp
@@ -70,7 +70,7 @@
 static void nativeInit(JNIEnv* env, jobject obj) {
     // TODO(b/31632518)
     if (gThermalModule == nullptr) {
-        gThermalModule = IThermal::getService("thermal");
+        gThermalModule = IThermal::getService();
     }
 
     if (gThermalModule == nullptr) {
diff --git a/services/core/jni/com_android_server_SyntheticPasswordManager.cpp b/services/core/jni/com_android_server_SyntheticPasswordManager.cpp
new file mode 100644
index 0000000..a9f7b9f
--- /dev/null
+++ b/services/core/jni/com_android_server_SyntheticPasswordManager.cpp
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2016 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 "SyntheticPasswordManager"
+
+#include "JNIHelp.h"
+#include "jni.h"
+
+#include <android_runtime/Log.h>
+#include <utils/Timers.h>
+#include <utils/misc.h>
+#include <utils/String8.h>
+#include <utils/Log.h>
+#include <gatekeeper/password_handle.h>
+
+
+extern "C" {
+#include "crypto_scrypt.h"
+}
+
+namespace android {
+
+static jlong android_server_SyntheticPasswordManager_nativeSidFromPasswordHandle(JNIEnv* env, jobject, jbyteArray handleArray) {
+
+    jbyte* data = (jbyte*)env->GetPrimitiveArrayCritical(handleArray, NULL);
+
+    if (data != NULL) {
+        const gatekeeper::password_handle_t *handle =
+                reinterpret_cast<const gatekeeper::password_handle_t *>(data);
+        jlong sid = handle->user_id;
+        env->ReleasePrimitiveArrayCritical(handleArray, data, JNI_ABORT);
+        return sid;
+    } else {
+        return 0;
+    }
+}
+
+static jbyteArray android_server_SyntheticPasswordManager_nativeScrypt(JNIEnv* env, jobject, jbyteArray password, jbyteArray salt, jint N, jint r, jint p, jint outLen) {
+    if (!password || !salt) {
+        return NULL;
+    }
+
+    int passwordLen = env->GetArrayLength(password);
+    int saltLen = env->GetArrayLength(salt);
+    jbyteArray ret = env->NewByteArray(outLen);
+
+    jbyte* passwordPtr = (jbyte*)env->GetByteArrayElements(password, NULL);
+    jbyte* saltPtr = (jbyte*)env->GetByteArrayElements(salt, NULL);
+    jbyte* retPtr = (jbyte*)env->GetByteArrayElements(ret, NULL);
+
+    int rc = crypto_scrypt((const uint8_t *)passwordPtr, passwordLen,
+                       (const uint8_t *)saltPtr, saltLen, N, r, p, (uint8_t *)retPtr,
+                       outLen);
+    env->ReleaseByteArrayElements(password, passwordPtr, JNI_ABORT);
+    env->ReleaseByteArrayElements(salt, saltPtr, JNI_ABORT);
+    env->ReleaseByteArrayElements(ret, retPtr, 0);
+
+    if (!rc) {
+        return ret;
+    } else {
+        SLOGE("scrypt failed");
+        return NULL;
+    }
+}
+
+static const JNINativeMethod sMethods[] = {
+     /* name, signature, funcPtr */
+    {"nativeSidFromPasswordHandle", "([B)J", (void*)android_server_SyntheticPasswordManager_nativeSidFromPasswordHandle},
+    {"nativeScrypt", "([B[BIIII)[B", (void*)android_server_SyntheticPasswordManager_nativeScrypt},
+};
+
+int register_android_server_SyntheticPasswordManager(JNIEnv* env) {
+    return jniRegisterNativeMethods(env, "com/android/server/SyntheticPasswordManager",
+                                    sMethods, NELEM(sMethods));
+}
+
+} /* namespace android */
diff --git a/services/core/jni/com_android_server_SystemServer.cpp b/services/core/jni/com_android_server_SystemServer.cpp
index e46490b..3120af5 100644
--- a/services/core/jni/com_android_server_SystemServer.cpp
+++ b/services/core/jni/com_android_server_SystemServer.cpp
@@ -26,18 +26,11 @@
 
 namespace android {
 
-static int start_sensor_service(void* /*unused*/) {
-    SensorService::instantiate();
-    return 0;
-}
-
 static void android_server_SystemServer_startSensorService(JNIEnv* /* env */, jobject /* clazz */) {
     char propBuf[PROPERTY_VALUE_MAX];
     property_get("system_init.startsensorservice", propBuf, "1");
     if (strcmp(propBuf, "1") == 0) {
-        // Start the sensor service in a new thread
-        createThreadEtc(start_sensor_service, nullptr,
-                        "StartSensorThread", PRIORITY_FOREGROUND);
+        SensorService::instantiate();
     }
 }
 
diff --git a/services/core/jni/com_android_server_location_ContextHubService.cpp b/services/core/jni/com_android_server_location_ContextHubService.cpp
index 517fce0..05ef0d1 100644
--- a/services/core/jni/com_android_server_location_ContextHubService.cpp
+++ b/services/core/jni/com_android_server_location_ContextHubService.cpp
@@ -558,12 +558,12 @@
 void initContextHubService() {
     db.hubInfo.numHubs = 0;
 
-    db.hubInfo.contextHub = IContexthub::getService("context_hub_hal");
+    db.hubInfo.contextHub = IContexthub::getService("context_hub");
 
     if (db.hubInfo.contextHub == nullptr) {
         ALOGE("Could not load context hub hal");
     } else {
-        ALOGI("Loaded context hub hal");
+        ALOGI("Loaded context hub hal, isRemote %s", db.hubInfo.contextHub->isRemote() ? "TRUE" : "FALSE");
     }
 
     // Prep for storing app info
diff --git a/services/core/jni/com_android_server_location_GnssLocationProvider.cpp b/services/core/jni/com_android_server_location_GnssLocationProvider.cpp
index 01a1efc..1578562 100644
--- a/services/core/jni/com_android_server_location_GnssLocationProvider.cpp
+++ b/services/core/jni/com_android_server_location_GnssLocationProvider.cpp
@@ -58,6 +58,7 @@
 static jmethodID method_reportGeofenceResumeStatus;
 static jmethodID method_reportMeasurementData;
 static jmethodID method_reportNavigationMessages;
+static jmethodID method_reportLocationBatch;
 
 /*
  * Save a pointer to JavaVm to attach/detach threads executing
@@ -80,6 +81,8 @@
 using android::hardware::gnss::V1_0::IAGnssRil;
 using android::hardware::gnss::V1_0::IAGnssRilCallback;
 using android::hardware::gnss::V1_0::IGnss;
+using android::hardware::gnss::V1_0::IGnssBatching;
+using android::hardware::gnss::V1_0::IGnssBatchingCallback;
 using android::hardware::gnss::V1_0::IGnssCallback;
 using android::hardware::gnss::V1_0::IGnssConfiguration;
 using android::hardware::gnss::V1_0::IGnssDebug;
@@ -100,6 +103,7 @@
 sp<IAGnssRil> agnssRilIface = nullptr;
 sp<IGnssGeofencing> gnssGeofencingIface = nullptr;
 sp<IAGnss> agnssIface = nullptr;
+sp<IGnssBatching> gnssBatchingIface = nullptr;
 sp<IGnssDebug> gnssDebugIface = nullptr;
 sp<IGnssConfiguration> gnssConfigurationIface = nullptr;
 sp<IGnssNi> gnssNiIface = nullptr;
@@ -139,6 +143,7 @@
 class JavaObject {
  public:
     JavaObject(JNIEnv* env, const char* class_name);
+    JavaObject(JNIEnv* env, const char* class_name, const char * sz_arg_1);
     virtual ~JavaObject();
 
     template<class T>
@@ -159,6 +164,12 @@
     object_ = env_->NewObject(clazz_, ctor);
 }
 
+JavaObject::JavaObject(JNIEnv* env, const char* class_name, const char * sz_arg_1) : env_(env) {
+    clazz_ = env_->FindClass(class_name);
+    jmethodID ctor = env->GetMethodID(clazz_, "<init>", "(Ljava/lang/String;)V");
+    object_ = env_->NewObject(clazz_, ctor, env->NewStringUTF(sz_arg_1));
+}
+
 JavaObject::~JavaObject() {
     env_->DeleteLocalRef(clazz_);
 }
@@ -591,6 +602,7 @@
     env->CallVoidMethod(mCallbacksObj,
                         method_reportNavigationMessages,
                         navigationMessage);
+    checkAndClearExceptionFromCallback(env, __FUNCTION__);
     env->DeleteLocalRef(navigationMessage);
     return Void();
 }
@@ -925,6 +937,81 @@
     return Void();
 }
 
+/*
+ * GnssBatchingCallback interface implements the callback methods
+ * required by the IGnssBatching interface.
+ */
+struct GnssBatchingCallback : public IGnssBatchingCallback {
+    /*
+    * Methods from ::android::hardware::gps::V1_0::IGnssBatchingCallback
+    * follow.
+    */
+    Return<void> gnssLocationBatchCb(
+        const ::android::hardware::hidl_vec<hardware::gnss::V1_0::GnssLocation> & locations)
+        override;
+ private:
+    jobject translateLocation(
+            JNIEnv* env, const hardware::gnss::V1_0::GnssLocation* location);
+};
+
+Return<void> GnssBatchingCallback::gnssLocationBatchCb(
+        const ::android::hardware::hidl_vec<hardware::gnss::V1_0::GnssLocation> & locations) {
+    JNIEnv* env = getJniEnv();
+
+    jobjectArray jLocations = env->NewObjectArray(locations.size(),
+            env->FindClass("android/location/Location"), nullptr);
+
+    for (uint16_t i = 0; i < locations.size(); ++i) {
+        jobject jLocation = translateLocation(env, &locations[i]);
+        env->SetObjectArrayElement(jLocations, i, jLocation);
+        env->DeleteLocalRef(jLocation);
+    }
+
+    env->CallVoidMethod(mCallbacksObj, method_reportLocationBatch, jLocations);
+    checkAndClearExceptionFromCallback(env, __FUNCTION__);
+
+    env->DeleteLocalRef(jLocations);
+
+    return Void();
+}
+
+// TODO: Use this common code to translate location for Geofencing and regular Location
+jobject GnssBatchingCallback::translateLocation(
+        JNIEnv* env, const hardware::gnss::V1_0::GnssLocation* location) {
+    JavaObject object(env, "android/location/Location", "gps");
+
+    uint16_t flags = static_cast<uint32_t>(location->gnssLocationFlags);
+    if (flags & hardware::gnss::V1_0::GnssLocationFlags::HAS_LAT_LONG) {
+        SET(Latitude, location->latitudeDegrees);
+        SET(Longitude, location->longitudeDegrees);
+    }
+    if (flags & hardware::gnss::V1_0::GnssLocationFlags::HAS_ALTITUDE) {
+        SET(Altitude, location->altitudeMeters);
+    }
+    if (flags & hardware::gnss::V1_0::GnssLocationFlags::HAS_SPEED) {
+        SET(Speed, location->speedMetersPerSec);
+    }
+    if (flags & hardware::gnss::V1_0::GnssLocationFlags::HAS_BEARING) {
+        SET(Bearing, location->bearingDegrees);
+    }
+    if (flags & hardware::gnss::V1_0::GnssLocationFlags::HAS_HORIZONTAL_ACCURACY) {
+        SET(Accuracy, location->horizontalAccuracyMeters);
+    }
+    if (flags & hardware::gnss::V1_0::GnssLocationFlags::HAS_VERTICAL_ACCURACY) {
+        SET(VerticalAccuracyMeters, location->verticalAccuracyMeters);
+    }
+    if (flags & hardware::gnss::V1_0::GnssLocationFlags::HAS_SPEED_ACCURACY) {
+        SET(SpeedAccuracyMetersPerSecond, location->speedAccuracyMetersPerSecond);
+    }
+    if (flags & hardware::gnss::V1_0::GnssLocationFlags::HAS_BEARING_ACCURACY) {
+        SET(BearingAccuracyDegrees, location->bearingAccuracyDegrees);
+    }
+    SET(Time, location->timestamp);
+
+    return object.get();
+}
+
+
 static void android_location_GnssLocationProvider_class_init_native(JNIEnv* env, jclass clazz) {
     method_reportLocation = env->GetMethodID(clazz, "reportLocation", "(IDDDFFFFFFJ)V");
     method_reportStatus = env->GetMethodID(clazz, "reportStatus", "(I)V");
@@ -959,6 +1046,10 @@
             clazz,
             "reportNavigationMessage",
             "(Landroid/location/GnssNavigationMessage;)V");
+    method_reportLocationBatch = env->GetMethodID(
+            clazz,
+            "reportLocationBatch",
+            "([Landroid/location/Location;)V");
 
     /*
      * Save a pointer to JVM.
@@ -1033,6 +1124,13 @@
         } else {
             gnssGeofencingIface = gnssGeofencing;
         }
+
+        auto gnssBatching = gnssHal->getExtensionGnssBatching();
+        if (!gnssBatching.isOk()) {
+            ALOGD("Unable to get a handle to gnssBatching");
+        } else {
+            gnssBatchingIface = gnssBatching;
+        }
     } else {
       ALOGE("Unable to get GPS service\n");
     }
@@ -1704,6 +1802,67 @@
     }
 }
 
+static jint android_location_GnssLocationProvider_get_batch_size(JNIEnv*, jclass) {
+    if (gnssBatchingIface == nullptr) {
+        return 0; // batching not supported, size = 0
+    }
+    auto result = gnssBatchingIface->getBatchSize();
+    if (result.isOk()) {
+        return static_cast<jint>(result);
+    } else {
+        return 0; // failure in binder, don't support batching
+    }
+}
+
+static jboolean android_location_GnssLocationProvider_init_batching(JNIEnv*, jclass) {
+    if (gnssBatchingIface == nullptr) {
+        return JNI_FALSE; // batching not supported
+    }
+    sp<IGnssBatchingCallback> gnssBatchingCbIface = new GnssBatchingCallback();
+
+    return static_cast<jboolean>(gnssBatchingIface->init(gnssBatchingCbIface));
+}
+
+static void android_location_GnssLocationProvider_cleanup_batching(JNIEnv*, jclass) {
+    if (gnssBatchingIface == nullptr) {
+        return; // batching not supported
+    }
+    gnssBatchingIface->cleanup();
+}
+
+static jboolean android_location_GnssLocationProvider_start_batch(JNIEnv*, jclass,
+        jlong periodNanos, jboolean wakeOnFifoFull) {
+    if (gnssBatchingIface == nullptr) {
+        return JNI_FALSE; // batching not supported
+    }
+
+    IGnssBatching::Options options;
+    options.periodNanos = periodNanos;
+    if (wakeOnFifoFull) {
+        options.flags = static_cast<uint8_t>(IGnssBatching::Flag::WAKEUP_ON_FIFO_FULL);
+    } else {
+        options.flags = 0;
+    }
+
+    return static_cast<jboolean>(gnssBatchingIface->start(options));
+}
+
+static void android_location_GnssLocationProvider_flush_batch(JNIEnv*, jclass) {
+    if (gnssBatchingIface == nullptr) {
+        return; // batching not supported
+    }
+
+    gnssBatchingIface->flush();
+}
+
+static jboolean android_location_GnssLocationProvider_stop_batch(JNIEnv*, jclass) {
+    if (gnssBatchingIface == nullptr) {
+        return JNI_FALSE; // batching not supported
+    }
+
+    return gnssBatchingIface->stop();
+}
+
 static const JNINativeMethod sMethods[] = {
      /* name, signature, funcPtr */
     {"class_init_native", "()V", reinterpret_cast<void *>(
@@ -1829,6 +1988,27 @@
     {"native_set_emergency_supl_pdn",
             "(I)Z",
             reinterpret_cast<void *>(android_location_GnssLocationProvider_set_emergency_supl_pdn)},
+    {"native_get_batch_size",
+            "()I",
+            reinterpret_cast<void *>(android_location_GnssLocationProvider_get_batch_size)},
+    {"native_init_batching",
+            "()Z",
+            reinterpret_cast<void *>(android_location_GnssLocationProvider_init_batching)},
+    {"native_start_batch",
+            "(JZ)Z",
+            reinterpret_cast<void *>(android_location_GnssLocationProvider_start_batch)},
+    {"native_flush_batch",
+            "()V",
+            reinterpret_cast<void *>(android_location_GnssLocationProvider_flush_batch)},
+    {"native_stop_batch",
+            "()Z",
+            reinterpret_cast<void *>(android_location_GnssLocationProvider_stop_batch)},
+    {"native_init_batching",
+            "()Z",
+            reinterpret_cast<void *>(android_location_GnssLocationProvider_init_batching)},
+    {"native_cleanup_batching",
+            "()V",
+            reinterpret_cast<void *>(android_location_GnssLocationProvider_cleanup_batching)},
 };
 
 int register_android_server_location_GnssLocationProvider(JNIEnv* env) {
diff --git a/services/core/jni/onload.cpp b/services/core/jni/onload.cpp
index 6f505d5..899640e 100644
--- a/services/core/jni/onload.cpp
+++ b/services/core/jni/onload.cpp
@@ -45,6 +45,7 @@
 int register_android_server_PersistentDataBlockService(JNIEnv* env);
 int register_android_server_Watchdog(JNIEnv* env);
 int register_android_server_HardwarePropertiesManagerService(JNIEnv* env);
+int register_android_server_SyntheticPasswordManager(JNIEnv* env);
 };
 
 using namespace android;
@@ -85,6 +86,7 @@
     register_android_server_Watchdog(env);
     register_android_server_HardwarePropertiesManagerService(env);
     register_android_server_storage_AppFuse(env);
+    register_android_server_SyntheticPasswordManager(env);
 
     return JNI_VERSION_1_4;
 }
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 3c1d274..2b5a06d 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -60,6 +60,7 @@
 import android.annotation.UserIdInt;
 import android.app.Activity;
 import android.app.ActivityManager;
+import android.app.ActivityManagerInternal;
 import android.app.AlarmManager;
 import android.app.AppGlobals;
 import android.app.IActivityManager;
@@ -98,6 +99,7 @@
 import android.content.pm.ResolveInfo;
 import android.content.pm.ServiceInfo;
 import android.content.pm.UserInfo;
+import android.content.res.Resources;
 import android.database.ContentObserver;
 import android.graphics.Bitmap;
 import android.graphics.Color;
@@ -207,7 +209,7 @@
  */
 public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
 
-    private static final String LOG_TAG = "DevicePolicyManager";
+    protected static final String LOG_TAG = "DevicePolicyManager";
 
     private static final boolean VERBOSE_LOG = false; // DO NOT SUBMIT WITH TRUE
 
@@ -242,6 +244,8 @@
 
     private static final String TAG_INITIALIZATION_BUNDLE = "initialization-bundle";
 
+    private static final String TAG_PASSWORD_TOKEN_HANDLE = "password-token";
+
     private static final int REQUEST_EXPIRE_PASSWORD = 5571;
 
     private static final long MS_PER_DAY = TimeUnit.DAYS.toMillis(1);
@@ -251,7 +255,6 @@
     private static final String ACTION_EXPIRED_PASSWORD_NOTIFICATION
             = "com.android.server.ACTION_EXPIRED_PASSWORD_NOTIFICATION";
 
-    private static final int MONITORING_CERT_NOTIFICATION_ID = R.plurals.ssl_ca_cert_warning;
     private static final int PROFILE_WIPED_NOTIFICATION_ID = 1001;
     private static final int NETWORK_LOGGING_NOTIFICATION_ID = 1002;
 
@@ -408,6 +411,7 @@
         }
     };
 
+    /** Listens only if mHasFeature == true. */
     private final BroadcastReceiver mRemoteBugreportFinishedReceiver = new BroadcastReceiver() {
 
         @Override
@@ -419,6 +423,7 @@
         }
     };
 
+    /** Listens only if mHasFeature == true. */
     private final BroadcastReceiver mRemoteBugreportConsentReceiver = new BroadcastReceiver() {
 
         @Override
@@ -503,6 +508,8 @@
         boolean mAdminBroadcastPending = false;
         PersistableBundle mInitBundle = null;
 
+        long mPasswordTokenHandle = 0;
+
         public DevicePolicyData(int userHandle) {
             mUserHandle = userHandle;
         }
@@ -512,7 +519,21 @@
 
     final Handler mHandler;
 
-    BroadcastReceiver mReceiver = new BroadcastReceiver() {
+    /** Listens on any device, even when mHasFeature == false. */
+    final BroadcastReceiver mRootCaReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            if (StorageManager.inCryptKeeperBounce()) {
+                return;
+            }
+            final int userHandle = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, getSendingUserId());
+            new MonitoringCertNotificationTask(DevicePolicyManagerService.this, mInjector)
+                    .execute(userHandle);
+        }
+    };
+
+    /** Listens only if mHasFeature == true. */
+    final BroadcastReceiver mReceiver = new BroadcastReceiver() {
         @Override
         public void onReceive(Context context, Intent intent) {
             final String action = intent.getAction();
@@ -558,14 +579,7 @@
                     }
                 });
             }
-            if (Intent.ACTION_USER_UNLOCKED.equals(action)
-                    || Intent.ACTION_USER_STARTED.equals(action)
-                    || KeyChain.ACTION_TRUST_STORE_CHANGED.equals(action)) {
-                if (!StorageManager.inCryptKeeperBounce()) {
-                    new MonitoringCertNotificationTask().execute(
-                            intent.getIntExtra(Intent.EXTRA_USER_HANDLE, UserHandle.USER_ALL));
-                }
-            }
+
             if (Intent.ACTION_USER_ADDED.equals(action)) {
                 sendUserAddedOrRemovedCommand(DeviceAdminReceiver.ACTION_USER_ADDED, userHandle);
                 synchronized (DevicePolicyManagerService.this) {
@@ -1489,6 +1503,15 @@
             mContext = context;
         }
 
+        Context createContextAsUser(UserHandle user) throws PackageManager.NameNotFoundException {
+            final String packageName = mContext.getPackageName();
+            return mContext.createPackageContextAsUser(packageName, 0, user);
+        }
+
+        Resources getResources() {
+            return mContext.getResources();
+        }
+
         Owners newOwners() {
             return new Owners(getUserManager(), getUserManagerInternal(),
                     getPackageManagerInternal());
@@ -1724,6 +1747,10 @@
         boolean securityLogIsLoggingEnabled() {
             return SecurityLog.isLoggingEnabled();
         }
+
+        KeyChainConnection keyChainBindAsUser(UserHandle user) throws InterruptedException {
+            return KeyChain.bindAsUser(mContext, user);
+        }
     }
 
     /**
@@ -1754,18 +1781,27 @@
                 .hasSystemFeature(PackageManager.FEATURE_DEVICE_ADMIN);
         mIsWatch = mInjector.getPackageManager()
                 .hasSystemFeature(PackageManager.FEATURE_WATCH);
+
+        // Broadcast filter for changes to the trusted certificate store. These changes get a
+        // separate intent filter so we can listen to them even when device_admin is off.
+        IntentFilter filter = new IntentFilter();
+        filter.addAction(Intent.ACTION_USER_STARTED);
+        filter.addAction(Intent.ACTION_USER_UNLOCKED);
+        filter.addAction(KeyChain.ACTION_TRUST_STORE_CHANGED);
+        filter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);
+        mContext.registerReceiverAsUser(mRootCaReceiver, UserHandle.ALL, filter, null, mHandler);
+
         if (!mHasFeature) {
             // Skip the rest of the initialization
             return;
         }
-        IntentFilter filter = new IntentFilter();
+
+        filter = new IntentFilter();
         filter.addAction(Intent.ACTION_BOOT_COMPLETED);
         filter.addAction(ACTION_EXPIRED_PASSWORD_NOTIFICATION);
         filter.addAction(Intent.ACTION_USER_ADDED);
         filter.addAction(Intent.ACTION_USER_REMOVED);
         filter.addAction(Intent.ACTION_USER_STARTED);
-        filter.addAction(Intent.ACTION_USER_UNLOCKED);
-        filter.addAction(KeyChain.ACTION_TRUST_STORE_CHANGED);
         filter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);
         mContext.registerReceiverAsUser(mReceiver, UserHandle.ALL, filter, null, mHandler);
         filter = new IntentFilter();
@@ -1885,8 +1921,14 @@
     }
 
     private void setDeviceOwnerSystemPropertyLocked() {
-        // Device owner may still be provisioned, do not set the read-only system property yet.
-        if (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
@@ -2519,6 +2561,13 @@
                 out.endTag(null, TAG_INITIALIZATION_BUNDLE);
             }
 
+            if (policy.mPasswordTokenHandle != 0) {
+                out.startTag(null, TAG_PASSWORD_TOKEN_HANDLE);
+                out.attribute(null, ATTR_VALUE,
+                        Long.toString(policy.mPasswordTokenHandle));
+                out.endTag(null, TAG_PASSWORD_TOKEN_HANDLE);
+            }
+
             out.endTag(null, "policies");
 
             out.endDocument();
@@ -2725,6 +2774,9 @@
                         m.symbols = Integer.parseInt(parser.getAttributeValue(null, "symbols"));
                         m.nonLetter = Integer.parseInt(parser.getAttributeValue(null, "nonletter"));
                     }
+                } else if (TAG_PASSWORD_TOKEN_HANDLE.equals(tag)) {
+                    policy.mPasswordTokenHandle = Long.parseLong(
+                            parser.getAttributeValue(null, ATTR_VALUE));
                 } else {
                     Slog.w(LOG_TAG, "Unknown tag: " + tag);
                     XmlUtils.skipCurrentTag(parser);
@@ -2945,125 +2997,34 @@
         }
     }
 
-    private class MonitoringCertNotificationTask extends AsyncTask<Integer, Void, Void> {
-        @Override
-        protected Void doInBackground(Integer... params) {
-            int userHandle = params[0];
+    /**
+     * Remove deleted CA certificates from the "approved" list for a particular user, counting
+     * the number still remaining to approve.
+     *
+     * @param userHandle user to check for. This must be a real user and not, for example,
+     *        {@link UserHandle#ALL}.
+     * @param installedCertificates the full set of certificate authorities currently installed for
+     *        {@param userHandle}. After calling this function, {@code mAcceptedCaCertificates} will
+     *        correspond to some subset of this.
+     *
+     * @return number of certificates yet to be approved by {@param userHandle}.
+     */
+    protected synchronized int retainAcceptedCertificates(final UserHandle userHandle,
+            final @NonNull Collection<String> installedCertificates) {
+        enforceManageUsers();
 
-            if (userHandle == UserHandle.USER_ALL) {
-                for (UserInfo userInfo : mUserManager.getUsers(true)) {
-                    manageNotification(userInfo.getUserHandle());
-                }
-            } else {
-                manageNotification(UserHandle.of(userHandle));
-            }
-            return null;
-        }
+        if (!mHasFeature) {
+            return installedCertificates.size();
+        } else {
+            final DevicePolicyData policy = getUserData(userHandle.getIdentifier());
 
-        private void manageNotification(UserHandle userHandle) {
-            if (!mUserManager.isUserUnlocked(userHandle)) {
-                return;
+            // Remove deleted certificates. Flush xml if necessary.
+            if (policy.mAcceptedCaCertificates.retainAll(installedCertificates)) {
+                saveSettingsLocked(userHandle.getIdentifier());
             }
 
-            // Call out to KeyChain to check for CAs which are waiting for approval.
-            final List<String> pendingCertificates;
-            try {
-                pendingCertificates = getInstalledCaCertificates(userHandle);
-            } catch (RemoteException | RuntimeException e) {
-                Log.e(LOG_TAG, "Could not retrieve certificates from KeyChain service", e);
-                return;
-            }
-
-            synchronized (DevicePolicyManagerService.this) {
-                final DevicePolicyData policy = getUserData(userHandle.getIdentifier());
-
-                // Remove deleted certificates. Flush xml if necessary.
-                if (policy.mAcceptedCaCertificates.retainAll(pendingCertificates)) {
-                    saveSettingsLocked(userHandle.getIdentifier());
-                }
-                // Trim to approved certificates.
-                pendingCertificates.removeAll(policy.mAcceptedCaCertificates);
-            }
-
-            if (pendingCertificates.isEmpty()) {
-                mInjector.getNotificationManager().cancelAsUser(
-                        null, MONITORING_CERT_NOTIFICATION_ID, userHandle);
-                return;
-            }
-
-            // Build and show a warning notification
-            int smallIconId;
-            String contentText;
-            int parentUserId = userHandle.getIdentifier();
-            if (getProfileOwner(userHandle.getIdentifier()) != null) {
-                contentText = mContext.getString(R.string.ssl_ca_cert_noti_managed,
-                        getProfileOwnerName(userHandle.getIdentifier()));
-                smallIconId = R.drawable.stat_sys_certificate_info;
-                parentUserId = getProfileParentId(userHandle.getIdentifier());
-            } else if (getDeviceOwnerUserId() == userHandle.getIdentifier()) {
-                contentText = mContext.getString(R.string.ssl_ca_cert_noti_managed,
-                        getDeviceOwnerName());
-                smallIconId = R.drawable.stat_sys_certificate_info;
-            } else {
-                contentText = mContext.getString(R.string.ssl_ca_cert_noti_by_unknown);
-                smallIconId = android.R.drawable.stat_sys_warning;
-            }
-
-            final int numberOfCertificates = pendingCertificates.size();
-            Intent dialogIntent = new Intent(Settings.ACTION_MONITORING_CERT_INFO);
-            dialogIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
-            dialogIntent.setPackage("com.android.settings");
-            dialogIntent.putExtra(Settings.EXTRA_NUMBER_OF_CERTIFICATES, numberOfCertificates);
-            dialogIntent.putExtra(Intent.EXTRA_USER_ID, userHandle.getIdentifier());
-            PendingIntent notifyIntent = PendingIntent.getActivityAsUser(mContext, 0,
-                    dialogIntent, PendingIntent.FLAG_UPDATE_CURRENT, null,
-                    new UserHandle(parentUserId));
-
-            final Context userContext;
-            try {
-                final String packageName = mContext.getPackageName();
-                userContext = mContext.createPackageContextAsUser(packageName, 0, userHandle);
-            } catch (PackageManager.NameNotFoundException e) {
-                Log.e(LOG_TAG, "Create context as " + userHandle + " failed", e);
-                return;
-            }
-            final Notification noti = new Notification.Builder(userContext)
-                .setSmallIcon(smallIconId)
-                .setContentTitle(mContext.getResources().getQuantityText(
-                        R.plurals.ssl_ca_cert_warning, numberOfCertificates))
-                .setContentText(contentText)
-                .setContentIntent(notifyIntent)
-                .setPriority(Notification.PRIORITY_HIGH)
-                .setShowWhen(false)
-                .setColor(mContext.getColor(
-                        com.android.internal.R.color.system_notification_accent_color))
-                .build();
-
-            mInjector.getNotificationManager().notifyAsUser(
-                    null, MONITORING_CERT_NOTIFICATION_ID, noti, userHandle);
-        }
-
-        private List<String> getInstalledCaCertificates(UserHandle userHandle)
-                throws RemoteException, RuntimeException {
-            KeyChainConnection conn = null;
-            try {
-                conn = KeyChain.bindAsUser(mContext, userHandle);
-                List<ParcelableString> aliases = conn.getService().getUserCaAliases().getList();
-                List<String> result = new ArrayList<>(aliases.size());
-                for (int i = 0; i < aliases.size(); i++) {
-                    result.add(aliases.get(i).string);
-                }
-                return result;
-            } catch (InterruptedException e) {
-                Thread.currentThread().interrupt();
-                return null;
-            } catch (AssertionError e) {
-                throw new RuntimeException(e);
-            } finally {
-                if (conn != null) {
-                    conn.close();
-                }
-            }
+            // Trim approved certificates from the count.
+            return installedCertificates.size() - policy.mAcceptedCaCertificates.size();
         }
     }
 
@@ -3231,7 +3192,6 @@
                 // If admin is a device or profile owner tidy that up first.
                 if (isDeviceOwner(adminReceiver, userHandle)) {
                     clearDeviceOwnerLocked(getDeviceOwnerAdminLocked(), userHandle);
-                    clearDeviceOwnerUserRestrictionLocked(UserHandle.of(userHandle));
                 }
                 if (isProfileOwner(adminReceiver, userHandle)) {
                     final ActiveAdmin admin = getActiveAdminUncheckedLocked(adminReceiver,
@@ -3247,10 +3207,8 @@
         }
     }
 
-    // It's temporary solution to clear DISALLOW_ADD_USER after CTS
-    // STOPSHIP(b/31952368) when the restriction is moved from system to the device owner,
-    // it can be removed.
     private void clearDeviceOwnerUserRestrictionLocked(UserHandle userHandle) {
+        // ManagedProvisioning/DPC sets DISALLOW_ADD_USER. Clear to recover to the original state
         if (mUserManager.hasUserRestriction(UserManager.DISALLOW_ADD_USER, userHandle)) {
             mUserManager.setUserRestriction(UserManager.DISALLOW_ADD_USER, false, userHandle);
         }
@@ -4127,12 +4085,8 @@
             mInjector.binderRestoreCallingIdentity(token);
         }
     }
-
     @Override
     public boolean resetPassword(String passwordOrNull, int flags) throws RemoteException {
-        if (!mHasFeature) {
-            return false;
-        }
         final int callingUid = mInjector.binderGetCallingUid();
         final int userHandle = mInjector.userHandleGetCallingUserId();
 
@@ -4143,15 +4097,18 @@
             enforceNotManagedProfile(userHandle, "clear the active password");
         }
 
-        int quality;
         synchronized (this) {
             // If caller has PO (or DO) it can change the password, so see if that's the case first.
             ActiveAdmin admin = getActiveAdminWithPolicyForUidLocked(
                     null, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER, callingUid);
             final boolean preN;
             if (admin != null) {
-                preN = getTargetSdk(admin.info.getPackageName(),
-                        userHandle) <= android.os.Build.VERSION_CODES.M;
+                final int targetSdk = getTargetSdk(admin.info.getPackageName(), userHandle);
+                if (targetSdk >= Build.VERSION_CODES.O) {
+                    throw new SecurityException("resetPassword() is deprecated for DPC targeting O"
+                            + " or later");
+                }
+                preN = targetSdk <= android.os.Build.VERSION_CODES.M;
             } else {
                 // Otherwise, make sure the caller has any active admin with the right policy.
                 admin = getActiveAdminForCallerLocked(null,
@@ -4202,7 +4159,15 @@
                     return false;
                 }
             }
+        }
 
+        return resetPasswordInternal(password, 0, null, flags, callingUid, userHandle);
+    }
+
+    private boolean resetPasswordInternal(String password, long tokenHandle, byte[] token,
+            int flags, int callingUid, int userHandle) {
+        int quality;
+        synchronized (this) {
             quality = getPasswordQuality(null, userHandle, /* parent */ false);
             if (quality == DevicePolicyManager.PASSWORD_QUALITY_MANAGED) {
                 quality = DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED;
@@ -4292,11 +4257,20 @@
         // Don't do this with the lock held, because it is going to call
         // back in to the service.
         final long ident = mInjector.binderClearCallingIdentity();
+        final boolean result;
         try {
-            if (!TextUtils.isEmpty(password)) {
-                mLockPatternUtils.saveLockPassword(password, null, quality, userHandle);
+            if (token == null) {
+                if (!TextUtils.isEmpty(password)) {
+                    mLockPatternUtils.saveLockPassword(password, null, quality, userHandle);
+                } else {
+                    mLockPatternUtils.clearLock(null, userHandle);
+                }
+                result = true;
             } else {
-                mLockPatternUtils.clearLock(userHandle);
+                result = mLockPatternUtils.setLockCredentialWithToken(password,
+                        TextUtils.isEmpty(password) ? LockPatternUtils.CREDENTIAL_TYPE_NONE
+                                : LockPatternUtils.CREDENTIAL_TYPE_PASSWORD,
+                        tokenHandle, token, userHandle);
             }
             boolean requireEntry = (flags & DevicePolicyManager.RESET_PASSWORD_REQUIRE_ENTRY) != 0;
             if (requireEntry) {
@@ -4313,8 +4287,7 @@
         } finally {
             mInjector.binderRestoreCallingIdentity(ident);
         }
-
-        return true;
+        return result;
     }
 
     private boolean isLockScreenSecureUnchecked(int userId) {
@@ -4628,7 +4601,7 @@
             }
             saveSettingsLocked(userId);
         }
-        new MonitoringCertNotificationTask().execute(userId);
+        new MonitoringCertNotificationTask(this, mInjector).execute(userId);
         return true;
     }
 
@@ -4652,7 +4625,7 @@
                     saveSettingsLocked(userInfo.id);
                 }
 
-                new MonitoringCertNotificationTask().execute(userInfo.id);
+                new MonitoringCertNotificationTask(this, mInjector).execute(userInfo.id);
             }
         }
     }
@@ -6151,8 +6124,12 @@
                 intent.setComponent(mOwners.getDeviceOwnerComponent());
                 intent.setDataAndType(bugreportUri, RemoteBugreportUtils.BUGREPORT_MIMETYPE);
                 intent.putExtra(DeviceAdminReceiver.EXTRA_BUGREPORT_HASH, bugreportHash);
-                mContext.grantUriPermission(mOwners.getDeviceOwnerComponent().getPackageName(),
-                        bugreportUri, Intent.FLAG_GRANT_READ_URI_PERMISSION);
+                intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
+
+                LocalServices.getService(ActivityManagerInternal.class)
+                        .grantUriPermissionFromIntent(Process.SHELL_UID,
+                                mOwners.getDeviceOwnerComponent().getPackageName(),
+                                intent, mOwners.getDeviceOwnerUserId());
                 mContext.sendBroadcastAsUser(intent, UserHandle.of(mOwners.getDeviceOwnerUserId()));
             }
         } catch (FileNotFoundException e) {
@@ -6593,6 +6570,7 @@
         mOwners.writeDeviceOwner();
         updateDeviceOwnerLocked();
 
+        clearDeviceOwnerUserRestrictionLocked(UserHandle.of(userId));
         mInjector.securityLogSetLoggingEnabledProperty(false);
         mSecurityLogMonitor.stop();
         setNetworkLoggingActiveInternal(false);
@@ -6706,6 +6684,8 @@
         policy.mDelegationMap.clear();
         policy.mStatusBarDisabled = false;
         policy.mUserProvisioningState = DevicePolicyManager.STATE_USER_UNMANAGED;
+        policy.mAffiliationIds.clear();
+        policy.mLockTaskPackages.clear();
         saveSettingsLocked(userId);
 
         try {
@@ -7141,7 +7121,7 @@
         return UserHandle.isSameApp(mInjector.binderGetCallingUid(), Process.SYSTEM_UID);
     }
 
-    private int getProfileParentId(int userHandle) {
+    protected int getProfileParentId(int userHandle) {
         final long ident = mInjector.binderClearCallingIdentity();
         try {
             UserInfo parentUser = mUserManager.getProfileParent(userHandle);
@@ -7258,6 +7238,7 @@
             long id = mInjector.binderClearCallingIdentity();
             try {
                 mIPackageManager.addPersistentPreferredActivity(filter, activity, userHandle);
+                mIPackageManager.flushPackageRestrictionsAsUser(userHandle);
             } catch (RemoteException re) {
                 // Shouldn't happen
             } finally {
@@ -7276,6 +7257,7 @@
             long id = mInjector.binderClearCallingIdentity();
             try {
                 mIPackageManager.clearPackagePersistentPreferredActivities(packageName, userHandle);
+                mIPackageManager.flushPackageRestrictionsAsUser(userHandle);
             } catch (RemoteException re) {
                 // Shouldn't happen
             } finally {
@@ -8564,18 +8546,11 @@
         }
     }
 
-    /**
-     * Sets which packages may enter lock task mode.
-     *
-     * <p>This function can only be called by the device owner or alternatively by the profile owner
-     * in case the user is affiliated.
-     *
-     * @param packages The list of packages allowed to enter lock task mode.
-     */
     @Override
     public void setLockTaskPackages(ComponentName who, String[] packages)
             throws SecurityException {
         Preconditions.checkNotNull(who, "ComponentName is null");
+        Preconditions.checkNotNull(packages, "packages is null");
 
         synchronized (this) {
             getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
@@ -8598,48 +8573,48 @@
         updateLockTaskPackagesLocked(packages, userHandle);
     }
 
-    /**
-     * This function returns the list of components allowed to start the task lock mode.
-     */
+    private void maybeClearLockTaskPackagesLocked() {
+        final long ident = mInjector.binderClearCallingIdentity();
+        try {
+            final List<UserInfo> userInfos = mUserManager.getUsers(/*excludeDying=*/ true);
+            for (int i = 0; i < userInfos.size(); i++) {
+                int userId = userInfos.get(i).id;
+                final List<String> lockTaskPackages = getUserData(userId).mLockTaskPackages;
+                if (!lockTaskPackages.isEmpty() &&
+                        !isUserAffiliatedWithDeviceLocked(userId)) {
+                    Slog.d(LOG_TAG,
+                            "User id " + userId + " not affiliated. Clearing lock task packages");
+                    setLockTaskPackagesLocked(userId, Collections.<String>emptyList());
+                }
+            }
+        } finally {
+            mInjector.binderRestoreCallingIdentity(ident);
+        }
+    }
+
     @Override
     public String[] getLockTaskPackages(ComponentName who) {
         Preconditions.checkNotNull(who, "ComponentName is null");
+
+        final int userHandle = mInjector.binderGetCallingUserHandle().getIdentifier();
         synchronized (this) {
-            getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_DEVICE_OWNER);
-            int userHandle = mInjector.binderGetCallingUserHandle().getIdentifier();
-            final List<String> packages = getLockTaskPackagesLocked(userHandle);
+            getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
+            if (!isUserAffiliatedWithDeviceLocked(userHandle)) {
+                throw new SecurityException("Admin " + who +
+                    " is neither the device owner or affiliated user's profile owner.");
+            }
+
+            final List<String> packages = getUserData(userHandle).mLockTaskPackages;
             return packages.toArray(new String[packages.size()]);
         }
     }
 
-    private List<String> getLockTaskPackagesLocked(int userHandle) {
-        final DevicePolicyData policy = getUserData(userHandle);
-        return policy.mLockTaskPackages;
-    }
-
-    /**
-     * This function lets the caller know whether the given package is allowed to start the
-     * lock task mode.
-     * @param pkg The package to check
-     */
     @Override
     public boolean isLockTaskPermitted(String pkg) {
-        // Get current user's devicepolicy
-        int uid = mInjector.binderGetCallingUid();
-        int userHandle = UserHandle.getUserId(uid);
-        DevicePolicyData policy = getUserData(userHandle);
+        final int userHandle = mInjector.userHandleGetCallingUserId();
         synchronized (this) {
-            for (int i = 0; i < policy.mLockTaskPackages.size(); i++) {
-                String lockTaskPackage = policy.mLockTaskPackages.get(i);
-
-                // If the given package equals one of the packages stored our list,
-                // we allow this package to start lock task mode.
-                if (lockTaskPackage.equals(pkg)) {
-                    return true;
-                }
-            }
+            return getUserData(userHandle).mLockTaskPackages.contains(pkg);
         }
-        return false;
     }
 
     @Override
@@ -8735,7 +8710,7 @@
         Preconditions.checkNotNull(who, "ComponentName is null");
         synchronized (this) {
             getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
-            setUserRestriction(who, UserManager.DISALLLOW_UNMUTE_DEVICE, on);
+            setUserRestriction(who, UserManager.DISALLOW_UNMUTE_DEVICE, on);
         }
     }
 
@@ -9144,13 +9119,16 @@
             }
             final String deviceOwnerPackageName = mOwners.getDeviceOwnerComponent()
                     .getPackageName();
-            final String[] pkgs = mInjector.getPackageManager().getPackagesForUid(callerUid);
-
-            for (String pkg : pkgs) {
-                if (deviceOwnerPackageName.equals(pkg)) {
-                    return true;
+                try {
+                    String[] pkgs = mInjector.getIPackageManager().getPackagesForUid(callerUid);
+                    for (String pkg : pkgs) {
+                        if (deviceOwnerPackageName.equals(pkg)) {
+                            return true;
+                        }
+                    }
+                } catch (RemoteException e) {
+                    return false;
                 }
-            }
         }
 
         return false;
@@ -9848,6 +9826,7 @@
             // but as a result of that other users might become affiliated or un-affiliated.
             maybePauseDeviceWideLoggingLocked();
             maybeResumeDeviceWideLoggingLocked();
+            maybeClearLockTaskPackagesLocked();
         }
     }
 
@@ -10095,7 +10074,9 @@
 
     @Override
     public boolean isDeviceProvisioned() {
-        return !TextUtils.isEmpty(mInjector.systemPropertiesGet(PROPERTY_DEVICE_OWNER_PRESENT));
+        synchronized (this) {
+            return getUserDataUnchecked(UserHandle.USER_SYSTEM).mUserSetupComplete;
+        }
     }
 
     private void removePackageIfRequired(final String packageName, final int userId) {
@@ -10670,4 +10651,98 @@
         enforceDeviceOwnerOrManageUsers();
         return getUserData(UserHandle.USER_SYSTEM).mLastNetworkLogsRetrievalTime;
     }
+
+    @Override
+    public boolean setResetPasswordToken(ComponentName admin, byte[] token) {
+        if (!mHasFeature) {
+            return false;
+        }
+        if (token == null || token.length < 32) {
+            throw new IllegalArgumentException("token must be at least 32-byte long");
+        }
+        synchronized (this) {
+            final int userHandle = mInjector.userHandleGetCallingUserId();
+            getActiveAdminForCallerLocked(admin, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
+
+            DevicePolicyData policy = getUserData(userHandle);
+            long ident = mInjector.binderClearCallingIdentity();
+            try {
+                if (policy.mPasswordTokenHandle != 0) {
+                    mLockPatternUtils.removeEscrowToken(policy.mPasswordTokenHandle, userHandle);
+                }
+
+                policy.mPasswordTokenHandle = mLockPatternUtils.addEscrowToken(token, userHandle);
+                saveSettingsLocked(userHandle);
+                return policy.mPasswordTokenHandle != 0;
+            } finally {
+                mInjector.binderRestoreCallingIdentity(ident);
+            }
+        }
+    }
+
+    @Override
+    public boolean clearResetPasswordToken(ComponentName admin) {
+        if (!mHasFeature) {
+            return false;
+        }
+        synchronized (this) {
+            final int userHandle = mInjector.userHandleGetCallingUserId();
+            getActiveAdminForCallerLocked(admin, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
+
+            DevicePolicyData policy = getUserData(userHandle);
+            if (policy.mPasswordTokenHandle != 0) {
+                long ident = mInjector.binderClearCallingIdentity();
+                try {
+                    boolean result = mLockPatternUtils.removeEscrowToken(
+                            policy.mPasswordTokenHandle, userHandle);
+                    policy.mPasswordTokenHandle = 0;
+                    saveSettingsLocked(userHandle);
+                    return result;
+                } finally {
+                    mInjector.binderRestoreCallingIdentity(ident);
+                }
+            }
+        }
+        return false;
+    }
+
+    @Override
+    public boolean isResetPasswordTokenActive(ComponentName admin) {
+        synchronized (this) {
+            final int userHandle = mInjector.userHandleGetCallingUserId();
+            getActiveAdminForCallerLocked(admin, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
+
+            DevicePolicyData policy = getUserData(userHandle);
+            if (policy.mPasswordTokenHandle != 0) {
+                long ident = mInjector.binderClearCallingIdentity();
+                try {
+                    return mLockPatternUtils.isEscrowTokenActive(policy.mPasswordTokenHandle,
+                            userHandle);
+                } finally {
+                    mInjector.binderRestoreCallingIdentity(ident);
+                }
+            }
+        }
+        return false;
+    }
+
+    @Override
+    public boolean resetPasswordWithToken(ComponentName admin, String passwordOrNull, byte[] token,
+            int flags) {
+        Preconditions.checkNotNull(token);
+        synchronized (this) {
+            final int userHandle = mInjector.userHandleGetCallingUserId();
+            getActiveAdminForCallerLocked(admin, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
+
+            DevicePolicyData policy = getUserData(userHandle);
+            if (policy.mPasswordTokenHandle != 0) {
+                final String password = passwordOrNull != null ? passwordOrNull : "";
+                return resetPasswordInternal(password, policy.mPasswordTokenHandle, token,
+                        flags, mInjector.binderGetCallingUid(), userHandle);
+            } else {
+                Slog.w(LOG_TAG, "No saved token handle");
+            }
+        }
+        return false;
+    }
 }
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/MonitoringCertNotificationTask.java b/services/devicepolicy/java/com/android/server/devicepolicy/MonitoringCertNotificationTask.java
new file mode 100644
index 0000000..03c137a
--- /dev/null
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/MonitoringCertNotificationTask.java
@@ -0,0 +1,166 @@
+/*
+ * 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.server.devicepolicy;
+
+import android.app.Notification;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.content.pm.UserInfo;
+import android.content.res.Resources;
+import android.graphics.Color;
+import android.os.AsyncTask;
+import android.os.Build;
+import android.os.RemoteException;
+import android.os.UserHandle;
+import android.os.UserManager;
+import android.provider.Settings;
+import android.security.KeyChain.KeyChainConnection;
+import android.util.Log;
+
+import com.android.internal.R;
+import com.android.internal.util.ParcelableString;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+public class MonitoringCertNotificationTask extends AsyncTask<Integer, Void, Void> {
+    protected static final String LOG_TAG = DevicePolicyManagerService.LOG_TAG;
+    protected static final int MONITORING_CERT_NOTIFICATION_ID = R.plurals.ssl_ca_cert_warning;
+
+    private final DevicePolicyManagerService mService;
+    private final DevicePolicyManagerService.Injector mInjector;
+
+    public MonitoringCertNotificationTask(final DevicePolicyManagerService service,
+            final DevicePolicyManagerService.Injector injector) {
+        super();
+        mService = service;
+        mInjector = injector;
+    }
+
+    @Override
+    protected Void doInBackground(Integer... params) {
+        int userHandle = params[0];
+
+        if (userHandle == UserHandle.USER_ALL) {
+            for (UserInfo userInfo : mInjector.getUserManager().getUsers(true)) {
+                repostOrClearNotification(userInfo.getUserHandle());
+            }
+        } else {
+            repostOrClearNotification(UserHandle.of(userHandle));
+        }
+        return null;
+    }
+
+    private void repostOrClearNotification(UserHandle userHandle) {
+        if (!mInjector.getUserManager().isUserUnlocked(userHandle.getIdentifier())) {
+            return;
+        }
+
+        // Call out to KeyChain to check for CAs which are waiting for approval.
+        final int pendingCertificateCount;
+        try {
+            pendingCertificateCount = mService.retainAcceptedCertificates(
+                    userHandle, getInstalledCaCertificates(userHandle));
+        } catch (RemoteException | RuntimeException e) {
+            Log.e(LOG_TAG, "Could not retrieve certificates from KeyChain service", e);
+            return;
+        }
+
+        if (pendingCertificateCount != 0) {
+            showNotification(userHandle, pendingCertificateCount);
+        } else {
+            mInjector.getNotificationManager().cancelAsUser(
+                    LOG_TAG, MONITORING_CERT_NOTIFICATION_ID, userHandle);
+        }
+    }
+
+    private void showNotification(UserHandle userHandle, int pendingCertificateCount) {
+        // Create a context for the target user.
+        final Context userContext;
+        try {
+            userContext = mInjector.createContextAsUser(userHandle);
+        } catch (PackageManager.NameNotFoundException e) {
+            Log.e(LOG_TAG, "Create context as " + userHandle + " failed", e);
+            return;
+        }
+
+        // Build and show a warning notification
+        int smallIconId;
+        String contentText;
+        int parentUserId = userHandle.getIdentifier();
+        Resources resources = mInjector.getResources();
+        if (mService.getProfileOwner(userHandle.getIdentifier()) != null) {
+            contentText = resources.getString(R.string.ssl_ca_cert_noti_managed,
+                    mService.getProfileOwnerName(userHandle.getIdentifier()));
+            smallIconId = R.drawable.stat_sys_certificate_info;
+            parentUserId = mService.getProfileParentId(userHandle.getIdentifier());
+        } else if (mService.getDeviceOwnerUserId() == userHandle.getIdentifier()) {
+            contentText = resources.getString(R.string.ssl_ca_cert_noti_managed,
+                    mService.getDeviceOwnerName());
+            smallIconId = R.drawable.stat_sys_certificate_info;
+        } else {
+            contentText = resources.getString(R.string.ssl_ca_cert_noti_by_unknown);
+            smallIconId = android.R.drawable.stat_sys_warning;
+        }
+
+        Intent dialogIntent = new Intent(Settings.ACTION_MONITORING_CERT_INFO);
+        dialogIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
+        // TODO this next line is taken from original notification code in
+        // {@link DevicePolicyManagerService} but not a very good way of doing it. Do it better.
+        dialogIntent.setPackage("com.android.settings");
+        dialogIntent.putExtra(Settings.EXTRA_NUMBER_OF_CERTIFICATES, pendingCertificateCount);
+        dialogIntent.putExtra(Intent.EXTRA_USER_ID, userHandle.getIdentifier());
+        PendingIntent notifyIntent = PendingIntent.getActivityAsUser(userContext, 0,
+                dialogIntent, PendingIntent.FLAG_UPDATE_CURRENT, null,
+                UserHandle.of(parentUserId));
+
+        final Notification noti = new Notification.Builder(userContext)
+            .setSmallIcon(smallIconId)
+            .setContentTitle(resources.getQuantityText(R.plurals.ssl_ca_cert_warning,
+                    pendingCertificateCount))
+            .setContentText(contentText)
+            .setContentIntent(notifyIntent)
+            .setPriority(Notification.PRIORITY_HIGH)
+            .setShowWhen(false)
+            .setColor(R.color.system_notification_accent_color)
+            .build();
+
+        mInjector.getNotificationManager().notifyAsUser(
+                LOG_TAG, MONITORING_CERT_NOTIFICATION_ID, noti, userHandle);
+    }
+
+    private List<String> getInstalledCaCertificates(UserHandle userHandle)
+            throws RemoteException, RuntimeException {
+        try (KeyChainConnection conn = mInjector.keyChainBindAsUser(userHandle)) {
+            List<ParcelableString> aliases = conn.getService().getUserCaAliases().getList();
+            List<String> result = new ArrayList<>(aliases.size());
+            for (int i = 0; i < aliases.size(); i++) {
+                result.add(aliases.get(i).string);
+            }
+            return result;
+        } catch (InterruptedException e) {
+            Thread.currentThread().interrupt();
+            return null;
+        } catch (AssertionError e) {
+            throw new RuntimeException(e);
+        }
+    }
+}
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index b911d2d..7917644 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -35,6 +35,7 @@
 import android.os.IIncidentManager;
 import android.os.Looper;
 import android.os.PowerManager;
+import android.os.Process;
 import android.os.RemoteException;
 import android.os.ServiceManager;
 import android.os.StrictMode;
@@ -63,7 +64,6 @@
 import com.android.server.camera.CameraService;
 import com.android.server.clipboard.ClipboardService;
 import com.android.server.connectivity.IpConnectivityMetrics;
-import com.android.server.connectivity.MetricsLoggerService;
 import com.android.server.coverage.CoverageService;
 import com.android.server.devicepolicy.DevicePolicyManagerService;
 import com.android.server.display.DisplayManagerService;
@@ -125,8 +125,13 @@
 public final class SystemServer {
     private static final String TAG = "SystemServer";
 
+    // Tag for timing measurement of main thread.
+    private static final String SYSTEM_SERVER_TIMING_TAG = "SystemServerTiming";
+    // Tag for timing measurement of non-main asynchronous operations.
+    private static final String SYSTEM_SERVER_TIMING_ASYNC_TAG = SYSTEM_SERVER_TIMING_TAG + "Async";
+
     private static final BootTimingsTraceLog BOOT_TIMINGS_TRACE_LOG
-            = new BootTimingsTraceLog("SystemServerTiming", Trace.TRACE_TAG_SYSTEM_SERVER);
+            = new BootTimingsTraceLog(SYSTEM_SERVER_TIMING_TAG, Trace.TRACE_TAG_SYSTEM_SERVER);
 
     private static final String ENCRYPTING_STATE = "trigger_restart_min_framework";
     private static final String ENCRYPTED_STATE = "1";
@@ -149,6 +154,8 @@
             "com.android.server.voiceinteraction.VoiceInteractionManagerService";
     private static final String PRINT_MANAGER_SERVICE_CLASS =
             "com.android.server.print.PrintManagerService";
+    private static final String COMPANION_DEVICE_MANAGER_SERVICE_CLASS =
+            "com.android.server.print.CompanionDeviceManagerService";
     private static final String USB_SERVICE_CLASS =
             "com.android.server.usb.UsbService$Lifecycle";
     private static final String MIDI_SERVICE_CLASS =
@@ -227,8 +234,13 @@
     private boolean mFirstBoot;
     private final boolean mRuntimeRestart;
 
+    private static final String START_SENSOR_SERVICE = "StartSensorService";
+    private Future<?> mSensorServiceStart;
+    private Future<?> mZygotePreload;
+
+
     /**
-     * Start the sensor service.
+     * Start the sensor service. This is a blocking call and can take time.
      */
     private static native void startSensorService();
 
@@ -382,7 +394,7 @@
             MetricsLogger.histogram(null, "boot_system_server_ready", uptimeMillis);
             final int MAX_UPTIME_MILLIS = 60 * 1000;
             if (uptimeMillis > MAX_UPTIME_MILLIS) {
-                Slog.wtf("SystemServerTiming",
+                Slog.wtf(SYSTEM_SERVER_TIMING_TAG,
                         "SystemServer init took too long. uptimeMillis=" + uptimeMillis);
             }
         }
@@ -584,9 +596,15 @@
 
         // The sensor service needs access to package manager service, app ops
         // service, and permissions service, therefore we start it after them.
-        traceBeginAndSlog("StartSensorService");
-        startSensorService();
-        traceEnd();
+        // Start sensor service in a separate thread. Completion should be checked
+        // before using it.
+        mSensorServiceStart = SystemServerInitThreadPool.get().submit(() -> {
+            BootTimingsTraceLog traceLog = new BootTimingsTraceLog(
+                    SYSTEM_SERVER_TIMING_ASYNC_TAG, Trace.TRACE_TAG_SYSTEM_SERVER);
+            traceLog.traceBegin(START_SENSOR_SERVICE);
+            startSensorService();
+            traceLog.traceEnd();
+        }, START_SENSOR_SERVICE);
     }
 
     /**
@@ -672,6 +690,26 @@
         }
 
         try {
+            final String SECONDARY_ZYGOTE_PRELOAD = "SecondaryZygotePreload";
+            // We start the preload ~1s before the webview factory preparation, to
+            // ensure that it completes before the 32 bit relro process is forked
+            // from the zygote. In the event that it takes too long, the webview
+            // RELRO process will block, but it will do so without holding any locks.
+            mZygotePreload = SystemServerInitThreadPool.get().submit(() -> {
+                try {
+                    Slog.i(TAG, SECONDARY_ZYGOTE_PRELOAD);
+                    BootTimingsTraceLog traceLog = new BootTimingsTraceLog(
+                            SYSTEM_SERVER_TIMING_ASYNC_TAG, Trace.TRACE_TAG_SYSTEM_SERVER);
+                    traceLog.traceBegin(SECONDARY_ZYGOTE_PRELOAD);
+                    if (!Process.zygoteProcess.preloadDefault(Build.SUPPORTED_32_BIT_ABIS[0])) {
+                        Slog.e(TAG, "Unable to preload default resources");
+                    }
+                    traceLog.traceEnd();
+                } catch (Exception ex) {
+                    Slog.e(TAG, "Exception preloading default resources", ex);
+                }
+            }, SECONDARY_ZYGOTE_PRELOAD);
+
             traceBeginAndSlog("StartKeyAttestationApplicationIdProviderService");
             ServiceManager.addService("sec_key_att_app_id_provider",
                     new KeyAttestationApplicationIdProviderService(context));
@@ -742,6 +780,9 @@
             traceEnd();
 
             traceBeginAndSlog("StartWindowManagerService");
+            // WMS needs sensor service ready
+            ConcurrentUtils.waitForFutureNoInterrupt(mSensorServiceStart, START_SENSOR_SERVICE);
+            mSensorServiceStart = null;
             wm = WindowManagerService.main(context, inputManager,
                     mFactoryTestMode != FactoryTest.FACTORY_TEST_LOW_LEVEL,
                     !mFirstBoot, mOnlyCore, new PhoneWindowManager());
@@ -787,10 +828,6 @@
                 traceEnd();
             }
 
-            traceBeginAndSlog("ConnectivityMetricsLoggerService");
-            mSystemServiceManager.startService(MetricsLoggerService.class);
-            traceEnd();
-
             traceBeginAndSlog("IpConnectivityMetrics");
             mSystemServiceManager.startService(IpConnectivityMetrics.class);
             traceEnd();
@@ -1333,6 +1370,10 @@
                 traceEnd();
             }
 
+            traceBeginAndSlog("StartCompanionDeviceManager");
+            mSystemServiceManager.startService(COMPANION_DEVICE_MANAGER_SERVICE_CLASS);
+            traceEnd();
+
             traceBeginAndSlog("StartRestrictionManager");
             mSystemServiceManager.startService(RestrictionsManagerService.class);
             traceEnd();
@@ -1590,8 +1631,10 @@
                 webviewPrep = SystemServerInitThreadPool.get().submit(() -> {
                     Slog.i(TAG, WEBVIEW_PREPARATION);
                     BootTimingsTraceLog traceLog = new BootTimingsTraceLog(
-                            "SystemServerTiming", Trace.TRACE_TAG_SYSTEM_SERVER);
+                            SYSTEM_SERVER_TIMING_ASYNC_TAG, Trace.TRACE_TAG_SYSTEM_SERVER);
                     traceLog.traceBegin(WEBVIEW_PREPARATION);
+                    ConcurrentUtils.waitForFutureNoInterrupt(mZygotePreload, "Zygote preload");
+                    mZygotePreload = null;
                     mWebViewUpdateService.prepareWebViewInSystemServer();
                     traceLog.traceEnd();
                 }, WEBVIEW_PREPARATION);
@@ -1651,13 +1694,13 @@
             Watchdog.getInstance().start();
             traceEnd();
 
-            if (webviewPrep != null) {
-                ConcurrentUtils.waitForFutureNoInterrupt(webviewPrep, WEBVIEW_PREPARATION);
-            }
-
             // It is now okay to let the various system services start their
             // third party code...
             traceBeginAndSlog("PhaseThirdPartyAppsCanStart");
+            // confirm webview completion before starting 3rd party
+            if (webviewPrep != null) {
+                ConcurrentUtils.waitForFutureNoInterrupt(webviewPrep, WEBVIEW_PREPARATION);
+            }
             mSystemServiceManager.startBootPhase(
                     SystemService.PHASE_THIRD_PARTY_APPS_CAN_START);
             traceEnd();
diff --git a/services/print/java/com/android/server/print/CompanionDeviceManagerService.java b/services/print/java/com/android/server/print/CompanionDeviceManagerService.java
new file mode 100644
index 0000000..9ac8295
--- /dev/null
+++ b/services/print/java/com/android/server/print/CompanionDeviceManagerService.java
@@ -0,0 +1,167 @@
+/*
+ * 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.server.print;
+
+import static com.android.internal.util.Preconditions.checkNotNull;
+
+import android.Manifest;
+import android.companion.AssociationRequest;
+import android.companion.CompanionDeviceManager;
+import android.companion.ICompanionDeviceDiscoveryService;
+import android.companion.ICompanionDeviceDiscoveryServiceCallback;
+import android.companion.ICompanionDeviceManager;
+import android.companion.IFindDeviceCallback;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager;
+import android.net.NetworkPolicyManager;
+import android.os.Binder;
+import android.os.IBinder;
+import android.os.IDeviceIdleController;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.util.Slog;
+
+import com.android.internal.util.ArrayUtils;
+import com.android.server.SystemService;
+
+//TODO move to own package!
+/** @hide */
+public class CompanionDeviceManagerService extends SystemService {
+
+    private static final ComponentName SERVICE_TO_BIND_TO = ComponentName.createRelative(
+            CompanionDeviceManager.COMPANION_DEVICE_DISCOVERY_PACKAGE_NAME,
+            ".DeviceDiscoveryService");
+
+    private static final boolean DEBUG = false;
+    private static final String LOG_TAG = "CompanionDeviceManagerService";
+
+    private final CompanionDeviceManagerImpl mImpl;
+
+    public CompanionDeviceManagerService(Context context) {
+        super(context);
+        mImpl = new CompanionDeviceManagerImpl();
+    }
+
+    @Override
+    public void onStart() {
+        publishBinderService(Context.COMPANION_DEVICE_SERVICE, mImpl);
+    }
+
+    class CompanionDeviceManagerImpl extends ICompanionDeviceManager.Stub {
+        @Override
+        public void associate(
+                AssociationRequest request,
+                IFindDeviceCallback callback,
+                String callingPackage) {
+            if (DEBUG) {
+                Slog.i(LOG_TAG, "associate(request = " + request + ", callback = " + callback
+                        + ", callingPackage = " + callingPackage + ")");
+            }
+            checkNotNull(request);
+            checkNotNull(callback);
+            final long callingIdentity = Binder.clearCallingIdentity();
+            try {
+                //TODO bindServiceAsUser
+                getContext().bindService(
+                        new Intent().setComponent(SERVICE_TO_BIND_TO),
+                        getServiceConnection(request, callback, callingPackage),
+                        Context.BIND_AUTO_CREATE);
+            } finally {
+                Binder.restoreCallingIdentity(callingIdentity);
+            }
+        }
+    }
+
+    private ServiceConnection getServiceConnection(
+            final AssociationRequest<?> request,
+            final IFindDeviceCallback findDeviceCallback,
+            final String callingPackage) {
+        return new ServiceConnection() {
+            @Override
+            public void onServiceConnected(ComponentName name, IBinder service) {
+                if (DEBUG) {
+                    Slog.i(LOG_TAG,
+                            "onServiceConnected(name = " + name + ", service = "
+                                    + service + ")");
+                }
+                try {
+                    ICompanionDeviceDiscoveryService.Stub
+                            .asInterface(service)
+                            .startDiscovery(
+                                    request,
+                                    callingPackage,
+                                    findDeviceCallback,
+                                    getServiceCallback());
+                } catch (RemoteException e) {
+                    throw new RuntimeException(e);
+                }
+            }
+
+            @Override
+            public void onServiceDisconnected(ComponentName name) {
+                if (DEBUG) Slog.i(LOG_TAG, "onServiceDisconnected(name = " + name + ")");
+            }
+        };
+    }
+
+    private ICompanionDeviceDiscoveryServiceCallback.Stub getServiceCallback() {
+        return new ICompanionDeviceDiscoveryServiceCallback.Stub() {
+            @Override
+            public void onDeviceSelected(String packageName, int userId) {
+                grantSpecialAccessPermissionsIfNeeded(packageName, userId);
+            }
+        };
+    }
+
+    private void grantSpecialAccessPermissionsIfNeeded(String packageName, int userId) {
+        final long identity = Binder.clearCallingIdentity();
+        final PackageInfo packageInfo;
+        try {
+            packageInfo = getContext().getPackageManager().getPackageInfoAsUser(
+                    packageName, PackageManager.GET_PERMISSIONS, userId);
+        } catch (PackageManager.NameNotFoundException e) {
+            Slog.e(LOG_TAG, "Error granting special access permissions to package:"
+                    + packageName, e);
+            return;
+        }
+        try {
+            if (ArrayUtils.contains(packageInfo.requestedPermissions,
+                    Manifest.permission.RUN_IN_BACKGROUND)) {
+                IDeviceIdleController idleController = IDeviceIdleController.Stub.asInterface(
+                        ServiceManager.getService(Context.DEVICE_IDLE_CONTROLLER));
+                try {
+                    idleController.addPowerSaveWhitelistApp(packageName);
+                } catch (RemoteException e) {
+                    /* ignore - local call */
+                }
+            }
+            if (ArrayUtils.contains(packageInfo.requestedPermissions,
+                    Manifest.permission.USE_DATA_IN_BACKGROUND)) {
+                NetworkPolicyManager.from(getContext()).addUidPolicy(
+                        packageInfo.applicationInfo.uid,
+                        NetworkPolicyManager.POLICY_ALLOW_METERED_BACKGROUND);
+            }
+        } finally {
+            Binder.restoreCallingIdentity(identity);
+        }
+    }
+}
diff --git a/services/retaildemo/java/com/android/server/retaildemo/RetailDemoModeService.java b/services/retaildemo/java/com/android/server/retaildemo/RetailDemoModeService.java
index f30c466..f943ee2c 100644
--- a/services/retaildemo/java/com/android/server/retaildemo/RetailDemoModeService.java
+++ b/services/retaildemo/java/com/android/server/retaildemo/RetailDemoModeService.java
@@ -541,6 +541,8 @@
     }
 
     private void stopDemoMode() {
+        mDeviceInDemoMode = false;
+        mIsCarrierDemoMode = false;
         mPreloadAppsInstaller = null;
         mCameraIdsWithFlash = null;
         mInjector.destroyWakeLock();
diff --git a/services/tests/notification/src/com/android/server/notification/BuzzBeepBlinkTest.java b/services/tests/notification/src/com/android/server/notification/BuzzBeepBlinkTest.java
index 9202cce..15f7557 100644
--- a/services/tests/notification/src/com/android/server/notification/BuzzBeepBlinkTest.java
+++ b/services/tests/notification/src/com/android/server/notification/BuzzBeepBlinkTest.java
@@ -20,7 +20,6 @@
 import static junit.framework.Assert.assertTrue;
 
 import com.android.server.lights.Light;
-import com.android.server.statusbar.StatusBarManagerInternal;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -224,7 +223,7 @@
             } else {
                 builder.setLights(CUSTOM_LIGHT_COLOR, CUSTOM_LIGHT_ON, CUSTOM_LIGHT_OFF);
             }
-            channel.setLights(true);
+            channel.enableLights(true);
         }
         builder.setDefaults(defaults);
 
diff --git a/services/tests/notification/src/com/android/server/notification/NotificationComparatorTest.java b/services/tests/notification/src/com/android/server/notification/NotificationComparatorTest.java
index aa08b41..064ab0a 100644
--- a/services/tests/notification/src/com/android/server/notification/NotificationComparatorTest.java
+++ b/services/tests/notification/src/com/android/server/notification/NotificationComparatorTest.java
@@ -112,6 +112,7 @@
         Notification n2 = new Notification.Builder(mContext)
                 .setCategory(Notification.CATEGORY_CALL)
                 .setFlag(Notification.FLAG_FOREGROUND_SERVICE, true)
+                .setColorized(true /* colorized */)
                 .build();
         mRecordHighCall = new NotificationRecord(mContext, new StatusBarNotification(callPkg,
                 callPkg, 1, "highcall", callUid, callUid, n2,
@@ -186,10 +187,10 @@
         final List<NotificationRecord> expected = new ArrayList<>();
         expected.add(mRecordHighCall);
         expected.add(mRecordDefaultMedia);
-        expected.add(mRecordStarredContact);
-        expected.add(mRecordContact);
         expected.add(mRecordInlineReply);
         expected.add(mRecordSms);
+        expected.add(mRecordStarredContact);
+        expected.add(mRecordContact);
         expected.add(mRecordEmail);
         expected.add(mRecordUrgent);
         expected.add(mRecordCheater);
@@ -207,14 +208,19 @@
     @Test
     public void testMessaging() throws Exception {
         NotificationComparator comp = new NotificationComparator(mContext);
-        assertTrue(comp.isImportantMessaging(mRecordStarredContact));
-        assertTrue(comp.isImportantMessaging(mRecordContact));
         assertTrue(comp.isImportantMessaging(mRecordInlineReply));
         assertTrue(comp.isImportantMessaging(mRecordSms));
         assertFalse(comp.isImportantMessaging(mRecordEmail));
         assertFalse(comp.isImportantMessaging(mRecordCheater));
     }
 
+    @Test
+    public void testPeople() throws Exception {
+        NotificationComparator comp = new NotificationComparator(mContext);
+        assertTrue(comp.isImportantPeople(mRecordStarredContact));
+        assertTrue(comp.isImportantPeople(mRecordContact));
+    }
+
     private NotificationChannel getDefaultChannel() {
         return new NotificationChannel(NotificationChannel.DEFAULT_CHANNEL_ID, "name",
                 NotificationManager.IMPORTANCE_LOW);
diff --git a/services/tests/notification/src/com/android/server/notification/NotificationManagerServiceTest.java b/services/tests/notification/src/com/android/server/notification/NotificationManagerServiceTest.java
index db010b8..88f1a53 100644
--- a/services/tests/notification/src/com/android/server/notification/NotificationManagerServiceTest.java
+++ b/services/tests/notification/src/com/android/server/notification/NotificationManagerServiceTest.java
@@ -280,6 +280,21 @@
 
     @Test
     @UiThreadTest
+    public void testCancelNotificationWhilePostedAndEnqueued() throws Exception {
+        mBinderService.enqueueNotificationWithTag(mContext.getPackageName(), "opPkg", "tag", 0,
+                generateNotificationRecord(null).getNotification(), new int[1], 0);
+        waitForIdle();
+        mBinderService.enqueueNotificationWithTag(mContext.getPackageName(), "opPkg", "tag", 0,
+                generateNotificationRecord(null).getNotification(), new int[1], 0);
+        mBinderService.cancelNotificationWithTag(mContext.getPackageName(), "tag", 0, 0);
+        waitForIdle();
+        StatusBarNotification[] notifs =
+                mBinderService.getActiveNotifications(mContext.getPackageName());
+        assertEquals(0, notifs.length);
+    }
+
+    @Test
+    @UiThreadTest
     public void testCancelNotificationsFromListenerImmediatelyAfterEnqueue() throws Exception {
         final StatusBarNotification sbn = generateNotificationRecord(null).sbn;
         mBinderService.enqueueNotificationWithTag(sbn.getPackageName(), "opPkg", "tag",
diff --git a/services/tests/notification/src/com/android/server/notification/NotificationRecordTest.java b/services/tests/notification/src/com/android/server/notification/NotificationRecordTest.java
index 0ec368f..13d6c5d 100644
--- a/services/tests/notification/src/com/android/server/notification/NotificationRecordTest.java
+++ b/services/tests/notification/src/com/android/server/notification/NotificationRecordTest.java
@@ -33,6 +33,7 @@
 import android.content.Context;
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageManager;
+import android.graphics.Color;
 import android.media.AudioAttributes;
 import android.net.Uri;
 import android.os.Build;
@@ -137,10 +138,11 @@
                 defaults |= Notification.DEFAULT_LIGHTS;
             } else {
                 builder.setLights(CUSTOM_LIGHT.color, CUSTOM_LIGHT.onMs, CUSTOM_LIGHT.offMs);
+                channel.setLightColor(Color.BLUE);
             }
-            channel.setLights(true);
+            channel.enableLights(true);
         } else {
-            channel.setLights(false);
+            channel.enableLights(false);
         }
 
         builder.setDefaults(defaults);
@@ -316,7 +318,7 @@
 
     @Test
     public void testLights_locked_preUpgrade() throws Exception {
-        defaultChannel.setLights(true);
+        defaultChannel.enableLights(true);
         defaultChannel.lockFields(NotificationChannel.USER_LOCKED_LIGHTS);
         StatusBarNotification sbn = getNotification(true /*preO */, true /* noisy */,
                 true /* defaultSound */, false /* buzzy */, false /* defaultBuzz */,
@@ -327,7 +329,7 @@
     }
 
     @Test
-    public void testLights_upgrade() throws Exception {
+    public void testLights_upgrade_defaultLights() throws Exception {
         int defaultLightColor = mMockContext.getResources().getColor(
                 com.android.internal.R.color.config_defaultNotificationColor);
         int defaultLightOn = mMockContext.getResources().getInteger(
@@ -339,6 +341,22 @@
                 defaultLightColor, defaultLightOn, defaultLightOff);
         StatusBarNotification sbn = getNotification(false /*preO */, true /* noisy */,
                 true /* defaultSound */, false /* buzzy */, false /* defaultBuzz */,
+                true /* lights */, true /*defaultLights */);
+        NotificationRecord record = new NotificationRecord(mMockContext, sbn, channel);
+        assertEquals(expected, record.getLight());
+    }
+
+    @Test
+    public void testLights_upgrade() throws Exception {
+        int defaultLightOn = mMockContext.getResources().getInteger(
+                com.android.internal.R.integer.config_defaultNotificationLedOn);
+        int defaultLightOff = mMockContext.getResources().getInteger(
+                com.android.internal.R.integer.config_defaultNotificationLedOff);
+
+        NotificationRecord.Light expected = new NotificationRecord.Light(
+                Color.BLUE, defaultLightOn, defaultLightOff);
+        StatusBarNotification sbn = getNotification(false /*preO */, true /* noisy */,
+                true /* defaultSound */, false /* buzzy */, false /* defaultBuzz */,
                 true /* lights */, false /*defaultLights */);
         NotificationRecord record = new NotificationRecord(mMockContext, sbn, channel);
         assertEquals(expected, record.getLight());
diff --git a/services/tests/notification/src/com/android/server/notification/RankingHelperTest.java b/services/tests/notification/src/com/android/server/notification/RankingHelperTest.java
index 9fa46d1..9ea9ce9 100644
--- a/services/tests/notification/src/com/android/server/notification/RankingHelperTest.java
+++ b/services/tests/notification/src/com/android/server/notification/RankingHelperTest.java
@@ -15,6 +15,8 @@
  */
 package com.android.server.notification;
 
+import static android.app.NotificationManager.IMPORTANCE_LOW;
+
 import static junit.framework.Assert.assertNull;
 import static junit.framework.Assert.fail;
 
@@ -36,6 +38,7 @@
 import android.app.NotificationManager;
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageManager;
+import android.graphics.Color;
 import android.media.AudioAttributes;
 import android.net.Uri;
 import android.os.Build;
@@ -55,6 +58,7 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -167,7 +171,7 @@
 
     private NotificationChannel getDefaultChannel() {
         return new NotificationChannel(NotificationChannel.DEFAULT_CHANNEL_ID, "name",
-                NotificationManager.IMPORTANCE_LOW);
+                IMPORTANCE_LOW);
     }
 
     private ByteArrayOutputStream writeXmlAndPurge(String pkg, int uid, String... channelIds)
@@ -200,6 +204,7 @@
         assertTrue(Arrays.equals(expected.getVibrationPattern(), actual.getVibrationPattern()));
         assertEquals(expected.getGroup(), actual.getGroup());
         assertEquals(expected.getAudioAttributes(), actual.getAudioAttributes());
+        assertEquals(expected.getLightColor(), actual.getLightColor());
     }
 
     @Test
@@ -258,14 +263,15 @@
         NotificationChannel channel1 =
                 new NotificationChannel("id1", "name1", NotificationManager.IMPORTANCE_HIGH);
         NotificationChannel channel2 =
-                new NotificationChannel("id2", "name2", NotificationManager.IMPORTANCE_LOW);
+                new NotificationChannel("id2", "name2", IMPORTANCE_LOW);
         channel2.setSound(new Uri.Builder().scheme("test").build(), mAudioAttributes);
-        channel2.setLights(true);
+        channel2.enableLights(true);
         channel2.setBypassDnd(true);
         channel2.setLockscreenVisibility(Notification.VISIBILITY_SECRET);
         channel2.enableVibration(true);
         channel2.setGroup(ncg.getId());
         channel2.setVibrationPattern(new long[]{100, 67, 145, 156});
+        channel2.setLightColor(Color.BLUE);
 
         mHelper.createNotificationChannelGroup(pkg, uid, ncg, true);
         mHelper.createNotificationChannel(pkg, uid, channel1, true);
@@ -291,10 +297,26 @@
                 mHelper.getNotificationChannel(pkg, uid, channel2.getId(), false));
         assertNotNull(mHelper.getNotificationChannel(
                 pkg, uid, NotificationChannel.DEFAULT_CHANNEL_ID, false));
-        assertEquals(ncg.getId(),
-                mHelper.getNotificationChannelGroups(pkg, uid, false).getList().get(0).getId());
-        assertEquals(channel2.getGroup(), mHelper.getNotificationChannelGroups(
-                pkg, uid, false).getList().get(0).getChannels().get(0).getGroup());
+
+        List<NotificationChannelGroup> actualGroups =
+                mHelper.getNotificationChannelGroups(pkg, uid, false).getList();
+        boolean foundNcg = false;
+        for (NotificationChannelGroup actual : actualGroups) {
+            if (ncg.getId().equals(actual.getId())) {
+                foundNcg = true;
+                 break;
+            }
+        }
+        assertTrue(foundNcg);
+
+        boolean foundChannel2Group = false;
+        for (NotificationChannelGroup actual : actualGroups) {
+            if (channel2.getGroup().equals(actual.getChannels().get(0).getGroup())) {
+                foundChannel2Group = true;
+                break;
+            }
+        }
+        assertTrue(foundChannel2Group);
     }
 
     @Test
@@ -329,7 +351,7 @@
 
         final NotificationChannel defaultChannel = mHelper.getNotificationChannel(
                 pkg, uid, NotificationChannel.DEFAULT_CHANNEL_ID, false);
-        defaultChannel.setImportance(NotificationManager.IMPORTANCE_LOW);
+        defaultChannel.setImportance(IMPORTANCE_LOW);
         mHelper.updateNotificationChannel(pkg, uid, defaultChannel);
 
         ByteArrayOutputStream baos = writeXmlAndPurge(pkg, uid, channel1.getId(),
@@ -341,7 +363,7 @@
         parser.nextTag();
         mHelper.readXml(parser, false);
 
-        assertEquals(NotificationManager.IMPORTANCE_LOW, mHelper.getNotificationChannel(
+        assertEquals(IMPORTANCE_LOW, mHelper.getNotificationChannel(
                 pkg, uid, NotificationChannel.DEFAULT_CHANNEL_ID, false).getImportance());
     }
 
@@ -373,7 +395,7 @@
         final NotificationChannel updated2 = mHelper.getNotificationChannel(
                 pkg2, uid2, NotificationChannel.DEFAULT_CHANNEL_ID, false);
         // clamped
-        assertEquals(NotificationManager.IMPORTANCE_LOW, updated2.getImportance());
+        assertEquals(IMPORTANCE_LOW, updated2.getImportance());
         assertFalse(updated2.canBypassDnd());
         assertEquals(Notification.VISIBILITY_PRIVATE, updated2.getLockscreenVisibility());
         assertEquals(NotificationChannel.USER_LOCKED_VISIBILITY, updated2.getUserLockedFields());
@@ -385,7 +407,7 @@
 
         try {
             mHelper.createNotificationChannel(pkg, uid,
-                    new NotificationChannel(pkg, "", NotificationManager.IMPORTANCE_LOW), true);
+                    new NotificationChannel(pkg, "", IMPORTANCE_LOW), true);
             fail("Channel creation should fail");
         } catch (IllegalArgumentException e) {
             // pass
@@ -396,7 +418,7 @@
     public void testUpdate_userLockedImportance() throws Exception {
         // all fields locked by user
         final NotificationChannel channel =
-                new NotificationChannel("id2", "name2", NotificationManager.IMPORTANCE_LOW);
+                new NotificationChannel("id2", "name2", IMPORTANCE_LOW);
         channel.lockFields(NotificationChannel.USER_LOCKED_IMPORTANCE);
 
         mHelper.createNotificationChannel(pkg, uid, channel, false);
@@ -415,7 +437,7 @@
     public void testUpdate_userLockedVisibility() throws Exception {
         // all fields locked by user
         final NotificationChannel channel =
-                new NotificationChannel("id2", "name2", NotificationManager.IMPORTANCE_LOW);
+                new NotificationChannel("id2", "name2", IMPORTANCE_LOW);
         channel.setLockscreenVisibility(Notification.VISIBILITY_SECRET);
         channel.lockFields(NotificationChannel.USER_LOCKED_VISIBILITY);
 
@@ -436,8 +458,8 @@
     public void testUpdate_userLockedVibration() throws Exception {
         // all fields locked by user
         final NotificationChannel channel =
-                new NotificationChannel("id2", "name2", NotificationManager.IMPORTANCE_LOW);
-        channel.setLights(false);
+                new NotificationChannel("id2", "name2", IMPORTANCE_LOW);
+        channel.enableLights(false);
         channel.lockFields(NotificationChannel.USER_LOCKED_VIBRATION);
 
         mHelper.createNotificationChannel(pkg, uid, channel, false);
@@ -458,8 +480,8 @@
     public void testUpdate_userLockedLights() throws Exception {
         // all fields locked by user
         final NotificationChannel channel =
-                new NotificationChannel("id2", "name2", NotificationManager.IMPORTANCE_LOW);
-        channel.setLights(false);
+                new NotificationChannel("id2", "name2", IMPORTANCE_LOW);
+        channel.enableLights(false);
         channel.lockFields(NotificationChannel.USER_LOCKED_LIGHTS);
 
         mHelper.createNotificationChannel(pkg, uid, channel, false);
@@ -467,7 +489,7 @@
         // same id, try to update
         final NotificationChannel channel2 =
                 new NotificationChannel("id2", "name2", NotificationManager.IMPORTANCE_HIGH);
-        channel2.setLights(true);
+        channel2.enableLights(true);
 
         mHelper.updateNotificationChannelFromAssistant(pkg, uid, channel2);
 
@@ -479,7 +501,7 @@
     public void testUpdate_userLockedPriority() throws Exception {
         // all fields locked by user
         final NotificationChannel channel =
-                new NotificationChannel("id2", "name2", NotificationManager.IMPORTANCE_LOW);
+                new NotificationChannel("id2", "name2", IMPORTANCE_LOW);
         channel.setBypassDnd(true);
         channel.lockFields(NotificationChannel.USER_LOCKED_PRIORITY);
 
@@ -500,7 +522,7 @@
     public void testUpdate_userLockedRingtone() throws Exception {
         // all fields locked by user
         final NotificationChannel channel =
-                new NotificationChannel("id2", "name2", NotificationManager.IMPORTANCE_LOW);
+                new NotificationChannel("id2", "name2", IMPORTANCE_LOW);
         channel.setSound(new Uri.Builder().scheme("test").build(), mAudioAttributes);
         channel.lockFields(NotificationChannel.USER_LOCKED_SOUND);
 
@@ -520,7 +542,7 @@
     @Test
     public void testUpdate_userLockedBadge() throws Exception {
         final NotificationChannel channel =
-                new NotificationChannel("id2", "name2", NotificationManager.IMPORTANCE_LOW);
+                new NotificationChannel("id2", "name2", IMPORTANCE_LOW);
         channel.setShowBadge(true);
         channel.lockFields(NotificationChannel.USER_LOCKED_SHOW_BADGE);
 
@@ -540,9 +562,9 @@
     public void testUpdate() throws Exception {
         // no fields locked by user
         final NotificationChannel channel =
-                new NotificationChannel("id2", "name2", NotificationManager.IMPORTANCE_LOW);
+                new NotificationChannel("id2", "name2", IMPORTANCE_LOW);
         channel.setSound(new Uri.Builder().scheme("test").build(), mAudioAttributes);
-        channel.setLights(true);
+        channel.enableLights(true);
         channel.setBypassDnd(true);
         channel.setLockscreenVisibility(Notification.VISIBILITY_SECRET);
 
@@ -552,7 +574,7 @@
         final NotificationChannel channel2 =
                 new NotificationChannel("id2", "name2", NotificationManager.IMPORTANCE_HIGH);
         channel2.setSound(new Uri.Builder().scheme("test2").build(), mAudioAttributes);
-        channel2.setLights(false);
+        channel2.enableLights(false);
         channel2.setBypassDnd(false);
         channel2.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC);
 
@@ -572,9 +594,9 @@
     @Test
     public void testCreateChannel_CannotChangeHiddenFields() throws Exception {
         final NotificationChannel channel =
-                new NotificationChannel("id2", "name2", NotificationManager.IMPORTANCE_LOW);
+                new NotificationChannel("id2", "name2", IMPORTANCE_LOW);
         channel.setSound(new Uri.Builder().scheme("test").build(), mAudioAttributes);
-        channel.setLights(true);
+        channel.enableLights(true);
         channel.setBypassDnd(true);
         channel.setLockscreenVisibility(Notification.VISIBILITY_SECRET);
         channel.setShowBadge(true);
@@ -599,9 +621,9 @@
     @Test
     public void testCreateChannel_CannotChangeHiddenFieldsAssistant() throws Exception {
         final NotificationChannel channel =
-                new NotificationChannel("id2", "name2", NotificationManager.IMPORTANCE_LOW);
+                new NotificationChannel("id2", "name2", IMPORTANCE_LOW);
         channel.setSound(new Uri.Builder().scheme("test").build(), mAudioAttributes);
-        channel.setLights(true);
+        channel.enableLights(true);
         channel.setBypassDnd(true);
         channel.setLockscreenVisibility(Notification.VISIBILITY_SECRET);
         channel.setShowBadge(true);
@@ -626,9 +648,9 @@
     @Test
     public void testGetDeletedChannel() throws Exception {
         NotificationChannel channel =
-                new NotificationChannel("id2", "name2", NotificationManager.IMPORTANCE_LOW);
+                new NotificationChannel("id2", "name2", IMPORTANCE_LOW);
         channel.setSound(new Uri.Builder().scheme("test").build(), mAudioAttributes);
-        channel.setLights(true);
+        channel.enableLights(true);
         channel.setBypassDnd(true);
         channel.setLockscreenVisibility(Notification.VISIBILITY_SECRET);
         channel.enableVibration(true);
@@ -652,9 +674,9 @@
     public void testGetDeletedChannels() throws Exception {
         Map<String, NotificationChannel> channelMap = new HashMap<>();
         NotificationChannel channel =
-                new NotificationChannel("id2", "name2", NotificationManager.IMPORTANCE_LOW);
+                new NotificationChannel("id2", "name2", IMPORTANCE_LOW);
         channel.setSound(new Uri.Builder().scheme("test").build(), mAudioAttributes);
-        channel.setLights(true);
+        channel.enableLights(true);
         channel.setBypassDnd(true);
         channel.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
         channel.enableVibration(true);
@@ -691,7 +713,7 @@
     @Test
     public void testUpdateDeletedChannels() throws Exception {
         NotificationChannel channel =
-                new NotificationChannel("id2", "name2", NotificationManager.IMPORTANCE_LOW);
+                new NotificationChannel("id2", "name2", IMPORTANCE_LOW);
         mHelper.createNotificationChannel(pkg, uid, channel, true);
 
         mHelper.deleteNotificationChannel(pkg, uid, channel.getId());
@@ -716,7 +738,7 @@
     public void testCreateDeletedChannel() throws Exception {
         long[] vibration = new long[]{100, 67, 145, 156};
         NotificationChannel channel =
-                new NotificationChannel("id2", "name2", NotificationManager.IMPORTANCE_LOW);
+                new NotificationChannel("id2", "name2", IMPORTANCE_LOW);
         channel.setVibrationPattern(vibration);
 
         mHelper.createNotificationChannel(pkg, uid, channel, true);
@@ -737,7 +759,7 @@
     public void testCreateChannel_alreadyExists() throws Exception {
         long[] vibration = new long[]{100, 67, 145, 156};
         NotificationChannel channel =
-                new NotificationChannel("id2", "name2", NotificationManager.IMPORTANCE_LOW);
+                new NotificationChannel("id2", "name2", IMPORTANCE_LOW);
         channel.setVibrationPattern(vibration);
 
         mHelper.createNotificationChannel(pkg, uid, channel, true);
@@ -758,7 +780,7 @@
         NotificationChannel channel1 =
                 new NotificationChannel("id1", "name1", NotificationManager.IMPORTANCE_HIGH);
         NotificationChannel channel2 =
-                new NotificationChannel("id2", "name2", NotificationManager.IMPORTANCE_LOW);
+                new NotificationChannel("id2", "name2", IMPORTANCE_LOW);
 
         mHelper.createNotificationChannel(pkg, uid, channel1, true);
         mHelper.createNotificationChannel(pkg, uid, channel2, false);
@@ -897,4 +919,29 @@
             }
         }
     }
+
+    @Test
+    public void testGetChannelGroups_noSideEffects() throws Exception {
+        NotificationChannelGroup ncg = new NotificationChannelGroup("group1", "name1");
+        mHelper.createNotificationChannelGroup(pkg, uid, ncg, true);
+
+        NotificationChannel channel1 =
+                new NotificationChannel("id1", "name1", NotificationManager.IMPORTANCE_HIGH);
+        channel1.setGroup(ncg.getId());
+        mHelper.createNotificationChannel(pkg, uid, channel1, true);
+        mHelper.getNotificationChannelGroups(pkg, uid, true).getList();
+
+        channel1.setImportance(IMPORTANCE_LOW);
+        mHelper.updateNotificationChannel(pkg, uid, channel1);
+
+        List<NotificationChannelGroup> actual =
+                mHelper.getNotificationChannelGroups(pkg, uid, true).getList();
+
+        assertEquals(2, actual.size());
+        for (NotificationChannelGroup group : actual) {
+            if (Objects.equals(group.getId(),ncg.getId())) {
+                assertEquals(1, group.getChannels().size());
+            }
+        }
+    }
 }
diff --git a/services/tests/servicestests/src/com/android/server/BaseLockSettingsServiceTests.java b/services/tests/servicestests/src/com/android/server/BaseLockSettingsServiceTests.java
index c89d35c..c6265bc 100644
--- a/services/tests/servicestests/src/com/android/server/BaseLockSettingsServiceTests.java
+++ b/services/tests/servicestests/src/com/android/server/BaseLockSettingsServiceTests.java
@@ -134,5 +134,13 @@
         File storageDir = mStorage.mStorageDir;
         assertTrue(FileUtils.deleteContents(storageDir));
     }
+
+    protected static void assertArrayEquals(byte[] expected, byte[] actual) {
+        assertTrue(Arrays.equals(expected, actual));
+    }
+
+    protected static void assertArrayNotSame(byte[] expected, byte[] actual) {
+        assertFalse(Arrays.equals(expected, actual));
+    }
 }
 
diff --git a/services/tests/servicestests/src/com/android/server/LockSettingsServiceTestable.java b/services/tests/servicestests/src/com/android/server/LockSettingsServiceTestable.java
index 613ec0b..cfdb5b1 100644
--- a/services/tests/servicestests/src/com/android/server/LockSettingsServiceTestable.java
+++ b/services/tests/servicestests/src/com/android/server/LockSettingsServiceTestable.java
@@ -21,9 +21,11 @@
 import android.app.IActivityManager;
 import android.content.Context;
 import android.os.Handler;
+import android.os.Process;
+import android.os.RemoteException;
 import android.os.storage.IStorageManager;
 import android.security.KeyStore;
-import android.service.gatekeeper.IGateKeeperService;
+import android.security.keystore.KeyPermanentlyInvalidatedException;
 
 import com.android.internal.widget.LockPatternUtils;
 
@@ -38,16 +40,18 @@
         private IActivityManager mActivityManager;
         private LockPatternUtils mLockPatternUtils;
         private IStorageManager mStorageManager;
+        private MockGateKeeperService mGatekeeper;
 
         public MockInjector(Context context, LockSettingsStorage storage, KeyStore keyStore,
                 IActivityManager activityManager, LockPatternUtils lockPatternUtils,
-                IStorageManager storageManager) {
+                IStorageManager storageManager, MockGateKeeperService gatekeeper) {
             super(context);
             mLockSettingsStorage = storage;
             mKeyStore = keyStore;
             mActivityManager = activityManager;
             mLockPatternUtils = lockPatternUtils;
             mStorageManager = storageManager;
+            mGatekeeper = gatekeeper;
         }
 
         @Override
@@ -89,13 +93,25 @@
         public IStorageManager getStorageManager() {
             return mStorageManager;
         }
+
+        @Override
+        public SyntheticPasswordManager getSyntheticPasswordManager(LockSettingsStorage storage) {
+            return new MockSyntheticPasswordManager(storage, mGatekeeper);
+        }
+
+        @Override
+        public int binderGetCallingUid() {
+            return Process.SYSTEM_UID;
+        }
+
+
     }
 
     protected LockSettingsServiceTestable(Context context, LockPatternUtils lockPatternUtils,
-            LockSettingsStorage storage, IGateKeeperService gatekeeper, KeyStore keystore,
+            LockSettingsStorage storage, MockGateKeeperService gatekeeper, KeyStore keystore,
             IStorageManager storageManager, IActivityManager mActivityManager) {
         super(new MockInjector(context, storage, keystore, mActivityManager, lockPatternUtils,
-                storageManager));
+                storageManager, gatekeeper));
         mGateKeeperService = gatekeeper;
     }
 
@@ -105,12 +121,18 @@
     }
 
     @Override
-    protected String getDecryptedPasswordForTiedProfile(int userId) throws FileNotFoundException {
+    protected String getDecryptedPasswordForTiedProfile(int userId) throws FileNotFoundException, KeyPermanentlyInvalidatedException {
         byte[] storedData = mStorage.readChildProfileLock(userId);
         if (storedData == null) {
             throw new FileNotFoundException("Child profile lock file not found");
         }
+        try {
+            if (mGateKeeperService.getSecureUserId(userId) == 0) {
+                throw new KeyPermanentlyInvalidatedException();
+            }
+        } catch (RemoteException e) {
+            // shouldn't happen.
+        }
         return new String(storedData);
     }
-
 }
diff --git a/services/tests/servicestests/src/com/android/server/LockSettingsServiceTests.java b/services/tests/servicestests/src/com/android/server/LockSettingsServiceTests.java
index 4c2e171..ae9762a 100644
--- a/services/tests/servicestests/src/com/android/server/LockSettingsServiceTests.java
+++ b/services/tests/servicestests/src/com/android/server/LockSettingsServiceTests.java
@@ -123,6 +123,12 @@
                 UnifiedPassword, PRIMARY_USER_ID);
         mStorageManager.setIgnoreBadUnlock(false);
         assertEquals(profileSid, mGateKeeperService.getSecureUserId(MANAGED_PROFILE_USER_ID));
+
+        //Clear unified challenge
+        mService.setLockCredential(null, LockPatternUtils.CREDENTIAL_TYPE_NONE, UnifiedPassword,
+                PRIMARY_USER_ID);
+        assertEquals(0, mGateKeeperService.getSecureUserId(PRIMARY_USER_ID));
+        assertEquals(0, mGateKeeperService.getSecureUserId(MANAGED_PROFILE_USER_ID));
     }
 
     public void testManagedProfileSeparateChallenge() throws RemoteException {
diff --git a/services/tests/servicestests/src/com/android/server/LockSettingsShellCommandTest.java b/services/tests/servicestests/src/com/android/server/LockSettingsShellCommandTest.java
index d6ee367..84ebb19 100644
--- a/services/tests/servicestests/src/com/android/server/LockSettingsShellCommandTest.java
+++ b/services/tests/servicestests/src/com/android/server/LockSettingsShellCommandTest.java
@@ -137,6 +137,6 @@
         assertEquals(0, mCommand.exec(new Binder(), in, out, err,
                 new String[] { "clear", "--old", "1234" },
                 mShellCallback, mResultReceiver));
-        verify(mLockPatternUtils).clearLock(mUserId);
+        verify(mLockPatternUtils).clearLock("1234", mUserId);
     }
 }
diff --git a/services/tests/servicestests/src/com/android/server/LockSettingsStorageTestable.java b/services/tests/servicestests/src/com/android/server/LockSettingsStorageTestable.java
index e81b02f..18da1a5 100644
--- a/services/tests/servicestests/src/com/android/server/LockSettingsStorageTestable.java
+++ b/services/tests/servicestests/src/com/android/server/LockSettingsStorageTestable.java
@@ -31,19 +31,36 @@
 
     @Override
     String getLockPatternFilename(int userId) {
-        return new File(mStorageDir,
-                super.getLockPatternFilename(userId).replace('/', '-')).getAbsolutePath();
+        return makeDirs(mStorageDir,
+                super.getLockPatternFilename(userId)).getAbsolutePath();
     }
 
     @Override
     String getLockPasswordFilename(int userId) {
-        return new File(mStorageDir,
-                super.getLockPasswordFilename(userId).replace('/', '-')).getAbsolutePath();
+        return makeDirs(mStorageDir,
+                super.getLockPasswordFilename(userId)).getAbsolutePath();
     }
 
     @Override
     String getChildProfileLockFile(int userId) {
-        return new File(mStorageDir,
-                super.getChildProfileLockFile(userId).replace('/', '-')).getAbsolutePath();
+        return makeDirs(mStorageDir,
+                super.getChildProfileLockFile(userId)).getAbsolutePath();
+    }
+
+    @Override
+    protected File getSyntheticPasswordDirectoryForUser(int userId) {
+        return makeDirs(mStorageDir, super.getSyntheticPasswordDirectoryForUser(
+                userId).getAbsolutePath());
+    }
+
+    private File makeDirs(File baseDir, String filePath) {
+        File path = new File(filePath);
+        if (path.getParent() == null) {
+            return new File(baseDir, filePath);
+        } else {
+            File mappedDir = new File(baseDir, path.getParent());
+            mappedDir.mkdirs();
+            return new File(mappedDir, path.getName());
+        }
     }
 }
diff --git a/services/tests/servicestests/src/com/android/server/LockSettingsStorageTests.java b/services/tests/servicestests/src/com/android/server/LockSettingsStorageTests.java
index d110fea..c68fbdc 100644
--- a/services/tests/servicestests/src/com/android/server/LockSettingsStorageTests.java
+++ b/services/tests/servicestests/src/com/android/server/LockSettingsStorageTests.java
@@ -329,6 +329,16 @@
         assertEquals("/data/system/users/3/gatekeeper.password.key", storage.getLockPasswordFilename(3));
     }
 
+    public void testSyntheticPasswordState() {
+        final byte[] data = {1,2,3,4};
+        mStorage.writeSyntheticPasswordState(10, 1234L, "state", data);
+        assertArrayEquals(data, mStorage.readSyntheticPasswordState(10, 1234L, "state"));
+        assertEquals(null, mStorage.readSyntheticPasswordState(0, 1234L, "state"));
+
+        mStorage.deleteSyntheticPasswordState(10, 1234L, "state", true);
+        assertEquals(null, mStorage.readSyntheticPasswordState(10, 1234L, "state"));
+    }
+
     private static void assertArrayEquals(byte[] expected, byte[] actual) {
         if (!Arrays.equals(expected, actual)) {
             fail("expected:<" + Arrays.toString(expected) +
diff --git a/services/tests/servicestests/src/com/android/server/MockGateKeeperService.java b/services/tests/servicestests/src/com/android/server/MockGateKeeperService.java
index 15983ca..bc93341 100644
--- a/services/tests/servicestests/src/com/android/server/MockGateKeeperService.java
+++ b/services/tests/servicestests/src/com/android/server/MockGateKeeperService.java
@@ -149,6 +149,15 @@
         return authTokenMap.get(uid);
     }
 
+    public AuthToken getAuthTokenForSid(long sid) {
+        for(AuthToken token : authTokenMap.values()) {
+            if (token.sid == sid) {
+                return token;
+            }
+        }
+        return null;
+    }
+
     public void clearAuthToken(int uid) {
         authTokenMap.remove(uid);
     }
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/MockSyntheticPasswordManager.java b/services/tests/servicestests/src/com/android/server/MockSyntheticPasswordManager.java
new file mode 100644
index 0000000..93e3fc6
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/MockSyntheticPasswordManager.java
@@ -0,0 +1,102 @@
+/*
+ * 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.server;
+
+import android.util.ArrayMap;
+
+import junit.framework.AssertionFailedError;
+
+import java.nio.ByteBuffer;
+import java.security.NoSuchAlgorithmException;
+import java.security.spec.InvalidKeySpecException;
+import java.util.Arrays;
+
+import javax.crypto.SecretKeyFactory;
+import javax.crypto.spec.PBEKeySpec;
+
+public class MockSyntheticPasswordManager extends SyntheticPasswordManager {
+
+    private MockGateKeeperService mGateKeeper;
+
+    public MockSyntheticPasswordManager(LockSettingsStorage storage,
+            MockGateKeeperService gatekeeper) {
+        super(storage);
+        mGateKeeper = gatekeeper;
+    }
+
+    private ArrayMap<String, byte[]> mBlobs = new ArrayMap<>();
+
+    @Override
+    protected byte[] decryptSPBlob(String blobKeyName, byte[] blob, byte[] applicationId) {
+        if (mBlobs.containsKey(blobKeyName) && !Arrays.equals(mBlobs.get(blobKeyName), blob)) {
+            throw new AssertionFailedError("blobKeyName content is overwritten: " + blobKeyName);
+        }
+        ByteBuffer buffer = ByteBuffer.allocate(blob.length);
+        buffer.put(blob, 0, blob.length);
+        buffer.flip();
+        int len;
+        len = buffer.getInt();
+        byte[] data = new byte[len];
+        buffer.get(data);
+        len = buffer.getInt();
+        byte[] appId = new byte[len];
+        buffer.get(appId);
+        long sid = buffer.getLong();
+        if (!Arrays.equals(appId, applicationId)) {
+            throw new AssertionFailedError("Invalid application id");
+        }
+        if (sid != 0 && mGateKeeper.getAuthTokenForSid(sid) == null) {
+            throw new AssertionFailedError("No valid auth token");
+        }
+        return data;
+    }
+
+    @Override
+    protected byte[] createSPBlob(String blobKeyName, byte[] data, byte[] applicationId, long sid) {
+        ByteBuffer buffer = ByteBuffer.allocate(Integer.BYTES + data.length + Integer.BYTES
+                + applicationId.length + Long.BYTES);
+        buffer.putInt(data.length);
+        buffer.put(data);
+        buffer.putInt(applicationId.length);
+        buffer.put(applicationId);
+        buffer.putLong(sid);
+        byte[] result = buffer.array();
+        mBlobs.put(blobKeyName, result);
+        return result;
+    }
+
+    @Override
+    protected void destroySPBlobKey(String keyAlias) {
+    }
+
+    @Override
+    protected long sidFromPasswordHandle(byte[] handle) {
+        return new MockGateKeeperService.VerifyHandle(handle).sid;
+    }
+
+    @Override
+    protected byte[] scrypt(String password, byte[] salt, int N, int r, int p, int outLen) {
+        try {
+            PBEKeySpec spec = new PBEKeySpec(password.toCharArray(), salt, 10, outLen * 8);
+            SecretKeyFactory f = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1");
+            return f.generateSecret(spec).getEncoded();
+        } catch (InvalidKeySpecException | NoSuchAlgorithmException e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+
+}
diff --git a/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
index 9645916..3f34d4f 100644
--- a/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
@@ -76,6 +76,7 @@
 import android.net.INetworkPolicyListener;
 import android.net.INetworkStatsService;
 import android.net.LinkProperties;
+import android.net.NetworkCapabilities;
 import android.net.NetworkInfo;
 import android.net.NetworkInfo.DetailedState;
 import android.net.NetworkPolicy;
@@ -975,7 +976,8 @@
         info.setDetailedState(DetailedState.CONNECTED, null, null);
         final LinkProperties prop = new LinkProperties();
         prop.setInterfaceName(TEST_IFACE);
-        return new NetworkState(info, prop, null, null, null, TEST_SSID);
+        final NetworkCapabilities networkCapabilities = new NetworkCapabilities();
+        return new NetworkState(info, prop, networkCapabilities, null, null, TEST_SSID);
     }
 
     private void expectCurrentTime() throws Exception {
diff --git a/services/tests/servicestests/src/com/android/server/NetworkScoreServiceTest.java b/services/tests/servicestests/src/com/android/server/NetworkScoreServiceTest.java
index 152b9c9..c0b79be 100644
--- a/services/tests/servicestests/src/com/android/server/NetworkScoreServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/NetworkScoreServiceTest.java
@@ -117,6 +117,9 @@
     private static final String SSID = "ssid";
     private static final String SSID_2 = "ssid_2";
     private static final String SSID_3 = "ssid_3";
+    private static final String INVALID_BSSID = "invalid_bssid";
+    private static final ComponentName RECOMMENDATION_SERVICE_COMP =
+            new ComponentName("newPackageName", "newScoringServiceClass");
     private static final ScoredNetwork SCORED_NETWORK =
             new ScoredNetwork(new NetworkKey(new WifiKey(quote(SSID), "00:00:00:00:00:00")),
                     null /* rssiCurve*/);
@@ -124,7 +127,7 @@
             new ScoredNetwork(new NetworkKey(new WifiKey(quote(SSID_2), "00:00:00:00:00:00")),
                     null /* rssiCurve*/);
     private static final NetworkScorerAppData NEW_SCORER =
-        new NetworkScorerAppData("newPackageName", 1, "newScoringServiceClass");
+        new NetworkScorerAppData(1, RECOMMENDATION_SERVICE_COMP);
 
     @Mock private NetworkScorerAppManager mNetworkScorerAppManager;
     @Mock private Context mContext;
@@ -203,8 +206,7 @@
 
         verify(mContext).bindServiceAsUser(MockUtils.checkIntent(
                 new Intent(NetworkScoreManager.ACTION_RECOMMEND_NETWORKS)
-                        .setComponent(new ComponentName(NEW_SCORER.packageName,
-                                NEW_SCORER.recommendationServiceClassName))),
+                        .setComponent(RECOMMENDATION_SERVICE_COMP)),
                 any(ServiceConnection.class),
                 eq(Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE),
                 eq(UserHandle.SYSTEM));
@@ -657,7 +659,8 @@
         when(mNetworkScorerAppManager.getActiveScorer()).thenReturn(NEW_SCORER);
         mNetworkScoreService.systemRunning();
 
-        assertEquals(NEW_SCORER.packageName, mNetworkScoreService.getActiveScorerPackage());
+        assertEquals(NEW_SCORER.getRecommendationServicePackageName(),
+                mNetworkScoreService.getActiveScorerPackage());
     }
 
     @Test
@@ -776,6 +779,54 @@
     }
 
     @Test
+    public void testCurrentNetworkScoreCacheFilter_invalidWifiInfo_nullSsid() throws Exception {
+        when(mWifiInfo.getSSID()).thenReturn(null);
+        NetworkScoreService.CurrentNetworkScoreCacheFilter cacheFilter =
+                new NetworkScoreService.CurrentNetworkScoreCacheFilter(() -> mWifiInfo);
+
+        List<ScoredNetwork> actualList =
+                cacheFilter.apply(Lists.newArrayList(SCORED_NETWORK, SCORED_NETWORK_2));
+
+        assertTrue(actualList.isEmpty());
+    }
+
+    @Test
+    public void testCurrentNetworkScoreCacheFilter_invalidWifiInfo_noneSsid() throws Exception {
+        when(mWifiInfo.getSSID()).thenReturn(WifiSsid.NONE);
+        NetworkScoreService.CurrentNetworkScoreCacheFilter cacheFilter =
+                new NetworkScoreService.CurrentNetworkScoreCacheFilter(() -> mWifiInfo);
+
+        List<ScoredNetwork> actualList =
+                cacheFilter.apply(Lists.newArrayList(SCORED_NETWORK, SCORED_NETWORK_2));
+
+        assertTrue(actualList.isEmpty());
+    }
+
+    @Test
+    public void testCurrentNetworkScoreCacheFilter_invalidWifiInfo_emptySsid() throws Exception {
+        when(mWifiInfo.getSSID()).thenReturn("");
+        NetworkScoreService.CurrentNetworkScoreCacheFilter cacheFilter =
+                new NetworkScoreService.CurrentNetworkScoreCacheFilter(() -> mWifiInfo);
+
+        List<ScoredNetwork> actualList =
+                cacheFilter.apply(Lists.newArrayList(SCORED_NETWORK, SCORED_NETWORK_2));
+
+        assertTrue(actualList.isEmpty());
+    }
+
+    @Test
+    public void testCurrentNetworkScoreCacheFilter_invalidWifiInfo_invalidBssid() throws Exception {
+        when(mWifiInfo.getBSSID()).thenReturn(INVALID_BSSID);
+        NetworkScoreService.CurrentNetworkScoreCacheFilter cacheFilter =
+                new NetworkScoreService.CurrentNetworkScoreCacheFilter(() -> mWifiInfo);
+
+        List<ScoredNetwork> actualList =
+                cacheFilter.apply(Lists.newArrayList(SCORED_NETWORK, SCORED_NETWORK_2));
+
+        assertTrue(actualList.isEmpty());
+    }
+
+    @Test
     public void testCurrentNetworkScoreCacheFilter_scoreFiltered() throws Exception {
         NetworkScoreService.CurrentNetworkScoreCacheFilter cacheFilter =
                 new NetworkScoreService.CurrentNetworkScoreCacheFilter(() -> mWifiInfo);
@@ -811,6 +862,24 @@
     }
 
     @Test
+    public void testScanResultsScoreCacheFilter_invalidScanResults() throws Exception {
+        List<ScanResult> invalidScanResults = Lists.newArrayList(
+                new ScanResult(),
+                createScanResult("", SCORED_NETWORK.networkKey.wifiKey.bssid),
+                createScanResult(WifiSsid.NONE, SCORED_NETWORK.networkKey.wifiKey.bssid),
+                createScanResult(SSID, null),
+                createScanResult(SSID, INVALID_BSSID)
+        );
+        NetworkScoreService.ScanResultsScoreCacheFilter cacheFilter =
+                new NetworkScoreService.ScanResultsScoreCacheFilter(() -> invalidScanResults);
+
+        List<ScoredNetwork> actualList =
+                cacheFilter.apply(Lists.newArrayList(SCORED_NETWORK, SCORED_NETWORK_2));
+
+        assertTrue(actualList.isEmpty());
+    }
+
+    @Test
     public void testScanResultsScoreCacheFilter_scoresFiltered() throws Exception {
         NetworkScoreService.ScanResultsScoreCacheFilter cacheFilter =
                 new NetworkScoreService.ScanResultsScoreCacheFilter(() -> mScanResults);
@@ -827,10 +896,52 @@
         assertEquals(expectedList, actualList);
     }
 
+    @Test
+    public void testGetActiveScorer_notConnected_canRequestScores() throws Exception {
+        when(mContext.checkCallingOrSelfPermission(permission.REQUEST_NETWORK_SCORES))
+                .thenReturn(PackageManager.PERMISSION_GRANTED);
+        assertNull(mNetworkScoreService.getActiveScorer());
+    }
+
+    @Test
+    public void testGetActiveScorer_notConnected_canNotRequestScores() throws Exception {
+        when(mContext.checkCallingOrSelfPermission(permission.REQUEST_NETWORK_SCORES))
+                .thenReturn(PackageManager.PERMISSION_DENIED);
+        try {
+            mNetworkScoreService.getActiveScorer();
+            fail("SecurityException expected.");
+        } catch (SecurityException e) {
+            // expected
+        }
+    }
+
+    @Test
+    public void testGetActiveScorer_connected_canRequestScores()
+            throws Exception {
+        when(mContext.checkCallingOrSelfPermission(permission.REQUEST_NETWORK_SCORES))
+                .thenReturn(PackageManager.PERMISSION_GRANTED);
+        NetworkScorerAppData expectedAppData =
+                new NetworkScorerAppData(Binder.getCallingUid(), RECOMMENDATION_SERVICE_COMP);
+        bindToScorer(expectedAppData);
+        assertEquals(expectedAppData, mNetworkScoreService.getActiveScorer());
+    }
+
+    @Test
+    public void testGetActiveScorer_connected_canNotRequestScores()
+            throws Exception {
+        when(mContext.checkCallingOrSelfPermission(permission.REQUEST_NETWORK_SCORES))
+                .thenReturn(PackageManager.PERMISSION_DENIED);
+        bindToScorer(false);
+        try {
+            mNetworkScoreService.getActiveScorer();
+            fail("SecurityException expected.");
+        } catch (SecurityException e) {
+            // expected
+        }
+    }
+
     // "injects" the mock INetworkRecommendationProvider into the NetworkScoreService.
     private void injectProvider() {
-        final ComponentName componentName = new ComponentName(NEW_SCORER.packageName,
-                NEW_SCORER.recommendationServiceClassName);
         when(mNetworkScorerAppManager.getActiveScorer()).thenReturn(NEW_SCORER);
         when(mContext.bindServiceAsUser(isA(Intent.class), isA(ServiceConnection.class), anyInt(),
                 isA(UserHandle.class))).thenAnswer(new Answer<Boolean>() {
@@ -840,7 +951,8 @@
                 when(mockBinder.queryLocalInterface(anyString()))
                         .thenReturn(mRecommendationProvider);
                 invocation.getArgumentAt(1, ServiceConnection.class)
-                        .onServiceConnected(componentName, mockBinder);
+                        .onServiceConnected(NEW_SCORER.getRecommendationServiceComponent(),
+                                mockBinder);
                 return true;
             }
         });
@@ -848,9 +960,13 @@
     }
 
     private void bindToScorer(boolean callerIsScorer) {
-        final int callingUid = callerIsScorer ? Binder.getCallingUid() : 0;
-        NetworkScorerAppData appData = new NetworkScorerAppData(NEW_SCORER.packageName,
-                callingUid, NEW_SCORER.recommendationServiceClassName);
+        final int callingUid = callerIsScorer ? Binder.getCallingUid() : Binder.getCallingUid() + 1;
+        NetworkScorerAppData appData =
+                new NetworkScorerAppData(callingUid, RECOMMENDATION_SERVICE_COMP);
+        bindToScorer(appData);
+    }
+
+    private void bindToScorer(NetworkScorerAppData appData) {
         when(mNetworkScorerAppManager.getActiveScorer()).thenReturn(appData);
         when(mContext.bindServiceAsUser(isA(Intent.class), isA(ServiceConnection.class), anyInt(),
                 isA(UserHandle.class))).thenReturn(true);
diff --git a/services/tests/servicestests/src/com/android/server/SyntheticPasswordTests.java b/services/tests/servicestests/src/com/android/server/SyntheticPasswordTests.java
new file mode 100644
index 0000000..6e5ade1
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/SyntheticPasswordTests.java
@@ -0,0 +1,329 @@
+/*
+ * 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.server;
+
+import static com.android.internal.widget.LockPatternUtils.SYNTHETIC_PASSWORD_ENABLED_KEY;
+import static com.android.internal.widget.LockPatternUtils.SYNTHETIC_PASSWORD_HANDLE_KEY;
+
+import android.os.RemoteException;
+import android.os.UserHandle;
+
+import com.android.internal.widget.LockPatternUtils;
+import com.android.internal.widget.VerifyCredentialResponse;
+import com.android.server.SyntheticPasswordManager.AuthenticationResult;
+import com.android.server.SyntheticPasswordManager.AuthenticationToken;
+
+
+/**
+ * runtest frameworks-services -c com.android.server.SyntheticPasswordTests
+ */
+public class SyntheticPasswordTests extends BaseLockSettingsServiceTests {
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    public void testPasswordBasedSyntheticPassword() throws RemoteException {
+        final int USER_ID = 10;
+        final String PASSWORD = "user-password";
+        final String BADPASSWORD = "bad-password";
+        MockSyntheticPasswordManager manager = new MockSyntheticPasswordManager(mStorage, mGateKeeperService);
+        AuthenticationToken authToken = manager.newSyntheticPasswordAndSid(mGateKeeperService, null,
+                null, USER_ID);
+        long handle = manager.createPasswordBasedSyntheticPassword(mGateKeeperService, PASSWORD,
+                LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, authToken, USER_ID);
+
+        AuthenticationResult result = manager.unwrapPasswordBasedSyntheticPassword(mGateKeeperService, handle, PASSWORD, USER_ID);
+        assertEquals(result.authToken.deriveKeyStorePassword(), authToken.deriveKeyStorePassword());
+
+        result = manager.unwrapPasswordBasedSyntheticPassword(mGateKeeperService, handle, BADPASSWORD, USER_ID);
+        assertNull(result.authToken);
+    }
+
+    private void disableSyntheticPassword(int userId) throws RemoteException {
+        mService.setLong(SYNTHETIC_PASSWORD_ENABLED_KEY, 0, UserHandle.USER_SYSTEM);
+    }
+
+    private void enableSyntheticPassword(int userId) throws RemoteException {
+        mService.setLong(SYNTHETIC_PASSWORD_ENABLED_KEY, 1, UserHandle.USER_SYSTEM);
+    }
+
+    private boolean hasSyntheticPassword(int userId) throws RemoteException {
+        return mService.getLong(SYNTHETIC_PASSWORD_HANDLE_KEY, 0, userId) != 0;
+    }
+
+    public void testPasswordMigration() throws RemoteException {
+        final String PASSWORD = "testPasswordMigration-password";
+
+        disableSyntheticPassword(PRIMARY_USER_ID);
+        mService.setLockCredential(PASSWORD, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, null, PRIMARY_USER_ID);
+        long sid = mGateKeeperService.getSecureUserId(PRIMARY_USER_ID);
+        final byte[] primaryStorageKey = mStorageManager.getUserUnlockToken(PRIMARY_USER_ID);
+        enableSyntheticPassword(PRIMARY_USER_ID);
+        // Performs migration
+        assertEquals(VerifyCredentialResponse.RESPONSE_OK,
+                mService.verifyCredential(PASSWORD, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, 0, PRIMARY_USER_ID).getResponseCode());
+        assertEquals(sid, mGateKeeperService.getSecureUserId(PRIMARY_USER_ID));
+        assertTrue(hasSyntheticPassword(PRIMARY_USER_ID));
+
+        // SP-based verification
+        assertEquals(VerifyCredentialResponse.RESPONSE_OK,
+                mService.verifyCredential(PASSWORD, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, 0, PRIMARY_USER_ID).getResponseCode());
+        assertArrayNotSame(primaryStorageKey, mStorageManager.getUserUnlockToken(PRIMARY_USER_ID));
+    }
+
+    private void initializeCredentialUnderSP(String password, int userId) throws RemoteException {
+        enableSyntheticPassword(userId);
+        mService.setLockCredential(password, password != null ? LockPatternUtils.CREDENTIAL_TYPE_PASSWORD : LockPatternUtils.CREDENTIAL_TYPE_NONE, null, userId);
+    }
+
+    public void testSyntheticPasswordChangeCredential() throws RemoteException {
+        final String PASSWORD = "testSyntheticPasswordChangeCredential-password";
+        final String NEWPASSWORD = "testSyntheticPasswordChangeCredential-newpassword";
+
+        initializeCredentialUnderSP(PASSWORD, PRIMARY_USER_ID);
+        long sid = mGateKeeperService.getSecureUserId(PRIMARY_USER_ID);
+        mService.setLockCredential(NEWPASSWORD, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, PASSWORD, PRIMARY_USER_ID);
+        mGateKeeperService.clearSecureUserId(PRIMARY_USER_ID);
+        assertEquals(VerifyCredentialResponse.RESPONSE_OK,
+                mService.verifyCredential(NEWPASSWORD, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, 0, PRIMARY_USER_ID).getResponseCode());
+        assertEquals(sid, mGateKeeperService.getSecureUserId(PRIMARY_USER_ID));
+    }
+
+    public void testSyntheticPasswordVerifyCredential() throws RemoteException {
+        final String PASSWORD = "testSyntheticPasswordVerifyCredential-password";
+        final String BADPASSWORD = "testSyntheticPasswordVerifyCredential-badpassword";
+
+        initializeCredentialUnderSP(PASSWORD, PRIMARY_USER_ID);
+        assertEquals(VerifyCredentialResponse.RESPONSE_OK,
+                mService.verifyCredential(PASSWORD, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, 0, PRIMARY_USER_ID).getResponseCode());
+
+        assertEquals(VerifyCredentialResponse.RESPONSE_ERROR,
+                mService.verifyCredential(BADPASSWORD, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, 0, PRIMARY_USER_ID).getResponseCode());
+    }
+
+    public void testSyntheticPasswordClearCredential() throws RemoteException {
+        final String PASSWORD = "testSyntheticPasswordClearCredential-password";
+        final String NEWPASSWORD = "testSyntheticPasswordClearCredential-newpassword";
+
+        initializeCredentialUnderSP(PASSWORD, PRIMARY_USER_ID);
+        long sid = mGateKeeperService.getSecureUserId(PRIMARY_USER_ID);
+        // clear password
+        mService.setLockCredential(null, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, PASSWORD, PRIMARY_USER_ID);
+        assertEquals(0 ,mGateKeeperService.getSecureUserId(PRIMARY_USER_ID));
+
+        // set a new password
+        mService.setLockCredential(NEWPASSWORD, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, null, PRIMARY_USER_ID);
+        assertEquals(VerifyCredentialResponse.RESPONSE_OK,
+                mService.verifyCredential(NEWPASSWORD, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, 0, PRIMARY_USER_ID).getResponseCode());
+        assertNotSame(sid, mGateKeeperService.getSecureUserId(PRIMARY_USER_ID));
+    }
+
+    public void testSyntheticPasswordClearCredentialUntrusted() throws RemoteException {
+        final String PASSWORD = "testSyntheticPasswordClearCredential-password";
+        final String NEWPASSWORD = "testSyntheticPasswordClearCredential-newpassword";
+
+        initializeCredentialUnderSP(PASSWORD, PRIMARY_USER_ID);
+        long sid = mGateKeeperService.getSecureUserId(PRIMARY_USER_ID);
+        // clear password
+        mService.setLockCredential(null, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, null, PRIMARY_USER_ID);
+        assertEquals(0 ,mGateKeeperService.getSecureUserId(PRIMARY_USER_ID));
+
+        // set a new password
+        mService.setLockCredential(NEWPASSWORD, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, null, PRIMARY_USER_ID);
+        assertEquals(VerifyCredentialResponse.RESPONSE_OK,
+                mService.verifyCredential(NEWPASSWORD, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, 0, PRIMARY_USER_ID).getResponseCode());
+        assertNotSame(sid, mGateKeeperService.getSecureUserId(PRIMARY_USER_ID));
+    }
+
+    public void testSyntheticPasswordChangeCredentialUntrusted() throws RemoteException {
+        final String PASSWORD = "testSyntheticPasswordClearCredential-password";
+        final String NEWPASSWORD = "testSyntheticPasswordClearCredential-newpassword";
+
+        initializeCredentialUnderSP(PASSWORD, PRIMARY_USER_ID);
+        long sid = mGateKeeperService.getSecureUserId(PRIMARY_USER_ID);
+        // Untrusted change password
+        mService.setLockCredential(NEWPASSWORD, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, null, PRIMARY_USER_ID);
+        assertNotSame(0 ,mGateKeeperService.getSecureUserId(PRIMARY_USER_ID));
+        assertNotSame(sid ,mGateKeeperService.getSecureUserId(PRIMARY_USER_ID));
+
+        // Verify the password
+        assertEquals(VerifyCredentialResponse.RESPONSE_OK,
+                mService.verifyCredential(NEWPASSWORD, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, 0, PRIMARY_USER_ID).getResponseCode());
+    }
+
+
+    public void testManagedProfileUnifiedChallengeMigration() throws RemoteException {
+        final String UnifiedPassword = "testManagedProfileUnifiedChallengeMigration-pwd";
+        disableSyntheticPassword(PRIMARY_USER_ID);
+        disableSyntheticPassword(MANAGED_PROFILE_USER_ID);
+        mService.setLockCredential(UnifiedPassword, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, null, PRIMARY_USER_ID);
+        mService.setSeparateProfileChallengeEnabled(MANAGED_PROFILE_USER_ID, false, null);
+        final long primarySid = mGateKeeperService.getSecureUserId(PRIMARY_USER_ID);
+        final long profileSid = mGateKeeperService.getSecureUserId(MANAGED_PROFILE_USER_ID);
+        final byte[] primaryStorageKey = mStorageManager.getUserUnlockToken(PRIMARY_USER_ID);
+        final byte[] profileStorageKey = mStorageManager.getUserUnlockToken(MANAGED_PROFILE_USER_ID);
+        assertTrue(primarySid != 0);
+        assertTrue(profileSid != 0);
+        assertTrue(profileSid != primarySid);
+
+        // do migration
+        enableSyntheticPassword(PRIMARY_USER_ID);
+        enableSyntheticPassword(MANAGED_PROFILE_USER_ID);
+        assertEquals(VerifyCredentialResponse.RESPONSE_OK,
+                mService.verifyCredential(UnifiedPassword, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, 0, PRIMARY_USER_ID).getResponseCode());
+
+        // verify
+        assertEquals(VerifyCredentialResponse.RESPONSE_OK,
+                mService.verifyCredential(UnifiedPassword, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, 0, PRIMARY_USER_ID).getResponseCode());
+        assertEquals(primarySid, mGateKeeperService.getSecureUserId(PRIMARY_USER_ID));
+        assertEquals(profileSid, mGateKeeperService.getSecureUserId(MANAGED_PROFILE_USER_ID));
+        assertArrayNotSame(primaryStorageKey, mStorageManager.getUserUnlockToken(PRIMARY_USER_ID));
+        assertArrayNotSame(profileStorageKey, mStorageManager.getUserUnlockToken(MANAGED_PROFILE_USER_ID));
+        assertTrue(hasSyntheticPassword(PRIMARY_USER_ID));
+        assertTrue(hasSyntheticPassword(MANAGED_PROFILE_USER_ID));
+    }
+
+    public void testManagedProfileSeparateChallengeMigration() throws RemoteException {
+        final String primaryPassword = "testManagedProfileSeparateChallengeMigration-primary";
+        final String profilePassword = "testManagedProfileSeparateChallengeMigration-profile";
+        mService.setLockCredential(primaryPassword, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, null, PRIMARY_USER_ID);
+        mService.setLockCredential(profilePassword, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, null, MANAGED_PROFILE_USER_ID);
+        final long primarySid = mGateKeeperService.getSecureUserId(PRIMARY_USER_ID);
+        final long profileSid = mGateKeeperService.getSecureUserId(MANAGED_PROFILE_USER_ID);
+        final byte[] primaryStorageKey = mStorageManager.getUserUnlockToken(PRIMARY_USER_ID);
+        final byte[] profileStorageKey = mStorageManager.getUserUnlockToken(MANAGED_PROFILE_USER_ID);
+        assertTrue(primarySid != 0);
+        assertTrue(profileSid != 0);
+        assertTrue(profileSid != primarySid);
+
+        // do migration
+        enableSyntheticPassword(PRIMARY_USER_ID);
+        enableSyntheticPassword(MANAGED_PROFILE_USER_ID);
+        assertEquals(VerifyCredentialResponse.RESPONSE_OK,
+                mService.verifyCredential(primaryPassword, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, 0, PRIMARY_USER_ID).getResponseCode());
+        assertEquals(VerifyCredentialResponse.RESPONSE_OK,
+                mService.verifyCredential(profilePassword, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, 0, MANAGED_PROFILE_USER_ID).getResponseCode());
+
+        // verify
+        assertEquals(VerifyCredentialResponse.RESPONSE_OK,
+                mService.verifyCredential(primaryPassword, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, 0, PRIMARY_USER_ID).getResponseCode());
+        assertEquals(VerifyCredentialResponse.RESPONSE_OK,
+                mService.verifyCredential(profilePassword, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, 0, MANAGED_PROFILE_USER_ID).getResponseCode());
+        assertEquals(primarySid, mGateKeeperService.getSecureUserId(PRIMARY_USER_ID));
+        assertEquals(profileSid, mGateKeeperService.getSecureUserId(MANAGED_PROFILE_USER_ID));
+        assertArrayNotSame(primaryStorageKey, mStorageManager.getUserUnlockToken(PRIMARY_USER_ID));
+        assertArrayNotSame(profileStorageKey, mStorageManager.getUserUnlockToken(MANAGED_PROFILE_USER_ID));
+        assertTrue(hasSyntheticPassword(PRIMARY_USER_ID));
+        assertTrue(hasSyntheticPassword(MANAGED_PROFILE_USER_ID));
+    }
+
+    public void testTokenBasedResetPassword() throws RemoteException {
+        final String PASSWORD = "password";
+        final String PATTERN = "123654";
+        final String TOKEN = "some-high-entropy-secure-token";
+        initializeCredentialUnderSP(PASSWORD, PRIMARY_USER_ID);
+        final byte[] storageKey = mStorageManager.getUserUnlockToken(PRIMARY_USER_ID);
+
+        long handle = mService.addEscrowToken(TOKEN.getBytes(), PRIMARY_USER_ID);
+        assertFalse(mService.isEscrowTokenActive(handle, PRIMARY_USER_ID));
+
+        mService.verifyCredential(PASSWORD, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, 0, PRIMARY_USER_ID).getResponseCode();
+        assertTrue(mService.isEscrowTokenActive(handle, PRIMARY_USER_ID));
+
+        mService.setLockCredentialWithToken(PATTERN, LockPatternUtils.CREDENTIAL_TYPE_PATTERN, handle, TOKEN.getBytes(), PRIMARY_USER_ID);
+
+        assertEquals(VerifyCredentialResponse.RESPONSE_OK,
+                mService.verifyCredential(PATTERN, LockPatternUtils.CREDENTIAL_TYPE_PATTERN, 0, PRIMARY_USER_ID).getResponseCode());
+        assertArrayEquals(storageKey, mStorageManager.getUserUnlockToken(PRIMARY_USER_ID));
+    }
+
+    public void testTokenBasedClearPassword() throws RemoteException {
+        final String PASSWORD = "password";
+        final String PATTERN = "123654";
+        final String TOKEN = "some-high-entropy-secure-token";
+        initializeCredentialUnderSP(PASSWORD, PRIMARY_USER_ID);
+        final byte[] storageKey = mStorageManager.getUserUnlockToken(PRIMARY_USER_ID);
+
+        long handle = mService.addEscrowToken(TOKEN.getBytes(), PRIMARY_USER_ID);
+        assertFalse(mService.isEscrowTokenActive(handle, PRIMARY_USER_ID));
+
+        mService.verifyCredential(PASSWORD, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, 0, PRIMARY_USER_ID).getResponseCode();
+        assertTrue(mService.isEscrowTokenActive(handle, PRIMARY_USER_ID));
+
+        mService.setLockCredentialWithToken(null, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, handle, TOKEN.getBytes(), PRIMARY_USER_ID);
+        mService.setLockCredentialWithToken(PATTERN, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, handle, TOKEN.getBytes(), PRIMARY_USER_ID);
+
+        assertEquals(VerifyCredentialResponse.RESPONSE_OK,
+                mService.verifyCredential(PATTERN, LockPatternUtils.CREDENTIAL_TYPE_PATTERN, 0, PRIMARY_USER_ID).getResponseCode());
+        assertArrayEquals(storageKey, mStorageManager.getUserUnlockToken(PRIMARY_USER_ID));
+    }
+
+    public void testTokenBasedResetPasswordAfterCredentialChanges() throws RemoteException {
+        final String PASSWORD = "password";
+        final String PATTERN = "123654";
+        final String NEWPASSWORD = "password";
+        final String TOKEN = "some-high-entropy-secure-token";
+        initializeCredentialUnderSP(PASSWORD, PRIMARY_USER_ID);
+        final byte[] storageKey = mStorageManager.getUserUnlockToken(PRIMARY_USER_ID);
+
+        long handle = mService.addEscrowToken(TOKEN.getBytes(), PRIMARY_USER_ID);
+        assertFalse(mService.isEscrowTokenActive(handle, PRIMARY_USER_ID));
+
+        mService.verifyCredential(PASSWORD, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, 0, PRIMARY_USER_ID).getResponseCode();
+        assertTrue(mService.isEscrowTokenActive(handle, PRIMARY_USER_ID));
+
+        mService.setLockCredential(PATTERN, LockPatternUtils.CREDENTIAL_TYPE_PATTERN, PASSWORD, PRIMARY_USER_ID);
+
+        mService.setLockCredentialWithToken(NEWPASSWORD, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, handle, TOKEN.getBytes(), PRIMARY_USER_ID);
+
+        assertEquals(VerifyCredentialResponse.RESPONSE_OK,
+                mService.verifyCredential(NEWPASSWORD, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, 0, PRIMARY_USER_ID).getResponseCode());
+        assertArrayEquals(storageKey, mStorageManager.getUserUnlockToken(PRIMARY_USER_ID));
+    }
+
+    public void testEscrowTokenActivatedImmediatelyIfNoUserPasswordNeedsMigration() throws RemoteException {
+        final String TOKEN = "some-high-entropy-secure-token";
+        enableSyntheticPassword(PRIMARY_USER_ID);
+        long handle = mService.addEscrowToken(TOKEN.getBytes(), PRIMARY_USER_ID);
+        assertTrue(mService.isEscrowTokenActive(handle, PRIMARY_USER_ID));
+        assertEquals(0, mGateKeeperService.getSecureUserId(PRIMARY_USER_ID));
+        assertTrue(hasSyntheticPassword(PRIMARY_USER_ID));
+    }
+
+    public void testEscrowTokenActivatedImmediatelyIfNoUserPasswordNoMigration() throws RemoteException {
+        final String TOKEN = "some-high-entropy-secure-token";
+        initializeCredentialUnderSP(null, PRIMARY_USER_ID);
+        long handle = mService.addEscrowToken(TOKEN.getBytes(), PRIMARY_USER_ID);
+        assertTrue(mService.isEscrowTokenActive(handle, PRIMARY_USER_ID));
+        assertEquals(0, mGateKeeperService.getSecureUserId(PRIMARY_USER_ID));
+        assertTrue(hasSyntheticPassword(PRIMARY_USER_ID));
+    }
+
+    // b/34600579
+    //TODO: add non-migration work profile case, and unify/un-unify transition.
+    //TODO: test token after user resets password
+    //TODO: test token based reset after unified work challenge
+    //TODO: test clear password after unified work challenge
+}
+
diff --git a/services/tests/servicestests/src/com/android/server/accounts/AccountManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/accounts/AccountManagerServiceTest.java
index 213fb27..e433b60 100644
--- a/services/tests/servicestests/src/com/android/server/accounts/AccountManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/accounts/AccountManagerServiceTest.java
@@ -190,6 +190,8 @@
         mAms.addAccountExplicitly(a31, "p31", null);
         mAms.addAccountExplicitly(a32, "p32", null);
 
+        String[] list = new String[]{AccountManagerServiceTestFixtures.CALLER_PACKAGE};
+        when(mMockPackageManager.getPackagesForUid(anyInt())).thenReturn(list);
         Account[] accounts = mAms.getAccounts(null, mContext.getOpPackageName());
         Arrays.sort(accounts, new AccountSorter());
         assertEquals(6, accounts.length);
@@ -306,6 +308,8 @@
 
     @SmallTest
     public void testRemovedAccountSync() throws Exception {
+        String[] list = new String[]{AccountManagerServiceTestFixtures.CALLER_PACKAGE};
+        when(mMockPackageManager.getPackagesForUid(anyInt())).thenReturn(list);
         unlockSystemUser();
         Account a1 = new Account("account1", AccountManagerServiceTestFixtures.ACCOUNT_TYPE_1);
         Account a2 = new Account("account2", AccountManagerServiceTestFixtures.ACCOUNT_TYPE_2);
@@ -347,6 +351,8 @@
 
         // Start testing
         unlockSystemUser();
+        String[] list = new String[]{AccountManagerServiceTestFixtures.CALLER_PACKAGE};
+        when(mMockPackageManager.getPackagesForUid(anyInt())).thenReturn(list);
         Account[] accounts = mAms.getAccounts(null, mContext.getOpPackageName());
         assertEquals("1 account should be migrated", 1, accounts.length);
         assertEquals(PreNTestDatabaseHelper.ACCOUNT_NAME, accounts[0].name);
@@ -1048,7 +1054,6 @@
         // Assert finishSessionAsUser added calling uid and pid into the sessionBundle
         assertTrue(sessionBundle.containsKey(AccountManager.KEY_CALLER_UID));
         assertTrue(sessionBundle.containsKey(AccountManager.KEY_CALLER_PID));
-        // Assert App bundle data overrides sessionBundle data
         assertEquals(sessionBundle.getString(
                 AccountManager.KEY_ANDROID_PACKAGE_NAME), "APCT.package");
 
@@ -1387,6 +1392,9 @@
 
     @SmallTest
     public void testRemoveAccountAsUserRemovalAllowed() throws Exception {
+        String[] list = new String[]{AccountManagerServiceTestFixtures.CALLER_PACKAGE};
+        when(mMockPackageManager.getPackagesForUid(anyInt())).thenReturn(list);
+
         unlockSystemUser();
         mAms.addAccountExplicitly(AccountManagerServiceTestFixtures.ACCOUNT_SUCCESS, "p1", null);
         Account[] addedAccounts =
diff --git a/services/tests/servicestests/src/com/android/server/accounts/AccountsDbTest.java b/services/tests/servicestests/src/com/android/server/accounts/AccountsDbTest.java
index 2e045ff..2cb8af4 100644
--- a/services/tests/servicestests/src/com/android/server/accounts/AccountsDbTest.java
+++ b/services/tests/servicestests/src/com/android/server/accounts/AccountsDbTest.java
@@ -355,49 +355,49 @@
     @Test
     public void testVisibilityFindSetDelete() {
         long accId = 10;
-        int uid1 = 100500;
-        int uid2 = 100501;
+        String packageName1 = "com.example.one";
+        String packageName2 = "com.example.two";
         Account account = new Account("name", "example.com");
-        assertNull(mAccountsDb.findAccountVisibility(account, uid1));
+        assertNull(mAccountsDb.findAccountVisibility(account, packageName1));
 
         mAccountsDb.insertDeAccount(account, accId);
-        assertNull(mAccountsDb.findAccountVisibility(account, uid1));
-        assertNull(mAccountsDb.findAccountVisibility(accId, uid1));
+        assertNull(mAccountsDb.findAccountVisibility(account, packageName1));
+        assertNull(mAccountsDb.findAccountVisibility(accId, packageName1));
 
-        mAccountsDb.setAccountVisibility(accId, uid1, 1);
-        assertEquals(mAccountsDb.findAccountVisibility(account, uid1), Integer.valueOf(1));
-        assertEquals(mAccountsDb.findAccountVisibility(accId, uid1), Integer.valueOf(1));
+        mAccountsDb.setAccountVisibility(accId, packageName1, 1);
+        assertEquals(mAccountsDb.findAccountVisibility(account, packageName1), Integer.valueOf(1));
+        assertEquals(mAccountsDb.findAccountVisibility(accId, packageName1), Integer.valueOf(1));
 
-        mAccountsDb.setAccountVisibility(accId, uid2, 2);
-        assertEquals(mAccountsDb.findAccountVisibility(accId, uid2), Integer.valueOf(2));
+        mAccountsDb.setAccountVisibility(accId, packageName2, 2);
+        assertEquals(mAccountsDb.findAccountVisibility(accId, packageName2), Integer.valueOf(2));
 
-        mAccountsDb.setAccountVisibility(accId, uid2, 3);
-        assertEquals(mAccountsDb.findAccountVisibility(accId, uid2), Integer.valueOf(3));
+        mAccountsDb.setAccountVisibility(accId, packageName2, 3);
+        assertEquals(mAccountsDb.findAccountVisibility(accId, packageName2), Integer.valueOf(3));
 
-        Map<Integer, Integer> vis = mAccountsDb.findAllVisibilityValuesForAccount(account);
+        Map<String, Integer> vis = mAccountsDb.findAllVisibilityValuesForAccount(account);
         assertEquals(vis.size(), 2);
-        assertEquals(vis.get(uid1), Integer.valueOf(1));
-        assertEquals(vis.get(uid2), Integer.valueOf(3));
+        assertEquals(vis.get(packageName1), Integer.valueOf(1));
+        assertEquals(vis.get(packageName2), Integer.valueOf(3));
 
-        assertTrue(mAccountsDb.deleteAccountVisibilityForUid(uid1));
-        assertNull(mAccountsDb.findAccountVisibility(accId, uid1));
-        assertFalse(mAccountsDb.deleteAccountVisibilityForUid(uid1)); // Already deleted.
+        assertTrue(mAccountsDb.deleteAccountVisibilityForPackage(packageName1));
+        assertNull(mAccountsDb.findAccountVisibility(accId, packageName1));
+        assertFalse(mAccountsDb.deleteAccountVisibilityForPackage(packageName1)); // 2nd attempt.
     }
 
     @Test
     public void testVisibilityCleanupTrigger() {
         long accId = 10;
-        int uid1 = 100500;
+        String packageName1 = "com.example.one";
         Account account = new Account("name", "example.com");
 
-        assertNull(mAccountsDb.findAccountVisibility(account, uid1));
+        assertNull(mAccountsDb.findAccountVisibility(account, packageName1));
         mAccountsDb.insertDeAccount(account, accId);
-        assertNull(mAccountsDb.findAccountVisibility(account, uid1));
+        assertNull(mAccountsDb.findAccountVisibility(account, packageName1));
 
-        mAccountsDb.setAccountVisibility(accId, uid1, 1);
-        assertEquals(mAccountsDb.findAccountVisibility(accId, uid1), Integer.valueOf(1));
+        mAccountsDb.setAccountVisibility(accId, packageName1, 1);
+        assertEquals(mAccountsDb.findAccountVisibility(accId, packageName1), Integer.valueOf(1));
 
         assertTrue(mAccountsDb.deleteDeAccount(accId)); // Trigger should remove visibility.
-        assertNull(mAccountsDb.findAccountVisibility(account, uid1));
+        assertNull(mAccountsDb.findAccountVisibility(account, packageName1));
     }
 }
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceTestable.java b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceTestable.java
index 3b92a34..e6dd13f 100644
--- a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceTestable.java
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceTestable.java
@@ -29,6 +29,7 @@
 import android.os.UserHandle;
 import android.os.UserManager;
 import android.os.UserManagerInternal;
+import android.security.KeyChain;
 import android.telephony.TelephonyManager;
 import android.util.ArrayMap;
 import android.util.Pair;
@@ -375,5 +376,10 @@
         boolean isBuildDebuggable() {
             return context.buildMock.isDebuggable;
         }
+
+        @Override
+        KeyChain.KeyChainConnection keyChainBindAsUser(UserHandle user) {
+            return context.keyChainConnection;
+        }
     }
 }
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
index f4e4e08..d0e5159 100644
--- a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
@@ -21,6 +21,8 @@
 
 import android.Manifest.permission;
 import android.app.Activity;
+import android.app.Notification;
+import android.app.NotificationManager;
 import android.app.admin.DeviceAdminReceiver;
 import android.app.admin.DevicePolicyManager;
 import android.app.admin.DevicePolicyManagerInternal;
@@ -32,6 +34,7 @@
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
+import android.content.pm.ParceledListSlice;
 import android.content.res.Resources;
 import android.graphics.Color;
 import android.net.IIpConnectivityMetrics;
@@ -52,10 +55,14 @@
 import android.util.Pair;
 
 import com.android.internal.R;
+import com.android.internal.util.ParcelableString;
+import com.android.internal.widget.LockPatternUtils;
 import com.android.server.LocalServices;
 import com.android.server.SystemService;
 import com.android.server.pm.UserRestrictionsUtils;
 
+import org.hamcrest.BaseMatcher;
+import org.hamcrest.Description;
 import org.mockito.invocation.InvocationOnMock;
 import org.mockito.stubbing.Answer;
 
@@ -76,13 +83,16 @@
 import static org.mockito.Matchers.anyLong;
 import static org.mockito.Matchers.anyObject;
 import static org.mockito.Matchers.anyString;
+import static org.mockito.Matchers.argThat;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Matchers.isNull;
 import static org.mockito.Mockito.atLeast;
 import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.reset;
+import static org.mockito.Mockito.timeout;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.verifyZeroInteractions;
@@ -908,6 +918,8 @@
         assertEquals(admin1, dpm.getDeviceOwnerComponentOnAnyUser());
 
         dpm.addUserRestriction(admin1, UserManager.DISALLOW_ADD_USER);
+        when(mContext.userManager.hasUserRestriction(eq(UserManager.DISALLOW_ADD_USER),
+                MockUtils.checkUserHandle(UserHandle.USER_SYSTEM))).thenReturn(true);
 
         assertTrue(dpm.isAdminActive(admin1));
         assertFalse(dpm.isRemovingAdmin(admin1, UserHandle.USER_SYSTEM));
@@ -937,6 +949,10 @@
         // Now DO shouldn't be set.
         assertNull(dpm.getDeviceOwnerComponentOnAnyUser());
 
+        verify(mContext.userManager).setUserRestriction(eq(UserManager.DISALLOW_ADD_USER),
+                eq(false),
+                MockUtils.checkUserHandle(UserHandle.USER_SYSTEM));
+
         verify(mContext.userManagerInternal).setDevicePolicyUserRestrictions(
                 eq(UserHandle.USER_SYSTEM),
                 eq(null),
@@ -1193,6 +1209,53 @@
         return uid;
     }
 
+    public void testCertificateDisclosure() throws Exception {
+        final int userId = DpmMockContext.CALLER_USER_HANDLE;
+        final UserHandle user = UserHandle.of(userId);
+
+        mContext.applicationInfo = new ApplicationInfo();
+        mContext.callerPermissions.add(permission.MANAGE_USERS);
+        mContext.packageName = "com.android.frameworks.servicestests";
+        mContext.userContexts.put(user, mContext);
+        when(mContext.resources.getColor(anyInt(), anyObject())).thenReturn(Color.WHITE);
+
+        ParceledListSlice<ParcelableString> oneCert = asSlice(new String[] {"1"});
+        ParceledListSlice<ParcelableString> fourCerts = asSlice(new String[] {"1", "2", "3", "4"});
+
+        final String TEST_STRING = "Test for exactly 2 certs out of 4";
+        doReturn(TEST_STRING).when(mContext.resources).getQuantityText(anyInt(), eq(2));
+
+        // Given that we have exactly one certificate installed,
+        when(mContext.keyChainConnection.getService().getUserCaAliases()).thenReturn(oneCert);
+        // when that certificate is approved,
+        dpms.approveCaCert(oneCert.getList().get(0).string, userId, true);
+        // a notification should not be shown.
+        verify(mContext.notificationManager, timeout(1000))
+                .cancelAsUser(anyString(), anyInt(), eq(user));
+
+        // Given that we have four certificates installed,
+        when(mContext.keyChainConnection.getService().getUserCaAliases()).thenReturn(fourCerts);
+        // when two of them are approved (one of them approved twice hence no action),
+        dpms.approveCaCert(fourCerts.getList().get(0).string, userId, true);
+        dpms.approveCaCert(fourCerts.getList().get(1).string, userId, true);
+        // a notification should be shown saying that there are two certificates left to approve.
+        verify(mContext.notificationManager, timeout(1000))
+                .notifyAsUser(anyString(), anyInt(), argThat(
+                        new BaseMatcher<Notification>() {
+                            @Override
+                            public boolean matches(Object item) {
+                                final Notification noti = (Notification) item;
+                                return TEST_STRING.equals(
+                                        noti.extras.getString(Notification.EXTRA_TITLE));
+                            }
+                            @Override
+                            public void describeTo(Description description) {
+                                description.appendText(
+                                        "Notification{title=\"" + TEST_STRING + "\"}");
+                            }
+                        }), eq(user));
+    }
+
     /**
      * Simple test for delegate set/get and general delegation. Tests verifying that delegated
      * privileges can acually be exercised by a delegate are not covered here.
@@ -2089,9 +2152,19 @@
         assertTrue(dpm.getAffiliationIds(admin2).isEmpty());
         assertFalse(dpm.isAffiliatedUser());
 
+        // Set affiliation ids again, then clear PO to check that the user becomes unaffiliated
+        dpm.setAffiliationIds(admin2, userAffiliationIds);
+        assertTrue(dpm.isAffiliatedUser());
+        dpm.clearProfileOwner(admin2);
+        assertFalse(dpm.isAffiliatedUser());
+
         // Check that the system user remains affiliated.
         mContext.binder.callingUid = DpmMockContext.CALLER_SYSTEM_USER_UID;
         assertTrue(dpm.isAffiliatedUser());
+
+        // Clear the device owner - the user becomes unaffiliated.
+        clearDeviceOwner();
+        assertFalse(dpm.isAffiliatedUser());
     }
 
     public void testGetUserProvisioningState_defaultResult() {
@@ -3332,6 +3405,75 @@
         MoreAsserts.assertEmpty(targetUsers);
     }
 
+    public void testLockTaskPackagesAllowedForAffiliatedUsers() throws Exception {
+        // Setup a device owner.
+        mContext.binder.callingUid = DpmMockContext.CALLER_SYSTEM_USER_UID;
+        setupDeviceOwner();
+        // Lock task packages are updated when loading user data.
+        verify(mContext.iactivityManager)
+                .updateLockTaskPackages(eq(UserHandle.USER_SYSTEM), eq(new String[0]));
+
+        // Set up a managed profile managed by different package (package name shouldn't matter)
+        final int MANAGED_PROFILE_USER_ID = 15;
+        final int MANAGED_PROFILE_ADMIN_UID = UserHandle.getUid(MANAGED_PROFILE_USER_ID, 20456);
+        final ComponentName adminDifferentPackage =
+                new ComponentName("another.package", "whatever.class");
+        addManagedProfile(adminDifferentPackage, MANAGED_PROFILE_ADMIN_UID, admin2);
+        verify(mContext.iactivityManager)
+                .updateLockTaskPackages(eq(MANAGED_PROFILE_USER_ID), eq(new String[0]));
+
+        // The DO can still set lock task packages
+        mContext.binder.callingUid = DpmMockContext.CALLER_SYSTEM_USER_UID;
+        final String[] doPackages = {"doPackage1", "doPackage2"};
+        dpm.setLockTaskPackages(admin1, doPackages);
+        MoreAsserts.assertEquals(doPackages, dpm.getLockTaskPackages(admin1));
+        assertTrue(dpm.isLockTaskPermitted("doPackage1"));
+        assertFalse(dpm.isLockTaskPermitted("anotherPackage"));
+        verify(mContext.iactivityManager)
+                .updateLockTaskPackages(eq(UserHandle.USER_SYSTEM), eq(doPackages));
+
+        // Managed profile is unaffiliated - shouldn't be able to setLockTaskPackages.
+        mContext.binder.callingUid = MANAGED_PROFILE_ADMIN_UID;
+        final String[] poPackages = {"poPackage1", "poPackage2"};
+        try {
+            dpm.setLockTaskPackages(adminDifferentPackage, poPackages);
+            fail("Didn't throw expected security exception.");
+        } catch (SecurityException expected) {
+        }
+        try {
+            dpm.getLockTaskPackages(adminDifferentPackage);
+            fail("Didn't throw expected security exception.");
+        } catch (SecurityException expected) {
+        }
+        assertFalse(dpm.isLockTaskPermitted("doPackage1"));
+
+        // Setting same affiliation ids
+        final List<String> userAffiliationIds = Arrays.asList("some-affiliation-id");
+        mContext.binder.callingUid = DpmMockContext.CALLER_SYSTEM_USER_UID;
+        dpm.setAffiliationIds(admin1, userAffiliationIds);
+
+        mContext.binder.callingUid = MANAGED_PROFILE_ADMIN_UID;
+        dpm.setAffiliationIds(adminDifferentPackage, userAffiliationIds);
+
+        // Now the managed profile can set lock task packages.
+        dpm.setLockTaskPackages(adminDifferentPackage, poPackages);
+        MoreAsserts.assertEquals(poPackages, dpm.getLockTaskPackages(adminDifferentPackage));
+        assertTrue(dpm.isLockTaskPermitted("poPackage1"));
+        assertFalse(dpm.isLockTaskPermitted("doPackage2"));
+        verify(mContext.iactivityManager)
+                .updateLockTaskPackages(eq(MANAGED_PROFILE_USER_ID), eq(poPackages));
+
+        // Unaffiliate the profile, lock task mode no longer available on the profile.
+        dpm.setAffiliationIds(adminDifferentPackage, Collections.<String>emptyList());
+        assertFalse(dpm.isLockTaskPermitted("poPackage1"));
+        // Lock task packages cleared when loading user data and when the user becomes unaffiliated.
+        verify(mContext.iactivityManager, times(2))
+                .updateLockTaskPackages(eq(MANAGED_PROFILE_USER_ID), eq(new String[0]));
+
+        mContext.binder.callingUid = DpmMockContext.CALLER_SYSTEM_USER_UID;
+        assertTrue(dpm.isLockTaskPermitted("doPackage1"));
+    }
+
     public void testIsDeviceManaged() throws Exception {
         mContext.binder.callingUid = DpmMockContext.CALLER_SYSTEM_USER_UID;
         setupDeviceOwner();
@@ -3600,6 +3742,41 @@
                 dpm.getPermissionGrantState(admin1, app2, permission));
     }
 
+    public void testResetPasswordWithToken() throws Exception {
+        mContext.binder.callingUid = DpmMockContext.CALLER_SYSTEM_USER_UID;
+        setupDeviceOwner();
+        // test token validation
+        try {
+            dpm.setResetPasswordToken(admin1, new byte[31]);
+            fail("should not have accepted tokens too short");
+        } catch (IllegalArgumentException expected) {
+        }
+        // test adding a token
+        final byte[] token = new byte[32];
+        final long handle = 123456;
+        final String password = "password";
+        when(mContext.lockPatternUtils.addEscrowToken(eq(token), eq(UserHandle.USER_SYSTEM)))
+            .thenReturn(handle);
+        assertTrue(dpm.setResetPasswordToken(admin1, token));
+
+        // test password activation
+        when(mContext.lockPatternUtils.isEscrowTokenActive(eq(handle), eq(UserHandle.USER_SYSTEM)))
+            .thenReturn(true);
+        assertTrue(dpm.isResetPasswordTokenActive(admin1));
+
+        // test reset password with token
+        when(mContext.lockPatternUtils.setLockCredentialWithToken(eq(password),
+                eq(LockPatternUtils.CREDENTIAL_TYPE_PASSWORD), eq(handle), eq(token),
+                eq(UserHandle.USER_SYSTEM)))
+                .thenReturn(true);
+        assertTrue(dpm.resetPasswordWithToken(admin1, password, token, 0));
+
+        // test removing a token
+        when(mContext.lockPatternUtils.removeEscrowToken(eq(handle), eq(UserHandle.USER_SYSTEM)))
+                .thenReturn(true);
+        assertTrue(dpm.clearResetPasswordToken(admin1));
+    }
+
     private void setUserSetupCompleteForUser(boolean isUserSetupComplete, int userhandle) {
         when(mContext.settings.settingsSecureGetIntForUser(Settings.Secure.USER_SETUP_COMPLETE, 0,
                 userhandle)).thenReturn(isUserSetupComplete ? 1 : 0);
@@ -3655,4 +3832,20 @@
         assertTrue(dpm.setProfileOwner(admin, null, userId));
         mContext.callerPermissions.removeAll(OWNER_SETUP_PERMISSIONS);
     }
+
+    /**
+     * Convert String[] to ParceledListSlice&lt;ParcelableString&gt;.
+     * <p>
+     * TODO: This shouldn't be necessary. If ParcelableString does need to exist, it also needs
+     * a real constructor.
+     */
+    private static ParceledListSlice<ParcelableString> asSlice(String[] s) {
+        List<ParcelableString> list = new ArrayList<>(s.length);
+        for (int i = 0; i < s.length; i++) {
+            ParcelableString item = new ParcelableString();
+            item.string = s[i];
+            list.add(i, item);
+        }
+        return new ParceledListSlice<ParcelableString>(list);
+    }
 }
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/DpmMockContext.java b/services/tests/servicestests/src/com/android/server/devicepolicy/DpmMockContext.java
index 22cd135..46aaf83 100644
--- a/services/tests/servicestests/src/com/android/server/devicepolicy/DpmMockContext.java
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/DpmMockContext.java
@@ -43,9 +43,11 @@
 import android.os.UserHandle;
 import android.os.UserManager;
 import android.os.UserManagerInternal;
+import android.security.KeyChain;
 import android.telephony.TelephonyManager;
 import android.test.mock.MockContentResolver;
 import android.test.mock.MockContext;
+import android.util.ArrayMap;
 import android.view.IWindowManager;
 
 import com.android.internal.widget.LockPatternUtils;
@@ -58,10 +60,12 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 
 import static org.mockito.Matchers.anyBoolean;
 import static org.mockito.Matchers.anyInt;
 import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.when;
@@ -290,6 +294,7 @@
     public final TelephonyManager telephonyManager;
     public final AccountManager accountManager;
     public final AlarmManager alarmManager;
+    public final KeyChain.KeyChainConnection keyChainConnection;
 
     /** Note this is a partial mock, not a real mock. */
     public final PackageManager packageManager;
@@ -300,6 +305,9 @@
 
     public final BuildMock buildMock = new BuildMock();
 
+    /** Optional mapping of other user contexts for {@link #createPackageContextAsUser} to return */
+    public final Map<UserHandle, Context> userContexts = new ArrayMap<>();
+
     public String packageName = null;
 
     public ApplicationInfo applicationInfo = null;
@@ -335,6 +343,7 @@
         telephonyManager = mock(TelephonyManager.class);
         accountManager = mock(AccountManager.class);
         alarmManager = mock(AlarmManager.class);
+        keyChainConnection = mock(KeyChain.KeyChainConnection.class, RETURNS_DEEP_STUBS);
 
         // Package manager is huge, so we use a partial mock instead.
         packageManager = spy(context.getPackageManager());
@@ -690,6 +699,19 @@
     }
 
     @Override
+    public Context createPackageContextAsUser(String packageName, int flags, UserHandle user)
+            throws PackageManager.NameNotFoundException {
+        if (!userContexts.containsKey(user)) {
+            return super.createPackageContextAsUser(packageName, flags, user);
+        }
+        if (!getPackageName().equals(packageName)) {
+            throw new UnsupportedOperationException(
+                    "Creating a context as another package is not implemented");
+        }
+        return userContexts.get(user);
+    }
+
+    @Override
     public ContentResolver getContentResolver() {
         return contentResolver;
     }
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/DpmTestBase.java b/services/tests/servicestests/src/com/android/server/devicepolicy/DpmTestBase.java
index ed6779c..43e2610 100644
--- a/services/tests/servicestests/src/com/android/server/devicepolicy/DpmTestBase.java
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/DpmTestBase.java
@@ -174,6 +174,8 @@
                 anyInt(),
                 eq(UserHandle.getUserId(packageUid)));
 
+        doReturn(new String[] {admin.getPackageName()}).when(mMockContext.ipackageManager)
+            .getPackagesForUid(eq(packageUid));
         // Set up getPackageInfo().
         markPackageAsInstalled(admin.getPackageName(), ai, UserHandle.getUserId(packageUid));
     }
diff --git a/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java b/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
index 8c23a91..e2e1844 100644
--- a/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
@@ -602,12 +602,14 @@
     protected static final int USER_0 = UserHandle.USER_SYSTEM;
     protected static final int USER_10 = 10;
     protected static final int USER_11 = 11;
-    protected static final int USER_P0 = 20; // profile of user 0
+    protected static final int USER_P0 = 20; // profile of user 0 (MANAGED_PROFILE *not* set)
+    protected static final int USER_P1 = 21; // another profile of user 0 (MANAGED_PROFILE set)
 
     protected static final UserHandle HANDLE_USER_0 = UserHandle.of(USER_0);
     protected static final UserHandle HANDLE_USER_10 = UserHandle.of(USER_10);
     protected static final UserHandle HANDLE_USER_11 = UserHandle.of(USER_11);
     protected static final UserHandle HANDLE_USER_P0 = UserHandle.of(USER_P0);
+    protected static final UserHandle HANDLE_USER_P1 = UserHandle.of(USER_P1);
 
     protected static final UserInfo USER_INFO_0 = withProfileGroupId(
             new UserInfo(USER_0, "user0",
@@ -630,6 +632,10 @@
     protected static final UserInfo USER_INFO_P0 = withProfileGroupId(
             new UserInfo(USER_P0, "userP0", UserInfo.FLAG_INITIALIZED), 0);
 
+    protected static final UserInfo USER_INFO_P1 = withProfileGroupId(
+            new UserInfo(USER_P1, "userP1",
+                    UserInfo.FLAG_INITIALIZED | UserInfo.FLAG_MANAGED_PROFILE), 0);
+
     protected BiPredicate<String, Integer> mDefaultLauncherChecker =
             (callingPackage, userId) ->
             LAUNCHER_1.equals(callingPackage) || LAUNCHER_2.equals(callingPackage)
@@ -746,6 +752,7 @@
         mUserInfos.put(USER_10, USER_INFO_10);
         mUserInfos.put(USER_11, USER_INFO_11);
         mUserInfos.put(USER_P0, USER_INFO_P0);
+        mUserInfos.put(USER_P1, USER_INFO_P1);
 
         // Set up isUserRunning and isUserUnlocked.
         when(mMockUserManager.isUserRunning(anyInt())).thenAnswer(new AnswerWithSystemCheck<>(
@@ -775,6 +782,13 @@
                     assertNotNull(parent);
                     return parent;
                 }));
+        when(mMockUserManager.isManagedProfile(anyInt()))
+                .thenAnswer(new AnswerWithSystemCheck<>(inv -> {
+                    final int userId = (Integer) inv.getArguments()[0];
+                    final UserInfo ui = mUserInfos.get(userId);
+                    assertNotNull(ui);
+                    return ui.isManagedProfile();
+                }));
 
         when(mMockActivityManagerInternal.getUidProcessState(anyInt())).thenReturn(
                 ActivityManager.PROCESS_STATE_CACHED_EMPTY);
@@ -784,12 +798,14 @@
         mRunningUsers.put(USER_10, false);
         mRunningUsers.put(USER_11, false);
         mRunningUsers.put(USER_P0, true);
+        mRunningUsers.put(USER_P1, true);
 
         // Unlock all users by default.
         mUnlockedUsers.put(USER_0, true);
         mUnlockedUsers.put(USER_10, true);
         mUnlockedUsers.put(USER_11, true);
         mUnlockedUsers.put(USER_P0, true);
+        mUnlockedUsers.put(USER_P1, true);
 
         // Set up resources
         setUpAppResources();
diff --git a/services/tests/servicestests/src/com/android/server/pm/PackageParserTest.java b/services/tests/servicestests/src/com/android/server/pm/PackageParserTest.java
index e30bd5d..e5640c7 100644
--- a/services/tests/servicestests/src/com/android/server/pm/PackageParserTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/PackageParserTest.java
@@ -309,6 +309,7 @@
 
         // Sanity check for InstrumentationInfo.
         assertEquals(a.info.targetPackage, b.info.targetPackage);
+        assertEquals(a.info.targetProcess, b.info.targetProcess);
         assertEquals(a.info.sourceDir, b.info.sourceDir);
         assertEquals(a.info.publicSourceDir, b.info.publicSourceDir);
     }
diff --git a/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest1.java b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest1.java
index 74c1ca5..0c53167 100644
--- a/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest1.java
+++ b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest1.java
@@ -75,7 +75,9 @@
 import android.graphics.Bitmap;
 import android.graphics.Bitmap.CompressFormat;
 import android.graphics.BitmapFactory;
+import android.graphics.drawable.Drawable;
 import android.graphics.drawable.Icon;
+import android.graphics.drawable.MaskableIconDrawable;
 import android.net.Uri;
 import android.os.Bundle;
 import android.os.Handler;
@@ -244,6 +246,8 @@
         final Icon icon1 = Icon.createWithResource(getTestContext(), R.drawable.icon1);
         final Icon icon2 = Icon.createWithBitmap(BitmapFactory.decodeResource(
                 getTestContext().getResources(), R.drawable.icon2));
+        final Icon icon3 = Icon.createWithMaskableBitmap(BitmapFactory.decodeResource(
+            getTestContext().getResources(), R.drawable.icon2));
 
         final ShortcutInfo si1 = makeShortcut(
                 "shortcut1",
@@ -261,12 +265,18 @@
                 icon2,
                 makeIntent(Intent.ACTION_ASSIST, ShortcutActivity3.class),
                 /* weight */ 12);
-        final ShortcutInfo si3 = makeShortcut("shortcut3");
+        final ShortcutInfo si3 = makeShortcut(
+                "shortcut3",
+                "Title 3",
+                /* activity */ null,
+                icon3,
+                makeIntent(Intent.ACTION_ASSIST, ShortcutActivity3.class),
+                /* weight */ 13);
 
-        assertTrue(mManager.setDynamicShortcuts(list(si1, si2)));
+        assertTrue(mManager.setDynamicShortcuts(list(si1, si2, si3)));
         assertShortcutIds(assertAllNotKeyFieldsOnly(
                 mManager.getDynamicShortcuts()),
-                "shortcut1", "shortcut2");
+                "shortcut1", "shortcut2", "shortcut3");
         assertEquals(2, mManager.getRemainingCallCount());
 
         // TODO: Check fields
@@ -550,7 +560,7 @@
 
         final Icon bmp32x32 = Icon.createWithBitmap(BitmapFactory.decodeResource(
                 getTestContext().getResources(), R.drawable.black_32x32));
-        final Icon bmp64x64 = Icon.createWithBitmap(BitmapFactory.decodeResource(
+        final Icon bmp64x64_maskable = Icon.createWithMaskableBitmap(BitmapFactory.decodeResource(
                 getTestContext().getResources(), R.drawable.black_64x64));
         final Icon bmp512x512 = Icon.createWithBitmap(BitmapFactory.decodeResource(
                 getTestContext().getResources(), R.drawable.black_512x512));
@@ -561,7 +571,7 @@
                 makeShortcutWithIcon("res32x32", res32x32),
                 makeShortcutWithIcon("res64x64", res64x64),
                 makeShortcutWithIcon("bmp32x32", bmp32x32),
-                makeShortcutWithIcon("bmp64x64", bmp64x64),
+                makeShortcutWithIcon("bmp64x64", bmp64x64_maskable),
                 makeShortcutWithIcon("bmp512x512", bmp512x512),
                 makeShortcut("none")
         )));
@@ -691,6 +701,15 @@
         bmp = pfdToBitmap(
                 mLauncherApps.getShortcutIconFd(CALLING_PACKAGE_1, "bmp32x32", HANDLE_USER_P0));
         assertBitmapSize(128, 128, bmp);
+
+        Drawable dr = mLauncherApps.getShortcutIconDrawable(
+            makeShortcutWithIcon("bmp64x64", bmp64x64_maskable), 0);
+        assertTrue(dr instanceof MaskableIconDrawable);
+        float viewportPercentage = 1 / (1 + 2 * MaskableIconDrawable.getExtraInsetPercentage());
+        assertEquals((int) (bmp64x64_maskable.getBitmap().getWidth() * viewportPercentage),
+            dr.getIntrinsicWidth());
+        assertEquals((int) (bmp64x64_maskable.getBitmap().getHeight() * viewportPercentage),
+            dr.getIntrinsicHeight());
     }
 
     public void testCleanupDanglingBitmaps() throws Exception {
@@ -2099,6 +2118,24 @@
                     list("s1", "s2", "s3"), HANDLE_USER_10);
         });
 
+        // First, make sure managed profile can't see other profiles.
+        runWithCaller(LAUNCHER_1, USER_P1, () -> {
+
+            final ShortcutQuery q = new ShortcutQuery().setQueryFlags(
+                    ShortcutQuery.FLAG_MATCH_DYNAMIC | ShortcutQuery.FLAG_MATCH_PINNED
+                    | ShortcutQuery.FLAG_MATCH_MANIFEST);
+
+            // No shortcuts are visible.
+            assertWith(mLauncherApps.getShortcuts(q, HANDLE_USER_0)).isEmpty();
+
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("s1"), HANDLE_USER_0);
+
+            // Should have no effects.
+            assertWith(mLauncherApps.getShortcuts(q, HANDLE_USER_0)).isEmpty();
+
+            assertShortcutNotLaunched(CALLING_PACKAGE_1, "s1", USER_0);
+        });
+
         // Cross profile pinning.
         final int PIN_AND_DYNAMIC = ShortcutQuery.FLAG_GET_PINNED | ShortcutQuery.FLAG_GET_DYNAMIC;
 
@@ -2930,6 +2967,7 @@
         final LauncherApps.Callback c0_4 = mock(LauncherApps.Callback.class);
 
         final LauncherApps.Callback cP0_1 = mock(LauncherApps.Callback.class);
+        final LauncherApps.Callback cP1_1 = mock(LauncherApps.Callback.class);
         final LauncherApps.Callback c10_1 = mock(LauncherApps.Callback.class);
         final LauncherApps.Callback c10_2 = mock(LauncherApps.Callback.class);
         final LauncherApps.Callback c11_1 = mock(LauncherApps.Callback.class);
@@ -2943,6 +2981,8 @@
                     return LAUNCHER_2.equals(pkg);
                 case USER_P0:
                     return LAUNCHER_1.equals(pkg);
+                case USER_P1:
+                    return LAUNCHER_1.equals(pkg);
                 case USER_10:
                     return LAUNCHER_1.equals(pkg);
                 case USER_11:
@@ -2957,6 +2997,7 @@
         runWithCaller(LAUNCHER_3, USER_0, () -> mLauncherApps.registerCallback(c0_3, h));
         runWithCaller(LAUNCHER_4, USER_0, () -> mLauncherApps.registerCallback(c0_4, h));
         runWithCaller(LAUNCHER_1, USER_P0, () -> mLauncherApps.registerCallback(cP0_1, h));
+        runWithCaller(LAUNCHER_1, USER_P1, () -> mLauncherApps.registerCallback(cP1_1, h));
         runWithCaller(LAUNCHER_1, USER_10, () -> mLauncherApps.registerCallback(c10_1, h));
         runWithCaller(LAUNCHER_2, USER_10, () -> mLauncherApps.registerCallback(c10_2, h));
         runWithCaller(LAUNCHER_1, USER_11, () -> mLauncherApps.registerCallback(c11_1, h));
@@ -2977,6 +3018,7 @@
         assertCallbackNotReceived(c11_1);
         assertCallbackReceived(c0_2, HANDLE_USER_0, CALLING_PACKAGE_1, "s1", "s2", "s3");
         assertCallbackReceived(cP0_1, HANDLE_USER_0, CALLING_PACKAGE_1, "s1", "s2", "s3", "s4");
+        assertCallbackNotReceived(cP1_1);
 
         // User 0, different package.
 
@@ -2995,6 +3037,7 @@
         assertCallbackReceived(c0_2, HANDLE_USER_0, CALLING_PACKAGE_3, "s1", "s2", "s3", "s4");
         assertCallbackReceived(cP0_1, HANDLE_USER_0, CALLING_PACKAGE_3,
                 "s1", "s2", "s3", "s4", "s5", "s6");
+        assertCallbackNotReceived(cP1_1);
 
         // Work profile.
         resetAll(all);
@@ -3011,6 +3054,7 @@
         assertCallbackNotReceived(c11_1);
         assertCallbackReceived(c0_2, HANDLE_USER_P0, CALLING_PACKAGE_1, "s1", "s2", "s3", "s5");
         assertCallbackReceived(cP0_1, HANDLE_USER_P0, CALLING_PACKAGE_1, "s1", "s2", "s3", "s4");
+        assertCallbackNotReceived(cP1_1);
 
         // Normal secondary user.
         mRunningUsers.put(USER_10, true);
@@ -3030,6 +3074,7 @@
         assertCallbackNotReceived(c11_1);
         assertCallbackReceived(c10_1, HANDLE_USER_10, CALLING_PACKAGE_1,
                 "x1", "x2", "x3", "x4", "x5");
+        assertCallbackNotReceived(cP1_1);
     }
 
     // === Test for persisting ===
diff --git a/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest2.java b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest2.java
index 562de414..28ec4fd 100644
--- a/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest2.java
+++ b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest2.java
@@ -932,6 +932,74 @@
         dumpUserFile(USER_10);
     }
 
+    public void testShortcutInfoSaveAndLoad_maskableBitmap() throws InterruptedException {
+        mRunningUsers.put(USER_10, true);
+
+        setCaller(CALLING_PACKAGE_1, USER_10);
+
+        final Icon bmp32x32 = Icon.createWithMaskableBitmap(BitmapFactory.decodeResource(
+            getTestContext().getResources(), R.drawable.black_32x32));
+
+        PersistableBundle pb = new PersistableBundle();
+        pb.putInt("k", 1);
+        ShortcutInfo sorig = new ShortcutInfo.Builder(mClientContext)
+            .setId("id")
+            .setActivity(new ComponentName(mClientContext, ShortcutActivity2.class))
+            .setIcon(bmp32x32)
+            .setTitle("title")
+            .setText("text")
+            .setDisabledMessage("dismes")
+            .setCategories(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"))
+            .setIntent(makeIntent("action", ShortcutActivity.class, "key", "val"))
+            .setRank(123)
+            .setExtras(pb)
+            .build();
+        sorig.setTimestamp(mInjectedCurrentTimeMillis);
+
+        mManager.addDynamicShortcuts(list(sorig));
+
+        mInjectedCurrentTimeMillis += 1;
+        final long now = mInjectedCurrentTimeMillis;
+        mInjectedCurrentTimeMillis += 1;
+
+        dumpsysOnLogcat("before save");
+
+        // Save and load.
+        mService.saveDirtyInfo();
+        initService();
+        mService.handleUnlockUser(USER_10);
+
+        dumpUserFile(USER_10);
+        dumpsysOnLogcat("after load");
+
+        ShortcutInfo si;
+        si = mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "id", USER_10);
+
+        assertEquals(USER_10, si.getUserId());
+        assertEquals(HANDLE_USER_10, si.getUserHandle());
+        assertEquals(CALLING_PACKAGE_1, si.getPackage());
+        assertEquals("id", si.getId());
+        assertEquals(ShortcutActivity2.class.getName(), si.getActivity().getClassName());
+        assertEquals(null, si.getIcon());
+        assertEquals("title", si.getTitle());
+        assertEquals("text", si.getText());
+        assertEquals("dismes", si.getDisabledMessage());
+        assertEquals(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"), si.getCategories());
+        assertEquals("action", si.getIntent().getAction());
+        assertEquals("val", si.getIntent().getStringExtra("key"));
+        assertEquals(0, si.getRank());
+        assertEquals(1, si.getExtras().getInt("k"));
+
+        assertEquals(ShortcutInfo.FLAG_DYNAMIC | ShortcutInfo.FLAG_HAS_ICON_FILE
+            | ShortcutInfo.FLAG_STRINGS_RESOLVED | ShortcutInfo.FLAG_MASKABLE_BITMAP,
+            si.getFlags());
+        assertNotNull(si.getBitmapPath()); // Something should be set.
+        assertEquals(0, si.getIconResourceId());
+        assertTrue(si.getLastChangedTimestamp() < now);
+
+        dumpUserFile(USER_10);
+    }
+
     public void testShortcutInfoSaveAndLoad_resId() throws InterruptedException {
         mRunningUsers.put(USER_10, true);
 
diff --git a/services/tests/servicestests/src/com/android/server/pm/UserDataPreparerTest.java b/services/tests/servicestests/src/com/android/server/pm/UserDataPreparerTest.java
new file mode 100644
index 0000000..7a676e25
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/pm/UserDataPreparerTest.java
@@ -0,0 +1,273 @@
+/*
+ * 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.server.pm;
+
+import android.content.Context;
+import android.content.pm.UserInfo;
+import android.os.FileUtils;
+import android.os.storage.StorageManager;
+import android.os.storage.VolumeInfo;
+import android.platform.test.annotations.Presubmit;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.nio.charset.Charset;
+import java.util.Arrays;
+import java.util.Collections;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Matchers.isNull;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * <p>Run with:<pre>
+ * m FrameworksServicesTests &&
+ * adb install \
+ * -r out/target/product/hammerhead/data/app/FrameworksServicesTests/FrameworksServicesTests.apk &&
+ * adb shell am instrument -e class com.android.server.pm.UserDataPreparerTest \
+ * -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
+ * </pre>
+ */
+@RunWith(AndroidJUnit4.class)
+@Presubmit
+@SmallTest
+public class UserDataPreparerTest {
+
+    private static final int TEST_USER_SERIAL = 1000;
+    private static final int TEST_USER_ID = 10;
+
+    private TestUserDataPreparer mUserDataPreparer;
+
+    @Mock
+    private StorageManager mStorageManagerMock;
+
+    @Mock
+    private Context mContextMock;
+
+    @Mock
+    private Installer mInstaller;
+
+    private Object mInstallLock;
+
+    @Before
+    public void setup() {
+        Context ctx = InstrumentationRegistry.getContext();
+        FileUtils.deleteContents(ctx.getCacheDir());
+        mInstallLock = new Object();
+        MockitoAnnotations.initMocks(this);
+        mUserDataPreparer = new TestUserDataPreparer(mInstaller, mInstallLock, mContextMock, false,
+                ctx.getCacheDir());
+        when(mContextMock.getSystemServiceName(StorageManager.class))
+                .thenReturn(Context.STORAGE_SERVICE);
+        when(mContextMock.getSystemService(eq(Context.STORAGE_SERVICE)))
+                .thenReturn(mStorageManagerMock);
+        VolumeInfo testVolume = new VolumeInfo("testuuid", VolumeInfo.TYPE_PRIVATE, null, null);
+        when(mStorageManagerMock.getWritablePrivateVolumes()).thenReturn(Arrays.asList(testVolume));
+    }
+
+    @Test
+    public void testPrepareUserData_De() throws Exception {
+        File userDeDir = mUserDataPreparer.getDataUserDeDirectory(null, TEST_USER_ID);
+        userDeDir.mkdirs();
+        File systemDeDir = mUserDataPreparer.getDataSystemDeDirectory(TEST_USER_ID);
+        systemDeDir.mkdirs();
+        mUserDataPreparer
+                .prepareUserData(TEST_USER_ID, TEST_USER_SERIAL, StorageManager.FLAG_STORAGE_DE);
+        verify(mStorageManagerMock).prepareUserStorage(isNull(String.class), eq(TEST_USER_ID),
+                eq(TEST_USER_SERIAL), eq(StorageManager.FLAG_STORAGE_DE));
+        verify(mInstaller).createUserData(isNull(String.class), eq(TEST_USER_ID),
+                eq(TEST_USER_SERIAL), eq(StorageManager.FLAG_STORAGE_DE));
+        int serialNumber = UserDataPreparer.getSerialNumber(userDeDir);
+        assertEquals(TEST_USER_SERIAL, serialNumber);
+        serialNumber = UserDataPreparer.getSerialNumber(systemDeDir);
+        assertEquals(TEST_USER_SERIAL, serialNumber);
+    }
+
+    @Test
+    public void testPrepareUserData_Ce() throws Exception {
+        File userCeDir = mUserDataPreparer.getDataUserCeDirectory(null, TEST_USER_ID);
+        userCeDir.mkdirs();
+        File systemCeDir = mUserDataPreparer.getDataSystemCeDirectory(TEST_USER_ID);
+        systemCeDir.mkdirs();
+        mUserDataPreparer
+                .prepareUserData(TEST_USER_ID, TEST_USER_SERIAL, StorageManager.FLAG_STORAGE_CE);
+        verify(mStorageManagerMock).prepareUserStorage(isNull(String.class), eq(TEST_USER_ID),
+                eq(TEST_USER_SERIAL), eq(StorageManager.FLAG_STORAGE_CE));
+        verify(mInstaller).createUserData(isNull(String.class), eq(TEST_USER_ID),
+                eq(TEST_USER_SERIAL), eq(StorageManager.FLAG_STORAGE_CE));
+        int serialNumber = UserDataPreparer.getSerialNumber(userCeDir);
+        assertEquals(TEST_USER_SERIAL, serialNumber);
+        serialNumber = UserDataPreparer.getSerialNumber(systemCeDir);
+        assertEquals(TEST_USER_SERIAL, serialNumber);
+    }
+
+    @Test
+    public void testDestroyUserData() throws Exception {
+        // Add file in CE
+        File systemCeDir = mUserDataPreparer.getDataSystemCeDirectory(TEST_USER_ID);
+        systemCeDir.mkdirs();
+        File ceFile = new File(systemCeDir, "file");
+        writeFile(ceFile, "-----" );
+        testDestroyUserData_De();
+        // CE directory should be preserved
+        assertEquals(Collections.singletonList(ceFile), Arrays.asList(FileUtils.listFilesOrEmpty(
+                systemCeDir)));
+
+        testDestroyUserData_Ce();
+
+        // Verify that testDir is empty
+        assertEquals(Collections.emptyList(), Arrays.asList(FileUtils.listFilesOrEmpty(
+                mUserDataPreparer.testDir)));
+    }
+
+    @Test
+    public void testDestroyUserData_De() throws Exception {
+        File systemDir = mUserDataPreparer.getUserSystemDirectory(TEST_USER_ID);
+        systemDir.mkdirs();
+        writeFile(new File(systemDir, "file"), "-----" );
+        File systemDeDir = mUserDataPreparer.getDataSystemDeDirectory(TEST_USER_ID);
+        systemDeDir.mkdirs();
+        writeFile(new File(systemDeDir, "file"), "-----" );
+        File miscDeDir = mUserDataPreparer.getDataMiscDeDirectory(TEST_USER_ID);
+        miscDeDir.mkdirs();
+        writeFile(new File(miscDeDir, "file"), "-----" );
+
+        mUserDataPreparer.destroyUserData(TEST_USER_ID, StorageManager.FLAG_STORAGE_DE);
+
+        verify(mInstaller).destroyUserData(isNull(String.class), eq(TEST_USER_ID),
+                        eq(StorageManager.FLAG_STORAGE_DE));
+        verify(mStorageManagerMock).destroyUserStorage(isNull(String.class), eq(TEST_USER_ID),
+                        eq(StorageManager.FLAG_STORAGE_DE));
+
+        assertEquals(Collections.emptyList(), Arrays.asList(FileUtils.listFilesOrEmpty(systemDir)));
+        assertEquals(Collections.emptyList(), Arrays.asList(FileUtils.listFilesOrEmpty(
+                systemDeDir)));
+        assertEquals(Collections.emptyList(), Arrays.asList(FileUtils.listFilesOrEmpty(
+                miscDeDir)));
+    }
+
+    @Test
+    public void testDestroyUserData_Ce() throws Exception {
+        File systemCeDir = mUserDataPreparer.getDataSystemCeDirectory(TEST_USER_ID);
+        systemCeDir.mkdirs();
+        writeFile(new File(systemCeDir, "file"), "-----" );
+        File miscCeDir = mUserDataPreparer.getDataMiscCeDirectory(TEST_USER_ID);
+        miscCeDir.mkdirs();
+        writeFile(new File(miscCeDir, "file"), "-----" );
+
+        mUserDataPreparer.destroyUserData(TEST_USER_ID, StorageManager.FLAG_STORAGE_CE);
+
+        verify(mInstaller).destroyUserData(isNull(String.class), eq(TEST_USER_ID),
+                eq(StorageManager.FLAG_STORAGE_CE));
+        verify(mStorageManagerMock).destroyUserStorage(isNull(String.class), eq(TEST_USER_ID),
+                eq(StorageManager.FLAG_STORAGE_CE));
+
+        assertEquals(Collections.emptyList(), Arrays.asList(FileUtils.listFilesOrEmpty(
+                systemCeDir)));
+        assertEquals(Collections.emptyList(), Arrays.asList(FileUtils.listFilesOrEmpty(
+                miscCeDir)));
+    }
+
+    @Test
+    public void testReconcileUsers() throws Exception {
+        UserInfo u1 = new UserInfo(1, "u1", 0);
+        UserInfo u2 = new UserInfo(2, "u2", 0);
+        File testDir = mUserDataPreparer.testDir;
+        File dir1 = new File(testDir, "1");
+        dir1.mkdirs();
+        File dir2 = new File(testDir, "2");
+        dir2.mkdirs();
+        File dir3 = new File(testDir, "3");
+        dir3.mkdirs();
+
+        mUserDataPreparer
+                .reconcileUsers(StorageManager.UUID_PRIVATE_INTERNAL, Arrays.asList(u1, u2),
+                        Arrays.asList(dir1, dir2, dir3));
+        // Verify that user 3 data is removed
+        verify(mInstaller).destroyUserData(isNull(String.class), eq(3),
+                eq(StorageManager.FLAG_STORAGE_DE|StorageManager.FLAG_STORAGE_CE));
+    }
+
+    private static void writeFile(File file, String content) throws IOException {
+        try (FileOutputStream os = new FileOutputStream(file)) {
+            os.write(content.getBytes(Charset.defaultCharset()));
+        }
+    }
+
+    private static class TestUserDataPreparer extends UserDataPreparer {
+        File testDir;
+
+        TestUserDataPreparer(Installer installer, Object installLock, Context context,
+                boolean onlyCore, File testDir) {
+            super(installer, installLock, context, onlyCore);
+            this.testDir = testDir;
+        }
+
+        @Override
+        protected File getDataMiscCeDirectory(int userId) {
+            return new File(testDir, "misc_ce_" + userId);
+        }
+
+        @Override
+        protected File getDataSystemCeDirectory(int userId) {
+            return new File(testDir, "system_ce_" + userId);
+        }
+
+        @Override
+        protected File getDataMiscDeDirectory(int userId) {
+            return new File(testDir, "misc_de_" + userId);
+        }
+
+        @Override
+        protected File getUserSystemDirectory(int userId) {
+            return new File(testDir, "user_system_" + userId);
+        }
+
+        @Override
+        protected File getDataUserCeDirectory(String volumeUuid, int userId) {
+            return new File(testDir, "user_ce_" + userId);
+        }
+
+        @Override
+        protected File getDataSystemDeDirectory(int userId) {
+            return new File(testDir, "system_de_" + userId);
+        }
+
+        @Override
+        protected File getDataUserDeDirectory(String volumeUuid, int userId) {
+            return new File(testDir, "user_de_" + userId);
+        }
+
+        @Override
+        protected boolean isFileEncryptedEmulatedOnly() {
+            return false;
+        }
+    }
+
+}
diff --git a/services/tests/servicestests/src/com/android/server/policy/AccessibilityShortcutControllerTest.java b/services/tests/servicestests/src/com/android/server/policy/AccessibilityShortcutControllerTest.java
index e2aff16..1de6348 100644
--- a/services/tests/servicestests/src/com/android/server/policy/AccessibilityShortcutControllerTest.java
+++ b/services/tests/servicestests/src/com/android/server/policy/AccessibilityShortcutControllerTest.java
@@ -79,6 +79,7 @@
     private @Mock Toast mToast;
 
     private MockContentResolver mContentResolver;
+    private WindowManager.LayoutParams mLayoutParams = new WindowManager.LayoutParams();
 
     @Before
     public void setUp() throws Exception {
@@ -119,6 +120,9 @@
         when(mAlertDialogBuilder.setOnCancelListener(anyObject())).thenReturn(mAlertDialogBuilder);
         when(mAlertDialogBuilder.create()).thenReturn(mAlertDialog);
 
+        mLayoutParams.privateFlags = 0;
+        when(mToast.getWindowParams()).thenReturn(mLayoutParams);
+
         Window window = mock(Window.class);
         Whitebox.setInternalState(window, "mWindowAttributes", new WindowManager.LayoutParams());
         when(mAlertDialog.getWindow()).thenReturn(window);
@@ -183,6 +187,9 @@
         accessibilityShortcutController.performAccessibilityShortcut();
         accessibilityShortcutController.performAccessibilityShortcut();
         verify(mToast).show();
+        assertEquals(WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS,
+                mLayoutParams.privateFlags
+                        & WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS);
         verify(mAccessibilityManagerService, times(1)).performAccessibilityShortcut();
     }
 
diff --git a/services/tests/servicestests/src/com/android/server/webkit/WebViewUpdateServiceTest.java b/services/tests/servicestests/src/com/android/server/webkit/WebViewUpdateServiceTest.java
index 4c0f042..e4b74eb 100644
--- a/services/tests/servicestests/src/com/android/server/webkit/WebViewUpdateServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/webkit/WebViewUpdateServiceTest.java
@@ -16,6 +16,7 @@
 
 package com.android.server.webkit;
 
+import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
@@ -24,6 +25,7 @@
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageInfo;
 import android.content.pm.Signature;
+import android.os.Build;
 import android.os.Bundle;
 import android.support.test.InstrumentationRegistry;
 import android.support.test.runner.AndroidJUnit4;
@@ -174,6 +176,8 @@
             // no flag means invalid
             p.applicationInfo.metaData.putString(WEBVIEW_LIBRARY_FLAG, "blah");
         }
+        // Default to this package being valid in terms of targetSdkVersion.
+        p.applicationInfo.targetSdkVersion = Build.VERSION_CODES.CUR_DEVELOPMENT;
         return p;
     }
 
@@ -1614,4 +1618,42 @@
         checkPreparationPhasesForPackage(primaryPackage, 3);
         assertTrue(mWebViewUpdateServiceImpl.isMultiProcessEnabled());
     }
+
+    /**
+     * Ensure that packages with a targetSdkVersion targeting the current platform are valid, and
+     * that packages targeting an older version are not valid.
+     */
+    @Test
+    public void testTargetSdkVersionValidity() {
+        PackageInfo newSdkPackage = createPackageInfo("newTargetSdkPackage",
+            true /* enabled */, true /* valid */, true /* installed */);
+        newSdkPackage.applicationInfo.targetSdkVersion = Build.VERSION_CODES.CUR_DEVELOPMENT;
+        PackageInfo currentSdkPackage = createPackageInfo("currentTargetSdkPackage",
+            true /* enabled */, true /* valid */, true /* installed */);
+        currentSdkPackage.applicationInfo.targetSdkVersion = Build.VERSION_CODES.N_MR1+1;
+        PackageInfo oldSdkPackage = createPackageInfo("oldTargetSdkPackage",
+            true /* enabled */, true /* valid */, true /* installed */);
+        oldSdkPackage.applicationInfo.targetSdkVersion = Build.VERSION_CODES.N_MR1;
+
+        WebViewProviderInfo newSdkProviderInfo =
+                new WebViewProviderInfo(newSdkPackage.packageName, "", true, false, null);
+        WebViewProviderInfo currentSdkProviderInfo =
+                new WebViewProviderInfo(currentSdkPackage.packageName, "", true, false, null);
+        WebViewProviderInfo[] packages = new WebViewProviderInfo[] {
+            new WebViewProviderInfo(oldSdkPackage.packageName, "", true, false, null),
+            currentSdkProviderInfo, newSdkProviderInfo};
+        setupWithPackages(packages, true);
+;
+        mTestSystemImpl.setPackageInfo(newSdkPackage);
+        mTestSystemImpl.setPackageInfo(currentSdkPackage);
+        mTestSystemImpl.setPackageInfo(oldSdkPackage);
+
+        assertArrayEquals(new WebViewProviderInfo[]{currentSdkProviderInfo, newSdkProviderInfo},
+                mWebViewUpdateServiceImpl.getValidWebViewPackages());
+
+        runWebViewBootPreparationOnMainSync();
+
+        checkPreparationPhasesForPackage(currentSdkPackage.packageName,
+                1 /* first preparation phase */);
+    }
 }
diff --git a/services/tests/servicestests/src/com/android/server/wm/AppWindowTokenTests.java b/services/tests/servicestests/src/com/android/server/wm/AppWindowTokenTests.java
index 154fa91..e15d40e 100644
--- a/services/tests/servicestests/src/com/android/server/wm/AppWindowTokenTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/AppWindowTokenTests.java
@@ -17,6 +17,7 @@
 package com.android.server.wm;
 
 import org.junit.Test;
+import org.junit.Ignore;
 import org.junit.runner.RunWith;
 
 import android.platform.test.annotations.Presubmit;
@@ -70,6 +71,7 @@
 
         // The base application window should be below all other windows.
         assertEquals(baseWin, token.getFirstChild());
+        token.removeImmediately();
     }
 
     @Test
@@ -86,6 +88,7 @@
         assertEquals(window1, token.findMainWindow());
         final WindowState window2 = createWindow(null, TYPE_APPLICATION_STARTING, token, "window2");
         assertEquals(window2, token.findMainWindow());
+        token.removeImmediately();
     }
 
     @Test
@@ -123,6 +126,8 @@
     }
 
     @Test
+    @Ignore
+    // TODO(b/35034729): Need to fix before re-enabling
     public void testLandscapeSeascapeRotationByPolicy() throws Exception {
         // Some plumbing to get the service ready for rotation updates.
         sWm.mDisplayReady = true;
diff --git a/services/tests/servicestests/src/com/android/server/wm/TaskPositionerTests.java b/services/tests/servicestests/src/com/android/server/wm/TaskPositionerTests.java
index 1260a53..e6975e7 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TaskPositionerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TaskPositionerTests.java
@@ -17,6 +17,7 @@
 package com.android.server.wm;
 
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -77,6 +78,7 @@
      * as does some basic tests (e.g. dragging in Y only will keep X stable).
      */
     @Test
+    @Ignore
     public void testBasicFreeWindowResizing() throws Exception {
         final Rect r = new Rect(100, 220, 700, 520);
         final int midY = (r.top + r.bottom) / 2;
@@ -137,6 +139,7 @@
      * This tests that by dragging any edge, the fixed / opposite edge(s) remains anchored.
      */
     @Test
+    @Ignore
     public void testFreeWindowResizingTestAllEdges() throws Exception {
         final Rect r = new Rect(100, 220, 700, 520);
         final int midX = (r.left + r.right) / 2;
@@ -221,6 +224,7 @@
      * right things upon resizing when dragged from the top left corner.
      */
     @Test
+    @Ignore
     public void testLandscapePreservedWindowResizingDragTopLeft() throws Exception {
         final Rect r = new Rect(100, 220, 700, 520);
 
@@ -258,6 +262,7 @@
      * right things upon resizing when dragged from the left corner.
      */
     @Test
+    @Ignore
     public void testLandscapePreservedWindowResizingDragLeft() throws Exception {
         final Rect r = new Rect(100, 220, 700, 520);
         final int midY = (r.top + r.bottom) / 2;
@@ -298,6 +303,7 @@
      * right things upon resizing when dragged from the top corner.
      */
     @Test
+    @Ignore
     public void testLandscapePreservedWindowResizingDragTop() throws Exception {
         final Rect r = new Rect(100, 220, 700, 520);
         final int midX = (r.left + r.right) / 2;
@@ -334,6 +340,7 @@
      * right things upon resizing when dragged from the top left corner.
      */
     @Test
+    @Ignore
     public void testPortraitPreservedWindowResizingDragTopLeft() throws Exception {
         final Rect r = new Rect(330, 100, 630, 600);
 
@@ -366,6 +373,7 @@
      * right things upon resizing when dragged from the left corner.
      */
     @Test
+    @Ignore
     public void testPortraitPreservedWindowResizingDragLeft() throws Exception {
         final Rect r = new Rect(330, 100, 630, 600);
         final int midY = (r.top + r.bottom) / 2;
@@ -408,6 +416,7 @@
      * right things upon resizing when dragged from the top corner.
      */
     @Test
+    @Ignore
     public void testPortraitPreservedWindowResizingDragTop() throws Exception {
         final Rect r = new Rect(330, 100, 630, 600);
         final int midX = (r.left + r.right) / 2;
diff --git a/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotCacheTest.java b/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotCacheTest.java
index e1a22d9..f1fcba3 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotCacheTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotCacheTest.java
@@ -48,7 +48,8 @@
  * runtest frameworks-services -c com.android.server.wm.TaskSnapshotCacheTest
  */
 @SmallTest
-@Presubmit
+// TODO(b/35196891): Add back to presubmit once the bug is fixed.
+//@Presubmit
 @RunWith(AndroidJUnit4.class)
 public class TaskSnapshotCacheTest extends TaskSnapshotPersisterTestBase {
 
diff --git a/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java b/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java
index ec429a0..dd45d9b 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java
@@ -16,52 +16,14 @@
 
 package com.android.server.wm;
 
-import static android.view.WindowManager.LayoutParams.FIRST_APPLICATION_WINDOW;
-import static android.view.WindowManager.LayoutParams.LAST_APPLICATION_WINDOW;
-import static android.view.WindowManager.LayoutParams.TYPE_ACCESSIBILITY_OVERLAY;
-import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_ABOVE_SUB_PANEL;
-import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG;
-import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA;
-import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA_OVERLAY;
-import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_PANEL;
 import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING;
-import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_SUB_PANEL;
-import static android.view.WindowManager.LayoutParams.TYPE_BOOT_PROGRESS;
-import static android.view.WindowManager.LayoutParams.TYPE_DISPLAY_OVERLAY;
-import static android.view.WindowManager.LayoutParams.TYPE_DOCK_DIVIDER;
-import static android.view.WindowManager.LayoutParams.TYPE_DRAG;
-import static android.view.WindowManager.LayoutParams.TYPE_DREAM;
-import static android.view.WindowManager.LayoutParams.TYPE_INPUT_CONSUMER;
-import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD;
-import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD_DIALOG;
-import static android.view.WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG;
-import static android.view.WindowManager.LayoutParams.TYPE_MAGNIFICATION_OVERLAY;
-import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR;
-import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL;
-import static android.view.WindowManager.LayoutParams.TYPE_PHONE;
-import static android.view.WindowManager.LayoutParams.TYPE_POINTER;
-import static android.view.WindowManager.LayoutParams.TYPE_PRESENTATION;
-import static android.view.WindowManager.LayoutParams.TYPE_PRIORITY_PHONE;
-import static android.view.WindowManager.LayoutParams.TYPE_PRIVATE_PRESENTATION;
-import static android.view.WindowManager.LayoutParams.TYPE_QS_DIALOG;
-import static android.view.WindowManager.LayoutParams.TYPE_SCREENSHOT;
-import static android.view.WindowManager.LayoutParams.TYPE_SEARCH_BAR;
-import static android.view.WindowManager.LayoutParams.TYPE_SECURE_SYSTEM_OVERLAY;
-import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR;
-import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL;
-import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_SUB_PANEL;
-import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
-import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG;
-import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ERROR;
-import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY;
-import static android.view.WindowManager.LayoutParams.TYPE_TOAST;
-import static android.view.WindowManager.LayoutParams.TYPE_VOICE_INTERACTION;
-import static android.view.WindowManager.LayoutParams.TYPE_VOICE_INTERACTION_STARTING;
-import static android.view.WindowManager.LayoutParams.TYPE_VOLUME_OVERLAY;
-import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER;
 import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.doAnswer;
+import org.mockito.invocation.InvocationOnMock;
 
 import android.annotation.Nullable;
+import android.app.ActivityManagerInternal;
 import android.content.Context;
 import android.content.res.CompatibilityInfo;
 import android.content.res.Configuration;
@@ -70,12 +32,10 @@
 import android.os.Bundle;
 import android.os.IBinder;
 import android.os.RemoteException;
-import android.util.Log;
 import android.view.Display;
 import android.view.IWindowManager;
 import android.view.KeyEvent;
 import android.view.WindowManager;
-import android.view.WindowManagerGlobal;
 import android.view.WindowManagerPolicy;
 import android.view.animation.Animation;
 import android.os.PowerManagerInternal;
@@ -108,6 +68,19 @@
                 LocalServices.addService(PowerManagerInternal.class,
                         mock(PowerManagerInternal.class));
             }
+            if (LocalServices.getService(ActivityManagerInternal.class) == null) {
+                LocalServices.addService(ActivityManagerInternal.class,
+                        mock(ActivityManagerInternal.class));
+                final ActivityManagerInternal am =
+                        LocalServices.getService(ActivityManagerInternal.class);
+                doAnswer((InvocationOnMock invocationOnMock) -> {
+                    final Runnable runnable = invocationOnMock.getArgumentAt(0, Runnable.class);
+                    if (runnable != null) {
+                        runnable.run();
+                    }
+                    return null;
+                }).when(am).notifyKeyguardFlagsChanged(any());
+            }
             sWm = WindowManagerService.main(context, mock(InputManagerService.class), true, false,
                     false, new TestWindowManagerPolicy());
         }
@@ -163,127 +136,6 @@
     }
 
     @Override
-    public int windowTypeToLayerLw(int type) {
-        // TODO: figure-out a good way to keep this in-sync with PhoneWindowManager...sigh!
-        if (type >= FIRST_APPLICATION_WINDOW && type <= LAST_APPLICATION_WINDOW) {
-            return 2;
-        }
-        switch (type) {
-            case TYPE_PRESENTATION:
-            case TYPE_PRIVATE_PRESENTATION:
-                return 2;
-            case TYPE_WALLPAPER:
-                // wallpaper is at the bottom, though the window manager may move it.
-                return 2;
-            case TYPE_DOCK_DIVIDER:
-                return 2;
-            case TYPE_QS_DIALOG:
-                return 2;
-            case TYPE_PHONE:
-                return 3;
-            case TYPE_SEARCH_BAR:
-            case TYPE_VOICE_INTERACTION_STARTING:
-                return 4;
-            case TYPE_VOICE_INTERACTION:
-                // voice interaction layer is almost immediately above apps.
-                return 5;
-            case TYPE_INPUT_CONSUMER:
-                return 6;
-            case TYPE_SYSTEM_DIALOG:
-                return 7;
-            case TYPE_TOAST:
-                // toasts and the plugged-in battery thing
-                return 8;
-            case TYPE_PRIORITY_PHONE:
-                // SIM errors and unlock.  Not sure if this really should be in a high layer.
-                return 9;
-            case TYPE_DREAM:
-                // used for Dreams (screensavers with TYPE_DREAM windows)
-                return 10;
-            case TYPE_SYSTEM_ALERT:
-                // like the ANR / app crashed dialogs
-                return 11;
-            case TYPE_INPUT_METHOD:
-                // on-screen keyboards and other such input method user interfaces go here.
-                return 12;
-            case TYPE_INPUT_METHOD_DIALOG:
-                // on-screen keyboards and other such input method user interfaces go here.
-                return 13;
-            case TYPE_STATUS_BAR_SUB_PANEL:
-                return 15;
-            case TYPE_STATUS_BAR:
-                return 16;
-            case TYPE_STATUS_BAR_PANEL:
-                return 17;
-            case TYPE_KEYGUARD_DIALOG:
-                return 18;
-            case TYPE_VOLUME_OVERLAY:
-                // the on-screen volume indicator and controller shown when the user
-                // changes the device volume
-                return 19;
-            case TYPE_SYSTEM_OVERLAY:
-                // the on-screen volume indicator and controller shown when the user
-                // changes the device volume
-                return 20;
-            case TYPE_NAVIGATION_BAR:
-                // the navigation bar, if available, shows atop most things
-                return 21;
-            case TYPE_NAVIGATION_BAR_PANEL:
-                // some panels (e.g. search) need to show on top of the navigation bar
-                return 22;
-            case TYPE_SCREENSHOT:
-                // screenshot selection layer shouldn't go above system error, but it should cover
-                // navigation bars at the very least.
-                return 23;
-            case TYPE_SYSTEM_ERROR:
-                // system-level error dialogs
-                return 24;
-            case TYPE_MAGNIFICATION_OVERLAY:
-                // used to highlight the magnified portion of a display
-                return 25;
-            case TYPE_DISPLAY_OVERLAY:
-                // used to simulate secondary display devices
-                return 26;
-            case TYPE_DRAG:
-                // the drag layer: input for drag-and-drop is associated with this window,
-                // which sits above all other focusable windows
-                return 27;
-            case TYPE_ACCESSIBILITY_OVERLAY:
-                // overlay put by accessibility services to intercept user interaction
-                return 28;
-            case TYPE_SECURE_SYSTEM_OVERLAY:
-                return 29;
-            case TYPE_BOOT_PROGRESS:
-                return 30;
-            case TYPE_POINTER:
-                // the (mouse) pointer layer
-                return 31;
-        }
-        Log.e(TAG, "Unknown window type: " + type);
-        return 2;
-    }
-
-    @Override
-    public int subWindowTypeToLayerLw(int type) {
-        // TODO: figure-out a good way to keep this in-sync with PhoneWindowManager...
-        switch (type) {
-            case TYPE_APPLICATION_PANEL:
-            case TYPE_APPLICATION_ATTACHED_DIALOG:
-                return 1;
-            case TYPE_APPLICATION_MEDIA:
-                return -2;
-            case TYPE_APPLICATION_MEDIA_OVERLAY:
-                return -1;
-            case TYPE_APPLICATION_SUB_PANEL:
-                return 2;
-            case TYPE_APPLICATION_ABOVE_SUB_PANEL:
-                return 3;
-        }
-        Log.e(TAG, "Unknown sub-window type: " + type);
-        return 0;
-    }
-
-    @Override
     public int getMaxWallpaperLayer() {
         return 0;
     }
diff --git a/services/tests/servicestests/src/com/android/server/wm/UnknownAppVisibilityControllerTest.java b/services/tests/servicestests/src/com/android/server/wm/UnknownAppVisibilityControllerTest.java
index 772bfb4..cf8af67 100644
--- a/services/tests/servicestests/src/com/android/server/wm/UnknownAppVisibilityControllerTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/UnknownAppVisibilityControllerTest.java
@@ -17,25 +17,14 @@
 package com.android.server.wm;
 
 import static junit.framework.Assert.assertTrue;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.doAnswer;
 
-import android.app.ActivityManagerInternal;
-import android.content.Context;
 import android.platform.test.annotations.Presubmit;
-import android.support.test.InstrumentationRegistry;
 import android.support.test.filters.SmallTest;
 import android.support.test.runner.AndroidJUnit4;
 
-import com.android.server.LocalServices;
-
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.mockito.invocation.InvocationOnMock;
 
 /**
  * Test class for {@link AppTransition}.
@@ -52,64 +41,50 @@
     @Before
     public void setUp() throws Exception {
         super.setUp();
-        final Context context = InstrumentationRegistry.getTargetContext();
-        doAnswer((InvocationOnMock invocationOnMock) -> {
-            invocationOnMock.getArgumentAt(0, Runnable.class).run();
-            return null;
-        }).when(sMockAm).notifyKeyguardFlagsChanged(any());
-        mWm = TestWindowManagerPolicy.getWindowManagerService(context);
-    }
-
-    @After
-    public void tearDown() throws Exception {
-        LocalServices.removeServiceForTest(ActivityManagerInternal.class);
+        sWm.mUnknownAppVisibilityController.clear();
     }
 
     @Test
     public void testFlow() throws Exception {
-        AppWindowToken token = createAppToken();
-        mWm.mUnknownAppVisibilityController.notifyLaunched(token);
-        mWm.mUnknownAppVisibilityController.notifyAppResumedFinished(token);
-        mWm.mUnknownAppVisibilityController.notifyRelayouted(token);
+        final AppWindowToken token = new TestAppWindowToken(sDisplayContent);
+        sWm.mUnknownAppVisibilityController.notifyLaunched(token);
+        sWm.mUnknownAppVisibilityController.notifyAppResumedFinished(token);
+        sWm.mUnknownAppVisibilityController.notifyRelayouted(token);
 
         // Make sure our handler processed the message.
         Thread.sleep(100);
-        assertTrue(mWm.mUnknownAppVisibilityController.allResolved());
+        assertTrue(sWm.mUnknownAppVisibilityController.allResolved());
     }
 
     @Test
     public void testMultiple() throws Exception {
-        AppWindowToken token1 = createAppToken();
-        AppWindowToken token2 = createAppToken();
-        mWm.mUnknownAppVisibilityController.notifyLaunched(token1);
-        mWm.mUnknownAppVisibilityController.notifyAppResumedFinished(token1);
-        mWm.mUnknownAppVisibilityController.notifyLaunched(token2);
-        mWm.mUnknownAppVisibilityController.notifyRelayouted(token1);
-        mWm.mUnknownAppVisibilityController.notifyAppResumedFinished(token2);
-        mWm.mUnknownAppVisibilityController.notifyRelayouted(token2);
+        final AppWindowToken token1 = new TestAppWindowToken(sDisplayContent);
+        final AppWindowToken token2 = new TestAppWindowToken(sDisplayContent);
+        sWm.mUnknownAppVisibilityController.notifyLaunched(token1);
+        sWm.mUnknownAppVisibilityController.notifyAppResumedFinished(token1);
+        sWm.mUnknownAppVisibilityController.notifyLaunched(token2);
+        sWm.mUnknownAppVisibilityController.notifyRelayouted(token1);
+        sWm.mUnknownAppVisibilityController.notifyAppResumedFinished(token2);
+        sWm.mUnknownAppVisibilityController.notifyRelayouted(token2);
 
         // Make sure our handler processed the message.
         Thread.sleep(100);
-        assertTrue(mWm.mUnknownAppVisibilityController.allResolved());
+        assertTrue(sWm.mUnknownAppVisibilityController.allResolved());
     }
 
     @Test
     public void testClear() throws Exception {
-        AppWindowToken token = createAppToken();
-        mWm.mUnknownAppVisibilityController.notifyLaunched(token);
-        mWm.mUnknownAppVisibilityController.clear();;
-        assertTrue(mWm.mUnknownAppVisibilityController.allResolved());
+        final AppWindowToken token = new TestAppWindowToken(sDisplayContent);
+        sWm.mUnknownAppVisibilityController.notifyLaunched(token);
+        sWm.mUnknownAppVisibilityController.clear();;
+        assertTrue(sWm.mUnknownAppVisibilityController.allResolved());
     }
 
     @Test
     public void testAppRemoved() throws Exception {
-        AppWindowToken token = createAppToken();
-        mWm.mUnknownAppVisibilityController.notifyLaunched(token);
-        mWm.mUnknownAppVisibilityController.appRemoved(token);
-        assertTrue(mWm.mUnknownAppVisibilityController.allResolved());
-    }
-
-    private AppWindowToken createAppToken() {
-        return new AppWindowToken(mWm, null, false, mWm.getDefaultDisplayContentLocked());
+        final AppWindowToken token = new TestAppWindowToken(sDisplayContent);
+        sWm.mUnknownAppVisibilityController.notifyLaunched(token);
+        sWm.mUnknownAppVisibilityController.appRemoved(token);
+        assertTrue(sWm.mUnknownAppVisibilityController.allResolved());
     }
 }
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowContainerTests.java b/services/tests/servicestests/src/com/android/server/wm/WindowContainerTests.java
index 4f9cd95..74557e2 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowContainerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowContainerTests.java
@@ -392,7 +392,7 @@
         testGetOrientation_childSpecifiedConfig(false, SCREEN_ORIENTATION_LANDSCAPE,
             SCREEN_ORIENTATION_LANDSCAPE);
         testGetOrientation_childSpecifiedConfig(false, SCREEN_ORIENTATION_UNSET,
-            SCREEN_ORIENTATION_UNSET);
+            SCREEN_ORIENTATION_UNSPECIFIED);
     }
 
     private void testGetOrientation_childSpecifiedConfig(boolean childVisible, int childOrientation,
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 186884b..28b6e45 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
@@ -57,7 +57,8 @@
         final Task mTask;
         boolean mDockedResizingForTest = false;
         WindowStateWithTask(WindowManager.LayoutParams attrs, Task t) {
-            super(sWm, null, mIWindow, mWindowToken, null, 0, 0, attrs, 0, 0);
+            super(sWm, null, mIWindow, mWindowToken, null, 0, 0, attrs, 0, 0,
+                    false /* ownerCanAddInternalSystemWindow */);
             mTask = t;
         }
 
@@ -77,8 +78,7 @@
         final Rect mInsetBounds = new Rect();
         boolean mFullscreenForTest = true;
         TaskWithBounds(Rect bounds) {
-            super(0, mStubStack, 0, sWm, null, null, false, 0, false, false, new TaskDescription(),
-                    null);
+            super(0, mStubStack, 0, sWm, null, null, 0, false, false, new TaskDescription(), null);
             mBounds = bounds;
         }
         @Override
@@ -106,7 +106,7 @@
         sWm.mSystemDecorLayer = 10000;
 
         mWindowToken = new WindowToken(sWm, new Binder(), 0, false,
-                sWm.getDefaultDisplayContentLocked());
+                sWm.getDefaultDisplayContentLocked(), false /* ownerCanManageAppTokens */);
         mStubStack = new TaskStack(sWm, 0);
     }
 
@@ -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/services/tests/servicestests/src/com/android/server/wm/WindowLayersControllerTests.java b/services/tests/servicestests/src/com/android/server/wm/WindowLayersControllerTests.java
index c8650bf..d5e6b6d 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowLayersControllerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowLayersControllerTests.java
@@ -23,6 +23,9 @@
 import android.support.test.filters.SmallTest;
 import android.support.test.runner.AndroidJUnit4;
 
+import static android.app.ActivityManager.StackId.ASSISTANT_STACK_ID;
+import static android.app.ActivityManager.StackId.DOCKED_STACK_ID;
+import static android.app.ActivityManager.StackId.PINNED_STACK_ID;
 import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG;
 import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA_OVERLAY;
 import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
@@ -135,8 +138,9 @@
 
     @Test
     public void testAssignWindowLayers_ForImeNonAppImeTarget() throws Exception {
-        final WindowState imeSystemOverlayTarget =
-                createWindow(null, TYPE_SYSTEM_OVERLAY, sDisplayContent, "imeSystemOverlayTarget");
+        final WindowState imeSystemOverlayTarget = createWindow(null, TYPE_SYSTEM_OVERLAY,
+                sDisplayContent, "imeSystemOverlayTarget",
+                true /* ownerCanAddInternalSystemWindow */);
 
         sWm.mInputMethodTarget = imeSystemOverlayTarget;
         sLayersController.assignWindowLayers(sDisplayContent);
@@ -154,6 +158,22 @@
         assertWindowLayerGreaterThan(sImeDialogWindow, sImeWindow);
     }
 
+    @Test
+    public void testStackLayers() throws Exception {
+        WindowState pinnedStackWindow = createWindowOnStack(null, PINNED_STACK_ID,
+                TYPE_BASE_APPLICATION, sDisplayContent, "pinnedStackWindow");
+        WindowState dockedStackWindow = createWindowOnStack(null, DOCKED_STACK_ID,
+                TYPE_BASE_APPLICATION, sDisplayContent, "dockedStackWindow");
+        WindowState assistantStackWindow = createWindowOnStack(null, ASSISTANT_STACK_ID,
+                TYPE_BASE_APPLICATION, sDisplayContent, "assistantStackWindow");
+
+        sLayersController.assignWindowLayers(sDisplayContent);
+
+        assertWindowLayerGreaterThan(dockedStackWindow, sAppWindow);
+        assertWindowLayerGreaterThan(assistantStackWindow, dockedStackWindow);
+        assertWindowLayerGreaterThan(pinnedStackWindow, assistantStackWindow);
+    }
+
     private void assertWindowLayerGreaterThan(WindowState first, WindowState second)
             throws Exception {
         assertGreaterThan(first.mWinAnimator.mAnimLayer, second.mWinAnimator.mAnimLayer);
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java b/services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java
index c6f88ed..e5e3512 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java
@@ -17,7 +17,6 @@
 package com.android.server.wm;
 
 import android.app.ActivityManager.TaskDescription;
-import android.app.ActivityManagerInternal;
 import android.content.res.Configuration;
 import android.graphics.Rect;
 import android.hardware.display.DisplayManagerGlobal;
@@ -26,9 +25,8 @@
 import android.view.DisplayInfo;
 import android.view.IApplicationToken;
 import org.junit.Assert;
+import org.junit.After;
 import org.junit.Before;
-import org.mockito.Mock;
-import org.mockito.Mockito;
 import org.mockito.MockitoAnnotations;
 
 import android.app.ActivityManager.TaskSnapshot;
@@ -39,6 +37,7 @@
 import android.view.WindowManager;
 
 import static android.app.ActivityManager.StackId.FIRST_DYNAMIC_STACK_ID;
+import static android.app.ActivityManager.StackId.INVALID_STACK_ID;
 import static android.app.AppOpsManager.OP_NONE;
 import static android.content.pm.ActivityInfo.RESIZE_MODE_UNRESIZEABLE;
 import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
@@ -59,7 +58,8 @@
 import static org.mockito.Mockito.mock;
 
 import com.android.server.AttributeCache;
-import com.android.server.LocalServices;
+
+import java.util.HashSet;
 
 /**
  * Common base class for window manager unit test classes.
@@ -86,18 +86,16 @@
     static WindowState sAppWindow;
     static WindowState sChildAppWindowAbove;
     static WindowState sChildAppWindowBelow;
-    static @Mock ActivityManagerInternal sMockAm;
+    static HashSet<WindowState> sCommonWindows;
 
     @Before
     public void setUp() throws Exception {
         if (sOneTimeSetupDone) {
-            Mockito.reset(sMockAm);
             return;
         }
         sOneTimeSetupDone = true;
         MockitoAnnotations.initMocks(this);
         final Context context = InstrumentationRegistry.getTargetContext();
-        LocalServices.addService(ActivityManagerInternal.class, sMockAm);
         AttributeCache.init(context);
         sWm = TestWindowManagerPolicy.getWindowManagerService(context);
         sPolicy = (TestWindowManagerPolicy) sWm.mPolicy;
@@ -119,20 +117,48 @@
         sWm.mDisplayReady = true;
 
         // Set-up some common windows.
-        sWallpaperWindow = createWindow(null, TYPE_WALLPAPER, sDisplayContent, "wallpaperWindow");
-        sImeWindow = createWindow(null, TYPE_INPUT_METHOD, sDisplayContent, "sImeWindow");
-        sImeDialogWindow =
-                createWindow(null, TYPE_INPUT_METHOD_DIALOG, sDisplayContent, "sImeDialogWindow");
-        sStatusBarWindow = createWindow(null, TYPE_STATUS_BAR, sDisplayContent, "sStatusBarWindow");
-        sNavBarWindow =
-                createWindow(null, TYPE_NAVIGATION_BAR, sDisplayContent, "sNavBarWindow");
-        sDockedDividerWindow =
-                createWindow(null, TYPE_DOCK_DIVIDER, sDisplayContent, "sDockedDividerWindow");
-        sAppWindow = createWindow(null, TYPE_BASE_APPLICATION, sDisplayContent, "sAppWindow");
-        sChildAppWindowAbove = createWindow(sAppWindow,
-                TYPE_APPLICATION_ATTACHED_DIALOG, sAppWindow.mToken, "sChildAppWindowAbove");
-        sChildAppWindowBelow = createWindow(sAppWindow,
-                TYPE_APPLICATION_MEDIA_OVERLAY, sAppWindow.mToken, "sChildAppWindowBelow");
+        sCommonWindows = new HashSet();
+        sWallpaperWindow = createCommonWindow(null, TYPE_WALLPAPER, "wallpaperWindow");
+        sImeWindow = createCommonWindow(null, TYPE_INPUT_METHOD, "sImeWindow");
+        sImeDialogWindow = createCommonWindow(null, TYPE_INPUT_METHOD_DIALOG, "sImeDialogWindow");
+        sStatusBarWindow = createCommonWindow(null, TYPE_STATUS_BAR, "sStatusBarWindow");
+        sNavBarWindow = createCommonWindow(null, TYPE_NAVIGATION_BAR, "sNavBarWindow");
+        sDockedDividerWindow = createCommonWindow(null, TYPE_DOCK_DIVIDER, "sDockedDividerWindow");
+        sAppWindow = createCommonWindow(null, TYPE_BASE_APPLICATION, "sAppWindow");
+        sChildAppWindowAbove = createCommonWindow(sAppWindow, TYPE_APPLICATION_ATTACHED_DIALOG,
+                "sChildAppWindowAbove");
+        sChildAppWindowBelow = createCommonWindow(sAppWindow, TYPE_APPLICATION_MEDIA_OVERLAY,
+                "sChildAppWindowBelow");
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        sWm.mRoot.forAllWindows(w -> {
+            if (!sCommonWindows.contains(w)) {
+                w.removeImmediately();
+            }
+        }, true /* traverseTopToBottom */);
+    }
+
+    private static WindowState createCommonWindow(WindowState parent, int type, String name) {
+        final WindowState win = createWindow(parent, type, name);
+        sCommonWindows.add(win);
+        return win;
+    }
+
+    /**
+     * Creates a window for a task on a the given {@param stackId}.
+     */
+    private WindowState createStackWindow(int stackId, String name) {
+        final StackWindowController stackController = createStackControllerOnStackOnDisplay(stackId,
+                sDisplayContent);
+        final TestTaskWindowContainerController taskController =
+                new TestTaskWindowContainerController(stackController);
+        TestAppWindowToken appWinToken = new TestAppWindowToken(sDisplayContent);
+        appWinToken.mTask = taskController.mContainer;
+        final WindowState win = createWindow(null, TYPE_BASE_APPLICATION, name);
+        win.mAppToken = appWinToken;
+        return win;
     }
 
     /** Asserts that the first entry is greater than the second entry. */
@@ -147,12 +173,14 @@
         sWm.mH.runWithScissors(() -> { }, 0);
     }
 
-    private static WindowToken createWindowToken(DisplayContent dc, int type) {
+    private static WindowToken createWindowToken(DisplayContent dc, int stackId, int type) {
         if (type < FIRST_APPLICATION_WINDOW || type > LAST_APPLICATION_WINDOW) {
             return new TestWindowToken(type, dc);
         }
 
-        final TaskStack stack = createTaskStackOnDisplay(dc);
+        final TaskStack stack = stackId == INVALID_STACK_ID
+                ? createTaskStackOnDisplay(dc)
+                : createStackControllerOnStackOnDisplay(stackId, dc).mContainer;
         final Task task = createTaskInStack(stack, 0 /* userId */);
         final TestAppWindowToken token = new TestAppWindowToken(dc);
         task.addChild(token, 0);
@@ -165,6 +193,12 @@
                 : createWindow(parent, type, parent.mToken, name);
     }
 
+    static WindowState createWindowOnStack(WindowState parent, int stackId, int type,
+            DisplayContent dc, String name) {
+        final WindowToken token = createWindowToken(dc, stackId, type);
+        return createWindow(parent, type, token, name);
+    }
+
     WindowState createAppWindow(Task task, int type, String name) {
         final AppWindowToken token = new TestAppWindowToken(sDisplayContent);
         task.addChild(token, 0);
@@ -172,16 +206,27 @@
     }
 
     static WindowState createWindow(WindowState parent, int type, DisplayContent dc, String name) {
-        final WindowToken token = createWindowToken(dc, type);
+        final WindowToken token = createWindowToken(dc, INVALID_STACK_ID, type);
         return createWindow(parent, type, token, name);
     }
 
+    static WindowState createWindow(WindowState parent, int type, DisplayContent dc, String name,
+            boolean ownerCanAddInternalSystemWindow) {
+        final WindowToken token = createWindowToken(dc, INVALID_STACK_ID, type);
+        return createWindow(parent, type, token, name, ownerCanAddInternalSystemWindow);
+    }
+
     static WindowState createWindow(WindowState parent, int type, WindowToken token, String name) {
+        return createWindow(parent, type, token, name, false /* ownerCanAddInternalSystemWindow */);
+    }
+
+    static WindowState createWindow(WindowState parent, int type, WindowToken token, String name,
+            boolean ownerCanAddInternalSystemWindow) {
         final WindowManager.LayoutParams attrs = new WindowManager.LayoutParams(type);
         attrs.setTitle(name);
 
         final WindowState w = new WindowState(sWm, sMockSession, sIWindow, token, parent, OP_NONE,
-                0, attrs, 0, 0);
+                0, attrs, 0, 0, ownerCanAddInternalSystemWindow);
         // TODO: Probably better to make this call in the WindowState ctor to avoid errors with
         // adding it to the token...
         token.addWindow(w);
@@ -195,14 +240,19 @@
 
     static StackWindowController createStackControllerOnDisplay(DisplayContent dc) {
         final int stackId = ++sNextStackId;
+        return createStackControllerOnStackOnDisplay(stackId, dc);
+    }
+
+    static StackWindowController createStackControllerOnStackOnDisplay(int stackId,
+            DisplayContent dc) {
         return new StackWindowController(stackId, null, dc.getDisplayId(),
                 true /* onTop */, new Rect(), sWm);
     }
 
     /** Creates a {@link Task} and adds it to the specified {@link TaskStack}. */
     static Task createTaskInStack(TaskStack stack, int userId) {
-        final Task newTask = new Task(sNextTaskId++, stack, userId, sWm, null, EMPTY, false, 0,
-                false, false, new TaskDescription(), null);
+        final Task newTask = new Task(sNextTaskId++, stack, userId, sWm, null, EMPTY, 0, false,
+                false, new TaskDescription(), null);
         stack.addTask(newTask, POSITION_TOP);
         return newTask;
     }
@@ -223,7 +273,8 @@
         }
 
         TestWindowToken(int type, DisplayContent dc, boolean persistOnEmpty) {
-            super(sWm, mock(IBinder.class), type, persistOnEmpty, dc);
+            super(sWm, mock(IBinder.class), type, persistOnEmpty, dc,
+                    false /* ownerCanManageAppTokens */);
         }
 
         int getWindowsCount() {
@@ -239,7 +290,7 @@
     static class TestAppWindowToken extends AppWindowToken {
 
         TestAppWindowToken(DisplayContent dc) {
-            super(sWm, null, false, dc);
+            super(sWm, null, false, dc, true /* fillsParent */);
         }
 
         TestAppWindowToken(WindowManagerService service, IApplicationToken token,
@@ -282,12 +333,10 @@
         private boolean mIsAnimating = false;
 
         TestTask(int taskId, TaskStack stack, int userId, WindowManagerService service, Rect bounds,
-                Configuration overrideConfig, boolean isOnTopLauncher, int resizeMode,
-                boolean supportsPictureInPicture, boolean homeTask,
-                TaskWindowContainerController controller) {
-            super(taskId, stack, userId, service, bounds, overrideConfig, isOnTopLauncher,
-                    resizeMode, supportsPictureInPicture, homeTask, new TaskDescription(),
-                            controller);
+                Configuration overrideConfig, int resizeMode, boolean supportsPictureInPicture,
+                boolean homeTask, TaskWindowContainerController controller) {
+            super(taskId, stack, userId, service, bounds, overrideConfig, resizeMode,
+                    supportsPictureInPicture, homeTask, new TaskDescription(), controller);
         }
 
         boolean shouldDeferRemoval() {
@@ -338,17 +387,16 @@
                         }
                     }, stackController, 0 /* userId */, null /* bounds */,
                     EMPTY /* overrideConfig*/, RESIZE_MODE_UNRESIZEABLE,
-                    false /* supportsPictureInPicture */, false /* homeTask*/,
-                    false /* isOnTopLauncher */, true /* toTop*/, true /* showForAllUsers */,
-                    new TaskDescription(), sWm);
+                    false /* supportsPictureInPicture */, false /* homeTask*/, true /* toTop*/,
+                    true /* showForAllUsers */, new TaskDescription(), sWm);
         }
 
         @Override
         TestTask createTask(int taskId, TaskStack stack, int userId, Rect bounds,
                 Configuration overrideConfig, int resizeMode, boolean supportsPictureInPicture,
-                boolean homeTask, boolean isOnTopLauncher, TaskDescription taskDescription) {
-            return new TestTask(taskId, stack, userId, mService, bounds, overrideConfig,
-                    isOnTopLauncher, resizeMode, supportsPictureInPicture, homeTask, this);
+                boolean homeTask, TaskDescription taskDescription) {
+            return new TestTask(taskId, stack, userId, mService, bounds, overrideConfig, resizeMode,
+                    supportsPictureInPicture, homeTask, this);
         }
     }
 
@@ -403,7 +451,8 @@
         boolean resizeReported;
 
         TestWindowState(WindowManager.LayoutParams attrs, WindowToken token) {
-            super(sWm, sMockSession, sIWindow, token, null, OP_NONE, 0, attrs, 0, 0);
+            super(sWm, sMockSession, sIWindow, token, null, OP_NONE, 0, attrs, 0, 0,
+                    false /* ownerCanAddInternalSystemWindow */);
         }
 
         @Override
diff --git a/services/usb/java/com/android/server/usb/UsbDeviceManager.java b/services/usb/java/com/android/server/usb/UsbDeviceManager.java
index 4d2c3b9..07b4ca1 100644
--- a/services/usb/java/com/android/server/usb/UsbDeviceManager.java
+++ b/services/usb/java/com/android/server/usb/UsbDeviceManager.java
@@ -17,6 +17,7 @@
 package com.android.server.usb;
 
 import android.app.Notification;
+import android.app.NotificationChannel;
 import android.app.NotificationManager;
 import android.app.PendingIntent;
 import android.content.BroadcastReceiver;
@@ -134,6 +135,8 @@
 
     private static final String BOOT_MODE_PROPERTY = "ro.bootmode";
 
+    private static final String ADB_NOTIFICATION_CHANNEL_ID_TV = "usbdevicemanager.adb.tv";
+
     private UsbHandler mHandler;
     private boolean mBootCompleted;
 
@@ -239,6 +242,16 @@
         mNotificationManager = (NotificationManager)
                 mContext.getSystemService(Context.NOTIFICATION_SERVICE);
 
+        // Ensure that the notification channels are set up
+        if (isTv()) {
+            // TV-specific notification channel
+            mNotificationManager.createNotificationChannel(
+                    new NotificationChannel(ADB_NOTIFICATION_CHANNEL_ID_TV,
+                        mContext.getString(
+                            com.android.internal.R.string.adb_debugging_notification_channel_tv),
+                        NotificationManager.IMPORTANCE_HIGH));
+        }
+
         // We do not show the USB notification if the primary volume supports mass storage.
         // The legacy mass storage UI will be used instead.
         boolean massStorageSupported = false;
@@ -325,6 +338,10 @@
         }
     }
 
+    private boolean isTv() {
+        return mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_LEANBACK);
+    }
+
     private final class UsbHandler extends Handler {
 
         // current USB state
@@ -928,9 +945,9 @@
                     CharSequence message = r.getText(
                             com.android.internal.R.string.adb_active_notification_message);
 
-                    Intent intent = Intent.makeRestartActivityTask(
-                            new ComponentName("com.android.settings",
-                                    "com.android.settings.DevelopmentSettings"));
+                    Intent intent = new Intent(Settings.ACTION_APPLICATION_DEVELOPMENT_SETTINGS);
+                    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+                            | Intent.FLAG_ACTIVITY_CLEAR_TASK);
                     PendingIntent pi = PendingIntent.getActivityAsUser(mContext, 0,
                             intent, 0, null, UserHandle.CURRENT);
 
@@ -947,6 +964,8 @@
                             .setContentText(message)
                             .setContentIntent(pi)
                             .setVisibility(Notification.VISIBILITY_PUBLIC)
+                            .extend(new Notification.TvExtender()
+                                    .setChannel(ADB_NOTIFICATION_CHANNEL_ID_TV))
                             .build();
                     mAdbNotificationShown = true;
                     mNotificationManager.notifyAsUser(null, id, notification,
diff --git a/services/usb/java/com/android/server/usb/UsbProfileGroupSettingsManager.java b/services/usb/java/com/android/server/usb/UsbProfileGroupSettingsManager.java
index 2e99b6e..caf9ec6 100644
--- a/services/usb/java/com/android/server/usb/UsbProfileGroupSettingsManager.java
+++ b/services/usb/java/com/android/server/usb/UsbProfileGroupSettingsManager.java
@@ -16,6 +16,8 @@
 
 package com.android.server.usb;
 
+import static com.android.internal.app.IntentForwarderActivity.FORWARD_INTENT_TO_MANAGED_PROFILE;
+
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.content.ActivityNotFoundException;
@@ -41,6 +43,8 @@
 import android.util.AtomicFile;
 import android.util.Log;
 import android.util.Slog;
+import android.util.SparseArray;
+import android.util.SparseIntArray;
 import android.util.Xml;
 
 import com.android.internal.annotations.GuardedBy;
@@ -50,6 +54,8 @@
 import com.android.internal.util.IndentingPrintWriter;
 import com.android.internal.util.XmlUtils;
 
+import libcore.io.IoUtils;
+
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParserException;
 import org.xmlpull.v1.XmlSerializer;
@@ -66,10 +72,6 @@
 import java.util.List;
 import java.util.Map;
 
-import libcore.io.IoUtils;
-
-import static com.android.internal.app.IntentForwarderActivity.FORWARD_INTENT_TO_MANAGED_PROFILE;
-
 class UsbProfileGroupSettingsManager {
     private static final String TAG = UsbProfileGroupSettingsManager.class.getSimpleName();
     private static final boolean DEBUG = false;
@@ -873,6 +875,56 @@
         return resolveInfos;
     }
 
+    /**
+     * Only return those matches with the highest priority.
+     *
+     * @param matches All matches, some might have lower priority
+     *
+     * @return The matches with the highest priority
+     */
+    @NonNull
+    private ArrayList<ResolveInfo> preferHighPriority(
+            @NonNull ArrayList<ResolveInfo> matches) {
+        SparseArray<ArrayList<ResolveInfo>> highestPriorityMatchesByUserId = new SparseArray<>();
+        SparseIntArray highestPriorityByUserId = new SparseIntArray();
+
+        // Create list of highest priority matches per user in highestPriorityMatchesByUserId
+        int numMatches = matches.size();
+        for (int matchNum = 0; matchNum < numMatches; matchNum++) {
+            ResolveInfo match = matches.get(matchNum);
+
+            // If this a previously unknown user?
+            if (highestPriorityByUserId.indexOfKey(match.targetUserId) < 0) {
+                highestPriorityByUserId.put(match.targetUserId, Integer.MIN_VALUE);
+                highestPriorityMatchesByUserId.put(match.targetUserId, new ArrayList<>());
+            }
+
+            // Find current highest priority matches for the current user
+            int highestPriority = highestPriorityByUserId.get(match.targetUserId);
+            ArrayList<ResolveInfo> highestPriorityMatches = highestPriorityMatchesByUserId.get(
+                    match.targetUserId);
+
+            if (match.priority == highestPriority) {
+                highestPriorityMatches.add(match);
+            } else if (match.priority > highestPriority) {
+                highestPriorityByUserId.put(match.targetUserId, match.priority);
+
+                highestPriorityMatches.clear();
+                highestPriorityMatches.add(match);
+            }
+        }
+
+        // Combine all users back together. This means that all matches have the same priority for a
+        // user. Matches for different users might have different priority.
+        ArrayList<ResolveInfo> combinedMatches = new ArrayList<>();
+        int numMatchArrays = highestPriorityMatchesByUserId.size();
+        for (int matchArrayNum = 0; matchArrayNum < numMatchArrays; matchArrayNum++) {
+            combinedMatches.addAll(highestPriorityMatchesByUserId.valueAt(matchArrayNum));
+        }
+
+        return combinedMatches;
+    }
+
     private final ArrayList<ResolveInfo> getDeviceMatchesLocked(UsbDevice device, Intent intent) {
         ArrayList<ResolveInfo> matches = new ArrayList<ResolveInfo>();
         List<ResolveInfo> resolveInfos = queryIntentActivitiesForAllProfiles(intent);
@@ -883,7 +935,7 @@
                 matches.add(resolveInfo);
             }
         }
-        return matches;
+        return preferHighPriority(matches);
     }
 
     private final ArrayList<ResolveInfo> getAccessoryMatchesLocked(
@@ -897,7 +949,7 @@
                 matches.add(resolveInfo);
             }
         }
-        return matches;
+        return preferHighPriority(matches);
     }
 
     public void deviceAttached(UsbDevice device) {
diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java
index e8976a7..03a7db7 100644
--- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java
+++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java
@@ -638,6 +638,25 @@
         }
 
         @Override
+        public int startAssistantActivity(IBinder token, Intent intent, String resolvedType) {
+            synchronized (this) {
+                if (mImpl == null) {
+                    Slog.w(TAG, "startAssistantActivity without running voice interaction service");
+                    return ActivityManager.START_CANCELED;
+                }
+                final int callingPid = Binder.getCallingPid();
+                final int callingUid = Binder.getCallingUid();
+                final long caller = Binder.clearCallingIdentity();
+                try {
+                    return mImpl.startAssistantActivityLocked(callingPid, callingUid, token,
+                            intent, resolvedType);
+                } finally {
+                    Binder.restoreCallingIdentity(caller);
+                }
+            }
+        }
+
+        @Override
         public void setKeepAwake(IBinder token, boolean keepAwake) {
             synchronized (this) {
                 if (mImpl == null) {
diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
index 4357dca..0c5e4bd 100644
--- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
+++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
@@ -16,8 +16,13 @@
 
 package com.android.server.voiceinteraction;
 
+import static android.app.ActivityManager.START_VOICE_HIDDEN_SESSION;
+import static android.app.ActivityManager.START_VOICE_NOT_ACTIVE_SESSION;
+
 import android.app.ActivityManager;
+import android.app.ActivityManager.StackId;
 import android.app.ActivityManagerInternal;
+import android.app.ActivityOptions;
 import android.app.IActivityManager;
 import android.content.BroadcastReceiver;
 import android.content.ComponentName;
@@ -185,11 +190,11 @@
         try {
             if (mActiveSession == null || token != mActiveSession.mToken) {
                 Slog.w(TAG, "startVoiceActivity does not match active session");
-                return ActivityManager.START_VOICE_NOT_ACTIVE_SESSION;
+                return START_VOICE_NOT_ACTIVE_SESSION;
             }
             if (!mActiveSession.mShown) {
                 Slog.w(TAG, "startVoiceActivity not allowed on hidden session");
-                return ActivityManager.START_VOICE_HIDDEN_SESSION;
+                return START_VOICE_HIDDEN_SESSION;
             }
             intent = new Intent(intent);
             intent.addCategory(Intent.CATEGORY_VOICE);
@@ -202,6 +207,28 @@
         }
     }
 
+    public int startAssistantActivityLocked(int callingPid, int callingUid, IBinder token,
+            Intent intent, String resolvedType) {
+        try {
+            if (mActiveSession == null || token != mActiveSession.mToken) {
+                Slog.w(TAG, "startAssistantActivity does not match active session");
+                return START_VOICE_NOT_ACTIVE_SESSION;
+            }
+            if (!mActiveSession.mShown) {
+                Slog.w(TAG, "startAssistantActivity not allowed on hidden session");
+                return START_VOICE_HIDDEN_SESSION;
+            }
+            intent = new Intent(intent);
+            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+            ActivityOptions options = ActivityOptions.makeBasic();
+            options.setLaunchStackId(StackId.ASSISTANT_STACK_ID);
+            return mAm.startAssistantActivity(mComponent.getPackageName(), callingPid, callingUid,
+                    intent, resolvedType, options.toBundle(), mUser);
+        } catch (RemoteException e) {
+            throw new IllegalStateException("Unexpected remote error", e);
+        }
+    }
+
     public void setKeepAwakeLocked(IBinder token, boolean keepAwake) {
         try {
             if (mActiveSession == null || token != mActiveSession.mToken) {
diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java
index d0ccd55..6e10029 100644
--- a/telecomm/java/android/telecom/ConnectionService.java
+++ b/telecomm/java/android/telecom/ConnectionService.java
@@ -98,6 +98,7 @@
     private static final String SESSION_ADD_CS_ADAPTER = "CS.aCSA";
     private static final String SESSION_REMOVE_CS_ADAPTER = "CS.rCSA";
     private static final String SESSION_CREATE_CONN = "CS.crCo";
+    private static final String SESSION_CREATE_CONN_FAILED = "CS.crCoF";
     private static final String SESSION_ABORT = "CS.ab";
     private static final String SESSION_ANSWER = "CS.an";
     private static final String SESSION_ANSWER_VIDEO = "CS.anV";
@@ -142,6 +143,7 @@
     private static final int MSG_PULL_EXTERNAL_CALL = 22;
     private static final int MSG_SEND_CALL_EVENT = 23;
     private static final int MSG_ON_EXTRAS_CHANGED = 24;
+    private static final int MSG_CREATE_CONNECTION_FAILED = 25;
 
     private static Connection sNullConnection;
 
@@ -211,6 +213,25 @@
         }
 
         @Override
+        public void createConnectionFailed(
+                String callId,
+                ConnectionRequest request,
+                boolean isIncoming,
+                Session.Info sessionInfo) {
+            Log.startSession(sessionInfo, SESSION_CREATE_CONN_FAILED);
+            try {
+                SomeArgs args = SomeArgs.obtain();
+                args.arg1 = callId;
+                args.arg2 = request;
+                args.arg3 = Log.createSubsession();
+                args.argi1 = isIncoming ? 1 : 0;
+                mHandler.obtainMessage(MSG_CREATE_CONNECTION_FAILED, args).sendToTarget();
+            } finally {
+                Log.endSession();
+            }
+        }
+
+        @Override
         public void abort(String callId, Session.Info sessionInfo) {
             Log.startSession(sessionInfo, SESSION_ABORT);
             try {
@@ -552,6 +573,35 @@
                     }
                     break;
                 }
+                case MSG_CREATE_CONNECTION_FAILED: {
+                    SomeArgs args = (SomeArgs) msg.obj;
+                    Log.continueSession((Session) args.arg3, SESSION_HANDLER +
+                            SESSION_CREATE_CONN_FAILED);
+                    try {
+                        final String id = (String) args.arg1;
+                        final ConnectionRequest request = (ConnectionRequest) args.arg2;
+                        final boolean isIncoming = args.argi1 == 1;
+                        if (!mAreAccountsInitialized) {
+                            Log.d(this, "Enqueueing pre-init request %s", id);
+                            mPreInitializationConnectionRequests.add(
+                                    new android.telecom.Logging.Runnable(
+                                            SESSION_HANDLER + SESSION_CREATE_CONN_FAILED + ".pICR",
+                                            null /*lock*/) {
+                                        @Override
+                                        public void loggedRun() {
+                                            createConnectionFailed(id, request, isIncoming);
+                                        }
+                                    }.prepare());
+                        } else {
+                            Log.i(this, "createConnectionFailed %s", id);
+                            createConnectionFailed(id, request, isIncoming);
+                        }
+                    } finally {
+                        args.recycle();
+                        Log.endSession();
+                    }
+                    break;
+                }
                 case MSG_ABORT: {
                     SomeArgs args = (SomeArgs) msg.obj;
                     Log.continueSession((Session) args.arg2, SESSION_HANDLER + SESSION_ABORT);
@@ -1175,6 +1225,17 @@
         }
     }
 
+    private void createConnectionFailed(final String callId, final ConnectionRequest request,
+            boolean isIncoming) {
+
+        Log.i(this, "createConnectionFailed %s", callId);
+        if (isIncoming) {
+            onCreateIncomingConnectionFailed(request);
+        } else {
+            onCreateOutgoingConnectionFailed(request);
+        }
+    }
+
     private void abort(String callId) {
         Log.d(this, "abort %s", callId);
         findConnectionForAction(callId, "abort").onAbort();
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java
index ba7b6a1..7964cf2 100644
--- a/telecomm/java/android/telecom/TelecomManager.java
+++ b/telecomm/java/android/telecom/TelecomManager.java
@@ -317,6 +317,15 @@
     public static final String EXTRA_CALL_BACK_NUMBER = "android.telecom.extra.CALL_BACK_NUMBER";
 
     /**
+     * The number of milliseconds that Telecom should wait after disconnecting a call via the
+     * ACTION_NEW_OUTGOING_CALL broadcast, in order to wait for the app which cancelled the call
+     * to make a new one.
+     * @hide
+     */
+    public static final String EXTRA_NEW_OUTGOING_CALL_CANCEL_TIMEOUT =
+            "android.telecom.extra.NEW_OUTGOING_CALL_CANCEL_TIMEOUT";
+
+    /**
      * A boolean meta-data value indicating whether an {@link InCallService} implements an
      * in-call user interface. Dialer implementations (see {@link #getDefaultDialerPackage()}) which
      * would also like to replace the in-call interface should set this meta-data to {@code true} in
@@ -1517,6 +1526,10 @@
      *      otherwise.
      */
     public boolean isIncomingCallPermitted(PhoneAccountHandle phoneAccountHandle) {
+        if (phoneAccountHandle == null) {
+            return false;
+        }
+
         ITelecomService service = getTelecomService();
         if (service != null) {
             try {
diff --git a/telecomm/java/com/android/internal/telecom/IConnectionService.aidl b/telecomm/java/com/android/internal/telecom/IConnectionService.aidl
index 8a27675..20feba7 100644
--- a/telecomm/java/com/android/internal/telecom/IConnectionService.aidl
+++ b/telecomm/java/com/android/internal/telecom/IConnectionService.aidl
@@ -46,6 +46,9 @@
             boolean isUnknown,
             in Session.Info sessionInfo);
 
+    void createConnectionFailed(String callId, in ConnectionRequest request, boolean isIncoming,
+            in Session.Info sessionInfo);
+
     void abort(String callId, in Session.Info sessionInfo);
 
     void answerVideo(String callId, int videoState, in Session.Info sessionInfo);
diff --git a/telecomm/java/com/android/internal/telecom/ITelecomService.aidl b/telecomm/java/com/android/internal/telecom/ITelecomService.aidl
index 6ca0bc5..d9465dc 100644
--- a/telecomm/java/com/android/internal/telecom/ITelecomService.aidl
+++ b/telecomm/java/com/android/internal/telecom/ITelecomService.aidl
@@ -259,4 +259,9 @@
      * @see TelecomServiceImpl#isOutgoingCallPermitted
      */
     boolean isOutgoingCallPermitted(in PhoneAccountHandle phoneAccountHandle);
+
+    /**
+     * @see TelecomServiceImpl#waitOnHandler
+     */
+    void waitOnHandlers();
 }
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index 6c45233..70df69c 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -417,6 +417,21 @@
     public static final String KEY_CARRIER_VOLTE_PROVISIONING_REQUIRED_BOOL
             = "carrier_volte_provisioning_required_bool";
 
+    /**
+     * Flag specifying if WFC provisioning depends on VoLTE provisioning.
+     *
+     * {@code false}: default value; honor actual WFC provisioning state.
+     * {@code true}: when VoLTE is not provisioned, treat WFC as not provisioned; when VoLTE is
+     *               provisioned, honor actual WFC provisioning state.
+     *
+     * As of now, Verizon is the only carrier enforcing this dependency in their
+     * WFC awareness and activation requirements.
+     *
+     * @hide
+     *  */
+    public static final String KEY_CARRIER_VOLTE_OVERRIDE_WFC_PROVISIONING_BOOL
+            = "carrier_volte_override_wfc_provisioning_bool";
+
     /** Flag specifying whether VoLTE TTY is supported. */
     public static final String KEY_CARRIER_VOLTE_TTY_SUPPORTED_BOOL
             = "carrier_volte_tty_supported_bool";
@@ -1173,6 +1188,9 @@
      * and {@code NEW_CODE} is the new {@code ImsReasonInfo#CODE_*} which this combination of
      * original code and message shall be remapped to.
      *
+     * Note: If {@code *} is specified for the original code, any ImsReasonInfo with the matching
+     * {@code MESSAGE} will be remapped to {@code NEW_CODE}.
+     *
      * Example: "501|call completion elsewhere|1014"
      * When the {@link ImsReasonInfo#getCode()} is {@link ImsReasonInfo#CODE_USER_TERMINATED} and
      * the {@link ImsReasonInfo#getExtraMessage()} is {@code "call completion elsewhere"},
@@ -1313,6 +1331,7 @@
         sDefaults.putInt(KEY_CARRIER_DEFAULT_WFC_IMS_ROAMING_MODE_INT, 2);
         sDefaults.putBoolean(KEY_CARRIER_FORCE_DISABLE_ETWS_CMAS_TEST_BOOL, false);
         sDefaults.putBoolean(KEY_CARRIER_VOLTE_PROVISIONING_REQUIRED_BOOL, false);
+        sDefaults.putBoolean(KEY_CARRIER_VOLTE_OVERRIDE_WFC_PROVISIONING_BOOL, false);
         sDefaults.putBoolean(KEY_CARRIER_VOLTE_TTY_SUPPORTED_BOOL, true);
         sDefaults.putBoolean(KEY_CARRIER_ALLOW_TURNOFF_IMS_BOOL, true);
         sDefaults.putBoolean(KEY_CARRIER_IMS_GBA_REQUIRED_BOOL, false);
diff --git a/telephony/java/android/telephony/DisconnectCause.java b/telephony/java/android/telephony/DisconnectCause.java
index 10cb7c9..e53e246 100644
--- a/telephony/java/android/telephony/DisconnectCause.java
+++ b/telephony/java/android/telephony/DisconnectCause.java
@@ -246,23 +246,18 @@
      */
     public static final int IMEI_NOT_ACCEPTED = 58;
 
+    /**
+     * A call over WIFI was disconnected because the WIFI signal was lost or became too degraded to
+     * continue the call.
+     */
+    public static final int WIFI_LOST = 59;
+
     //*********************************************************************************************
     // When adding a disconnect type:
-    // 1) Please assign the new type the next id value below.
-    // 2) Increment the next id value below to a new value.
-    // 3) Update MAXIMUM_VALID_VALUE to the new disconnect type.
-    // 4) Update toString() with the newly added disconnect type.
-    // 5) Update android.telecom.DisconnectCauseUtil with any mappings to a telecom.DisconnectCause.
-    //
-    // NextId: 59
+    // 1) Update toString() with the newly added disconnect type.
+    // 2) Update android.telecom.DisconnectCauseUtil with any mappings to a telecom.DisconnectCause.
     //*********************************************************************************************
 
-    /** Smallest valid value for call disconnect codes. */
-    public static final int MINIMUM_VALID_VALUE = NOT_DISCONNECTED;
-
-    /** Largest valid value for call disconnect codes. */
-    public static final int MAXIMUM_VALID_VALUE = IMEI_NOT_ACCEPTED;
-
     /** Private constructor to avoid class instantiation. */
     private DisconnectCause() {
         // Do nothing.
@@ -387,6 +382,8 @@
             return "DIALED_CALL_FORWARDING_WHILE_ROAMING";
         case IMEI_NOT_ACCEPTED:
             return "IMEI_NOT_ACCEPTED";
+        case WIFI_LOST:
+            return "WIFI_LOST";
         default:
             return "INVALID: " + cause;
         }
diff --git a/telephony/java/android/telephony/PhoneStateListener.java b/telephony/java/android/telephony/PhoneStateListener.java
index 32f487b..dd03305 100644
--- a/telephony/java/android/telephony/PhoneStateListener.java
+++ b/telephony/java/android/telephony/PhoneStateListener.java
@@ -20,17 +20,9 @@
 import android.os.Handler;
 import android.os.Looper;
 import android.os.Message;
-import android.telephony.SubscriptionManager;
-import android.telephony.CellLocation;
-import android.telephony.CellInfo;
-import android.telephony.VoLteServiceState;
-import android.telephony.Rlog;
-import android.telephony.ServiceState;
-import android.telephony.SignalStrength;
-import android.telephony.PreciseCallState;
-import android.telephony.PreciseDataConnectionState;
 
 import com.android.internal.telephony.IPhoneStateListener;
+
 import java.util.List;
 import java.lang.ref.WeakReference;
 
@@ -228,6 +220,38 @@
      */
     public static final int LISTEN_CARRIER_NETWORK_CHANGE                   = 0x00010000;
 
+    /**
+     *  Listen for changes to the sim voice activation state
+     *  @see TelephonyManager#SIM_ACTIVATION_STATE_ACTIVATING
+     *  @see TelephonyManager#SIM_ACTIVATION_STATE_ACTIVATED
+     *  @see TelephonyManager#SIM_ACTIVATION_STATE_DEACTIVATED
+     *  @see TelephonyManager#SIM_ACTIVATION_STATE_RESTRICTED
+     *  @see TelephonyManager#SIM_ACTIVATION_STATE_UNKNOWN
+     *  {@more}
+     *  Example: TelephonyManager#SIM_ACTIVATION_STATE_ACTIVATED indicates voice service has been
+     *  fully activated
+     *
+     *  @see #onVoiceActivationStateChanged
+     *  @hide
+     */
+    public static final int LISTEN_VOICE_ACTIVATION_STATE                   = 0x00020000;
+
+    /**
+     *  Listen for changes to the sim data activation state
+     *  @see TelephonyManager#SIM_ACTIVATION_STATE_ACTIVATING
+     *  @see TelephonyManager#SIM_ACTIVATION_STATE_ACTIVATED
+     *  @see TelephonyManager#SIM_ACTIVATION_STATE_DEACTIVATED
+     *  @see TelephonyManager#SIM_ACTIVATION_STATE_RESTRICTED
+     *  @see TelephonyManager#SIM_ACTIVATION_STATE_UNKNOWN
+     *  {@more}
+     *  Example: TelephonyManager#SIM_ACTIVATION_STATE_ACTIVATED indicates data service has been
+     *  fully activated
+     *
+     *  @see #onDataActivationStateChanged
+     *  @hide
+     */
+    public static final int LISTEN_DATA_ACTIVATION_STATE                   = 0x00040000;
+
      /*
      * Subscription used to listen to the phone state changes
      * @hide
@@ -327,6 +351,12 @@
                     case LISTEN_VOLTE_STATE:
                         PhoneStateListener.this.onVoLteServiceStateChanged((VoLteServiceState)msg.obj);
                         break;
+                    case LISTEN_VOICE_ACTIVATION_STATE:
+                        PhoneStateListener.this.onVoiceActivationStateChanged((int)msg.obj);
+                        break;
+                    case LISTEN_DATA_ACTIVATION_STATE:
+                        PhoneStateListener.this.onDataActivationStateChanged((int)msg.obj);
+                        break;
                     case LISTEN_OEM_HOOK_RAW_EVENT:
                         PhoneStateListener.this.onOemHookRawEvent((byte[])msg.obj);
                         break;
@@ -506,6 +536,24 @@
     }
 
     /**
+     * Callback invoked when the SIM voice activation state has changed
+     * @param state is the current SIM voice activation state
+     * @hide
+     */
+    public void onVoiceActivationStateChanged(int state) {
+
+    }
+
+    /**
+     * Callback invoked when the SIM data activation state has changed
+     * @param state is the current SIM data activation state
+     * @hide
+     */
+    public void onDataActivationStateChanged(int state) {
+
+    }
+
+    /**
      * Callback invoked when OEM hook raw event is received. Requires
      * the READ_PRIVILEGED_PHONE_STATE permission.
      * @param rawData is the byte array of the OEM hook raw data.
@@ -619,6 +667,14 @@
             send(LISTEN_VOLTE_STATE, 0, 0, lteState);
         }
 
+        public void onVoiceActivationStateChanged(int activationState) {
+            send(LISTEN_VOICE_ACTIVATION_STATE, 0, 0, activationState);
+        }
+
+        public void onDataActivationStateChanged(int activationState) {
+            send(LISTEN_DATA_ACTIVATION_STATE, 0, 0, activationState);
+        }
+
         public void onOemHookRawEvent(byte[] rawData) {
             send(LISTEN_OEM_HOOK_RAW_EVENT, 0, 0, rawData);
         }
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 913da82..c2c724f 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -819,37 +819,6 @@
     public static final String EVENT_DOWNGRADE_DATA_DISABLED =
             "android.telephony.event.EVENT_DOWNGRADE_DATA_DISABLED";
 
-    /**
-     * Response codes for sim activation. Activation completed successfully.
-     * @hide
-     */
-    @SystemApi
-    public static final int SIM_ACTIVATION_RESULT_COMPLETE = 0;
-    /**
-     * Response codes for sim activation. Activation not supported (device has no SIM).
-     * @hide
-     */
-    @SystemApi
-    public static final int SIM_ACTIVATION_RESULT_NOT_SUPPORTED = 1;
-    /**
-     * Response codes for sim activation. Activation is in progress.
-     * @hide
-     */
-    @SystemApi
-    public static final int SIM_ACTIVATION_RESULT_IN_PROGRESS = 2;
-    /**
-     * Response codes for sim activation. Activation failed to complete.
-     * @hide
-     */
-    @SystemApi
-    public static final int SIM_ACTIVATION_RESULT_FAILED = 3;
-    /**
-     * Response codes for sim activation. Activation canceled by user.
-     * @hide
-     */
-    @SystemApi
-    public static final int SIM_ACTIVATION_RESULT_CANCELED = 4;
-
     /* Visual voicemail protocols */
 
     /**
@@ -2844,6 +2813,148 @@
     }
 
     /**
+     * Initial SIM activation state, unknown. Not set by any carrier apps.
+     * @hide
+     */
+    public static final int SIM_ACTIVATION_STATE_UNKNOWN = 0;
+
+    /**
+     * indicate SIM is under activation procedure now.
+     * intermediate state followed by another state update with activation procedure result:
+     * @see #SIM_ACTIVATION_STATE_ACTIVATED
+     * @see #SIM_ACTIVATION_STATE_DEACTIVATED
+     * @see #SIM_ACTIVATION_STATE_RESTRICTED
+     * @hide
+     */
+    public static final int SIM_ACTIVATION_STATE_ACTIVATING = 1;
+
+    /**
+     * Indicate SIM has been successfully activated with full service
+     * @hide
+     */
+    public static final int SIM_ACTIVATION_STATE_ACTIVATED = 2;
+
+    /**
+     * Indicate SIM has been deactivated by the carrier so that service is not available
+     * and requires activation service to enable services.
+     * Carrier apps could be signalled to set activation state to deactivated if detected
+     * deactivated sim state and set it back to activated after successfully run activation service.
+     * @hide
+     */
+    public static final int SIM_ACTIVATION_STATE_DEACTIVATED = 3;
+
+    /**
+     * Restricted state indicate SIM has been activated but service are restricted.
+     * note this is currently available for data activation state. For example out of byte sim.
+     * @hide
+     */
+    public static final int SIM_ACTIVATION_STATE_RESTRICTED = 4;
+
+    /**
+     * Sets the voice activation state for the given subscriber.
+     *
+     * <p>Requires Permission:
+     *   {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
+     * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+     *
+     * @param subId The subscription id.
+     * @param activationState The voice activation state of the given subscriber.
+     * @see #SIM_ACTIVATION_STATE_UNKNOWN
+     * @see #SIM_ACTIVATION_STATE_ACTIVATING
+     * @see #SIM_ACTIVATION_STATE_ACTIVATED
+     * @see #SIM_ACTIVATION_STATE_DEACTIVATED
+     * @hide
+     */
+    public void setVoiceActivationState(int subId, int activationState) {
+        try {
+            ITelephony telephony = getITelephony();
+            if (telephony != null)
+                telephony.setVoiceActivationState(subId, activationState);
+        } catch (RemoteException ex) {
+        } catch (NullPointerException ex) {
+        }
+    }
+
+    /**
+     * Sets the data activation state for the given subscriber.
+     *
+     * <p>Requires Permission:
+     *   {@link android.Manifest.permission#MODIFY_PHONE_STATE}
+     * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+     *
+     * @param subId The subscription id.
+     * @param activationState The data activation state of the given subscriber.
+     * @see #SIM_ACTIVATION_STATE_UNKNOWN
+     * @see #SIM_ACTIVATION_STATE_ACTIVATING
+     * @see #SIM_ACTIVATION_STATE_ACTIVATED
+     * @see #SIM_ACTIVATION_STATE_DEACTIVATED
+     * @see #SIM_ACTIVATION_STATE_RESTRICTED
+     * @hide
+     */
+    public void setDataActivationState(int subId, int activationState) {
+        try {
+            ITelephony telephony = getITelephony();
+            if (telephony != null)
+                telephony.setDataActivationState(subId, activationState);
+        } catch (RemoteException ex) {
+        } catch (NullPointerException ex) {
+        }
+    }
+
+    /**
+     * Returns the voice activation state for the given subscriber.
+     *
+     * <p>Requires Permission:
+     *   {@link android.Manifest.permission#READ_PHONE_STATE}
+     *
+     * @param subId The subscription id.
+     *
+     * @return voiceActivationState for the given subscriber
+     * @see #SIM_ACTIVATION_STATE_UNKNOWN
+     * @see #SIM_ACTIVATION_STATE_ACTIVATING
+     * @see #SIM_ACTIVATION_STATE_ACTIVATED
+     * @see #SIM_ACTIVATION_STATE_DEACTIVATED
+     * @hide
+     */
+    public int getVoiceActivationState(int subId) {
+        try {
+            ITelephony telephony = getITelephony();
+            if (telephony != null)
+                return telephony.getVoiceActivationState(subId, getOpPackageName());
+        } catch (RemoteException ex) {
+        } catch (NullPointerException ex) {
+        }
+        return SIM_ACTIVATION_STATE_UNKNOWN;
+    }
+
+    /**
+     * Returns the data activation state for the given subscriber.
+     *
+     * <p>Requires Permission:
+     *   {@link android.Manifest.permission#READ_PHONE_STATE}
+     *
+     * @param subId The subscription id.
+     *
+     * @return dataActivationState for the given subscriber
+     * @see #SIM_ACTIVATION_STATE_UNKNOWN
+     * @see #SIM_ACTIVATION_STATE_ACTIVATING
+     * @see #SIM_ACTIVATION_STATE_ACTIVATED
+     * @see #SIM_ACTIVATION_STATE_DEACTIVATED
+     * @see #SIM_ACTIVATION_STATE_RESTRICTED
+     * @hide
+     */
+    public int getDataActivationState(int subId) {
+        try {
+            ITelephony telephony = getITelephony();
+            if (telephony != null)
+                return telephony.getDataActivationState(subId, getOpPackageName());
+        } catch (RemoteException ex) {
+        } catch (NullPointerException ex) {
+        }
+        return SIM_ACTIVATION_STATE_UNKNOWN;
+    }
+
+    /**
      * Returns the voice mail count. Return 0 if unavailable, -1 if there are unread voice messages
      * but the count is unknown.
      * <p>
@@ -5796,6 +5907,29 @@
     }
 
     /**
+     * Sets the per-account voicemail ringtone.
+     *
+     * <p>Requires that the calling app is the default dialer, or has carrier privileges, or has
+     * permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
+     *
+     * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
+     * voicemail ringtone.
+     * @param uri The URI for the ringtone to play when receiving a voicemail from a specific
+     * PhoneAccount.
+     * @see #hasCarrierPrivileges
+     */
+    public void setVoicemailRingtoneUri(PhoneAccountHandle phoneAccountHandle, Uri uri) {
+        try {
+            ITelephony service = getITelephony();
+            if (service != null) {
+                service.setVoicemailRingtoneUri(getOpPackageName(), phoneAccountHandle, uri);
+            }
+        } catch (RemoteException e) {
+            Log.e(TAG, "Error calling ITelephony#setVoicemailRingtoneUri", e);
+        }
+    }
+
+    /**
      * Returns whether vibration is set for voicemail notification in Phone settings.
      *
      * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
@@ -5815,6 +5949,31 @@
     }
 
     /**
+     * Sets the per-account preference whether vibration is enabled for voicemail notifications.
+     *
+     * <p>Requires that the calling app is the default dialer, or has carrier privileges, or has
+     * permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
+     *
+     * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
+     * voicemail vibration setting.
+     * @param enabled Whether to enable or disable vibration for voicemail notifications from a
+     * specific PhoneAccount.
+     * @see #hasCarrierPrivileges
+     */
+    public void setVoicemailVibrationEnabled(PhoneAccountHandle phoneAccountHandle,
+            boolean enabled) {
+        try {
+            ITelephony service = getITelephony();
+            if (service != null) {
+                service.setVoicemailVibrationEnabled(getOpPackageName(), phoneAccountHandle,
+                        enabled);
+            }
+        } catch (RemoteException e) {
+            Log.e(TAG, "Error calling ITelephony#isVoicemailVibrationEnabled", e);
+        }
+    }
+
+    /**
      * Return the application ID for the app type like {@link APPTYPE_CSIM}.
      *
      * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission
diff --git a/telephony/java/android/telephony/ims/ImsService.java b/telephony/java/android/telephony/ims/ImsService.java
new file mode 100644
index 0000000..0f865a8
--- /dev/null
+++ b/telephony/java/android/telephony/ims/ImsService.java
@@ -0,0 +1,430 @@
+/*
+ * 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.telephony.ims;
+
+import android.app.PendingIntent;
+import android.content.Intent;
+import android.os.IBinder;
+import android.os.Message;
+import android.os.RemoteException;
+import android.telephony.CarrierConfigManager;
+import android.telephony.ims.feature.ImsFeature;
+import android.telephony.ims.feature.MMTelFeature;
+import android.telephony.ims.feature.RcsFeature;
+import android.util.Log;
+import android.util.SparseArray;
+
+import com.android.ims.ImsCallProfile;
+import com.android.ims.internal.IImsCallSession;
+import com.android.ims.internal.IImsCallSessionListener;
+import com.android.ims.internal.IImsConfig;
+import com.android.ims.internal.IImsEcbm;
+import com.android.ims.internal.IImsFeatureStatusCallback;
+import com.android.ims.internal.IImsMultiEndpoint;
+import com.android.ims.internal.IImsRegistrationListener;
+import com.android.ims.internal.IImsServiceController;
+import com.android.ims.internal.IImsServiceFeatureListener;
+import com.android.ims.internal.IImsUt;
+import com.android.internal.annotations.VisibleForTesting;
+
+/**
+ * Main ImsService implementation, which binds via the Telephony ImsResolver. Services that extend
+ * ImsService must register the service in their AndroidManifest to be detected by the framework.
+ * First, the application must declare that they use the "android.permission.BIND_IMS_SERVICE"
+ * permission. Then, the ImsService definition in the manifest must follow the following format:
+ *
+ * ...
+ * <service android:name=".EgImsService"
+ *     android:permission="android.permission.BIND_IMS_SERVICE" >
+ *     <!-- Apps must declare which features they support as metadata. The different categories are
+ *     defined below. In this example, the RCS_FEATURE feature is supported. -->
+ *     <meta-data android:name="android.telephony.ims.RCS_FEATURE" android:value="true" />
+ *     <intent-filter>
+ *         <action android:name="android.telephony.ims.ImsService" />
+ *     </intent-filter>
+ * </service>
+ * ...
+ *
+ * The telephony framework will then bind to the ImsService you have defined in your manifest
+ * if you are either:
+ * 1) Defined as the default ImsService for the device in the device overlay using
+ *    "config_ims_package".
+ * 2) Defined as a Carrier Provided ImsService in the Carrier Configuration using
+ *    {@link CarrierConfigManager#KEY_CONFIG_IMS_PACKAGE_OVERRIDE_STRING}.
+ *
+ * The features that are currently supported in an ImsService are:
+ * - RCS_FEATURE: This ImsService implements the {@link RcsFeature} class.
+ * - MMTEL_FEATURE: This ImsService implements the {@link MMTelFeature} class.
+ * - EMERGENCY_MMTEL_FEATURE: This ImsService implements the {@link MMTelFeature} class and will be
+ *   available to place emergency calls at all times. This MUST be implemented by the default
+ *   ImsService provided in the device overlay.
+ *
+ * @hide
+ */
+public abstract class ImsService extends ImsServiceBase {
+
+    private static final String LOG_TAG = "ImsService";
+
+    /**
+     * The intent that must be defined as an intent-filter in the AndroidManifest of the ImsService.
+     */
+    public static final String SERVICE_INTERFACE = "android.telephony.ims.ImsService";
+
+    // A map of slot Id -> Set of features corresponding to that slot.
+    private final SparseArray<SparseArray<ImsFeature>> mFeatures = new SparseArray<>();
+
+    // Implements all supported features as a flat interface.
+    protected final IBinder mImsServiceController = new IImsServiceController.Stub() {
+
+        @Override
+        public void createImsFeature(int slotId, int feature, IImsFeatureStatusCallback c)
+                throws RemoteException {
+            synchronized (mFeatures) {
+                onCreateImsFeatureInternal(slotId, feature, c);
+            }
+        }
+
+        @Override
+        public void removeImsFeature(int slotId, int feature) throws RemoteException {
+            synchronized (mFeatures) {
+                onRemoveImsFeatureInternal(slotId, feature);
+            }
+        }
+
+        @Override
+        public int startSession(int slotId, int featureType, PendingIntent incomingCallIntent,
+                IImsRegistrationListener listener) throws RemoteException {
+            synchronized (mFeatures) {
+                MMTelFeature feature = resolveMMTelFeature(slotId, featureType);
+                if (feature != null) {
+                    return feature.startSession(incomingCallIntent, listener);
+                }
+            }
+            return 0;
+        }
+
+        @Override
+        public void endSession(int slotId, int featureType, int sessionId) throws RemoteException {
+            synchronized (mFeatures) {
+                MMTelFeature feature = resolveMMTelFeature(slotId, featureType);
+                if (feature != null) {
+                    feature.endSession(sessionId);
+                }
+            }
+        }
+
+        @Override
+        public boolean isConnected(int slotId, int featureType, int sessionId, int callSessionType,
+                int callType) throws RemoteException {
+            synchronized (mFeatures) {
+                MMTelFeature feature = resolveMMTelFeature(slotId, featureType);
+                if (feature != null) {
+                    return feature.isConnected(sessionId, callSessionType, callType);
+                }
+            }
+            return false;
+        }
+
+        @Override
+        public boolean isOpened(int slotId, int featureType, int sessionId) throws RemoteException {
+            synchronized (mFeatures) {
+                MMTelFeature feature = resolveMMTelFeature(slotId, featureType);
+                if (feature != null) {
+                    return feature.isOpened(sessionId);
+                }
+            }
+            return false;
+        }
+
+        @Override
+        public int getFeatureStatus(int slotId, int featureType) throws RemoteException {
+            int status = ImsFeature.STATE_NOT_AVAILABLE;
+            synchronized (mFeatures) {
+                SparseArray<ImsFeature> featureMap = mFeatures.get(slotId);
+                if (featureMap != null) {
+                    ImsFeature feature = getImsFeatureFromType(featureMap, featureType);
+                    if (feature != null) {
+                        status = feature.getFeatureState();
+                    }
+                }
+            }
+            return status;
+        }
+
+        @Override
+        public void addRegistrationListener(int slotId, int featureType, int sessionId,
+                IImsRegistrationListener listener) throws RemoteException {
+            synchronized (mFeatures) {
+                MMTelFeature feature = resolveMMTelFeature(slotId, featureType);
+                if (feature != null) {
+                    feature.addRegistrationListener(sessionId, listener);
+                }
+            }
+        }
+
+        @Override
+        public void removeRegistrationListener(int slotId, int featureType, int sessionId,
+                IImsRegistrationListener listener) throws RemoteException {
+            synchronized (mFeatures) {
+                MMTelFeature feature = resolveMMTelFeature(slotId, featureType);
+                if (feature != null) {
+                    feature.removeRegistrationListener(sessionId, listener);
+                }
+            }
+        }
+
+        @Override
+        public ImsCallProfile createCallProfile(int slotId, int featureType, int sessionId,
+                int callSessionType, int callType) throws RemoteException {
+            synchronized (mFeatures) {
+                MMTelFeature feature = resolveMMTelFeature(slotId, featureType);
+                if (feature != null) {
+                    return feature.createCallProfile(sessionId, callSessionType,  callType);
+                }
+            }
+            return null;
+        }
+
+        @Override
+        public IImsCallSession createCallSession(int slotId, int featureType, int sessionId,
+                ImsCallProfile profile, IImsCallSessionListener listener) throws RemoteException {
+            synchronized (mFeatures) {
+                MMTelFeature feature = resolveMMTelFeature(slotId, featureType);
+                if (feature != null) {
+                    return feature.createCallSession(sessionId, profile, listener);
+                }
+            }
+            return null;
+        }
+
+        @Override
+        public IImsCallSession getPendingCallSession(int slotId, int featureType, int sessionId,
+                String callId) throws RemoteException {
+            synchronized (mFeatures) {
+                MMTelFeature feature = resolveMMTelFeature(slotId, featureType);
+                if (feature != null) {
+                    return feature.getPendingCallSession(sessionId, callId);
+                }
+            }
+            return null;
+        }
+
+        @Override
+        public IImsUt getUtInterface(int slotId, int featureType, int sessionId)
+                throws RemoteException {
+            synchronized (mFeatures) {
+                MMTelFeature feature = resolveMMTelFeature(slotId, featureType);
+                if (feature != null) {
+                    return feature.getUtInterface(sessionId);
+                }
+            }
+            return null;
+        }
+
+        @Override
+        public IImsConfig getConfigInterface(int slotId, int featureType, int sessionId)
+                throws RemoteException {
+            synchronized (mFeatures) {
+                MMTelFeature feature = resolveMMTelFeature(slotId, featureType);
+                if (feature != null) {
+                    return feature.getConfigInterface(sessionId);
+                }
+            }
+            return null;
+        }
+
+        @Override
+        public void turnOnIms(int slotId, int featureType, int sessionId) throws RemoteException {
+            synchronized (mFeatures) {
+                MMTelFeature feature = resolveMMTelFeature(slotId, featureType);
+                if (feature != null) {
+                    feature.turnOnIms(sessionId);
+                }
+            }
+        }
+
+        @Override
+        public void turnOffIms(int slotId, int featureType, int sessionId) throws RemoteException {
+            synchronized (mFeatures) {
+                MMTelFeature feature = resolveMMTelFeature(slotId, featureType);
+                if (feature != null) {
+                    feature.turnOffIms(sessionId);
+                }
+            }
+        }
+
+        @Override
+        public IImsEcbm getEcbmInterface(int slotId, int featureType, int sessionId)
+                throws RemoteException {
+            synchronized (mFeatures) {
+                MMTelFeature feature = resolveMMTelFeature(slotId, featureType);
+                if (feature != null) {
+                    return feature.getEcbmInterface(sessionId);
+                }
+            }
+            return null;
+        }
+
+        @Override
+        public void setUiTTYMode(int slotId, int featureType, int sessionId, int uiTtyMode,
+                Message onComplete) throws RemoteException {
+            synchronized (mFeatures) {
+                MMTelFeature feature = resolveMMTelFeature(slotId, featureType);
+                if (feature != null) {
+                    feature.setUiTTYMode(sessionId, uiTtyMode, onComplete);
+                }
+            }
+        }
+
+        @Override
+        public IImsMultiEndpoint getMultiEndpointInterface(int slotId, int featureType,
+                int sessionId) throws RemoteException {
+            synchronized (mFeatures) {
+                MMTelFeature feature = resolveMMTelFeature(slotId, featureType);
+                if (feature != null) {
+                    return feature.getMultiEndpointInterface(sessionId);
+                }
+            }
+            return null;
+        }
+
+    };
+
+    @Override
+    public IBinder onBind(Intent intent) {
+        if(SERVICE_INTERFACE.equals(intent.getAction())) {
+            return mImsServiceController;
+        }
+        return null;
+    }
+
+    /**
+     * Called from the ImsResolver to create the requested ImsFeature, as defined by the slot and
+     * featureType
+     * @param slotId An integer representing which SIM slot the ImsFeature is assigned to.
+     * @param featureType An integer representing the type of ImsFeature being created. This is
+     * defined in {@link ImsFeature}.
+     */
+    // Be sure to lock on mFeatures before accessing this method
+    private void onCreateImsFeatureInternal(int slotId, int featureType,
+            IImsFeatureStatusCallback c) {
+        SparseArray<ImsFeature> featureMap = mFeatures.get(slotId);
+        if (featureMap == null) {
+            featureMap = new SparseArray<>();
+            mFeatures.put(slotId, featureMap);
+        }
+        ImsFeature f = makeImsFeature(slotId, featureType);
+        if (f != null) {
+            f.setImsFeatureStatusCallback(c);
+            featureMap.put(featureType, f);
+        }
+
+    }
+    /**
+     * Called from the ImsResolver to remove an existing ImsFeature, as defined by the slot and
+     * featureType.
+     * @param slotId An integer representing which SIM slot the ImsFeature is assigned to.
+     * @param featureType An integer representing the type of ImsFeature being removed. This is
+     * defined in {@link ImsFeature}.
+     */
+    // Be sure to lock on mFeatures before accessing this method
+    private void onRemoveImsFeatureInternal(int slotId, int featureType) {
+        SparseArray<ImsFeature> featureMap = mFeatures.get(slotId);
+        if (featureMap == null) {
+            return;
+        }
+
+        ImsFeature featureToRemove = getImsFeatureFromType(featureMap, featureType);
+        if (featureToRemove != null) {
+            featureMap.remove(featureType);
+            featureToRemove.notifyFeatureRemoved(slotId);
+            // Remove reference to Binder
+            featureToRemove.setImsFeatureStatusCallback(null);
+        }
+    }
+
+    // Be sure to lock on mFeatures before accessing this method
+    private MMTelFeature resolveMMTelFeature(int slotId, int featureType) {
+        SparseArray<ImsFeature> features = getImsFeatureMap(slotId);
+        MMTelFeature feature = null;
+        if (features != null) {
+            feature = resolveImsFeature(features, featureType, MMTelFeature.class);
+        }
+        return feature;
+    }
+
+    // Be sure to lock on mFeatures before accessing this method
+    private <T extends ImsFeature> T resolveImsFeature(SparseArray<ImsFeature> set, int featureType,
+            Class<T> className) {
+        ImsFeature feature = getImsFeatureFromType(set, featureType);
+        if (feature == null) {
+            return null;
+        }
+        try {
+            return className.cast(feature);
+        } catch (ClassCastException e)
+        {
+            Log.e(LOG_TAG, "Can not cast ImsFeature! Exception: " + e.getMessage());
+        }
+        return null;
+    }
+
+    @VisibleForTesting
+    // Be sure to lock on mFeatures before accessing this method
+    public SparseArray<ImsFeature> getImsFeatureMap(int slotId) {
+        return mFeatures.get(slotId);
+    }
+
+    @VisibleForTesting
+    // Be sure to lock on mFeatures before accessing this method
+    public ImsFeature getImsFeatureFromType(SparseArray<ImsFeature> set, int featureType) {
+        return set.get(featureType);
+    }
+
+    private ImsFeature makeImsFeature(int slotId, int feature) {
+        switch (feature) {
+            case ImsFeature.EMERGENCY_MMTEL: {
+                return onCreateEmergencyMMTelImsFeature(slotId);
+            }
+            case ImsFeature.MMTEL: {
+                return onCreateMMTelImsFeature(slotId);
+            }
+            case ImsFeature.RCS: {
+                return onCreateRcsFeature(slotId);
+            }
+        }
+        // Tried to create feature that is not defined.
+        return null;
+    }
+
+    /**
+     * @return An implementation of MMTelFeature that will be used by the system for MMTel
+     * functionality. Must be able to handle emergency calls at any time as well.
+     */
+    public abstract MMTelFeature onCreateEmergencyMMTelImsFeature(int slotId);
+
+    /**
+     * @return An implementation of MMTelFeature that will be used by the system for MMTel
+     * functionality.
+     */
+    public abstract MMTelFeature onCreateMMTelImsFeature(int slotId);
+
+    /**
+     * @return An implementation of RcsFeature that will be used by the system for RCS.
+     */
+    public abstract RcsFeature onCreateRcsFeature(int slotId);
+}
diff --git a/telephony/java/android/telephony/ims/ImsServiceBase.java b/telephony/java/android/telephony/ims/ImsServiceBase.java
index 0b50eca..0878db8 100644
--- a/telephony/java/android/telephony/ims/ImsServiceBase.java
+++ b/telephony/java/android/telephony/ims/ImsServiceBase.java
@@ -22,7 +22,9 @@
 import android.os.IBinder;
 
 /**
- * Base ImsService Implementation, which is used by the ImsResolver to bind.
+ * Base ImsService Implementation, which is used by the ImsResolver to bind. ImsServices that do not
+ * need to provide an ImsService implementation but still wish to be managed by the ImsResolver
+ * lifecycle may implement this class directly.
  * @hide
  */
 @SystemApi
diff --git a/telephony/java/android/telephony/ims/ImsServiceProxy.java b/telephony/java/android/telephony/ims/ImsServiceProxy.java
new file mode 100644
index 0000000..b2cdba2
--- /dev/null
+++ b/telephony/java/android/telephony/ims/ImsServiceProxy.java
@@ -0,0 +1,316 @@
+/*
+ * 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.telephony.ims;
+
+import android.app.PendingIntent;
+import android.os.IBinder;
+import android.os.Message;
+import android.os.RemoteException;
+import android.telephony.ims.feature.IRcsFeature;
+import android.telephony.ims.feature.ImsFeature;
+import android.util.Log;
+
+import com.android.ims.ImsCallProfile;
+import com.android.ims.internal.IImsCallSession;
+import com.android.ims.internal.IImsCallSessionListener;
+import com.android.ims.internal.IImsConfig;
+import com.android.ims.internal.IImsEcbm;
+import com.android.ims.internal.IImsMultiEndpoint;
+import com.android.ims.internal.IImsRegistrationListener;
+import com.android.ims.internal.IImsServiceController;
+import com.android.ims.internal.IImsServiceFeatureListener;
+import com.android.ims.internal.IImsUt;
+
+/**
+ * A container of the IImsServiceController binder, which implements all of the ImsFeatures that
+ * the platform currently supports: MMTel and RCS.
+ * @hide
+ */
+
+public class ImsServiceProxy extends ImsServiceProxyCompat implements IRcsFeature {
+
+    protected String LOG_TAG = "ImsServiceProxy";
+    private final int mSupportedFeature;
+
+    // Start by assuming the proxy is available for usage.
+    private boolean mIsAvailable = true;
+    // ImsFeature Status from the ImsService. Cached.
+    private Integer mFeatureStatusCached = null;
+    private ImsServiceProxy.INotifyStatusChanged mStatusCallback;
+    private final Object mLock = new Object();
+
+    public interface INotifyStatusChanged {
+        void notifyStatusChanged();
+    }
+
+    private final IImsServiceFeatureListener mListenerBinder =
+            new IImsServiceFeatureListener.Stub() {
+
+        @Override
+        public void imsFeatureCreated(int slotId, int feature) throws RemoteException {
+            // The feature has been re-enabled. This may happen when the service crashes.
+            synchronized (mLock) {
+                if (!mIsAvailable && mSlotId == slotId && feature == mSupportedFeature) {
+                    Log.i(LOG_TAG, "Feature enabled on slotId: " + slotId + " for feature: " +
+                            feature);
+                    mIsAvailable = true;
+                }
+            }
+        }
+
+        @Override
+        public void imsFeatureRemoved(int slotId, int feature) throws RemoteException {
+            synchronized (mLock) {
+                if (mIsAvailable && mSlotId == slotId && feature == mSupportedFeature) {
+                    Log.i(LOG_TAG, "Feature disabled on slotId: " + slotId + " for feature: " +
+                            feature);
+                    mIsAvailable = false;
+                }
+            }
+        }
+
+        @Override
+        public void imsStatusChanged(int slotId, int feature, int status) throws RemoteException {
+            synchronized (mLock) {
+                Log.i(LOG_TAG, "imsStatusChanged: slot: " + slotId + " feature: " + feature +
+                        " status: " + status);
+                if (mSlotId == slotId && feature == mSupportedFeature) {
+                    mFeatureStatusCached = status;
+                }
+            }
+            if (mStatusCallback != null) {
+                mStatusCallback.notifyStatusChanged();
+            }
+        }
+    };
+
+    public ImsServiceProxy(int slotId, IBinder binder, int featureType) {
+        super(slotId, binder);
+        mSupportedFeature = featureType;
+    }
+
+    public ImsServiceProxy(int slotId, int featureType) {
+        super(slotId, null /*IBinder*/);
+        mSupportedFeature = featureType;
+    }
+
+    public IImsServiceFeatureListener getListener() {
+        return mListenerBinder;
+    }
+
+    public void setBinder(IBinder binder) {
+        mBinder = binder;
+    }
+
+    @Override
+    public int startSession(PendingIntent incomingCallIntent, IImsRegistrationListener listener)
+            throws RemoteException {
+        synchronized (mLock) {
+            checkBinderConnection();
+            return getServiceInterface(mBinder).startSession(mSlotId, mSupportedFeature,
+                    incomingCallIntent, listener);
+        }
+    }
+
+    @Override
+    public void endSession(int sessionId) throws RemoteException {
+        synchronized (mLock) {
+            checkBinderConnection();
+            getServiceInterface(mBinder).endSession(mSlotId, mSupportedFeature, sessionId);
+        }
+    }
+
+    @Override
+    public boolean isConnected(int sessionId, int callServiceType, int callType)
+            throws RemoteException {
+        synchronized (mLock) {
+            checkBinderConnection();
+            return getServiceInterface(mBinder).isConnected(mSlotId, mSupportedFeature, sessionId,
+                    callServiceType, callType);
+        }
+    }
+
+    @Override
+    public boolean isOpened(int sessionId) throws RemoteException {
+        synchronized (mLock) {
+            checkBinderConnection();
+            return getServiceInterface(mBinder).isOpened(mSlotId, mSupportedFeature, sessionId);
+        }
+    }
+
+    @Override
+    public void addRegistrationListener(int sessionId, IImsRegistrationListener listener)
+    throws RemoteException {
+        synchronized (mLock) {
+            checkBinderConnection();
+            getServiceInterface(mBinder).addRegistrationListener(mSlotId, mSupportedFeature,
+                    sessionId, listener);
+        }
+    }
+
+    @Override
+    public void removeRegistrationListener(int sessionId, IImsRegistrationListener listener)
+            throws RemoteException {
+        synchronized (mLock) {
+            checkBinderConnection();
+            getServiceInterface(mBinder).removeRegistrationListener(mSlotId, mSupportedFeature,
+                    sessionId, listener);
+        }
+    }
+
+    @Override
+    public ImsCallProfile createCallProfile(int sessionId, int callServiceType, int callType)
+            throws RemoteException {
+        synchronized (mLock) {
+            checkBinderConnection();
+            return getServiceInterface(mBinder).createCallProfile(mSlotId, mSupportedFeature,
+                    sessionId, callServiceType, callType);
+        }
+    }
+
+    @Override
+    public IImsCallSession createCallSession(int sessionId, ImsCallProfile profile,
+            IImsCallSessionListener listener) throws RemoteException {
+        synchronized (mLock) {
+            checkBinderConnection();
+            return getServiceInterface(mBinder).createCallSession(mSlotId, mSupportedFeature,
+                    sessionId, profile, listener);
+        }
+    }
+
+    @Override
+    public IImsCallSession getPendingCallSession(int sessionId, String callId)
+            throws RemoteException {
+        synchronized (mLock) {
+            checkBinderConnection();
+            return getServiceInterface(mBinder).getPendingCallSession(mSlotId, mSupportedFeature,
+                    sessionId, callId);
+        }
+    }
+
+    @Override
+    public IImsUt getUtInterface(int sessionId) throws RemoteException {
+        synchronized (mLock) {
+            checkBinderConnection();
+            return getServiceInterface(mBinder).getUtInterface(mSlotId, mSupportedFeature,
+                    sessionId);
+        }
+    }
+
+    @Override
+    public IImsConfig getConfigInterface(int sessionId) throws RemoteException {
+        synchronized (mLock) {
+            checkBinderConnection();
+            return getServiceInterface(mBinder).getConfigInterface(mSlotId, mSupportedFeature,
+                    sessionId);
+        }
+    }
+
+    @Override
+    public void turnOnIms(int sessionId) throws RemoteException {
+        synchronized (mLock) {
+            checkBinderConnection();
+            getServiceInterface(mBinder).turnOnIms(mSlotId, mSupportedFeature, sessionId);
+        }
+    }
+
+    @Override
+    public void turnOffIms(int sessionId) throws RemoteException {
+        synchronized (mLock) {
+            checkBinderConnection();
+            getServiceInterface(mBinder).turnOffIms(mSlotId, mSupportedFeature, sessionId);
+        }
+    }
+
+    @Override
+    public IImsEcbm getEcbmInterface(int sessionId) throws RemoteException {
+        synchronized (mLock) {
+            checkBinderConnection();
+            return getServiceInterface(mBinder).getEcbmInterface(mSlotId, mSupportedFeature,
+                    sessionId);
+        }
+    }
+
+    @Override
+    public void setUiTTYMode(int sessionId, int uiTtyMode, Message onComplete)
+            throws RemoteException {
+        synchronized (mLock) {
+            checkBinderConnection();
+            getServiceInterface(mBinder).setUiTTYMode(mSlotId, mSupportedFeature, sessionId,
+                    uiTtyMode, onComplete);
+        }
+    }
+
+    @Override
+    public IImsMultiEndpoint getMultiEndpointInterface(int sessionId) throws RemoteException {
+        synchronized (mLock) {
+            checkBinderConnection();
+            return getServiceInterface(mBinder).getMultiEndpointInterface(mSlotId,
+                    mSupportedFeature, sessionId);
+        }
+    }
+
+    @Override
+    public int getFeatureStatus() {
+        synchronized (mLock) {
+            if (mFeatureStatusCached != null) {
+                return mFeatureStatusCached;
+            }
+        }
+        // Don't synchronize on Binder call.
+        Integer status = retrieveFeatureStatus();
+        synchronized (mLock) {
+            if (status == null) {
+                return ImsFeature.STATE_NOT_AVAILABLE;
+            }
+            // Cache only non-null value for feature status.
+            mFeatureStatusCached = status;
+        }
+        return status;
+    }
+
+    /**
+     * Internal method used to retrieve the feature status from the corresponding ImsService.
+     */
+    private Integer retrieveFeatureStatus() {
+        if (mBinder != null) {
+            try {
+                return getServiceInterface(mBinder).getFeatureStatus(mSlotId, mSupportedFeature);
+            } catch (RemoteException e) {
+                // Status check failed, don't update cache
+            }
+        }
+        return null;
+    }
+
+    /**
+     * @param c Callback that will fire when the feature status has changed.
+     */
+    public void setStatusCallback(INotifyStatusChanged c) {
+        mStatusCallback = c;
+    }
+
+    @Override
+    public boolean isBinderAlive() {
+        return mIsAvailable && getFeatureStatus() == ImsFeature.STATE_READY && mBinder != null &&
+                mBinder.isBinderAlive();
+    }
+
+    private IImsServiceController getServiceInterface(IBinder b) {
+        return IImsServiceController.Stub.asInterface(b);
+    }
+}
diff --git a/telephony/java/android/telephony/ims/ImsServiceProxyCompat.java b/telephony/java/android/telephony/ims/ImsServiceProxyCompat.java
new file mode 100644
index 0000000..ff53858
--- /dev/null
+++ b/telephony/java/android/telephony/ims/ImsServiceProxyCompat.java
@@ -0,0 +1,182 @@
+/*
+ * 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.telephony.ims;
+
+import android.app.PendingIntent;
+import android.os.IBinder;
+import android.os.Message;
+import android.os.RemoteException;
+import android.telephony.ims.feature.IMMTelFeature;
+import android.telephony.ims.feature.ImsFeature;
+
+import com.android.ims.ImsCallProfile;
+import com.android.ims.internal.IImsCallSession;
+import com.android.ims.internal.IImsCallSessionListener;
+import com.android.ims.internal.IImsConfig;
+import com.android.ims.internal.IImsEcbm;
+import com.android.ims.internal.IImsMultiEndpoint;
+import com.android.ims.internal.IImsRegistrationListener;
+import com.android.ims.internal.IImsService;
+import com.android.ims.internal.IImsUt;
+
+/**
+ * Compatibility class that implements the new ImsService IMMTelFeature interface, but
+ * uses the old IImsService interface to support older devices that implement the deprecated
+ * opt/net/ims interface.
+ * @hide
+ */
+
+public class ImsServiceProxyCompat implements IMMTelFeature {
+
+    protected final int mSlotId;
+    protected IBinder mBinder;
+
+    public ImsServiceProxyCompat(int slotId, IBinder binder) {
+        mSlotId = slotId;
+        mBinder = binder;
+    }
+
+    @Override
+    public int startSession(PendingIntent incomingCallIntent, IImsRegistrationListener listener)
+            throws RemoteException {
+        checkBinderConnection();
+        return getServiceInterface(mBinder).open(mSlotId, ImsFeature.MMTEL, incomingCallIntent,
+                listener);
+    }
+
+    @Override
+    public void endSession(int sessionId) throws RemoteException {
+        checkBinderConnection();
+        getServiceInterface(mBinder).close(sessionId);
+    }
+
+    @Override
+    public boolean isConnected(int sessionId, int callServiceType, int callType)
+            throws RemoteException {
+        checkBinderConnection();
+        return getServiceInterface(mBinder).isConnected(sessionId,  callServiceType, callType);
+    }
+
+    @Override
+    public boolean isOpened(int sessionId) throws RemoteException {
+        checkBinderConnection();
+        return getServiceInterface(mBinder).isOpened(sessionId);
+    }
+
+    @Override
+    public void addRegistrationListener(int sessionId, IImsRegistrationListener listener)
+            throws RemoteException {
+        checkBinderConnection();
+        getServiceInterface(mBinder).addRegistrationListener(mSlotId, ImsFeature.MMTEL, listener);
+    }
+
+    @Override
+    public void removeRegistrationListener(int sessionId, IImsRegistrationListener listener)
+            throws RemoteException {
+        checkBinderConnection();
+        // Not Implemented in old ImsService. If the registration listener becomes invalid, the
+        // ImsService will remove.
+    }
+
+    @Override
+    public ImsCallProfile createCallProfile(int sessionId, int callServiceType, int callType)
+            throws RemoteException {
+        checkBinderConnection();
+        return getServiceInterface(mBinder).createCallProfile(sessionId, callServiceType, callType);
+    }
+
+    @Override
+    public IImsCallSession createCallSession(int sessionId, ImsCallProfile profile,
+            IImsCallSessionListener listener) throws RemoteException {
+        checkBinderConnection();
+        return getServiceInterface(mBinder).createCallSession(sessionId, profile, listener);
+    }
+
+    @Override
+    public IImsCallSession getPendingCallSession(int sessionId, String callId)
+            throws RemoteException {
+        checkBinderConnection();
+        return getServiceInterface(mBinder).getPendingCallSession(sessionId, callId);
+    }
+
+    @Override
+    public IImsUt getUtInterface(int sessionId) throws RemoteException {
+        checkBinderConnection();
+        return getServiceInterface(mBinder).getUtInterface(sessionId);
+    }
+
+    @Override
+    public IImsConfig getConfigInterface(int sessionId) throws RemoteException {
+        checkBinderConnection();
+        return getServiceInterface(mBinder).getConfigInterface(mSlotId);
+    }
+
+    @Override
+    public void turnOnIms(int sessionId) throws RemoteException {
+        checkBinderConnection();
+        getServiceInterface(mBinder).turnOnIms(mSlotId);
+    }
+
+    @Override
+    public void turnOffIms(int sessionId) throws RemoteException {
+        checkBinderConnection();
+        getServiceInterface(mBinder).turnOffIms(mSlotId);
+    }
+
+    @Override
+    public IImsEcbm getEcbmInterface(int sessionId) throws RemoteException {
+        checkBinderConnection();
+        return getServiceInterface(mBinder).getEcbmInterface(sessionId);
+    }
+
+    @Override
+    public void setUiTTYMode(int sessionId, int uiTtyMode, Message onComplete)
+            throws RemoteException {
+        checkBinderConnection();
+        getServiceInterface(mBinder).setUiTTYMode(sessionId, uiTtyMode, onComplete);
+    }
+
+    @Override
+    public IImsMultiEndpoint getMultiEndpointInterface(int sessionId) throws RemoteException {
+        checkBinderConnection();
+        return getServiceInterface(mBinder).getMultiEndpointInterface(sessionId);
+    }
+
+    /**
+     * Base implementation, always returns READY for compatibility with old ImsService.
+     */
+    public int getFeatureStatus() {
+        return ImsFeature.STATE_READY;
+    }
+
+    /**
+     * @return false if the binder connection is no longer alive.
+     */
+    public boolean isBinderAlive() {
+        return mBinder != null && mBinder.isBinderAlive();
+    }
+
+    private IImsService getServiceInterface(IBinder b) {
+        return IImsService.Stub.asInterface(b);
+    }
+
+    protected void checkBinderConnection() throws RemoteException {
+        if (!isBinderAlive()) {
+            throw new RemoteException("ImsServiceProxy is not available for that feature.");
+        }
+    }
+}
diff --git a/telephony/java/android/telephony/ims/feature/IMMTelFeature.java b/telephony/java/android/telephony/ims/feature/IMMTelFeature.java
new file mode 100644
index 0000000..e180843
--- /dev/null
+++ b/telephony/java/android/telephony/ims/feature/IMMTelFeature.java
@@ -0,0 +1,192 @@
+/*
+ * 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.telephony.ims.feature;
+
+import android.app.PendingIntent;
+import android.os.Message;
+import android.os.RemoteException;
+
+import com.android.ims.ImsCallProfile;
+import com.android.ims.internal.IImsCallSession;
+import com.android.ims.internal.IImsCallSessionListener;
+import com.android.ims.internal.IImsConfig;
+import com.android.ims.internal.IImsEcbm;
+import com.android.ims.internal.IImsMultiEndpoint;
+import com.android.ims.internal.IImsRegistrationListener;
+import com.android.ims.internal.IImsUt;
+
+/**
+ * MMTel interface for an ImsService. When updating this interface, ensure that base implementations
+ * of your changes are also present in MMTelFeature for compatibility with older versions of the
+ * MMTel feature.
+ * @hide
+ */
+
+public interface IMMTelFeature {
+
+    /**
+     * Notifies the MMTel feature that you would like to start a session. This should always be
+     * done before making/receiving IMS calls. The IMS service will register the device to the
+     * operator's network with the credentials (from ISIM) periodically in order to receive calls
+     * from the operator's network. When the IMS service receives a new call, it will send out an
+     * intent with the provided action string. The intent contains a call ID extra
+     * {@link IImsCallSession#getCallId} and it can be used to take a call.
+     *
+     * @param incomingCallIntent When an incoming call is received, the IMS service will call
+     * {@link PendingIntent#send} to send back the intent to the caller with
+     * {@link #INCOMING_CALL_RESULT_CODE} as the result code and the intent to fill in the call ID;
+     * It cannot be null.
+     * @param listener To listen to IMS registration events; It cannot be null
+     * @return an integer (greater than 0) representing the session id associated with the session
+     * that has been started.
+     */
+    int startSession(PendingIntent incomingCallIntent, IImsRegistrationListener listener)
+            throws RemoteException;
+
+    /**
+     * End a previously started session using the associated sessionId.
+     * @param sessionId an integer (greater than 0) representing the ongoing session. See
+     * {@link #startSession}.
+     */
+    void endSession(int sessionId) throws RemoteException;
+
+    /**
+     * Checks if the IMS service has successfully registered to the IMS network with the specified
+     * service & call type.
+     *
+     * @param sessionId a session id which is obtained from {@link #startSession}
+     * @param callServiceType a service type that is specified in {@link ImsCallProfile}
+     *        {@link ImsCallProfile#SERVICE_TYPE_NORMAL}
+     *        {@link ImsCallProfile#SERVICE_TYPE_EMERGENCY}
+     * @param callType a call type that is specified in {@link ImsCallProfile}
+     *        {@link ImsCallProfile#CALL_TYPE_VOICE_N_VIDEO}
+     *        {@link ImsCallProfile#CALL_TYPE_VOICE}
+     *        {@link ImsCallProfile#CALL_TYPE_VT}
+     *        {@link ImsCallProfile#CALL_TYPE_VS}
+     * @return true if the specified service id is connected to the IMS network; false otherwise
+     * @throws RemoteException
+     */
+    boolean isConnected(int sessionId, int callServiceType, int callType) throws RemoteException;
+
+    /**
+     * Checks if the specified IMS service is opened.
+     *
+     * @param sessionId a service id which is obtained from {@link #startSession}
+     * @return true if the specified service id is opened; false otherwise
+     */
+    boolean isOpened(int sessionId) throws RemoteException;
+
+    /**
+     * Add a new registration listener for the client associated with the session Id.
+     * @param sessionId a session id which is obtained from {@link #startSession}
+     * @param listener An implementation of IImsRegistrationListener.
+     */
+    void addRegistrationListener(int sessionId, IImsRegistrationListener listener)
+            throws RemoteException;
+
+    /**
+     * Remove a previously registered listener using {@link #addRegistrationListener} for the client
+     * associated with the session Id.
+     * @param sessionId a session id which is obtained from {@link #startSession}
+     * @param listener A previously registered IImsRegistrationListener
+     */
+    void removeRegistrationListener(int sessionId, IImsRegistrationListener listener)
+            throws RemoteException;
+
+    /**
+     * Creates a {@link ImsCallProfile} from the service capabilities & IMS registration state.
+     *
+     * @param sessionId a session id which is obtained from {@link #startSession}
+     * @param callServiceType a service type that is specified in {@link ImsCallProfile}
+     *        {@link ImsCallProfile#SERVICE_TYPE_NONE}
+     *        {@link ImsCallProfile#SERVICE_TYPE_NORMAL}
+     *        {@link ImsCallProfile#SERVICE_TYPE_EMERGENCY}
+     * @param callType a call type that is specified in {@link ImsCallProfile}
+     *        {@link ImsCallProfile#CALL_TYPE_VOICE}
+     *        {@link ImsCallProfile#CALL_TYPE_VT}
+     *        {@link ImsCallProfile#CALL_TYPE_VT_TX}
+     *        {@link ImsCallProfile#CALL_TYPE_VT_RX}
+     *        {@link ImsCallProfile#CALL_TYPE_VT_NODIR}
+     *        {@link ImsCallProfile#CALL_TYPE_VS}
+     *        {@link ImsCallProfile#CALL_TYPE_VS_TX}
+     *        {@link ImsCallProfile#CALL_TYPE_VS_RX}
+     * @return a {@link ImsCallProfile} object
+     */
+    ImsCallProfile createCallProfile(int sessionId, int callServiceType, int callType)
+            throws RemoteException;
+
+    /**
+     * Creates a {@link ImsCallSession} with the specified call profile.
+     * Use other methods, if applicable, instead of interacting with
+     * {@link ImsCallSession} directly.
+     *
+     * @param sessionId a session id which is obtained from {@link #startSession}
+     * @param profile a call profile to make the call
+     * @param listener An implementation of IImsCallSessionListener.
+     */
+    IImsCallSession createCallSession(int sessionId, ImsCallProfile profile,
+            IImsCallSessionListener listener) throws RemoteException;
+
+    /**
+     * Retrieves the call session associated with a pending call.
+     *
+     * @param sessionId a session id which is obtained from {@link #startSession}
+     * @param callId a call id to make the call
+     */
+    IImsCallSession getPendingCallSession(int sessionId, String callId) throws RemoteException;
+
+    /**
+     * @return The Ut interface for the supplementary service configuration.
+     */
+    IImsUt getUtInterface(int sessionId) throws RemoteException;
+
+    /**
+     * @return The config interface for IMS Configuration
+     */
+    IImsConfig getConfigInterface(int sessionId) throws RemoteException;
+
+    /**
+     * Signal the MMTelFeature to turn on IMS when it has been turned off using {@link #turnOffIms}
+     * @param sessionId a session id which is obtained from {@link #startSession}
+     */
+    void turnOnIms(int sessionId) throws RemoteException;
+
+    /**
+     * Signal the MMTelFeature to turn off IMS when it has been turned on using {@link #turnOnIms}
+     * @param sessionId a session id which is obtained from {@link #startSession}
+     */
+    void turnOffIms(int sessionId) throws RemoteException;
+
+    /**
+     * @return The Emergency call-back mode interface for emergency VoLTE calls that support it.
+     */
+    IImsEcbm getEcbmInterface(int sessionId) throws RemoteException;
+
+    /**
+     * Sets the current UI TTY mode for the MMTelFeature.
+     * @param sessionId a session id which is obtained from {@link #startSession}
+     * @param uiTtyMode An integer containing the new UI TTY Mode.
+     * @param onComplete A {@link Message} to be used when the mode has been set.
+     * @throws RemoteException
+     */
+    void setUiTTYMode(int sessionId, int uiTtyMode, Message onComplete) throws RemoteException;
+
+    /**
+     * @return MultiEndpoint interface for DEP notifications
+     */
+    IImsMultiEndpoint getMultiEndpointInterface(int sessionId) throws RemoteException;
+}
diff --git a/core/java/android/service/autofill/CallbackHelper.java b/telephony/java/android/telephony/ims/feature/IRcsFeature.java
similarity index 64%
copy from core/java/android/service/autofill/CallbackHelper.java
copy to telephony/java/android/telephony/ims/feature/IRcsFeature.java
index ded8f97..e28e1b3 100644
--- a/core/java/android/service/autofill/CallbackHelper.java
+++ b/telephony/java/android/telephony/ims/feature/IRcsFeature.java
@@ -11,20 +11,16 @@
  * 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.
+ * limitations under the License
  */
-package android.service.autofill;
 
-import java.io.PrintWriter;
+package android.telephony.ims.feature;
 
-final class CallbackHelper {
+/**
+ * Feature interface that provides access to RCS APIs. Currently empty until RCS support is added
+ * in the framework.
+ * @hide
+ */
 
-    static interface Dumpable {
-        void dump(String prefix, PrintWriter pw);
-        void setFinalizer(Finalizer f);
-    }
-
-    static interface Finalizer {
-        void gone();
-    }
+public interface IRcsFeature {
 }
diff --git a/telephony/java/android/telephony/ims/feature/ImsFeature.java b/telephony/java/android/telephony/ims/feature/ImsFeature.java
index 0509d60..8d7d260 100644
--- a/telephony/java/android/telephony/ims/feature/ImsFeature.java
+++ b/telephony/java/android/telephony/ims/feature/ImsFeature.java
@@ -16,18 +16,112 @@
 
 package android.telephony.ims.feature;
 
+import android.annotation.IntDef;
+import android.os.RemoteException;
+import android.util.Log;
+
+import com.android.ims.internal.IImsFeatureStatusCallback;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * Base class for all IMS features that are supported by the framework.
  * @hide
  */
-public class ImsFeature {
+public abstract class ImsFeature {
+
+    private static final String LOG_TAG = "ImsFeature";
 
     // Invalid feature value
     public static final int INVALID = -1;
-    // ImsFeatures that are defined in the Manifests
+    // ImsFeatures that are defined in the Manifests. Ensure that these values match the previously
+    // defined values in ImsServiceClass for compatibility purposes.
     public static final int EMERGENCY_MMTEL = 0;
     public static final int MMTEL = 1;
     public static final int RCS = 2;
     // Total number of features defined
     public static final int MAX = 3;
+
+    // Integer values defining the state of the ImsFeature at any time.
+    @IntDef(flag = true,
+            value = {
+                    STATE_NOT_AVAILABLE,
+                    STATE_INITIALIZING,
+                    STATE_READY,
+            })
+    @Retention(RetentionPolicy.SOURCE)
+    public @interface ImsState {}
+    public static final int STATE_NOT_AVAILABLE = 0;
+    public static final int STATE_INITIALIZING = 1;
+    public static final int STATE_READY = 2;
+
+    private List<INotifyFeatureRemoved> mRemovedListeners = new ArrayList<>();
+    private IImsFeatureStatusCallback mStatusCallback;
+    private @ImsState int mState = STATE_NOT_AVAILABLE;
+
+    public interface INotifyFeatureRemoved {
+        void onFeatureRemoved(int slotId);
+    }
+
+    public void addFeatureRemovedListener(INotifyFeatureRemoved listener) {
+        synchronized (mRemovedListeners) {
+            mRemovedListeners.add(listener);
+        }
+    }
+
+    public void removeFeatureRemovedListener(INotifyFeatureRemoved listener) {
+        synchronized (mRemovedListeners) {
+            mRemovedListeners.remove(listener);
+        }
+    }
+
+    // Not final for testing.
+    public void notifyFeatureRemoved(int slotId) {
+        synchronized (mRemovedListeners) {
+            mRemovedListeners.forEach(l -> l.onFeatureRemoved(slotId));
+            onFeatureRemoved();
+        }
+    }
+
+    public int getFeatureState() {
+        return mState;
+    }
+
+    protected final void setFeatureState(@ImsState int state) {
+        if (mState != state) {
+            mState = state;
+            notifyFeatureState(state);
+        }
+    }
+
+    // Not final for testing.
+    public void setImsFeatureStatusCallback(IImsFeatureStatusCallback c) {
+        mStatusCallback = c;
+        // If we have just connected, send queued status.
+        notifyFeatureState(mState);
+    }
+
+    /**
+     * Internal method called by ImsFeature when setFeatureState has changed.
+     * @param state
+     */
+    private void notifyFeatureState(@ImsState int state) {
+        if (mStatusCallback != null) {
+            try {
+                Log.i(LOG_TAG, "notifying ImsFeatureState");
+                mStatusCallback.notifyImsFeatureStatus(state);
+            } catch (RemoteException e) {
+                mStatusCallback = null;
+                Log.w(LOG_TAG, "Couldn't notify feature state: " + e.getMessage());
+            }
+        }
+    }
+
+    /**
+     * Called when the feature is being removed and must be cleaned up.
+     */
+    public abstract void onFeatureRemoved();
 }
diff --git a/telephony/java/android/telephony/ims/feature/MMTelFeature.java b/telephony/java/android/telephony/ims/feature/MMTelFeature.java
new file mode 100644
index 0000000..570cd65
--- /dev/null
+++ b/telephony/java/android/telephony/ims/feature/MMTelFeature.java
@@ -0,0 +1,122 @@
+/*
+ * 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.telephony.ims.feature;
+
+import android.app.PendingIntent;
+import android.os.Message;
+
+import com.android.ims.ImsCallProfile;
+import com.android.ims.internal.IImsCallSession;
+import com.android.ims.internal.IImsCallSessionListener;
+import com.android.ims.internal.IImsConfig;
+import com.android.ims.internal.IImsEcbm;
+import com.android.ims.internal.IImsMultiEndpoint;
+import com.android.ims.internal.IImsRegistrationListener;
+import com.android.ims.internal.IImsUt;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Base implementation, which implements all methods in IMMTelFeature. Any class wishing to use
+ * MMTelFeature should extend this class and implement all methods that the service supports.
+ *
+ * @hide
+ */
+
+public class MMTelFeature extends ImsFeature implements IMMTelFeature {
+
+    @Override
+    public int startSession(PendingIntent incomingCallIntent, IImsRegistrationListener listener) {
+        return 0;
+    }
+
+    @Override
+    public void endSession(int sessionId) {
+    }
+
+    @Override
+    public boolean isConnected(int sessionId, int callSessionType, int callType) {
+        return false;
+    }
+
+    @Override
+    public boolean isOpened(int sessionId) {
+        return false;
+    }
+
+    @Override
+    public void addRegistrationListener(int sessionId, IImsRegistrationListener listener) {
+    }
+
+    @Override
+    public void removeRegistrationListener(int sessionId, IImsRegistrationListener listener) {
+    }
+
+    @Override
+    public ImsCallProfile createCallProfile(int sessionId, int callSessionType, int callType) {
+        return null;
+    }
+
+    @Override
+    public IImsCallSession createCallSession(int sessionId, ImsCallProfile profile,
+            IImsCallSessionListener listener) {
+        return null;
+    }
+
+    @Override
+    public IImsCallSession getPendingCallSession(int sessionId, String callId) {
+        return null;
+    }
+
+    @Override
+    public IImsUt getUtInterface(int sessionId) {
+        return null;
+    }
+
+    @Override
+    public IImsConfig getConfigInterface(int sessionId) {
+        return null;
+    }
+
+    @Override
+    public void turnOnIms(int sessionId) {
+    }
+
+    @Override
+    public void turnOffIms(int sessionId) {
+    }
+
+    @Override
+    public IImsEcbm getEcbmInterface(int sessionId) {
+        return null;
+    }
+
+    @Override
+    public void setUiTTYMode(int sessionId, int uiTtyMode, Message onComplete) {
+    }
+
+    @Override
+    public IImsMultiEndpoint getMultiEndpointInterface(int sessionId) {
+        return null;
+    }
+
+    @Override
+    public void onFeatureRemoved() {
+
+    }
+}
diff --git a/telephony/java/android/telephony/ims/feature/RcsFeature.java b/telephony/java/android/telephony/ims/feature/RcsFeature.java
new file mode 100644
index 0000000..9cddc1b
--- /dev/null
+++ b/telephony/java/android/telephony/ims/feature/RcsFeature.java
@@ -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
+ */
+
+package android.telephony.ims.feature;
+
+/**
+ * Base implementation of the RcsFeature APIs. Any ImsService wishing to support RCS should extend
+ * this class and provide implementations of the IRcsFeature methods that they support.
+ * @hide
+ */
+
+public class RcsFeature extends ImsFeature implements IRcsFeature {
+
+    public RcsFeature() {
+        super();
+    }
+
+    @Override
+    public void onFeatureRemoved() {
+
+    }
+}
diff --git a/telephony/java/com/android/ims/ImsReasonInfo.java b/telephony/java/com/android/ims/ImsReasonInfo.java
index 56b8822..c71808c 100644
--- a/telephony/java/com/android/ims/ImsReasonInfo.java
+++ b/telephony/java/com/android/ims/ImsReasonInfo.java
@@ -308,6 +308,11 @@
     public static final int CODE_DATA_DISABLED = 1406;
 
     /**
+     * Indicates a call was disconnected due to loss of wifi signal.
+     */
+    public static final int CODE_WIFI_LOST = 1407;
+
+    /**
      * Network string error messages.
      * mExtraMessage may have these values.
      */
diff --git a/core/java/android/service/autofill/CallbackHelper.java b/telephony/java/com/android/ims/internal/IImsFeatureStatusCallback.aidl
similarity index 62%
copy from core/java/android/service/autofill/CallbackHelper.java
copy to telephony/java/com/android/ims/internal/IImsFeatureStatusCallback.aidl
index ded8f97..41b1042 100644
--- a/core/java/android/service/autofill/CallbackHelper.java
+++ b/telephony/java/com/android/ims/internal/IImsFeatureStatusCallback.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 The Android Open Source Project
+ * 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.
@@ -13,18 +13,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package android.service.autofill;
 
-import java.io.PrintWriter;
+package com.android.ims.internal;
 
-final class CallbackHelper {
-
-    static interface Dumpable {
-        void dump(String prefix, PrintWriter pw);
-        void setFinalizer(Finalizer f);
-    }
-
-    static interface Finalizer {
-        void gone();
-    }
-}
+/**
+*  Interface from ImsFeature in the ImsService to ImsServiceController.
+ * {@hide}
+ */
+oneway interface IImsFeatureStatusCallback {
+    void notifyImsFeatureStatus(int featureStatus);
+}
\ No newline at end of file
diff --git a/telephony/java/com/android/ims/internal/IImsServiceController.aidl b/telephony/java/com/android/ims/internal/IImsServiceController.aidl
index fa86a43..b700f49 100644
--- a/telephony/java/com/android/ims/internal/IImsServiceController.aidl
+++ b/telephony/java/com/android/ims/internal/IImsServiceController.aidl
@@ -16,10 +16,50 @@
 
 package com.android.ims.internal;
 
+import android.app.PendingIntent;
+
+import com.android.ims.ImsCallProfile;
+import com.android.ims.internal.IImsCallSession;
+import com.android.ims.internal.IImsCallSessionListener;
+import com.android.ims.internal.IImsConfig;
+import com.android.ims.internal.IImsEcbm;
+import com.android.ims.internal.IImsFeatureStatusCallback;
+import com.android.ims.internal.IImsMultiEndpoint;
+import com.android.ims.internal.IImsRegistrationListener;
+import com.android.ims.internal.IImsUt;
+
+import android.os.Message;
+
 /**
+ * See ImsService and IMMTelFeature for more information.
  * {@hide}
  */
 interface IImsServiceController {
-    void createImsFeature(int slotId, int feature);
+    // ImsService Control
+    void createImsFeature(int slotId, int feature, IImsFeatureStatusCallback c);
     void removeImsFeature(int slotId, int feature);
+    // MMTel Feature
+    int startSession(int slotId, int featureType, in PendingIntent incomingCallIntent,
+            in IImsRegistrationListener listener);
+    void endSession(int slotId, int featureType, int sessionId);
+    boolean isConnected(int slotId, int featureType, int sessionId, int callSessionType, int callType);
+    boolean isOpened(int slotId, int featureType, int sessionId);
+    int getFeatureStatus(int slotId, int featureType);
+    void addRegistrationListener(int slotId, int featureType, int sessionId,
+            in IImsRegistrationListener listener);
+    void removeRegistrationListener(int slotId, int featureType, int sessionId,
+            in IImsRegistrationListener listener);
+    ImsCallProfile createCallProfile(int slotId, int featureType, int sessionId, int callSessionType, int callType);
+    IImsCallSession createCallSession(int slotId, int featureType, int sessionId,
+            in ImsCallProfile profile, IImsCallSessionListener listener);
+    IImsCallSession getPendingCallSession(int slotId, int featureType, int sessionId,
+            String callId);
+    IImsUt getUtInterface(int slotId, int featureType, int sessionId);
+    IImsConfig getConfigInterface(int slotId, int featureType, int sessionId);
+    void turnOnIms(int slotId, int featureType, int sessionId);
+    void turnOffIms(int slotId, int featureType, int sessionId);
+    IImsEcbm getEcbmInterface(int slotId, int featureType, int sessionId);
+    void setUiTTYMode(int slotId, int featureType, int sessionId, int uiTtyMode,
+            in Message onComplete);
+    IImsMultiEndpoint getMultiEndpointInterface(int slotId, int featureType, int sessionId);
 }
diff --git a/telephony/java/com/android/ims/internal/IImsServiceFeatureListener.aidl b/telephony/java/com/android/ims/internal/IImsServiceFeatureListener.aidl
index 0a36b6b..82a13dc 100644
--- a/telephony/java/com/android/ims/internal/IImsServiceFeatureListener.aidl
+++ b/telephony/java/com/android/ims/internal/IImsServiceFeatureListener.aidl
@@ -17,9 +17,11 @@
 package com.android.ims.internal;
 
 /**
+*  Interface from ImsResolver to ImsServiceProxy in ImsManager.
  * {@hide}
  */
 oneway interface IImsServiceFeatureListener {
     void imsFeatureCreated(int slotId, int feature);
     void imsFeatureRemoved(int slotId, int feature);
+    void imsStatusChanged(int slotId, int feature, int status);
 }
\ No newline at end of file
diff --git a/telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl b/telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl
index cbedb95..e9c5461 100644
--- a/telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl
+++ b/telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl
@@ -43,6 +43,8 @@
     void onPreciseDataConnectionStateChanged(in PreciseDataConnectionState dataConnectionState);
     void onDataConnectionRealTimeInfoChanged(in DataConnectionRealTimeInfo dcRtInfo);
     void onVoLteServiceStateChanged(in VoLteServiceState lteState);
+    void onVoiceActivationStateChanged(int activationState);
+    void onDataActivationStateChanged(int activationState);
     void onOemHookRawEvent(in byte[] rawData);
     void onCarrierNetworkChange(in boolean active);
 }
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index f2b8804..e6a6178 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -456,6 +456,30 @@
      */
     boolean setVoiceMailNumber(int subId, String alphaTag, String number);
 
+     /**
+      * Sets the voice activation state for a particular subscriber.
+      */
+    void setVoiceActivationState(int subId, int activationState);
+
+     /**
+      * Sets the data activation state for a particular subscriber.
+      */
+    void setDataActivationState(int subId, int activationState);
+
+     /**
+      * Returns the voice activation state for a particular subscriber.
+      * @param subId user preferred sub
+      * @param callingPackage package queries voice activation state
+      */
+    int getVoiceActivationState(int subId, String callingPackage);
+
+     /**
+      * Returns the data activation state for a particular subscriber.
+      * @param subId user preferred sub
+      * @param callingPackage package queris data activation state
+      */
+    int getDataActivationState(int subId, String callingPackage);
+
     /**
       * Returns the unread count of voicemails
       */
@@ -1122,6 +1146,20 @@
     Uri getVoicemailRingtoneUri(in PhoneAccountHandle accountHandle);
 
     /**
+     * Sets the per-account voicemail ringtone.
+     *
+     * <p>Requires that the calling app is the default dialer, or has carrier privileges, or
+     * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
+     *
+     * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
+     * voicemail ringtone.
+     * @param uri The URI for the ringtone to play when receiving a voicemail from a specific
+     * PhoneAccount.
+     */
+    void setVoicemailRingtoneUri(String callingPackage,
+            in PhoneAccountHandle phoneAccountHandle, in Uri uri);
+
+    /**
      * Returns whether vibration is set for voicemail notification in Phone settings.
      *
      * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
@@ -1131,6 +1169,20 @@
     boolean isVoicemailVibrationEnabled(in PhoneAccountHandle accountHandle);
 
     /**
+     * Sets the per-account preference whether vibration is enabled for voicemail notifications.
+     *
+     * <p>Requires that the calling app is the default dialer, or has carrier privileges, or
+     * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
+     *
+     * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
+     * voicemail vibration setting.
+     * @param enabled Whether to enable or disable vibration for voicemail notifications from a
+     * specific PhoneAccount.
+     */
+    void setVoicemailVibrationEnabled(String callingPackage,
+            in PhoneAccountHandle phoneAccountHandle, boolean enabled);
+
+    /**
      * Returns a list of packages that have carrier privileges.
      */
     List<String> getPackagesWithCarrierPrivileges();
diff --git a/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl b/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl
index 2c6be62..2c2206c 100644
--- a/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl
@@ -65,6 +65,8 @@
             String failCause);
     void notifyCellInfoForSubscriber(in int subId, in List<CellInfo> cellInfo);
     void notifyVoLteServiceStateChanged(in VoLteServiceState lteState);
+    void notifySimActivationStateChangedForPhoneId(in int phoneId, in int subId,
+            int activationState, int activationType);
     void notifyOemHookRawEventForSubscriber(in int subId, in byte[] rawData);
     void notifySubscriptionInfoChanged();
     void notifyCarrierNetworkChange(in boolean active);
diff --git a/telephony/java/com/android/internal/telephony/PhoneConstants.java b/telephony/java/com/android/internal/telephony/PhoneConstants.java
index fdc68b9..f9de776 100644
--- a/telephony/java/com/android/internal/telephony/PhoneConstants.java
+++ b/telephony/java/com/android/internal/telephony/PhoneConstants.java
@@ -74,6 +74,9 @@
     public static final int PRESENTATION_UNKNOWN = 3;    // no specified or unknown by network
     public static final int PRESENTATION_PAYPHONE = 4;   // show pay phone info
 
+    // Sim activation type
+    public static final int SIM_ACTIVATION_TYPE_VOICE = 0;
+    public static final int SIM_ACTIVATION_TYPE_DATA = 1;
 
     public static final String PHONE_NAME_KEY = "phoneName";
     public static final String FAILURE_REASON_KEY = "reason";
diff --git a/telephony/java/com/android/internal/telephony/RILConstants.java b/telephony/java/com/android/internal/telephony/RILConstants.java
index 891b8a1a..c3b740e 100644
--- a/telephony/java/com/android/internal/telephony/RILConstants.java
+++ b/telephony/java/com/android/internal/telephony/RILConstants.java
@@ -411,13 +411,14 @@
     int RIL_REQUEST_GET_ACTIVITY_INFO = 135;
     int RIL_REQUEST_SET_ALLOWED_CARRIERS = 136;
     int RIL_REQUEST_GET_ALLOWED_CARRIERS = 137;
+    int RIL_REQUEST_SET_SIM_CARD_POWER = 140;
 
     int RIL_RESPONSE_ACKNOWLEDGEMENT = 800;
 
     int RIL_UNSOL_RESPONSE_BASE = 1000;
     int RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED = 1000;
     int RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED = 1001;
-    int RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED = 1002;
+    int RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED = 1002;
     int RIL_UNSOL_RESPONSE_NEW_SMS = 1003;
     int RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT = 1004;
     int RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM = 1005;
diff --git a/test-runner/src/android/test/mock/MockPackageManager.java b/test-runner/src/android/test/mock/MockPackageManager.java
index 0dcd0f1..d51d75e 100644
--- a/test-runner/src/android/test/mock/MockPackageManager.java
+++ b/test-runner/src/android/test/mock/MockPackageManager.java
@@ -24,6 +24,7 @@
 import android.content.IntentSender;
 import android.content.pm.ActivityInfo;
 import android.content.pm.ApplicationInfo;
+import android.content.pm.ChangedPackages;
 import android.content.pm.InstantAppInfo;
 import android.content.pm.FeatureInfo;
 import android.content.pm.IPackageDataObserver;
@@ -374,6 +375,12 @@
         throw new UnsupportedOperationException();
     }
 
+    /** @hide */
+    @Override
+    public ChangedPackages getChangedPackages(int sequenceNumber) {
+        throw new UnsupportedOperationException();
+    }
+
     @Override
     public ResolveInfo resolveActivity(Intent intent, int flags) {
         throw new UnsupportedOperationException();
diff --git a/tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java b/tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java
index 0aa20ef..8a5fd4b 100644
--- a/tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java
+++ b/tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java
@@ -15,43 +15,43 @@
  */
 package com.android.tests.applaunch;
 
-import java.io.OutputStreamWriter;
-
 import android.accounts.Account;
 import android.accounts.AccountManager;
 import android.app.ActivityManager;
 import android.app.ActivityManager.ProcessErrorStateInfo;
+import android.app.IActivityManager;
+import android.app.UiAutomation;
 import android.content.Context;
 import android.content.Intent;
 import android.content.pm.PackageManager;
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.pm.ResolveInfo;
 import android.os.Bundle;
+import android.os.ParcelFileDescriptor;
 import android.os.RemoteException;
 import android.os.UserHandle;
-import android.app.UiAutomation;
-import android.app.IActivityManager;
 import android.support.test.rule.logging.AtraceLogger;
 import android.test.InstrumentationTestCase;
 import android.test.InstrumentationTestRunner;
 import android.util.Log;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
 import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
 import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.LinkedHashMap;
 import java.util.List;
-import java.util.ArrayList;
 import java.util.Map;
 import java.util.Set;
-import android.os.ParcelFileDescriptor;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.InputStream;
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.InputStreamReader;
-
 /**
  * This test is intended to measure the time it takes for the apps to start.
  * Names of the applications are passed in command line, and the
@@ -73,6 +73,7 @@
     private static final String KEY_LAUNCH_ITERATIONS = "launch_iterations";
     private static final String KEY_LAUNCH_ORDER = "launch_order";
     private static final String KEY_DROP_CACHE = "drop_cache";
+    private static final String KEY_SIMULATE_MAINTANANCE = "simulate_maintanance";
     private static final String KEY_SIMPLEPPERF_CMD = "simpleperf_cmd";
     private static final String KEY_TRACE_ITERATIONS = "trace_iterations";
     private static final String KEY_LAUNCH_DIRECTORY = "launch_directory";
@@ -97,6 +98,7 @@
     private static final String DROP_CACHE_SCRIPT = "/data/local/tmp/dropCache.sh";
     private static final String APP_LAUNCH_CMD = "am start -W -n";
     private static final String SUCCESS_MESSAGE = "Status: ok";
+    private static final String PROFILE_COMPILE_SUCCESS = "Success";
     private static final String THIS_TIME = "ThisTime:";
     private static final String LAUNCH_ITERATION = "LAUNCH_ITERATION - %d";
     private static final String TRACE_ITERATION = "TRACE_ITERATION - %d";
@@ -104,6 +106,8 @@
     private static final String TRACE_ITERATION_PREFIX = "TRACE_ITERATION";
     private static final String LAUNCH_ORDER_CYCLIC = "cyclic";
     private static final String LAUNCH_ORDER_SEQUENTIAL = "sequential";
+    private static final String SPEED_PROFILE_CMD = "cmd package compile -f -m speed-profile %s";
+
 
 
     private Map<String, Intent> mNameToIntent;
@@ -124,6 +128,7 @@
     private File mFile = null;
     private FileOutputStream mOutputStream = null;
     private BufferedWriter mBufferedWriter = null;
+    private boolean mSimulateMaintanance = false;
 
 
     @Override
@@ -149,6 +154,8 @@
         mDropCache = Boolean.parseBoolean(args.getString(KEY_DROP_CACHE));
         mSimplePerfCmd = args.getString(KEY_SIMPLEPPERF_CMD);
         mLaunchOrder = args.getString(KEY_LAUNCH_ORDER, LAUNCH_ORDER_CYCLIC);
+        mSimulateMaintanance =  Boolean.parseBoolean(args.getString(KEY_SIMULATE_MAINTANANCE));
+
         createMappings();
         parseArgs(args);
         checkAccountSignIn();
@@ -229,6 +236,12 @@
                     sleep(INITIAL_LAUNCH_IDLE_TIMEOUT);
                     closeApp(launch.getApp(), true);
                     dropCache();
+                    if (mSimulateMaintanance) {
+                        String appPkgName = mNameToIntent.get(launch.getApp())
+                                .getComponent().getPackageName();
+                        assertTrue(String.format("Not able to speed profile the app : %s",
+                                appPkgName), profileCompileApp(appPkgName));
+                    }
                     sleep(BETWEEN_LAUNCH_SLEEP_TIMEOUT);
                 }
 
@@ -305,6 +318,26 @@
     }
 
     /**
+     * Compile the app package using speed compile command and return true or false
+     * based on status of the compilation command.
+     */
+    private boolean profileCompileApp(String appPkgName) throws IOException {
+        Log.i(TAG, "Starting to speed profile " + appPkgName);
+        try (ParcelFileDescriptor result = getInstrumentation().getUiAutomation().
+                executeShellCommand(String.format(SPEED_PROFILE_CMD, appPkgName));
+                BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(
+                        new FileInputStream(result.getFileDescriptor())))) {
+            String line;
+            while ((line = bufferedReader.readLine()) != null) {
+                if (line.contains(PROFILE_COMPILE_SUCCESS)) {
+                    return true;
+                }
+            }
+            return false;
+        }
+    }
+
+    /**
      * If launch order is "cyclic" then apps will be launched one after the
      * other for each iteration count.
      * If launch order is "sequential" then each app will be launched for given number
diff --git a/tests/TransitionTests/src/com/android/transitiontests/ListViewAddRemove.java b/tests/TransitionTests/src/com/android/transitiontests/ListViewAddRemove.java
index 6629770..251bf24 100644
--- a/tests/TransitionTests/src/com/android/transitiontests/ListViewAddRemove.java
+++ b/tests/TransitionTests/src/com/android/transitiontests/ListViewAddRemove.java
@@ -30,8 +30,9 @@
 import android.transition.AutoTransition;
 import android.transition.ChangeBounds;
 import android.transition.Transition;
-import android.transition.TransitionSet;
+import android.transition.TransitionListenerAdapter;
 import android.transition.TransitionManager;
+import android.transition.TransitionSet;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -84,7 +85,7 @@
         fadeIn.setDuration(50);
         noFadeIn.addTransition(new Fade(Fade.OUT)).addTransition(new ChangeBounds()).addTransition(fadeIn);
 
-        myTransition.addListener(new Transition.TransitionListenerAdapter() {
+        myTransition.addListener(new TransitionListenerAdapter() {
             @Override
             public void onTransitionStart(Transition transition) {
                 System.out.println("---------ListView Tops: Before--------");
diff --git a/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionSession.java b/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionSession.java
index 5767f11..0401737 100644
--- a/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionSession.java
+++ b/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionSession.java
@@ -172,12 +172,10 @@
     @Override
     public void onHandleAssist(Bundle data, AssistStructure structure, AssistContent content) {
         mAssistStructure = structure;
-        if (mAssistStructure != null) {
-            if (mAssistVisualizer != null) {
+        if (mAssistVisualizer != null) {
+            if (mAssistStructure != null) {
                 mAssistVisualizer.setAssistStructure(mAssistStructure);
-            }
-        } else {
-            if (mAssistVisualizer != null) {
+            } else {
                 mAssistVisualizer.clearAssistData();
             }
         }
@@ -207,19 +205,24 @@
 
     @Override
     public void onHandleScreenshot(Bitmap screenshot) {
-        if (screenshot != null) {
-            mScreenshot.setImageBitmap(screenshot);
-            mScreenshot.setAdjustViewBounds(true);
-            mScreenshot.setMaxWidth(screenshot.getWidth() / 3);
-            mScreenshot.setMaxHeight(screenshot.getHeight() / 3);
-            mFullScreenshot.setImageBitmap(screenshot);
-        } else {
-            mScreenshot.setImageDrawable(null);
-            mFullScreenshot.setImageDrawable(null);
+        if (mScreenshot != null) {
+            if (screenshot != null) {
+                mScreenshot.setImageBitmap(screenshot);
+                mScreenshot.setAdjustViewBounds(true);
+                mScreenshot.setMaxWidth(screenshot.getWidth() / 3);
+                mScreenshot.setMaxHeight(screenshot.getHeight() / 3);
+                mFullScreenshot.setImageBitmap(screenshot);
+            } else {
+                mScreenshot.setImageDrawable(null);
+                mFullScreenshot.setImageDrawable(null);
+            }
         }
     }
 
     void updateState() {
+        if (mTopContent == null) {
+            return;
+        }
         if (mState == STATE_IDLE) {
             mTopContent.setVisibility(View.VISIBLE);
             mBottomContent.setVisibility(View.GONE);
diff --git a/tests/net/java/android/net/ConnectivityManagerTest.java b/tests/net/java/android/net/ConnectivityManagerTest.java
new file mode 100644
index 0000000..b984bbf
--- /dev/null
+++ b/tests/net/java/android/net/ConnectivityManagerTest.java
@@ -0,0 +1,176 @@
+/*
+ * 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.net;
+
+import static android.net.NetworkCapabilities.NET_CAPABILITY_CBS;
+import static android.net.NetworkCapabilities.NET_CAPABILITY_DUN;
+import static android.net.NetworkCapabilities.NET_CAPABILITY_FOTA;
+import static android.net.NetworkCapabilities.NET_CAPABILITY_IMS;
+import static android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET;
+import static android.net.NetworkCapabilities.NET_CAPABILITY_MMS;
+import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED;
+import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_VPN;
+import static android.net.NetworkCapabilities.NET_CAPABILITY_SUPL;
+import static android.net.NetworkCapabilities.NET_CAPABILITY_TRUSTED;
+import static android.net.NetworkCapabilities.NET_CAPABILITY_WIFI_P2P;
+import static android.net.NetworkCapabilities.TRANSPORT_BLUETOOTH;
+import static android.net.NetworkCapabilities.TRANSPORT_CELLULAR;
+import static android.net.NetworkCapabilities.TRANSPORT_ETHERNET;
+import static android.net.NetworkCapabilities.TRANSPORT_WIFI;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import android.net.ConnectivityManager;
+import android.net.NetworkCapabilities;
+
+import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.runner.RunWith;
+import org.junit.Test;
+
+
+
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+public class ConnectivityManagerTest {
+    static NetworkCapabilities verifyNetworkCapabilities(
+            int legacyType, int transportType, int... capabilities) {
+        final NetworkCapabilities nc = ConnectivityManager.networkCapabilitiesForType(legacyType);
+        assertNotNull(nc);
+        assertTrue(nc.hasTransport(transportType));
+        for (int capability : capabilities) {
+            assertTrue(nc.hasCapability(capability));
+        }
+
+        return nc;
+    }
+
+    static void verifyUnrestrictedNetworkCapabilities(int legacyType, int transportType) {
+        verifyNetworkCapabilities(
+                legacyType,
+                transportType,
+                NET_CAPABILITY_INTERNET,
+                NET_CAPABILITY_NOT_RESTRICTED,
+                NET_CAPABILITY_NOT_VPN,
+                NET_CAPABILITY_TRUSTED);
+    }
+
+    static void verifyRestrictedMobileNetworkCapabilities(int legacyType, int capability) {
+        final NetworkCapabilities nc = verifyNetworkCapabilities(
+                legacyType,
+                TRANSPORT_CELLULAR,
+                capability,
+                NET_CAPABILITY_NOT_VPN,
+                NET_CAPABILITY_TRUSTED);
+
+        assertFalse(nc.hasCapability(NET_CAPABILITY_INTERNET));
+        assertFalse(nc.hasCapability(NET_CAPABILITY_NOT_RESTRICTED));
+    }
+
+    @Test
+    public void testNetworkCapabilitiesForTypeMobile() {
+        verifyUnrestrictedNetworkCapabilities(
+                ConnectivityManager.TYPE_MOBILE, TRANSPORT_CELLULAR);
+    }
+
+    @Test
+    public void testNetworkCapabilitiesForTypeMobileCbs() {
+        verifyRestrictedMobileNetworkCapabilities(
+                ConnectivityManager.TYPE_MOBILE_CBS, NET_CAPABILITY_CBS);
+    }
+
+    @Test
+    public void testNetworkCapabilitiesForTypeMobileDun() {
+        verifyRestrictedMobileNetworkCapabilities(
+                ConnectivityManager.TYPE_MOBILE_DUN, NET_CAPABILITY_DUN);
+    }
+
+    @Test
+    public void testNetworkCapabilitiesForTypeMobileFota() {
+        verifyRestrictedMobileNetworkCapabilities(
+                ConnectivityManager.TYPE_MOBILE_FOTA, NET_CAPABILITY_FOTA);
+    }
+
+    @Test
+    public void testNetworkCapabilitiesForTypeMobileHipri() {
+        verifyUnrestrictedNetworkCapabilities(
+                ConnectivityManager.TYPE_MOBILE_HIPRI, TRANSPORT_CELLULAR);
+    }
+
+    @Test
+    public void testNetworkCapabilitiesForTypeMobileIms() {
+        verifyRestrictedMobileNetworkCapabilities(
+                ConnectivityManager.TYPE_MOBILE_IMS, NET_CAPABILITY_IMS);
+    }
+
+    @Test
+    public void testNetworkCapabilitiesForTypeMobileMms() {
+        final NetworkCapabilities nc = verifyNetworkCapabilities(
+                ConnectivityManager.TYPE_MOBILE_MMS,
+                TRANSPORT_CELLULAR,
+                NET_CAPABILITY_MMS,
+                NET_CAPABILITY_NOT_VPN,
+                NET_CAPABILITY_TRUSTED);
+
+        assertFalse(nc.hasCapability(NET_CAPABILITY_INTERNET));
+    }
+
+    @Test
+    public void testNetworkCapabilitiesForTypeMobileSupl() {
+        final NetworkCapabilities nc = verifyNetworkCapabilities(
+                ConnectivityManager.TYPE_MOBILE_SUPL,
+                TRANSPORT_CELLULAR,
+                NET_CAPABILITY_SUPL,
+                NET_CAPABILITY_NOT_VPN,
+                NET_CAPABILITY_TRUSTED);
+
+        assertFalse(nc.hasCapability(NET_CAPABILITY_INTERNET));
+    }
+
+    @Test
+    public void testNetworkCapabilitiesForTypeWifi() {
+        verifyUnrestrictedNetworkCapabilities(
+                ConnectivityManager.TYPE_WIFI, TRANSPORT_WIFI);
+    }
+
+    @Test
+    public void testNetworkCapabilitiesForTypeWifiP2p() {
+        final NetworkCapabilities nc = verifyNetworkCapabilities(
+                ConnectivityManager.TYPE_WIFI_P2P,
+                TRANSPORT_WIFI,
+                NET_CAPABILITY_NOT_RESTRICTED, NET_CAPABILITY_NOT_VPN,
+                NET_CAPABILITY_TRUSTED, NET_CAPABILITY_WIFI_P2P);
+
+        assertFalse(nc.hasCapability(NET_CAPABILITY_INTERNET));
+    }
+
+    @Test
+    public void testNetworkCapabilitiesForTypeBluetooth() {
+        verifyUnrestrictedNetworkCapabilities(
+                ConnectivityManager.TYPE_BLUETOOTH, TRANSPORT_BLUETOOTH);
+    }
+
+    @Test
+    public void testNetworkCapabilitiesForTypeEthernet() {
+        verifyUnrestrictedNetworkCapabilities(
+                ConnectivityManager.TYPE_ETHERNET, TRANSPORT_ETHERNET);
+    }
+}
diff --git a/tests/net/java/android/net/ConnectivityMetricsLoggerTest.java b/tests/net/java/android/net/ConnectivityMetricsLoggerTest.java
deleted file mode 100644
index f896030..0000000
--- a/tests/net/java/android/net/ConnectivityMetricsLoggerTest.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (C) 2016, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net;
-
-import android.os.Bundle;
-import android.os.Parcel;
-import android.test.suitebuilder.annotation.SmallTest;
-import java.util.List;
-import junit.framework.TestCase;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-public class ConnectivityMetricsLoggerTest extends TestCase {
-
-    // use same Parcel object everywhere for pointer equality
-    static final Bundle FAKE_EV = new Bundle();
-    static final int FAKE_COMPONENT = 1;
-    static final int FAKE_EVENT = 2;
-
-    @Mock IConnectivityMetricsLogger mService;
-    ArgumentCaptor<ConnectivityMetricsEvent> evCaptor;
-    ArgumentCaptor<ConnectivityMetricsEvent[]> evArrayCaptor;
-
-    ConnectivityMetricsLogger mLog;
-
-    public void setUp() {
-        MockitoAnnotations.initMocks(this);
-        evCaptor = ArgumentCaptor.forClass(ConnectivityMetricsEvent.class);
-        evArrayCaptor = ArgumentCaptor.forClass(ConnectivityMetricsEvent[].class);
-        mLog = new ConnectivityMetricsLogger(mService);
-    }
-
-    @SmallTest
-    public void testLogEvents() throws Exception {
-        mLog.logEvent(1, FAKE_COMPONENT, FAKE_EVENT, FAKE_EV);
-        mLog.logEvent(2, FAKE_COMPONENT, FAKE_EVENT, FAKE_EV);
-        mLog.logEvent(3, FAKE_COMPONENT, FAKE_EVENT, FAKE_EV);
-
-        List<ConnectivityMetricsEvent> gotEvents = verifyEvents(3);
-        assertEventsEqual(expectedEvent(1), gotEvents.get(0));
-        assertEventsEqual(expectedEvent(2), gotEvents.get(1));
-        assertEventsEqual(expectedEvent(3), gotEvents.get(2));
-    }
-
-    @SmallTest
-    public void testLogEventTriggerThrottling() throws Exception {
-        when(mService.logEvent(any())).thenReturn(1234L);
-
-        mLog.logEvent(1, FAKE_COMPONENT, FAKE_EVENT, FAKE_EV);
-        mLog.logEvent(2, FAKE_COMPONENT, FAKE_EVENT, FAKE_EV);
-
-        List<ConnectivityMetricsEvent> gotEvents = verifyEvents(1);
-        assertEventsEqual(expectedEvent(1), gotEvents.get(0));
-    }
-
-    @SmallTest
-    public void testLogEventFails() throws Exception {
-        when(mService.logEvent(any())).thenReturn(-1L); // Error.
-
-        mLog.logEvent(1, FAKE_COMPONENT, FAKE_EVENT, FAKE_EV);
-        mLog.logEvent(2, FAKE_COMPONENT, FAKE_EVENT, FAKE_EV);
-
-        List<ConnectivityMetricsEvent> gotEvents = verifyEvents(1);
-        assertEventsEqual(expectedEvent(1), gotEvents.get(0));
-    }
-
-    @SmallTest
-    public void testLogEventWhenThrottling() throws Exception {
-        when(mService.logEvent(any())).thenReturn(Long.MAX_VALUE); // Throttled
-
-        // No events are logged. The service is only called once
-        // After that, throttling state is maintained locally.
-        mLog.logEvent(1, FAKE_COMPONENT, FAKE_EVENT, FAKE_EV);
-        mLog.logEvent(2, FAKE_COMPONENT, FAKE_EVENT, FAKE_EV);
-
-        List<ConnectivityMetricsEvent> gotEvents = verifyEvents(1);
-        assertEventsEqual(expectedEvent(1), gotEvents.get(0));
-    }
-
-    @SmallTest
-    public void testLogEventRecoverFromThrottling() throws Exception {
-        final long throttleTimeout = System.currentTimeMillis() + 10;
-        when(mService.logEvent(any())).thenReturn(throttleTimeout, 0L);
-
-        mLog.logEvent(1, FAKE_COMPONENT, FAKE_EVENT, FAKE_EV);
-        mLog.logEvent(2, FAKE_COMPONENT, FAKE_EVENT, FAKE_EV);
-        mLog.logEvent(3, FAKE_COMPONENT, FAKE_EVENT, FAKE_EV);
-        Thread.sleep(100);
-        mLog.logEvent(53, FAKE_COMPONENT, FAKE_EVENT, FAKE_EV);
-
-        List<ConnectivityMetricsEvent> gotEvents = verifyEvents(1);
-        assertEventsEqual(expectedEvent(1), gotEvents.get(0));
-
-        verify(mService, times(1)).logEvents(evArrayCaptor.capture());
-        ConnectivityMetricsEvent[] gotOtherEvents = evArrayCaptor.getAllValues().get(0);
-        assertEquals(ConnectivityMetricsLogger.TAG_SKIPPED_EVENTS, gotOtherEvents[0].eventTag);
-        assertEventsEqual(expectedEvent(53), gotOtherEvents[1]);
-    }
-
-    List<ConnectivityMetricsEvent> verifyEvents(int n) throws Exception {
-        verify(mService, times(n)).logEvent(evCaptor.capture());
-        return evCaptor.getAllValues();
-    }
-
-    static ConnectivityMetricsEvent expectedEvent(int timestamp) {
-        return new ConnectivityMetricsEvent((long)timestamp, FAKE_COMPONENT, FAKE_EVENT, FAKE_EV);
-    }
-
-    /** Outer equality for ConnectivityMetricsEvent to avoid overriding equals() and hashCode(). */
-    static void assertEventsEqual(ConnectivityMetricsEvent expected, ConnectivityMetricsEvent got) {
-        assertEquals(expected.timestamp, got.timestamp);
-        assertEquals(expected.componentTag, got.componentTag);
-        assertEquals(expected.eventTag, got.eventTag);
-        assertEquals(expected.data, got.data);
-    }
-}
diff --git a/tests/net/java/com/android/server/connectivity/MetricsLoggerServiceTest.java b/tests/net/java/com/android/server/connectivity/MetricsLoggerServiceTest.java
deleted file mode 100644
index 5981f48..0000000
--- a/tests/net/java/com/android/server/connectivity/MetricsLoggerServiceTest.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright (C) 2016, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.connectivity;
-
-import android.content.Context;
-import android.net.ConnectivityMetricsEvent;
-import android.os.Bundle;
-import android.os.RemoteException;
-import android.test.suitebuilder.annotation.SmallTest;
-import static android.net.ConnectivityMetricsEvent.Reference;
-
-import junit.framework.TestCase;
-import org.junit.Before;
-import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertArrayEquals;
-
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import java.io.FileDescriptor;
-import java.io.FileOutputStream;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-/*
- * TODO:
- *  - allow overriding MetricsLoggerService constants in tests.
- *  - test intents are correctly sent after the notification threshold.
- *  - test oldest events are correctly pushed out when internal deque is full.
- *  - test throttling triggers correctly.
- */
-public class MetricsLoggerServiceTest extends TestCase {
-
-    static final int COMPONENT_TAG = 1;
-    static final long N_EVENTS = 10L;
-    static final ConnectivityMetricsEvent EVENTS[] = new ConnectivityMetricsEvent[(int)N_EVENTS];
-    static {
-        for (int i = 0; i < N_EVENTS; i++) {
-            EVENTS[i] = new ConnectivityMetricsEvent(i, COMPONENT_TAG, i, new Bundle());
-        }
-    }
-
-    static final ConnectivityMetricsEvent NO_EVENTS[] = new ConnectivityMetricsEvent[0];
-
-    @Mock Context mContext;
-    MetricsLoggerService mService;
-
-    public void setUp() {
-        MockitoAnnotations.initMocks(this);
-        mService = new MetricsLoggerService(mContext);
-        mService.onStart();
-    }
-
-    @SmallTest
-    public void testGetNoEvents() throws Exception {
-        Reference r = new Reference(0);
-        assertArrayEquals(NO_EVENTS, mService.mBinder.getEvents(r));
-        assertEquals(0, r.getValue());
-    }
-
-    @SmallTest
-    public void testLogAndGetEvents() throws Exception {
-        mService.mBinder.logEvents(EVENTS);
-
-        Reference r = new Reference(0);
-
-        assertArrayEquals(EVENTS, mService.mBinder.getEvents(r));
-        assertEquals(N_EVENTS, r.getValue());
-
-        assertArrayEquals(NO_EVENTS, mService.mBinder.getEvents(r));
-        assertEquals(N_EVENTS, r.getValue());
-    }
-
-    @SmallTest
-    public void testLogOneByOne() throws Exception {
-        for (ConnectivityMetricsEvent ev : EVENTS) {
-            mService.mBinder.logEvent(ev);
-        }
-
-        Reference r = new Reference(0);
-
-        assertArrayEquals(EVENTS, mService.mBinder.getEvents(r));
-        assertEquals(N_EVENTS, r.getValue());
-
-        assertArrayEquals(NO_EVENTS, mService.mBinder.getEvents(r));
-        assertEquals(N_EVENTS, r.getValue());
-    }
-
-    @SmallTest
-    public void testInterleavedLogAndGet() throws Exception {
-        mService.mBinder.logEvents(Arrays.copyOfRange(EVENTS, 0, 3));
-
-        Reference r = new Reference(0);
-
-        assertArrayEquals(Arrays.copyOfRange(EVENTS, 0, 3), mService.mBinder.getEvents(r));
-        assertEquals(3, r.getValue());
-
-        mService.mBinder.logEvents(Arrays.copyOfRange(EVENTS, 3, 8));
-        mService.mBinder.logEvents(Arrays.copyOfRange(EVENTS, 8, 10));
-
-        assertArrayEquals(Arrays.copyOfRange(EVENTS, 3, 10), mService.mBinder.getEvents(r));
-        assertEquals(N_EVENTS, r.getValue());
-
-        assertArrayEquals(NO_EVENTS, mService.mBinder.getEvents(r));
-        assertEquals(N_EVENTS, r.getValue());
-    }
-
-    @SmallTest
-    public void testMultipleGetAll() throws Exception {
-        mService.mBinder.logEvents(Arrays.copyOf(EVENTS, 3));
-
-        Reference r1 = new Reference(0);
-        assertArrayEquals(Arrays.copyOf(EVENTS, 3), mService.mBinder.getEvents(r1));
-        assertEquals(3, r1.getValue());
-
-        mService.mBinder.logEvents(Arrays.copyOfRange(EVENTS, 3, 10));
-
-        Reference r2 = new Reference(0);
-        assertArrayEquals(EVENTS, mService.mBinder.getEvents(r2));
-        assertEquals(N_EVENTS, r2.getValue());
-    }
-
-    @SmallTest
-    public void testLogAndDumpConcurrently() throws Exception {
-        for (int i = 0; i < 50; i++) {
-            mContext = null;
-            mService = null;
-            setUp();
-            logAndDumpConcurrently();
-        }
-    }
-
-    public void logAndDumpConcurrently() throws Exception {
-        final CountDownLatch latch = new CountDownLatch((int)N_EVENTS);
-        final FileDescriptor fd = new FileOutputStream("/dev/null").getFD();
-
-        for (ConnectivityMetricsEvent ev : EVENTS) {
-            new Thread() {
-                public void run() {
-                    mService.mBinder.logEvent(ev);
-                    latch.countDown();
-                }
-            }.start();
-        }
-
-        new Thread() {
-            public void run() {
-                while (latch.getCount() > 0) {
-                    mService.mBinder.dump(fd, new String[]{"--all"});
-                }
-            }
-        }.start();
-
-        latch.await(100, TimeUnit.MILLISECONDS);
-
-        Reference r = new Reference(0);
-        ConnectivityMetricsEvent[] got = mService.mBinder.getEvents(r);
-        Arrays.sort(got, new EventComparator());
-        assertArrayEquals(EVENTS, got);
-        assertEquals(N_EVENTS, r.getValue());
-    }
-
-    static class EventComparator implements Comparator<ConnectivityMetricsEvent> {
-        public int compare(ConnectivityMetricsEvent ev1, ConnectivityMetricsEvent ev2) {
-            return Long.compare(ev1.timestamp, ev2.timestamp);
-        }
-        public boolean equal(Object o) {
-            return o instanceof EventComparator;
-        }
-    };
-}
diff --git a/tests/net/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachineTest.java b/tests/net/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachineTest.java
index 9f7261d..32e1b96 100644
--- a/tests/net/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachineTest.java
+++ b/tests/net/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachineTest.java
@@ -28,6 +28,9 @@
 import static android.net.ConnectivityManager.TETHER_ERROR_NO_ERROR;
 import static android.net.ConnectivityManager.TETHER_ERROR_TETHER_IFACE_ERROR;
 import static android.net.ConnectivityManager.TETHER_ERROR_UNTETHER_IFACE_ERROR;
+import static android.net.ConnectivityManager.TETHERING_BLUETOOTH;
+import static android.net.ConnectivityManager.TETHERING_USB;
+import static android.net.ConnectivityManager.TETHERING_WIFI;
 import static com.android.server.connectivity.tethering.IControlsTethering.STATE_AVAILABLE;
 import static com.android.server.connectivity.tethering.IControlsTethering.STATE_TETHERED;
 import static com.android.server.connectivity.tethering.IControlsTethering.STATE_UNAVAILABLE;
@@ -92,7 +95,7 @@
     @Test
     public void startsOutAvailable() {
         mTestedSm = new TetherInterfaceStateMachine(IFACE_NAME, mLooper.getLooper(),
-                ConnectivityManager.TETHERING_BLUETOOTH, mNMService, mStatsService, mTetherHelper,
+                TETHERING_BLUETOOTH, mNMService, mStatsService, mTetherHelper,
                 mIPv6TetheringInterfaceServices);
         mTestedSm.start();
         mLooper.dispatchAll();
@@ -103,7 +106,7 @@
 
     @Test
     public void shouldDoNothingUntilRequested() throws Exception {
-        initStateMachine(ConnectivityManager.TETHERING_BLUETOOTH);
+        initStateMachine(TETHERING_BLUETOOTH);
         final int [] NOOP_COMMANDS = {
             TetherInterfaceStateMachine.CMD_TETHER_UNREQUESTED,
             TetherInterfaceStateMachine.CMD_IP_FORWARDING_ENABLE_ERROR,
@@ -123,7 +126,7 @@
 
     @Test
     public void handlesImmediateInterfaceDown() throws Exception {
-        initStateMachine(ConnectivityManager.TETHERING_BLUETOOTH);
+        initStateMachine(TETHERING_BLUETOOTH);
 
         dispatchCommand(TetherInterfaceStateMachine.CMD_INTERFACE_DOWN);
         verify(mTetherHelper).notifyInterfaceStateChange(
@@ -133,7 +136,7 @@
 
     @Test
     public void canBeTethered() throws Exception {
-        initStateMachine(ConnectivityManager.TETHERING_BLUETOOTH);
+        initStateMachine(TETHERING_BLUETOOTH);
 
         dispatchCommand(TetherInterfaceStateMachine.CMD_TETHER_REQUESTED);
         InOrder inOrder = inOrder(mTetherHelper, mNMService);
@@ -145,7 +148,7 @@
 
     @Test
     public void canUnrequestTethering() throws Exception {
-        initTetheredStateMachine(ConnectivityManager.TETHERING_BLUETOOTH, null);
+        initTetheredStateMachine(TETHERING_BLUETOOTH, null);
 
         dispatchCommand(TetherInterfaceStateMachine.CMD_TETHER_UNREQUESTED);
         InOrder inOrder = inOrder(mNMService, mStatsService, mTetherHelper);
@@ -157,7 +160,7 @@
 
     @Test
     public void canBeTetheredAsUsb() throws Exception {
-        initStateMachine(ConnectivityManager.TETHERING_USB);
+        initStateMachine(TETHERING_USB);
 
         dispatchCommand(TetherInterfaceStateMachine.CMD_TETHER_REQUESTED);
         InOrder inOrder = inOrder(mTetherHelper, mNMService);
@@ -171,7 +174,7 @@
 
     @Test
     public void handlesFirstUpstreamChange() throws Exception {
-        initTetheredStateMachine(ConnectivityManager.TETHERING_BLUETOOTH, null);
+        initTetheredStateMachine(TETHERING_BLUETOOTH, null);
 
         // Telling the state machine about its upstream interface triggers a little more configuration.
         dispatchTetherConnectionChanged(UPSTREAM_IFACE);
@@ -183,7 +186,7 @@
 
     @Test
     public void handlesChangingUpstream() throws Exception {
-        initTetheredStateMachine(ConnectivityManager.TETHERING_BLUETOOTH, UPSTREAM_IFACE);
+        initTetheredStateMachine(TETHERING_BLUETOOTH, UPSTREAM_IFACE);
 
         dispatchTetherConnectionChanged(UPSTREAM_IFACE2);
         InOrder inOrder = inOrder(mNMService, mStatsService);
@@ -196,8 +199,44 @@
     }
 
     @Test
+    public void handlesChangingUpstreamNatFailure() throws Exception {
+        initTetheredStateMachine(TETHERING_WIFI, UPSTREAM_IFACE);
+
+        doThrow(RemoteException.class).when(mNMService).enableNat(IFACE_NAME, UPSTREAM_IFACE2);
+
+        dispatchTetherConnectionChanged(UPSTREAM_IFACE2);
+        InOrder inOrder = inOrder(mNMService, mStatsService);
+        inOrder.verify(mStatsService).forceUpdate();
+        inOrder.verify(mNMService).stopInterfaceForwarding(IFACE_NAME, UPSTREAM_IFACE);
+        inOrder.verify(mNMService).disableNat(IFACE_NAME, UPSTREAM_IFACE);
+        inOrder.verify(mNMService).enableNat(IFACE_NAME, UPSTREAM_IFACE2);
+        inOrder.verify(mStatsService).forceUpdate();
+        inOrder.verify(mNMService).stopInterfaceForwarding(IFACE_NAME, UPSTREAM_IFACE2);
+        inOrder.verify(mNMService).disableNat(IFACE_NAME, UPSTREAM_IFACE2);
+    }
+
+    @Test
+    public void handlesChangingUpstreamInterfaceForwardingFailure() throws Exception {
+        initTetheredStateMachine(TETHERING_WIFI, UPSTREAM_IFACE);
+
+        doThrow(RemoteException.class).when(mNMService).startInterfaceForwarding(
+                IFACE_NAME, UPSTREAM_IFACE2);
+
+        dispatchTetherConnectionChanged(UPSTREAM_IFACE2);
+        InOrder inOrder = inOrder(mNMService, mStatsService);
+        inOrder.verify(mStatsService).forceUpdate();
+        inOrder.verify(mNMService).stopInterfaceForwarding(IFACE_NAME, UPSTREAM_IFACE);
+        inOrder.verify(mNMService).disableNat(IFACE_NAME, UPSTREAM_IFACE);
+        inOrder.verify(mNMService).enableNat(IFACE_NAME, UPSTREAM_IFACE2);
+        inOrder.verify(mNMService).startInterfaceForwarding(IFACE_NAME, UPSTREAM_IFACE2);
+        inOrder.verify(mStatsService).forceUpdate();
+        inOrder.verify(mNMService).stopInterfaceForwarding(IFACE_NAME, UPSTREAM_IFACE2);
+        inOrder.verify(mNMService).disableNat(IFACE_NAME, UPSTREAM_IFACE2);
+    }
+
+    @Test
     public void canUnrequestTetheringWithUpstream() throws Exception {
-        initTetheredStateMachine(ConnectivityManager.TETHERING_BLUETOOTH, UPSTREAM_IFACE);
+        initTetheredStateMachine(TETHERING_BLUETOOTH, UPSTREAM_IFACE);
 
         dispatchCommand(TetherInterfaceStateMachine.CMD_TETHER_UNREQUESTED);
         InOrder inOrder = inOrder(mNMService, mStatsService, mTetherHelper);
@@ -213,7 +252,7 @@
     @Test
     public void interfaceDownLeadsToUnavailable() throws Exception {
         for (boolean shouldThrow : new boolean[]{true, false}) {
-            initTetheredStateMachine(ConnectivityManager.TETHERING_USB, null);
+            initTetheredStateMachine(TETHERING_USB, null);
 
             if (shouldThrow) {
                 doThrow(RemoteException.class).when(mNMService).untetherInterface(IFACE_NAME);
@@ -230,7 +269,7 @@
 
     @Test
     public void usbShouldBeTornDownOnTetherError() throws Exception {
-        initStateMachine(ConnectivityManager.TETHERING_USB);
+        initStateMachine(TETHERING_USB);
 
         doThrow(RemoteException.class).when(mNMService).tetherInterface(IFACE_NAME);
         dispatchCommand(TetherInterfaceStateMachine.CMD_TETHER_REQUESTED);
@@ -244,7 +283,7 @@
 
     @Test
     public void shouldTearDownUsbOnUpstreamError() throws Exception {
-        initTetheredStateMachine(ConnectivityManager.TETHERING_USB, null);
+        initTetheredStateMachine(TETHERING_USB, null);
 
         doThrow(RemoteException.class).when(mNMService).enableNat(anyString(), anyString());
         dispatchTetherConnectionChanged(UPSTREAM_IFACE);
@@ -255,6 +294,18 @@
                 IFACE_NAME, mTestedSm, STATE_AVAILABLE, TETHER_ERROR_ENABLE_NAT_ERROR);
     }
 
+    @Test
+    public void ignoresDuplicateUpstreamNotifications() throws Exception {
+        initTetheredStateMachine(TETHERING_WIFI, UPSTREAM_IFACE);
+
+        verifyNoMoreInteractions(mNMService, mStatsService, mTetherHelper);
+
+        for (int i = 0; i < 5; i++) {
+            dispatchTetherConnectionChanged(UPSTREAM_IFACE);
+            verifyNoMoreInteractions(mNMService, mStatsService, mTetherHelper);
+        }
+    }
+
     /**
      * Send a command to the state machine under test, and run the event loop to idle.
      *
diff --git a/tests/net/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitorTest.java b/tests/net/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitorTest.java
index b8c739b..3ed56df 100644
--- a/tests/net/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitorTest.java
+++ b/tests/net/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitorTest.java
@@ -23,7 +23,13 @@
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.anyInt;
 import static org.mockito.Mockito.reset;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoMoreInteractions;
 
 import android.content.Context;
 import android.net.ConnectivityManager;
@@ -40,6 +46,7 @@
 import org.junit.runner.RunWith;
 import org.junit.Test;
 import org.mockito.Mock;
+import org.mockito.Mockito;
 import org.mockito.MockitoAnnotations;
 
 import java.util.HashMap;
@@ -64,7 +71,7 @@
         reset(mContext);
         reset(mCS);
 
-        mCM = new TestConnectivityManager(mContext, mCS);
+        mCM = spy(new TestConnectivityManager(mContext, mCS));
         mUNM = new UpstreamNetworkMonitor(null, EVENT_UNM_UPDATE, (ConnectivityManager) mCM);
     }
 
@@ -126,6 +133,42 @@
     }
 
     @Test
+    public void testDuplicateMobileRequestsIgnored() throws Exception {
+        assertFalse(mUNM.mobileNetworkRequested());
+        assertEquals(0, mCM.requested.size());
+
+        mUNM.start();
+        verify(mCM, Mockito.times(1)).registerNetworkCallback(
+                any(NetworkRequest.class), any(NetworkCallback.class));
+        verify(mCM, Mockito.times(1)).registerDefaultNetworkCallback(any(NetworkCallback.class));
+        assertFalse(mUNM.mobileNetworkRequested());
+        assertEquals(0, mCM.requested.size());
+
+        mUNM.updateMobileRequiresDun(true);
+        mUNM.registerMobileNetworkRequest();
+        verify(mCM, Mockito.times(1)).requestNetwork(
+                any(NetworkRequest.class), any(NetworkCallback.class), anyInt(), anyInt());
+
+        assertTrue(mUNM.mobileNetworkRequested());
+        assertUpstreamTypeRequested(TYPE_MOBILE_DUN);
+        assertTrue(mCM.isDunRequested());
+
+        // Try a few things that must not result in any state change.
+        mUNM.registerMobileNetworkRequest();
+        mUNM.updateMobileRequiresDun(true);
+        mUNM.registerMobileNetworkRequest();
+
+        assertTrue(mUNM.mobileNetworkRequested());
+        assertUpstreamTypeRequested(TYPE_MOBILE_DUN);
+        assertTrue(mCM.isDunRequested());
+
+        mUNM.stop();
+        verify(mCM, times(3)).unregisterNetworkCallback(any(NetworkCallback.class));
+
+        verifyNoMoreInteractions(mCM);
+    }
+
+    @Test
     public void testRequestsDunNetwork() throws Exception {
         assertFalse(mUNM.mobileNetworkRequested());
         assertEquals(0, mCM.requested.size());
@@ -149,7 +192,7 @@
     }
 
     @Test
-    public void testUpdateMobileRequiredDun() throws Exception {
+    public void testUpdateMobileRequiresDun() throws Exception {
         mUNM.start();
 
         // Test going from no-DUN to DUN correctly re-registers callbacks.
@@ -180,7 +223,7 @@
                 mCM.legacyTypeMap.values().iterator().next());
     }
 
-    private static class TestConnectivityManager extends ConnectivityManager {
+    public static class TestConnectivityManager extends ConnectivityManager {
         public Set<NetworkCallback> trackingDefault = new HashSet<>();
         public Map<NetworkCallback, NetworkRequest> listening = new HashMap<>();
         public Map<NetworkCallback, NetworkRequest> requested = new HashMap<>();
diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp
index 63498f7..ff306ce 100644
--- a/tools/aapt/ResourceTable.cpp
+++ b/tools/aapt/ResourceTable.cpp
@@ -2204,8 +2204,10 @@
                            package.string(), package.size(),
                            &specFlags);
     if (rid != 0) {
-        if (onlyPublic) {
-            if ((specFlags & ResTable_typeSpec::SPEC_PUBLIC) == 0) {
+        if (onlyPublic && (specFlags & ResTable_typeSpec::SPEC_PUBLIC) == 0) {
+            // If this is a feature split and the resource has the same
+            // package name as us, then everything is public.
+            if (mPackageType != AppFeature || mAssetsPackage != package) {
                 return 0;
             }
         }
diff --git a/tools/aapt2/LoadedApk.cpp b/tools/aapt2/LoadedApk.cpp
index 3d466ef..3d7bd94 100644
--- a/tools/aapt2/LoadedApk.cpp
+++ b/tools/aapt2/LoadedApk.cpp
@@ -16,10 +16,15 @@
 
 #include "LoadedApk.h"
 
+#include "ResourceValues.h"
+#include "ValueVisitor.h"
+#include "flatten/Archive.h"
+#include "flatten/TableFlattener.h"
+
 namespace aapt {
 
-std::unique_ptr<LoadedApk> LoadedApk::LoadApkFromPath(
-    IAaptContext* context, const StringPiece& path) {
+std::unique_ptr<LoadedApk> LoadedApk::LoadApkFromPath(IAaptContext* context,
+                                                      const android::StringPiece& path) {
   Source source(path);
   std::string error;
   std::unique_ptr<io::ZipFileCollection> apk =
@@ -53,4 +58,67 @@
   return util::make_unique<LoadedApk>(source, std::move(apk), std::move(table));
 }
 
+bool LoadedApk::WriteToArchive(IAaptContext* context, IArchiveWriter* writer) {
+  std::set<std::string> referenced_resources;
+  // List the files being referenced in the resource table.
+  for (auto& pkg : table_->packages) {
+    for (auto& type : pkg->types) {
+      for (auto& entry : type->entries) {
+        for (auto& config_value : entry->values) {
+          FileReference* file_ref = ValueCast<FileReference>(config_value->value.get());
+          if (file_ref) {
+            referenced_resources.insert(*file_ref->path);
+          }
+        }
+      }
+    }
+  }
+
+  std::unique_ptr<io::IFileCollectionIterator> iterator = apk_->Iterator();
+  while (iterator->HasNext()) {
+    io::IFile* file = iterator->Next();
+
+    std::string path = file->GetSource().path;
+    // The name of the path has the format "<zip-file-name>@<path-to-file>".
+    path = path.substr(path.find("@") + 1);
+
+    // Skip resources that are not referenced if requested.
+    if (path.find("res/") == 0 && referenced_resources.find(path) == referenced_resources.end()) {
+      if (context->IsVerbose()) {
+        context->GetDiagnostics()->Note(DiagMessage()
+                                        << "Removing resource '" << path << "' from APK.");
+      }
+      continue;
+    }
+
+    // The resource table needs to be reserialized since it might have changed.
+    if (path == "resources.arsc") {
+      BigBuffer buffer = BigBuffer(1024);
+      TableFlattener flattener(&buffer);
+      if (!flattener.Consume(context, table_.get())) {
+        return false;
+      }
+
+      if (!writer->StartEntry(path, ArchiveEntry::kAlign) || !writer->WriteEntry(buffer) ||
+          !writer->FinishEntry()) {
+        context->GetDiagnostics()->Error(DiagMessage()
+                                         << "Error when writing file '" << path << "' in APK.");
+        return false;
+      }
+      continue;
+    }
+
+    std::unique_ptr<io::IData> data = file->OpenAsData();
+    uint32_t compression_flags = file->WasCompressed() ? ArchiveEntry::kCompress : 0u;
+    if (!writer->StartEntry(path, compression_flags) ||
+        !writer->WriteEntry(data->data(), data->size()) || !writer->FinishEntry()) {
+      context->GetDiagnostics()->Error(DiagMessage()
+                                       << "Error when writing file '" << path << "' in APK.");
+      return false;
+    }
+  }
+
+  return true;
+}
+
 }  // namespace aapt
diff --git a/tools/aapt2/LoadedApk.h b/tools/aapt2/LoadedApk.h
index 0cc2d22..f8878d1 100644
--- a/tools/aapt2/LoadedApk.h
+++ b/tools/aapt2/LoadedApk.h
@@ -19,12 +19,11 @@
 
 #include "androidfw/StringPiece.h"
 
-#include "io/ZipArchive.h"
 #include "ResourceTable.h"
+#include "flatten/Archive.h"
+#include "io/ZipArchive.h"
 #include "unflatten/BinaryResourceParser.h"
 
-using android::StringPiece;
-
 namespace aapt {
 
 /** Info about an APK loaded in memory. */
@@ -42,8 +41,14 @@
 
   const Source& GetSource() { return source_; }
 
-  static std::unique_ptr<LoadedApk> LoadApkFromPath(
-      IAaptContext* context, const StringPiece& path);
+  /**
+   * Writes the APK on disk at the given path, while also removing the resource
+   * files that are not referenced in the resource table.
+   */
+  bool WriteToArchive(IAaptContext* context, IArchiveWriter* writer);
+
+  static std::unique_ptr<LoadedApk> LoadApkFromPath(IAaptContext* context,
+                                                    const android::StringPiece& path);
 
  private:
   Source source_;
diff --git a/tools/aapt2/Main.cpp b/tools/aapt2/Main.cpp
index 3ed698b..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 = "5";
+static const char* sMinorVersion = "7";
 
 int PrintVersion() {
   std::cerr << "Android Asset Packaging Tool (aapt) " << sMajorVersion << "."
diff --git a/tools/aapt2/Resource.cpp b/tools/aapt2/Resource.cpp
index fdabce1..35971e7 100644
--- a/tools/aapt2/Resource.cpp
+++ b/tools/aapt2/Resource.cpp
@@ -39,6 +39,8 @@
       return "bool";
     case ResourceType::kColor:
       return "color";
+    case ResourceType::kConfigVarying:
+      return "configVarying";
     case ResourceType::kDimen:
       return "dimen";
     case ResourceType::kDrawable:
@@ -85,6 +87,7 @@
     {"^attr-private", ResourceType::kAttrPrivate},
     {"bool", ResourceType::kBool},
     {"color", ResourceType::kColor},
+    {"configVarying", ResourceType::kConfigVarying},
     {"dimen", ResourceType::kDimen},
     {"drawable", ResourceType::kDrawable},
     {"font", ResourceType::kFont},
diff --git a/tools/aapt2/Resource.h b/tools/aapt2/Resource.h
index 1950ea3..4d915d9 100644
--- a/tools/aapt2/Resource.h
+++ b/tools/aapt2/Resource.h
@@ -44,6 +44,11 @@
   kAttrPrivate,
   kBool,
   kColor,
+
+  // Not really a type, but it shows up in some CTS tests and
+  // we need to continue respecting it.
+  kConfigVarying,
+
   kDimen,
   kDrawable,
   kFont,
diff --git a/tools/aapt2/ResourceParser.cpp b/tools/aapt2/ResourceParser.cpp
index 79379fe..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) {
@@ -338,50 +365,52 @@
   using BagParseFunc = std::function<bool(ResourceParser*, xml::XmlPullParser*,
                                           ParsedResource*)>;
 
-  static const auto elToItemMap =
-      ImmutableMap<std::string, ItemTypeFormat>::CreatePreSorted({
-          {"bool", {ResourceType::kBool, android::ResTable_map::TYPE_BOOLEAN}},
-          {"color", {ResourceType::kColor, android::ResTable_map::TYPE_COLOR}},
-          {"dimen",
-           {ResourceType::kDimen, android::ResTable_map::TYPE_FLOAT |
-                                      android::ResTable_map::TYPE_FRACTION |
-                                      android::ResTable_map::TYPE_DIMENSION}},
-          {"drawable",
-           {ResourceType::kDrawable, android::ResTable_map::TYPE_COLOR}},
-          {"fraction",
-           {ResourceType::kFraction,
-            android::ResTable_map::TYPE_FLOAT |
-                android::ResTable_map::TYPE_FRACTION |
-                android::ResTable_map::TYPE_DIMENSION}},
-          {"integer",
-           {ResourceType::kInteger, android::ResTable_map::TYPE_INTEGER}},
-          {"string",
-           {ResourceType::kString, android::ResTable_map::TYPE_STRING}},
-      });
+  static const auto elToItemMap = ImmutableMap<std::string, ItemTypeFormat>::CreatePreSorted({
+      {"bool", {ResourceType::kBool, android::ResTable_map::TYPE_BOOLEAN}},
+      {"color", {ResourceType::kColor, android::ResTable_map::TYPE_COLOR}},
+      {"configVarying", {ResourceType::kConfigVarying, android::ResTable_map::TYPE_ANY}},
+      {"dimen",
+       {ResourceType::kDimen,
+        android::ResTable_map::TYPE_FLOAT | android::ResTable_map::TYPE_FRACTION |
+            android::ResTable_map::TYPE_DIMENSION}},
+      {"drawable", {ResourceType::kDrawable, android::ResTable_map::TYPE_COLOR}},
+      {"fraction",
+       {ResourceType::kFraction,
+        android::ResTable_map::TYPE_FLOAT | android::ResTable_map::TYPE_FRACTION |
+            android::ResTable_map::TYPE_DIMENSION}},
+      {"integer", {ResourceType::kInteger, android::ResTable_map::TYPE_INTEGER}},
+      {"string", {ResourceType::kString, android::ResTable_map::TYPE_STRING}},
+  });
 
-  static const auto elToBagMap =
-      ImmutableMap<std::string, BagParseFunc>::CreatePreSorted({
-          {"add-resource", std::mem_fn(&ResourceParser::ParseAddResource)},
-          {"array", std::mem_fn(&ResourceParser::ParseArray)},
-          {"attr", std::mem_fn(&ResourceParser::ParseAttr)},
-          {"declare-styleable",
-           std::mem_fn(&ResourceParser::ParseDeclareStyleable)},
-          {"integer-array", std::mem_fn(&ResourceParser::ParseIntegerArray)},
-          {"java-symbol", std::mem_fn(&ResourceParser::ParseSymbol)},
-          {"plurals", std::mem_fn(&ResourceParser::ParsePlural)},
-          {"public", std::mem_fn(&ResourceParser::ParsePublic)},
-          {"public-group", std::mem_fn(&ResourceParser::ParsePublicGroup)},
-          {"string-array", std::mem_fn(&ResourceParser::ParseStringArray)},
-          {"style", std::mem_fn(&ResourceParser::ParseStyle)},
-          {"symbol", std::mem_fn(&ResourceParser::ParseSymbol)},
-      });
+  static const auto elToBagMap = ImmutableMap<std::string, BagParseFunc>::CreatePreSorted({
+      {"add-resource", std::mem_fn(&ResourceParser::ParseAddResource)},
+      {"array", std::mem_fn(&ResourceParser::ParseArray)},
+      {"attr", std::mem_fn(&ResourceParser::ParseAttr)},
+      {"configVarying",
+       std::bind(&ResourceParser::ParseStyle, std::placeholders::_1, ResourceType::kConfigVarying,
+                 std::placeholders::_2, std::placeholders::_3)},
+      {"declare-styleable", std::mem_fn(&ResourceParser::ParseDeclareStyleable)},
+      {"integer-array", std::mem_fn(&ResourceParser::ParseIntegerArray)},
+      {"java-symbol", std::mem_fn(&ResourceParser::ParseSymbol)},
+      {"plurals", std::mem_fn(&ResourceParser::ParsePlural)},
+      {"public", std::mem_fn(&ResourceParser::ParsePublic)},
+      {"public-group", std::mem_fn(&ResourceParser::ParsePublicGroup)},
+      {"string-array", std::mem_fn(&ResourceParser::ParseStringArray)},
+      {"style", std::bind(&ResourceParser::ParseStyle, std::placeholders::_1, ResourceType::kStyle,
+                          std::placeholders::_2, std::placeholders::_3)},
+      {"symbol", std::mem_fn(&ResourceParser::ParseSymbol)},
+  });
 
   std::string resource_type = parser->element_name();
 
   // The value format accepted for this resource.
   uint32_t resource_format = 0u;
 
+  bool can_be_item = true;
+  bool can_be_bag = true;
   if (resource_type == "item") {
+    can_be_bag = false;
+
     // Items have their type encoded in the type attribute.
     if (Maybe<StringPiece> maybe_type =
             xml::FindNonEmptyAttribute(parser, "type")) {
@@ -406,6 +435,17 @@
         return false;
       }
     }
+  } else if (resource_type == "bag") {
+    can_be_item = false;
+
+    // Bags have their type encoded in the type attribute.
+    if (Maybe<StringPiece> maybe_type = xml::FindNonEmptyAttribute(parser, "type")) {
+      resource_type = maybe_type.value().to_string();
+    } else {
+      diag_->Error(DiagMessage(source_.WithLine(parser->line_number()))
+                   << "<bag> must have a 'type' attribute");
+      return false;
+    }
   }
 
   // Get the name of the resource. This will be checked later, because not all
@@ -426,36 +466,61 @@
     return true;
   }
 
-  const auto item_iter = elToItemMap.find(resource_type);
-  if (item_iter != elToItemMap.end()) {
-    // This is an item, record its type and format and start parsing.
+  if (can_be_item) {
+    const auto item_iter = elToItemMap.find(resource_type);
+    if (item_iter != elToItemMap.end()) {
+      // This is an item, record its type and format and start parsing.
 
-    if (!maybe_name) {
-      diag_->Error(DiagMessage(out_resource->source)
-                   << "<" << parser->element_name()
-                   << "> missing 'name' attribute");
-      return false;
+      if (!maybe_name) {
+        diag_->Error(DiagMessage(out_resource->source)
+                     << "<" << parser->element_name() << "> missing 'name' attribute");
+        return false;
+      }
+
+      out_resource->name.type = item_iter->second.type;
+      out_resource->name.entry = maybe_name.value().to_string();
+
+      // Only use the implicit format for this type if it wasn't overridden.
+      if (!resource_format) {
+        resource_format = item_iter->second.format;
+      }
+
+      if (!ParseItem(parser, out_resource, resource_format)) {
+        return false;
+      }
+      return true;
     }
-
-    out_resource->name.type = item_iter->second.type;
-    out_resource->name.entry = maybe_name.value().to_string();
-
-    // Only use the implicit format for this type if it wasn't overridden.
-    if (!resource_format) {
-      resource_format = item_iter->second.format;
-    }
-
-    if (!ParseItem(parser, out_resource, resource_format)) {
-      return false;
-    }
-    return true;
   }
 
   // This might be a bag or something.
-  const auto bag_iter = elToBagMap.find(resource_type);
-  if (bag_iter != elToBagMap.end()) {
-    // Ensure we have a name (unless this is a <public-group>).
-    if (resource_type != "public-group") {
+  if (can_be_bag) {
+    const auto bag_iter = elToBagMap.find(resource_type);
+    if (bag_iter != elToBagMap.end()) {
+      // Ensure we have a name (unless this is a <public-group>).
+      if (resource_type != "public-group") {
+        if (!maybe_name) {
+          diag_->Error(DiagMessage(out_resource->source)
+                       << "<" << parser->element_name() << "> missing 'name' attribute");
+          return false;
+        }
+
+        out_resource->name.entry = maybe_name.value().to_string();
+      }
+
+      // Call the associated parse method. The type will be filled in by the
+      // parse func.
+      if (!bag_iter->second(this, parser, out_resource)) {
+        return false;
+      }
+      return true;
+    }
+  }
+
+  if (can_be_item) {
+    // Try parsing the elementName (or type) as a resource. These shall only be
+    // resources like 'layout' or 'xml' and they can only be references.
+    const ResourceType* parsed_type = ParseResourceType(resource_type);
+    if (parsed_type) {
       if (!maybe_name) {
         diag_->Error(DiagMessage(out_resource->source)
                      << "<" << parser->element_name()
@@ -463,39 +528,16 @@
         return false;
       }
 
+      out_resource->name.type = *parsed_type;
       out_resource->name.entry = maybe_name.value().to_string();
+      out_resource->value = ParseXml(parser, android::ResTable_map::TYPE_REFERENCE, kNoRawString);
+      if (!out_resource->value) {
+        diag_->Error(DiagMessage(out_resource->source)
+                     << "invalid value for type '" << *parsed_type << "'. Expected a reference");
+        return false;
+      }
+      return true;
     }
-
-    // Call the associated parse method. The type will be filled in by the
-    // parse func.
-    if (!bag_iter->second(this, parser, out_resource)) {
-      return false;
-    }
-    return true;
-  }
-
-  // Try parsing the elementName (or type) as a resource. These shall only be
-  // resources like 'layout' or 'xml' and they can only be references.
-  const ResourceType* parsed_type = ParseResourceType(resource_type);
-  if (parsed_type) {
-    if (!maybe_name) {
-      diag_->Error(DiagMessage(out_resource->source)
-                   << "<" << parser->element_name()
-                   << "> missing 'name' attribute");
-      return false;
-    }
-
-    out_resource->name.type = *parsed_type;
-    out_resource->name.entry = maybe_name.value().to_string();
-    out_resource->value =
-        ParseXml(parser, android::ResTable_map::TYPE_REFERENCE, kNoRawString);
-    if (!out_resource->value) {
-      diag_->Error(DiagMessage(out_resource->source)
-                   << "invalid value for type '" << *parsed_type
-                   << "'. Expected a reference");
-      return false;
-    }
-    return true;
   }
 
   diag_->Warn(DiagMessage(out_resource->source)
@@ -533,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) {
@@ -567,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) {
@@ -594,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 =
@@ -615,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; "
@@ -631,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;
 }
@@ -1048,9 +1092,9 @@
   return true;
 }
 
-bool ResourceParser::ParseStyle(xml::XmlPullParser* parser,
+bool ResourceParser::ParseStyle(const ResourceType type, xml::XmlPullParser* parser,
                                 ParsedResource* out_resource) {
-  out_resource->name.type = ResourceType::kStyle;
+  out_resource->name.type = type;
 
   std::unique_ptr<Style> style = util::make_unique<Style>();
 
@@ -1136,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 c12dacf..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.
@@ -102,7 +102,8 @@
                      bool weak);
   Maybe<Attribute::Symbol> ParseEnumOrFlagItem(xml::XmlPullParser* parser,
                                                const android::StringPiece& tag);
-  bool ParseStyle(xml::XmlPullParser* parser, ParsedResource* out_resource);
+  bool ParseStyle(const ResourceType type, xml::XmlPullParser* parser,
+                  ParsedResource* out_resource);
   bool ParseStyleItem(xml::XmlPullParser* parser, Style* style);
   bool ParseDeclareStyleable(xml::XmlPullParser* parser,
                              ParsedResource* out_resource);
diff --git a/tools/aapt2/ResourceParser_test.cpp b/tools/aapt2/ResourceParser_test.cpp
index 5762fb0..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);
 }
 
@@ -719,4 +763,23 @@
   EXPECT_EQ(uint32_t(android::Res_value::TYPE_FLOAT), val->value.dataType);
 }
 
+TEST_F(ResourceParserTest, ParseConfigVaryingItem) {
+  std::string input = R"EOF(<item name="foo" type="configVarying">Hey</item>)EOF";
+  ASSERT_TRUE(TestParse(input));
+  ASSERT_NE(nullptr, test::GetValue<String>(&table_, "configVarying/foo"));
+}
+
+TEST_F(ResourceParserTest, ParseBagElement) {
+  std::string input =
+      R"EOF(<bag name="bag" type="configVarying"><item name="test">Hello!</item></bag>)EOF";
+  ASSERT_TRUE(TestParse(input));
+
+  Style* val = test::GetValue<Style>(&table_, "configVarying/bag");
+  ASSERT_NE(nullptr, val);
+
+  ASSERT_EQ(1u, val->entries.size());
+  EXPECT_EQ(Reference(test::ParseNameOrDie("attr/test")), val->entries[0].key);
+  EXPECT_NE(nullptr, ValueCast<RawString>(val->entries[0].value.get()));
+}
+
 }  // namespace aapt
diff --git a/tools/aapt2/ResourceUtils.cpp b/tools/aapt2/ResourceUtils.cpp
index 1123967..150dc58 100644
--- a/tools/aapt2/ResourceUtils.cpp
+++ b/tools/aapt2/ResourceUtils.cpp
@@ -19,6 +19,7 @@
 #include <sstream>
 
 #include "androidfw/ResourceTypes.h"
+#include "androidfw/ResourceUtils.h"
 
 #include "NameMangler.h"
 #include "SdkConstants.h"
@@ -69,31 +70,6 @@
   return name_out;
 }
 
-bool ExtractResourceName(const StringPiece& str, StringPiece* out_package,
-                         StringPiece* out_type, StringPiece* out_entry) {
-  bool has_package_separator = false;
-  bool has_type_separator = false;
-  const char* start = str.data();
-  const char* end = start + str.size();
-  const char* current = start;
-  while (current != end) {
-    if (out_type->size() == 0 && *current == '/') {
-      has_type_separator = true;
-      out_type->assign(start, current - start);
-      start = current + 1;
-    } else if (out_package->size() == 0 && *current == ':') {
-      has_package_separator = true;
-      out_package->assign(start, current - start);
-      start = current + 1;
-    }
-    current++;
-  }
-  out_entry->assign(start, end - start);
-
-  return !(has_package_separator && out_package->empty()) &&
-         !(has_type_separator && out_type->empty());
-}
-
 bool ParseResourceName(const StringPiece& str, ResourceNameRef* out_ref,
                        bool* out_private) {
   if (str.empty()) {
@@ -110,8 +86,8 @@
   StringPiece package;
   StringPiece type;
   StringPiece entry;
-  if (!ExtractResourceName(str.substr(offset, str.size() - offset), &package,
-                           &type, &entry)) {
+  if (!android::ExtractResourceName(str.substr(offset, str.size() - offset), &package, &type,
+                                    &entry)) {
     return false;
   }
 
@@ -197,8 +173,8 @@
     StringPiece package;
     StringPiece type;
     StringPiece entry;
-    if (!ExtractResourceName(trimmed_str.substr(1, trimmed_str.size() - 1),
-                             &package, &type, &entry)) {
+    if (!android::ExtractResourceName(trimmed_str.substr(1, trimmed_str.size() - 1), &package,
+                                      &type, &entry)) {
       return false;
     }
 
@@ -258,7 +234,7 @@
   ref.type = ResourceType::kStyle;
 
   StringPiece type_str;
-  ExtractResourceName(name, &ref.package, &type_str, &ref.entry);
+  android::ExtractResourceName(name, &ref.package, &type_str, &ref.entry);
   if (!type_str.empty()) {
     // If we have a type, make sure it is a Style.
     const ResourceType* parsed_type = ParseResourceType(type_str);
diff --git a/tools/aapt2/ResourceUtils.h b/tools/aapt2/ResourceUtils.h
index bd3a8e3..59b78f4 100644
--- a/tools/aapt2/ResourceUtils.h
+++ b/tools/aapt2/ResourceUtils.h
@@ -29,18 +29,6 @@
 namespace aapt {
 namespace ResourceUtils {
 
-/*
- * Extracts the package, type, and name from a string of the format:
- *
- *      [package:]type/name
- *
- * where the package can be empty. Validation must be performed on each
- * individual extracted piece to verify that the pieces are valid.
- * Returns false if there was no package but a ':' was present.
- */
-bool ExtractResourceName(const android::StringPiece& str, android::StringPiece* out_package,
-                         android::StringPiece* out_type, android::StringPiece* out_entry);
-
 /**
  * Returns true if the string was parsed as a resource name
  * ([*][package:]type/name), with
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/Resource_test.cpp b/tools/aapt2/Resource_test.cpp
index 6acb4d3..ad4e3ce 100644
--- a/tools/aapt2/Resource_test.cpp
+++ b/tools/aapt2/Resource_test.cpp
@@ -49,6 +49,10 @@
   ASSERT_NE(type, nullptr);
   EXPECT_EQ(*type, ResourceType::kColor);
 
+  type = ParseResourceType("configVarying");
+  ASSERT_NE(type, nullptr);
+  EXPECT_EQ(*type, ResourceType::kConfigVarying);
+
   type = ParseResourceType("dimen");
   ASSERT_NE(type, nullptr);
   EXPECT_EQ(*type, ResourceType::kDimen);
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/io/File.h b/tools/aapt2/io/File.h
index 3d5b5b1..1ef9743 100644
--- a/tools/aapt2/io/File.h
+++ b/tools/aapt2/io/File.h
@@ -63,6 +63,11 @@
 
   IFile* CreateFileSegment(size_t offset, size_t len);
 
+  /** Returns whether the file was compressed before it was stored in memory. */
+  virtual bool WasCompressed() {
+    return false;
+  }
+
  private:
   // Any segments created from this IFile need to be owned by this IFile, so
   // keep them
diff --git a/tools/aapt2/io/ZipArchive.cpp b/tools/aapt2/io/ZipArchive.cpp
index 62b436f..6494d2d 100644
--- a/tools/aapt2/io/ZipArchive.cpp
+++ b/tools/aapt2/io/ZipArchive.cpp
@@ -59,6 +59,10 @@
 
 const Source& ZipFile::GetSource() const { return source_; }
 
+bool ZipFile::WasCompressed() {
+  return zip_entry_.method != kCompressStored;
+}
+
 ZipFileCollectionIterator::ZipFileCollectionIterator(
     ZipFileCollection* collection)
     : current_(collection->files_.begin()), end_(collection->files_.end()) {}
@@ -66,7 +70,7 @@
 bool ZipFileCollectionIterator::HasNext() { return current_ != end_; }
 
 IFile* ZipFileCollectionIterator::Next() {
-  IFile* result = current_->second.get();
+  IFile* result = current_->get();
   ++current_;
   return result;
 }
@@ -110,8 +114,10 @@
         std::string(reinterpret_cast<const char*>(zip_entry_name.name),
                     zip_entry_name.name_length);
     std::string nested_path = path.to_string() + "@" + zip_entry_path;
-    collection->files_[zip_entry_path] = util::make_unique<ZipFile>(
-        collection->handle_, zip_data, Source(nested_path));
+    std::unique_ptr<IFile> file =
+        util::make_unique<ZipFile>(collection->handle_, zip_data, Source(nested_path));
+    collection->files_by_name_[zip_entry_path] = file.get();
+    collection->files_.push_back(std::move(file));
   }
 
   if (result != -1) {
@@ -122,9 +128,9 @@
 }
 
 IFile* ZipFileCollection::FindFile(const StringPiece& path) {
-  auto iter = files_.find(path.to_string());
-  if (iter != files_.end()) {
-    return iter->second.get();
+  auto iter = files_by_name_.find(path.to_string());
+  if (iter != files_by_name_.end()) {
+    return iter->second;
   }
   return nullptr;
 }
diff --git a/tools/aapt2/io/ZipArchive.h b/tools/aapt2/io/ZipArchive.h
index 634adad..56c74e3 100644
--- a/tools/aapt2/io/ZipArchive.h
+++ b/tools/aapt2/io/ZipArchive.h
@@ -40,6 +40,7 @@
 
   std::unique_ptr<IData> OpenAsData() override;
   const Source& GetSource() const override;
+  bool WasCompressed() override;
 
  private:
   ZipArchiveHandle zip_handle_;
@@ -57,7 +58,7 @@
   io::IFile* Next() override;
 
  private:
-  std::map<std::string, std::unique_ptr<IFile>>::const_iterator current_, end_;
+  std::vector<std::unique_ptr<IFile>>::const_iterator current_, end_;
 };
 
 /**
@@ -78,7 +79,8 @@
   ZipFileCollection();
 
   ZipArchiveHandle handle_;
-  std::map<std::string, std::unique_ptr<IFile>> files_;
+  std::vector<std::unique_ptr<IFile>> files_;
+  std::map<std::string, IFile*> files_by_name_;
 };
 
 }  // namespace io
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/link/ManifestFixer.cpp b/tools/aapt2/link/ManifestFixer.cpp
index e5eaf2f..b4cf4f8 100644
--- a/tools/aapt2/link/ManifestFixer.cpp
+++ b/tools/aapt2/link/ManifestFixer.cpp
@@ -111,6 +111,36 @@
   return true;
 }
 
+// Checks that <uses-feature> has android:glEsVersion or android:name, not both (or neither).
+static bool VerifyUsesFeature(xml::Element* el, SourcePathDiagnostics* diag) {
+  bool has_name = false;
+  if (xml::Attribute* attr = el->FindAttribute(xml::kSchemaAndroid, "name")) {
+    if (attr->value.empty()) {
+      diag->Error(DiagMessage(el->line_number)
+                  << "android:name in <uses-feature> must not be empty");
+      return false;
+    }
+    has_name = true;
+  }
+
+  bool has_gl_es_version = false;
+  if (xml::Attribute* attr = el->FindAttribute(xml::kSchemaAndroid, "glEsVersion")) {
+    if (has_name) {
+      diag->Error(DiagMessage(el->line_number)
+                  << "cannot define both android:name and android:glEsVersion in <uses-feature>");
+      return false;
+    }
+    has_gl_es_version = true;
+  }
+
+  if (!has_name && !has_gl_es_version) {
+    diag->Error(DiagMessage(el->line_number)
+                << "<uses-feature> must have either android:name or android:glEsVersion attribute");
+    return false;
+  }
+  return true;
+}
+
 bool ManifestFixer::BuildRules(xml::XmlActionExecutor* executor,
                                IDiagnostics* diag) {
   // First verify some options.
@@ -134,15 +164,25 @@
     }
   }
 
-  // Common intent-filter actions.
+  // Common <intent-filter> actions.
   xml::XmlNodeAction intent_filter_action;
   intent_filter_action["action"];
   intent_filter_action["category"];
   intent_filter_action["data"];
 
-  // Common meta-data actions.
+  // Common <meta-data> actions.
   xml::XmlNodeAction meta_data_action;
 
+  // Common <uses-feature> actions.
+  xml::XmlNodeAction uses_feature_action;
+  uses_feature_action.Action(VerifyUsesFeature);
+
+  // Common component actions.
+  xml::XmlNodeAction component_action;
+  component_action.Action(RequiredNameIsJavaClassName);
+  component_action["intent-filter"] = intent_filter_action;
+  component_action["meta-data"] = meta_data_action;
+
   // Manifest actions.
   xml::XmlNodeAction& manifest_action = (*executor)["manifest"];
   manifest_action.Action(VerifyManifest);
@@ -190,6 +230,7 @@
   });
 
   // Instrumentation actions.
+  manifest_action["instrumentation"].Action(RequiredNameIsJavaClassName);
   manifest_action["instrumentation"].Action([&](xml::Element* el) -> bool {
     if (!options_.rename_instrumentation_target_package) {
       return true;
@@ -201,6 +242,7 @@
     }
     return true;
   });
+  manifest_action["instrumentation"]["meta-data"] = meta_data_action;
 
   manifest_action["original-package"];
   manifest_action["protected-broadcast"];
@@ -208,51 +250,28 @@
   manifest_action["permission"];
   manifest_action["permission-tree"];
   manifest_action["permission-group"];
-
   manifest_action["uses-configuration"];
-  manifest_action["uses-feature"];
   manifest_action["supports-screens"];
-
+  manifest_action["uses-feature"] = uses_feature_action;
+  manifest_action["feature-group"]["uses-feature"] = uses_feature_action;
   manifest_action["compatible-screens"];
   manifest_action["compatible-screens"]["screen"];
-
   manifest_action["supports-gl-texture"];
-
   manifest_action["meta-data"] = meta_data_action;
 
   // Application actions.
   xml::XmlNodeAction& application_action = manifest_action["application"];
   application_action.Action(OptionalNameIsJavaClassName);
 
-  // Uses library actions.
   application_action["uses-library"];
-
-  // Meta-data.
   application_action["meta-data"] = meta_data_action;
-
-  // Activity actions.
-  application_action["activity"].Action(RequiredNameIsJavaClassName);
-  application_action["activity"]["intent-filter"] = intent_filter_action;
-  application_action["activity"]["meta-data"] = meta_data_action;
-
-  // Activity alias actions.
-  application_action["activity-alias"]["intent-filter"] = intent_filter_action;
-  application_action["activity-alias"]["meta-data"] = meta_data_action;
-
-  // Service actions.
-  application_action["service"].Action(RequiredNameIsJavaClassName);
-  application_action["service"]["intent-filter"] = intent_filter_action;
-  application_action["service"]["meta-data"] = meta_data_action;
-
-  // Receiver actions.
-  application_action["receiver"].Action(RequiredNameIsJavaClassName);
-  application_action["receiver"]["intent-filter"] = intent_filter_action;
-  application_action["receiver"]["meta-data"] = meta_data_action;
+  application_action["activity"] = component_action;
+  application_action["activity-alias"] = component_action;
+  application_action["service"] = component_action;
+  application_action["receiver"] = component_action;
 
   // Provider actions.
-  application_action["provider"].Action(RequiredNameIsJavaClassName);
-  application_action["provider"]["intent-filter"] = intent_filter_action;
-  application_action["provider"]["meta-data"] = meta_data_action;
+  application_action["provider"] = component_action;
   application_action["provider"]["grant-uri-permissions"];
   application_action["provider"]["path-permissions"];
 
diff --git a/tools/aapt2/link/ManifestFixer_test.cpp b/tools/aapt2/link/ManifestFixer_test.cpp
index 12a304a..ce84993 100644
--- a/tools/aapt2/link/ManifestFixer_test.cpp
+++ b/tools/aapt2/link/ManifestFixer_test.cpp
@@ -90,7 +90,7 @@
 }
 
 TEST_F(ManifestFixerTest, AllowMetaData) {
-    auto doc = Verify(R"EOF(
+  auto doc = Verify(R"EOF(
         <manifest xmlns:android="http://schemas.android.com/apk/res/android"
                   package="android">
           <meta-data />
@@ -98,12 +98,13 @@
             <meta-data />
             <activity android:name=".Hi"><meta-data /></activity>
             <activity-alias android:name=".Ho"><meta-data /></activity-alias>
-            <receiver android:name=".OffToWork"><meta-data /></receiver>
-            <provider android:name=".We"><meta-data /></provider>
-            <service android:name=".Go"><meta-data /></service>
+            <receiver android:name=".OffTo"><meta-data /></receiver>
+            <provider android:name=".Work"><meta-data /></provider>
+            <service android:name=".We"><meta-data /></service>
           </application>
+          <instrumentation android:name=".Go"><meta-data /></instrumentation>
         </manifest>)EOF");
-    ASSERT_NE(nullptr, doc);
+  ASSERT_NE(nullptr, doc);
 }
 
 TEST_F(ManifestFixerTest, UseDefaultSdkVersionsIfNonePresent) {
@@ -290,7 +291,7 @@
   std::unique_ptr<xml::XmlResource> doc = VerifyWithOptions(R"EOF(
       <manifest xmlns:android="http://schemas.android.com/apk/res/android"
                 package="android">
-        <instrumentation android:targetPackage="android" />
+        <instrumentation android:name=".TestRunner" android:targetPackage="android" />
       </manifest>)EOF",
                                                             options);
   ASSERT_NE(nullptr, doc);
@@ -354,4 +355,51 @@
   EXPECT_NE(nullptr, ValueCast<BinaryPrimitive>(attr->compiled_value.get()));
 }
 
+TEST_F(ManifestFixerTest, UsesFeatureMustHaveNameOrGlEsVersion) {
+  std::string input = R"EOF(
+        <manifest xmlns:android="http://schemas.android.com/apk/res/android"
+                  package="android">
+          <uses-feature android:name="feature" />
+          <uses-feature android:glEsVersion="1" />
+          <feature-group />
+          <feature-group>
+            <uses-feature android:name="feature_in_group" />
+            <uses-feature android:glEsVersion="2" />
+          </feature-group>
+        </manifest>)EOF";
+  EXPECT_NE(nullptr, Verify(input));
+
+  input = R"EOF(
+        <manifest xmlns:android="http://schemas.android.com/apk/res/android"
+                  package="android">
+          <uses-feature android:name="feature" android:glEsVersion="1" />
+        </manifest>)EOF";
+  EXPECT_EQ(nullptr, Verify(input));
+
+  input = R"EOF(
+        <manifest xmlns:android="http://schemas.android.com/apk/res/android"
+                  package="android">
+          <uses-feature />
+        </manifest>)EOF";
+  EXPECT_EQ(nullptr, Verify(input));
+
+  input = R"EOF(
+        <manifest xmlns:android="http://schemas.android.com/apk/res/android"
+                  package="android">
+          <feature-group>
+            <uses-feature android:name="feature" android:glEsVersion="1" />
+          </feature-group>
+        </manifest>)EOF";
+  EXPECT_EQ(nullptr, Verify(input));
+
+  input = R"EOF(
+        <manifest xmlns:android="http://schemas.android.com/apk/res/android"
+                  package="android">
+          <feature-group>
+            <uses-feature />
+          </feature-group>
+        </manifest>)EOF";
+  EXPECT_EQ(nullptr, Verify(input));
+}
+
 }  // namespace aapt
diff --git a/tools/aapt2/readme.md b/tools/aapt2/readme.md
index e2a752e..8bc4e8c 100644
--- a/tools/aapt2/readme.md
+++ b/tools/aapt2/readme.md
@@ -1,5 +1,16 @@
 # 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.
+- Support `<bag>` tag and treat as `<style>` regardless of type.
+- Add `<feature-group>` manifest tag verification.
+- Add `<meta-data>` tag support to `<instrumentation>`.
+
 ## Version 2.5
 ### `aapt2 link ...`
 - Transition XML versioning: Adds a new flag `--no-version-transitions` to disable automatic
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 b3787ec..7260649 100644
--- a/tools/aapt2/strip/Strip.cpp
+++ b/tools/aapt2/strip/Strip.cpp
@@ -22,6 +22,7 @@
 #include "Diagnostics.h"
 #include "Flags.h"
 #include "LoadedApk.h"
+#include "split/TableSplitter.h"
 
 using android::StringPiece;
 
@@ -78,7 +79,22 @@
       context_->GetDiagnostics()->Note(DiagMessage() << "Stripping APK...");
     }
 
-    // TODO(lecesne): Implement stripping here.
+    // Stripping the APK using the TableSplitter with no splits and the target
+    // densities as the preferred densities. The resource table is modified in
+    // place in the LoadedApk.
+    TableSplitterOptions splitter_options;
+    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());
+
+    std::unique_ptr<IArchiveWriter> writer =
+        CreateZipFileArchiveWriter(context_->GetDiagnostics(), options_.output_path);
+    if (!apk->WriteToArchive(context_, writer.get())) {
+      return 1;
+    }
 
     return 0;
   }
diff --git a/tools/aapt2/unflatten/BinaryResourceParser.cpp b/tools/aapt2/unflatten/BinaryResourceParser.cpp
index aeabcff..7098fe9 100644
--- a/tools/aapt2/unflatten/BinaryResourceParser.cpp
+++ b/tools/aapt2/unflatten/BinaryResourceParser.cpp
@@ -370,8 +370,7 @@
       return false;
     }
 
-    if (!table_->AddResourceAllowMangled(name, config, {},
-                                         std::move(resource_value),
+    if (!table_->AddResourceAllowMangled(name, res_id, config, {}, std::move(resource_value),
                                          context_->GetDiagnostics())) {
       return false;
     }
diff --git a/tools/bit/main.cpp b/tools/bit/main.cpp
index 868d90a..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/.idea/libraries/mockito.xml b/tools/layoutlib/.idea/libraries/mockito.xml
new file mode 100644
index 0000000..032963e
--- /dev/null
+++ b/tools/layoutlib/.idea/libraries/mockito.xml
@@ -0,0 +1,9 @@
+<component name="libraryTable">
+  <library name="mockito">
+    <CLASSES>
+      <root url="jar://$PROJECT_DIR$/../../../../out/host/common/obj/JAVA_LIBRARIES/mockito-host_intermediates/javalib.jar!/" />
+    </CLASSES>
+    <JAVADOC />
+    <SOURCES />
+  </library>
+</component>
\ No newline at end of file
diff --git a/tools/layoutlib/.idea/libraries/objenesis.xml b/tools/layoutlib/.idea/libraries/objenesis.xml
new file mode 100644
index 0000000..1484de5
--- /dev/null
+++ b/tools/layoutlib/.idea/libraries/objenesis.xml
@@ -0,0 +1,9 @@
+<component name="libraryTable">
+  <library name="objenesis">
+    <CLASSES>
+      <root url="jar://$PROJECT_DIR$/../../../../out/host/common/obj/JAVA_LIBRARIES/objenesis-host_intermediates/javalib.jar!/" />
+    </CLASSES>
+    <JAVADOC />
+    <SOURCES />
+  </library>
+</component>
\ No newline at end of file
diff --git a/tools/layoutlib/bridge/bridge.iml b/tools/layoutlib/bridge/bridge.iml
index fbaed52..85ec3eb 100644
--- a/tools/layoutlib/bridge/bridge.iml
+++ b/tools/layoutlib/bridge/bridge.iml
@@ -86,5 +86,7 @@
       </library>
     </orderEntry>
     <orderEntry type="library" scope="TEST" name="junit" level="project" />
+    <orderEntry type="library" scope="TEST" name="mockito" level="project" />
+    <orderEntry type="library" scope="TEST" name="objenesis" level="project" />
   </component>
 </module>
\ No newline at end of file
diff --git a/core/java/android/service/autofill/CallbackHelper.java b/tools/layoutlib/bridge/src/android/app/SystemServiceRegistry_Accessor.java
similarity index 60%
copy from core/java/android/service/autofill/CallbackHelper.java
copy to tools/layoutlib/bridge/src/android/app/SystemServiceRegistry_Accessor.java
index ded8f97..591aee0 100644
--- a/core/java/android/service/autofill/CallbackHelper.java
+++ b/tools/layoutlib/bridge/src/android/app/SystemServiceRegistry_Accessor.java
@@ -13,18 +13,17 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package android.service.autofill;
 
-import java.io.PrintWriter;
+package android.app;
 
-final class CallbackHelper {
-
-    static interface Dumpable {
-        void dump(String prefix, PrintWriter pw);
-        void setFinalizer(Finalizer f);
-    }
-
-    static interface Finalizer {
-        void gone();
+/**
+ * Class to allow accessing {@link SystemServiceRegistry#getSystemServiceName}
+ */
+public class SystemServiceRegistry_Accessor {
+    /**
+     * Gets the name of the system-level service that is represented by the specified class.
+     */
+    public static String getSystemServiceName(Class<?> serviceClass) {
+        return SystemServiceRegistry.getSystemServiceName(serviceClass);
     }
 }
diff --git a/tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java b/tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
index 35cf903..9bc8e18 100644
--- a/tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
+++ b/tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
@@ -31,6 +31,7 @@
 import android.annotation.Nullable;
 import android.content.res.Resources.NotFoundException;
 import android.content.res.Resources.Theme;
+import android.graphics.Typeface;
 import android.graphics.drawable.Drawable;
 import android.util.DisplayMetrics;
 import android.util.TypedValue;
@@ -697,6 +698,22 @@
 
 
     /**
+     * Retrieve the Typeface for the attribute at <var>index</var>.
+     * @param index Index of attribute to retrieve.
+     *
+     * @return Typeface for the attribute, or null if not defined.
+     */
+    @Override
+    public Typeface getFont(int index) {
+        if (!hasValue(index)) {
+            return null;
+        }
+
+        ResourceValue value = mResourceData[index];
+        return ResourceHelper.getFont(value, mContext, mTheme);
+    }
+
+    /**
      * Retrieve the CharSequence[] for the attribute at <var>index</var>.
      * This gets the resource ID of the selected attribute, and uses
      * {@link Resources#getTextArray Resources.getTextArray} of the owning
diff --git a/tools/layoutlib/bridge/src/android/content/res/Resources_Delegate.java b/tools/layoutlib/bridge/src/android/content/res/Resources_Delegate.java
index e0f8e1c..6e3a8e8 100644
--- a/tools/layoutlib/bridge/src/android/content/res/Resources_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/content/res/Resources_Delegate.java
@@ -43,12 +43,14 @@
 import android.annotation.Nullable;
 import android.content.res.Resources.NotFoundException;
 import android.content.res.Resources.Theme;
+import android.graphics.Typeface;
 import android.graphics.drawable.Drawable;
 import android.icu.text.PluralRules;
 import android.util.AttributeSet;
 import android.util.DisplayMetrics;
 import android.util.LruCache;
 import android.util.TypedValue;
+import android.view.DisplayAdjustments;
 import android.view.ViewGroup.LayoutParams;
 
 import java.io.File;
@@ -70,7 +72,8 @@
             DisplayMetrics metrics,
             Configuration config,
             LayoutlibCallback layoutlibCallback) {
-        Resources resources = new Resources(assets, metrics, config);
+        Resources resources = new Resources(Resources_Delegate.class.getClassLoader());
+        resources.setImpl(new ResourcesImpl(assets, metrics, config, new DisplayAdjustments()));
         resources.mContext = context;
         resources.mLayoutlibCallback = layoutlibCallback;
         return Resources.mSystem = resources;
@@ -779,6 +782,35 @@
     }
 
     @LayoutlibDelegate
+    static Typeface getFont(Resources resources, int id) throws
+            NotFoundException {
+        Pair<String, ResourceValue> value = getResourceValue(resources, id, mPlatformResourceFlag);
+        if (value != null) {
+            return ResourceHelper.getFont(value.getSecond(), resources.mContext, null);
+        }
+
+        throwException(resources, id);
+
+        // this is not used since the method above always throws
+        return null;
+    }
+
+    @LayoutlibDelegate
+    static Typeface getFont(Resources resources, TypedValue outValue, int id) throws
+            NotFoundException {
+        Resources_Delegate.getValue(resources, id, outValue, true);
+        if (outValue.string != null) {
+            return ResourceHelper.getFont(outValue.string.toString(), resources.mContext, null,
+                    mPlatformResourceFlag[0]);
+        }
+
+        throwException(resources, id);
+
+        // this is not used since the method above always throws
+        return null;
+    }
+
+    @LayoutlibDelegate
     static void getValue(Resources resources, int id, TypedValue outValue, boolean resolveRefs)
             throws NotFoundException {
         Pair<String, ResourceValue> value = getResourceValue(resources, id, mPlatformResourceFlag);
diff --git a/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java
index 9d9d71f..8c6740c 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java
@@ -636,6 +636,20 @@
                 Bitmap.getDefaultDensity());
     }
 
+    @LayoutlibDelegate
+    /*package*/ static Bitmap nativeCreateHardwareBitmap(GraphicBuffer buffer) {
+        Bridge.getLog().error(LayoutLog.TAG_UNSUPPORTED,
+                "Bitmap.nativeCreateHardwareBitmap() is not supported", null /*data*/);
+        return null;
+    }
+
+    @LayoutlibDelegate
+    /*package*/ static GraphicBuffer nativeCreateGraphicBufferHandle(long nativeBitmap) {
+        Bridge.getLog().error(LayoutLog.TAG_UNSUPPORTED,
+                "Bitmap.nativeCreateGraphicBufferHandle() is not supported", null /*data*/);
+        return null;
+    }
+
     // ---- Private delegate/helper methods ----
 
     private Bitmap_Delegate(BufferedImage image, Config config) {
diff --git a/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
index c599e9d..47216ee 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
@@ -209,20 +209,20 @@
     }
 
     @LayoutlibDelegate
-    public static void nRestore(long nativeCanvas, boolean throwOnUnderflow) {
+    public static boolean nRestore(long nativeCanvas) {
         // FIXME: implement throwOnUnderflow.
         // get the delegate from the native int.
         Canvas_Delegate canvasDelegate = Canvas_Delegate.getDelegate(nativeCanvas);
         if (canvasDelegate == null) {
-            return;
+            return false;
         }
 
         canvasDelegate.restore();
+        return true;
     }
 
     @LayoutlibDelegate
-    public static void nRestoreToCount(long nativeCanvas, int saveCount,
-            boolean throwOnUnderflow) {
+    public static void nRestoreToCount(long nativeCanvas, int saveCount) {
         // FIXME: implement throwOnUnderflow.
         // get the delegate from the native int.
         Canvas_Delegate canvasDelegate = Canvas_Delegate.getDelegate(nativeCanvas);
@@ -427,7 +427,7 @@
     }
 
     @LayoutlibDelegate
-    public static void nGetCTM(long canvas, long matrix) {
+    public static void nGetMatrix(long canvas, long matrix) {
         // get the delegate from the native int.
         Canvas_Delegate canvasDelegate = Canvas_Delegate.getDelegate(canvas);
         if (canvasDelegate == null) {
diff --git a/tools/layoutlib/bridge/src/android/graphics/FontFamily_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/FontFamily_Delegate.java
index 147ed99..fb24c01 100644
--- a/tools/layoutlib/bridge/src/android/graphics/FontFamily_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/FontFamily_Delegate.java
@@ -313,7 +313,8 @@
     }
 
     @LayoutlibDelegate
-    /*package*/ static boolean nAddFontFromAsset(long builderPtr, AssetManager mgr, String path) {
+    /*package*/ static boolean nAddFontFromAssetManager(long builderPtr, AssetManager mgr, String path,
+            int cookie, boolean isAsset) {
         FontFamily_Delegate ffd = sManager.getDelegate(builderPtr);
         if (ffd == null) {
             return false;
@@ -343,7 +344,9 @@
                     ffd.addFont(fontInfo);
                     return true;
                 }
-                fontStream = assetRepository.openAsset(path, AssetManager.ACCESS_STREAMING);
+                fontStream = isAsset ?
+                        assetRepository.openAsset(path, AssetManager.ACCESS_STREAMING) :
+                        assetRepository.openNonAsset(cookie, path, AssetManager.ACCESS_STREAMING);
                 if (fontStream == null) {
                     Bridge.getLog().error(LayoutLog.TAG_MISSING_ASSET, "Asset not found: " + path,
                             path);
@@ -388,6 +391,10 @@
         return false;
     }
 
+    @LayoutlibDelegate
+    /*package*/ static void nAbort(long builderPtr) {
+        sManager.removeJavaReferenceFor(builderPtr);
+    }
 
     // ---- private helper methods ----
 
diff --git a/tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java
index 9b8fa99..aa1f00d 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java
@@ -1062,8 +1062,6 @@
 
     @LayoutlibDelegate
     /*package*/ static void nSetWordSpacing(long nativePaint, float wordSpacing) {
-        Bridge.getLog().fidelityWarning(LayoutLog.TAG_TEXT_RENDERING,
-                "Paint.setWordSpacing() not supported.", null, null);
         Paint_Delegate delegate = sManager.getDelegate(nativePaint);
         if (delegate == null) {
             return;
diff --git a/core/java/android/service/autofill/CallbackHelper.java b/tools/layoutlib/bridge/src/android/graphics/Typeface_Accessor.java
similarity index 67%
copy from core/java/android/service/autofill/CallbackHelper.java
copy to tools/layoutlib/bridge/src/android/graphics/Typeface_Accessor.java
index ded8f97..ce669cb 100644
--- a/core/java/android/service/autofill/CallbackHelper.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Typeface_Accessor.java
@@ -13,18 +13,16 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package android.service.autofill;
 
-import java.io.PrintWriter;
+package android.graphics;
 
-final class CallbackHelper {
+import android.annotation.NonNull;
 
-    static interface Dumpable {
-        void dump(String prefix, PrintWriter pw);
-        void setFinalizer(Finalizer f);
-    }
-
-    static interface Finalizer {
-        void gone();
+/**
+ * Class allowing access to package-protected methods/fields.
+ */
+public class Typeface_Accessor {
+    public static boolean isSystemFont(@NonNull String fontName) {
+        return Typeface.sSystemFontMap.containsKey(fontName);
     }
 }
diff --git a/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java
index f6c463f..11328dc 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java
@@ -16,12 +16,14 @@
 
 package android.graphics;
 
-import android.text.FontConfig;
+import com.android.ide.common.rendering.api.LayoutLog;
+import com.android.layoutlib.bridge.Bridge;
 import com.android.layoutlib.bridge.impl.DelegateManager;
 import com.android.tools.layoutlib.annotations.LayoutlibDelegate;
 
 import android.annotation.NonNull;
 import android.graphics.FontFamily_Delegate.FontVariant;
+import android.text.FontConfig;
 
 import java.awt.Font;
 import java.io.File;
@@ -160,6 +162,18 @@
     }
 
     @LayoutlibDelegate
+    /*package*/ static synchronized long nativeCreateFromTypefaceWithVariation(long native_instance,
+            List<FontConfig.Axis> axes) {
+        long newInstance = nativeCreateFromTypeface(native_instance, 0);
+
+        if (newInstance != 0) {
+            Bridge.getLog().fidelityWarning(LayoutLog.TAG_UNSUPPORTED,
+                    "nativeCreateFromTypefaceWithVariation is not supported", null, null);
+        }
+        return newInstance;
+    }
+
+    @LayoutlibDelegate
     /*package*/ static long nativeCreateWeightAlias(long native_instance, int weight) {
         Typeface_Delegate delegate = sManager.getDelegate(native_instance);
         if (delegate == null) {
diff --git a/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java
index 430607a..174bbcf 100644
--- a/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java
@@ -156,7 +156,7 @@
         bounds.offsetTo(0, 0);
         nativePathRenderer.draw(canvasWrapperPtr, colorFilterPtr, bounds.width(), bounds.height());
 
-        Canvas_Delegate.nRestore(canvasWrapperPtr, true);
+        Canvas_Delegate.nRestore(canvasWrapperPtr);
 
         return bounds.width() * bounds.height();
     }
@@ -863,29 +863,6 @@
             }
 
             mLocalMatrix.set(copy.mLocalMatrix);
-
-            final ArrayList<Object> children = copy.mChildren;
-            //noinspection ForLoopReplaceableByForEach
-            for (int i = 0; i < children.size(); i++) {
-                Object copyChild = children.get(i);
-                if (copyChild instanceof VGroup_Delegate) {
-                    VGroup_Delegate copyGroup = (VGroup_Delegate) copyChild;
-                    mChildren.add(new VGroup_Delegate(copyGroup, targetsMap));
-                } else {
-                    VPath_Delegate newPath;
-                    if (copyChild instanceof VFullPath_Delegate) {
-                        newPath = new VFullPath_Delegate((VFullPath_Delegate) copyChild);
-                    } else if (copyChild instanceof VClipPath_Delegate) {
-                        newPath = new VClipPath_Delegate((VClipPath_Delegate) copyChild);
-                    } else {
-                        throw new IllegalStateException("Unknown object in the tree!");
-                    }
-                    mChildren.add(newPath);
-                    if (newPath.mPathName != null) {
-                        targetsMap.put(newPath.mPathName, newPath);
-                    }
-                }
-            }
         }
 
         private VGroup_Delegate() {
@@ -1122,7 +1099,7 @@
                     drawPath(currentGroup, childPath, canvasPtr, w, h, filterPtr);
                 }
             }
-            Canvas_Delegate.nRestore(canvasPtr, true);
+            Canvas_Delegate.nRestore(canvasPtr);
         }
 
         public void draw(long canvasPtr, long filterPtr, int w, int h) {
diff --git a/tools/layoutlib/bridge/src/android/text/StaticLayout_Delegate.java b/tools/layoutlib/bridge/src/android/text/StaticLayout_Delegate.java
index 65c0a07..970c7d5 100644
--- a/tools/layoutlib/bridge/src/android/text/StaticLayout_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/text/StaticLayout_Delegate.java
@@ -75,7 +75,8 @@
     /*package*/ static void nSetupParagraph(long nativeBuilder, char[] text, int length,
             float firstWidth, int firstWidthLineCount, float restWidth,
             int[] variableTabStops, int defaultTabStop, int breakStrategy,
-            int hyphenationFrequency) {
+            int hyphenationFrequency, boolean isJustified) {
+        // TODO: implement justified alignment
         Builder builder = sBuilderManager.getDelegate(nativeBuilder);
         if (builder == null) {
             return;
diff --git a/tools/layoutlib/bridge/src/android/util/BridgeXmlPullAttributes.java b/tools/layoutlib/bridge/src/android/util/BridgeXmlPullAttributes.java
index 138b2d5..9fd1e15 100644
--- a/tools/layoutlib/bridge/src/android/util/BridgeXmlPullAttributes.java
+++ b/tools/layoutlib/bridge/src/android/util/BridgeXmlPullAttributes.java
@@ -16,6 +16,7 @@
 
 package android.util;
 
+import com.android.ide.common.rendering.api.AttrResourceValue;
 import com.android.ide.common.rendering.api.RenderResources;
 import com.android.ide.common.rendering.api.ResourceValue;
 import com.android.internal.util.XmlUtils;
@@ -27,6 +28,11 @@
 
 import org.xmlpull.v1.XmlPullParser;
 
+import android.annotation.NonNull;
+
+import java.util.Map;
+import java.util.function.Function;
+
 /**
  * A correct implementation of the {@link AttributeSet} interface on top of a XmlPullParser
  */
@@ -34,12 +40,30 @@
 
     private final BridgeContext mContext;
     private final boolean mPlatformFile;
+    private final Function<String, Map<String, Integer>> mFrameworkEnumValueSupplier;
+    private final Function<String, Map<String, Integer>> mProjectEnumValueSupplier;
 
-    public BridgeXmlPullAttributes(XmlPullParser parser, BridgeContext context,
-            boolean platformFile) {
+    // VisibleForTesting
+    BridgeXmlPullAttributes(@NonNull XmlPullParser parser, @NonNull BridgeContext context,
+            boolean platformFile,
+            @NonNull Function<String, Map<String, Integer>> frameworkEnumValueSupplier,
+            @NonNull Function<String, Map<String, Integer>> projectEnumValueSupplier) {
         super(parser);
         mContext = context;
         mPlatformFile = platformFile;
+        mFrameworkEnumValueSupplier = frameworkEnumValueSupplier;
+        mProjectEnumValueSupplier = projectEnumValueSupplier;
+    }
+
+    public BridgeXmlPullAttributes(@NonNull XmlPullParser parser, @NonNull BridgeContext context,
+            boolean platformFile) {
+        this(parser, context, platformFile, Bridge::getEnumValues, attrName -> {
+            // get the styleable matching the resolved name
+            RenderResources res = context.getRenderResources();
+            ResourceValue attr = res.getProjectResource(ResourceType.ATTR, attrName);
+            return attr instanceof AttrResourceValue ?
+                    ((AttrResourceValue) attr).getAttributeValues() : null;
+        });
     }
 
     /*
@@ -59,12 +83,8 @@
         String ns = mParser.getAttributeNamespace(index);
 
         if (BridgeConstants.NS_RESOURCES.equals(ns)) {
-            Integer v = Bridge.getResourceId(ResourceType.ATTR, name);
-            if (v != null) {
-                return v.intValue();
-            }
+            return Bridge.getResourceId(ResourceType.ATTR, name);
 
-            return 0;
         }
 
         // this is not an attribute in the android namespace, we query the customviewloader, if
@@ -72,7 +92,7 @@
         if (mContext.getLayoutlibCallback().getNamespace().equals(ns)) {
             Integer v = mContext.getLayoutlibCallback().getResourceId(ResourceType.ATTR, name);
             if (v != null) {
-                return v.intValue();
+                return v;
             }
         }
 
@@ -121,20 +141,38 @@
     }
 
     @Override
-    public int getAttributeIntValue(String namespace, String attribute,
-            int defaultValue) {
+    public int getAttributeIntValue(String namespace, String attribute, int defaultValue) {
         String value = getAttributeValue(namespace, attribute);
-        if (value != null) {
-            ResourceValue r = getResourceValue(value);
-
-            if (r != null) {
-                value = r.getValue();
-            }
-
-            return XmlUtils.convertValueToInt(value, defaultValue);
+        if (value == null) {
+            return defaultValue;
         }
 
-        return defaultValue;
+        ResourceValue r = getResourceValue(value);
+
+        if (r != null) {
+            value = r.getValue();
+        }
+
+        if (value.charAt(0) == '#') {
+            return ResourceHelper.getColor(value);
+        }
+
+        try {
+            return XmlUtils.convertValueToInt(value, defaultValue);
+        } catch (NumberFormatException e) {
+            // This is probably an enum
+            Map<String, Integer> enumValues = BridgeConstants.NS_RESOURCES.equals(namespace) ?
+                    mFrameworkEnumValueSupplier.apply(attribute) :
+                    mProjectEnumValueSupplier.apply(attribute);
+
+            Integer enumValue = enumValues != null ? enumValues.get(value) : null;
+            if (enumValue != null) {
+                return enumValue;
+            }
+
+            // We weren't able to find the enum int value
+            throw e;
+        }
     }
 
     @Override
@@ -203,21 +241,9 @@
 
     @Override
     public int getAttributeIntValue(int index, int defaultValue) {
-        String value = getAttributeValue(index);
-        if (value != null) {
-            ResourceValue r = getResourceValue(value);
-
-            if (r != null) {
-                value = r.getValue();
-            }
-
-            if (value.charAt(0) == '#') {
-                return ResourceHelper.getColor(value);
-            }
-            return XmlUtils.convertValueToInt(value, defaultValue);
-        }
-
-        return defaultValue;
+        return getAttributeIntValue(mParser.getAttributeNamespace(index),
+                getAttributeName(index)
+                , defaultValue);
     }
 
     @Override
diff --git a/tools/layoutlib/bridge/src/android/view/BridgeInflater.java b/tools/layoutlib/bridge/src/android/view/BridgeInflater.java
index b19cb58..b6e6ec0 100644
--- a/tools/layoutlib/bridge/src/android/view/BridgeInflater.java
+++ b/tools/layoutlib/bridge/src/android/view/BridgeInflater.java
@@ -38,7 +38,10 @@
 import android.annotation.NonNull;
 import android.content.Context;
 import android.content.res.TypedArray;
+import android.graphics.drawable.Animatable;
+import android.graphics.drawable.Drawable;
 import android.util.AttributeSet;
+import android.widget.ImageView;
 import android.widget.NumberPicker;
 
 import java.io.File;
@@ -401,6 +404,15 @@
                     numberPicker.setMaxValue(Integer.parseInt(maxValue));
                 }
             }
+            else if (view instanceof ImageView) {
+                ImageView img = (ImageView) view;
+                Drawable drawable = img.getDrawable();
+                if (drawable instanceof Animatable) {
+                    if (!((Animatable) drawable).isRunning()) {
+                        ((Animatable) drawable).start();
+                    }
+                }
+            }
 
         }
     }
diff --git a/tools/layoutlib/bridge/src/android/view/Choreographer_Delegate.java b/tools/layoutlib/bridge/src/android/view/Choreographer_Delegate.java
index 381eb1f..494ffa1 100644
--- a/tools/layoutlib/bridge/src/android/view/Choreographer_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/view/Choreographer_Delegate.java
@@ -18,6 +18,7 @@
 import com.android.ide.common.rendering.api.LayoutLog;
 import com.android.layoutlib.bridge.Bridge;
 import com.android.tools.layoutlib.annotations.LayoutlibDelegate;
+import com.android.tools.layoutlib.java.System_Delegate;
 
 import java.lang.reflect.Field;
 import java.util.concurrent.atomic.AtomicReference;
@@ -54,8 +55,8 @@
     public static void doFrame(long frameTimeNanos) {
         Choreographer thisChoreographer = Choreographer.getInstance();
 
-        thisChoreographer.mLastFrameTimeNanos = frameTimeNanos;
-
+        thisChoreographer.mLastFrameTimeNanos = frameTimeNanos - thisChoreographer
+                .getFrameIntervalNanos();
         thisChoreographer.mFrameInfo.markInputHandlingStart();
         thisChoreographer.doCallbacks(Choreographer.CALLBACK_INPUT, frameTimeNanos);
 
diff --git a/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java b/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java
index 56898f1..253ea6f 100644
--- a/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java
+++ b/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java
@@ -483,16 +483,6 @@
     }
 
     @Override
-    public Rect getPictureInPictureDefaultBounds(int displayId) {
-        return null;
-    }
-
-    @Override
-    public Rect getPictureInPictureMovementBounds(int displayId)  {
-        return null;
-    }
-
-    @Override
     public void setResizeDimLayer(boolean visible, int targetStackId, float alpha)
             throws RemoteException {
     }
diff --git a/tools/layoutlib/bridge/src/android/view/RenderNode_Delegate.java b/tools/layoutlib/bridge/src/android/view/RenderNode_Delegate.java
index a801cb0..152878b 100644
--- a/tools/layoutlib/bridge/src/android/view/RenderNode_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/view/RenderNode_Delegate.java
@@ -57,7 +57,7 @@
     private String mName;
 
     @LayoutlibDelegate
-    /*package*/ static long nCreate(RenderNode thisRenderNode, String name) {
+    /*package*/ static long nCreate(String name) {
         RenderNode_Delegate renderNodeDelegate = new RenderNode_Delegate();
         renderNodeDelegate.mName = name;
         return sManager.addNewDelegate(renderNodeDelegate);
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeRenderSession.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeRenderSession.java
index 77b131f..4ffb2e2 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeRenderSession.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeRenderSession.java
@@ -132,7 +132,7 @@
     @Override
     public Result insertChild(Object parentView, ILayoutPullParser childXml, int index,
             IAnimationListener listener) {
-        if (parentView instanceof ViewGroup == false) {
+        if (!(parentView instanceof ViewGroup)) {
             throw new IllegalArgumentException("parentView is not a ViewGroup");
         }
 
@@ -155,10 +155,10 @@
     @Override
     public Result moveChild(Object parentView, Object childView, int index,
             Map<String, String> layoutParams, IAnimationListener listener) {
-        if (parentView instanceof ViewGroup == false) {
+        if (!(parentView instanceof ViewGroup)) {
             throw new IllegalArgumentException("parentView is not a ViewGroup");
         }
-        if (childView instanceof View == false) {
+        if (!(childView instanceof View)) {
             throw new IllegalArgumentException("childView is not a View");
         }
 
@@ -179,7 +179,7 @@
 
     @Override
     public Result removeChild(Object childView, IAnimationListener listener) {
-        if (childView instanceof View == false) {
+        if (!(childView instanceof View)) {
             throw new IllegalArgumentException("childView is not a View");
         }
 
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/MockView.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/MockView.java
index d392f21..91668af 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/MockView.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/MockView.java
@@ -100,7 +100,7 @@
         mView.setText(text);
     }
 
-    public void setGravity(int gravity) {
+    private void setGravity(int gravity) {
         mView.setGravity(gravity);
     }
 }
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
index dff4f69..16bf724 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
@@ -41,6 +41,7 @@
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.app.Notification;
+import android.app.SystemServiceRegistry_Accessor;
 import android.content.BroadcastReceiver;
 import android.content.ComponentName;
 import android.content.ContentResolver;
@@ -111,7 +112,7 @@
  * Custom implementation of Context/Activity to handle non compiled resources.
  */
 @SuppressWarnings("deprecation")  // For use of Pair.
-public final class BridgeContext extends Context {
+public class BridgeContext extends Context {
     private static final String PREFIX_THEME_APPCOMPAT = "Theme.AppCompat";
 
     private static final Map<String, ResourceValue> FRAMEWORK_PATCHED_VALUES = new HashMap<>(2);
@@ -631,31 +632,7 @@
 
     @Override
     public String getSystemServiceName(Class<?> serviceClass) {
-        if (serviceClass.equals(LayoutInflater.class)) {
-            return LAYOUT_INFLATER_SERVICE;
-        }
-
-        if (serviceClass.equals(TextServicesManager.class)) {
-            return TEXT_SERVICES_MANAGER_SERVICE;
-        }
-
-        if (serviceClass.equals(WindowManager.class)) {
-            return WINDOW_SERVICE;
-        }
-
-        if (serviceClass.equals(PowerManager.class)) {
-            return POWER_SERVICE;
-        }
-
-        if (serviceClass.equals(DisplayManager.class)) {
-            return DISPLAY_SERVICE;
-        }
-
-        if (serviceClass.equals(AccessibilityManager.class)) {
-            return ACCESSIBILITY_SERVICE;
-        }
-
-        throw new UnsupportedOperationException("Unsupported Service: " + serviceClass);
+        return SystemServiceRegistry_Accessor.getSystemServiceName(serviceClass);
     }
 
     @Override
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..4805ed1 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
@@ -135,7 +135,8 @@
     }
 
     @Override
-    public void setImeWindowStatus(IBinder arg0, int arg1, int arg2) throws RemoteException {
+    public void setImeWindowStatus(IBinder arg0, IBinder arg1, int arg2, int arg3)
+            throws RemoteException {
         // TODO Auto-generated method stub
     }
 
@@ -228,7 +229,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 +250,9 @@
         // TODO Auto-generated method stub
         return null;
     }
+
+    @Override
+    public void reportFullscreenMode(IBinder token, boolean fullscreen) {
+        // TODO Auto-generated method stub
+    }
 }
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgePackageManager.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgePackageManager.java
index 00799a1..0039476 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgePackageManager.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgePackageManager.java
@@ -24,6 +24,7 @@
 import android.content.IntentSender;
 import android.content.pm.ActivityInfo;
 import android.content.pm.ApplicationInfo;
+import android.content.pm.ChangedPackages;
 import android.content.pm.InstantAppInfo;
 import android.content.pm.FeatureInfo;
 import android.content.pm.IPackageDataObserver;
@@ -859,6 +860,11 @@
     }
 
     @Override
+    public ChangedPackages getChangedPackages(int sequenceNumber) {
+        return null;
+    }
+
+    @Override
     public boolean isUpgrade() {
         return false;
     }
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/graphics/NopCanvas.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/graphics/NopCanvas.java
index 2b4661b..131aa17 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/graphics/NopCanvas.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/graphics/NopCanvas.java
@@ -31,14 +31,18 @@
  * Canvas implementation that does not do any rendering
  */
 public class NopCanvas extends Canvas {
+    private boolean mIsInitialized = false;
+
     public NopCanvas() {
         super();
+        mIsInitialized = true;
     }
 
     @Override
     public boolean isHardwareAccelerated() {
-        // Return true so there is no allocations for the software renderer in the constructor
-        return true;
+        // We return true the first time so there are no allocations for the software renderer in
+        // the constructor
+        return !mIsInitialized;
     }
 
     @Override
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/Layout.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/Layout.java
index 2fe3ed5..287334c 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/Layout.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/Layout.java
@@ -305,6 +305,7 @@
         return Bridge.getResourceId(ResourceType.ID, ID_PREFIX + name);
     }
 
+    @SuppressWarnings("deprecation")
     @Override
     public void requestFitSystemWindows() {
         // The framework call would usually bubble up to ViewRootImpl but, in layoutlib, Layout will
@@ -416,6 +417,7 @@
             }
         }
 
+        @SuppressWarnings("SameParameterValue")
         private int getDimension(String attr, boolean isFramework, int defaultValue) {
             ResourceValue value = mResources.findItemInTheme(attr, isFramework);
             value = mResources.resolveResValue(value);
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java
index 85fe2a4..d21955e 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java
@@ -144,7 +144,7 @@
     private static final class PostInflateException extends Exception {
         private static final long serialVersionUID = 1L;
 
-        public PostInflateException(String message) {
+        private PostInflateException(String message) {
             super(message);
         }
     }
@@ -242,11 +242,13 @@
             // Then measure only the content with UNSPECIFIED to see the size difference
             // and apply this to the screen size.
 
+            View measuredView = mContentRoot.getChildAt(0);
+
             // first measure the full layout, with EXACTLY to get the size of the
             // content as it is inside the decor/dialog
             @SuppressWarnings("deprecation")
             Pair<Integer, Integer> exactMeasure = measureView(
-                    mViewRoot, mContentRoot.getChildAt(0),
+                    mViewRoot, measuredView,
                     mMeasuredScreenWidth, MeasureSpec.EXACTLY,
                     mMeasuredScreenHeight, MeasureSpec.EXACTLY);
 
@@ -258,6 +260,10 @@
                     mMeasuredScreenWidth, widthMeasureSpecMode,
                     mMeasuredScreenHeight, heightMeasureSpecMode);
 
+            // If measuredView is not null, exactMeasure nor result will be null.
+            assert exactMeasure != null;
+            assert result != null;
+
             // now look at the difference and add what is needed.
             if (renderingMode.isHorizExpand()) {
                 int measuredWidth = exactMeasure.getFirst();
@@ -406,8 +412,7 @@
      * @param canvas an optional canvas to render the views to. If null, only the measure and
      * layout steps will be executed.
      */
-    private static Result renderAndBuildResult(@NonNull BridgeContext context, @NonNull ViewGroup viewRoot,
-            @Nullable Canvas canvas, int width, int height) {
+    private static Result renderAndBuildResult(@NonNull ViewGroup viewRoot, @Nullable Canvas canvas) {
         if (canvas == null) {
             return SUCCESS.createResult();
         }
@@ -551,7 +556,7 @@
                     long initialTime = System_Delegate.nanoTime();
                     if (!mFirstFrameExecuted) {
                         // We need to run an initial draw call to initialize the animations
-                        renderAndBuildResult(getContext(), mViewRoot, NOP_CANVAS, mMeasuredScreenWidth, mMeasuredScreenHeight);
+                        renderAndBuildResult(mViewRoot, NOP_CANVAS);
 
                         // The first frame will initialize the animations
                         Choreographer_Delegate.doFrame(initialTime);
@@ -560,8 +565,7 @@
                     // Second frame will move the animations
                     Choreographer_Delegate.doFrame(initialTime + mElapsedFrameTimeNanos);
                 }
-                renderResult = renderAndBuildResult(getContext(), mViewRoot, mCanvas, mMeasuredScreenWidth,
-                        mMeasuredScreenHeight);
+                renderResult = renderAndBuildResult(mViewRoot, mCanvas);
             }
 
             mSystemViewInfoList =
@@ -1206,7 +1210,7 @@
      * Sets up a {@link TabHost} object.
      * @param tabHost the TabHost to setup.
      * @param layoutlibCallback The project callback object to access the project R class.
-     * @throws PostInflateException
+     * @throws PostInflateException if TabHost is missing the required ids for TabHost
      */
     private void setupTabHost(TabHost tabHost, LayoutlibCallback layoutlibCallback)
             throws PostInflateException {
@@ -1254,12 +1258,7 @@
             TabSpec spec = tabHost.newTabSpec("tag")
                     .setIndicator("Tab Label", tabHost.getResources()
                             .getDrawable(android.R.drawable.ic_menu_info_details, null))
-                    .setContent(new TabHost.TabContentFactory() {
-                        @Override
-                        public View createTabContent(String tag) {
-                            return new LinearLayout(getContext());
-                        }
-                    });
+                    .setContent(tag -> new LinearLayout(getContext()));
             tabHost.addTab(spec);
         } else {
             // for each child of the frameLayout, add a new TabSpec
@@ -1333,8 +1332,8 @@
 
         int childCount = viewGroup.getChildCount();
         if (viewGroup == mContentRoot) {
-            List<ViewInfo> childrenWithoutOffset = new ArrayList<ViewInfo>(childCount);
-            List<ViewInfo> childrenWithOffset = new ArrayList<ViewInfo>(childCount);
+            List<ViewInfo> childrenWithoutOffset = new ArrayList<>(childCount);
+            List<ViewInfo> childrenWithOffset = new ArrayList<>(childCount);
             for (int i = 0; i < childCount; i++) {
                 ViewInfo[] childViewInfo =
                         visitContentRoot(viewGroup.getChildAt(i), hOffset, vOffset,
@@ -1345,7 +1344,7 @@
             mViewInfoList = childrenWithOffset;
             return childrenWithoutOffset;
         } else {
-            List<ViewInfo> children = new ArrayList<ViewInfo>(childCount);
+            List<ViewInfo> children = new ArrayList<>(childCount);
             for (int i = 0; i < childCount; i++) {
                 children.add(visit(viewGroup.getChildAt(i), hOffset, vOffset, setExtendedInfo,
                         isContentFrame));
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ResourceHelper.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ResourceHelper.java
index c197e40..b3a2d3e 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ResourceHelper.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ResourceHelper.java
@@ -38,16 +38,20 @@
 import android.content.res.ColorStateList;
 import android.content.res.ComplexColor;
 import android.content.res.ComplexColor_Accessor;
+import android.content.res.FontResourcesParser;
 import android.content.res.GradientColor;
 import android.content.res.Resources.Theme;
 import android.graphics.Bitmap;
 import android.graphics.Bitmap_Delegate;
 import android.graphics.NinePatch_Delegate;
 import android.graphics.Rect;
+import android.graphics.Typeface;
+import android.graphics.Typeface_Accessor;
 import android.graphics.drawable.BitmapDrawable;
 import android.graphics.drawable.ColorDrawable;
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.NinePatchDrawable;
+import android.text.FontConfig;
 import android.util.TypedValue;
 
 import java.io.File;
@@ -367,6 +371,89 @@
         return null;
     }
 
+    /**
+     * Returns a {@link Typeface} given a font name. The font name, can be a system font family
+     * (like sans-serif) or a full path if the font is to be loaded from resources.
+     */
+    public static Typeface getFont(String fontName, BridgeContext context, Theme theme, boolean
+            isFramework) {
+        if (fontName == null) {
+            return null;
+        }
+
+        if (Typeface_Accessor.isSystemFont(fontName)) {
+            // Shortcut for the case where we are asking for a system font name. Those are not
+            // loaded using external resources.
+            return null;
+        }
+
+        // Check if this is an asset that we've already loaded dynamically
+        Typeface typeface = Typeface.findFromCache(context.getAssets(), fontName);
+        if (typeface != null) {
+            return typeface;
+        }
+
+        String lowerCaseValue = fontName.toLowerCase();
+        if (lowerCaseValue.endsWith(".xml")) {
+            // create a block parser for the file
+            Boolean psiParserSupport = context.getLayoutlibCallback().getFlag(
+                    RenderParamsFlags.FLAG_KEY_XML_FILE_PARSER_SUPPORT);
+            XmlPullParser parser = null;
+            if (psiParserSupport != null && psiParserSupport) {
+                parser = context.getLayoutlibCallback().getXmlFileParser(fontName);
+            }
+            else {
+                File f = new File(fontName);
+                if (f.isFile()) {
+                    try {
+                        parser = ParserFactory.create(f);
+                    } catch (XmlPullParserException | FileNotFoundException e) {
+                        // this is an error and not warning since the file existence is checked before
+                        // attempting to parse it.
+                        Bridge.getLog().error(null, "Failed to parse file " + fontName,
+                                e, null /*data*/);
+                    }
+                }
+            }
+
+            if (parser != null) {
+                BridgeXmlBlockParser blockParser = new BridgeXmlBlockParser(
+                        parser, context, isFramework);
+                try {
+                    FontConfig config = FontResourcesParser.parse(blockParser, context
+                            .getResources());
+                    typeface = Typeface.createFromResources(config, context.getAssets(),
+                            fontName);
+                } catch (XmlPullParserException | IOException e) {
+                    Bridge.getLog().error(null, "Failed to parse file " + fontName,
+                            e, null /*data*/);
+                } finally {
+                    blockParser.ensurePopped();
+                }
+            } else {
+                Bridge.getLog().error(LayoutLog.TAG_BROKEN,
+                        String.format("File %s does not exist (or is not a file)", fontName),
+                        null /*data*/);
+            }
+        } else {
+            typeface = Typeface.createFromResources(context.getAssets(), fontName, 0);
+        }
+
+        return typeface;
+    }
+
+    /**
+     * Returns a {@link Typeface} given a font name. The font name, can be a system font family
+     * (like sans-serif) or a full path if the font is to be loaded from resources.
+     */
+    public static Typeface getFont(ResourceValue value, BridgeContext context, Theme theme) {
+        if (value == null) {
+            return null;
+        }
+
+        return getFont(value.getValue(), context, theme, value.isFramework());
+    }
+
     private static Drawable getNinePatchDrawable(InputStream inputStream, Density density,
             boolean isFramework, String cacheKey, BridgeContext context) throws IOException {
         // see if we still have both the chunk and the bitmap in the caches
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/util/NinePatchInputStream.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/util/NinePatchInputStream.java
index 96b795a..f149b6c 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/util/NinePatchInputStream.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/util/NinePatchInputStream.java
@@ -34,12 +34,9 @@
 
     @Override
     public boolean markSupported() {
-        if (mFakeMarkSupport) {
-            // this is needed so that BitmapFactory doesn't wrap this in a BufferedInputStream.
-            return true;
-        }
+        // this is needed so that BitmapFactory doesn't wrap this in a BufferedInputStream.
+        return mFakeMarkSupport || super.markSupported();
 
-        return super.markSupported();
     }
 
     public void disableFakeMarkSupport() {
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/util/ReflectionUtils.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/util/ReflectionUtils.java
index 040191e..b89718f 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/util/ReflectionUtils.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/util/ReflectionUtils.java
@@ -52,9 +52,7 @@
         Exception ex;
         try {
             return method.invoke(object, args);
-        } catch (IllegalAccessException e) {
-            ex = e;
-        } catch (InvocationTargetException e) {
+        } catch (IllegalAccessException | InvocationTargetException e) {
             ex = e;
         }
         throw new ReflectionException(ex);
diff --git a/tools/layoutlib/bridge/tests/Android.mk b/tools/layoutlib/bridge/tests/Android.mk
index 33d55de..1b65eee 100644
--- a/tools/layoutlib/bridge/tests/Android.mk
+++ b/tools/layoutlib/bridge/tests/Android.mk
@@ -31,7 +31,8 @@
 			tools-common-prebuilt \
 			sdk-common \
 			junit-host \
-			guavalib
+			guavalib \
+			mockito-host
 
 include $(BUILD_HOST_JAVA_LIBRARY)
 
diff --git a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/activity.png b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/activity.png
index 199ea60..affc31e 100644
--- a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/activity.png
+++ b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/activity.png
Binary files differ
diff --git a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/allwidgets.png b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/allwidgets.png
index 89ff5db..a53dcba 100644
--- a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/allwidgets.png
+++ b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/allwidgets.png
Binary files differ
diff --git a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/allwidgets_tab.png b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/allwidgets_tab.png
index 1f4405d..88fa9dd 100644
--- a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/allwidgets_tab.png
+++ b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/allwidgets_tab.png
Binary files differ
diff --git a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/animated_vector.png b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/animated_vector.png
index 26aed6a..e33f92d 100644
--- a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/animated_vector.png
+++ b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/animated_vector.png
Binary files differ
diff --git a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/animated_vector_1.png b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/animated_vector_1.png
index aaf1514..915868c 100644
--- a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/animated_vector_1.png
+++ b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/animated_vector_1.png
Binary files differ
diff --git a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/array_check.png b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/array_check.png
index c3bd708..ee72a6f 100644
--- a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/array_check.png
+++ b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/array_check.png
Binary files differ
diff --git a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/expand_horz_layout.png b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/expand_horz_layout.png
index 0c16215..781d617 100644
--- a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/expand_horz_layout.png
+++ b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/expand_horz_layout.png
Binary files differ
diff --git a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/expand_vert_layout.png b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/expand_vert_layout.png
index 81755ce..5b64d33 100644
--- a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/expand_vert_layout.png
+++ b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/expand_vert_layout.png
Binary files differ
diff --git a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/font_test.png b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/font_test.png
new file mode 100644
index 0000000..b2baa98
--- /dev/null
+++ b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/font_test.png
Binary files differ
diff --git a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/four_corners.png b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/four_corners.png
index 868cd51..a8567b3 100644
--- a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/four_corners.png
+++ b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/four_corners.png
Binary files differ
diff --git a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/four_corners_translucent.png b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/four_corners_translucent.png
index 601f711..5ae95ea 100644
--- a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/four_corners_translucent.png
+++ b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/four_corners_translucent.png
Binary files differ
diff --git a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/four_corners_translucent_land.png b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/four_corners_translucent_land.png
index 0b8f1a9..b2b6a97 100644
--- a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/four_corners_translucent_land.png
+++ b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/four_corners_translucent_land.png
Binary files differ
diff --git a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/scrolled.png b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/scrolled.png
index 87bd502..cf1a769 100644
--- a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/scrolled.png
+++ b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/scrolled.png
Binary files differ
diff --git a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/simple_activity-old-theme.png b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/simple_activity-old-theme.png
index eb431b0..e0abcf4 100644
--- a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/simple_activity-old-theme.png
+++ b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/simple_activity-old-theme.png
Binary files differ
diff --git a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/simple_activity.png b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/simple_activity.png
index 4e448c8..3d0fbd6 100644
--- a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/simple_activity.png
+++ b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/simple_activity.png
Binary files differ
diff --git a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/simple_activity_noactionbar.png b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/simple_activity_noactionbar.png
index b756719..86b00415 100644
--- a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/simple_activity_noactionbar.png
+++ b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/simple_activity_noactionbar.png
Binary files differ
diff --git a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/vector_drawable.png b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/vector_drawable.png
index 466eca8..7bbae09 100644
--- a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/vector_drawable.png
+++ b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/vector_drawable.png
Binary files differ
diff --git a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/vector_drawable_91383.png b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/vector_drawable_91383.png
index 940fe5b..e9dca692 100644
--- a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/vector_drawable_91383.png
+++ b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/vector_drawable_91383.png
Binary files differ
diff --git a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/src/main/res/font/testfamily.xml b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/src/main/res/font/testfamily.xml
new file mode 100644
index 0000000..b1e9206
--- /dev/null
+++ b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/src/main/res/font/testfamily.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<font-family xmlns:android="http://schemas.android.com/apk/res/android">
+    <font android:fontStyle="normal" android:fontWeight="400" android:font="@font/testfont" />
+    <font android:fontStyle="italic" android:fontWeight="400" android:font="@font/testfont2" />
+</font-family>
\ No newline at end of file
diff --git a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/src/main/res/font/testfont.ttf b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/src/main/res/font/testfont.ttf
new file mode 100644
index 0000000..2852302
--- /dev/null
+++ b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/src/main/res/font/testfont.ttf
Binary files differ
diff --git a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/src/main/res/font/testfont2.ttf b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/src/main/res/font/testfont2.ttf
new file mode 100644
index 0000000..b7bf5b4
--- /dev/null
+++ b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/src/main/res/font/testfont2.ttf
Binary files differ
diff --git a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/src/main/res/layout/fonts_test.xml b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/src/main/res/layout/fonts_test.xml
new file mode 100644
index 0000000..c63b211
--- /dev/null
+++ b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/src/main/res/layout/fonts_test.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical" android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="CONDENSED"
+        android:textSize="50sp"
+        android:fontFamily="sans-serif-condensed"
+        />
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="CONDENSED ITALIC"
+        android:textSize="30sp"
+        android:fontFamily="sans-serif-condensed"
+        android:textStyle="italic"
+        />
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="MONOSPACE"
+        android:textSize="50sp"
+        android:fontFamily="monospace"/>
+
+    <Space
+        android:layout_width="wrap_content"
+        android:layout_height="30dp" />
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="Custom"
+        android:textSize="20sp"
+        android:fontFamily="@font/testfont"/>
+
+    <Space
+        android:layout_width="wrap_content"
+        android:layout_height="30dp" />
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="Custom family"
+        android:textSize="20sp"
+        android:fontFamily="@font/testfamily"/>
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="Custom family"
+        android:textSize="20sp"
+        android:fontFamily="@font/testfamily"
+        android:textStyle="italic"/>
+
+</LinearLayout>
\ No newline at end of file
diff --git a/tools/layoutlib/bridge/tests/src/android/app/SystemServiceRegistry_AccessorTest.java b/tools/layoutlib/bridge/tests/src/android/app/SystemServiceRegistry_AccessorTest.java
new file mode 100644
index 0000000..4f1c16c
--- /dev/null
+++ b/tools/layoutlib/bridge/tests/src/android/app/SystemServiceRegistry_AccessorTest.java
@@ -0,0 +1,39 @@
+/*
+ * 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;
+
+import org.junit.Test;
+
+import android.content.Context;
+import android.hardware.input.InputManager;
+import android.view.WindowManager;
+import android.view.accessibility.AccessibilityManager;
+
+import static org.junit.Assert.*;
+
+public class SystemServiceRegistry_AccessorTest {
+    @Test
+    public void testRegistry() {
+        // Just check a few services to make sure we don't break the accessor
+        assertEquals(Context.ACCESSIBILITY_SERVICE,
+                SystemServiceRegistry_Accessor.getSystemServiceName(AccessibilityManager.class));
+        assertEquals(Context.INPUT_SERVICE,
+                SystemServiceRegistry_Accessor.getSystemServiceName(InputManager.class));
+        assertEquals(Context.WINDOW_SERVICE,
+                SystemServiceRegistry_Accessor.getSystemServiceName(WindowManager.class));
+    }
+}
\ No newline at end of file
diff --git a/tools/layoutlib/bridge/tests/src/android/util/BridgeXmlPullAttributesTest.java b/tools/layoutlib/bridge/tests/src/android/util/BridgeXmlPullAttributesTest.java
new file mode 100644
index 0000000..2fcec8e
--- /dev/null
+++ b/tools/layoutlib/bridge/tests/src/android/util/BridgeXmlPullAttributesTest.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 android.util;
+
+import com.android.ide.common.rendering.api.RenderResources;
+import com.android.layoutlib.bridge.BridgeConstants;
+import com.android.layoutlib.bridge.android.BridgeContext;
+
+import org.junit.Test;
+import org.xmlpull.v1.XmlPullParser;
+
+import com.google.common.collect.ImmutableMap;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+public class BridgeXmlPullAttributesTest {
+    @Test
+    public void testGetAttributeIntValueForEnums() {
+        RenderResources renderResources = new RenderResources();
+
+        XmlPullParser parser = mock(XmlPullParser.class);
+        when(parser.getAttributeValue(BridgeConstants.NS_RESOURCES, "layout_width"))
+                .thenReturn("match_parent");
+        when(parser.getAttributeName(0)).thenReturn("layout_width");
+        when(parser.getAttributeNamespace(0)).thenReturn(BridgeConstants.NS_RESOURCES);
+        // Return every value twice since there is one test using name and other using index
+        when(parser.getAttributeValue("http://custom", "my_custom_attr"))
+                .thenReturn("a", "a", "b", "b", "invalid", "invalid");
+        when(parser.getAttributeName(1)).thenReturn("my_custom_attr");
+        when(parser.getAttributeNamespace(1)).thenReturn("http://custom");
+
+        BridgeContext context = mock(BridgeContext.class);
+        when(context.getRenderResources()).thenReturn(renderResources);
+
+        BridgeXmlPullAttributes attributes = new BridgeXmlPullAttributes(
+                parser,
+                context,
+                false,
+                attrName -> {
+                    if ("layout_width".equals(attrName)) {
+                        return ImmutableMap.of(
+                                "match_parent", 123);
+                    }
+                    return ImmutableMap.of();
+                },
+                attrName -> {
+                    if ("my_custom_attr".equals(attrName)) {
+                        return ImmutableMap.of(
+                                "a", 1,
+                                "b", 2
+                        );
+                    }
+                    return ImmutableMap.of();
+                });
+
+        // Test a framework defined enum attribute
+        assertEquals(123, attributes.getAttributeIntValue(BridgeConstants.NS_RESOURCES,
+                "layout_width", 500));
+        assertEquals(123, attributes.getAttributeIntValue(0, 500));
+        // Test non existing attribute (it should return the default value)
+        assertEquals(500, attributes.getAttributeIntValue(BridgeConstants.NS_RESOURCES,
+                "layout_height", 500));
+        assertEquals(500, attributes.getAttributeIntValue(2, 500));
+
+        // Test project defined enum attribute
+        assertEquals(1, attributes.getAttributeIntValue("http://custom",
+                "my_custom_attr", 500));
+        assertEquals(1, attributes.getAttributeIntValue(1, 500));
+        assertEquals(2, attributes.getAttributeIntValue("http://custom",
+                "my_custom_attr", 500));
+        assertEquals(2, attributes.getAttributeIntValue(1, 500));
+        // Test an invalid enum
+        boolean exception = false;
+        try {
+            attributes.getAttributeIntValue("http://custom", "my_custom_attr", 500);
+        } catch(NumberFormatException e) {
+            exception = true;
+        }
+        assertTrue(exception);
+        exception = false;
+        try {
+            attributes.getAttributeIntValue(1, 500);
+        } catch(NumberFormatException e) {
+            exception = true;
+        }
+        assertTrue(exception);
+
+        // Test non existing project attribute
+        assertEquals(500, attributes.getAttributeIntValue("http://custom",
+                "my_other_attr", 500));
+    }
+
+}
\ No newline at end of file
diff --git a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
index ded52a7..b15ee95 100644
--- a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
+++ b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
@@ -25,13 +25,15 @@
 import org.junit.runners.Suite.SuiteClasses;
 
 import android.graphics.Matrix_DelegateTest;
+import android.util.BridgeXmlPullAttributesTest;
 
 /**
  * Suite used by the layoutlib build system
  */
 @RunWith(Suite.class)
 @SuiteClasses({
-        RenderTests.class, LayoutParserWrapperTest.class, BridgeXmlBlockParserTest.class,
+        RenderTests.class, LayoutParserWrapperTest.class,
+        BridgeXmlBlockParserTest.class, BridgeXmlPullAttributesTest.class,
         Matrix_DelegateTest.class, TestDelegates.class
 })
 public class Main {
diff --git a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/RenderTestBase.java b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/RenderTestBase.java
index 3e5f9e0..67b42a7 100644
--- a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/RenderTestBase.java
+++ b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/RenderTestBase.java
@@ -35,6 +35,7 @@
 import com.android.layoutlib.bridge.intensive.setup.LayoutPullParser;
 import com.android.layoutlib.bridge.intensive.util.ImageUtils;
 import com.android.layoutlib.bridge.intensive.util.ModuleClassLoader;
+import com.android.layoutlib.bridge.intensive.util.TestAssetRepository;
 import com.android.layoutlib.bridge.intensive.util.TestUtils;
 import com.android.tools.layoutlib.java.System_Delegate;
 import com.android.utils.ILogger;
@@ -537,6 +538,7 @@
                         configGenerator.getHardwareConfig(), resourceResolver, layoutLibCallback, 0,
                         targetSdk, getLayoutLog());
         sessionParams.setFlag(RenderParamsFlags.FLAG_DO_NOT_RENDER_ON_CREATE, true);
+        sessionParams.setAssetRepository(new TestAssetRepository());
         return sessionParams;
     }
 }
diff --git a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/RenderTests.java b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/RenderTests.java
index 73e51ec..913519c 100644
--- a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/RenderTests.java
+++ b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/RenderTests.java
@@ -384,4 +384,10 @@
                 strings);
         assertTrue(sRenderMessages.isEmpty());
     }
+
+    @Test
+    public void testFonts() throws ClassNotFoundException {
+        // TODO: styles seem to be broken in TextView
+        renderAndVerify("fonts_test.xml", "font_test.png");
+    }
 }
diff --git a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/setup/LayoutLibTestCallback.java b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/setup/LayoutLibTestCallback.java
index bae2dc0c..8ebfc65 100644
--- a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/setup/LayoutLibTestCallback.java
+++ b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/setup/LayoutLibTestCallback.java
@@ -132,7 +132,11 @@
 
     @Override
     public Integer getResourceId(ResourceType type, String name) {
-        return mResources.get(type).get(name);
+        Map<String, Integer> resName2Id = mResources.get(type);
+        if (resName2Id == null) {
+            return null;
+        }
+        return resName2Id.get(name);
     }
 
     @Override
diff --git a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/util/ImageUtils.java b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/util/ImageUtils.java
index 18c6629..cdf5633 100644
--- a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/util/ImageUtils.java
+++ b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/util/ImageUtils.java
@@ -54,7 +54,7 @@
      */
     private static final boolean FAIL_ON_MISSING_THUMBNAIL = true;
 
-    private static final int THUMBNAIL_SIZE = 250;
+    private static final int THUMBNAIL_SIZE = 1000;
 
     private static final double MAX_PERCENT_DIFFERENCE = 0.3;
 
diff --git a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/util/TestAssetRepository.java b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/util/TestAssetRepository.java
new file mode 100644
index 0000000..0856ac9
--- /dev/null
+++ b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/util/TestAssetRepository.java
@@ -0,0 +1,54 @@
+/*
+ * 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.layoutlib.bridge.intensive.util;
+
+import com.android.ide.common.rendering.api.AssetRepository;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * {@link AssetRepository} used for render tests.
+ */
+public class TestAssetRepository extends AssetRepository {
+    private static InputStream open(String path) throws FileNotFoundException {
+        File asset = new File(path);
+        if (asset.isFile()) {
+            return new FileInputStream(asset);
+        }
+
+        return null;
+    }
+
+    @Override
+    public boolean isSupported() {
+        return true;
+    }
+
+    @Override
+    public InputStream openAsset(String path, int mode) throws IOException {
+        return open(path);
+    }
+
+    @Override
+    public InputStream openNonAsset(int cookie, String path, int mode) throws IOException {
+        return open(path);
+    }
+}
diff --git a/tools/layoutlib/create/Android.mk b/tools/layoutlib/create/Android.mk
index c7f2c41..7611cde 100644
--- a/tools/layoutlib/create/Android.mk
+++ b/tools/layoutlib/create/Android.mk
@@ -20,7 +20,7 @@
 
 LOCAL_JAR_MANIFEST := manifest.txt
 LOCAL_STATIC_JAVA_LIBRARIES := \
-	asm-5.0
+	asm-5.2
 
 LOCAL_MODULE := layoutlib_create
 
diff --git a/tools/layoutlib/create/create.iml b/tools/layoutlib/create/create.iml
index 368b46b..ac97502 100644
--- a/tools/layoutlib/create/create.iml
+++ b/tools/layoutlib/create/create.iml
@@ -12,9 +12,9 @@
     <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="module-library">
-      <library name="asm-5.0">
+      <library name="asm-5.2">
         <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../prebuilts/misc/common/asm/asm-5.0.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../../../../prebuilts/misc/common/asm/asm-5.2.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES>
diff --git a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/AsmGenerator.java b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/AsmGenerator.java
index a2f8372..bed5806a 100644
--- a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/AsmGenerator.java
+++ b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/AsmGenerator.java
@@ -36,6 +36,7 @@
 import java.util.TreeMap;
 import java.util.jar.JarEntry;
 import java.util.jar.JarOutputStream;
+import java.util.stream.Collectors;
 
 /**
  * Class that generates a new JAR from a list of classes, some of which are to be kept as-is
@@ -78,6 +79,8 @@
     private final Map<String, ICreateInfo.InjectMethodRunnable> mInjectedMethodsMap;
     /** A map { FQCN => set { field names } } which should be promoted to public visibility */
     private final Map<String, Set<String>> mPromotedFields;
+    /** A list of classes to be promoted to public visibility */
+    private final Set<String> mPromotedClasses;
 
     /**
      * Creates a new generator that can generate the output JAR with the stubbed classes.
@@ -179,6 +182,9 @@
         addToMap(createInfo.getPromotedFields(), mPromotedFields);
 
         mInjectedMethodsMap = createInfo.getInjectedMethodsMap();
+
+        mPromotedClasses =
+                Arrays.stream(createInfo.getPromotedClasses()).collect(Collectors.toSet());
     }
 
     /**
@@ -400,7 +406,11 @@
         if (promoteFields != null && !promoteFields.isEmpty()) {
             cv = new PromoteFieldClassAdapter(cv, promoteFields);
         }
+        if (!mPromotedClasses.isEmpty()) {
+            cv = new PromoteClassClassAdapter(cv, mPromotedClasses);
+        }
         cr.accept(cv, 0);
+
         return cw.toByteArray();
     }
 
diff --git a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java
index 741eb27..a8582c6 100644
--- a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java
+++ b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java
@@ -113,6 +113,11 @@
     }
 
     @Override
+    public String[] getPromotedClasses() {
+        return PROMOTED_CLASSES;
+    }
+
+    @Override
     public Map<String, InjectMethodRunnable> getInjectedMethodsMap() {
         return INJECTED_METHODS;
     }
@@ -151,6 +156,7 @@
         "android.content.res.Resources#getDimensionPixelOffset",
         "android.content.res.Resources#getDimensionPixelSize",
         "android.content.res.Resources#getDrawable",
+        "android.content.res.Resources#getFont",
         "android.content.res.Resources#getIntArray",
         "android.content.res.Resources#getInteger",
         "android.content.res.Resources#getLayout",
@@ -344,6 +350,13 @@
     };
 
     /**
+     * List of classes to be promoted to public visibility. Prefer using PROMOTED_FIELDS to this
+     * if possible.
+     */
+    private final static String[] PROMOTED_CLASSES = new String[] {
+    };
+
+    /**
      * List of classes for which the methods returning them should be deleted.
      * The array contains a list of null terminated section starting with the name of the class
      * to rename in which the methods are deleted, followed by a list of return types identifying
diff --git a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/ICreateInfo.java b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/ICreateInfo.java
index 535a9a8..48abde4 100644
--- a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/ICreateInfo.java
+++ b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/ICreateInfo.java
@@ -78,6 +78,11 @@
     String[] getPromotedFields();
 
     /**
+     * Returns a list of classes to be promoted to public visibility.
+     */
+    String[] getPromotedClasses();
+
+    /**
      * Returns a map from binary FQCN className to {@link InjectMethodRunnable} which will be
      * called to inject methods into a class.
      * Can be empty but must not be null.
diff --git a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/PromoteClassClassAdapter.java b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/PromoteClassClassAdapter.java
new file mode 100644
index 0000000..99e3089
--- /dev/null
+++ b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/PromoteClassClassAdapter.java
@@ -0,0 +1,64 @@
+/*
+ * 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.tools.layoutlib.create;
+
+import org.objectweb.asm.ClassVisitor;
+
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import static org.objectweb.asm.Opcodes.ACC_PRIVATE;
+import static org.objectweb.asm.Opcodes.ACC_PROTECTED;
+import static org.objectweb.asm.Opcodes.ACC_PUBLIC;
+
+/**
+ * Promotes given classes to public visibility.
+ */
+public class PromoteClassClassAdapter extends ClassVisitor {
+
+    private final Set<String> mClassNames;
+    private static final int CLEAR_PRIVATE_MASK = ~(ACC_PRIVATE | ACC_PROTECTED);
+
+    public PromoteClassClassAdapter(ClassVisitor cv, Set<String> classNames) {
+        super(Main.ASM_VERSION, cv);
+        mClassNames =
+                classNames.stream().map(name -> name.replace(".", "/")).collect(Collectors.toSet());
+    }
+
+    @Override
+    public void visit(int version, int access, String name, String signature, String superName,
+            String[] interfaces) {
+        if (mClassNames.contains(name)) {
+            if ((access & ACC_PUBLIC) == 0) {
+                access = (access & CLEAR_PRIVATE_MASK) | ACC_PUBLIC;
+            }
+        }
+
+        super.visit(version, access, name, signature, superName, interfaces);
+    }
+
+    @Override
+    public void visitInnerClass(String name, String outerName, String innerName, int access) {
+        if (mClassNames.contains(name)) {
+            if ((access & ACC_PUBLIC) == 0) {
+                access = (access & CLEAR_PRIVATE_MASK) | ACC_PUBLIC;
+            }
+        }
+
+        super.visitInnerClass(name, outerName, innerName, access);
+    }
+}
diff --git a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/PromoteFieldClassAdapter.java b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/PromoteFieldClassAdapter.java
index 05af033..ba77860 100644
--- a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/PromoteFieldClassAdapter.java
+++ b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/PromoteFieldClassAdapter.java
@@ -31,7 +31,7 @@
 public class PromoteFieldClassAdapter extends ClassVisitor {
 
     private final Set<String> mFieldNames;
-    private static final int ACC_NOT_PUBLIC = ~(ACC_PRIVATE | ACC_PROTECTED);
+    private static final int CLEAR_PRIVATE_MASK = ~(ACC_PRIVATE | ACC_PROTECTED);
 
     public PromoteFieldClassAdapter(ClassVisitor cv, Set<String> fieldNames) {
         super(Main.ASM_VERSION, cv);
@@ -43,7 +43,7 @@
             Object value) {
         if (mFieldNames.contains(name)) {
             if ((access & ACC_PUBLIC) == 0) {
-                access = (access & ACC_NOT_PUBLIC) | ACC_PUBLIC;
+                access = (access & CLEAR_PRIVATE_MASK) | ACC_PUBLIC;
             }
         }
         return super.visitField(access, name, desc, signature, value);
diff --git a/tools/layoutlib/create/tests/Android.mk b/tools/layoutlib/create/tests/Android.mk
index 61e381d..488d7d6 100644
--- a/tools/layoutlib/create/tests/Android.mk
+++ b/tools/layoutlib/create/tests/Android.mk
@@ -24,7 +24,7 @@
 LOCAL_MODULE_TAGS := optional
 
 LOCAL_JAVA_LIBRARIES := layoutlib_create junit-host
-LOCAL_STATIC_JAVA_LIBRARIES := asm-5.0
+LOCAL_STATIC_JAVA_LIBRARIES := asm-5.2
 
 include $(BUILD_HOST_JAVA_LIBRARY)
 
diff --git a/tools/layoutlib/create/tests/com/android/tools/layoutlib/create/AsmGeneratorTest.java b/tools/layoutlib/create/tests/com/android/tools/layoutlib/create/AsmGeneratorTest.java
index 0560d8a..4d5d5d2 100644
--- a/tools/layoutlib/create/tests/com/android/tools/layoutlib/create/AsmGeneratorTest.java
+++ b/tools/layoutlib/create/tests/com/android/tools/layoutlib/create/AsmGeneratorTest.java
@@ -137,6 +137,11 @@
             }
 
             @Override
+            public String[] getPromotedClasses() {
+                return EMPTY_STRING_ARRAY;
+            }
+
+            @Override
             public Map<String, InjectMethodRunnable> getInjectedMethodsMap() {
                 return Collections.emptyMap();
             }
@@ -211,6 +216,11 @@
             }
 
             @Override
+            public String[] getPromotedClasses() {
+                return EMPTY_STRING_ARRAY;
+            }
+
+            @Override
             public Map<String, InjectMethodRunnable> getInjectedMethodsMap() {
                 return Collections.emptyMap();
             }
@@ -293,6 +303,11 @@
             }
 
             @Override
+            public String[] getPromotedClasses() {
+                return EMPTY_STRING_ARRAY;
+            }
+
+            @Override
             public Map<String, InjectMethodRunnable> getInjectedMethodsMap() {
                 return Collections.emptyMap();
             }
@@ -370,6 +385,11 @@
             }
 
             @Override
+            public String[] getPromotedClasses() {
+                return EMPTY_STRING_ARRAY;
+            }
+
+            @Override
             public Map<String, InjectMethodRunnable> getInjectedMethodsMap() {
                 return Collections.singletonMap("mock_android.util.EmptyArray",
                         InjectMethodRunnables.CONTEXT_GET_FRAMEWORK_CLASS_LOADER);
diff --git a/tools/layoutlib/create/tests/com/android/tools/layoutlib/create/PromoteClassClassAdapterTest.java b/tools/layoutlib/create/tests/com/android/tools/layoutlib/create/PromoteClassClassAdapterTest.java
new file mode 100644
index 0000000..eeb0b10
--- /dev/null
+++ b/tools/layoutlib/create/tests/com/android/tools/layoutlib/create/PromoteClassClassAdapterTest.java
@@ -0,0 +1,170 @@
+/*
+ * 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.tools.layoutlib.create;
+
+import org.junit.Test;
+import org.objectweb.asm.ClassReader;
+import org.objectweb.asm.ClassVisitor;
+import org.objectweb.asm.Opcodes;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.StringJoiner;
+
+import static org.junit.Assert.assertTrue;
+
+/**
+ * {@link ClassVisitor} that logs all the calls to the different visit methods so they can be later
+ * inspected.
+ */
+class LoggingClassVisitor extends ClassVisitor {
+    List<String> mLog = new LinkedList<String>();
+
+    public LoggingClassVisitor() {
+        super(Main.ASM_VERSION);
+    }
+
+    public LoggingClassVisitor(ClassVisitor cv) {
+        super(Main.ASM_VERSION, cv);
+    }
+
+    private static String formatAccess(int access) {
+        StringJoiner modifiers = new StringJoiner(",");
+
+        if ((access & Opcodes.ACC_PUBLIC) != 0) {
+            modifiers.add("public");
+        }
+        if ((access & Opcodes.ACC_PRIVATE) != 0) {
+            modifiers.add("private");
+        }
+        if ((access & Opcodes.ACC_PROTECTED) != 0) {
+            modifiers.add("protected");
+        }
+        if ((access & Opcodes.ACC_STATIC) != 0) {
+            modifiers.add("static");
+        }
+        if ((access & Opcodes.ACC_FINAL) != 0) {
+            modifiers.add("static");
+        }
+
+        return "[" + modifiers.toString() + "]";
+    }
+
+    private void log(String method, String format, Object...args) {
+        mLog.add(
+                String.format("[%s] - %s", method, String.format(format, (Object[]) args))
+        );
+    }
+
+    @Override
+    public void visitOuterClass(String owner, String name, String desc) {
+        log(
+                "visitOuterClass",
+                "owner=%s, name=%s, desc=%s",
+                owner, name, desc
+        );
+
+        super.visitOuterClass(owner, name, desc);
+    }
+
+    @Override
+    public void visitInnerClass(String name, String outerName, String innerName, int access) {
+        log(
+                "visitInnerClass",
+                "name=%s, outerName=%s, innerName=%s, access=%s",
+                name, outerName, innerName, formatAccess(access)
+        );
+
+        super.visitInnerClass(name, outerName, innerName, access);
+    }
+
+    @Override
+    public void visit(int version, int access, String name, String signature, String superName,
+            String[] interfaces) {
+        log(
+                "visit",
+                "version=%d, access=%s, name=%s, signature=%s, superName=%s, interfaces=%s",
+                version, formatAccess(access), name, signature, superName, Arrays.toString(interfaces)
+        );
+
+        super.visit(version, access, name, signature, superName, interfaces);
+    }
+}
+
+class PackageProtectedClass {}
+
+public class PromoteClassClassAdapterTest {
+    private static class PrivateClass {}
+    private static class ClassWithPrivateInnerClass {
+        private class InnerPrivateClass {}
+    }
+
+    @Test
+    public void testInnerClassPromotion() throws IOException {
+        ClassReader reader = new ClassReader(PrivateClass.class.getName());
+        LoggingClassVisitor log = new LoggingClassVisitor();
+
+        PromoteClassClassAdapter adapter = new PromoteClassClassAdapter(log, new HashSet<String>() {
+            {
+                add("com.android.tools.layoutlib.create.PromoteClassClassAdapterTest$PrivateClass");
+                add("com.android.tools.layoutlib.create" +
+                        ".PromoteClassClassAdapterTest$ClassWithPrivateInnerClass$InnerPrivateClass");
+            }
+        });
+        reader.accept(adapter, 0);
+        assertTrue(log.mLog.contains(
+                "[visitInnerClass] - " +
+                        "name=com/android/tools/layoutlib/create" +
+                        "/PromoteClassClassAdapterTest$PrivateClass, " +
+                        "outerName=com/android/tools/layoutlib/create" +
+                        "/PromoteClassClassAdapterTest, innerName=PrivateClass, access=[public,static]"));
+
+        // Test inner of inner class
+        log.mLog.clear();
+        reader = new ClassReader(ClassWithPrivateInnerClass.class.getName());
+        reader.accept(adapter, 0);
+
+        assertTrue(log.mLog.contains("[visitInnerClass] - " +
+                "name=com/android/tools/layoutlib/create" +
+                "/PromoteClassClassAdapterTest$ClassWithPrivateInnerClass$InnerPrivateClass, " +
+                "outerName=com/android/tools/layoutlib/create" +
+                "/PromoteClassClassAdapterTest$ClassWithPrivateInnerClass, " +
+                "innerName=InnerPrivateClass, access=[public]"));
+
+    }
+
+    @Test
+    public void testProtectedClassPromotion() throws IOException {
+        ClassReader reader = new ClassReader(PackageProtectedClass.class.getName());
+        LoggingClassVisitor log = new LoggingClassVisitor();
+
+        PromoteClassClassAdapter adapter = new PromoteClassClassAdapter(log, new HashSet<String>() {
+            {
+                add("com.android.tools.layoutlib.create.PackageProtectedClass");
+            }
+        });
+
+        reader.accept(adapter, 0);
+        assertTrue(log.mLog.contains("[visit] - version=52, access=[public], " +
+                "name=com/android/tools/layoutlib/create/PackageProtectedClass, signature=null, " +
+                "superName=java/lang/Object, interfaces=[]"));
+
+    }
+}
\ No newline at end of file
diff --git a/tools/preload2/src/com/android/preload/DeviceUtils.java b/tools/preload2/src/com/android/preload/DeviceUtils.java
index 803a7f1..18cab7b 100644
--- a/tools/preload2/src/com/android/preload/DeviceUtils.java
+++ b/tools/preload2/src/com/android/preload/DeviceUtils.java
@@ -16,13 +16,18 @@
 
 package com.android.preload;
 
+import com.android.ddmlib.AdbCommandRejectedException;
 import com.android.ddmlib.AndroidDebugBridge;
 import com.android.ddmlib.AndroidDebugBridge.IDeviceChangeListener;
 import com.android.preload.classdataretrieval.hprof.Hprof;
 import com.android.ddmlib.DdmPreferences;
 import com.android.ddmlib.IDevice;
 import com.android.ddmlib.IShellOutputReceiver;
+import com.android.ddmlib.SyncException;
+import com.android.ddmlib.TimeoutException;
 
+import java.io.File;
+import java.io.IOException;
 import java.util.Date;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
@@ -32,6 +37,18 @@
  */
 public class DeviceUtils {
 
+  // Locations
+  private static final String PRELOADED_CLASSES_FILE = "/etc/preloaded-classes";
+  // Shell commands
+  private static final String CREATE_EMPTY_PRELOADED_CMD = "touch " + PRELOADED_CLASSES_FILE;
+  private static final String DELETE_CACHE_CMD = "rm /data/dalvik-cache/*/*boot.art";
+  private static final String DELETE_PRELOADED_CMD = "rm " + PRELOADED_CLASSES_FILE;
+  private static final String READ_PRELOADED_CMD = "cat " + PRELOADED_CLASSES_FILE;
+  private static final String START_SHELL_CMD = "start";
+  private static final String STOP_SHELL_CMD = "stop";
+  private static final String REMOUNT_SYSTEM_CMD = "mount -o rw,remount /system";
+  private static final String UNSET_BOOTCOMPLETE_CMD = "setprop dev.bootcomplete \"0\"";
+
   public static void init(int debugPort) {
     DdmPreferences.setSelectedDebugPort(debugPort);
 
@@ -119,43 +136,56 @@
     return !ret.contains("No such file or directory");
   }
 
-  /**
-   * Remove files involved in a standard build that interfere with collecting data. This will
-   * remove /etc/preloaded-classes, which determines which classes are allocated already in the
-   * boot image. It also deletes any compiled boot image on the device. Then it restarts the
-   * device.
-   *
-   * This is a potentially long-running operation, as the boot after the deletion may take a while.
-   * The method will abort after the given timeout.
-   */
-  public static boolean removePreloaded(IDevice device, long preloadedWaitTimeInSeconds) {
-    String oldContent =
-        DeviceUtils.doShellReturnString(device, "cat /etc/preloaded-classes", 1, TimeUnit.SECONDS);
-    if (oldContent.trim().equals("")) {
-      System.out.println("Preloaded-classes already empty.");
-      return true;
-    }
+    /**
+     * Write over the preloaded-classes file with an empty or existing file and regenerate the boot
+     * image as necessary.
+     *
+     * @param device
+     * @param pcFile
+     * @param bootTimeout
+     * @throws AdbCommandRejectedException
+     * @throws IOException
+     * @throws TimeoutException
+     * @throws SyncException
+     * @return true if successfully overwritten, false otherwise
+     */
+    public static boolean overwritePreloaded(IDevice device, File pcFile, long bootTimeout)
+            throws AdbCommandRejectedException, IOException, TimeoutException, SyncException {
+        boolean writeEmpty = (pcFile == null);
+        if (writeEmpty) {
+            // Check if the preloaded-classes file is already empty.
+            String oldContent =
+                    doShellReturnString(device, READ_PRELOADED_CMD, 1, TimeUnit.SECONDS);
+            if (oldContent.trim().equals("")) {
+                System.out.println("Preloaded-classes already empty.");
+                return true;
+            }
+        }
 
-    // Stop the system server etc.
-    doShell(device, "stop", 100, TimeUnit.MILLISECONDS);
+        // Stop the system server etc.
+        doShell(device, STOP_SHELL_CMD, 1, TimeUnit.SECONDS);
+        // Remount the read-only system partition
+        doShell(device, REMOUNT_SYSTEM_CMD, 1, TimeUnit.SECONDS);
+        // Delete the preloaded-classes file
+        doShell(device, DELETE_PRELOADED_CMD, 1, TimeUnit.SECONDS);
+        // Delete the dalvik cache files
+        doShell(device, DELETE_CACHE_CMD, 1, TimeUnit.SECONDS);
+        if (writeEmpty) {
+            // Write an empty preloaded-classes file
+            doShell(device, CREATE_EMPTY_PRELOADED_CMD, 500, TimeUnit.MILLISECONDS);
+        } else {
+            // Push the new preloaded-classes file
+            device.pushFile(pcFile.getAbsolutePath(), PRELOADED_CLASSES_FILE);
+        }
+        // Manually reset the boot complete flag
+        doShell(device, UNSET_BOOTCOMPLETE_CMD, 1, TimeUnit.SECONDS);
+        // Restart system server on the device
+        doShell(device, START_SHELL_CMD, 1, TimeUnit.SECONDS);
+        // Wait for the boot complete flag and return the outcome.
+        return waitForBootComplete(device, bootTimeout);
+  }
 
-    // Remount /system, delete /etc/preloaded-classes. It would be nice to use "adb remount,"
-    // but AndroidDebugBridge doesn't expose it.
-    doShell(device, "mount -o remount,rw /system", 500, TimeUnit.MILLISECONDS);
-    doShell(device, "rm /etc/preloaded-classes", 100, TimeUnit.MILLISECONDS);
-    // We do need an empty file.
-    doShell(device, "touch /etc/preloaded-classes", 100, TimeUnit.MILLISECONDS);
-
-    // Delete the files in the dalvik cache.
-    doShell(device, "rm /data/dalvik-cache/*/*boot.art", 500, TimeUnit.MILLISECONDS);
-
-    // We'll try to use dev.bootcomplete to know when the system server is back up. But stop
-    // doesn't reset it, so do it manually.
-    doShell(device, "setprop dev.bootcomplete \"0\"", 500, TimeUnit.MILLISECONDS);
-
-    // Start the system server.
-    doShell(device, "start", 100, TimeUnit.MILLISECONDS);
-
+  private static boolean waitForBootComplete(IDevice device, long timeout) {
     // Do a loop checking each second whether bootcomplete. Wait for at most the given
     // threshold.
     Date startDate = new Date();
@@ -178,7 +208,7 @@
       Date endDate = new Date();
       long seconds =
           TimeUnit.SECONDS.convert(endDate.getTime() - startDate.getTime(), TimeUnit.MILLISECONDS);
-      if (seconds > preloadedWaitTimeInSeconds) {
+      if (seconds > timeout) {
         return false;
       }
     }
diff --git a/tools/preload2/src/com/android/preload/Main.java b/tools/preload2/src/com/android/preload/Main.java
index c42a19b..2265e95 100644
--- a/tools/preload2/src/com/android/preload/Main.java
+++ b/tools/preload2/src/com/android/preload/Main.java
@@ -29,6 +29,7 @@
 import com.android.preload.actions.ScanAllPackagesAction;
 import com.android.preload.actions.ScanPackageAction;
 import com.android.preload.actions.ShowDataAction;
+import com.android.preload.actions.WritePreloadedClassesAction;
 import com.android.preload.classdataretrieval.ClassDataRetriever;
 import com.android.preload.classdataretrieval.hprof.Hprof;
 import com.android.preload.classdataretrieval.jdwp.JDWPClassDataRetriever;
@@ -96,6 +97,7 @@
     public final static String COMPUTE_FILE_CMD = "comp";
     public final static String EXPORT_CMD = "export";
     public final static String IMPORT_CMD = "import";
+    public final static String WRITE_CMD = "write";
 
     /**
      * @param args
@@ -132,6 +134,7 @@
                 null));
         actions.add(new ComputeThresholdXAction("Compute(X)", dataTableModel,
                 CLASS_PRELOAD_BLACKLIST));
+        actions.add(new WritePreloadedClassesAction(clientUtils, null, dataTableModel));
         actions.add(new ShowDataAction(dataTableModel));
         actions.add(new ImportAction(dataTableModel));
         actions.add(new ExportAction(dataTableModel));
@@ -200,6 +203,11 @@
                     ui.input(it.next());
                     ui.confirmYes();
                     ui.output(new File(it.next()));
+                // Operation: Write preloaded classes from a specific file
+                } else if (WRITE_CMD.equals(op)) {
+                    System.out.println("Writing preloaded classes.");
+                    ui.action(WritePreloadedClassesAction.class);
+                    ui.input(new File(it.next()));
                 }
             }
         } catch (NoSuchElementException e) {
@@ -305,8 +313,16 @@
 
             Main.getUI().showMessageDialog("The device will reboot. This will potentially take a "
                     + "long time. Please be patient.");
-            if (!DeviceUtils.removePreloaded(device, 15 * 60) /* 15m timeout */) {
-                Main.getUI().showMessageDialog("Removing preloaded-classes failed unexpectedly!");
+            boolean success = false;
+            try {
+                success = DeviceUtils.overwritePreloaded(device, null, 15 * 60);
+            } catch (Exception e) {
+                System.err.println(e);
+            } finally {
+                if (!success) {
+                    Main.getUI().showMessageDialog(
+                            "Removing preloaded-classes failed unexpectedly!");
+                }
             }
         }
     }
diff --git a/tools/preload2/src/com/android/preload/actions/WritePreloadedClassesAction.java b/tools/preload2/src/com/android/preload/actions/WritePreloadedClassesAction.java
new file mode 100644
index 0000000..9b97f11
--- /dev/null
+++ b/tools/preload2/src/com/android/preload/actions/WritePreloadedClassesAction.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2015 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.preload.actions;
+
+import com.android.ddmlib.Client;
+import com.android.ddmlib.IDevice;
+import com.android.preload.ClientUtils;
+import com.android.preload.DeviceUtils;
+import com.android.preload.DumpData;
+import com.android.preload.DumpTableModel;
+import com.android.preload.Main;
+
+import java.awt.event.ActionEvent;
+import java.io.File;
+import java.util.Date;
+import java.util.Map;
+
+public class WritePreloadedClassesAction extends AbstractThreadedDeviceSpecificAction {
+    private File preloadedClassFile;
+
+    public WritePreloadedClassesAction(ClientUtils utils, IDevice device, DumpTableModel dataTableModel) {
+        super("Write preloaded classes action", device);
+    }
+
+    @Override
+    public void actionPerformed(ActionEvent e) {
+        File[] files = Main.getUI().showOpenDialog(true);
+        if (files != null && files.length > 0) {
+            preloadedClassFile = files[0];
+            super.actionPerformed(e);
+        }
+    }
+
+    @Override
+    public void run() {
+        Main.getUI().showWaitDialog();
+        try {
+            // Write the new file with a 5-minute timeout
+            DeviceUtils.overwritePreloaded(device, preloadedClassFile, 5 * 60);
+        } catch (Exception e) {
+            System.err.println(e);
+        } finally {
+            Main.getUI().hideWaitDialog();
+        }
+    }
+}
diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java
index dbf8cc1..97a15e4 100644
--- a/wifi/java/android/net/wifi/WifiConfiguration.java
+++ b/wifi/java/android/net/wifi/WifiConfiguration.java
@@ -305,7 +305,9 @@
     /**
      * Priority determines the preference given to a network by {@code wpa_supplicant}
      * when choosing an access point with which to associate.
+     * @deprecated Priority is no longer used.
      */
+    @Deprecated
     public int priority;
 
     /**
diff --git a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
index 0bfb955..f790332 100644
--- a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
+++ b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
@@ -263,11 +263,17 @@
         public static final int MSCHAPV2    = 3;
         /** Generic Token Card */
         public static final int GTC         = 4;
+        /** EAP-Subscriber Identity Module */
+        public static final int SIM         = 5;
+        /** EAP-Authentication and Key Agreement */
+        public static final int AKA         = 6;
+        /** EAP-Authentication and Key Agreement Prime */
+        public static final int AKA_PRIME   = 7;
         private static final String AUTH_PREFIX = "auth=";
         private static final String AUTHEAP_PREFIX = "autheap=";
         /** @hide */
         public static final String[] strings = {EMPTY_VALUE, "PAP", "MSCHAP",
-                "MSCHAPV2", "GTC" };
+                "MSCHAPV2", "GTC", "SIM", "AKA", "AKA'" };
 
         /** Prevent initialization */
         private Phase2() {}
@@ -426,6 +432,9 @@
             case Phase2.MSCHAP:
             case Phase2.MSCHAPV2:
             case Phase2.GTC:
+            case Phase2.SIM:
+            case Phase2.AKA:
+            case Phase2.AKA_PRIME:
                 mPhase2Method = phase2Method;
                 break;
             default:
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index ab725e2..ed6a166 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -838,7 +838,8 @@
     }
 
     /**
-     * Return a list of all the networks configured in the supplicant.
+     * Return a list of all the networks configured for the current foreground
+     * user.
      * Not all fields of WifiConfiguration are returned. Only the following
      * fields are filled in:
      * <ul>
@@ -973,7 +974,6 @@
      *
      * @param config The Passpoint configuration to be added
      * @return true on success
-     * @hide
      */
     public boolean addOrUpdatePasspointConfiguration(PasspointConfiguration config) {
         try {
@@ -988,7 +988,6 @@
      *
      * @param fqdn The FQDN of the passpoint configuration to be removed
      * @return true on success
-     * @hide
      */
     public boolean removePasspointConfiguration(String fqdn) {
         try {
@@ -1004,7 +1003,6 @@
      * An empty list will be returned when no configurations are installed.
      *
      * @return A list of {@link PasspointConfiguration}
-     * @hide
      */
     public List<PasspointConfiguration> getPasspointConfigurations() {
         try {
@@ -1060,8 +1058,12 @@
      * Remove the specified network from the list of configured networks.
      * This may result in the asynchronous delivery of state change
      * events.
-     * @param netId the integer that identifies the network configuration
-     * to the supplicant
+     *
+     * Applications are not allowed to remove networks created by other
+     * applications.
+     *
+     * @param netId the ID of the network as returned by {@link #addNetwork} or {@link
+     *        #getConfiguredNetworks}.
      * @return {@code true} if the operation succeeded
      */
     public boolean removeNetwork(int netId) {
@@ -1074,8 +1076,7 @@
 
     /**
      * Allow a previously configured network to be associated with. If
-     * <code>disableOthers</code> is true, then all other configured
-     * networks are disabled, and an attempt to connect to the selected
+     * <code>attemptConnect</code> is true, an attempt to connect to the selected
      * network is initiated. This may result in the asynchronous delivery
      * of state change events.
      * <p>
@@ -1092,14 +1093,17 @@
      * {@link Network#openConnection(java.net.URL)}, or
      * {@link ConnectivityManager#bindProcessToNetwork} to do so.
      *
-     * @param netId the ID of the network in the list of configured networks
-     * @param disableOthers if true, disable all other networks. The way to
-     * select a particular network to connect to is specify {@code true}
-     * for this parameter.
+     * Applications are not allowed to enable networks created by other
+     * applications.
+     *
+     * @param netId the ID of the network as returned by {@link #addNetwork} or {@link
+     *        #getConfiguredNetworks}.
+     * @param attemptConnect The way to select a particular network to connect to is specify
+     *        {@code true} for this parameter.
      * @return {@code true} if the operation succeeded
      */
-    public boolean enableNetwork(int netId, boolean disableOthers) {
-        final boolean pin = disableOthers && mTargetSdkVersion < Build.VERSION_CODES.LOLLIPOP;
+    public boolean enableNetwork(int netId, boolean attemptConnect) {
+        final boolean pin = attemptConnect && mTargetSdkVersion < Build.VERSION_CODES.LOLLIPOP;
         if (pin) {
             NetworkRequest request = new NetworkRequest.Builder()
                     .clearCapabilities()
@@ -1110,7 +1114,7 @@
 
         boolean success;
         try {
-            success = mService.enableNetwork(netId, disableOthers);
+            success = mService.enableNetwork(netId, attemptConnect);
         } catch (RemoteException e) {
             throw e.rethrowFromSystemServer();
         }
@@ -1126,7 +1130,12 @@
      * Disable a configured network. The specified network will not be
      * a candidate for associating. This may result in the asynchronous
      * delivery of state change events.
-     * @param netId the ID of the network as returned by {@link #addNetwork}.
+     *
+     * Applications are not allowed to disable networks created by other
+     * applications.
+     *
+     * @param netId the ID of the network as returned by {@link #addNetwork} or {@link
+     *        #getConfiguredNetworks}.
      * @return {@code true} if the operation succeeded
      */
     public boolean disableNetwork(int netId) {
@@ -1185,15 +1194,11 @@
      * Check that the supplicant daemon is responding to requests.
      * @return {@code true} if we were able to communicate with the supplicant and
      * it returned the expected response to the PING message.
+     * @deprecated Will return the output of {@link #isWifiEnabled()} instead.
      */
+    @Deprecated
     public boolean pingSupplicant() {
-        if (mService == null)
-            return false;
-        try {
-            return mService.pingSupplicant();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
+        return isWifiEnabled();
     }
 
     /** @hide */
@@ -1512,14 +1517,18 @@
     }
 
     /**
-     * Tell the supplicant to persist the current list of configured networks.
+     * Tell the device to persist the current list of configured networks.
      * <p>
      * Note: It is possible for this method to change the network IDs of
      * existing networks. You should assume the network IDs can be different
      * after calling this method.
      *
      * @return {@code true} if the operation succeeded
+     * @deprecated There is no need to call this method -
+     * {@link #addNetwork(WifiConfiguration)}, {@link #updateNetwork(WifiConfiguration)}
+     * and {@link #removeNetwork(int)} already persist the configurations automatically.
      */
+    @Deprecated
     public boolean saveConfiguration() {
         try {
             return mService.saveConfiguration();
@@ -2098,7 +2107,7 @@
 
     /**
      * Connect to a network with the given configuration. The network also
-     * gets added to the supplicant configuration.
+     * gets added to the list of configured networks for the foreground user.
      *
      * For a new network, this function is used instead of a
      * sequence of addNetwork(), enableNetwork(), saveConfiguration() and
@@ -2127,8 +2136,8 @@
      * This function is used instead of a enableNetwork(), saveConfiguration() and
      * reconnect()
      *
-     * @param networkId the network id identifiying the network in the
-     *                supplicant configuration list
+     * @param networkId the ID of the network as returned by {@link #addNetwork} or {@link
+     *        getConfiguredNetworks}.
      * @param listener for callbacks on success or failure. Can be null.
      * @throws IllegalStateException if the WifiManager instance needs to be
      * initialized again
@@ -2140,9 +2149,9 @@
     }
 
     /**
-     * Save the given network in the supplicant config. If the network already
-     * exists, the configuration is updated. A new network is enabled
-     * by default.
+     * Save the given network to the list of configured networks for the
+     * foreground user. If the network already exists, the configuration
+     * is updated. Any new network is enabled by default.
      *
      * For a new network, this function is used instead of a
      * sequence of addNetwork(), enableNetwork() and saveConfiguration().
@@ -2163,7 +2172,8 @@
     }
 
     /**
-     * Delete the network in the supplicant config.
+     * Delete the network from the list of configured networks for the
+     * foreground user.
      *
      * This function is used instead of a sequence of removeNetwork()
      * and saveConfiguration().
@@ -2854,7 +2864,8 @@
 
     /**
      * Restore state from the older version of back up data.
-     * The old backup data was essentially a backup of wpa_supplicant.conf & ipconfig.txt file.
+     * The old backup data was essentially a backup of wpa_supplicant.conf
+     * and ipconfig.txt file.
      * @hide
      */
     public void restoreSupplicantBackupData(byte[] supplicantData, byte[] ipConfigData) {
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);
diff --git a/wifi/java/android/net/wifi/WifiSsid.java b/wifi/java/android/net/wifi/WifiSsid.java
index c53cd3c..7a3cddf 100644
--- a/wifi/java/android/net/wifi/WifiSsid.java
+++ b/wifi/java/android/net/wifi/WifiSsid.java
@@ -49,6 +49,14 @@
     private WifiSsid() {
     }
 
+    public static WifiSsid createFromByteArray(byte ssid[]) {
+        WifiSsid wifiSsid = new WifiSsid();
+        if (ssid != null) {
+            wifiSsid.octets.write(ssid, 0/* the start offset */, ssid.length);;
+        }
+        return wifiSsid;
+    }
+
     public static WifiSsid createFromAsciiEncoded(String asciiEncoded) {
         WifiSsid a = new WifiSsid();
         a.convertToBytes(asciiEncoded);
diff --git a/wifi/java/android/net/wifi/hotspot2/ConfigBuilder.java b/wifi/java/android/net/wifi/hotspot2/ConfigParser.java
similarity index 97%
rename from wifi/java/android/net/wifi/hotspot2/ConfigBuilder.java
rename to wifi/java/android/net/wifi/hotspot2/ConfigParser.java
index 78b335d..027b049a 100644
--- a/wifi/java/android/net/wifi/hotspot2/ConfigBuilder.java
+++ b/wifi/java/android/net/wifi/hotspot2/ConfigParser.java
@@ -16,7 +16,7 @@
 
 package android.net.wifi.hotspot2;
 
-import android.net.wifi.hotspot2.omadm.PPSMOParser;
+import android.net.wifi.hotspot2.omadm.PpsMoParser;
 import android.text.TextUtils;
 import android.util.Base64;
 import android.util.Log;
@@ -41,11 +41,9 @@
 
 /**
  * Utility class for building PasspointConfiguration from an installation file.
- *
- * @hide
  */
-public final class ConfigBuilder {
-    private static final String TAG = "ConfigBuilder";
+public final class ConfigParser {
+    private static final String TAG = "ConfigParser";
 
     // Header names.
     private static final String CONTENT_TYPE = "Content-Type";
@@ -101,6 +99,10 @@
         public String encodingType = null;
     }
 
+    /**
+     * @hide
+     */
+    public ConfigParser() {}
 
     /**
      * Parse the Hotspot 2.0 Release 1 configuration data into a {@link PasspointConfiguration}
@@ -133,7 +135,7 @@
      *             certificate chain (optional).
      * @return {@link PasspointConfiguration}
      */
-    public static PasspointConfiguration buildPasspointConfig(String mimeType, byte[] data) {
+    public static PasspointConfiguration parsePasspointConfig(String mimeType, byte[] data) {
         // Verify MIME type.
         if (!TextUtils.equals(mimeType, TYPE_WIFI_CONFIG)) {
             Log.e(TAG, "Unexpected MIME type: " + mimeType);
@@ -169,7 +171,7 @@
             throw new IOException("Missing Passpoint Profile");
         }
 
-        PasspointConfiguration config = PPSMOParser.parseMOText(new String(profileData));
+        PasspointConfiguration config = PpsMoParser.parseMoText(new String(profileData));
         if (config == null) {
             throw new IOException("Failed to parse Passpoint profile");
         }
@@ -470,4 +472,4 @@
         }
         return new Pair<PrivateKey, List<X509Certificate>>(clientKey, clientCertificateChain);
     }
-}
\ No newline at end of file
+}
diff --git a/wifi/java/android/net/wifi/hotspot2/PasspointConfiguration.java b/wifi/java/android/net/wifi/hotspot2/PasspointConfiguration.java
index c2b307d..1f661c4 100644
--- a/wifi/java/android/net/wifi/hotspot2/PasspointConfiguration.java
+++ b/wifi/java/android/net/wifi/hotspot2/PasspointConfiguration.java
@@ -17,7 +17,7 @@
 package android.net.wifi.hotspot2;
 
 import android.net.wifi.hotspot2.pps.Credential;
-import android.net.wifi.hotspot2.pps.HomeSP;
+import android.net.wifi.hotspot2.pps.HomeSp;
 import android.net.wifi.hotspot2.pps.Policy;
 import android.net.wifi.hotspot2.pps.UpdateParameter;
 import android.os.Parcelable;
@@ -38,8 +38,6 @@
  *
  * For more info, refer to Hotspot 2.0 PPS MO defined in section 9.1 of the Hotspot 2.0
  * Release 2 Technical Specification.
- *
- * @hide
  */
 public final class PasspointConfiguration implements Parcelable {
     private static final String TAG = "PasspointConfiguration";
@@ -60,11 +58,11 @@
     private static final int NULL_VALUE = -1;
 
     /**
-     * Configurations under HomeSP subtree.
+     * Configurations under HomeSp subtree.
      */
-    private HomeSP mHomeSp = null;
-    public void setHomeSp(HomeSP homeSp) { mHomeSp = homeSp; }
-    public HomeSP getHomeSp() { return mHomeSp; }
+    private HomeSp mHomeSp = null;
+    public void setHomeSp(HomeSp homeSp) { mHomeSp = homeSp; }
+    public HomeSp getHomeSp() { return mHomeSp; }
 
     /**
      * Configurations under Credential subtree.
@@ -122,7 +120,7 @@
     public void setUpdateIdentifier(int updateIdentifier) {
         mUpdateIdentifier = updateIdentifier;
     }
-    public int getUpdateIdentififer() {
+    public int getUpdateIdentifier() {
         return mUpdateIdentifier;
     }
 
@@ -248,7 +246,7 @@
         }
 
         if (source.mHomeSp != null) {
-            mHomeSp = new HomeSP(source.mHomeSp);
+            mHomeSp = new HomeSp(source.mHomeSp);
         }
         if (source.mCredential != null) {
             mCredential = new Credential(source.mCredential);
diff --git a/wifi/java/android/net/wifi/hotspot2/omadm/PPSMOParser.java b/wifi/java/android/net/wifi/hotspot2/omadm/PpsMoParser.java
similarity index 98%
rename from wifi/java/android/net/wifi/hotspot2/omadm/PPSMOParser.java
rename to wifi/java/android/net/wifi/hotspot2/omadm/PpsMoParser.java
index 24672d4..2ffe428 100644
--- a/wifi/java/android/net/wifi/hotspot2/omadm/PPSMOParser.java
+++ b/wifi/java/android/net/wifi/hotspot2/omadm/PpsMoParser.java
@@ -18,7 +18,7 @@
 
 import android.net.wifi.hotspot2.PasspointConfiguration;
 import android.net.wifi.hotspot2.pps.Credential;
-import android.net.wifi.hotspot2.pps.HomeSP;
+import android.net.wifi.hotspot2.pps.HomeSp;
 import android.net.wifi.hotspot2.pps.Policy;
 import android.net.wifi.hotspot2.pps.UpdateParameter;
 import android.text.TextUtils;
@@ -109,11 +109,9 @@
  *     </Node>
  *   </Node>
  * </MgmtTree>
- *
- * @hide
  */
-public final class PPSMOParser {
-    private static final String TAG = "PPSMOParser";
+public final class PpsMoParser {
+    private static final String TAG = "PpsMoParser";
 
     /**
      * XML tags expected in the PPS MO (PerProviderSubscription Management Object) XML tree.
@@ -326,13 +324,18 @@
     }
 
     /**
+     * @hide
+     */
+    public PpsMoParser() {}
+
+    /**
      * Convert a XML string representation of a PPS MO (PerProviderSubscription
      * Management Object) tree to a {@link PasspointConfiguration} object.
      *
      * @param xmlString XML string representation of a PPS MO tree
      * @return {@link PasspointConfiguration} or null
      */
-    public static PasspointConfiguration parseMOText(String xmlString) {
+    public static PasspointConfiguration parseMoText(String xmlString) {
         // Convert the XML string to a XML tree.
         XMLParser xmlParser = new XMLParser();
         XMLNode root = null;
@@ -640,12 +643,12 @@
      * @return HomeSP
      * @throws ParsingException
      */
-    private static HomeSP parseHomeSP(PPSNode node) throws ParsingException {
+    private static HomeSp parseHomeSP(PPSNode node) throws ParsingException {
         if (node.isLeaf()) {
             throw new ParsingException("Leaf node not expected for HomeSP");
         }
 
-        HomeSP homeSp = new HomeSP();
+        HomeSp homeSp = new HomeSp();
         for (PPSNode child : node.getChildren()) {
             switch (child.getName()) {
                 case NODE_FQDN:
@@ -655,7 +658,7 @@
                     homeSp.setFriendlyName(getPpsNodeValue(child));
                     break;
                 case NODE_ROAMING_CONSORTIUM_OI:
-                    homeSp.setRoamingConsortiumOIs(
+                    homeSp.setRoamingConsortiumOis(
                             parseRoamingConsortiumOI(getPpsNodeValue(child)));
                     break;
                 case NODE_ICON_URL:
@@ -666,8 +669,8 @@
                     break;
                 case NODE_HOME_OI_LIST:
                     Pair<List<Long>, List<Long>> homeOIs = parseHomeOIList(child);
-                    homeSp.setMatchAllOIs(convertFromLongList(homeOIs.first));
-                    homeSp.setMatchAnyOIs(convertFromLongList(homeOIs.second));
+                    homeSp.setMatchAllOis(convertFromLongList(homeOIs.first));
+                    homeSp.setMatchAnyOis(convertFromLongList(homeOIs.second));
                     break;
                 case NODE_OTHER_HOME_PARTNERS:
                     homeSp.setOtherHomePartners(parseOtherHomePartners(child));
@@ -909,7 +912,7 @@
                     credential.setRealm(getPpsNodeValue(child));
                     break;
                 case NODE_CHECK_AAA_SERVER_CERT_STATUS:
-                    credential.setCheckAAAServerCertStatus(
+                    credential.setCheckAaaServerCertStatus(
                             Boolean.parseBoolean(getPpsNodeValue(child)));
                     break;
                 case NODE_SIM:
diff --git a/wifi/java/android/net/wifi/hotspot2/pps/Credential.java b/wifi/java/android/net/wifi/hotspot2/pps/Credential.java
index ff93486..620759d 100644
--- a/wifi/java/android/net/wifi/hotspot2/pps/Credential.java
+++ b/wifi/java/android/net/wifi/hotspot2/pps/Credential.java
@@ -42,8 +42,6 @@
  *
  * In addition to the fields in the Credential subtree, this will also maintain necessary
  * information for the private key and certificates associated with this credential.
- *
- * @hide
  */
 public final class Credential implements Parcelable {
     private static final String TAG = "Credential";
@@ -98,12 +96,12 @@
      * and Accounting) server's certificate during EAP (Extensible Authentication
      * Protocol) authentication.
      */
-    private boolean mCheckAAAServerCertStatus = false;
-    public void setCheckAAAServerCertStatus(boolean checkAAAServerCertStatus) {
-        mCheckAAAServerCertStatus = checkAAAServerCertStatus;
+    private boolean mCheckAaaServerCertStatus = false;
+    public void setCheckAaaServerCertStatus(boolean checkAaaServerCertStatus) {
+        mCheckAaaServerCertStatus = checkAaaServerCertStatus;
     }
-    public boolean getCheckAAAServerStatus() {
-        return mCheckAAAServerCertStatus;
+    public boolean getCheckAaaServerCertStatus() {
+        return mCheckAaaServerCertStatus;
     }
 
     /**
@@ -685,7 +683,7 @@
             mCreationTimeInMs = source.mCreationTimeInMs;
             mExpirationTimeInMs = source.mExpirationTimeInMs;
             mRealm = source.mRealm;
-            mCheckAAAServerCertStatus = source.mCheckAAAServerCertStatus;
+            mCheckAaaServerCertStatus = source.mCheckAaaServerCertStatus;
             if (source.mUserCredential != null) {
                 mUserCredential = new UserCredential(source.mUserCredential);
             }
@@ -714,7 +712,7 @@
         dest.writeLong(mCreationTimeInMs);
         dest.writeLong(mExpirationTimeInMs);
         dest.writeString(mRealm);
-        dest.writeInt(mCheckAAAServerCertStatus ? 1 : 0);
+        dest.writeInt(mCheckAaaServerCertStatus ? 1 : 0);
         dest.writeParcelable(mUserCredential, flags);
         dest.writeParcelable(mCertCredential, flags);
         dest.writeParcelable(mSimCredential, flags);
@@ -736,7 +734,7 @@
         return TextUtils.equals(mRealm, that.mRealm)
                 && mCreationTimeInMs == that.mCreationTimeInMs
                 && mExpirationTimeInMs == that.mExpirationTimeInMs
-                && mCheckAAAServerCertStatus == that.mCheckAAAServerCertStatus
+                && mCheckAaaServerCertStatus == that.mCheckAaaServerCertStatus
                 && (mUserCredential == null ? that.mUserCredential == null
                     : mUserCredential.equals(that.mUserCredential))
                 && (mCertCredential == null ? that.mCertCredential == null
@@ -751,7 +749,7 @@
     @Override
     public int hashCode() {
         return Objects.hash(mRealm, mCreationTimeInMs, mExpirationTimeInMs,
-                mCheckAAAServerCertStatus, mUserCredential, mCertCredential, mSimCredential,
+                mCheckAaaServerCertStatus, mUserCredential, mCertCredential, mSimCredential,
                 mCaCertificate, mClientCertificateChain, mClientPrivateKey);
     }
 
@@ -800,7 +798,7 @@
                 credential.setCreationTimeInMs(in.readLong());
                 credential.setExpirationTimeInMs(in.readLong());
                 credential.setRealm(in.readString());
-                credential.setCheckAAAServerCertStatus(in.readInt() != 0);
+                credential.setCheckAaaServerCertStatus(in.readInt() != 0);
                 credential.setUserCredential(in.readParcelable(null));
                 credential.setCertCredential(in.readParcelable(null));
                 credential.setSimCredential(in.readParcelable(null));
diff --git a/wifi/java/android/net/wifi/hotspot2/pps/HomeSP.aidl b/wifi/java/android/net/wifi/hotspot2/pps/HomeSp.aidl
similarity index 96%
rename from wifi/java/android/net/wifi/hotspot2/pps/HomeSP.aidl
rename to wifi/java/android/net/wifi/hotspot2/pps/HomeSp.aidl
index 62d5603..6d343bd 100644
--- a/wifi/java/android/net/wifi/hotspot2/pps/HomeSP.aidl
+++ b/wifi/java/android/net/wifi/hotspot2/pps/HomeSp.aidl
@@ -16,4 +16,4 @@
 
 package android.net.wifi.hotspot2.pps;
 
-parcelable HomeSP;
+parcelable HomeSp;
diff --git a/wifi/java/android/net/wifi/hotspot2/pps/HomeSP.java b/wifi/java/android/net/wifi/hotspot2/pps/HomeSp.java
similarity index 79%
rename from wifi/java/android/net/wifi/hotspot2/pps/HomeSP.java
rename to wifi/java/android/net/wifi/hotspot2/pps/HomeSp.java
index 8b3b79c..8ec40c0 100644
--- a/wifi/java/android/net/wifi/hotspot2/pps/HomeSP.java
+++ b/wifi/java/android/net/wifi/hotspot2/pps/HomeSp.java
@@ -34,11 +34,9 @@
  *
  * For more info, refer to Hotspot 2.0 PPS MO defined in section 9.1 of the Hotspot 2.0
  * Release 2 Technical Specification.
- *
- * @hide
  */
-public final class HomeSP implements Parcelable {
-    private static final String TAG = "HomeSP";
+public final class HomeSp implements Parcelable {
+    private static final String TAG = "HomeSp";
 
     /**
      * Maximum number of bytes allowed for a SSID.
@@ -108,12 +106,12 @@
      * Refer to HomeSP/HomeOIList subtree in PerProviderSubscription (PPS) Management Object
      * (MO) tree for more detail.
      */
-    private long[] mMatchAllOIs = null;
-    public void setMatchAllOIs(long[] matchAllOIs) {
-        mMatchAllOIs = matchAllOIs;
+    private long[] mMatchAllOis = null;
+    public void setMatchAllOis(long[] matchAllOis) {
+        mMatchAllOis = matchAllOis;
     }
-    public long[] getMatchAllOIs() {
-        return mMatchAllOIs;
+    public long[] getMatchAllOis() {
+        return mMatchAllOis;
     }
 
     /**
@@ -129,12 +127,12 @@
      * Refer to HomeSP/HomeOIList subtree in PerProviderSubscription (PPS) Management Object
      * (MO) tree for more detail.
      */
-    private long[] mMatchAnyOIs = null;
-    public void setMatchAnyOIs(long[] matchAnyOIs) {
-        mMatchAnyOIs = matchAnyOIs;
+    private long[] mMatchAnyOis = null;
+    public void setMatchAnyOis(long[] matchAnyOis) {
+        mMatchAnyOis = matchAnyOis;
     }
-    public long[] getMatchAnysOIs() {
-        return mMatchAnyOIs;
+    public long[] getMatchAnyOis() {
+        return mMatchAnyOis;
     }
 
     /**
@@ -155,25 +153,25 @@
      * List of Organization Identifiers (OIs) identifying a roaming consortium of
      * which this provider is a member.
      */
-    private long[] mRoamingConsortiumOIs = null;
-    public void setRoamingConsortiumOIs(long[] roamingConsortiumOIs) {
-        mRoamingConsortiumOIs = roamingConsortiumOIs;
+    private long[] mRoamingConsortiumOis = null;
+    public void setRoamingConsortiumOis(long[] roamingConsortiumOis) {
+        mRoamingConsortiumOis = roamingConsortiumOis;
     }
-    public long[] getRoamingConsortiumOIs() {
-        return mRoamingConsortiumOIs;
+    public long[] getRoamingConsortiumOis() {
+        return mRoamingConsortiumOis;
     }
 
     /**
-     * Constructor for creating HomeSP with default values.
+     * Constructor for creating HomeSp with default values.
      */
-    public HomeSP() {}
+    public HomeSp() {}
 
     /**
      * Copy constructor.
      *
      * @param source The source to copy from
      */
-    public HomeSP(HomeSP source) {
+    public HomeSp(HomeSp source) {
         if (source == null) {
             return;
         }
@@ -183,19 +181,19 @@
         if (source.mHomeNetworkIds != null) {
             mHomeNetworkIds = Collections.unmodifiableMap(source.mHomeNetworkIds);
         }
-        if (source.mMatchAllOIs != null) {
-            mMatchAllOIs = Arrays.copyOf(source.mMatchAllOIs, source.mMatchAllOIs.length);
+        if (source.mMatchAllOis != null) {
+            mMatchAllOis = Arrays.copyOf(source.mMatchAllOis, source.mMatchAllOis.length);
         }
-        if (source.mMatchAnyOIs != null) {
-            mMatchAnyOIs = Arrays.copyOf(source.mMatchAnyOIs, source.mMatchAnyOIs.length);
+        if (source.mMatchAnyOis != null) {
+            mMatchAnyOis = Arrays.copyOf(source.mMatchAnyOis, source.mMatchAnyOis.length);
         }
         if (source.mOtherHomePartners != null) {
             mOtherHomePartners = Arrays.copyOf(source.mOtherHomePartners,
                     source.mOtherHomePartners.length);
         }
-        if (source.mRoamingConsortiumOIs != null) {
-            mRoamingConsortiumOIs = Arrays.copyOf(source.mRoamingConsortiumOIs,
-                    source.mRoamingConsortiumOIs.length);
+        if (source.mRoamingConsortiumOis != null) {
+            mRoamingConsortiumOis = Arrays.copyOf(source.mRoamingConsortiumOis,
+                    source.mRoamingConsortiumOis.length);
         }
     }
 
@@ -210,10 +208,10 @@
         dest.writeString(mFriendlyName);
         dest.writeString(mIconUrl);
         writeHomeNetworkIds(dest, mHomeNetworkIds);
-        dest.writeLongArray(mMatchAllOIs);
-        dest.writeLongArray(mMatchAnyOIs);
+        dest.writeLongArray(mMatchAllOis);
+        dest.writeLongArray(mMatchAnyOis);
         dest.writeStringArray(mOtherHomePartners);
-        dest.writeLongArray(mRoamingConsortiumOIs);
+        dest.writeLongArray(mRoamingConsortiumOis);
     }
 
     @Override
@@ -221,30 +219,30 @@
         if (this == thatObject) {
             return true;
         }
-        if (!(thatObject instanceof HomeSP)) {
+        if (!(thatObject instanceof HomeSp)) {
             return false;
         }
-        HomeSP that = (HomeSP) thatObject;
+        HomeSp that = (HomeSp) thatObject;
 
         return TextUtils.equals(mFqdn, that.mFqdn)
                 && TextUtils.equals(mFriendlyName, that.mFriendlyName)
                 && TextUtils.equals(mIconUrl, that.mIconUrl)
                 && (mHomeNetworkIds == null ? that.mHomeNetworkIds == null
                         : mHomeNetworkIds.equals(that.mHomeNetworkIds))
-                && Arrays.equals(mMatchAllOIs, that.mMatchAllOIs)
-                && Arrays.equals(mMatchAnyOIs, that.mMatchAnyOIs)
+                && Arrays.equals(mMatchAllOis, that.mMatchAllOis)
+                && Arrays.equals(mMatchAnyOis, that.mMatchAnyOis)
                 && Arrays.equals(mOtherHomePartners, that.mOtherHomePartners)
-                && Arrays.equals(mRoamingConsortiumOIs, that.mRoamingConsortiumOIs);
+                && Arrays.equals(mRoamingConsortiumOis, that.mRoamingConsortiumOis);
     }
 
     @Override
     public int hashCode() {
-        return Objects.hash(mFqdn, mFriendlyName, mIconUrl, mHomeNetworkIds, mMatchAllOIs,
-                mMatchAnyOIs, mOtherHomePartners, mRoamingConsortiumOIs);
+        return Objects.hash(mFqdn, mFriendlyName, mIconUrl, mHomeNetworkIds, mMatchAllOis,
+                mMatchAnyOis, mOtherHomePartners, mRoamingConsortiumOis);
     }
 
     /**
-     * Validate HomeSP data.
+     * Validate HomeSp data.
      *
      * @return true on success or false on failure
      */
@@ -270,25 +268,25 @@
         return true;
     }
 
-    public static final Creator<HomeSP> CREATOR =
-        new Creator<HomeSP>() {
+    public static final Creator<HomeSp> CREATOR =
+        new Creator<HomeSp>() {
             @Override
-            public HomeSP createFromParcel(Parcel in) {
-                HomeSP homeSp = new HomeSP();
+            public HomeSp createFromParcel(Parcel in) {
+                HomeSp homeSp = new HomeSp();
                 homeSp.setFqdn(in.readString());
                 homeSp.setFriendlyName(in.readString());
                 homeSp.setIconUrl(in.readString());
                 homeSp.setHomeNetworkIds(readHomeNetworkIds(in));
-                homeSp.setMatchAllOIs(in.createLongArray());
-                homeSp.setMatchAnyOIs(in.createLongArray());
+                homeSp.setMatchAllOis(in.createLongArray());
+                homeSp.setMatchAnyOis(in.createLongArray());
                 homeSp.setOtherHomePartners(in.createStringArray());
-                homeSp.setRoamingConsortiumOIs(in.createLongArray());
+                homeSp.setRoamingConsortiumOis(in.createLongArray());
                 return homeSp;
             }
 
             @Override
-            public HomeSP[] newArray(int size) {
-                return new HomeSP[size];
+            public HomeSp[] newArray(int size) {
+                return new HomeSp[size];
             }
 
             /**
diff --git a/wifi/java/android/net/wifi/hotspot2/pps/Policy.java b/wifi/java/android/net/wifi/hotspot2/pps/Policy.java
index ceaada4..63238e8 100644
--- a/wifi/java/android/net/wifi/hotspot2/pps/Policy.java
+++ b/wifi/java/android/net/wifi/hotspot2/pps/Policy.java
@@ -40,18 +40,11 @@
  *
  * For more info, refer to Hotspot 2.0 PPS MO defined in section 9.1 of the Hotspot 2.0
  * Release 2 Technical Specification.
- *
- * @hide
  */
 public final class Policy implements Parcelable {
     private static final String TAG = "Policy";
 
     /**
-     * Default priority for preferred roaming partner.
-     */
-    public static final int PREFERRED_ROAMING_PARTNER_DEFAULT_PRIORITY = 128;
-
-    /**
      * Maximum number of SSIDs in the exclusion list.
      */
     private static final int MAX_EXCLUSION_SSIDS = 128;
@@ -84,7 +77,7 @@
     public void setMinHomeDownlinkBandwidth(long minHomeDownlinkBandwidth) {
         mMinHomeDownlinkBandwidth = minHomeDownlinkBandwidth;
     }
-    public long getMinHomeDownlinkBandWidht() {
+    public long getMinHomeDownlinkBandwidth() {
         return mMinHomeDownlinkBandwidth;
     }
     private long mMinHomeUplinkBandwidth = Long.MIN_VALUE;
@@ -189,8 +182,9 @@
 
         /**
          * Priority associated with this roaming partner policy.
+         * Using Integer.MIN_VALUE to indicate unset value.
          */
-        private int mPriority = PREFERRED_ROAMING_PARTNER_DEFAULT_PRIORITY;
+        private int mPriority = Integer.MIN_VALUE;
         public void setPriority(int priority) {
             mPriority = priority;
         }
diff --git a/wifi/java/android/net/wifi/hotspot2/pps/UpdateParameter.java b/wifi/java/android/net/wifi/hotspot2/pps/UpdateParameter.java
index 17fbf9f..70264b0e 100644
--- a/wifi/java/android/net/wifi/hotspot2/pps/UpdateParameter.java
+++ b/wifi/java/android/net/wifi/hotspot2/pps/UpdateParameter.java
@@ -34,8 +34,6 @@
  *
  * For more info, refer to Hotspot 2.0 PPS MO defined in section 9.1 of the Hotspot 2.0
  * Release 2 Technical Specification.
- *
- * @hide
  */
 public final class UpdateParameter implements Parcelable {
     private static final String TAG = "UpdateParameter";
diff --git a/wifi/tests/src/android/net/wifi/WifiEnterpriseConfigTest.java b/wifi/tests/src/android/net/wifi/WifiEnterpriseConfigTest.java
index fa546a5..c4d2d32 100644
--- a/wifi/tests/src/android/net/wifi/WifiEnterpriseConfigTest.java
+++ b/wifi/tests/src/android/net/wifi/WifiEnterpriseConfigTest.java
@@ -283,6 +283,21 @@
         assertEquals("\"auth=GTC\"", getSupplicantPhase2Method());
     }
 
+    /** Verfies PEAP/SIM, PEAP/AKA, PEAP/AKA'. */
+    @Test
+    public void peapSimAkaAkaPrime() {
+        mEnterpriseConfig.setEapMethod(Eap.PEAP);
+        mEnterpriseConfig.setPhase2Method(Phase2.SIM);
+        assertEquals("PEAP", getSupplicantEapMethod());
+        assertEquals("\"auth=SIM\"", getSupplicantPhase2Method());
+
+        mEnterpriseConfig.setPhase2Method(Phase2.AKA);
+        assertEquals("\"auth=AKA\"", getSupplicantPhase2Method());
+
+        mEnterpriseConfig.setPhase2Method(Phase2.AKA_PRIME);
+        assertEquals("\"auth=AKA'\"", getSupplicantPhase2Method());
+    }
+
     /** Verfies that the copy constructor preseves the inner method information. */
     @Test
     public void copyConstructor() {
diff --git a/wifi/tests/src/android/net/wifi/WifiSsidTest.java b/wifi/tests/src/android/net/wifi/WifiSsidTest.java
new file mode 100644
index 0000000..c7bdb7b
--- /dev/null
+++ b/wifi/tests/src/android/net/wifi/WifiSsidTest.java
@@ -0,0 +1,40 @@
+/*
+ * 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.net.wifi;
+
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+/**
+ * Unit tests for {@link android.net.wifi.WifiSsid}.
+ */
+public class WifiSsidTest {
+
+    private static final byte[] TEST_SSID =
+            new byte[] {'G', 'o', 'o', 'g', 'l', 'e', 'G', 'u', 'e', 's', 't'};
+    /**
+     * Check that createFromByteArray() works.
+     */
+    @Test
+    public void testCreateFromByteArray() {
+        WifiSsid wifiSsid = WifiSsid.createFromByteArray(TEST_SSID);
+        assertTrue(wifiSsid != null);
+        assertEquals(new String(TEST_SSID), wifiSsid.toString());
+    }
+}
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/ConfigBuilderTest.java b/wifi/tests/src/android/net/wifi/hotspot2/ConfigParserTest.java
similarity index 91%
rename from wifi/tests/src/android/net/wifi/hotspot2/ConfigBuilderTest.java
rename to wifi/tests/src/android/net/wifi/hotspot2/ConfigParserTest.java
index f7dbf7e..56bb437 100644
--- a/wifi/tests/src/android/net/wifi/hotspot2/ConfigBuilderTest.java
+++ b/wifi/tests/src/android/net/wifi/hotspot2/ConfigParserTest.java
@@ -21,7 +21,7 @@
 
 import android.net.wifi.FakeKeys;
 import android.net.wifi.hotspot2.pps.Credential;
-import android.net.wifi.hotspot2.pps.HomeSP;
+import android.net.wifi.hotspot2.pps.HomeSp;
 import android.test.suitebuilder.annotation.SmallTest;
 
 import java.io.BufferedReader;
@@ -33,10 +33,10 @@
 import org.junit.Test;
 
 /**
- * Unit tests for {@link android.net.wifi.hotspot2.ConfigBuilder}.
+ * Unit tests for {@link android.net.wifi.hotspot2.ConfigParser}.
  */
 @SmallTest
-public class ConfigBuilderTest {
+public class ConfigParserTest {
     /**
      * Hotspot 2.0 Release 1 installation file that contains a Passpoint profile and a
      * CA (Certificate Authority) X.509 certificate {@link FakeKeys#CA_CERT0}.
@@ -83,10 +83,10 @@
         PasspointConfiguration config = new PasspointConfiguration();
 
         // HomeSP configuration.
-        HomeSP homeSp = new HomeSP();
+        HomeSp homeSp = new HomeSp();
         homeSp.setFriendlyName("Century House");
         homeSp.setFqdn("mi6.co.uk");
-        homeSp.setRoamingConsortiumOIs(new long[] {0x112233L, 0x445566L});
+        homeSp.setRoamingConsortiumOis(new long[] {0x112233L, 0x445566L});
         config.setHomeSp(homeSp);
 
         // Credential configuration.
@@ -123,7 +123,7 @@
         String configStr = loadResourceFile(PASSPOINT_INSTALLATION_FILE_WITH_CA_CERT);
         PasspointConfiguration expectedConfig = generateConfigurationFromProfile();
         PasspointConfiguration actualConfig =
-                ConfigBuilder.buildPasspointConfig(
+                ConfigParser.parsePasspointConfig(
                         "application/x-wifi-config", configStr.getBytes());
         assertTrue(actualConfig.equals(expectedConfig));
     }
@@ -136,7 +136,7 @@
     @Test
     public void parseConfigFileWithInvalidMimeType() throws Exception {
         String configStr = loadResourceFile(PASSPOINT_INSTALLATION_FILE_WITH_CA_CERT);
-        assertNull(ConfigBuilder.buildPasspointConfig(
+        assertNull(ConfigParser.parsePasspointConfig(
                 "application/wifi-config", configStr.getBytes()));
     }
 
@@ -148,7 +148,7 @@
     @Test
     public void parseConfigFileWithUnencodedData() throws Exception {
         String configStr = loadResourceFile(PASSPOINT_INSTALLATION_FILE_WITH_UNENCODED_DATA);
-        assertNull(ConfigBuilder.buildPasspointConfig(
+        assertNull(ConfigParser.parsePasspointConfig(
                 "application/x-wifi-config", configStr.getBytes()));
     }
 
@@ -160,7 +160,7 @@
     @Test
     public void parseConfigFileWithInvalidPart() throws Exception {
         String configStr = loadResourceFile(PASSPOINT_INSTALLATION_FILE_WITH_INVALID_PART);
-        assertNull(ConfigBuilder.buildPasspointConfig(
+        assertNull(ConfigParser.parsePasspointConfig(
                 "application/x-wifi-config", configStr.getBytes()));
     }
 
@@ -172,7 +172,7 @@
     @Test
     public void parseConfigFileWithMissingBoundary() throws Exception {
         String configStr = loadResourceFile(PASSPOINT_INSTALLATION_FILE_WITH_MISSING_BOUNDARY);
-        assertNull(ConfigBuilder.buildPasspointConfig(
+        assertNull(ConfigParser.parsePasspointConfig(
                 "application/x-wifi-config", configStr.getBytes()));
     }
 
@@ -185,7 +185,7 @@
     @Test
     public void parseConfigFileWithInvalidContentType() throws Exception {
         String configStr = loadResourceFile(PASSPOINT_INSTALLATION_FILE_WITH_INVALID_CONTENT_TYPE);
-        assertNull(ConfigBuilder.buildPasspointConfig(
+        assertNull(ConfigParser.parsePasspointConfig(
                 "application/x-wifi-config", configStr.getBytes()));
     }
 
@@ -197,7 +197,7 @@
     @Test
     public void parseConfigFileWithoutPasspointProfile() throws Exception {
         String configStr = loadResourceFile(PASSPOINT_INSTALLATION_FILE_WITHOUT_PROFILE);
-        assertNull(ConfigBuilder.buildPasspointConfig(
+        assertNull(ConfigParser.parsePasspointConfig(
                 "application/x-wifi-config", configStr.getBytes()));
     }
 }
\ No newline at end of file
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/PasspointConfigurationTest.java b/wifi/tests/src/android/net/wifi/hotspot2/PasspointConfigurationTest.java
index 3aed918..7df4fcf 100644
--- a/wifi/tests/src/android/net/wifi/hotspot2/PasspointConfigurationTest.java
+++ b/wifi/tests/src/android/net/wifi/hotspot2/PasspointConfigurationTest.java
@@ -21,7 +21,7 @@
 
 import android.net.wifi.EAPConstants;
 import android.net.wifi.hotspot2.pps.Credential;
-import android.net.wifi.hotspot2.pps.HomeSP;
+import android.net.wifi.hotspot2.pps.HomeSp;
 import android.net.wifi.hotspot2.pps.Policy;
 import android.net.wifi.hotspot2.pps.UpdateParameter;
 import android.os.Parcel;
@@ -50,11 +50,11 @@
      *
      * @return {@link android.net.wifi.hotspot2.pps.HomeSP}
      */
-    private static HomeSP createHomeSp() {
-        HomeSP homeSp = new HomeSP();
+    private static HomeSp createHomeSp() {
+        HomeSp homeSp = new HomeSp();
         homeSp.setFqdn("fqdn");
         homeSp.setFriendlyName("friendly name");
-        homeSp.setRoamingConsortiumOIs(new long[] {0x55, 0x66});
+        homeSp.setRoamingConsortiumOis(new long[] {0x55, 0x66});
         return homeSp;
     }
 
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/omadm/PPSMOParserTest.java b/wifi/tests/src/android/net/wifi/hotspot2/omadm/PpsMoParserTest.java
similarity index 91%
rename from wifi/tests/src/android/net/wifi/hotspot2/omadm/PPSMOParserTest.java
rename to wifi/tests/src/android/net/wifi/hotspot2/omadm/PpsMoParserTest.java
index 15de5c7..7cd72f0 100644
--- a/wifi/tests/src/android/net/wifi/hotspot2/omadm/PPSMOParserTest.java
+++ b/wifi/tests/src/android/net/wifi/hotspot2/omadm/PpsMoParserTest.java
@@ -19,10 +19,10 @@
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
-import android.net.wifi.hotspot2.omadm.PPSMOParser;
+import android.net.wifi.hotspot2.omadm.PpsMoParser;
 import android.net.wifi.hotspot2.PasspointConfiguration;
 import android.net.wifi.hotspot2.pps.Credential;
-import android.net.wifi.hotspot2.pps.HomeSP;
+import android.net.wifi.hotspot2.pps.HomeSp;
 import android.net.wifi.hotspot2.pps.Policy;
 import android.net.wifi.hotspot2.pps.UpdateParameter;
 import android.test.suitebuilder.annotation.SmallTest;
@@ -43,10 +43,10 @@
 import java.util.Map;
 
 /**
- * Unit tests for {@link android.net.wifi.hotspot2.omadm.PPSMOParser}.
+ * Unit tests for {@link android.net.wifi.hotspot2.omadm.PpsMoParser}.
  */
 @SmallTest
-public class PPSMOParserTest {
+public class PpsMoParserTest {
     private static final String VALID_PPS_MO_XML_FILE = "assets/pps/PerProviderSubscription.xml";
     private static final String PPS_MO_XML_FILE_DUPLICATE_HOMESP =
             "assets/pps/PerProviderSubscription_DuplicateHomeSP.xml";
@@ -122,17 +122,17 @@
         config.setUsageLimitUsageTimePeriodInMinutes(99910);
 
         // HomeSP configuration.
-        HomeSP homeSp = new HomeSP();
+        HomeSp homeSp = new HomeSp();
         homeSp.setFriendlyName("Century House");
         homeSp.setFqdn("mi6.co.uk");
-        homeSp.setRoamingConsortiumOIs(new long[] {0x112233L, 0x445566L});
+        homeSp.setRoamingConsortiumOis(new long[] {0x112233L, 0x445566L});
         homeSp.setIconUrl("icon.test.com");
         Map<String, Long> homeNetworkIds = new HashMap<>();
         homeNetworkIds.put("TestSSID", 0x12345678L);
         homeNetworkIds.put("NullHESSID", null);
         homeSp.setHomeNetworkIds(homeNetworkIds);
-        homeSp.setMatchAllOIs(new long[] {0x11223344});
-        homeSp.setMatchAnyOIs(new long[] {0x55667788});
+        homeSp.setMatchAllOis(new long[] {0x11223344});
+        homeSp.setMatchAnyOis(new long[] {0x55667788});
         homeSp.setOtherHomePartners(new String[] {"other.fqdn.com"});
         config.setHomeSp(homeSp);
 
@@ -141,7 +141,7 @@
         credential.setCreationTimeInMs(format.parse("2016-01-01T10:00:00Z").getTime());
         credential.setExpirationTimeInMs(format.parse("2016-02-01T10:00:00Z").getTime());
         credential.setRealm("shaken.stirred.com");
-        credential.setCheckAAAServerCertStatus(true);
+        credential.setCheckAaaServerCertStatus(true);
         Credential.UserCredential userCredential = new Credential.UserCredential();
         userCredential.setUsername("james");
         userCredential.setPassword("Ym9uZDAwNw==");
@@ -209,53 +209,53 @@
     public void parseValidPPSMOTree() throws Exception {
         String ppsMoTree = loadResourceFile(VALID_PPS_MO_XML_FILE);
         PasspointConfiguration expectedConfig = generateConfigurationFromPPSMOTree();
-        PasspointConfiguration actualConfig = PPSMOParser.parseMOText(ppsMoTree);
+        PasspointConfiguration actualConfig = PpsMoParser.parseMoText(ppsMoTree);
         assertTrue(actualConfig.equals(expectedConfig));
     }
 
     @Test
     public void parseNullPPSMOTree() throws Exception {
-        assertEquals(null, PPSMOParser.parseMOText(null));
+        assertEquals(null, PpsMoParser.parseMoText(null));
     }
 
     @Test
     public void parseEmptyPPSMOTree() throws Exception {
-        assertEquals(null, PPSMOParser.parseMOText(new String()));
+        assertEquals(null, PpsMoParser.parseMoText(new String()));
     }
 
     @Test
     public void parsePPSMOTreeWithDuplicateHomeSP() throws Exception {
-        assertEquals(null, PPSMOParser.parseMOText(
+        assertEquals(null, PpsMoParser.parseMoText(
                 loadResourceFile(PPS_MO_XML_FILE_DUPLICATE_HOMESP)));
     }
 
     @Test
     public void parsePPSMOTreeWithDuplicateValue() throws Exception {
-        assertEquals(null, PPSMOParser.parseMOText(
+        assertEquals(null, PpsMoParser.parseMoText(
                 loadResourceFile(PPS_MO_XML_FILE_DUPLICATE_VALUE)));
     }
 
     @Test
     public void parsePPSMOTreeWithMissingValue() throws Exception {
-        assertEquals(null, PPSMOParser.parseMOText(
+        assertEquals(null, PpsMoParser.parseMoText(
                 loadResourceFile(PPS_MO_XML_FILE_MISSING_VALUE)));
     }
 
     @Test
     public void parsePPSMOTreeWithMissingName() throws Exception {
-        assertEquals(null, PPSMOParser.parseMOText(
+        assertEquals(null, PpsMoParser.parseMoText(
                 loadResourceFile(PPS_MO_XML_FILE_MISSING_NAME)));
     }
 
     @Test
     public void parsePPSMOTreeWithInvalidNode() throws Exception {
-        assertEquals(null, PPSMOParser.parseMOText(
+        assertEquals(null, PpsMoParser.parseMoText(
                 loadResourceFile(PPS_MO_XML_FILE_INVALID_NODE)));
     }
 
     @Test
     public void parsePPSMOTreeWithInvalidName() throws Exception {
-        assertEquals(null, PPSMOParser.parseMOText(
+        assertEquals(null, PpsMoParser.parseMoText(
                 loadResourceFile(PPS_MO_XML_FILE_INVALID_NAME)));
     }
 }
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/pps/CredentialTest.java b/wifi/tests/src/android/net/wifi/hotspot2/pps/CredentialTest.java
index 6f68e1c..c7ade00 100644
--- a/wifi/tests/src/android/net/wifi/hotspot2/pps/CredentialTest.java
+++ b/wifi/tests/src/android/net/wifi/hotspot2/pps/CredentialTest.java
@@ -59,7 +59,7 @@
         cred.setCreationTimeInMs(123455L);
         cred.setExpirationTimeInMs(2310093L);
         cred.setRealm("realm");
-        cred.setCheckAAAServerCertStatus(true);
+        cred.setCheckAaaServerCertStatus(true);
         cred.setUserCredential(userCred);
         cred.setCertCredential(certCred);
         cred.setSimCredential(simCred);
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/pps/HomeSPTest.java b/wifi/tests/src/android/net/wifi/hotspot2/pps/HomeSpTest.java
similarity index 68%
rename from wifi/tests/src/android/net/wifi/hotspot2/pps/HomeSPTest.java
rename to wifi/tests/src/android/net/wifi/hotspot2/pps/HomeSpTest.java
index 92e94ee..c41c11f 100644
--- a/wifi/tests/src/android/net/wifi/hotspot2/pps/HomeSPTest.java
+++ b/wifi/tests/src/android/net/wifi/hotspot2/pps/HomeSpTest.java
@@ -30,10 +30,10 @@
 import java.util.Map;
 
 /**
- * Unit tests for {@link android.net.wifi.hotspot2.pps.HomeSP}.
+ * Unit tests for {@link android.net.wifi.hotspot2.pps.HomeSp}.
  */
 @SmallTest
-public class HomeSPTest {
+public class HomeSpTest {
 
     /**
      * Helper function for creating a map of home network IDs for testing.
@@ -48,68 +48,68 @@
     }
 
     /**
-     * Helper function for creating a HomeSP for testing.
+     * Helper function for creating a HomeSp for testing.
      *
-     * @param homeNetworkIds The map of home network IDs associated with HomeSP
-     * @return {@link HomeSP}
+     * @param homeNetworkIds The map of home network IDs associated with HomeSp
+     * @return {@link HomeSp}
      */
-    private static HomeSP createHomeSp(Map<String, Long> homeNetworkIds) {
-        HomeSP homeSp = new HomeSP();
+    private static HomeSp createHomeSp(Map<String, Long> homeNetworkIds) {
+        HomeSp homeSp = new HomeSp();
         homeSp.setFqdn("fqdn");
         homeSp.setFriendlyName("friendly name");
         homeSp.setIconUrl("icon.url");
         homeSp.setHomeNetworkIds(homeNetworkIds);
-        homeSp.setMatchAllOIs(new long[] {0x11L, 0x22L});
-        homeSp.setMatchAnyOIs(new long[] {0x33L, 0x44L});
+        homeSp.setMatchAllOis(new long[] {0x11L, 0x22L});
+        homeSp.setMatchAnyOis(new long[] {0x33L, 0x44L});
         homeSp.setOtherHomePartners(new String[] {"partner1", "partner2"});
-        homeSp.setRoamingConsortiumOIs(new long[] {0x55, 0x66});
+        homeSp.setRoamingConsortiumOis(new long[] {0x55, 0x66});
         return homeSp;
     }
 
     /**
-     * Helper function for creating a HomeSP with home network IDs for testing.
+     * Helper function for creating a HomeSp with home network IDs for testing.
      *
-     * @return {@link HomeSP}
+     * @return {@link HomeSp}
      */
-    private static HomeSP createHomeSpWithHomeNetworkIds() {
+    private static HomeSp createHomeSpWithHomeNetworkIds() {
         return createHomeSp(createHomeNetworkIds());
     }
 
     /**
-     * Helper function for creating a HomeSP without home network IDs for testing.
+     * Helper function for creating a HomeSp without home network IDs for testing.
      *
-     * @return {@link HomeSP}
+     * @return {@link HomeSp}
      */
-    private static HomeSP createHomeSpWithoutHomeNetworkIds() {
+    private static HomeSp createHomeSpWithoutHomeNetworkIds() {
         return createHomeSp(null);
     }
 
     /**
-     * Helper function for verifying HomeSP after parcel write then read.
+     * Helper function for verifying HomeSp after parcel write then read.
      * @param writeHomeSp
      * @throws Exception
      */
-    private static void verifyParcel(HomeSP writeHomeSp) throws Exception {
+    private static void verifyParcel(HomeSp writeHomeSp) throws Exception {
         Parcel parcel = Parcel.obtain();
         writeHomeSp.writeToParcel(parcel, 0);
 
         parcel.setDataPosition(0);    // Rewind data position back to the beginning for read.
-        HomeSP readHomeSp = HomeSP.CREATOR.createFromParcel(parcel);
+        HomeSp readHomeSp = HomeSp.CREATOR.createFromParcel(parcel);
         assertTrue(readHomeSp.equals(writeHomeSp));
     }
 
     /**
-     * Verify parcel read/write for an empty HomeSP.
+     * Verify parcel read/write for an empty HomeSp.
      *
      * @throws Exception
      */
     @Test
-    public void verifyParcelWithEmptyHomeSP() throws Exception {
-        verifyParcel(new HomeSP());
+    public void verifyParcelWithEmptyHomeSp() throws Exception {
+        verifyParcel(new HomeSp());
     }
 
     /**
-     * Verify parcel read/write for a HomeSP containing Home Network IDs.
+     * Verify parcel read/write for a HomeSp containing Home Network IDs.
      *
      * @throws Exception
      */
@@ -119,7 +119,7 @@
     }
 
     /**
-     * Verify parcel read/write for a HomeSP without Home Network IDs.
+     * Verify parcel read/write for a HomeSp without Home Network IDs.
      *
      * @throws Exception
      */
@@ -129,62 +129,62 @@
     }
 
     /**
-     * Verify that a HomeSP is valid when both FQDN and Friendly Name
+     * Verify that a HomeSp is valid when both FQDN and Friendly Name
      * are provided.
      *
      * @throws Exception
      */
     @Test
-    public void validateValidHomeSP() throws Exception {
-        HomeSP homeSp = createHomeSpWithHomeNetworkIds();
+    public void validateValidHomeSp() throws Exception {
+        HomeSp homeSp = createHomeSpWithHomeNetworkIds();
         assertTrue(homeSp.validate());
     }
 
     /**
-     * Verify that a HomeSP is not valid when FQDN is not provided
+     * Verify that a HomeSp is not valid when FQDN is not provided
      *
      * @throws Exception
      */
     @Test
     public void validateHomeSpWithoutFqdn() throws Exception {
-        HomeSP homeSp = createHomeSpWithHomeNetworkIds();
+        HomeSp homeSp = createHomeSpWithHomeNetworkIds();
         homeSp.setFqdn(null);
         assertFalse(homeSp.validate());
     }
 
     /**
-     * Verify that a HomeSP is not valid when Friendly Name is not provided
+     * Verify that a HomeSp is not valid when Friendly Name is not provided
      *
      * @throws Exception
      */
     @Test
     public void validateHomeSpWithoutFriendlyName() throws Exception {
-        HomeSP homeSp = createHomeSpWithHomeNetworkIds();
+        HomeSp homeSp = createHomeSpWithHomeNetworkIds();
         homeSp.setFriendlyName(null);
         assertFalse(homeSp.validate());
     }
 
     /**
-     * Verify that a HomeSP is valid when the optional Home Network IDs are
+     * Verify that a HomeSp is valid when the optional Home Network IDs are
      * not provided.
      *
      * @throws Exception
      */
     @Test
     public void validateHomeSpWithoutHomeNetworkIds() throws Exception {
-        HomeSP homeSp = createHomeSpWithoutHomeNetworkIds();
+        HomeSp homeSp = createHomeSpWithoutHomeNetworkIds();
         assertTrue(homeSp.validate());
     }
 
     /**
-     * Verify that a HomeSP is invalid when the optional Home Network IDs
+     * Verify that a HomeSp is invalid when the optional Home Network IDs
      * contained an invalid SSID (exceeding maximum number of bytes).
      *
      * @throws Exception
      */
     @Test
     public void validateHomeSpWithInvalidHomeNetworkIds() throws Exception {
-        HomeSP homeSp = createHomeSpWithoutHomeNetworkIds();
+        HomeSp homeSp = createHomeSpWithoutHomeNetworkIds();
         // HomeNetworkID with SSID exceeding the maximum length.
         Map<String, Long> homeNetworkIds = new HashMap<>();
         byte[] rawSsidBytes = new byte[33];
@@ -202,8 +202,8 @@
      */
     @Test
     public void validateCopyConstructorFromNullSource() throws Exception {
-        HomeSP copySp = new HomeSP(null);
-        HomeSP defaultSp = new HomeSP();
+        HomeSp copySp = new HomeSp(null);
+        HomeSp defaultSp = new HomeSp();
         assertTrue(copySp.equals(defaultSp));
     }
 
@@ -214,8 +214,8 @@
      */
     @Test
     public void validateCopyConstructorFromValidSource() throws Exception {
-        HomeSP sourceSp = createHomeSpWithHomeNetworkIds();
-        HomeSP copySp = new HomeSP(sourceSp);
+        HomeSp sourceSp = createHomeSpWithHomeNetworkIds();
+        HomeSp copySp = new HomeSp(sourceSp);
         assertTrue(copySp.equals(sourceSp));
     }
 }